From: Guillaume Desmottes Date: Wed, 15 Feb 2012 15:04:49 +0000 (+0100) Subject: accounts-dialog: move the 'no protocol' message to a different page X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=55fab807184bdb0d30c43d2de6e91532cfdf8ccf 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 --- diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 7ad6f12c..35cb9bdb 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, diff --git a/src/empathy-accounts-dialog.ui b/src/empathy-accounts-dialog.ui index 8e5b3f7a..789ccba0 100644 --- a/src/empathy-accounts-dialog.ui +++ b/src/empathy-accounts-dialog.ui @@ -148,43 +148,6 @@ 1 - - - 0 - none - - - True - 6 - 12 - - - True - To add a new account, you first have to install a backend for each protocol you want to use. - True - - - - - - - True - No protocol installed - - - - - - - - False - False - 2 - - - - - @@ -229,6 +192,49 @@ 1 + + + True + 18 + + + 0 + none + + + True + 6 + 12 + + + True + To add a new account, you first have to install a backend for each protocol you want to use. + True + + + + + + + True + No protocol installed + + + + + + + + False + False + 2 + + + + + + + 1