aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-widget-jabber.c
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk/empathy-account-widget-jabber.c')
-rw-r--r--libempathy-gtk/empathy-account-widget-jabber.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-account-widget-jabber.c b/libempathy-gtk/empathy-account-widget-jabber.c
index 2e5a4871b..a4db08fdf 100644
--- a/libempathy-gtk/empathy-account-widget-jabber.c
+++ b/libempathy-gtk/empathy-account-widget-jabber.c
@@ -100,6 +100,18 @@ account_widget_jabber_entry_focus_cb (GtkWidget *widget,
g_free (value);
} else {
mc_account_set_param_string (settings->account, param, str);
+
+ if (widget == settings->entry_id) {
+ /* Try to guess the server */
+ gchar *server;
+
+ server = strstr (str, "@");
+ if (server != NULL) {
+ /* skip the leading @ */
+ server++;
+ gtk_entry_set_text (GTK_ENTRY (settings->entry_server), server);
+ }
+ }
}
return FALSE;
@@ -274,8 +286,10 @@ empathy_account_widget_jabber_new (McAccount *account)
g_object_unref (size_group);
+ gtk_editable_select_region (GTK_EDITABLE (settings->entry_id), 0, -1);
+ gtk_widget_grab_focus (settings->entry_id);
+
gtk_widget_show (settings->vbox_settings);
return settings->vbox_settings;
}
-