aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c2
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c2
-rw-r--r--libempathy-gtk/empathy-account-widget.c31
-rw-r--r--libempathy-gtk/empathy-account-widget.h2
4 files changed, 37 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index 66f04bd67..1306f517f 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -499,5 +499,7 @@ empathy_account_widget_irc_new (McAccount *account)
"combobox_network", "changed", account_widget_irc_combobox_network_changed_cb,
NULL);
+ empathy_account_widget_set_default_focus (gui, "entry_nick");
+
return empathy_builder_unref_and_keep_widget (gui, settings->vbox_settings);
}
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index f6eb99814..da6082495 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -115,5 +115,7 @@ empathy_account_widget_sip_new (McAccount *account)
"checkbutton_discover-stun", "toggled", account_widget_sip_discover_stun_toggled_cb,
NULL);
+ empathy_account_widget_set_default_focus (gui, "entry_userid");
+
return empathy_builder_unref_and_keep_widget (gui, settings->vbox_settings);
}
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);
}
diff --git a/libempathy-gtk/empathy-account-widget.h b/libempathy-gtk/empathy-account-widget.h
index d688f991c..7287f5675 100644
--- a/libempathy-gtk/empathy-account-widget.h
+++ b/libempathy-gtk/empathy-account-widget.h
@@ -39,6 +39,8 @@ void empathy_account_widget_add_forget_button (McAccount *account,
GtkBuilder *gui,
const gchar *button,
const gchar *entry);
+void empathy_account_widget_set_default_focus (GtkBuilder *gui,
+ const gchar *entry);
GtkWidget *empathy_account_widget_generic_new (McAccount *account);
GtkWidget *empathy_account_widget_salut_new (McAccount *account);
GtkWidget *empathy_account_widget_msn_new (McAccount *account);