aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-28 20:13:33 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-28 20:31:45 +0800
commit79a01b5492f280cc8c9ceebeef046e085e684f48 (patch)
treef0a81ed901c31f1706e96c66e78a78b552ea297c
parentd8bb9ec37dd074d70115c481bb667318e833b893 (diff)
downloadgsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar.gz
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar.bz2
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar.lz
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar.xz
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.tar.zst
gsoc2013-empathy-79a01b5492f280cc8c9ceebeef046e085e684f48.zip
empathy-accounts: allow to pass the full path of the account
-rw-r--r--src/empathy-accounts.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/empathy-accounts.c b/src/empathy-accounts.c
index d14ca548d..78398c3ee 100644
--- a/src/empathy-accounts.c
+++ b/src/empathy-accounts.c
@@ -112,8 +112,12 @@ account_manager_ready_for_accounts_cb (GObject *source_object,
/* create and prep the corresponding TpAccount so it's fully ready by the
* time we try to select it in the accounts dialog */
- account_path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE,
- selected_account_name);
+ if (g_str_has_prefix (selected_account_name, TP_ACCOUNT_OBJECT_PATH_BASE))
+ account_path = g_strdup (selected_account_name);
+ else
+ account_path = g_strdup_printf ("%s%s", TP_ACCOUNT_OBJECT_PATH_BASE,
+ selected_account_name);
+
bus = tp_dbus_daemon_dup (NULL);
if ((account = tp_account_new (bus, account_path, &error)))
{