[nautilus] window-slot: cleanup packing of extra widgets



commit 319cda6e9430b4aa74e052ee41086d82fc5bb530
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Mar 15 14:29:22 2011 -0400

    window-slot: cleanup packing of extra widgets
    
    Don't pack them in a frame+eventbox, but just use the GtkBox.

 src/nautilus-window-slot.c |   19 ++++---------------
 src/nautilus-window-slot.h |    1 -
 2 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index d012406..9649cfa 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -172,26 +172,15 @@ floating_bar_action_cb (NautilusFloatingBar *floating_bar,
 static void
 nautilus_window_slot_init (NautilusWindowSlot *slot)
 {
-	GtkWidget *content_box, *eventbox, *extras_vbox, *frame;
+	GtkWidget *content_box, *extras_vbox;
 
 	content_box = gtk_vbox_new (FALSE, 0);
 	slot->content_box = content_box;
 	gtk_widget_show (content_box);
 
-	frame = gtk_frame_new (NULL);
-	gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_IN);
-	gtk_box_pack_start (GTK_BOX (content_box), frame, FALSE, FALSE, 0);
-	slot->extra_location_frame = frame;
-
-	eventbox = gtk_event_box_new ();
-	gtk_widget_set_name (eventbox, "nautilus-extra-view-widget");
-	gtk_container_add (GTK_CONTAINER (frame), eventbox);
-	gtk_widget_show (eventbox);
-
 	extras_vbox = gtk_vbox_new (FALSE, 6);
-	gtk_container_set_border_width (GTK_CONTAINER (extras_vbox), 6);
 	slot->extra_location_widgets = extras_vbox;
-	gtk_container_add (GTK_CONTAINER (eventbox), extras_vbox);
+	gtk_box_pack_start (GTK_BOX (content_box), extras_vbox, FALSE, FALSE, 0);
 	gtk_widget_show (extras_vbox);
 
 	slot->view_box = gtk_vbox_new (FALSE, 0);
@@ -641,7 +630,7 @@ nautilus_window_slot_remove_extra_location_widgets (NautilusWindowSlot *slot)
 	gtk_container_foreach (GTK_CONTAINER (slot->extra_location_widgets),
 			       remove_all,
 			       slot->extra_location_widgets);
-	gtk_widget_hide (slot->extra_location_frame);
+	gtk_widget_hide (slot->extra_location_widgets);
 }
 
 void
@@ -650,7 +639,7 @@ nautilus_window_slot_add_extra_location_widget (NautilusWindowSlot *slot,
 {
 	gtk_box_pack_start (GTK_BOX (slot->extra_location_widgets),
 			    widget, TRUE, TRUE, 0);
-	gtk_widget_show (slot->extra_location_frame);
+	gtk_widget_show (slot->extra_location_widgets);
 }
 
 /* returns either the pending or the actual current uri */
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
index 1e97324..0342c62 100644
--- a/src/nautilus-window-slot.h
+++ b/src/nautilus-window-slot.h
@@ -71,7 +71,6 @@ struct NautilusWindowSlot {
  	 *  2) the view box for the content view
  	 */
 	GtkWidget *content_box;
-	GtkWidget *extra_location_frame;
 	GtkWidget *extra_location_widgets;
 	GtkWidget *view_box;
 



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