[empathy/gnome-3-10] use list_names_cb to find MC
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-10] use list_names_cb to find MC
- Date: Sat, 12 Oct 2013 21:40:12 +0000 (UTC)
commit 33ee7a9336197b3b43d87a90c667920b1c5c7e00
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Sat Oct 12 17:24:20 2013 -0400
use list_names_cb to find MC
Make the code more symetric.
https://bugzilla.gnome.org/show_bug.cgi?id=710017
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 7a48449..ec59813 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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]