aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-chooser.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-28 17:20:27 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-28 17:20:27 +0800
commit1d153c1cf91edce537bc64efb01b5a496b35518e (patch)
treede8ba4359a0341bd0c8c6e1a7495f4f39fb565f1 /libempathy-gtk/empathy-account-chooser.c
parentb50b7039d3b52f33df94e5a3526d9f43a51401ad (diff)
parent6df1c4bdd81fbbb288b8e49c3bea9a1dd2e005a6 (diff)
downloadgsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.gz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.bz2
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.lz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.xz
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.tar.zst
gsoc2013-empathy-1d153c1cf91edce537bc64efb01b5a496b35518e.zip
Merge commit 'upstream/master' into mc5
Conflicts: libempathy-gtk/empathy-account-widget.c src/empathy.c
Diffstat (limited to 'libempathy-gtk/empathy-account-chooser.c')
-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 fa05bbcc9..7c6f52fa5 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -56,6 +56,7 @@
typedef struct {
EmpathyAccountManager *manager;
gboolean set_active_item;
+ gboolean account_manually_set;
gboolean has_all_option;
EmpathyAccountChooserFilterFunc filter;
gpointer filter_data;
@@ -151,6 +152,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;
@@ -320,6 +322,7 @@ gboolean
empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
EmpathyAccount *account)
{
+ EmpathyAccountChooserPriv *priv;
GtkComboBox *combobox;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -327,6 +330,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);
@@ -338,6 +343,8 @@ empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
(GtkTreeModelForeachFunc) account_chooser_set_account_foreach,
&data);
+ priv->account_manually_set = data.set;
+
return data.set;
}
@@ -620,7 +627,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);
}