aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-07-25 22:45:01 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-07-30 06:13:20 +0800
commit7823b045d9b6a00102a44b40943d7d2188412521 (patch)
tree7f70c0392227c6b9c431f16228800d920e9bedb0 /src/empathy-accounts-dialog.c
parent7f8d4b20123d1f3f48ddaf404b022bdeeba5d99a (diff)
downloadgsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar.gz
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar.bz2
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar.lz
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar.xz
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.tar.zst
gsoc2013-empathy-7823b045d9b6a00102a44b40943d7d2188412521.zip
Use the new API when getting the account iter.
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index a9a5e7f63..f358be8b4 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -613,15 +613,16 @@ accounts_dialog_get_account_iter (EmpathyAccountsDialog *dialog,
for (ok = gtk_tree_model_get_iter_first (model, iter);
ok;
ok = gtk_tree_model_iter_next (model, iter)) {
- EmpathyAccount *this_account;
+ EmpathyAccountSettings *settings;
gboolean equal;
gtk_tree_model_get (model, iter,
- COL_ACCOUNT_POINTER, &this_account,
+ COL_ACCOUNT_SETTINGS_POINTER, &settings,
-1);
- equal = (this_account == account);
- g_object_unref (this_account);
+ equal = empathy_account_settings_owns_account
+ (settings, account);
+ g_object_unref (settings);
if (equal) {
return TRUE;
@@ -777,7 +778,9 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
name = empathy_account_get_display_name (account);
enabled = empathy_account_is_enabled (account);
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ if (!accounts_dialog_get_account_iter (dialog, account, &iter)) {
+ gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+ }
settings = empathy_account_settings_new_for_account (account);