[empathy/mc5: 200/483] Use the new API when getting the account iter.
- From: Sjoerd Simons <sjoerds src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy/mc5: 200/483] Use the new API when getting the account iter.
- Date: Fri, 21 Aug 2009 17:16:13 +0000 (UTC)
commit 7823b045d9b6a00102a44b40943d7d2188412521
Author: Cosimo Cecchi <cosimo cecchi collabora co uk>
Date: Sat Jul 25 16:45:01 2009 +0200
Use the new API when getting the account iter.
src/empathy-accounts-dialog.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index a9a5e7f..f358be8 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]