diff options
author | Tim Janik <timj@gimp.org> | 1998-02-03 15:14:35 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-02-03 15:14:35 +0000 |
commit | 584231106242a6dd92f7744c0d9f5617574078c0 (patch) | |
tree | 8e642b1b83de4e6afb55db352127ad436c939696 /gtk/gtkoptionmenu.c | |
parent | b45cd0430c79f9426036ced2809427e0920dd855 (diff) | |
download | gdk-pixbuf-584231106242a6dd92f7744c0d9f5617574078c0.tar.gz |
don't add the same menu to different menuitems/ optionmenus.
Tue Feb 3 15:09:55 1998 Tim Janik <timj@gimp.org>
* gtk/testgtk.c: don't add the same menu to different menuitems/
optionmenus.
* gtk/gtkmenuitem.h:
* gtk/gtkmenuitem.c: new function gtk_menu_item_remove_submenu ro
be consistent with optionmenu. use gtk_menu_attach_to_widget/
gtk_menu_detach for setting/removing the submenu.
invoke gtk_widget_destroy(submenu) in destructor to be consistent
with other destructors.
* gtk/gtkoptionmenu.h:
* gtk/gtkoptionmenu.c: attach/detach to menu widget via
gtk_menu_attach_to_widget/gtk_menu_detach.
invoke gtk_widget_destroy(menu) in destructor to be consistent
with other destructors.
Diffstat (limited to 'gtk/gtkoptionmenu.c')
-rw-r--r-- | gtk/gtkoptionmenu.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index e9bb63ab2..93d3236e2 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -230,7 +230,7 @@ gtk_option_menu_destroy (GtkObject *object) option_menu = GTK_OPTION_MENU (object); if (option_menu->menu) - gtk_menu_detach (GTK_MENU (option_menu->menu)); + gtk_widget_destroy (option_menu->menu); if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); @@ -487,7 +487,6 @@ gtk_option_menu_remove_contents (GtkOptionMenu *option_menu) if (GTK_WIDGET (option_menu->menu_item)->state != GTK_BUTTON (option_menu)->child->state) gtk_widget_set_state (GTK_BUTTON (option_menu)->child, GTK_WIDGET (option_menu->menu_item)->state); - /* GTK_WIDGET_UNSET_FLAGS (GTK_BUTTON (option_menu)->child, GTK_MAPPED | GTK_REALIZED); */ gtk_widget_unrealize (GTK_BUTTON (option_menu)->child); gtk_widget_reparent (GTK_BUTTON (option_menu)->child, option_menu->menu_item); gtk_widget_unref (option_menu->menu_item); |