aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Tellier <jonathan.tellier@gmail.com>2009-08-29 01:26:15 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-08-31 22:19:31 +0800
commit8852aeef8fa4d6a76dfc030d8f337fab118dc463 (patch)
tree5bc17eb2d0e6046467f541d806f407a5d67210c5
parent647858dc34ec9786c88b22fea74fc45ff3bb14f6 (diff)
downloadgsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar.gz
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar.bz2
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar.lz
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar.xz
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.tar.zst
gsoc2013-empathy-8852aeef8fa4d6a76dfc030d8f337fab118dc463.zip
Fixed some of the EmpathyAccountWidget's control button behaviour.
- When creating an IRC account, we are now making sure that the control buttons have the correct state. - When creating an account, the "Cancel" button is always sensitive. - Fixed a style error in EmpathyAccountsDialog.
-rw-r--r--libempathy-gtk/empathy-account-widget.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index df0dc967b..c831bc8c4 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -99,7 +99,9 @@ account_widget_set_control_buttons_sensitivity (EmpathyAccountWidget *self,
if (!priv->simple)
{
gtk_widget_set_sensitive (priv->apply_button, sensitive);
- gtk_widget_set_sensitive (priv->cancel_button, sensitive);
+ gtk_widget_set_sensitive (
+ priv->cancel_button, sensitive || priv->creating_account);
+
priv->contains_pending_changes = sensitive;
}
}
@@ -1207,7 +1209,19 @@ do_constructed (GObject *obj)
G_CALLBACK (account_widget_apply_clicked_cb),
self);
gtk_widget_show_all (hbox);
- account_widget_set_control_buttons_sensitivity (self, FALSE);
+
+ if (!tp_strdiff (protocol, "irc") && priv->creating_account)
+ {
+ /* For the IRC protocol, when creating an account, the user might
+ * have nothing to enter. That means that no control interaction
+ * might occur, so the control buttons sensitivity might never get
+ * updated. That's why we have to explicitly call this function. */
+ account_widget_handle_control_buttons_sensitivity (self);
+ }
+ else
+ {
+ account_widget_set_control_buttons_sensitivity (self, FALSE);
+ }
}
account = empathy_account_settings_get_account (priv->settings);