Commit d3c33337 authored by scott's avatar scott

Menufactory now refs&sinks its children.

--sg
parent 9258a7ae
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
Wed Feb 4 23:05:28 1998 Scott Goehring <scott@poverty.bloomington.in.us>
* gtk/gtkmenufactory.c: menufactories now ref&sink the menus they
create
Thu Feb 5 02:13:08 1998 Tim Janik <timj@gimp.org>
* gtk/gtklist.h:
......
......@@ -88,6 +88,9 @@ gtk_menu_factory_destroy (GtkMenuFactory *factory)
if (factory->table)
gtk_accelerator_table_unref (factory->table);
if (factory->widget)
gtk_widget_unref (factory->widget);
}
void
......@@ -102,7 +105,11 @@ gtk_menu_factory_add_entries (GtkMenuFactory *factory,
g_return_if_fail (nentries > 0);
if (!factory->widget)
factory->widget = gtk_menu_factory_make_widget (factory);
{
factory->widget = gtk_menu_factory_make_widget (factory);
gtk_widget_ref (factory->widget);
gtk_object_sink (GTK_OBJECT (factory->widget));
}
for (i = 0; i < nentries; i++)
gtk_menu_factory_create (factory, &entries[i], factory->widget, entries[i].path);
......@@ -272,8 +279,13 @@ gtk_menu_factory_create (GtkMenuFactory *factory,
if (subfactory->path &&
(strcmp (subfactory->path, tmp_path) == 0))
{
if (!subfactory->widget)
subfactory->widget = gtk_menu_factory_make_widget (subfactory);
if (!subfactory->widget)
{
subfactory->widget = gtk_menu_factory_make_widget (subfactory);
gtk_widget_ref (subfactory->widget);
gtk_object_sink (GTK_OBJECT (subfactory->widget));
}
gtk_menu_factory_create (subfactory, entry, subfactory->widget, p + 1);
return;
}
......
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