Merge lp:~larsu/indicator-printers/lp1304434 into lp:indicator-printers/14.04

Proposed by Lars Karlitski
Status: Merged
Approved by: Charles Kerr
Approved revision: 71
Merged at revision: 71
Proposed branch: lp:~larsu/indicator-printers/lp1304434
Merge into: lp:indicator-printers/14.04
Diff against target: 34 lines (+17/-0)
1 file modified
src/indicator-printers-service.c (+17/-0)
To merge this branch: bzr merge lp:~larsu/indicator-printers/lp1304434
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+219681@code.launchpad.net

Commit message

service: own bus name so that the panel can find it on the bus

Description of the change

service: own bus name so that the panel can find it on the bus

This got accidentally removed in r68.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Confirmed, this fix reinstates com.canonical.indicator.printers to the session bus.

Thanks Lars!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-printers-service.c'
2--- src/indicator-printers-service.c 2014-03-13 17:30:04 +0000
3+++ src/indicator-printers-service.c 2014-05-15 11:25:24 +0000
4@@ -132,6 +132,17 @@
5 ippDelete (resp);
6 }
7
8+static void
9+name_lost (GDBusConnection *connection,
10+ const gchar *name,
11+ gpointer user_data)
12+{
13+ int subscription_id = GPOINTER_TO_INT (user_data);
14+
15+ cancel_subscription (subscription_id);
16+ gtk_main_quit ();
17+}
18+
19 int main (int argc, char *argv[])
20 {
21 /* Init i18n */
22@@ -154,6 +165,12 @@
23 renew_subscription_timeout,
24 &subscription_id);
25
26+ g_bus_own_name (G_BUS_TYPE_SESSION,
27+ INDICATOR_PRINTERS_DBUS_NAME,
28+ G_BUS_NAME_OWNER_FLAGS_NONE,
29+ NULL, NULL, name_lost,
30+ GINT_TO_POINTER (subscription_id), NULL);
31+
32 cups_notifier = cups_notifier_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
33 0,
34 NULL,

Subscribers

People subscribed via source and target branches