[gnome-control-center] shell: remove unused title label and ensure padding around each panel
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] shell: remove unused title label and ensure padding around each panel
- Date: Tue, 25 May 2010 14:19:56 +0000 (UTC)
commit 4fcc633a36680573fb20f1a2db3bdb903e0c462d
Author: Thomas Wood <thomas wood intel com>
Date: Tue May 25 14:22:25 2010 +0100
shell: remove unused title label and ensure padding around each panel
Make sure there is always 6 pixels padding around the embedded settings
panel.
Remove the unused title label and alignment.
shell/gnome-control-center.c | 23 ++++++++++-------------
shell/shell.ui | 25 ++-----------------------
2 files changed, 12 insertions(+), 36 deletions(-)
---
diff --git a/shell/gnome-control-center.c b/shell/gnome-control-center.c
index a5a1dab..0542179 100644
--- a/shell/gnome-control-center.c
+++ b/shell/gnome-control-center.c
@@ -107,14 +107,20 @@ activate_panel (GnomeControlCenter *shell,
if (panel_type != G_TYPE_INVALID)
{
GtkWidget *panel;
+ GtkWidget *box;
gint i;
/* create the panel plugin */
panel = g_object_new (panel_type, "shell", shell, NULL);
+ box = gtk_alignment_new (0, 0, 1, 1);
+ gtk_alignment_set_padding (GTK_ALIGNMENT (box), 6, 6, 6, 6);
+
+ gtk_container_add (GTK_CONTAINER (box), panel);
+
/* switch to the new panel */
- i = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), panel, NULL);
- gtk_widget_show_all (panel);
+ i = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), box, NULL);
+ gtk_widget_show_all (box);
gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), i);
return;
@@ -166,10 +172,6 @@ shell_show_overview_page (GnomeControlCenterPrivate *priv)
gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), CAPPLET_PAGE);
- gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->builder,
- "label-title")), "");
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder,
- "title-alignment")));
/* clear the search text */
g_free (priv->filter_string);
@@ -271,13 +273,8 @@ search_entry_changed_cb (GtkEntry *entry,
else
{
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (priv->search_filter));
- gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), SEARCH_PAGE);
-
- gtk_label_set_text (GTK_LABEL (gtk_builder_get_object (priv->builder,
- "label-title")),
- "");
- gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (priv->builder,
- "title-alignment")));
+ gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook),
+ SEARCH_PAGE);
}
}
diff --git a/shell/shell.ui b/shell/shell.ui
index 3bbb891..f12c672 100644
--- a/shell/shell.ui
+++ b/shell/shell.ui
@@ -71,27 +71,6 @@
</packing>
</child>
<child>
- <object class="GtkAlignment" id="title-alignment">
- <property name="no_show_all">True</property>
- <property name="top_padding">12</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkLabel" id="label-title">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -143,7 +122,7 @@
</child>
</object>
<packing>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</object>
@@ -162,8 +141,8 @@
<object class="GtkSizeGroup" id="sizegroup">
<property name="mode">vertical</property>
<widgets>
- <widget name="home-button"/>
<widget name="entry-alignment"/>
+ <widget name="home-button"/>
</widgets>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]