diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-13 05:24:20 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-13 05:39:39 +0800 |
commit | 33ee7a9336197b3b43d87a90c667920b1c5c7e00 (patch) | |
tree | 7c26ca1d8effd195893cff3822234dd2494cfb0b | |
parent | 28cd04d99c680753672f6c2f7bb0191b319dd8da (diff) | |
download | gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar.gz gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar.bz2 gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar.lz gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar.xz gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.tar.zst gsoc2013-empathy-33ee7a9336197b3b43d87a90c667920b1c5c7e00.zip |
use list_names_cb to find MC
Make the code more symetric.
https://bugzilla.gnome.org/show_bug.cgi?id=710017
-rw-r--r-- | src/empathy-debug-window.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c index 7a48449b7..ec5981355 100644 --- a/src/empathy-debug-window.c +++ b/src/empathy-debug-window.c @@ -41,6 +41,7 @@ typedef enum { SERVICE_TYPE_CM = 0, SERVICE_TYPE_CLIENT, + SERVICE_TYPE_MC, } ServiceType; enum @@ -866,6 +867,8 @@ service_type_to_string (ServiceType type) return "CM"; case SERVICE_TYPE_CLIENT: return "Client"; + case SERVICE_TYPE_MC: + return "MC"; } return "other"; @@ -1126,6 +1129,10 @@ list_names_cb (TpDBusDaemon *bus_daemon, add_service (self, names[i], names[i] + strlen (TP_CM_BUS_NAME_BASE), SERVICE_TYPE_CM); } + else if (!tp_strdiff (names[i], TP_ACCOUNT_MANAGER_BUS_NAME)) + { + add_service (self, names[i], "Mission-Control", SERVICE_TYPE_MC); + } } } @@ -1133,8 +1140,6 @@ static void debug_window_fill_service_chooser (EmpathyDebugWindow *self) { GError *error = NULL; - GtkTreeIter iter; - GtkListStore *active_buffer, *pause_buffer; self->priv->dbus = tp_dbus_daemon_dup (&error); @@ -1149,22 +1154,6 @@ debug_window_fill_service_chooser (EmpathyDebugWindow *self) self->priv->services_detected = 0; self->priv->name_owner_cb_count = 0; - /* add Mission Control */ - active_buffer= new_list_store_for_service (); - pause_buffer = new_list_store_for_service (); - - gtk_list_store_insert_with_values (self->priv->service_store, &iter, -1, - COL_NAME, "mission-control", - COL_UNIQUE_NAME, "org.freedesktop.Telepathy.MissionControl5", - COL_GONE, FALSE, - COL_ACTIVE_BUFFER, active_buffer, - COL_PAUSE_BUFFER, pause_buffer, - COL_PROXY, NULL, - -1); - g_object_unref (active_buffer); - g_object_unref (pause_buffer); - - /* add clients */ tp_dbus_daemon_list_names (self->priv->dbus, 2000, list_names_cb, NULL, NULL, G_OBJECT (self)); |