aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorDavyd Madeley <davyd@madeley.id.au>2009-02-25 12:47:15 +0800
committerDavyd Madeley <davyd@madeley.id.au>2009-07-15 18:12:16 +0800
commitfa028af2e446e6246b43c887f42099d60ad6c219 (patch)
tree7434c9c0a49dd3db5d5ef7b48a1e210a2b3d41a1 /libempathy-gtk
parent8571c54004e9cf8d2729a03d712210ab0ba0cd3b (diff)
downloadgsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar.gz
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar.bz2
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar.lz
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar.xz
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.tar.zst
gsoc2013-empathy-fa028af2e446e6246b43c887f42099d60ad6c219.zip
Don't override empathy_account_chooser_set_account when setting filtering
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 7dccb2179..34ebc7eac 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -58,6 +58,7 @@
typedef struct {
EmpathyAccountManager *manager;
gboolean set_active_item;
+ gboolean account_manually_set;
gboolean has_all_option;
EmpathyAccountChooserFilterFunc filter;
gpointer filter_data;
@@ -153,6 +154,7 @@ empathy_account_chooser_init (EmpathyAccountChooser *chooser)
chooser->priv = priv;
priv->set_active_item = FALSE;
+ priv->account_manually_set = FALSE;
priv->filter = NULL;
priv->filter_data = NULL;
@@ -322,6 +324,7 @@ gboolean
empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
EmpathyAccount *account)
{
+ EmpathyAccountChooserPriv *priv;
GtkComboBox *combobox;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -329,6 +332,8 @@ empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), FALSE);
+ priv = GET_PRIV (chooser);
+
combobox = GTK_COMBO_BOX (chooser);
model = gtk_combo_box_get_model (combobox);
gtk_combo_box_get_active_iter (combobox, &iter);
@@ -340,6 +345,8 @@ empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
(GtkTreeModelForeachFunc) account_chooser_set_account_foreach,
&data);
+ priv->account_manually_set = data.set;
+
return data.set;
}
@@ -622,7 +629,8 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
-1);
/* set first connected account as active account */
- if (priv->set_active_item == FALSE && is_enabled) {
+ if (priv->account_manually_set == FALSE &&
+ priv->set_active_item == FALSE && is_enabled) {
priv->set_active_item = TRUE;
gtk_combo_box_set_active_iter (combobox, iter);
}