]> git.0d.be Git - empathy.git/blobdiff - src/empathy-accounts.c
Merge branch 'change-audio'
[empathy.git] / src / empathy-accounts.c
index 05cb269c1a80ba402bdd6f04b31581ecf7675664..78398c3eec37e2b545e9b592eccc42ee159b7b09 100644 (file)
@@ -112,12 +112,17 @@ 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)))
         {
           tp_account_prepare_async (account, NULL, account_prepare_cb, manager);
+          g_object_unref (bus);
           return;
         }
       else
@@ -231,6 +236,8 @@ main (int argc, char *argv[])
 
   g_set_application_name (_("Empathy Accounts"));
 
+  /* Make empathy and empathy-accounts appear as the same app in gnome-shell */
+  gdk_set_program_class ("Empathy");
   gtk_window_set_default_icon_name ("empathy");
   textdomain (GETTEXT_PACKAGE);