[gnome-control-center/single-window-shell] [shell] hide the All Settings button when showing all settings
- From: Thomas Wood <thos src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center/single-window-shell] [shell] hide the All Settings button when showing all settings
- Date: Thu, 14 Jan 2010 15:35:41 +0000 (UTC)
commit be122f82544f4fae60b3c3ee59382e4c04cdf361
Author: Thomas Wood <thomas wood intel com>
Date: Thu Jan 14 11:10:04 2010 +0000
[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 4c30577..8c799c6 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 213b177..41f1704 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]