aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Tellier <jonathan.tellier@gmail.com>2009-08-28 23:06:14 +0800
committerjtellier <jonathan.tellier@collabora.co.uk>2009-08-29 02:27:43 +0800
commit9b845e9ce1fe88006335f73a02ff68853757bd30 (patch)
treec3274ad3c5a90cda79cc8f4796d663c1d821865a /src
parentcb75a2c77a35fbf7ace246d5c45d7ecda8ae8ab1 (diff)
downloadgsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar.gz
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar.bz2
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar.lz
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar.xz
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.tar.zst
gsoc2013-empathy-9b845e9ce1fe88006335f73a02ff68853757bd30.zip
Simplified the code that checks if selected account has pending changes
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 807c78b97..6cfc830d1 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -342,22 +342,18 @@ accounts_dialog_has_pending_change (EmpathyAccountsDialog *dialog,
gboolean has_pending_changes;
GtkTreeIter iter;
GtkTreeModel *model;
- EmpathyAccountSettings *settings;
+ GtkTreeSelection *selection;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->treeview));
- settings = accounts_dialog_model_get_selected_settings (dialog);
+ selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->treeview));
- if (accounts_dialog_get_settings_iter (dialog, settings, &iter))
+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
gtk_tree_model_get (model, &iter, COL_ACCOUNT_POINTER, account, -1);
has_pending_changes = account != NULL && priv->setting_widget_object != NULL
&& empathy_account_widget_contains_pending_changes (
priv->setting_widget_object);
- if (settings != NULL)
- g_object_unref (settings);
-
return has_pending_changes;
}