[evince/gdbus] [shell] Use g_bus_watch_name_on_connection()



commit dc6b89f3630c27394819efdd9075d1d079abc13a
Author: Christian Persch <chpe gnome org>
Date:   Thu May 13 14:46:26 2010 +0200

    [shell] Use g_bus_watch_name_on_connection()
    
    We already have the bus connection here, so just pass it along.

 shell/ev-daemon.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c
index c44f8a8..fa934bf 100644
--- a/shell/ev-daemon.c
+++ b/shell/ev-daemon.c
@@ -272,12 +272,12 @@ method_call_cb (GDBusConnection       *connection,
                 doc->dbus_name = g_strdup (sender);
                 doc->uri = g_strdup (uri);
 
-                doc->watch_id = g_bus_watch_name (G_BUS_TYPE_STARTER,
-                                                  sender,
-                                                  G_BUS_NAME_WATCHER_FLAGS_NONE,
-                                                  name_appeared_cb,
-                                                  name_vanished_cb,
-                                                  user_data, NULL);
+                doc->watch_id = g_bus_watch_name_on_connection (connection,
+                                                                sender,
+                                                                G_BUS_NAME_WATCHER_FLAGS_NONE,
+                                                                name_appeared_cb,
+                                                                name_vanished_cb,
+                                                                user_data, NULL);
 
                 LOG ("RegisterDocument registered owner '%s' for URI '%s'\n", doc->dbus_name, uri);
                 ev_daemon_docs = g_list_prepend (ev_daemon_docs, doc);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]