From: Christian Persch Date: Thu, 13 May 2010 12:46:26 +0000 (+0200) Subject: [shell] Use g_bus_watch_name_on_connection() X-Git-Tag: EVINCE_2_31_2~22 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=2baf0a33fd22d79a6803cdff480e8a293b2f0049;p=evince.git [shell] Use g_bus_watch_name_on_connection() We already have the bus connection here, so just pass it along. --- diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c index c44f8a8b..fa934bf6 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);