[empathy/gnome-3-10] debug: stop using tp_list_connection_names()
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-10] debug: stop using tp_list_connection_names()
- Date: Sat, 12 Oct 2013 21:40:02 +0000 (UTC)
commit 12c7e0dc5a4c83d619d9983bc32b8caebab520aa
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Sat Oct 12 17:01:21 2013 -0400
debug: stop using tp_list_connection_names()
Make the code more symetric.
https://bugzilla.gnome.org/show_bug.cgi?id=710017
src/empathy-debug-window.c | 53 ++++---------------------------------------
1 files changed, 5 insertions(+), 48 deletions(-)
---
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index f813bec..98012e8 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]