[empathy/gnome-3-10] debug: make add_client() more generic
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy/gnome-3-10] debug: make add_client() more generic
- Date: Sat, 12 Oct 2013 21:39:57 +0000 (UTC)
commit 13a7933cbde1f932c18f3196b5f3c38f23fd8bb4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Sat Oct 12 16:51:06 2013 -0400
debug: make add_client() more generic
https://bugzilla.gnome.org/show_bug.cgi?id=710017
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 9611da1..f813bec 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);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]