- 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)))
+ 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);
+
+ account = find_account (manager, account_path);
+
+ if (account != NULL)