[empathy] Fixed some of the EmpathyAccountWidget's control button behaviour.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] Fixed some of the EmpathyAccountWidget's control button behaviour.
- Date: Mon, 31 Aug 2009 14:36:12 +0000 (UTC)
commit 8852aeef8fa4d6a76dfc030d8f337fab118dc463
Author: Jonathan Tellier <jonathan tellier gmail com>
Date: Fri Aug 28 13:26:15 2009 -0400
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.
libempathy-gtk/empathy-account-widget.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index df0dc96..c831bc8 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]