Commit 051bf824 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

oauth: compare accounts by id

more reliable
parent ece66b8b
......@@ -168,7 +168,7 @@ oauth_account_chooser_dialog_construct (OAuthAccountChooserDialog *self,
for (scan = accounts, idx = 0; scan; scan = scan->next, idx++) {
OAuthAccount *account = scan->data;
if ((default_account != NULL) && (g_strcmp0 (account->username, default_account->username) == 0))
if ((default_account != NULL) && (oauth_account_cmp (account, default_account) == 0))
active = idx;
gtk_list_store_append (GTK_LIST_STORE (GET_WIDGET ("account_liststore")), &iter);
......
......@@ -425,7 +425,7 @@ oauth_accounts_save_to_file (const char *service_name,
OAuthAccount *account = scan->data;
DomElement *node;
if ((default_account != NULL) && g_strcmp0 (account->username, default_account->username) == 0)
if ((default_account != NULL) && g_strcmp0 (account->id, default_account->id) == 0)
account->is_default = TRUE;
else
account->is_default = FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment