[gthumb] oauth: compare accounts by id
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] oauth: compare accounts by id
- Date: Thu, 26 Oct 2017 16:53:04 +0000 (UTC)
commit 051bf824970efa0dbfc60afd9cf856ea8a0c66ea
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Oct 26 16:57:45 2017 +0200
oauth: compare accounts by id
more reliable
extensions/oauth/oauth-account-chooser-dialog.c | 2 +-
extensions/oauth/oauth-account.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/oauth/oauth-account-chooser-dialog.c b/extensions/oauth/oauth-account-chooser-dialog.c
index db17ed8..e98a1cd 100644
--- a/extensions/oauth/oauth-account-chooser-dialog.c
+++ b/extensions/oauth/oauth-account-chooser-dialog.c
@@ -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);
diff --git a/extensions/oauth/oauth-account.c b/extensions/oauth/oauth-account.c
index f2ade2d..e400ffa 100644
--- a/extensions/oauth/oauth-account.c
+++ b/extensions/oauth/oauth-account.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]