diff options
author | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2010-11-15 23:01:01 +0800 |
---|---|---|
committer | Emilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk> | 2010-11-15 23:01:01 +0800 |
commit | 33d6d9dfbdeac6050a63912a9944b54e5c50d95f (patch) | |
tree | 8c1738e26e6101b5bc57890fe2ac4e2b909376ee /libempathy-gtk | |
parent | 24ffd0a12ef01048052c420b73d9b374515cb2f8 (diff) | |
parent | 4de0e218a3e225bbbfbbe3baf91036a262c0f782 (diff) | |
download | gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar.gz gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar.bz2 gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar.lz gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar.xz gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.tar.zst gsoc2013-empathy-33d6d9dfbdeac6050a63912a9944b54e5c50d95f.zip |
Merge branch 'bug-607146'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 8a3981486..a6237cfd3 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -180,6 +180,12 @@ account_widget_set_control_buttons_sensitivity (EmpathyAccountWidget *self, gtk_widget_set_sensitive (priv->apply_button, sensitive); gtk_widget_set_sensitive (priv->cancel_button, (sensitive || priv->creating_account) && priv->other_accounts_exist); + + if (sensitive) + { + gtk_widget_set_can_default (priv->apply_button, TRUE); + gtk_widget_grab_default (priv->apply_button); + } } } @@ -470,6 +476,16 @@ password_entry_activated_cb (GtkEntry *entry, account_widget_apply_and_log_in (self); } +static void +account_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, @@ -549,6 +565,10 @@ empathy_account_widget_setup_widget (EmpathyAccountWidget *self, g_signal_connect (widget, "activate", G_CALLBACK (password_entry_activated_cb), self); } + else if (strstr (param_name, "account")) + g_signal_connect (widget, "activate", + G_CALLBACK (account_entry_activated_cb), self); + g_signal_connect (widget, "changed", G_CALLBACK (account_widget_entry_changed_cb), self); |