From 39d54f9d9162cdb107604d0cf41694bd871aaa1e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sun, 2 Feb 2003 03:01:32 +0000 Subject: Just use gtk_widget_destroy as the G_CALLBACK function. 2003-02-01 Jeffrey Stedfast * gal/widgets/e-gui-utils.c (e_auto_kill_popup_menu_on_hide): Just use gtk_widget_destroy as the G_CALLBACK function. svn path=/trunk/; revision=19703 --- widgets/misc/e-gui-utils.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/widgets/misc/e-gui-utils.c b/widgets/misc/e-gui-utils.c index ec004c572b..9b4e3f3db2 100644 --- a/widgets/misc/e-gui-utils.c +++ b/widgets/misc/e-gui-utils.c @@ -21,7 +21,10 @@ * 02111-1307, USA. */ + +#ifdef HAVE_CONFIG_H #include +#endif #include "e-gui-utils.h" @@ -54,29 +57,17 @@ e_notice (GtkWindow *parent, GtkMessageType type, const char *format, ...) gtk_widget_destroy (dialog); } -static void -kill_popup_menu (GtkWidget *widget, GtkMenu *menu) -{ - g_return_if_fail (menu != NULL); - g_return_if_fail (GTK_IS_MENU (menu)); - - gtk_widget_destroy (menu); -} - void e_auto_kill_popup_menu_on_hide (GtkMenu *menu) { - g_return_if_fail (menu != NULL); g_return_if_fail (GTK_IS_MENU (menu)); - - g_signal_connect (menu, "hide", - G_CALLBACK (kill_popup_menu), menu); + + g_signal_connect (menu, "hide", G_CALLBACK (gtk_widget_destroy), menu); } void e_popup_menu (GtkMenu *menu, GdkEvent *event) { - g_return_if_fail (menu != NULL); g_return_if_fail (GTK_IS_MENU (menu)); e_auto_kill_popup_menu_on_hide (menu); -- cgit