aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget.c
diff options
context:
space:
mode:
authorDimitris Zenios <dimitris.zenios@gmail.com>2009-05-30 00:09:48 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-05-30 16:12:46 +0800
commitdd61ed770308dce8fbf951e7a7b9a2c62b251f6a (patch)
tree6acca61c79643c00c2083679c2796aa639c4b41c /libempathy-gtk/empathy-account-widget.c
parentcf54c58bf9331e0e22c6f6dc42b78ce2b1d29616 (diff)
downloadgsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar.gz
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar.bz2
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar.lz
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar.xz
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.tar.zst
gsoc2013-empathy-dd61ed770308dce8fbf951e7a7b9a2c62b251f6a.zip
fixed bug #548716
Diffstat (limited to 'libempathy-gtk/empathy-account-widget.c')
-rw-r--r--libempathy-gtk/empathy-account-widget.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index b1099fc58..669869a4d 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -313,6 +313,11 @@ accounts_widget_generic_setup (McAccount *account,
gtk_widget_show (widget);
widget = gtk_entry_new ();
+ if (strcmp (param->name, "account") == 0) {
+ g_signal_connect (widget, "realize",
+ G_CALLBACK (gtk_widget_grab_focus),
+ NULL);
+ }
gtk_table_attach (GTK_TABLE (table_settings),
widget,
1, 2,
@@ -459,6 +464,18 @@ empathy_account_widget_add_forget_button (McAccount *account,
button_forget);
}
+void
+empathy_account_widget_set_default_focus (GtkBuilder *gui,
+ const gchar *entry)
+{
+ GObject *default_focus_entry;
+
+ default_focus_entry = gtk_builder_get_object (gui, entry);
+ g_signal_connect (default_focus_entry, "realize",
+ G_CALLBACK (gtk_widget_grab_focus),
+ NULL);
+}
+
GtkWidget *
empathy_account_widget_generic_new (McAccount *account)
{
@@ -507,6 +524,8 @@ empathy_account_widget_salut_new (McAccount *account)
"entry_jid", "jid",
NULL);
+ empathy_account_widget_set_default_focus (gui, "entry_nickname");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}
@@ -535,6 +554,8 @@ empathy_account_widget_msn_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_id");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}
@@ -572,6 +593,8 @@ empathy_account_widget_jabber_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_id");
+
g_signal_connect (checkbutton_ssl, "toggled",
G_CALLBACK (account_widget_jabber_ssl_toggled_cb),
spinbutton_port);
@@ -607,6 +630,8 @@ empathy_account_widget_icq_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_uin");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}
@@ -637,6 +662,8 @@ empathy_account_widget_aim_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_screenname");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}
@@ -669,6 +696,8 @@ empathy_account_widget_yahoo_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_id");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}
@@ -697,6 +726,8 @@ empathy_account_widget_groupwise_new (McAccount *account)
"button_forget",
"entry_password");
+ empathy_account_widget_set_default_focus (gui, "entry_id");
+
return empathy_builder_unref_and_keep_widget (gui, widget);
}