diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-12 16:51:06 -0400 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-10-12 17:39:39 -0400 |
commit | 13a7933cbde1f932c18f3196b5f3c38f23fd8bb4 (patch) | |
tree | cc5dcce6bacf38dd84fc1e55e4b5d9359a9e50e1 /src | |
parent | 13f025bb32e7e1f2e59f33ffb39d9049a1e7ff17 (diff) |
debug: make add_client() more generic
https://bugzilla.gnome.org/show_bug.cgi?id=710017
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-debug-window.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c index 9611da1c..f813becc 100644 --- a/src/empathy-debug-window.c +++ b/src/empathy-debug-window.c @@ -1108,18 +1108,17 @@ debug_window_name_owner_changed_cb (TpDBusDaemon *proxy, } static void -add_client (EmpathyDebugWindow *self, - const gchar *name) +add_service (EmpathyDebugWindow *self, + const gchar *bus_name, + const gchar *display_name, + ServiceType type) { - const gchar *suffix; FillServiceChooserData *data; - suffix = name + strlen (TP_CLIENT_BUS_NAME_BASE); - - data = fill_service_chooser_data_new (self, suffix, SERVICE_TYPE_CLIENT); + data = fill_service_chooser_data_new (self, display_name, type); tp_cli_dbus_daemon_call_get_name_owner (self->priv->dbus, -1, - name, debug_window_get_name_owner_cb, data, NULL, NULL); + bus_name, debug_window_get_name_owner_cb, data, NULL, NULL); self->priv->services_detected ++; } @@ -1144,7 +1143,8 @@ list_names_cb (TpDBusDaemon *bus_daemon, { if (g_str_has_prefix (names[i], TP_CLIENT_BUS_NAME_BASE)) { - add_client (self, names[i]); + add_service (self, names[i], + names[i] + strlen (TP_CLIENT_BUS_NAME_BASE), SERVICE_TYPE_CLIENT); } } } |