Mercurial > pidgin.yaz
annotate finch/libgnt/gntmenuitemcheck.c @ 17003:667a5a24781c
merge of '5fba6dfb4d0356ca98aa9a0c99c95135225f56db'
and 'cf675877fb02f3868c22d6bcf0141011ac7b098e'
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Thu, 10 May 2007 02:55:42 +0000 |
parents | f00f2e283ffb |
children | 8410511f4dbb |
rev | line source |
---|---|
15818 | 1 #include "gntmenuitemcheck.h" |
2 | |
3 static GntMenuItemClass *parent_class = NULL; | |
4 | |
5 static void | |
6 gnt_menuitem_check_class_init(GntMenuItemCheckClass *klass) | |
7 { | |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
8 parent_class = GNT_MENU_ITEM_CLASS(klass); |
15818 | 9 |
10 GNTDEBUG; | |
11 } | |
12 | |
13 static void | |
14 gnt_menuitem_check_init(GTypeInstance *instance, gpointer class) | |
15 { | |
16 GNTDEBUG; | |
17 } | |
18 | |
19 /****************************************************************************** | |
20 * GntMenuItemCheck API | |
21 *****************************************************************************/ | |
22 GType | |
23 gnt_menuitem_check_get_gtype(void) | |
24 { | |
25 static GType type = 0; | |
26 | |
27 if(type == 0) | |
28 { | |
29 static const GTypeInfo info = { | |
30 sizeof(GntMenuItemCheckClass), | |
31 NULL, /* base_init */ | |
32 NULL, /* base_finalize */ | |
33 (GClassInitFunc)gnt_menuitem_check_class_init, | |
34 NULL, /* class_finalize */ | |
35 NULL, /* class_data */ | |
36 sizeof(GntMenuItemCheck), | |
37 0, /* n_preallocs */ | |
38 gnt_menuitem_check_init, /* instance_init */ | |
39 NULL /* value_table */ | |
40 }; | |
41 | |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
42 type = g_type_register_static(GNT_TYPE_MENU_ITEM, |
15818 | 43 "GntMenuItemCheck", |
44 &info, 0); | |
45 } | |
46 | |
47 return type; | |
48 } | |
49 | |
50 GntMenuItem *gnt_menuitem_check_new(const char *text) | |
51 { | |
15931
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
52 GntMenuItem *item = g_object_new(GNT_TYPE_MENU_ITEM_CHECK, NULL); |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15818
diff
changeset
|
53 GntMenuItem *menuitem = GNT_MENU_ITEM(item); |
15818 | 54 |
55 menuitem->text = g_strdup(text); | |
56 return item; | |
57 } | |
58 | |
59 gboolean gnt_menuitem_check_get_checked(GntMenuItemCheck *item) | |
60 { | |
61 return item->checked; | |
62 } | |
63 | |
64 void gnt_menuitem_check_set_checked(GntMenuItemCheck *item, gboolean set) | |
65 { | |
66 item->checked = set; | |
67 } | |
68 |