]> www.fi.muni.cz Git - evince.git/commitdiff
[shell] Use g_bus_watch_name_on_connection()
authorChristian Persch <chpe@gnome.org>
Thu, 13 May 2010 12:46:26 +0000 (14:46 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 25 May 2010 07:38:31 +0000 (09:38 +0200)
We already have the bus connection here, so just pass it along.

shell/ev-daemon.c

index c44f8a8b1c8eff48c0be571b5059da3a1cc91465..fa934bf6e14e58aea8b5c249fc9c0d057dc1cc2e 100644 (file)
@@ -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);