[nautilus] query-editor: avoid an additional vbox



commit e5f2d96517352d641917c9130171ee488557a21d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Aug 7 19:14:00 2012 +0200

    query-editor: avoid an additional vbox
    
    Since we're a vbox already, and this vertical box is our only child.

 src/nautilus-query-editor.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index f196c97..1570279 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -67,7 +67,6 @@ struct NautilusQueryEditorDetails {
 	gboolean change_frozen;
 	guint typing_timeout_id;
 	gboolean is_visible;
-	GtkWidget *vbox;
 
 	GtkWidget *search_current_button;
 	GtkWidget *search_all_button;
@@ -865,8 +864,7 @@ remove_row_cb (GtkButton *clicked_button, NautilusQueryEditorRow *row)
 	NautilusQueryEditor *editor;
 
 	editor = row->editor;
-	gtk_container_remove (GTK_CONTAINER (editor->details->vbox),
-			      row->toolbar);
+	gtk_container_remove (GTK_CONTAINER (editor), row->toolbar);
 	
 	editor->details->rows = g_list_remove (editor->details->rows, row);
 
@@ -923,7 +921,7 @@ nautilus_query_editor_add_row (NautilusQueryEditor *editor,
 
 	/* create the toolbar and the box container for its contents */
 	row->toolbar = gtk_toolbar_new ();
-	gtk_box_pack_start (GTK_BOX (editor->details->vbox), row->toolbar, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (editor), row->toolbar, TRUE, TRUE, 0);
 
 	item = gtk_tool_item_new ();
 	gtk_tool_item_set_expand (item, TRUE);
@@ -985,11 +983,6 @@ nautilus_query_editor_init (NautilusQueryEditor *editor)
 						       NautilusQueryEditorDetails);
 
 	gtk_orientable_set_orientation (GTK_ORIENTABLE (editor), GTK_ORIENTATION_VERTICAL);
-
-	editor->details->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
-	gtk_box_pack_start (GTK_BOX (editor), editor->details->vbox,
-			    FALSE, FALSE, 0);
-	gtk_widget_show (editor->details->vbox);
 }
 
 static void
@@ -1028,7 +1021,7 @@ setup_widgets (NautilusQueryEditor *editor)
 	toolbar = gtk_toolbar_new ();
 	gtk_style_context_add_class (gtk_widget_get_style_context (toolbar),
 				     GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
-	gtk_box_pack_start (GTK_BOX (editor->details->vbox), toolbar, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (editor), toolbar, TRUE, TRUE, 0);
 
 	item = gtk_tool_item_new ();
 	gtk_tool_item_set_expand (item, TRUE);



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