aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2010-11-15 21:51:27 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2010-11-15 21:51:27 +0800
commit4de0e218a3e225bbbfbbe3baf91036a262c0f782 (patch)
treec116a3b60f31f55ec16eb21abe39d92877320ce1
parenteb67ffa2d04e73f078f969f751c45678dc35a430 (diff)
downloadgsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar.gz
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar.bz2
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar.lz
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar.xz
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.tar.zst
gsoc2013-empathy-4de0e218a3e225bbbfbbe3baf91036a262c0f782.zip
Make <Enter> on the account name try to log in
https://bugzilla.gnome.org/show_bug.cgi?id=607146
-rw-r--r--libempathy-gtk/empathy-account-widget.c20
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);