aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-11 01:18:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-11 01:18:28 +0800
commit5eb12906c4242a576ad6fac4d229f096d3aab17a (patch)
tree7c09011257167be9c0f456a7c19c21298469ea82 /calendar
parent92e942499bffca812dcbc229f6c88ebb640e403a (diff)
downloadgsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar.gz
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar.bz2
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar.lz
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar.xz
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.tar.zst
gsoc2013-evolution-5eb12906c4242a576ad6fac4d229f096d3aab17a.zip
Use the proper idiom for loading types in a GTypeModule.
Also, combine calendar, memo, and task backends into a single module, similar to how it worked under Bonobo.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/Makefile.am2
-rw-r--r--calendar/module/Makefile.am (renamed from calendar/modules/Makefile.am)32
-rw-r--r--calendar/module/e-cal-shell-backend.c (renamed from calendar/modules/e-cal-shell-backend.c)63
-rw-r--r--calendar/module/e-cal-shell-backend.h (renamed from calendar/modules/e-cal-shell-backend.h)7
-rw-r--r--calendar/module/e-cal-shell-content.c (renamed from calendar/modules/e-cal-shell-content.c)45
-rw-r--r--calendar/module/e-cal-shell-content.h (renamed from calendar/modules/e-cal-shell-content.h)26
-rw-r--r--calendar/module/e-cal-shell-migrate.c (renamed from calendar/modules/e-cal-shell-migrate.c)0
-rw-r--r--calendar/module/e-cal-shell-migrate.h (renamed from calendar/modules/e-cal-shell-migrate.h)0
-rw-r--r--calendar/module/e-cal-shell-settings.c (renamed from calendar/modules/e-cal-shell-settings.c)0
-rw-r--r--calendar/module/e-cal-shell-settings.h (renamed from calendar/modules/e-cal-shell-settings.h)0
-rw-r--r--calendar/module/e-cal-shell-sidebar.c (renamed from calendar/modules/e-cal-shell-sidebar.c)43
-rw-r--r--calendar/module/e-cal-shell-sidebar.h (renamed from calendar/modules/e-cal-shell-sidebar.h)23
-rw-r--r--calendar/module/e-cal-shell-view-actions.c (renamed from calendar/modules/e-cal-shell-view-actions.c)0
-rw-r--r--calendar/module/e-cal-shell-view-actions.h (renamed from calendar/modules/e-cal-shell-view-actions.h)0
-rw-r--r--calendar/module/e-cal-shell-view-memopad.c (renamed from calendar/modules/e-cal-shell-view-memopad.c)0
-rw-r--r--calendar/module/e-cal-shell-view-private.c (renamed from calendar/modules/e-cal-shell-view-private.c)0
-rw-r--r--calendar/module/e-cal-shell-view-private.h (renamed from calendar/modules/e-cal-shell-view-private.h)0
-rw-r--r--calendar/module/e-cal-shell-view-taskpad.c (renamed from calendar/modules/e-cal-shell-view-taskpad.c)0
-rw-r--r--calendar/module/e-cal-shell-view.c (renamed from calendar/modules/e-cal-shell-view.c)45
-rw-r--r--calendar/module/e-cal-shell-view.h (renamed from calendar/modules/e-cal-shell-view.h)11
-rw-r--r--calendar/module/e-memo-shell-backend.c (renamed from calendar/modules/e-memo-shell-backend.c)61
-rw-r--r--calendar/module/e-memo-shell-backend.h (renamed from calendar/modules/e-memo-shell-backend.h)7
-rw-r--r--calendar/module/e-memo-shell-content.c (renamed from calendar/modules/e-memo-shell-content.c)43
-rw-r--r--calendar/module/e-memo-shell-content.h (renamed from calendar/modules/e-memo-shell-content.h)20
-rw-r--r--calendar/module/e-memo-shell-migrate.c (renamed from calendar/modules/e-memo-shell-migrate.c)0
-rw-r--r--calendar/module/e-memo-shell-migrate.h (renamed from calendar/modules/e-memo-shell-migrate.h)0
-rw-r--r--calendar/module/e-memo-shell-sidebar.c (renamed from calendar/modules/e-memo-shell-sidebar.c)43
-rw-r--r--calendar/module/e-memo-shell-sidebar.h (renamed from calendar/modules/e-memo-shell-sidebar.h)15
-rw-r--r--calendar/module/e-memo-shell-view-actions.c (renamed from calendar/modules/e-memo-shell-view-actions.c)0
-rw-r--r--calendar/module/e-memo-shell-view-actions.h (renamed from calendar/modules/e-memo-shell-view-actions.h)0
-rw-r--r--calendar/module/e-memo-shell-view-private.c (renamed from calendar/modules/e-memo-shell-view-private.c)0
-rw-r--r--calendar/module/e-memo-shell-view-private.h (renamed from calendar/modules/e-memo-shell-view-private.h)0
-rw-r--r--calendar/module/e-memo-shell-view.c (renamed from calendar/modules/e-memo-shell-view.c)47
-rw-r--r--calendar/module/e-memo-shell-view.h (renamed from calendar/modules/e-memo-shell-view.h)7
-rw-r--r--calendar/module/e-task-shell-backend.c (renamed from calendar/modules/e-task-shell-backend.c)63
-rw-r--r--calendar/module/e-task-shell-backend.h (renamed from calendar/modules/e-task-shell-backend.h)7
-rw-r--r--calendar/module/e-task-shell-content.c (renamed from calendar/modules/e-task-shell-content.c)43
-rw-r--r--calendar/module/e-task-shell-content.h (renamed from calendar/modules/e-task-shell-content.h)20
-rw-r--r--calendar/module/e-task-shell-migrate.c (renamed from calendar/modules/e-task-shell-migrate.c)0
-rw-r--r--calendar/module/e-task-shell-migrate.h (renamed from calendar/modules/e-task-shell-migrate.h)0
-rw-r--r--calendar/module/e-task-shell-sidebar.c (renamed from calendar/modules/e-task-shell-sidebar.c)43
-rw-r--r--calendar/module/e-task-shell-sidebar.h (renamed from calendar/modules/e-task-shell-sidebar.h)18
-rw-r--r--calendar/module/e-task-shell-view-actions.c (renamed from calendar/modules/e-task-shell-view-actions.c)0
-rw-r--r--calendar/module/e-task-shell-view-actions.h (renamed from calendar/modules/e-task-shell-view-actions.h)0
-rw-r--r--calendar/module/e-task-shell-view-private.c (renamed from calendar/modules/e-task-shell-view-private.c)2
-rw-r--r--calendar/module/e-task-shell-view-private.h (renamed from calendar/modules/e-task-shell-view-private.h)0
-rw-r--r--calendar/module/e-task-shell-view.c (renamed from calendar/modules/e-task-shell-view.c)47
-rw-r--r--calendar/module/e-task-shell-view.h (renamed from calendar/modules/e-task-shell-view.h)7
-rw-r--r--calendar/module/evolution-module-calendar.c65
49 files changed, 441 insertions, 414 deletions
diff --git a/calendar/Makefile.am b/calendar/Makefile.am
index 20f45f68f9..5da53380b8 100644
--- a/calendar/Makefile.am
+++ b/calendar/Makefile.am
@@ -4,7 +4,7 @@ else
CONDUIT_DIR =
endif
-SUBDIRS = idl common importers gui $(CONDUIT_DIR) modules
+SUBDIRS = idl common importers gui $(CONDUIT_DIR) module
error_DATA = calendar.error
errordir = $(privdatadir)/errors
diff --git a/calendar/modules/Makefile.am b/calendar/module/Makefile.am
index f96ea2b8b3..ca2a4b4ec5 100644
--- a/calendar/modules/Makefile.am
+++ b/calendar/module/Makefile.am
@@ -5,16 +5,11 @@ INCLUDES = \
-DEVOLUTION_ETSPECDIR=\""$(etspecdir)"\" \
$(EVOLUTION_CALENDAR_CFLAGS)
-#module_LTLIBRARIES = \
-# libevolution-module-memos.la \
-# libevolution-module-tasks.la
-
module_LTLIBRARIES = \
- libevolution-module-calendars.la \
- libevolution-module-memos.la \
- libevolution-module-tasks.la
+ libevolution-module-calendar.la
-libevolution_module_calendars_la_SOURCES = \
+libevolution_module_calendar_la_SOURCES = \
+ evolution-module-calendar.c \
e-cal-shell-backend.c \
e-cal-shell-backend.h \
e-cal-shell-content.c \
@@ -32,9 +27,7 @@ libevolution_module_calendars_la_SOURCES = \
e-cal-shell-view-memopad.c \
e-cal-shell-view-private.c \
e-cal-shell-view-private.h \
- e-cal-shell-view-taskpad.c
-
-libevolution_module_memos_la_SOURCES = \
+ e-cal-shell-view-taskpad.c \
e-memo-shell-backend.c \
e-memo-shell-backend.h \
e-memo-shell-content.c \
@@ -48,9 +41,7 @@ libevolution_module_memos_la_SOURCES = \
e-memo-shell-view-actions.c \
e-memo-shell-view-actions.h \
e-memo-shell-view-private.c \
- e-memo-shell-view-private.h
-
-libevolution_module_tasks_la_SOURCES = \
+ e-memo-shell-view-private.h \
e-task-shell-backend.c \
e-task-shell-backend.h \
e-task-shell-content.c \
@@ -69,19 +60,12 @@ libevolution_module_tasks_la_SOURCES = \
# Removed from all three
# $(top_builddir)/a11y/calendar/libevolution-calendar-a11y.la
-libevolution_module_calendars_la_LIBADD = \
+libevolution_module_calendar_la_LIBADD = \
$(WIN32_BOOTSTRAP_LIBS) \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/calendar/gui/libcal-gui.la \
$(top_builddir)/mail/libevolution-module-mail.la \
$(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.la
-libevolution_module_memos_la_LIBADD = \
- $(WIN32_BOOTSTRAP_LIBS) \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/gui/libcal-gui.la
-
-libevolution_module_tasks_la_LIBADD = \
- $(WIN32_BOOTSTRAP_LIBS) \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/gui/libcal-gui.la
+libevolution_module_calendar_la_LDFLAGS = \
+ -module -avoid-version $(NO_UNDEFINED)
diff --git a/calendar/modules/e-cal-shell-backend.c b/calendar/module/e-cal-shell-backend.c
index c6d84f0cf0..9c38555f2d 100644
--- a/calendar/modules/e-cal-shell-backend.c
+++ b/calendar/module/e-cal-shell-backend.c
@@ -45,9 +45,9 @@
#include "calendar/gui/dialogs/event-editor.h"
#include "calendar/importers/evolution-calendar-importer.h"
-#include "e-cal-shell-view.h"
#include "e-cal-shell-migrate.h"
#include "e-cal-shell-settings.h"
+#include "e-cal-shell-view.h"
#define E_CAL_SHELL_BACKEND_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -67,12 +67,8 @@ enum {
PROP_SOURCE_LIST
};
-/* Module Entry Point */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_cal_shell_backend_type = 0;
static gpointer parent_class;
+static GType cal_shell_backend_type;
static void
cal_shell_backend_ensure_sources (EShellBackend *shell_backend)
@@ -634,29 +630,30 @@ cal_shell_backend_init (ECalShellBackend *cal_shell_backend)
}
GType
-e_cal_shell_backend_get_type (GTypeModule *type_module)
+e_cal_shell_backend_get_type (void)
{
- if (e_cal_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ECalShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) cal_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ECalShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) cal_shell_backend_init,
- NULL /* value_table */
- };
-
- e_cal_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "ECalShellBackend", &type_info, 0);
- }
+ return cal_shell_backend_type;
+}
- return e_cal_shell_backend_type;
+void
+e_cal_shell_backend_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ECalShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ECalShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) cal_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ cal_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "ECalShellBackend", &type_info, 0);
}
ESourceList *
@@ -667,15 +664,3 @@ e_cal_shell_backend_get_source_list (ECalShellBackend *cal_shell_backend)
return cal_shell_backend->priv->source_list;
}
-
-void
-e_module_load (GTypeModule *type_module)
-{
- e_cal_shell_backend_get_type (type_module);
- e_cal_shell_view_get_type (type_module);
-}
-
-void
-e_module_unload (GTypeModule *type_module)
-{
-}
diff --git a/calendar/modules/e-cal-shell-backend.h b/calendar/module/e-cal-shell-backend.h
index 5e176007f8..434c87badb 100644
--- a/calendar/modules/e-cal-shell-backend.h
+++ b/calendar/module/e-cal-shell-backend.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_CAL_SHELL_BACKEND \
- (e_cal_shell_backend_type)
+ (e_cal_shell_backend_get_type ())
#define E_CAL_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_CAL_SHELL_BACKEND, ECalShellBackend))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_cal_shell_backend_type;
-
typedef struct _ECalShellBackend ECalShellBackend;
typedef struct _ECalShellBackendClass ECalShellBackendClass;
typedef struct _ECalShellBackendPrivate ECalShellBackendPrivate;
@@ -61,7 +59,8 @@ struct _ECalShellBackendClass {
EShellBackendClass parent_class;
};
-GType e_cal_shell_backend_get_type
+GType e_cal_shell_backend_get_type (void);
+void e_cal_shell_backend_register_type
(GTypeModule *type_module);
ESourceList * e_cal_shell_backend_get_source_list
(ECalShellBackend *cal_shell_backend);
diff --git a/calendar/modules/e-cal-shell-content.c b/calendar/module/e-cal-shell-content.c
index 5a73ed6823..7f750f5be5 100644
--- a/calendar/modules/e-cal-shell-content.c
+++ b/calendar/module/e-cal-shell-content.c
@@ -1,5 +1,5 @@
/*
- * e-cal-shell-content.h
+ * e-cal-shell-content.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -80,6 +80,7 @@ typedef enum {
} FocusLocation;
static gpointer parent_class;
+static GType cal_shell_content_type;
static void
cal_shell_content_display_view_cb (ECalShellContent *cal_shell_content,
@@ -593,28 +594,28 @@ cal_shell_content_init (ECalShellContent *cal_shell_content)
GType
e_cal_shell_content_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (ECalShellContentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) cal_shell_content_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ECalShellContent),
- 0, /* n_preallocs */
- (GInstanceInitFunc) cal_shell_content_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_CONTENT, "ECalShellContent",
- &type_info, 0);
- }
+ return cal_shell_content_type;
+}
- return type;
+void
+e_cal_shell_content_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (ECalShellContentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_shell_content_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ECalShellContent),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) cal_shell_content_init,
+ NULL /* value_table */
+ };
+
+ cal_shell_content_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_CONTENT,
+ "ECalShellContent", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-cal-shell-content.h b/calendar/module/e-cal-shell-content.h
index f199be3b78..6b8617984c 100644
--- a/calendar/modules/e-cal-shell-content.h
+++ b/calendar/module/e-cal-shell-content.h
@@ -27,7 +27,7 @@
#include <calendar/gui/e-memo-table.h>
#include <calendar/gui/gnome-cal.h>
-#include <widgets/menus/gal-view-instance.h>
+#include <menus/gal-view-instance.h>
/* Standard GObject macros */
#define E_TYPE_CAL_SHELL_CONTENT \
@@ -78,26 +78,30 @@ struct _ECalShellContentClass {
};
GType e_cal_shell_content_get_type (void);
+void e_cal_shell_content_register_type
+ (GTypeModule *type_module);
GtkWidget * e_cal_shell_content_new (EShellView *shell_view);
-GnomeCalendar * e_cal_shell_content_get_calendar(ECalShellContent *cal_shell_content);
+GnomeCalendar * e_cal_shell_content_get_calendar
+ (ECalShellContent *cal_shell_content);
EMemoTable * e_cal_shell_content_get_memo_table
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
ECalendarTable *e_cal_shell_content_get_task_table
- (ECalShellContent *cal_shell_content);
-icaltimezone * e_cal_shell_content_get_timezone(ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
+icaltimezone * e_cal_shell_content_get_timezone
+ (ECalShellContent *cal_shell_content);
GalViewInstance *
e_cal_shell_content_get_view_instance
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
void e_cal_shell_content_copy_clipboard
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
void e_cal_shell_content_cut_clipboard
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
void e_cal_shell_content_paste_clipboard
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
void e_cal_shell_content_delete_selection
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
void e_cal_shell_content_delete_selected_occurrence
- (ECalShellContent *cal_shell_content);
+ (ECalShellContent *cal_shell_content);
G_END_DECLS
diff --git a/calendar/modules/e-cal-shell-migrate.c b/calendar/module/e-cal-shell-migrate.c
index bdcca08ce2..bdcca08ce2 100644
--- a/calendar/modules/e-cal-shell-migrate.c
+++ b/calendar/module/e-cal-shell-migrate.c
diff --git a/calendar/modules/e-cal-shell-migrate.h b/calendar/module/e-cal-shell-migrate.h
index 44cbf68ee1..44cbf68ee1 100644
--- a/calendar/modules/e-cal-shell-migrate.h
+++ b/calendar/module/e-cal-shell-migrate.h
diff --git a/calendar/modules/e-cal-shell-settings.c b/calendar/module/e-cal-shell-settings.c
index 639622fec1..639622fec1 100644
--- a/calendar/modules/e-cal-shell-settings.c
+++ b/calendar/module/e-cal-shell-settings.c
diff --git a/calendar/modules/e-cal-shell-settings.h b/calendar/module/e-cal-shell-settings.h
index 7382130f2d..7382130f2d 100644
--- a/calendar/modules/e-cal-shell-settings.h
+++ b/calendar/module/e-cal-shell-settings.h
diff --git a/calendar/modules/e-cal-shell-sidebar.c b/calendar/module/e-cal-shell-sidebar.c
index b338c98f53..4c37c8272d 100644
--- a/calendar/modules/e-cal-shell-sidebar.c
+++ b/calendar/module/e-cal-shell-sidebar.c
@@ -65,6 +65,7 @@ enum {
static gpointer parent_class;
static guint signals[LAST_SIGNAL];
+static GType cal_shell_sidebar_type;
static void
cal_shell_sidebar_emit_client_added (ECalShellSidebar *cal_shell_sidebar,
@@ -616,28 +617,28 @@ cal_shell_sidebar_init (ECalShellSidebar *cal_shell_sidebar)
GType
e_cal_shell_sidebar_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (ECalShellSidebarClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) cal_shell_sidebar_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ECalShellSidebar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) cal_shell_sidebar_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_SIDEBAR, "ECalShellSidebar",
- &type_info, 0);
- }
+ return cal_shell_sidebar_type;
+}
- return type;
+void
+e_cal_shell_sidebar_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (ECalShellSidebarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_shell_sidebar_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ECalShellSidebar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) cal_shell_sidebar_init,
+ NULL /* value_table */
+ };
+
+ cal_shell_sidebar_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_SIDEBAR,
+ "ECalShellSidebar", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-cal-shell-sidebar.h b/calendar/module/e-cal-shell-sidebar.h
index d77482eb64..d4e881a1c2 100644
--- a/calendar/modules/e-cal-shell-sidebar.h
+++ b/calendar/module/e-cal-shell-sidebar.h
@@ -27,7 +27,7 @@
#include <shell/e-shell-sidebar.h>
#include <shell/e-shell-view.h>
-#include <widgets/misc/e-calendar.h>
+#include <misc/e-calendar.h>
/* Standard GObject macros */
#define E_TYPE_CAL_SHELL_SIDEBAR \
@@ -79,17 +79,22 @@ struct _ECalShellSidebarClass {
};
GType e_cal_shell_sidebar_get_type (void);
-GtkWidget * e_cal_shell_sidebar_new (EShellView *shell_view);
-GList * e_cal_shell_sidebar_get_clients (ECalShellSidebar *cal_shell_sidebar);
+void e_cal_shell_sidebar_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_cal_shell_sidebar_new (EShellView *shell_view);
+GList * e_cal_shell_sidebar_get_clients
+ (ECalShellSidebar *cal_shell_sidebar);
ECalendar * e_cal_shell_sidebar_get_mini_calendar
- (ECalShellSidebar *cal_shell_sidebar);
+ (ECalShellSidebar *cal_shell_sidebar);
ESourceSelector *
- e_cal_shell_sidebar_get_selector(ECalShellSidebar *cal_shell_sidebar);
-void e_cal_shell_sidebar_add_source (ECalShellSidebar *cal_shell_sidebar,
- ESource *source);
+ e_cal_shell_sidebar_get_selector
+ (ECalShellSidebar *cal_shell_sidebar);
+void e_cal_shell_sidebar_add_source
+ (ECalShellSidebar *cal_shell_sidebar,
+ ESource *source);
void e_cal_shell_sidebar_remove_source
- (ECalShellSidebar *cal_shell_sidebar,
- ESource *source);
+ (ECalShellSidebar *cal_shell_sidebar,
+ ESource *source);
G_END_DECLS
diff --git a/calendar/modules/e-cal-shell-view-actions.c b/calendar/module/e-cal-shell-view-actions.c
index 53898ffe12..53898ffe12 100644
--- a/calendar/modules/e-cal-shell-view-actions.c
+++ b/calendar/module/e-cal-shell-view-actions.c
diff --git a/calendar/modules/e-cal-shell-view-actions.h b/calendar/module/e-cal-shell-view-actions.h
index 1ad6aa7d51..1ad6aa7d51 100644
--- a/calendar/modules/e-cal-shell-view-actions.h
+++ b/calendar/module/e-cal-shell-view-actions.h
diff --git a/calendar/modules/e-cal-shell-view-memopad.c b/calendar/module/e-cal-shell-view-memopad.c
index d9adf23098..d9adf23098 100644
--- a/calendar/modules/e-cal-shell-view-memopad.c
+++ b/calendar/module/e-cal-shell-view-memopad.c
diff --git a/calendar/modules/e-cal-shell-view-private.c b/calendar/module/e-cal-shell-view-private.c
index aa7b6e336e..aa7b6e336e 100644
--- a/calendar/modules/e-cal-shell-view-private.c
+++ b/calendar/module/e-cal-shell-view-private.c
diff --git a/calendar/modules/e-cal-shell-view-private.h b/calendar/module/e-cal-shell-view-private.h
index 16a06ccd9b..16a06ccd9b 100644
--- a/calendar/modules/e-cal-shell-view-private.h
+++ b/calendar/module/e-cal-shell-view-private.h
diff --git a/calendar/modules/e-cal-shell-view-taskpad.c b/calendar/module/e-cal-shell-view-taskpad.c
index 6d00eb542b..6d00eb542b 100644
--- a/calendar/modules/e-cal-shell-view-taskpad.c
+++ b/calendar/module/e-cal-shell-view-taskpad.c
diff --git a/calendar/modules/e-cal-shell-view.c b/calendar/module/e-cal-shell-view.c
index 1e494edc8a..593b955418 100644
--- a/calendar/modules/e-cal-shell-view.c
+++ b/calendar/module/e-cal-shell-view.c
@@ -21,8 +21,8 @@
#include "e-cal-shell-view-private.h"
-GType e_cal_shell_view_type = 0;
static gpointer parent_class;
+static GType cal_shell_view_type;
static void
cal_shell_view_dispose (GObject *object)
@@ -190,29 +190,30 @@ cal_shell_view_init (ECalShellView *cal_shell_view,
}
GType
-e_cal_shell_view_get_type (GTypeModule *type_module)
+e_cal_shell_view_get_type (void)
{
- if (e_cal_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ECalShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) cal_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- type_module,
- sizeof (ECalShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) cal_shell_view_init,
- NULL /* value_table */
- };
-
- e_cal_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "ECalShellView", &type_info, 0);
- }
+ return cal_shell_view_type;
+}
- return e_cal_shell_view_type;
+void
+e_cal_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ECalShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) cal_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ type_module,
+ sizeof (ECalShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) cal_shell_view_init,
+ NULL /* value_table */
+ };
+
+ cal_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "ECalShellView", &type_info, 0);
}
GnomeCalendar *
diff --git a/calendar/modules/e-cal-shell-view.h b/calendar/module/e-cal-shell-view.h
index cdbd93845a..42fddec55a 100644
--- a/calendar/modules/e-cal-shell-view.h
+++ b/calendar/module/e-cal-shell-view.h
@@ -28,7 +28,7 @@
/* Standard GObject macros */
#define E_TYPE_CAL_SHELL_VIEW \
- (e_cal_shell_view_type)
+ (e_cal_shell_view_get_type ())
#define E_CAL_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_CAL_SHELL_VIEW, ECalShellView))
@@ -47,8 +47,6 @@
G_BEGIN_DECLS
-extern GType e_cal_shell_view_type;
-
typedef struct _ECalShellView ECalShellView;
typedef struct _ECalShellViewClass ECalShellViewClass;
typedef struct _ECalShellViewPrivate ECalShellViewPrivate;
@@ -62,10 +60,9 @@ struct _ECalShellViewClass {
EShellViewClass parent_class;
};
-GType e_cal_shell_view_get_type
- (GTypeModule *type_module);
-GnomeCalendar * e_cal_shell_view_get_calendar
- (ECalShellView *cal_shell_view);
+GType e_cal_shell_view_get_type (void);
+void e_cal_shell_view_register_type (GTypeModule *type_module);
+GnomeCalendar * e_cal_shell_view_get_calendar (ECalShellView *cal_shell_view);
G_END_DECLS
diff --git a/calendar/modules/e-memo-shell-backend.c b/calendar/module/e-memo-shell-backend.c
index 130b41839a..174830874d 100644
--- a/calendar/modules/e-memo-shell-backend.c
+++ b/calendar/module/e-memo-shell-backend.c
@@ -58,12 +58,8 @@ enum {
PROP_SOURCE_LIST
};
-/* Module Entry Point */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_memo_shell_backend_type = 0;
static gpointer parent_class;
+static GType memo_shell_backend_type;
static void
memo_module_ensure_sources (EShellBackend *shell_backend)
@@ -590,29 +586,30 @@ memo_shell_backend_init (EMemoShellBackend *memo_shell_backend)
}
GType
-e_memo_shell_backend_get_type (GTypeModule *type_module)
+e_memo_shell_backend_get_type (void)
{
- if (e_memo_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EMemoShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) memo_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMemoShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) memo_shell_backend_init,
- NULL /* value_table */
- };
-
- e_memo_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "EMemoShellBackend", &type_info, 0);
- }
+ return memo_shell_backend_type;
+}
- return e_memo_shell_backend_type;
+void
+e_memo_shell_backend_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (EMemoShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) memo_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMemoShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) memo_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ memo_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "EMemoShellBackend", &type_info, 0);
}
ESourceList *
@@ -623,15 +620,3 @@ e_memo_shell_backend_get_source_list (EMemoShellBackend *memo_shell_backend)
return memo_shell_backend->priv->source_list;
}
-
-void
-e_module_load (GTypeModule *type_module)
-{
- e_memo_shell_backend_get_type (type_module);
- e_memo_shell_view_get_type (type_module);
-}
-
-void
-e_module_unload (GTypeModule *type_module)
-{
-}
diff --git a/calendar/modules/e-memo-shell-backend.h b/calendar/module/e-memo-shell-backend.h
index 3a8b06a744..0ffc222121 100644
--- a/calendar/modules/e-memo-shell-backend.h
+++ b/calendar/module/e-memo-shell-backend.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_MEMO_SHELL_BACKEND \
- (e_memo_shell_backend_type)
+ (e_memo_shell_backend_get_type ())
#define E_MEMO_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackend))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_memo_shell_backend_type;
-
typedef struct _EMemoShellBackend EMemoShellBackend;
typedef struct _EMemoShellBackendClass EMemoShellBackendClass;
typedef struct _EMemoShellBackendPrivate EMemoShellBackendPrivate;
@@ -61,7 +59,8 @@ struct _EMemoShellBackendClass {
EShellBackendClass parent_class;
};
-GType e_memo_shell_backend_get_type
+GType e_memo_shell_backend_get_type (void);
+void e_memo_shell_backend_register_type
(GTypeModule *type_module);
ESourceList * e_memo_shell_backend_get_source_list
(EMemoShellBackend *memo_shell_backend);
diff --git a/calendar/modules/e-memo-shell-content.c b/calendar/module/e-memo-shell-content.c
index 006e988c41..4e06448489 100644
--- a/calendar/modules/e-memo-shell-content.c
+++ b/calendar/module/e-memo-shell-content.c
@@ -74,6 +74,7 @@ static GtkTargetEntry drag_types[] = {
};
static gpointer parent_class;
+static GType memo_shell_content_type;
static void
memo_shell_content_display_view_cb (EMemoShellContent *memo_shell_content,
@@ -568,28 +569,28 @@ memo_shell_content_init (EMemoShellContent *memo_shell_content)
GType
e_memo_shell_content_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMemoShellContentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) memo_shell_content_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMemoShellContent),
- 0, /* n_preallocs */
- (GInstanceInitFunc) memo_shell_content_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_CONTENT, "EMemoShellContent",
- &type_info, 0);
- }
+ return memo_shell_content_type;
+}
- return type;
+void
+e_memo_shell_content_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EMemoShellContentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) memo_shell_content_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMemoShellContent),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) memo_shell_content_init,
+ NULL /* value_table */
+ };
+
+ memo_shell_content_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_CONTENT,
+ "EMemoShellContent", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-memo-shell-content.h b/calendar/module/e-memo-shell-content.h
index 9edb986cc1..ace932c0d7 100644
--- a/calendar/modules/e-memo-shell-content.h
+++ b/calendar/module/e-memo-shell-content.h
@@ -28,7 +28,7 @@
#include <calendar/gui/e-memo-table.h>
#include <calendar/gui/e-cal-component-preview.h>
-#include <widgets/menus/gal-view-instance.h>
+#include <menus/gal-view-instance.h>
/* Standard GObject macros */
#define E_TYPE_MEMO_SHELL_CONTENT \
@@ -72,22 +72,24 @@ struct _EMemoShellContentClass {
};
GType e_memo_shell_content_get_type (void);
-GtkWidget * e_memo_shell_content_new (EShellView *shell_view);
+void e_memo_shell_content_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_memo_shell_content_new(EShellView *shell_view);
ECalModel * e_memo_shell_content_get_memo_model
- (EMemoShellContent *memo_shell_conent);
+ (EMemoShellContent *memo_shell_conent);
ECalComponentPreview *
e_memo_shell_content_get_memo_preview
- (EMemoShellContent *memo_shell_content);
+ (EMemoShellContent *memo_shell_content);
EMemoTable * e_memo_shell_content_get_memo_table
- (EMemoShellContent *memo_shell_content);
+ (EMemoShellContent *memo_shell_content);
GalViewInstance *
e_memo_shell_content_get_view_instance
- (EMemoShellContent *memo_shell_content);
+ (EMemoShellContent *memo_shell_content);
gboolean e_memo_shell_content_get_preview_visible
- (EMemoShellContent *memo_shell_content);
+ (EMemoShellContent *memo_shell_content);
void e_memo_shell_content_set_preview_visible
- (EMemoShellContent *memo_shell_content,
- gboolean preview_visible);
+ (EMemoShellContent *memo_shell_content,
+ gboolean preview_visible);
G_END_DECLS
diff --git a/calendar/modules/e-memo-shell-migrate.c b/calendar/module/e-memo-shell-migrate.c
index 763d366eab..763d366eab 100644
--- a/calendar/modules/e-memo-shell-migrate.c
+++ b/calendar/module/e-memo-shell-migrate.c
diff --git a/calendar/modules/e-memo-shell-migrate.h b/calendar/module/e-memo-shell-migrate.h
index 26139edeb8..26139edeb8 100644
--- a/calendar/modules/e-memo-shell-migrate.h
+++ b/calendar/module/e-memo-shell-migrate.h
diff --git a/calendar/modules/e-memo-shell-sidebar.c b/calendar/module/e-memo-shell-sidebar.c
index db3c75cfe7..5d5c6a7922 100644
--- a/calendar/modules/e-memo-shell-sidebar.c
+++ b/calendar/module/e-memo-shell-sidebar.c
@@ -60,6 +60,7 @@ enum {
static gpointer parent_class;
static guint signals[LAST_SIGNAL];
+static GType memo_shell_sidebar_type;
static void
memo_shell_sidebar_emit_client_added (EMemoShellSidebar *memo_shell_sidebar,
@@ -597,28 +598,28 @@ memo_shell_sidebar_init (EMemoShellSidebar *memo_shell_sidebar)
GType
e_memo_shell_sidebar_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMemoShellSidebarClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) memo_shell_sidebar_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMemoShellSidebar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) memo_shell_sidebar_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_SIDEBAR, "EMemoShellSidebar",
- &type_info, 0);
- }
+ return memo_shell_sidebar_type;
+}
- return type;
+void
+e_memo_shell_sidebar_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EMemoShellSidebarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) memo_shell_sidebar_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMemoShellSidebar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) memo_shell_sidebar_init,
+ NULL /* value_table */
+ };
+
+ memo_shell_sidebar_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_SIDEBAR,
+ "EMemoShellSidebar", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-memo-shell-sidebar.h b/calendar/module/e-memo-shell-sidebar.h
index 50ece794b2..9a30b91e15 100644
--- a/calendar/modules/e-memo-shell-sidebar.h
+++ b/calendar/module/e-memo-shell-sidebar.h
@@ -77,15 +77,18 @@ struct _EMemoShellSidebarClass {
};
GType e_memo_shell_sidebar_get_type (void);
-GtkWidget * e_memo_shell_sidebar_new (EShellView *shell_view);
+void e_memo_shell_sidebar_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_memo_shell_sidebar_new(EShellView *shell_view);
ESourceSelector *
e_memo_shell_sidebar_get_selector
- (EMemoShellSidebar *memo_shell_sidebar);
-void e_memo_shell_sidebar_add_source (EMemoShellSidebar *memo_shell_sidebar,
- ESource *source);
+ (EMemoShellSidebar *memo_shell_sidebar);
+void e_memo_shell_sidebar_add_source
+ (EMemoShellSidebar *memo_shell_sidebar,
+ ESource *source);
void e_memo_shell_sidebar_remove_source
- (EMemoShellSidebar *memo_shell_sidebar,
- ESource *source);
+ (EMemoShellSidebar *memo_shell_sidebar,
+ ESource *source);
G_END_DECLS
diff --git a/calendar/modules/e-memo-shell-view-actions.c b/calendar/module/e-memo-shell-view-actions.c
index 30dfde6f0e..30dfde6f0e 100644
--- a/calendar/modules/e-memo-shell-view-actions.c
+++ b/calendar/module/e-memo-shell-view-actions.c
diff --git a/calendar/modules/e-memo-shell-view-actions.h b/calendar/module/e-memo-shell-view-actions.h
index 97fd9a6c2b..97fd9a6c2b 100644
--- a/calendar/modules/e-memo-shell-view-actions.h
+++ b/calendar/module/e-memo-shell-view-actions.h
diff --git a/calendar/modules/e-memo-shell-view-private.c b/calendar/module/e-memo-shell-view-private.c
index dbb474a7a2..dbb474a7a2 100644
--- a/calendar/modules/e-memo-shell-view-private.c
+++ b/calendar/module/e-memo-shell-view-private.c
diff --git a/calendar/modules/e-memo-shell-view-private.h b/calendar/module/e-memo-shell-view-private.h
index 04857efe69..04857efe69 100644
--- a/calendar/modules/e-memo-shell-view-private.h
+++ b/calendar/module/e-memo-shell-view-private.h
diff --git a/calendar/modules/e-memo-shell-view.c b/calendar/module/e-memo-shell-view.c
index 78c594d6c5..22c4472219 100644
--- a/calendar/modules/e-memo-shell-view.c
+++ b/calendar/module/e-memo-shell-view.c
@@ -21,8 +21,8 @@
#include "e-memo-shell-view-private.h"
-GType e_memo_shell_view_type = 0;
static gpointer parent_class;
+static GType memo_shell_view_type;
static void
memo_shell_view_dispose (GObject *object)
@@ -195,27 +195,28 @@ memo_shell_view_init (EMemoShellView *memo_shell_view,
}
GType
-e_memo_shell_view_get_type (GTypeModule *type_module)
+e_memo_shell_view_get_type (void)
{
- if (e_memo_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EMemoShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) memo_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- type_module,
- sizeof (EMemoShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) memo_shell_view_init,
- NULL /* value_table */
- };
-
- e_memo_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "EMemoShellView", &type_info, 0);
- }
-
- return e_memo_shell_view_type;
+ return memo_shell_view_type;
+}
+
+void
+e_memo_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (EMemoShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) memo_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ type_module,
+ sizeof (EMemoShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) memo_shell_view_init,
+ NULL /* value_table */
+ };
+
+ memo_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "EMemoShellView", &type_info, 0);
}
diff --git a/calendar/modules/e-memo-shell-view.h b/calendar/module/e-memo-shell-view.h
index 72b9564ac1..0cbaa7b4f3 100644
--- a/calendar/modules/e-memo-shell-view.h
+++ b/calendar/module/e-memo-shell-view.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_MEMO_SHELL_VIEW \
- (e_memo_shell_view_type)
+ (e_memo_shell_view_get_type ())
#define E_MEMO_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_MEMO_SHELL_VIEW, EMemoShellView))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_memo_shell_view_type;
-
typedef struct _EMemoShellView EMemoShellView;
typedef struct _EMemoShellViewClass EMemoShellViewClass;
typedef struct _EMemoShellViewPrivate EMemoShellViewPrivate;
@@ -61,7 +59,8 @@ struct _EMemoShellViewClass {
EShellViewClass parent_class;
};
-GType e_memo_shell_view_get_type (GTypeModule *type_module);
+GType e_memo_shell_view_get_type (void);
+void e_memo_shell_view_register_type (GTypeModule *type_module);
G_END_DECLS
diff --git a/calendar/modules/e-task-shell-backend.c b/calendar/module/e-task-shell-backend.c
index 3298764df3..a9bc2d9a6c 100644
--- a/calendar/modules/e-task-shell-backend.c
+++ b/calendar/module/e-task-shell-backend.c
@@ -39,7 +39,9 @@
#include "calendar/gui/dialogs/calendar-setup.h"
#include "calendar/gui/dialogs/task-editor.h"
+#include "e-task-shell-content.h"
#include "e-task-shell-migrate.h"
+#include "e-task-shell-sidebar.h"
#include "e-task-shell-view.h"
#define E_TASK_SHELL_BACKEND_GET_PRIVATE(obj) \
@@ -58,12 +60,8 @@ enum {
PROP_SOURCE_LIST
};
-/* Module Entry Point */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_task_shell_backend_type = 0;
static gpointer parent_class;
+static GType task_shell_backend_type;
static void
task_module_ensure_sources (EShellBackend *shell_backend)
@@ -596,29 +594,30 @@ task_shell_backend_init (ETaskShellBackend *task_shell_backend)
}
GType
-e_task_shell_backend_get_type (GTypeModule *type_module)
+e_task_shell_backend_get_type (void)
{
- if (e_task_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ETaskShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) task_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ETaskShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) task_shell_backend_init,
- NULL /* value_table */
- };
-
- e_task_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "ETaskShellBackend", &type_info, 0);
- }
+ return task_shell_backend_type;
+}
- return e_task_shell_backend_type;
+void
+e_task_shell_backend_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ETaskShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) task_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ETaskShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) task_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ task_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "ETaskShellBackend", &type_info, 0);
}
ESourceList *
@@ -629,15 +628,3 @@ e_task_shell_backend_get_source_list (ETaskShellBackend *task_shell_backend)
return task_shell_backend->priv->source_list;
}
-
-void
-e_module_load (GTypeModule *type_module)
-{
- e_task_shell_backend_get_type (type_module);
- e_task_shell_view_get_type (type_module);
-}
-
-void
-e_module_unload (GTypeModule *type_module)
-{
-}
diff --git a/calendar/modules/e-task-shell-backend.h b/calendar/module/e-task-shell-backend.h
index 7326ea9f03..edb56f2986 100644
--- a/calendar/modules/e-task-shell-backend.h
+++ b/calendar/module/e-task-shell-backend.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_TASK_SHELL_BACKEND \
- (e_task_shell_backend_type)
+ (e_task_shell_backend_get_type ())
#define E_TASK_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackend))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_task_shell_backend_type;
-
typedef struct _ETaskShellBackend ETaskShellBackend;
typedef struct _ETaskShellBackendClass ETaskShellBackendClass;
typedef struct _ETaskShellBackendPrivate ETaskShellBackendPrivate;
@@ -61,7 +59,8 @@ struct _ETaskShellBackendClass {
EShellBackendClass parent_class;
};
-GType e_task_shell_backend_get_type
+GType e_task_shell_backend_get_type (void);
+void e_task_shell_backend_register_type
(GTypeModule *type_module);
ESourceList * e_task_shell_backend_get_source_list
(ETaskShellBackend *task_shell_backend);
diff --git a/calendar/modules/e-task-shell-content.c b/calendar/module/e-task-shell-content.c
index 5e98bf2f49..280bc7cf18 100644
--- a/calendar/modules/e-task-shell-content.c
+++ b/calendar/module/e-task-shell-content.c
@@ -75,6 +75,7 @@ static GtkTargetEntry drag_types[] = {
};
static gpointer parent_class;
+static GType task_shell_content_type;
static void
task_shell_content_display_view_cb (ETaskShellContent *task_shell_content,
@@ -592,28 +593,28 @@ task_shell_content_init (ETaskShellContent *task_shell_content)
GType
e_task_shell_content_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (ETaskShellContentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) task_shell_content_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ETaskShellContent),
- 0, /* n_preallocs */
- (GInstanceInitFunc) task_shell_content_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_CONTENT, "ETaskShellContent",
- &type_info, 0);
- }
+ return task_shell_content_type;
+}
- return type;
+void
+e_task_shell_content_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (ETaskShellContentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) task_shell_content_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ETaskShellContent),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) task_shell_content_init,
+ NULL /* value_table */
+ };
+
+ task_shell_content_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_CONTENT,
+ "ETaskShellContent", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-task-shell-content.h b/calendar/module/e-task-shell-content.h
index e6f64f7406..e749d61143 100644
--- a/calendar/modules/e-task-shell-content.h
+++ b/calendar/module/e-task-shell-content.h
@@ -29,7 +29,7 @@
#include <calendar/gui/e-calendar-table.h>
#include <calendar/gui/e-cal-component-preview.h>
-#include <widgets/menus/gal-view-instance.h>
+#include <menus/gal-view-instance.h>
/* Standard GObject macros */
#define E_TYPE_TASK_SHELL_CONTENT \
@@ -76,22 +76,24 @@ struct _ETaskShellContentClass {
};
GType e_task_shell_content_get_type (void);
-GtkWidget * e_task_shell_content_new (EShellView *shell_view);
+void e_task_shell_content_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_task_shell_content_new(EShellView *shell_view);
ECalModel * e_task_shell_content_get_task_model
- (ETaskShellContent *task_shell_content);
+ (ETaskShellContent *task_shell_content);
ECalComponentPreview *
e_task_shell_content_get_task_preview
- (ETaskShellContent *task_shell_content);
+ (ETaskShellContent *task_shell_content);
ECalendarTable *e_task_shell_content_get_task_table
- (ETaskShellContent *task_shell_content);
+ (ETaskShellContent *task_shell_content);
GalViewInstance *
e_task_shell_content_get_view_instance
- (ETaskShellContent *task_shell_content);
+ (ETaskShellContent *task_shell_content);
gboolean e_task_shell_content_get_preview_visible
- (ETaskShellContent *task_shell_content);
+ (ETaskShellContent *task_shell_content);
void e_task_shell_content_set_preview_visible
- (ETaskShellContent *task_shell_content,
- gboolean preview_visible);
+ (ETaskShellContent *task_shell_content,
+ gboolean preview_visible);
G_END_DECLS
diff --git a/calendar/modules/e-task-shell-migrate.c b/calendar/module/e-task-shell-migrate.c
index 76e53f765c..76e53f765c 100644
--- a/calendar/modules/e-task-shell-migrate.c
+++ b/calendar/module/e-task-shell-migrate.c
diff --git a/calendar/modules/e-task-shell-migrate.h b/calendar/module/e-task-shell-migrate.h
index 6853dd818c..6853dd818c 100644
--- a/calendar/modules/e-task-shell-migrate.h
+++ b/calendar/module/e-task-shell-migrate.h
diff --git a/calendar/modules/e-task-shell-sidebar.c b/calendar/module/e-task-shell-sidebar.c
index df6ae4eadf..f23a2be7b2 100644
--- a/calendar/modules/e-task-shell-sidebar.c
+++ b/calendar/module/e-task-shell-sidebar.c
@@ -60,6 +60,7 @@ enum {
static gpointer parent_class;
static guint signals[LAST_SIGNAL];
+static GType task_shell_sidebar_type;
static void
task_shell_sidebar_emit_client_added (ETaskShellSidebar *task_shell_sidebar,
@@ -562,28 +563,28 @@ task_shell_sidebar_init (ETaskShellSidebar *task_shell_sidebar)
GType
e_task_shell_sidebar_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (ETaskShellSidebarClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) task_shell_sidebar_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ETaskShellSidebar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) task_shell_sidebar_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_SIDEBAR, "ETaskShellSidebar",
- &type_info, 0);
- }
+ return task_shell_sidebar_type;
+}
- return type;
+void
+e_task_shell_sidebar_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (ETaskShellSidebarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) task_shell_sidebar_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ETaskShellSidebar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) task_shell_sidebar_init,
+ NULL /* value_table */
+ };
+
+ task_shell_sidebar_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_SIDEBAR,
+ "ETaskShellSidebar", &type_info, 0);
}
GtkWidget *
diff --git a/calendar/modules/e-task-shell-sidebar.h b/calendar/module/e-task-shell-sidebar.h
index 2d8fceaeb8..a6d7241105 100644
--- a/calendar/modules/e-task-shell-sidebar.h
+++ b/calendar/module/e-task-shell-sidebar.h
@@ -77,16 +77,20 @@ struct _ETaskShellSidebarClass {
};
GType e_task_shell_sidebar_get_type (void);
-GtkWidget * e_task_shell_sidebar_new (EShellView *shell_view);
-GList * e_task_shell_sidebar_get_clients(ETaskShellSidebar *task_shell_sidebar);
+void e_task_shell_sidebar_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_task_shell_sidebar_new(EShellView *shell_view);
+GList * e_task_shell_sidebar_get_clients
+ (ETaskShellSidebar *task_shell_sidebar);
ESourceSelector *
e_task_shell_sidebar_get_selector
- (ETaskShellSidebar *task_shell_sidebar);
-void e_task_shell_sidebar_add_source (ETaskShellSidebar *task_shell_sidebar,
- ESource *source);
+ (ETaskShellSidebar *task_shell_sidebar);
+void e_task_shell_sidebar_add_source
+ (ETaskShellSidebar *task_shell_sidebar,
+ ESource *source);
void e_task_shell_sidebar_remove_source
- (ETaskShellSidebar *task_shell_sidebar,
- ESource *source);
+ (ETaskShellSidebar *task_shell_sidebar,
+ ESource *source);
G_END_DECLS
diff --git a/calendar/modules/e-task-shell-view-actions.c b/calendar/module/e-task-shell-view-actions.c
index 5de630e7d0..5de630e7d0 100644
--- a/calendar/modules/e-task-shell-view-actions.c
+++ b/calendar/module/e-task-shell-view-actions.c
diff --git a/calendar/modules/e-task-shell-view-actions.h b/calendar/module/e-task-shell-view-actions.h
index 163a6400cd..163a6400cd 100644
--- a/calendar/modules/e-task-shell-view-actions.h
+++ b/calendar/module/e-task-shell-view-actions.h
diff --git a/calendar/modules/e-task-shell-view-private.c b/calendar/module/e-task-shell-view-private.c
index 926ace8aa6..58bda3d9bb 100644
--- a/calendar/modules/e-task-shell-view-private.c
+++ b/calendar/module/e-task-shell-view-private.c
@@ -21,7 +21,7 @@
#include "e-task-shell-view-private.h"
-#include <widgets/menus/gal-view-factory-etable.h>
+#include "widgets/menus/gal-view-factory-etable.h"
static void
task_shell_view_config_hide_completed_tasks_changed_cb (GConfClient *client,
diff --git a/calendar/modules/e-task-shell-view-private.h b/calendar/module/e-task-shell-view-private.h
index c613e9e9fe..c613e9e9fe 100644
--- a/calendar/modules/e-task-shell-view-private.h
+++ b/calendar/module/e-task-shell-view-private.h
diff --git a/calendar/modules/e-task-shell-view.c b/calendar/module/e-task-shell-view.c
index 5869be7a96..d2f7899ce6 100644
--- a/calendar/modules/e-task-shell-view.c
+++ b/calendar/module/e-task-shell-view.c
@@ -21,8 +21,8 @@
#include "e-task-shell-view-private.h"
-GType e_task_shell_view_type = 0;
static gpointer parent_class;
+static GType task_shell_view_type;
static void
task_shell_view_dispose (GObject *object)
@@ -228,27 +228,28 @@ task_shell_view_init (ETaskShellView *task_shell_view,
}
GType
-e_task_shell_view_get_type (GTypeModule *type_module)
+e_task_shell_view_get_type (void)
{
- if (e_task_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ETaskShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) task_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- type_module,
- sizeof (ETaskShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) task_shell_view_init,
- NULL /* value_table */
- };
-
- e_task_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "ETaskShellView", &type_info, 0);
- }
-
- return e_task_shell_view_type;
+ return task_shell_view_type;
+}
+
+void
+e_task_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ETaskShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) task_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ type_module,
+ sizeof (ETaskShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) task_shell_view_init,
+ NULL /* value_table */
+ };
+
+ task_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "ETaskShellView", &type_info, 0);
}
diff --git a/calendar/modules/e-task-shell-view.h b/calendar/module/e-task-shell-view.h
index c94864b4b9..8dca041e19 100644
--- a/calendar/modules/e-task-shell-view.h
+++ b/calendar/module/e-task-shell-view.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_TASK_SHELL_VIEW \
- (e_task_shell_view_type)
+ (e_task_shell_view_get_type ())
#define E_TASK_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_TASK_SHELL_VIEW, ETaskShellView))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_task_shell_view_type;
-
typedef struct _ETaskShellView ETaskShellView;
typedef struct _ETaskShellViewClass ETaskShellViewClass;
typedef struct _ETaskShellViewPrivate ETaskShellViewPrivate;
@@ -61,7 +59,8 @@ struct _ETaskShellViewClass {
EShellViewClass parent_class;
};
-GType e_task_shell_view_get_type (GTypeModule *type_module);
+GType e_task_shell_view_get_type (void);
+void e_task_shell_view_register_type (GTypeModule *type_module);
G_END_DECLS
diff --git a/calendar/module/evolution-module-calendar.c b/calendar/module/evolution-module-calendar.c
new file mode 100644
index 0000000000..b1d5f97744
--- /dev/null
+++ b/calendar/module/evolution-module-calendar.c
@@ -0,0 +1,65 @@
+/*
+ * evolution-module-calendar.c
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ *
+ */
+
+#include "e-cal-shell-backend.h"
+#include "e-cal-shell-content.h"
+#include "e-cal-shell-sidebar.h"
+#include "e-cal-shell-view.h"
+
+#include "e-memo-shell-backend.h"
+#include "e-memo-shell-content.h"
+#include "e-memo-shell-sidebar.h"
+#include "e-memo-shell-view.h"
+
+#include "e-task-shell-backend.h"
+#include "e-task-shell-content.h"
+#include "e-task-shell-sidebar.h"
+#include "e-task-shell-view.h"
+
+/* Module Entry Points */
+void e_module_load (GTypeModule *type_module);
+void e_module_unload (GTypeModule *type_module);
+
+void
+e_module_load (GTypeModule *type_module)
+{
+ /* Register dynamically loaded types. */
+
+ e_cal_shell_backend_register_type (type_module);
+ e_cal_shell_content_register_type (type_module);
+ e_cal_shell_sidebar_register_type (type_module);
+ e_cal_shell_view_register_type (type_module);
+
+ e_memo_shell_backend_register_type (type_module);
+ e_memo_shell_content_register_type (type_module);
+ e_memo_shell_sidebar_register_type (type_module);
+ e_memo_shell_view_register_type (type_module);
+
+ e_task_shell_backend_register_type (type_module);
+ e_task_shell_content_register_type (type_module);
+ e_task_shell_sidebar_register_type (type_module);
+ e_task_shell_view_register_type (type_module);
+}
+
+void
+e_module_unload (GTypeModule *type_module)
+{
+}