Put toolbars in handleboxes.

* tests/testmerge.c (add_widget): Put toolbars in handleboxes.
This commit is contained in:
Matthias Clasen 2003-08-29 23:23:44 +00:00
parent d536cdde02
commit e430c2439a
6 changed files with 23 additions and 1 deletions

View File

@ -1,5 +1,7 @@
2003-08-30 Matthias Clasen <maclas@gmx.de> 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 * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
setter and getter. If it is set, add tearoff menu items to regular setter and getter. If it is set, add tearoff menu items to regular
menus, but not to popups. menus, but not to popups.

View File

@ -1,5 +1,7 @@
2003-08-30 Matthias Clasen <maclas@gmx.de> 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 * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
setter and getter. If it is set, add tearoff menu items to regular setter and getter. If it is set, add tearoff menu items to regular
menus, but not to popups. menus, but not to popups.

View File

@ -1,5 +1,7 @@
2003-08-30 Matthias Clasen <maclas@gmx.de> 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 * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
setter and getter. If it is set, add tearoff menu items to regular setter and getter. If it is set, add tearoff menu items to regular
menus, but not to popups. menus, but not to popups.

View File

@ -1,5 +1,7 @@
2003-08-30 Matthias Clasen <maclas@gmx.de> 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 * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
setter and getter. If it is set, add tearoff menu items to regular setter and getter. If it is set, add tearoff menu items to regular
menus, but not to popups. menus, but not to popups.

View File

@ -1,5 +1,7 @@
2003-08-30 Matthias Clasen <maclas@gmx.de> 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 * gtk/gtkuimanager.[hc]: Add a boolean property, "add_tearoffs" with
setter and getter. If it is set, add tearoff menu items to regular setter and getter. If it is set, add tearoff menu items to regular
menus, but not to popups. menus, but not to popups.

View File

@ -103,7 +103,19 @@ add_widget (GtkUIManager *merge,
GtkWidget *widget, GtkWidget *widget,
GtkBox *box) 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); gtk_widget_show (widget);
} }