summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2010-01-14 11:10:04 +0000
committerThomas Wood <thomas.wood@intel.com>2010-01-14 11:10:04 +0000
commitbe122f82544f4fae60b3c3ee59382e4c04cdf361 (patch)
tree56f2e8a6c9c6546f756e623ee4532d75c9dddb1e
parentc0cbb585d7f8cd78ee335724ad17180b313637c9 (diff)
downloadgnome-control-center-be122f82544f4fae60b3c3ee59382e4c04cdf361.tar.gz
[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.
-rw-r--r--shell/control-center.c10
-rw-r--r--shell/shell.ui2
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 @@
<property name="border_width">3</property>
<child>
<object class="GtkButton" id="home-button">
- <property name="visible">True</property>
<property name="label">_All Settings</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="no_show_all">True</property>
<property name="use_underline">True</property>
</object>
<packing>