aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-09-28 18:18:40 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-09-28 18:18:40 +0800
commit51e36d3edfb6557c4cbafd81c534e6e633f393aa (patch)
tree4f7689596e516a491b83e1ed06c513f9c0ec684c /libempathy-gtk/empathy-account-widget.c
parentc0c510473a1ac11e1718c7893f9276701b784eb6 (diff)
downloadgsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar.gz
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar.bz2
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar.lz
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar.xz
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.tar.zst
gsoc2013-empathy-51e36d3edfb6557c4cbafd81c534e6e633f393aa.zip
Instant-apply the "enabled" setting.
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 079f3b2a0..02f5778d4 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -637,13 +637,6 @@ account_widget_applied_cb (GObject *source_object,
* information entered by the user is validated on the server. */
empathy_account_reconnect_async (account, NULL, NULL);
}
- else
- {
- /* The account is disabled so we enable it according to the value
- * of the "Enabled" checkbox */
- empathy_account_set_enabled_async (account, enabled_checked,
- NULL, NULL);
- }
}
}
@@ -1086,8 +1079,18 @@ account_widget_switch_flipped_cb (NbtkGtkLightSwitch *sw,
gpointer user_data)
#endif /* HAVE_NBTK */
{
- account_widget_handle_control_buttons_sensitivity (
- EMPATHY_ACCOUNT_WIDGET (user_data));
+ EmpathyAccountWidgetPriv *priv = GET_PRIV (user_data);
+ EmpathyAccount *account;
+#ifndef HAVE_NBTK
+ gboolean state;
+
+ state = gtk_toggle_button_get_active (toggle_button);
+#endif
+
+ account = empathy_account_settings_get_account (priv->settings);
+
+ /* Enable the account according to the value of the "Enabled" checkbox */
+ empathy_account_set_enabled_async (account, state, NULL, NULL);
}
static void