diff console/libgnt/gntmenuitem.c @ 14900:065e7ac30338

[gaim-migrate @ 17672] Rearranging a bunch of stuff. Users shouldn't notice any change, apart from the added ability to bind keys for the window-manager. I will update the manual in a while. I need to know how to revert a commit in case things go terribly wrong. ... I am going to remind everyone that Dido is AWESOME! committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 05 Nov 2006 17:28:33 +0000
parents c8cd118653fc
children 1c8f1dc50685
line wrap: on
line diff
--- a/console/libgnt/gntmenuitem.c	Sun Nov 05 14:57:05 2006 +0000
+++ b/console/libgnt/gntmenuitem.c	Sun Nov 05 17:28:33 2006 +0000
@@ -11,14 +11,16 @@
 	item->text = NULL;
 	if (item->submenu)
 		gnt_widget_destroy(GNT_WIDGET(item->submenu));
+	parent_class->dispose(obj);
 }
 
 static void
 gnt_menuitem_class_init(GntMenuItemClass *klass)
 {
-	parent_class = G_OBJECT_CLASS(klass);
+	GObjectClass *obj_class = G_OBJECT_CLASS(klass);
+	parent_class = g_type_class_peek_parent(klass);
 
-	parent_class->dispose = gnt_menuitem_destroy;
+	obj_class->dispose = gnt_menuitem_destroy;
 }
 
 static void
@@ -75,7 +77,7 @@
 void gnt_menuitem_set_submenu(GntMenuItem *item, GntMenu *menu)
 {
 	if (item->submenu)
-		gnt_widget_destroy(item->submenu);
+		gnt_widget_destroy(GNT_WIDGET(item->submenu));
 	item->submenu = menu;
 }