Commit 62c1d36a authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent 3784db9b
2005-12-06 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkcalendar.c: Avoid conflict with win32 headers in
the libdate routines. (#323045, Kazuki Iwamoto) the libdate routines. (#323045, Kazuki Iwamoto)
......
2005-12-06 Matthias Clasen <mclasen@redhat.com> 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 * gtk/gtkcalendar.c: Avoid conflict with win32 headers in
the libdate routines. (#323045, Kazuki Iwamoto) the libdate routines. (#323045, Kazuki Iwamoto)
......
...@@ -1026,7 +1026,6 @@ gtk_menu_attach_to_widget (GtkMenu *menu, ...@@ -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_MENU (menu));
g_return_if_fail (GTK_IS_WIDGET (attach_widget)); 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() /* keep this function in sync with gtk_widget_set_parent()
*/ */
...@@ -1103,7 +1102,8 @@ gtk_menu_detach (GtkMenu *menu) ...@@ -1103,7 +1102,8 @@ gtk_menu_detach (GtkMenu *menu)
(gpointer) attach_widget_screen_changed, (gpointer) attach_widget_screen_changed,
menu); 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_object_steal_data (G_OBJECT (data->attach_widget), ATTACHED_MENUS);
list = g_list_remove (list, menu); list = g_list_remove (list, menu);
if (list) if (list)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment