summaryrefslogtreecommitdiff
path: root/gtk/gtkmenuitem.c
diff options
context:
space:
mode:
authorTim Janik <timj@src.gnome.org>1998-01-30 23:47:09 +0000
committerTim Janik <timj@src.gnome.org>1998-01-30 23:47:09 +0000
commit4af33fa24df69f335f07f43e5904a766c8d8ec97 (patch)
treeccc23ba16332f44ae45418f6cf9580036c4c76da /gtk/gtkmenuitem.c
parentee7038f9fddd0213c65474e5d59609107caed7c6 (diff)
downloadgtk+-4af33fa24df69f335f07f43e5904a766c8d8ec97.tar.gz
hm, initital refcount revolution commit ;)
still some gnits left, but keep working on it ;) -timj
Diffstat (limited to 'gtk/gtkmenuitem.c')
-rw-r--r--gtk/gtkmenuitem.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index d48693968a..8ead19f502 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -197,8 +197,9 @@ gtk_menu_item_destroy (GtkObject *object)
if (menu_item->submenu)
{
- gtk_object_unref (GTK_OBJECT (menu_item->submenu));
- /* gtk_widget_destroy (menu_item->submenu); */
+ gtk_widget_destroy (menu_item->submenu);
+ gtk_widget_unref (menu_item->submenu);
+ menu_item->submenu = NULL;
}
if (GTK_OBJECT_CLASS (parent_class)->destroy)
@@ -217,11 +218,11 @@ gtk_menu_item_set_submenu (GtkMenuItem *menu_item,
if (menu_item->submenu)
{
g_return_if_fail (!GTK_WIDGET_VISIBLE (menu_item->submenu));
- gtk_object_unref (GTK_OBJECT (menu_item->submenu));
+ gtk_widget_unref (menu_item->submenu);
}
menu_item->submenu = submenu;
if (menu_item->submenu)
- gtk_object_ref (GTK_OBJECT (menu_item->submenu));
+ gtk_widget_ref (menu_item->submenu);
if (GTK_WIDGET (menu_item)->parent)
gtk_widget_queue_resize (GTK_WIDGET (menu_item));