Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
14899:a8f92a837590 | 14900:065e7ac30338 |
---|---|
9 GntMenuItem *item = GNT_MENUITEM(obj); | 9 GntMenuItem *item = GNT_MENUITEM(obj); |
10 g_free(item->text); | 10 g_free(item->text); |
11 item->text = NULL; | 11 item->text = NULL; |
12 if (item->submenu) | 12 if (item->submenu) |
13 gnt_widget_destroy(GNT_WIDGET(item->submenu)); | 13 gnt_widget_destroy(GNT_WIDGET(item->submenu)); |
14 parent_class->dispose(obj); | |
14 } | 15 } |
15 | 16 |
16 static void | 17 static void |
17 gnt_menuitem_class_init(GntMenuItemClass *klass) | 18 gnt_menuitem_class_init(GntMenuItemClass *klass) |
18 { | 19 { |
19 parent_class = G_OBJECT_CLASS(klass); | 20 GObjectClass *obj_class = G_OBJECT_CLASS(klass); |
21 parent_class = g_type_class_peek_parent(klass); | |
20 | 22 |
21 parent_class->dispose = gnt_menuitem_destroy; | 23 obj_class->dispose = gnt_menuitem_destroy; |
22 } | 24 } |
23 | 25 |
24 static void | 26 static void |
25 gnt_menuitem_init(GTypeInstance *instance, gpointer class) | 27 gnt_menuitem_init(GTypeInstance *instance, gpointer class) |
26 { | 28 { |
73 } | 75 } |
74 | 76 |
75 void gnt_menuitem_set_submenu(GntMenuItem *item, GntMenu *menu) | 77 void gnt_menuitem_set_submenu(GntMenuItem *item, GntMenu *menu) |
76 { | 78 { |
77 if (item->submenu) | 79 if (item->submenu) |
78 gnt_widget_destroy(item->submenu); | 80 gnt_widget_destroy(GNT_WIDGET(item->submenu)); |
79 item->submenu = menu; | 81 item->submenu = menu; |
80 } | 82 } |
81 | 83 |