]> git.0d.be Git - empathy.git/commitdiff
empathy-accounts: allow to pass the full path of the account
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 28 Feb 2011 12:13:33 +0000 (13:13 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 28 Feb 2011 12:31:45 +0000 (13:31 +0100)
src/empathy-accounts.c

index d14ca548d144005378c84c1e116a3c5a55e1a377..78398c3eec37e2b545e9b592eccc42ee159b7b09 100644 (file)
@@ -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)))
         {