summaryrefslogtreecommitdiff
path: root/gtk/gtkoptionmenu.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-05-14 22:44:51 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-05-14 22:44:51 +0000
commitb61156d4b76d2be3dd91678f31f3237f5b1f35c1 (patch)
tree1e024cf44ce82ae4005eccb39c442d504b20164a /gtk/gtkoptionmenu.c
parent390ad328373bca924d1b9fe77e4cd31dfc7afd8a (diff)
downloadgtk+-b61156d4b76d2be3dd91678f31f3237f5b1f35c1.tar.gz
Remove the result file on error. (#79929, David Highley)
Tue May 14 18:41:58 2002 Owen Taylor <otaylor@redhat.com> * gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove the result file on error. (#79929, David Highley) * gtk/gtkoptionmenu.c (gtk_option_menu_remove_menu): If the menu is currently active, cancel it before setting the new menu. (#79162, Jonathan Blandford.)
Diffstat (limited to 'gtk/gtkoptionmenu.c')
-rw-r--r--gtk/gtkoptionmenu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c
index 2f45a59507..443a3f4a63 100644
--- a/gtk/gtkoptionmenu.c
+++ b/gtk/gtkoptionmenu.c
@@ -295,7 +295,12 @@ gtk_option_menu_remove_menu (GtkOptionMenu *option_menu)
g_return_if_fail (GTK_IS_OPTION_MENU (option_menu));
if (option_menu->menu)
- gtk_menu_detach (GTK_MENU (option_menu->menu));
+ {
+ if (GTK_MENU_SHELL (option_menu->menu)->active)
+ g_signal_emit_by_name (option_menu->menu, "cancel", 0);
+
+ gtk_menu_detach (GTK_MENU (option_menu->menu));
+ }
}
void