]> git.0d.be Git - empathy.git/commitdiff
Instant-apply the "enabled" setting.
authorCosimo Cecchi <cosimoc@gnome.org>
Mon, 28 Sep 2009 10:18:40 +0000 (12:18 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 28 Sep 2009 10:21:18 +0000 (12:21 +0200)
libempathy-gtk/empathy-account-widget.c

index 641ef00badbaa0dddf9da4a133786ab8d6faedd1..13616802098fe4b2fa7f29e33f040053b520aeed 100644 (file)
@@ -627,13 +627,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);
-            }
         }
     }
 
@@ -1064,8 +1057,15 @@ static void
 account_widget_enabled_released_cb (GtkToggleButton *toggle_button,
     gpointer user_data)
 {
-  account_widget_handle_control_buttons_sensitivity (
-      EMPATHY_ACCOUNT_WIDGET (user_data));
+  EmpathyAccountWidgetPriv *priv = GET_PRIV (user_data);
+  EmpathyAccount *account;
+  gboolean state;
+
+  state = gtk_toggle_button_get_active (toggle_button);
+  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