Merge lp:~larsu/indicator-printers/ubuntu into lp:~ubuntu-desktop/indicator-printers/ubuntu

Proposed by Sebastien Bacher on 2012-03-20
Status: Merged
Merged at revision: 54
Proposed branch: lp:~larsu/indicator-printers/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-printers/ubuntu
Diff against target: 213 lines (+70/-13) 5 files modified
To merge this branch: bzr merge lp:~larsu/indicator-printers/ubuntu
Reviewer Review Type Date Requested Status
Sebastien Bacher Pending
Review via email: mp+98484@code.launchpad.net

This proposal supersedes a proposal from 2012-03-20.

To post a comment you must log in.

Preview Diff

1=== modified file 'configure'
2--- configure 2012-03-06 21:20:47 +0000
3+++ configure 2012-03-20 18:43:21 +0000
4@@ -1,6 +1,6 @@
5 #! /bin/sh
6 # Guess values for system-dependent variables and create Makefiles.
7-# Generated by GNU Autoconf 2.68 for indicator-printers 0.1.4.
8+# Generated by GNU Autoconf 2.68 for indicator-printers 0.1.5.
9 #
10 #
11 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
12@@ -567,8 +567,8 @@
13 # Identity of this package.
14 PACKAGE_NAME='indicator-printers'
15 PACKAGE_TARNAME='indicator-printers'
16-PACKAGE_VERSION='0.1.4'
17-PACKAGE_STRING='indicator-printers 0.1.4'
18+PACKAGE_VERSION='0.1.5'
19+PACKAGE_STRING='indicator-printers 0.1.5'
20 PACKAGE_BUGREPORT=''
21 PACKAGE_URL=''
22
23@@ -1357,7 +1357,7 @@
24 # Omit some internal or obsolete options to make the list less imposing.
25 # This message is too long to be a string in the A/UX 3.1 sh.
26 cat <<_ACEOF
27-\`configure' configures indicator-printers 0.1.4 to adapt to many kinds of systems.
28+\`configure' configures indicator-printers 0.1.5 to adapt to many kinds of systems.
29
30 Usage: $0 [OPTION]... [VAR=VALUE]...
31
32@@ -1428,7 +1428,7 @@
33
34 if test -n "$ac_init_help"; then
35 case $ac_init_help in
36- short | recursive ) echo "Configuration of indicator-printers 0.1.4:";;
37+ short | recursive ) echo "Configuration of indicator-printers 0.1.5:";;
38 esac
39 cat <<\_ACEOF
40
41@@ -1545,7 +1545,7 @@
42 test -n "$ac_init_help" && exit $ac_status
43 if $ac_init_version; then
44 cat <<\_ACEOF
45-indicator-printers configure 0.1.4
46+indicator-printers configure 0.1.5
47 generated by GNU Autoconf 2.68
48
49 Copyright (C) 2010 Free Software Foundation, Inc.
50@@ -1910,7 +1910,7 @@
51 This file contains any messages produced by compilers while
52 running configure, to aid debugging if configure makes a mistake.
53
54-It was created by indicator-printers $as_me 0.1.4, which was
55+It was created by indicator-printers $as_me 0.1.5, which was
56 generated by GNU Autoconf 2.68. Invocation command line was
57
58 $ $0 $@
59@@ -2727,7 +2727,7 @@
60
61 # Define the identity of the package.
62 PACKAGE='indicator-printers'
63- VERSION='0.1.4'
64+ VERSION='0.1.5'
65
66
67 cat >>confdefs.h <<_ACEOF
68@@ -13777,7 +13777,7 @@
69 # report actual input values of CONFIG_FILES etc. instead of their
70 # values after options handling.
71 ac_log="
72-This file was extended by indicator-printers $as_me 0.1.4, which was
73+This file was extended by indicator-printers $as_me 0.1.5, which was
74 generated by GNU Autoconf 2.68. Invocation command line was
75
76 CONFIG_FILES = $CONFIG_FILES
77@@ -13843,7 +13843,7 @@
78 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
79 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
80 ac_cs_version="\\
81-indicator-printers config.status 0.1.4
82+indicator-printers config.status 0.1.5
83 configured by $0, generated by GNU Autoconf 2.68,
84 with options \\"\$ac_cs_config\\"
85
86
87=== modified file 'configure.ac'
88--- configure.ac 2012-03-06 21:20:47 +0000
89+++ configure.ac 2012-03-20 18:43:21 +0000
90@@ -1,5 +1,5 @@
91
92-AC_INIT(indicator-printers, 0.1.4)
93+AC_INIT(indicator-printers, 0.1.5)
94
95 AC_PREREQ(2.53)
96 AM_INIT_AUTOMAKE([])
97
98=== modified file 'debian/changelog'
99--- debian/changelog 2012-03-06 21:21:19 +0000
100+++ debian/changelog 2012-03-20 18:43:21 +0000
101@@ -1,3 +1,12 @@
102+indicator-printers (0.1.5-0ubuntu1) precise; urgency=low
103+
104+ * New upstream release.
105+ - translate accessible description (LP: #957522)
106+ - set lease durations on cups subscriptions (LP: #959195)
107+ - draw number of jobs as lozenge
108+
109+ -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Tue, 20 Mar 2012 18:50:39 +0100
110+
111 indicator-printers (0.1.4-0ubuntu1) precise; urgency=low
112
113 * New upstream release.
114
115=== modified file 'src/indicator-printers-service.c'
116--- src/indicator-printers-service.c 2012-02-16 17:33:05 +0000
117+++ src/indicator-printers-service.c 2012-03-20 18:43:21 +0000
118@@ -26,6 +26,8 @@
119 #include "indicator-printers-menu.h"
120 #include "indicator-printer-state-notifier.h"
121
122+#define NOTIFY_LEASE_DURATION (15 * 60)
123+
124
125 static int
126 create_subscription ()
127@@ -43,7 +45,7 @@
128 ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
129 "notify-recipient-uri", NULL, "dbus://");
130 ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
131- "notify-lease-duration", 0);
132+ "notify-lease-duration", NOTIFY_LEASE_DURATION);
133
134 resp = cupsDoRequest (CUPS_HTTP_DEFAULT, req, "/");
135 if (!resp || cupsLastError() != IPP_OK) {
136@@ -64,6 +66,46 @@
137 }
138
139
140+static gboolean
141+renew_subscription (int id)
142+{
143+ ipp_t *req;
144+ ipp_t *resp;
145+
146+ req = ippNewRequest (IPP_RENEW_SUBSCRIPTION);
147+ ippAddInteger (req, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
148+ "notify-subscription-id", id);
149+ ippAddString (req, IPP_TAG_OPERATION, IPP_TAG_URI,
150+ "printer-uri", NULL, "/");
151+ ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
152+ "notify-recipient-uri", NULL, "dbus://");
153+ ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
154+ "notify-lease-duration", NOTIFY_LEASE_DURATION);
155+
156+ resp = cupsDoRequest (CUPS_HTTP_DEFAULT, req, "/");
157+ if (!resp || cupsLastError() != IPP_OK) {
158+ g_warning ("Error renewing CUPS subscription %d: %s\n",
159+ id, cupsLastErrorString ());
160+ return FALSE;
161+ }
162+
163+ ippDelete (resp);
164+ return TRUE;
165+}
166+
167+
168+static gboolean
169+renew_subscription_timeout (gpointer userdata)
170+{
171+ int *subscription_id = userdata;
172+
173+ if (*subscription_id <= 0 || !renew_subscription (*subscription_id))
174+ *subscription_id = create_subscription ();
175+
176+ return TRUE;
177+}
178+
179+
180 void
181 cancel_subscription (int id)
182 {
183@@ -115,6 +157,9 @@
184 gtk_init (&argc, &argv);
185
186 subscription_id = create_subscription ();
187+ g_timeout_add_seconds (NOTIFY_LEASE_DURATION - 60,
188+ renew_subscription_timeout,
189+ &subscription_id);
190
191 service = indicator_service_new_version (INDICATOR_PRINTERS_DBUS_NAME,
192 INDICATOR_PRINTERS_DBUS_VERSION);
193
194=== modified file 'src/indicator-printers.c'
195--- src/indicator-printers.c 2012-03-06 21:20:47 +0000
196+++ src/indicator-printers.c 2012-03-20 18:43:21 +0000
197@@ -22,7 +22,7 @@
198 #include "indicator-menu-item.h"
199 #include "dbus-names.h"
200
201-#include <glib/gi18n.h>
202+#include <glib/gi18n-lib.h>
203 #include <gtk/gtk.h>
204
205 #include <libindicator/indicator.h>
206@@ -175,6 +175,9 @@
207
208 else if (properties_match (prop, "visible", value, G_VARIANT_TYPE_BOOLEAN))
209 gtk_widget_set_visible (GTK_WIDGET (menuitem), g_variant_get_boolean (value));
210+
211+ else if (properties_match (prop, "indicator-right-is-lozenge", value, G_VARIANT_TYPE_BOOLEAN))
212+ indicator_menu_item_set_right_is_lozenge (menuitem, g_variant_get_boolean (value));
213 }
214
215

Subscribers

People subscribed via source and target branches