Mercurial > pidgin
comparison finch/libgnt/gntmenuitem.c @ 15928:f00f2e283ffb
Some define changes. This helps in generating the python bindings.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 26 Mar 2007 04:10:39 +0000 |
parents | 0e3a8505ebbe |
children | 8410511f4dbb |
comparison
equal
deleted
inserted
replaced
15927:846a00760176 | 15928:f00f2e283ffb |
---|---|
4 static GObjectClass *parent_class = NULL; | 4 static GObjectClass *parent_class = NULL; |
5 | 5 |
6 static void | 6 static void |
7 gnt_menuitem_destroy(GObject *obj) | 7 gnt_menuitem_destroy(GObject *obj) |
8 { | 8 { |
9 GntMenuItem *item = GNT_MENUITEM(obj); | 9 GntMenuItem *item = GNT_MENU_ITEM(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 parent_class->dispose(obj); |
59 return type; | 59 return type; |
60 } | 60 } |
61 | 61 |
62 GntMenuItem *gnt_menuitem_new(const char *text) | 62 GntMenuItem *gnt_menuitem_new(const char *text) |
63 { | 63 { |
64 GObject *item = g_object_new(GNT_TYPE_MENUITEM, NULL); | 64 GObject *item = g_object_new(GNT_TYPE_MENU_ITEM, NULL); |
65 GntMenuItem *menuitem = GNT_MENUITEM(item); | 65 GntMenuItem *menuitem = GNT_MENU_ITEM(item); |
66 | 66 |
67 menuitem->text = g_strdup(text); | 67 menuitem->text = g_strdup(text); |
68 | 68 |
69 return menuitem; | 69 return menuitem; |
70 } | 70 } |