Accept NULL as a detach func. (#323386, Jorn Baayen)

2005-12-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Accept NULL
	as a detach func.  (#323386, Jorn Baayen)
This commit is contained in:
Matthias Clasen 2005-12-06 17:33:46 +00:00 committed by Matthias Clasen
parent 3784db9b52
commit 62c1d36a67
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2005-12-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Accept NULL
as a detach func. (#323386, Jorn Baayen)
* gtk/gtkcalendar.c: Avoid conflict with win32 headers in
the libdate routines. (#323045, Kazuki Iwamoto)

View File

@ -1,5 +1,8 @@
2005-12-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Accept NULL
as a detach func. (#323386, Jorn Baayen)
* gtk/gtkcalendar.c: Avoid conflict with win32 headers in
the libdate routines. (#323045, Kazuki Iwamoto)

View File

@ -1026,7 +1026,6 @@ gtk_menu_attach_to_widget (GtkMenu *menu,
g_return_if_fail (GTK_IS_MENU (menu));
g_return_if_fail (GTK_IS_WIDGET (attach_widget));
g_return_if_fail (detacher != NULL);
/* keep this function in sync with gtk_widget_set_parent()
*/
@ -1103,7 +1102,8 @@ gtk_menu_detach (GtkMenu *menu)
(gpointer) attach_widget_screen_changed,
menu);
data->detacher (data->attach_widget, menu);
if (data->detacher)
data->detacher (data->attach_widget, menu);
list = g_object_steal_data (G_OBJECT (data->attach_widget), ATTACHED_MENUS);
list = g_list_remove (list, menu);
if (list)