diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-03-15 17:08:56 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2011-03-19 02:49:56 +0800 |
commit | 7669e3e56c38209fbb2edf9db28cce2c1e5fe372 (patch) | |
tree | 66b89bb092e5d07737df47c0ddee7b0bf248961a | |
parent | e1ae146254273177fc79d203d520f62f751a5b25 (diff) | |
download | gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar.gz gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar.bz2 gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar.lz gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar.xz gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.tar.zst gsoc2013-empathy-7669e3e56c38209fbb2edf9db28cce2c1e5fe372.zip |
Set Apply/Cancel buttons sensitive when password is changed
-rw-r--r-- | libempathy-gtk/empathy-account-widget-skype.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-account-widget-skype.c b/libempathy-gtk/empathy-account-widget-skype.c index 3775d7b57..d21ecf50c 100644 --- a/libempathy-gtk/empathy-account-widget-skype.c +++ b/libempathy-gtk/empathy-account-widget-skype.c @@ -423,18 +423,26 @@ account_widget_build_skype_account_properties_changed_cb (TpProxy *account, static gboolean account_widget_build_skype_password_entry_focus (GtkWidget *password_entry, GdkEventFocus *event, - gpointer user_data) + EmpathyAccountWidget *self) { - if (g_object_get_data (G_OBJECT (password_entry), "fake-password") == NULL) - return; + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + TpAccount *account = empathy_account_settings_get_account (priv->settings); - DEBUG ("Clearing fake password for editing"); + if (g_object_get_data (G_OBJECT (password_entry), "fake-password") != NULL) + { + DEBUG ("Clearing fake password for editing"); - gtk_entry_set_text (GTK_ENTRY (password_entry), ""); - g_object_set_data (G_OBJECT (password_entry), "fake-password", - GUINT_TO_POINTER (FALSE)); + gtk_entry_set_text (GTK_ENTRY (password_entry), ""); + g_object_set_data (G_OBJECT (password_entry), "fake-password", + GUINT_TO_POINTER (FALSE)); + } - /* FIXME: need to light up the apply/cancel buttons */ + if (tp_account_is_enabled (account)) + { + DEBUG ("Highlighting Apply/Cancel button"); + + empathy_account_widget_changed (self); + } return FALSE; } @@ -830,7 +838,7 @@ empathy_account_widget_build_skype (EmpathyAccountWidget *self, /* if the user changes the password, it's probably no longer a fake * password */ g_signal_connect (password_entry, "focus-in-event", - G_CALLBACK (account_widget_build_skype_password_entry_focus), NULL); + G_CALLBACK (account_widget_build_skype_password_entry_focus), self); } gboolean |