diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2010-09-03 15:57:04 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-09-03 15:57:04 +0800 |
commit | 76db409a25964cfb74e030c2edb426bc1aab2d6a (patch) | |
tree | 5a701f06986f949961dafae7f2c85aea2a415fb5 /libempathy-gtk/empathy-account-widget.c | |
parent | bfe50b4fa80f68bc55b0f10565257d9de9900178 (diff) | |
download | gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar.gz gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar.bz2 gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar.lz gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar.xz gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.tar.zst gsoc2013-empathy-76db409a25964cfb74e030c2edb426bc1aab2d6a.zip |
account-widget: apply settings when activating the password entry (#625575)
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 49c1ca174..cd55b2a25 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -109,6 +109,8 @@ enum { LAST_SIGNAL }; +static void account_widget_apply_and_log_in (EmpathyAccountWidget *); + static guint signals[LAST_SIGNAL] = { 0 }; #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyAccountWidget) @@ -357,6 +359,16 @@ password_entry_changed_cb (GtkEditable *entry, GTK_ENTRY_ICON_SECONDARY, !EMP_STR_EMPTY (str)); } +static void +password_entry_activated_cb (GtkEntry *entry, + EmpathyAccountWidget *self) +{ + EmpathyAccountWidgetPriv *priv = GET_PRIV (self); + + if (gtk_widget_get_sensitive (priv->apply_button)) + account_widget_apply_and_log_in (self); +} + void empathy_account_widget_setup_widget (EmpathyAccountWidget *self, GtkWidget *widget, @@ -433,6 +445,8 @@ empathy_account_widget_setup_widget (EmpathyAccountWidget *self, G_CALLBACK (clear_icon_released_cb), self); g_signal_connect (widget, "changed", G_CALLBACK (password_entry_changed_cb), self); + g_signal_connect (widget, "activate", + G_CALLBACK (password_entry_activated_cb), self); } g_signal_connect (widget, "changed", @@ -802,8 +816,7 @@ account_widget_applied_cb (GObject *source_object, } static void -account_widget_apply_clicked_cb (GtkWidget *button, - EmpathyAccountWidget *self) +account_widget_apply_and_log_in (EmpathyAccountWidget *self) { EmpathyAccountWidgetPriv *priv = GET_PRIV (self); gboolean display_name_overridden; @@ -841,6 +854,13 @@ account_widget_apply_clicked_cb (GtkWidget *button, } static void +account_widget_apply_clicked_cb (GtkWidget *button, + EmpathyAccountWidget *self) +{ + account_widget_apply_and_log_in (self); +} + +static void account_widget_setup_generic (EmpathyAccountWidget *self) { GtkWidget *table_common_settings; |