aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-config-meeting-time-selector.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-10-10 01:35:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-10-10 01:35:08 +0800
commit51e192f235cda7d70d76974ac4522280264fd011 (patch)
tree62d4d597986bb779491d6867f5b9771408de1ed2 /modules/calendar/e-cal-config-meeting-time-selector.c
parent27e8442447fccab49ffbf3be3d2d520bfbd5f6ba (diff)
downloadgsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar.gz
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar.bz2
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar.lz
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar.xz
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.tar.zst
gsoc2013-evolution-51e192f235cda7d70d76974ac4522280264fd011.zip
ECalConfigMeetingTimeSelector: Use G_DEFINE_DYNAMIC_TYPE.
Follow the usual GObject conventions.
Diffstat (limited to 'modules/calendar/e-cal-config-meeting-time-selector.c')
-rw-r--r--modules/calendar/e-cal-config-meeting-time-selector.c62
1 files changed, 38 insertions, 24 deletions
diff --git a/modules/calendar/e-cal-config-meeting-time-selector.c b/modules/calendar/e-cal-config-meeting-time-selector.c
index c54ccde39b..3877067aa0 100644
--- a/modules/calendar/e-cal-config-meeting-time-selector.c
+++ b/modules/calendar/e-cal-config-meeting-time-selector.c
@@ -22,12 +22,21 @@
#include "e-cal-config-meeting-time-selector.h"
-#include <libebackend/libebackend.h>
-
#include <shell/e-shell.h>
#include <calendar/gui/e-meeting-time-sel.h>
-static gpointer parent_class;
+#define E_CAL_CONFIG_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_CAL_CONFIG_MEETING_TIME_SELECTOR, ECalConfigMeetingTimeSelectorPrivate))
+
+struct _ECalConfigMeetingTimeSelectorPrivate {
+ gint placeholder;
+};
+
+G_DEFINE_DYNAMIC_TYPE (
+ ECalConfigMeetingTimeSelector,
+ e_cal_config_meeting_time_selector,
+ E_TYPE_EXTENSION)
static void
cal_config_meeting_time_selector_constructed (GObject *object)
@@ -59,39 +68,44 @@ cal_config_meeting_time_selector_constructed (GObject *object)
G_BINDING_SYNC_CREATE);
/* Chain up to parent's constructed() method. */
- G_OBJECT_CLASS (parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_cal_config_meeting_time_selector_parent_class)->
+ constructed (object);
}
static void
-cal_config_meeting_time_selector_class_init (EExtensionClass *class)
+e_cal_config_meeting_time_selector_class_init (ECalConfigMeetingTimeSelectorClass *class)
{
GObjectClass *object_class;
+ EExtensionClass *extension_class;
- parent_class = g_type_class_peek_parent (class);
+ g_type_class_add_private (
+ class, sizeof (ECalConfigMeetingTimeSelectorPrivate));
object_class = G_OBJECT_CLASS (class);
object_class->constructed = cal_config_meeting_time_selector_constructed;
- class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR;
+}
+
+static void
+e_cal_config_meeting_time_selector_class_finalize (ECalConfigMeetingTimeSelectorClass *class)
+{
+}
+
+static void
+e_cal_config_meeting_time_selector_init (ECalConfigMeetingTimeSelector *extension)
+{
+ extension->priv =
+ E_CAL_CONFIG_MEETING_TIME_SELECTOR_GET_PRIVATE (extension);
}
void
-e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module)
+e_cal_config_meeting_time_selector_type_register (GTypeModule *type_module)
{
- static const GTypeInfo type_info = {
- sizeof (EExtensionClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) cal_config_meeting_time_selector_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EExtension),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- NULL /* value_table */
- };
-
- g_type_module_register_type (
- type_module, E_TYPE_EXTENSION,
- "ECalConfigMeetingTimeSelector", &type_info, 0);
+ /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
+ * function, so we have to wrap it with a public function in
+ * order to register types from a separate compilation unit. */
+ e_cal_config_meeting_time_selector_register_type (type_module);
}
+