Updating branch refs/heads/master
         to 0381fc519419d93098a928dc52692a5a78efd032 (commit)
       from 8bd24fe4440fd54644c7b833a3d836ab5e05023d (commit)

commit 0381fc519419d93098a928dc52692a5a78efd032
Author: Nick Schermer <n...@xfce.org>
Date:   Tue May 31 19:44:28 2011 +0200

    Change box spacing depending in expanded state.

 .../demo-code/c/appfinder-window.c                 |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/xfce4-appfinder/merge-with-xfrun/demo-code/c/appfinder-window.c 
b/xfce4-appfinder/merge-with-xfrun/demo-code/c/appfinder-window.c
index 9c0225f..eff77dc 100644
--- a/xfce4-appfinder/merge-with-xfrun/demo-code/c/appfinder-window.c
+++ b/xfce4-appfinder/merge-with-xfrun/demo-code/c/appfinder-window.c
@@ -27,6 +27,7 @@ struct _XfceAppfinderWindow
 
   GtkWidget *paned;
   GtkWidget *entry;
+  GtkWidget *vbox;
 };
 
 
@@ -67,12 +68,12 @@ xfce_appfinder_window_init (XfceAppfinderWindow *window)
   gtk_window_set_icon_name (GTK_WINDOW (window), GTK_STOCK_EXECUTE);
   g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK 
(gtk_main_quit), NULL);
 
-  vbox = gtk_vbox_new (FALSE, 6);
+  window->vbox = vbox = gtk_vbox_new (FALSE, 0);
   gtk_container_add (GTK_CONTAINER (window), vbox);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
   gtk_widget_show (vbox);
 
-  hbox = gtk_hbox_new (FALSE, 12);
+  hbox = gtk_hbox_new (FALSE, 6);
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0);
   gtk_widget_show (hbox);
 
@@ -216,6 +217,7 @@ xfce_appfinder_window_set_expanded (XfceAppfinderWindow 
*window,
     }
 
   gtk_widget_set_visible (window->paned, expanded);
+  gtk_box_set_spacing (GTK_BOX (window->vbox), expanded ? 6 : 0);
   gtk_entry_set_icon_from_icon_name (GTK_ENTRY (window->entry), 
GTK_ENTRY_ICON_SECONDARY,
                                      expanded ? GTK_STOCK_GO_UP : 
GTK_STOCK_GO_DOWN);
   gtk_entry_set_icon_tooltip_text (GTK_ENTRY (window->entry), 
GTK_ENTRY_ICON_SECONDARY,
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to