[devhelp/wip/swilmet/various-code-improvements: 10/17] sidebar: remove now useless hbox container



commit e061f0ca20a89428bb96f74220a0c3653396ef18
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Oct 9 18:35:03 2015 +0200

    sidebar: remove now useless hbox container
    
    The hbox was needed to pack additional buttons on the right of the
    search entry (IIRC). But those buttons no longer exist.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756341

 src/dh-sidebar.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index d63cd2c..7fe357d 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -491,19 +491,18 @@ static void
 dh_sidebar_init (DhSidebar *sidebar)
 {
         DhSidebarPrivate *priv;
-        GtkWidget        *hbox;
         GtkCellRenderer  *cell;
 
         priv = dh_sidebar_get_instance_private (sidebar);
 
-        /* Setup the top-level box with search entry */
-        hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-        gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
-        gtk_box_pack_start (GTK_BOX (sidebar), hbox, FALSE, FALSE, 0);
-
         /* Setup the search entry */
         priv->entry = GTK_ENTRY (gtk_search_entry_new ());
-        gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (priv->entry), TRUE, TRUE, 0);
+        gtk_widget_set_hexpand (GTK_WIDGET (priv->entry), TRUE);
+        g_object_set (priv->entry,
+                      "margin", 6,
+                      NULL);
+        gtk_box_pack_start (GTK_BOX (sidebar), GTK_WIDGET (priv->entry), FALSE, FALSE, 0);
+
         g_signal_connect (priv->entry, "key-press-event",
                           G_CALLBACK (sidebar_entry_key_press_event_cb),
                           sidebar);


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