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

Proposed by Sebastien Bacher
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
configure (+10/-10)
configure.ac (+1/-1)
debian/changelog (+9/-0)
src/indicator-printers-service.c (+46/-1)
src/indicator-printers.c (+4/-1)
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configure'
--- configure 2012-03-06 21:20:47 +0000
+++ configure 2012-03-20 18:43:21 +0000
@@ -1,6 +1,6 @@
1#! /bin/sh1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.68 for indicator-printers 0.1.4.3# Generated by GNU Autoconf 2.68 for indicator-printers 0.1.5.
4#4#
5#5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@
567# Identity of this package.567# Identity of this package.
568PACKAGE_NAME='indicator-printers'568PACKAGE_NAME='indicator-printers'
569PACKAGE_TARNAME='indicator-printers'569PACKAGE_TARNAME='indicator-printers'
570PACKAGE_VERSION='0.1.4'570PACKAGE_VERSION='0.1.5'
571PACKAGE_STRING='indicator-printers 0.1.4'571PACKAGE_STRING='indicator-printers 0.1.5'
572PACKAGE_BUGREPORT=''572PACKAGE_BUGREPORT=''
573PACKAGE_URL=''573PACKAGE_URL=''
574574
@@ -1357,7 +1357,7 @@
1357 # Omit some internal or obsolete options to make the list less imposing.1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF1359 cat <<_ACEOF
1360\`configure' configures indicator-printers 0.1.4 to adapt to many kinds of systems.1360\`configure' configures indicator-printers 0.1.5 to adapt to many kinds of systems.
13611361
1362Usage: $0 [OPTION]... [VAR=VALUE]...1362Usage: $0 [OPTION]... [VAR=VALUE]...
13631363
@@ -1428,7 +1428,7 @@
14281428
1429if test -n "$ac_init_help"; then1429if test -n "$ac_init_help"; then
1430 case $ac_init_help in1430 case $ac_init_help in
1431 short | recursive ) echo "Configuration of indicator-printers 0.1.4:";;1431 short | recursive ) echo "Configuration of indicator-printers 0.1.5:";;
1432 esac1432 esac
1433 cat <<\_ACEOF1433 cat <<\_ACEOF
14341434
@@ -1545,7 +1545,7 @@
1545test -n "$ac_init_help" && exit $ac_status1545test -n "$ac_init_help" && exit $ac_status
1546if $ac_init_version; then1546if $ac_init_version; then
1547 cat <<\_ACEOF1547 cat <<\_ACEOF
1548indicator-printers configure 0.1.41548indicator-printers configure 0.1.5
1549generated by GNU Autoconf 2.681549generated by GNU Autoconf 2.68
15501550
1551Copyright (C) 2010 Free Software Foundation, Inc.1551Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1910,7 +1910,7 @@
1910This file contains any messages produced by compilers while1910This file contains any messages produced by compilers while
1911running configure, to aid debugging if configure makes a mistake.1911running configure, to aid debugging if configure makes a mistake.
19121912
1913It was created by indicator-printers $as_me 0.1.4, which was1913It was created by indicator-printers $as_me 0.1.5, which was
1914generated by GNU Autoconf 2.68. Invocation command line was1914generated by GNU Autoconf 2.68. Invocation command line was
19151915
1916 $ $0 $@1916 $ $0 $@
@@ -2727,7 +2727,7 @@
27272727
2728# Define the identity of the package.2728# Define the identity of the package.
2729 PACKAGE='indicator-printers'2729 PACKAGE='indicator-printers'
2730 VERSION='0.1.4'2730 VERSION='0.1.5'
27312731
27322732
2733cat >>confdefs.h <<_ACEOF2733cat >>confdefs.h <<_ACEOF
@@ -13777,7 +13777,7 @@
13777# report actual input values of CONFIG_FILES etc. instead of their13777# report actual input values of CONFIG_FILES etc. instead of their
13778# values after options handling.13778# values after options handling.
13779ac_log="13779ac_log="
13780This file was extended by indicator-printers $as_me 0.1.4, which was13780This file was extended by indicator-printers $as_me 0.1.5, which was
13781generated by GNU Autoconf 2.68. Invocation command line was13781generated by GNU Autoconf 2.68. Invocation command line was
1378213782
13783 CONFIG_FILES = $CONFIG_FILES13783 CONFIG_FILES = $CONFIG_FILES
@@ -13843,7 +13843,7 @@
13843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=113843cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
13844ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"13844ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
13845ac_cs_version="\\13845ac_cs_version="\\
13846indicator-printers config.status 0.1.413846indicator-printers config.status 0.1.5
13847configured by $0, generated by GNU Autoconf 2.68,13847configured by $0, generated by GNU Autoconf 2.68,
13848 with options \\"\$ac_cs_config\\"13848 with options \\"\$ac_cs_config\\"
1384913849
1385013850
=== modified file 'configure.ac'
--- configure.ac 2012-03-06 21:20:47 +0000
+++ configure.ac 2012-03-20 18:43:21 +0000
@@ -1,5 +1,5 @@
11
2AC_INIT(indicator-printers, 0.1.4)2AC_INIT(indicator-printers, 0.1.5)
33
4AC_PREREQ(2.53)4AC_PREREQ(2.53)
5AM_INIT_AUTOMAKE([])5AM_INIT_AUTOMAKE([])
66
=== modified file 'debian/changelog'
--- debian/changelog 2012-03-06 21:21:19 +0000
+++ debian/changelog 2012-03-20 18:43:21 +0000
@@ -1,3 +1,12 @@
1indicator-printers (0.1.5-0ubuntu1) precise; urgency=low
2
3 * New upstream release.
4 - translate accessible description (LP: #957522)
5 - set lease durations on cups subscriptions (LP: #959195)
6 - draw number of jobs as lozenge
7
8 -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Tue, 20 Mar 2012 18:50:39 +0100
9
1indicator-printers (0.1.4-0ubuntu1) precise; urgency=low10indicator-printers (0.1.4-0ubuntu1) precise; urgency=low
211
3 * New upstream release.12 * New upstream release.
413
=== modified file 'src/indicator-printers-service.c'
--- src/indicator-printers-service.c 2012-02-16 17:33:05 +0000
+++ src/indicator-printers-service.c 2012-03-20 18:43:21 +0000
@@ -26,6 +26,8 @@
26#include "indicator-printers-menu.h"26#include "indicator-printers-menu.h"
27#include "indicator-printer-state-notifier.h"27#include "indicator-printer-state-notifier.h"
2828
29#define NOTIFY_LEASE_DURATION (15 * 60)
30
2931
30static int32static int
31create_subscription ()33create_subscription ()
@@ -43,7 +45,7 @@
43 ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,45 ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
44 "notify-recipient-uri", NULL, "dbus://");46 "notify-recipient-uri", NULL, "dbus://");
45 ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,47 ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
46 "notify-lease-duration", 0);48 "notify-lease-duration", NOTIFY_LEASE_DURATION);
4749
48 resp = cupsDoRequest (CUPS_HTTP_DEFAULT, req, "/");50 resp = cupsDoRequest (CUPS_HTTP_DEFAULT, req, "/");
49 if (!resp || cupsLastError() != IPP_OK) {51 if (!resp || cupsLastError() != IPP_OK) {
@@ -64,6 +66,46 @@
64}66}
6567
6668
69static gboolean
70renew_subscription (int id)
71{
72 ipp_t *req;
73 ipp_t *resp;
74
75 req = ippNewRequest (IPP_RENEW_SUBSCRIPTION);
76 ippAddInteger (req, IPP_TAG_OPERATION, IPP_TAG_INTEGER,
77 "notify-subscription-id", id);
78 ippAddString (req, IPP_TAG_OPERATION, IPP_TAG_URI,
79 "printer-uri", NULL, "/");
80 ippAddString (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_URI,
81 "notify-recipient-uri", NULL, "dbus://");
82 ippAddInteger (req, IPP_TAG_SUBSCRIPTION, IPP_TAG_INTEGER,
83 "notify-lease-duration", NOTIFY_LEASE_DURATION);
84
85 resp = cupsDoRequest (CUPS_HTTP_DEFAULT, req, "/");
86 if (!resp || cupsLastError() != IPP_OK) {
87 g_warning ("Error renewing CUPS subscription %d: %s\n",
88 id, cupsLastErrorString ());
89 return FALSE;
90 }
91
92 ippDelete (resp);
93 return TRUE;
94}
95
96
97static gboolean
98renew_subscription_timeout (gpointer userdata)
99{
100 int *subscription_id = userdata;
101
102 if (*subscription_id <= 0 || !renew_subscription (*subscription_id))
103 *subscription_id = create_subscription ();
104
105 return TRUE;
106}
107
108
67void109void
68cancel_subscription (int id)110cancel_subscription (int id)
69{111{
@@ -115,6 +157,9 @@
115 gtk_init (&argc, &argv);157 gtk_init (&argc, &argv);
116158
117 subscription_id = create_subscription ();159 subscription_id = create_subscription ();
160 g_timeout_add_seconds (NOTIFY_LEASE_DURATION - 60,
161 renew_subscription_timeout,
162 &subscription_id);
118163
119 service = indicator_service_new_version (INDICATOR_PRINTERS_DBUS_NAME,164 service = indicator_service_new_version (INDICATOR_PRINTERS_DBUS_NAME,
120 INDICATOR_PRINTERS_DBUS_VERSION);165 INDICATOR_PRINTERS_DBUS_VERSION);
121166
=== modified file 'src/indicator-printers.c'
--- src/indicator-printers.c 2012-03-06 21:20:47 +0000
+++ src/indicator-printers.c 2012-03-20 18:43:21 +0000
@@ -22,7 +22,7 @@
22#include "indicator-menu-item.h"22#include "indicator-menu-item.h"
23#include "dbus-names.h"23#include "dbus-names.h"
2424
25#include <glib/gi18n.h>25#include <glib/gi18n-lib.h>
26#include <gtk/gtk.h>26#include <gtk/gtk.h>
2727
28#include <libindicator/indicator.h>28#include <libindicator/indicator.h>
@@ -175,6 +175,9 @@
175175
176 else if (properties_match (prop, "visible", value, G_VARIANT_TYPE_BOOLEAN))176 else if (properties_match (prop, "visible", value, G_VARIANT_TYPE_BOOLEAN))
177 gtk_widget_set_visible (GTK_WIDGET (menuitem), g_variant_get_boolean (value));177 gtk_widget_set_visible (GTK_WIDGET (menuitem), g_variant_get_boolean (value));
178
179 else if (properties_match (prop, "indicator-right-is-lozenge", value, G_VARIANT_TYPE_BOOLEAN))
180 indicator_menu_item_set_right_is_lozenge (menuitem, g_variant_get_boolean (value));
178}181}
179182
180183

Subscribers

People subscribed via source and target branches

to all changes: