]> Pileus Git - ~andy/gtk/commitdiff
Put toolbars in handleboxes.
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Aug 2003 23:23:44 +0000 (23:23 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Aug 2003 23:23:44 +0000 (23:23 +0000)
* tests/testmerge.c (add_widget): Put toolbars in handleboxes.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
tests/testmerge.c

index ecf27dacd65aa2e50669a380508a13f33030311b..c828fb2f316faba6ae1e3d67c1485b601985c21c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2003-08-30  Matthias Clasen  <maclas@gmx.de>
 
+       * tests/testmerge.c (add_widget): Put toolbars in handleboxes.
+
        * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with 
        setter and getter. If it is set, add tearoff menu items to regular 
        menus, but not to popups.
index ecf27dacd65aa2e50669a380508a13f33030311b..c828fb2f316faba6ae1e3d67c1485b601985c21c 100644 (file)
@@ -1,5 +1,7 @@
 2003-08-30  Matthias Clasen  <maclas@gmx.de>
 
+       * tests/testmerge.c (add_widget): Put toolbars in handleboxes.
+
        * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with 
        setter and getter. If it is set, add tearoff menu items to regular 
        menus, but not to popups.
index ecf27dacd65aa2e50669a380508a13f33030311b..c828fb2f316faba6ae1e3d67c1485b601985c21c 100644 (file)
@@ -1,5 +1,7 @@
 2003-08-30  Matthias Clasen  <maclas@gmx.de>
 
+       * tests/testmerge.c (add_widget): Put toolbars in handleboxes.
+
        * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with 
        setter and getter. If it is set, add tearoff menu items to regular 
        menus, but not to popups.
index ecf27dacd65aa2e50669a380508a13f33030311b..c828fb2f316faba6ae1e3d67c1485b601985c21c 100644 (file)
@@ -1,5 +1,7 @@
 2003-08-30  Matthias Clasen  <maclas@gmx.de>
 
+       * tests/testmerge.c (add_widget): Put toolbars in handleboxes.
+
        * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with 
        setter and getter. If it is set, add tearoff menu items to regular 
        menus, but not to popups.
index ecf27dacd65aa2e50669a380508a13f33030311b..c828fb2f316faba6ae1e3d67c1485b601985c21c 100644 (file)
@@ -1,5 +1,7 @@
 2003-08-30  Matthias Clasen  <maclas@gmx.de>
 
+       * tests/testmerge.c (add_widget): Put toolbars in handleboxes.
+
        * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with 
        setter and getter. If it is set, add tearoff menu items to regular 
        menus, but not to popups.
index 4359778dcba1be72313388359d45baf9374b61ce..0aff7a69e1ee9ecc03028fec944392444e230506 100644 (file)
@@ -103,7 +103,19 @@ add_widget (GtkUIManager *merge,
            GtkWidget    *widget, 
            GtkBox       *box)
 {
-  gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
+  GtkWidget *handle_box;
+
+  if (GTK_IS_TOOLBAR (widget))
+    {
+      handle_box = gtk_handle_box_new ();
+      gtk_widget_show (handle_box);
+      gtk_container_add (GTK_CONTAINER (handle_box), widget);
+      gtk_box_pack_start (box, handle_box, FALSE, FALSE, 0);
+      g_signal_connect (handle_box, "remove", gtk_widget_destroy, 0);
+    }
+  else
+    gtk_box_pack_start (box, widget, FALSE, FALSE, 0);
+    
   gtk_widget_show (widget);
 }