From 55fab807184bdb0d30c43d2de6e91532cfdf8ccf Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 15 Feb 2012 16:04:49 +0100 Subject: accounts-dialog: move the 'no protocol' message to a different page It's cleaner that way https://bugzilla.gnome.org/show_bug.cgi?id=670203 --- src/empathy-accounts-dialog.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/empathy-accounts-dialog.c') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 7ad6f12ce..35cb9bdb3 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -78,7 +78,8 @@ G_DEFINE_TYPE (EmpathyAccountsDialog, empathy_accounts_dialog, GTK_TYPE_DIALOG); enum { NOTEBOOK_PAGE_ACCOUNT = 0, - NOTEBOOK_PAGE_LOADING + NOTEBOOK_PAGE_LOADING, + NOTEBOOK_PAGE_NO_PROTOCOL }; typedef struct { @@ -91,7 +92,6 @@ typedef struct { GtkWidget *image_status; GtkWidget *throbber; GtkWidget *enabled_switch; - GtkWidget *frame_no_protocol; GtkWidget *treeview; @@ -984,14 +984,15 @@ accounts_dialog_update_settings (EmpathyAccountsDialog *dialog, /* No account and no profile, warn the user */ gtk_widget_hide (priv->vbox_details); - gtk_widget_show (priv->frame_no_protocol); gtk_widget_set_sensitive (priv->button_add, FALSE); + + gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook_account), + NOTEBOOK_PAGE_NO_PROTOCOL); return; } /* We have an account selected, destroy old settings and create a new * one for the account selected */ - gtk_widget_hide (priv->frame_no_protocol); gtk_widget_show (priv->vbox_details); if (priv->dialog_content) @@ -2210,7 +2211,6 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog) gui = empathy_builder_get_file (filename, "accounts_dialog_hbox", &top_hbox, "vbox_details", &priv->vbox_details, - "frame_no_protocol", &priv->frame_no_protocol, "alignment_settings", &priv->alignment_settings, "alignment_infobar", &priv->alignment_infobar, "treeview", &priv->treeview, @@ -2224,8 +2224,6 @@ accounts_dialog_build_ui (EmpathyAccountsDialog *dialog) NULL); g_free (filename); - gtk_widget_set_no_show_all (priv->frame_no_protocol, TRUE); - empathy_builder_connect (gui, dialog, "button_add", "clicked", accounts_dialog_button_add_clicked_cb, "button_remove", "clicked", accounts_dialog_button_remove_clicked_cb, -- cgit v1.2.3