aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-debug-window.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-29 22:06:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-07-09 19:38:39 +0800
commitec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd (patch)
treef9233a776731a8a7a40865a56a2eebf8ca41e79c /src/empathy-debug-window.c
parent678527d4d55a1b93916187f08f038fdacdfaf8d2 (diff)
downloadgsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar.gz
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar.bz2
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar.lz
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar.xz
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.tar.zst
gsoc2013-empathy-ec08d8cafdf99f9ae3de2c92d3fcfbb94704bafd.zip
Store the unique name in the model
This avoid to add one entry per Empathy head for example.
Diffstat (limited to 'src/empathy-debug-window.c')
-rw-r--r--src/empathy-debug-window.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c
index b1234d7ce..ea7dcb902 100644
--- a/src/empathy-debug-window.c
+++ b/src/empathy-debug-window.c
@@ -681,10 +681,14 @@ debug_window_get_name_owner_cb (TpDBusDaemon *proxy,
GtkTreeIter iter;
char *name;
- DEBUG ("Adding CM to list: %s at unique name: %s",
+ DEBUG ("Adding %s to list: %s at unique name: %s",
+ data->type == SERVICE_TYPE_CM? "CM": "Client",
data->name, out);
- name = get_cm_display_name (self, data->name);
+ if (data->type == SERVICE_TYPE_CM)
+ name = get_cm_display_name (self, data->name);
+ else
+ name = g_strdup (data->name);
gtk_list_store_append (priv->service_store, &iter);
gtk_list_store_set (priv->service_store, &iter,
@@ -840,21 +844,14 @@ add_client (EmpathyDebugWindow *self,
{
EmpathyDebugWindowPriv *priv = GET_PRIV (self);
const gchar *suffix;
- GtkTreeIter iter;
+ FillServiceChooserData *data;
suffix = name + strlen (TP_CLIENT_BUS_NAME_BASE);
- gtk_list_store_append (priv->service_store, &iter);
- gtk_list_store_set (priv->service_store, &iter,
- COL_NAME, suffix,
- COL_UNIQUE_NAME, name,
- -1);
+ data = fill_service_chooser_data_new (self, suffix, SERVICE_TYPE_CLIENT);
- /* Select Empathy by default */
- if (!tp_strdiff (suffix, "Empathy"))
- {
- gtk_combo_box_set_active_iter (GTK_COMBO_BOX (priv->chooser), &iter);
- }
+ tp_cli_dbus_daemon_call_get_name_owner (priv->dbus, -1,
+ name, debug_window_get_name_owner_cb, data, NULL, NULL);
}
static void