[rhythmbox/gobject-introspection] shell: don't pack toolbar into an hbox for no reason



commit bcc47ec920f7364a980a12edc5ca778ec3e52035
Author: William Jon McCann <jmccann redhat com>
Date:   Tue Jan 25 18:21:04 2011 -0500

    shell: don't pack toolbar into an hbox for no reason
    
    This allows us to detect it as a toplevel toolbar and style
    it differently.

 shell/rb-shell.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/shell/rb-shell.c b/shell/rb-shell.c
index 9a0ceeb..cd6941e 100644
--- a/shell/rb-shell.c
+++ b/shell/rb-shell.c
@@ -1476,7 +1476,6 @@ construct_load_ui (RBShell *shell)
 {
 	GtkWidget *menubar;
 	GtkWidget *toolbar;
-	GtkWidget *hbox;
 	GtkToolItem *tool_item;
 	GError *error = NULL;
 
@@ -1496,12 +1495,10 @@ construct_load_ui (RBShell *shell)
 	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), menubar, FALSE, FALSE, 0);
 	gtk_box_reorder_child (GTK_BOX (shell->priv->main_vbox), menubar, 0);
 
-	hbox = gtk_hbox_new (FALSE, 0);
-	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), hbox, FALSE, FALSE, 0);
-	gtk_box_reorder_child (GTK_BOX (shell->priv->main_vbox), hbox, 1);
-
 	toolbar = gtk_ui_manager_get_widget (shell->priv->ui_manager, "/ToolBar");
-	gtk_box_pack_start (GTK_BOX (hbox), toolbar, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (shell->priv->main_vbox), toolbar, FALSE, FALSE, 0);
+	gtk_box_reorder_child (GTK_BOX (shell->priv->main_vbox), toolbar, 1);
+	gtk_widget_show (toolbar);
 
 	shell->priv->volume_button = gtk_volume_button_new ();
 	g_signal_connect (shell->priv->volume_button, "value-changed",
@@ -1522,8 +1519,6 @@ construct_load_ui (RBShell *shell)
 	gtk_widget_show_all (GTK_WIDGET (tool_item));
 	gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1);
 
-	gtk_widget_show (hbox);
-
 	gtk_widget_set_tooltip_text (shell->priv->volume_button,
 				     _("Change the music volume"));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]