From 55ce13e4d2aa2be7198e545939e05276697c6b53 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Thu, 26 Jul 2007 16:09:04 +0000 Subject: Hide "advanced options" for jabber in a GtkExpander. Fixes bug #459168 2007-07-26 Xavier Claessens * libempathy-gtk/empathy-account-widget-jabber.glade: * libempathy-gtk/empathy-account-widget-jabber.c: Hide "advanced options" for jabber in a GtkExpander. Fixes bug #459168 (Guillaume Desmottes). svn path=/trunk/; revision=202 --- ChangeLog | 7 + libempathy-gtk/empathy-account-widget-jabber.c | 16 +- libempathy-gtk/empathy-account-widget-jabber.glade | 612 ++++++++++++--------- 3 files changed, 359 insertions(+), 276 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25097478e..cf4b3b1b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-07-26 Xavier Claessens + + * libempathy-gtk/empathy-account-widget-jabber.glade: + * libempathy-gtk/empathy-account-widget-jabber.c: Hide + "advanced options" for jabber in a GtkExpander. Fixes bug #459168 + (Guillaume Desmottes). + 2007-07-26 Xavier Claessens * libempathy-gtk/empathy-new-chatroom-dialog.c: 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; } - diff --git a/libempathy-gtk/empathy-account-widget-jabber.glade b/libempathy-gtk/empathy-account-widget-jabber.glade index 12eec7576..8a2af8cca 100644 --- a/libempathy-gtk/empathy-account-widget-jabber.glade +++ b/libempathy-gtk/empathy-account-widget-jabber.glade @@ -20,312 +20,374 @@ False - - 6 - 3 + + True False - 6 - 12 + 6 - + True - Login I_D: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry_id - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - + 2 + 3 + False + 6 + 12 - - - True - Pass_word: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry_password - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - + + + True + Login I_D: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_id + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + - - - True - Reso_urce: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry_resource - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - + + + True + Pass_word: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_password + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + - - - True - _Server: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - entry_server - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - + + + True + Forget password and clear the entry. + True + GTK_RELIEF_NORMAL + True - - - True - _Port: - True - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - spinbutton_port - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 4 - 5 - fill - - - + + + True + gtk-clear + 1 + 0.5 + 0.5 + 0 + 0 + + + + + 2 + 3 + 1 + 2 + fill + + + - - - True - True - True - True - 0 - - True - * - False - - - 1 - 3 - 2 - 3 - - - + + + True + True + True + False + 0 + + True + * + False + + + 1 + 2 + 1 + 2 + + + - - - True - True - True - True - 0 - - True - * - False + + + True + True + True + True + 0 + + True + * + False + + + 1 + 3 + 0 + 1 + + + - 1 - 3 - 3 - 4 - + 0 + False + False - + True True - Use encryption (SS_L) - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - 3 - 5 - 6 - fill - - - + False + 0 - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 5222 0 65556 1 10 10 - - - 1 - 3 - 4 - 5 - - - + + + True + 4 + 3 + False + 6 + 12 - - - True - Forget password and clear the entry. - True - GTK_RELIEF_NORMAL - True + + + True + Reso_urce: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_resource + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 3 + 0 + 1 + + + + + + + True + True + True + True + 0 + + True + * + False + + + 1 + 3 + 1 + 2 + + + + + + + True + _Server: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + entry_server + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + 5222 0 65556 1 10 10 + + + 1 + 3 + 2 + 3 + + + + + + + True + _Port: + True + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + spinbutton_port + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + + True + True + Use encryption (SS_L) + True + GTK_RELIEF_NORMAL + True + False + False + True + + + 0 + 3 + 3 + 4 + fill + + + + + - + True - gtk-clear - 1 + <b>Advanced</b> + False + True + GTK_JUSTIFY_LEFT + False + False 0.5 0.5 0 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + label_item + - 2 - 3 - 1 - 2 - fill - - - - - - - True - True - True - False - 0 - - True - * - False - - - 1 - 2 - 1 - 2 - - - - - - - True - True - True - True - 0 - - True - * - False - - - 1 - 3 - 0 - 1 - + 0 + False + False -- cgit v1.2.3