Mercurial > pidgin
annotate finch/libgnt/gntmenuitemcheck.c @ 17639:392889212240
#include "connection.h" instead of "connection.c". I don't care if this
compiles, it's clearly more correct.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Fri, 15 Jun 2007 01:54:23 +0000 |
parents | f00f2e283ffb |
children | 8410511f4dbb |
rev | line source |
---|---|
15817 | 1 #include "gntmenuitemcheck.h" |
2 | |
3 static GntMenuItemClass *parent_class = NULL; | |
4 | |
5 static void | |
6 gnt_menuitem_check_class_init(GntMenuItemCheckClass *klass) | |
7 { | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
8 parent_class = GNT_MENU_ITEM_CLASS(klass); |
15817 | 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 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
42 type = g_type_register_static(GNT_TYPE_MENU_ITEM, |
15817 | 43 "GntMenuItemCheck", |
44 &info, 0); | |
45 } | |
46 | |
47 return type; | |
48 } | |
49 | |
50 GntMenuItem *gnt_menuitem_check_new(const char *text) | |
51 { | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
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:
15817
diff
changeset
|
53 GntMenuItem *menuitem = GNT_MENU_ITEM(item); |
15817 | 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 |