[gtk+] demo/toolpalette: Restore ToolItemGroup child prop



commit 9e6b59c5f4620652f344c6c2c19186bcb727c2ba
Author: Daniel Boles <dboles src gnome org>
Date:   Sat May 13 18:04:19 2017 +0100

    demo/toolpalette: Restore ToolItemGroup child prop
    
    …erties clobbered by commit c92b7d4224b9cef1d08373fcc28f7fbd96c64e6d.
    That and its counterpart were for removing :expand and :fill child props
    from GtkBox, but they ended up catching these for GtkToolItemGroup too.
    
    While GtkToolItemGroup still has these, we may as well keep demoing them

 demos/gtk-demo/toolpalette.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/demos/gtk-demo/toolpalette.c b/demos/gtk-demo/toolpalette.c
index ad107f5..f696528 100644
--- a/demos/gtk-demo/toolpalette.c
+++ b/demos/gtk-demo/toolpalette.c
@@ -124,11 +124,13 @@ palette_drop_item (GtkToolItem      *drag_item,
 
   if (GTK_TOOL_ITEM_GROUP (drag_group) != drop_group)
     {
-      gboolean homogeneous, new_row;
+      gboolean homogeneous, expand, fill, new_row;
 
       g_object_ref (drag_item);
       gtk_container_child_get (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item),
                                "homogeneous", &homogeneous,
+                               "expand", &expand,
+                               "fill", &fill,
                                "new-row", &new_row,
                                NULL);
       gtk_container_remove (GTK_CONTAINER (drag_group), GTK_WIDGET (drag_item));
@@ -136,6 +138,8 @@ palette_drop_item (GtkToolItem      *drag_item,
                                   drag_item, drop_position);
       gtk_container_child_set (GTK_CONTAINER (drop_group), GTK_WIDGET (drag_item),
                                "homogeneous", homogeneous,
+                               "expand", expand,
+                               "fill", fill,
                                "new-row", new_row,
                                NULL);
       g_object_unref (drag_item);
@@ -747,19 +751,19 @@ load_special_items (GtkToolPalette *palette)
   item = create_entry_item ("homogeneous=FALSE, expand=TRUE");
   gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
   gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
-                           "homogeneous", FALSE,
+                           "homogeneous", FALSE, "expand", TRUE,
                            NULL);
 
   item = create_entry_item ("homogeneous=FALSE, expand=TRUE, fill=FALSE");
   gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
   gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
-                           "homogeneous", FALSE,
-                           NULL);
+                           "homogeneous", FALSE, "expand", TRUE,
+                           "fill", FALSE, NULL);
 
   item = create_entry_item ("homogeneous=FALSE, expand=TRUE, new-row=TRUE");
   gtk_tool_item_group_insert (GTK_TOOL_ITEM_GROUP (group), item, -1);
   gtk_container_child_set (GTK_CONTAINER (group), GTK_WIDGET (item),
-                           "homogeneous", FALSE,
+                           "homogeneous", FALSE, "expand", TRUE,
                            "new-row", TRUE, NULL);
 
   item = gtk_tool_button_new (NULL, NULL);


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