2 * vim:ts=4:sw=4:et:cindent:cino=(0
7 #include <glib/gi18n-lib.h>
10 #include <hildon/hildon-picker-button.h>
11 #include <hildon/hildon-touch-selector.h>
12 #include <hildon/hildon-button.h>
13 #include <hildon/hildon-entry.h>
14 #include <hildon/hildon-pannable-area.h>
15 #include <hildon/hildon-defines.h>
16 #include <gconf/gconf-client.h>
18 #include "libtweakr-section/tweakr-section.h"
19 #include "libtweakr-section/tweakr-module.h"
22 #define TWEAKR_TYPE_PROFILE_SECTION \
23 (tweakr_profile_section_type)
24 #define TWEAKR_PROFILE_SECTION(obj) \
25 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
26 TWEAKR_TYPE_PROFILE_SECTION, \
27 TweakrProfileSection))
28 #define TWEAKR_PROFILE_SECTION_CLASS(k) \
29 (G_TYPE_CHECK_CLASS_CAST((k), \
30 TWEAKR_TYPE_PROFILE_SECTION, \
31 TweakrProfileSectionClass))
32 #define TWEAKR_IS_PROFILE_SECTION(obj) \
33 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
34 TWEAKR_TYPE_PROFILE_SECTION))
36 typedef struct _TweakrProfileSection TweakrProfileSection;
37 typedef struct _TweakrProfileSectionClass
38 TweakrProfileSectionClass;
40 struct _TweakrProfileSection
42 TweakrSection parent_instance;
45 struct _TweakrProfileSectionClass
47 TweakrSectionClass parent_class;
51 static GType tweakr_profile_section_get_type (GTypeModule *module);
52 static void tweakr_profile_section_class_init
53 (TweakrProfileSectionClass *class);
54 static void tweakr_profile_section_init
55 (TweakrProfileSection *section);
56 static void tweakr_profile_section_dispose (GObject *obj);
58 static gboolean _save (TweakrSection *section,
59 gboolean *requires_restart);
61 static GType tweakr_profile_section_type = 0;
62 static TweakrSectionClass *
63 tweakr_profile_section_parent_class = NULL;
67 tweakr_module_load (TweakrModule *module)
69 tweakr_profile_section_get_type (G_TYPE_MODULE (module));
73 tweakr_module_unload (TweakrModule *module)
78 tweakr_profile_section_get_type (GTypeModule *module)
80 if (!tweakr_profile_section_type)
82 static const GTypeInfo section_info =
84 sizeof (TweakrProfileSectionClass),
86 (GBaseFinalizeFunc) NULL,
87 (GClassInitFunc) tweakr_profile_section_class_init,
88 NULL, /* class_finalize */
89 NULL, /* class_data */
90 sizeof (TweakrProfileSection),
92 (GInstanceInitFunc) tweakr_profile_section_init
95 tweakr_profile_section_type =
96 g_type_module_register_type (module, TWEAKR_TYPE_SECTION,
97 "TweakrProfileSection",
101 return tweakr_profile_section_type;
105 tweakr_profile_section_class_init
106 (TweakrProfileSectionClass *klass)
108 GObjectClass *object_class = G_OBJECT_CLASS (klass);
109 TweakrSectionClass *section_class =
110 TWEAKR_SECTION_CLASS (klass);
112 tweakr_profile_section_parent_class =
113 g_type_class_peek_parent (klass);
115 section_class->name = "_Profile";
116 section_class->save = _save;
118 object_class->dispose = tweakr_profile_section_dispose;
122 tweakr_profile_section_init (TweakrProfileSection *section)
124 TweakrSection *iface;
126 iface = TWEAKR_SECTION (section);
127 iface->name = _("Profile");
131 tweakr_profile_section_dispose (GObject *obj)
133 G_OBJECT_CLASS (tweakr_profile_section_parent_class)->dispose (obj);
136 static gboolean _save (TweakrSection *section, gboolean *requires_restart)