From be122f82544f4fae60b3c3ee59382e4c04cdf361 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Thu, 14 Jan 2010 11:10:04 +0000 Subject: [shell] hide the All Settings button when showing all settings The All Settings button is unnecessary when the user is already in the view that displays the available capplets. --- shell/control-center.c | 10 +++++++--- shell/shell.ui | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/shell/control-center.c b/shell/control-center.c index 4c30577cc..8c799c60c 100644 --- a/shell/control-center.c +++ b/shell/control-center.c @@ -179,9 +179,11 @@ fill_model (GtkBuilder *b) } static gboolean -switch_after_delay (GtkNotebook *notebook) +switch_after_delay (GtkBuilder *builder) { - gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 1); + gtk_notebook_set_current_page (GTK_NOTEBOOK (W (builder, "notebook")), 1); + + gtk_widget_show (W (builder, "home-button")); return FALSE; } @@ -197,7 +199,7 @@ plug_added_cb (GtkSocket *socket, /* FIXME: this shouldn't be necassary if the capplet doesn't add to the socket * until it is fully ready */ - g_timeout_add (100, (GSourceFunc) switch_after_delay, notebook); + g_timeout_add (100, (GSourceFunc) switch_after_delay, builder); /* make sure no items are selected when the user switches back to the icon * views */ @@ -256,6 +258,8 @@ home_button_clicked_cb (GtkButton *button, GtkBuilder *builder) gtk_notebook_set_current_page (GTK_NOTEBOOK (W (builder, "notebook")), 0); gtk_window_set_title (GTK_WINDOW (W (builder, "main-window")), "System Settings"); + + gtk_widget_hide (GTK_WIDGET (button)); } int diff --git a/shell/shell.ui b/shell/shell.ui index 213b177f8..41f17044e 100644 --- a/shell/shell.ui +++ b/shell/shell.ui @@ -23,10 +23,10 @@ 3 - True _All Settings True True + True True -- cgit v1.2.1