aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-13 05:01:21 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-10-13 05:39:39 +0800
commit12c7e0dc5a4c83d619d9983bc32b8caebab520aa (patch)
treee2c7bf2311359f4add6c03071154bb7982eeb1fd /src
parent13a7933cbde1f932c18f3196b5f3c38f23fd8bb4 (diff)
downloadgsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar.gz
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar.bz2
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar.lz
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar.xz
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.tar.zst
gsoc2013-empathy-12c7e0dc5a4c83d619d9983bc32b8caebab520aa.zip
debug: stop using tp_list_connection_names()
Make the code more symetric. https://bugzilla.gnome.org/show_bug.cgi?id=710017
Diffstat (limited to 'src')
-rw-r--r--src/empathy-debug-window.c53
1 files changed, 5 insertions, 48 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index f813becc2..98012e875 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -937,50 +937,6 @@ OUT:
}
static void
-debug_window_list_connection_names_cb (const gchar * const *names,
- gsize n,
- const gchar * const *cms,
- const gchar * const *protocols,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- EmpathyDebugWindow *self = user_data;
- guint i;
- TpDBusDaemon *dbus;
- GError *error2 = NULL;
-
- if (error != NULL)
- {
- DEBUG ("list_connection_names failed: %s", error->message);
- return;
- }
-
- dbus = tp_dbus_daemon_dup (&error2);
-
- if (error2 != NULL)
- {
- DEBUG ("Failed to dup TpDBusDaemon.");
- g_error_free (error2);
- return;
- }
-
- for (i = 0; cms[i] != NULL; i++)
- {
- FillServiceChooserData *data = fill_service_chooser_data_new (
- self, cms[i], SERVICE_TYPE_CM);
-
- tp_cli_dbus_daemon_call_get_name_owner (dbus, -1,
- names[i], debug_window_get_name_owner_cb,
- data, NULL, NULL);
-
- self->priv->services_detected ++;
- }
-
- g_object_unref (dbus);
-}
-
-static void
debug_window_name_owner_changed_cb (TpDBusDaemon *proxy,
const gchar *arg0,
const gchar *arg1,
@@ -1146,6 +1102,11 @@ list_names_cb (TpDBusDaemon *bus_daemon,
add_service (self, names[i],
names[i] + strlen (TP_CLIENT_BUS_NAME_BASE), SERVICE_TYPE_CLIENT);
}
+ else if (g_str_has_prefix (names[i], TP_CM_BUS_NAME_BASE))
+ {
+ add_service (self, names[i],
+ names[i] + strlen (TP_CM_BUS_NAME_BASE), SERVICE_TYPE_CM);
+ }
}
}
@@ -1169,10 +1130,6 @@ debug_window_fill_service_chooser (EmpathyDebugWindow *self)
self->priv->services_detected = 0;
self->priv->name_owner_cb_count = 0;
- /* Add CMs to list */
- tp_list_connection_names (self->priv->dbus,
- debug_window_list_connection_names_cb, self, NULL, NULL);
-
/* add Mission Control */
active_buffer= new_list_store_for_service ();
pause_buffer = new_list_store_for_service ();