Steal ATTACHED_MENUS list so its tail isn't freed when we re-set it,

2004-08-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Steal ATTACHED_MENUS
	list so its tail isn't freed when we re-set it, noticed
	by Hans Petter Jansson.
This commit is contained in:
Matthias Clasen 2004-08-25 20:06:29 +00:00 committed by Matthias Clasen
parent c1ce74bbc5
commit 58034d80e4
5 changed files with 17 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2004-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Steal ATTACHED_MENUS
list so its tail isn't freed when we re-set it, noticed
by Hans Petter Jansson.
* gtk/gtksizegroup.c (gtk_size_group_add_widget): Fix
a typo, noticed by Tim Janik.

View File

@ -1,5 +1,9 @@
2004-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Steal ATTACHED_MENUS
list so its tail isn't freed when we re-set it, noticed
by Hans Petter Jansson.
* gtk/gtksizegroup.c (gtk_size_group_add_widget): Fix
a typo, noticed by Tim Janik.

View File

@ -1,5 +1,9 @@
2004-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Steal ATTACHED_MENUS
list so its tail isn't freed when we re-set it, noticed
by Hans Petter Jansson.
* gtk/gtksizegroup.c (gtk_size_group_add_widget): Fix
a typo, noticed by Tim Janik.

View File

@ -1,5 +1,9 @@
2004-08-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_attach_to_widget): Steal ATTACHED_MENUS
list so its tail isn't freed when we re-set it, noticed
by Hans Petter Jansson.
* gtk/gtksizegroup.c (gtk_size_group_add_widget): Fix
a typo, noticed by Tim Janik.

View File

@ -1037,7 +1037,7 @@ gtk_menu_attach_to_widget (GtkMenu *menu,
data->detacher = detacher;
g_object_set_data (G_OBJECT (menu), attach_data_key, data);
list = g_object_get_data (G_OBJECT (attach_widget), ATTACHED_MENUS);
list = g_object_steal_data (G_OBJECT (attach_widget), ATTACHED_MENUS);
if (!g_list_find (list, menu))
{
list = g_list_prepend (list, menu);