aboutsummaryrefslogtreecommitdiffstats
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
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.
-rw-r--r--addressbook/gui/component/Makefile.am49
-rw-r--r--addressbook/gui/component/e-book-shell-backend.c67
-rw-r--r--addressbook/gui/component/e-book-shell-backend.h7
-rw-r--r--addressbook/gui/component/e-book-shell-content.c46
-rw-r--r--addressbook/gui/component/e-book-shell-content.h34
-rw-r--r--addressbook/gui/component/e-book-shell-sidebar.c43
-rw-r--r--addressbook/gui/component/e-book-shell-sidebar.h10
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c6
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h2
-rw-r--r--addressbook/gui/component/e-book-shell-view.c45
-rw-r--r--addressbook/gui/component/e-book-shell-view.h9
-rw-r--r--addressbook/gui/component/evolution-module-addressbook.c45
-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
-rw-r--r--configure.in2
-rw-r--r--mail/Makefile.am5
-rw-r--r--mail/e-mail-shell-backend.c56
-rw-r--r--mail/e-mail-shell-backend.h7
-rw-r--r--mail/e-mail-shell-content.c62
-rw-r--r--mail/e-mail-shell-content.h30
-rw-r--r--mail/e-mail-shell-sidebar.c43
-rw-r--r--mail/e-mail-shell-sidebar.h6
-rw-r--r--mail/e-mail-shell-view-private.c2
-rw-r--r--mail/e-mail-shell-view.c45
-rw-r--r--mail/e-mail-shell-view.h10
-rw-r--r--mail/evolution-module-mail.c45
-rw-r--r--shell/test/Makefile.am9
-rw-r--r--shell/test/e-test-shell-backend.c61
-rw-r--r--shell/test/e-test-shell-backend.h10
-rw-r--r--shell/test/e-test-shell-view.c49
-rw-r--r--shell/test/e-test-shell-view.h9
-rw-r--r--shell/test/evolution-module-test.c41
79 files changed, 919 insertions, 791 deletions
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 4f89f823c7..e48ef4619e 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -20,35 +20,36 @@ INCLUDES = \
$(LDAP_CFLAGS) \
$(EVOLUTION_ADDRESSBOOK_CFLAGS)
-module_LTLIBRARIES = libevolution-module-contacts.la
-
-libevolution_module_contacts_la_SOURCES = \
- addressbook-config.c \
- addressbook-config.h \
- autocompletion-config.c \
- autocompletion-config.h \
- eab-composer-util.c \
- eab-composer-util.h \
- e-book-shell-backend.c \
- e-book-shell-backend.h \
- e-book-shell-content.c \
- e-book-shell-content.h \
- e-book-shell-migrate.c \
- e-book-shell-migrate.h \
- e-book-shell-sidebar.c \
- e-book-shell-sidebar.h \
- e-book-shell-view.c \
- e-book-shell-view.h \
- e-book-shell-view-actions.c \
- e-book-shell-view-actions.h \
- e-book-shell-view-private.c \
+module_LTLIBRARIES = libevolution-module-addressbook.la
+
+libevolution_module_addressbook_la_SOURCES = \
+ evolution-module-addressbook.c \
+ addressbook-config.c \
+ addressbook-config.h \
+ autocompletion-config.c \
+ autocompletion-config.h \
+ eab-composer-util.c \
+ eab-composer-util.h \
+ e-book-shell-backend.c \
+ e-book-shell-backend.h \
+ e-book-shell-content.c \
+ e-book-shell-content.h \
+ e-book-shell-migrate.c \
+ e-book-shell-migrate.h \
+ e-book-shell-sidebar.c \
+ e-book-shell-sidebar.h \
+ e-book-shell-view.c \
+ e-book-shell-view.h \
+ e-book-shell-view-actions.c \
+ e-book-shell-view-actions.h \
+ e-book-shell-view-private.c \
e-book-shell-view-private.h
if ENABLE_SMIME
SMIME_LIB=$(top_builddir)/smime/gui/libevolution-smime.la
endif
-libevolution_module_contacts_la_LIBADD = \
+libevolution_module_addressbook_la_LIBADD = \
$(SMIME_LIB) \
$(top_builddir)/e-util/libeutil.la \
$(top_builddir)/composer/libcomposer.la \
@@ -70,7 +71,7 @@ libevolution_module_contacts_la_LIBADD = \
$(EVOLUTION_ADDRESSBOOK_LIBS) $(LDAP_LIBS)
-libevolution_module_contacts_la_LDFLAGS = \
+libevolution_module_addressbook_la_LDFLAGS = \
-module -avoid-version $(NO_UNDEFINED)
# GConf schemas
diff --git a/addressbook/gui/component/e-book-shell-backend.c b/addressbook/gui/component/e-book-shell-backend.c
index 3e104c39f3..fd86d57e2a 100644
--- a/addressbook/gui/component/e-book-shell-backend.c
+++ b/addressbook/gui/component/e-book-shell-backend.c
@@ -39,9 +39,9 @@
#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
#include "addressbook/importers/evolution-addressbook-importers.h"
-#include <eab-config.h>
-#include <addressbook-config.h>
-#include <autocompletion-config.h>
+#include "eab-config.h"
+#include "addressbook-config.h"
+#include "autocompletion-config.h"
#include "e-book-shell-migrate.h"
#include "e-book-shell-view.h"
@@ -67,12 +67,8 @@ enum {
PROP_SOURCE_LIST
};
-/* Module Entry Points */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_book_shell_backend_type = 0;
static gpointer parent_class;
+static GType book_shell_backend_type;
static void
book_shell_backend_ensure_sources (EShellBackend *shell_backend)
@@ -544,29 +540,30 @@ book_shell_backend_init (EBookShellBackend *book_shell_backend)
}
GType
-e_book_shell_backend_get_type (GTypeModule *type_module)
+e_book_shell_backend_get_type (void)
{
- if (e_book_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EBookShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) book_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EBookShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) book_shell_backend_init,
- NULL /* value_table */
- };
-
- e_book_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "EBookShellBackend", &type_info, 0);
- }
+ return book_shell_backend_type;
+}
- return e_book_shell_backend_type;
+void
+e_book_shell_backend_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (EBookShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) book_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EBookShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) book_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ book_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "EBookShellBackend", &type_info, 0);
}
ESourceList *
@@ -577,15 +574,3 @@ e_book_shell_backend_get_source_list (EBookShellBackend *book_shell_backend)
return book_shell_backend->priv->source_list;
}
-
-void
-e_module_load (GTypeModule *type_module)
-{
- e_book_shell_backend_get_type (type_module);
- e_book_shell_view_get_type (type_module);
-}
-
-void
-e_module_unload (GTypeModule *type_module)
-{
-}
diff --git a/addressbook/gui/component/e-book-shell-backend.h b/addressbook/gui/component/e-book-shell-backend.h
index 9a5e744ae2..c3fde1c2a1 100644
--- a/addressbook/gui/component/e-book-shell-backend.h
+++ b/addressbook/gui/component/e-book-shell-backend.h
@@ -27,7 +27,7 @@
/* Standard GObject macros */
#define E_TYPE_BOOK_SHELL_BACKEND \
- (e_book_shell_backend_type)
+ (e_book_shell_backend_get_type ())
#define E_BOOK_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_BOOK_SHELL_BACKEND, EBookShellBackend))
@@ -46,8 +46,6 @@
G_BEGIN_DECLS
-extern GType e_book_shell_backend_type;
-
typedef struct _EBookShellBackend EBookShellBackend;
typedef struct _EBookShellBackendClass EBookShellBackendClass;
typedef struct _EBookShellBackendPrivate EBookShellBackendPrivate;
@@ -61,7 +59,8 @@ struct _EBookShellBackendClass {
EShellBackendClass parent_class;
};
-GType e_book_shell_backend_get_type
+GType e_book_shell_backend_get_type (void);
+void e_book_shell_backend_register_type
(GTypeModule *type_module);
ESourceList * e_book_shell_backend_get_source_list
(EBookShellBackend *book_shell_backend);
diff --git a/addressbook/gui/component/e-book-shell-content.c b/addressbook/gui/component/e-book-shell-content.c
index 8830c797e0..7f7b9483bb 100644
--- a/addressbook/gui/component/e-book-shell-content.c
+++ b/addressbook/gui/component/e-book-shell-content.c
@@ -22,7 +22,8 @@
#include "e-book-shell-content.h"
#include <glib/gi18n.h>
-#include <e-util/gconf-bridge.h>
+
+#include "e-util/gconf-bridge.h"
#define E_BOOK_SHELL_CONTENT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -42,6 +43,7 @@ enum {
};
static gpointer parent_class;
+static GType book_shell_view_type;
static void
book_shell_content_send_message_cb (EBookShellContent *book_shell_content,
@@ -296,28 +298,28 @@ book_shell_content_init (EBookShellContent *book_shell_content)
GType
e_book_shell_content_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EBookShellContentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) book_shell_content_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EBookShellContent),
- 0, /* n_preallocs */
- (GInstanceInitFunc) book_shell_content_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_CONTENT, "EBookShellContent",
- &type_info, 0);
- }
+ return book_shell_view_type;
+}
- return type;
+void
+e_book_shell_content_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EBookShellContentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) book_shell_content_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EBookShellContent),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) book_shell_content_init,
+ NULL /* value_table */
+ };
+
+ book_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_CONTENT,
+ "EBookShellContent", &type_info, 0);
}
GtkWidget *
diff --git a/addressbook/gui/component/e-book-shell-content.h b/addressbook/gui/component/e-book-shell-content.h
index e8fe856a86..a8f8271959 100644
--- a/addressbook/gui/component/e-book-shell-content.h
+++ b/addressbook/gui/component/e-book-shell-content.h
@@ -77,29 +77,33 @@ struct _EBookShellContentClass {
};
GType e_book_shell_content_get_type (void);
-GtkWidget * e_book_shell_content_new (EShellView *shell_view);
-void e_book_shell_content_insert_view(EBookShellContent *book_shell_content,
- EAddressbookView *addressbook_view);
-void e_book_shell_content_remove_view(EBookShellContent *book_shell_content,
- EAddressbookView *addressbook_view);
+void e_book_shell_content_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_book_shell_content_new(EShellView *shell_view);
+void e_book_shell_content_insert_view
+ (EBookShellContent *book_shell_content,
+ EAddressbookView *addressbook_view);
+void e_book_shell_content_remove_view
+ (EBookShellContent *book_shell_content,
+ EAddressbookView *addressbook_view);
EAddressbookView *
e_book_shell_content_get_current_view
- (EBookShellContent *book_shell_content);
+ (EBookShellContent *book_shell_content);
void e_book_shell_content_set_current_view
- (EBookShellContent *book_shell_content,
- EAddressbookView *addressbook_view);
+ (EBookShellContent *book_shell_content,
+ EAddressbookView *addressbook_view);
EContact * e_book_shell_content_get_preview_contact
- (EBookShellContent *book_shell_content);
+ (EBookShellContent *book_shell_content);
void e_book_shell_content_set_preview_contact
- (EBookShellContent *book_shell_content,
- EContact *preview_contact);
+ (EBookShellContent *book_shell_content,
+ EContact *preview_contact);
gboolean e_book_shell_content_get_preview_visible
- (EBookShellContent *book_shell_content);
+ (EBookShellContent *book_shell_content);
void e_book_shell_content_set_preview_visible
- (EBookShellContent *book_shell_content,
- gboolean preview_visible);
+ (EBookShellContent *book_shell_content,
+ gboolean preview_visible);
void e_book_shell_content_clipboard_copy
- (EBookShellContent *book_shell_content);
+ (EBookShellContent *book_shell_content);
G_END_DECLS
diff --git a/addressbook/gui/component/e-book-shell-sidebar.c b/addressbook/gui/component/e-book-shell-sidebar.c
index f804b5aeed..2a784e3b1d 100644
--- a/addressbook/gui/component/e-book-shell-sidebar.c
+++ b/addressbook/gui/component/e-book-shell-sidebar.c
@@ -42,6 +42,7 @@ enum {
};
static gpointer parent_class;
+static GType book_shell_sidebar_type;
static void
book_shell_sidebar_get_property (GObject *object,
@@ -187,28 +188,28 @@ book_shell_sidebar_init (EBookShellSidebar *book_shell_sidebar)
GType
e_book_shell_sidebar_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EBookShellSidebarClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) book_shell_sidebar_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EBookShellSidebar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) book_shell_sidebar_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_SIDEBAR, "EBookShellSidebar",
- &type_info, 0);
- }
+ return book_shell_sidebar_type;
+}
- return type;
+void
+e_book_shell_sidebar_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EBookShellSidebarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) book_shell_sidebar_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EBookShellSidebar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) book_shell_sidebar_init,
+ NULL /* value_table */
+ };
+
+ book_shell_sidebar_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_SIDEBAR,
+ "EBookShellSidebar", &type_info, 0);
}
GtkWidget *
diff --git a/addressbook/gui/component/e-book-shell-sidebar.h b/addressbook/gui/component/e-book-shell-sidebar.h
index 159c9c7afc..e2523f586b 100644
--- a/addressbook/gui/component/e-book-shell-sidebar.h
+++ b/addressbook/gui/component/e-book-shell-sidebar.h
@@ -24,8 +24,8 @@
#include <libedataserverui/e-source-selector.h>
-#include <e-shell-sidebar.h>
-#include <e-shell-view.h>
+#include <shell/e-shell-sidebar.h>
+#include <shell/e-shell-view.h>
/* Standard GObject macros */
#define E_TYPE_BOOK_SHELL_SIDEBAR \
@@ -67,10 +67,12 @@ struct _EBookShellSidebarClass {
};
GType e_book_shell_sidebar_get_type (void);
-GtkWidget * e_book_shell_sidebar_new (EShellView *shell_view);
+void e_book_shell_sidebar_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_book_shell_sidebar_new(EShellView *shell_view);
ESourceSelector *
e_book_shell_sidebar_get_selector
- (EBookShellSidebar *book_shell_sidebar);
+ (EBookShellSidebar *book_shell_sidebar);
G_END_DECLS
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index 5f9bb4c5db..cdb8c8fbe4 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -21,10 +21,10 @@
#include "e-book-shell-view-private.h"
-#include <gal-view-factory-etable.h>
-#include <gal-view-factory-minicard.h>
+#include "widgets/menus/gal-view-factory-etable.h"
+#include "addressbook/gui/widgets/gal-view-factory-minicard.h"
-#include <addressbook.h>
+#include "addressbook.h"
static void
open_contact (EBookShellView *book_shell_view,
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index f93b720ccc..628c1c2b09 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -35,7 +35,7 @@
#include "e-util/gconf-bridge.h"
#include "shell/e-shell-content.h"
#include "shell/e-shell-sidebar.h"
-#include "widgets/misc/e-popup-action.h"
+#include "misc/e-popup-action.h"
#include "addressbook/gui/contact-editor/e-contact-editor.h"
#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
diff --git a/addressbook/gui/component/e-book-shell-view.c b/addressbook/gui/component/e-book-shell-view.c
index 7520c1e304..44c06be9a3 100644
--- a/addressbook/gui/component/e-book-shell-view.c
+++ b/addressbook/gui/component/e-book-shell-view.c
@@ -21,8 +21,8 @@
#include "e-book-shell-view-private.h"
-GType e_book_shell_view_type = 0;
static gpointer parent_class;
+static GType book_shell_view_type;
static void
book_shell_view_source_list_changed_cb (EBookShellView *book_shell_view,
@@ -291,27 +291,28 @@ book_shell_view_init (EBookShellView *book_shell_view,
}
GType
-e_book_shell_view_get_type (GTypeModule *type_module)
+e_book_shell_view_get_type (void)
{
- if (e_book_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EBookShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) book_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EBookShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) book_shell_view_init,
- NULL /* value_table */
- };
-
- e_book_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "EBookShellView", &type_info, 0);
- }
+ return book_shell_view_type;
+}
- return e_book_shell_view_type;
+void
+e_book_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (EBookShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) book_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EBookShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) book_shell_view_init,
+ NULL /* value_table */
+ };
+
+ book_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "EBookShellView", &type_info, 0);
}
diff --git a/addressbook/gui/component/e-book-shell-view.h b/addressbook/gui/component/e-book-shell-view.h
index c0b5a44c38..3cefba8179 100644
--- a/addressbook/gui/component/e-book-shell-view.h
+++ b/addressbook/gui/component/e-book-shell-view.h
@@ -22,11 +22,11 @@
#ifndef E_BOOK_SHELL_VIEW_H
#define E_BOOK_SHELL_VIEW_H
-#include <e-shell-view.h>
+#include <shell/e-shell-view.h>
/* Standard GObject macros */
#define E_TYPE_BOOK_SHELL_VIEW \
- (e_book_shell_view_type)
+ (e_book_shell_view_get_type ())
#define E_BOOK_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_BOOK_SHELL_VIEW, EBookShellView))
@@ -45,8 +45,6 @@
G_BEGIN_DECLS
-extern GType e_book_shell_view_type;
-
typedef struct _EBookShellView EBookShellView;
typedef struct _EBookShellViewClass EBookShellViewClass;
typedef struct _EBookShellViewPrivate EBookShellViewPrivate;
@@ -60,7 +58,8 @@ struct _EBookShellViewClass {
EShellViewClass parent_class;
};
-GType e_book_shell_view_get_type (GTypeModule *type_module);
+GType e_book_shell_view_get_type (void);
+void e_book_shell_view_register_type (GTypeModule *type_module);
G_END_DECLS
diff --git a/addressbook/gui/component/evolution-module-addressbook.c b/addressbook/gui/component/evolution-module-addressbook.c
new file mode 100644
index 0000000000..fb33f7d9a0
--- /dev/null
+++ b/addressbook/gui/component/evolution-module-addressbook.c
@@ -0,0 +1,45 @@
+/*
+ * evolution-module-addressbook.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-book-shell-backend.h"
+#include "e-book-shell-content.h"
+#include "e-book-shell-sidebar.h"
+#include "e-book-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_book_shell_backend_register_type (type_module);
+ e_book_shell_content_register_type (type_module);
+ e_book_shell_sidebar_register_type (type_module);
+ e_book_shell_view_register_type (type_module);
+}
+
+void
+e_module_unload (GTypeModule *type_module)
+{
+}
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)
+{
+}
diff --git a/configure.in b/configure.in
index 8ad2503e4c..b174c9e0b6 100644
--- a/configure.in
+++ b/configure.in
@@ -2084,7 +2084,7 @@ calendar/conduits/memo/Makefile
calendar/gui/Makefile
calendar/gui/alarm-notify/Makefile
calendar/gui/dialogs/Makefile
-calendar/modules/Makefile
+calendar/module/Makefile
composer/Makefile
mail/Makefile
mail/default/Makefile
diff --git a/mail/Makefile.am b/mail/Makefile.am
index e290e4cb5d..11ee7f5edc 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -35,6 +35,7 @@ module_LTLIBRARIES = \
libevolution-module-mail.la
libevolution_module_mail_la_SOURCES = \
+ evolution-module-mail.c \
e-attachment-handler-mail.c \
e-attachment-handler-mail.h \
e-mail-attachment-bar.c \
@@ -208,8 +209,8 @@ endif
# $(REGEX_LIBS) \
# $(THREADS_LIBS)
-#libevolution_mail_la_LDFLAGS = \
-# -avoid-version -module $(NO_UNDEFINED)
+libevolution_module_mail_la_LDFLAGS = \
+ -avoid-version -module $(NO_UNDEFINED)
#libevolution_mail_la_DEPENDENCIES = em-filter-i18n.h
diff --git a/mail/e-mail-shell-backend.c b/mail/e-mail-shell-backend.c
index 0d0521ebc0..8b5f6542c7 100644
--- a/mail/e-mail-shell-backend.c
+++ b/mail/e-mail-shell-backend.c
@@ -38,6 +38,7 @@
#include "e-mail-shell-migrate.h"
#include "e-mail-shell-settings.h"
+#include "e-mail-shell-sidebar.h"
#include "e-mail-shell-view.h"
#include "e-attachment-handler-mail.h"
@@ -104,12 +105,8 @@ struct _EMailShellBackendPrivate {
guint mail_sync_timeout_source_id;
};
-/* Module Entry Points */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_mail_shell_backend_type = 0;
static gpointer parent_class;
+static GType mail_shell_backend_type;
/* The array elements correspond to EMailFolderType. */
static struct {
@@ -1031,41 +1028,30 @@ mail_shell_backend_init (EMailShellBackend *mail_shell_backend)
}
GType
-e_mail_shell_backend_get_type (GTypeModule *type_module)
-{
- if (e_mail_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EMailShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mail_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMailShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mail_shell_backend_init,
- NULL /* value_table */
- };
-
- e_mail_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "EMailShellBackend", &type_info, 0);
- }
-
- return e_mail_shell_backend_type;
-}
-
-void
-e_module_load (GTypeModule *type_module)
+e_mail_shell_backend_get_type (void)
{
- e_mail_shell_backend_get_type (type_module);
- e_mail_shell_view_get_type (type_module);
+ return mail_shell_backend_type;
}
void
-e_module_unload (GTypeModule *type_module)
+e_mail_shell_backend_register_type (GTypeModule *type_module)
{
+ const GTypeInfo type_info = {
+ sizeof (EMailShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mail_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMailShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) mail_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ mail_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "EMailShellBackend", &type_info, 0);
}
/******************************** Public API *********************************/
diff --git a/mail/e-mail-shell-backend.h b/mail/e-mail-shell-backend.h
index fdf8ec6f76..7521559b23 100644
--- a/mail/e-mail-shell-backend.h
+++ b/mail/e-mail-shell-backend.h
@@ -31,7 +31,7 @@
/* Standard GObject macros */
#define E_TYPE_MAIL_SHELL_BACKEND \
- (e_mail_shell_backend_type)
+ (e_mail_shell_backend_get_type ())
#define E_MAIL_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_MAIL_SHELL_BACKEND, EMailShellBackend))
@@ -50,8 +50,6 @@
G_BEGIN_DECLS
-extern GType e_mail_shell_backend_type;
-
typedef struct _EMailShellBackend EMailShellBackend;
typedef struct _EMailShellBackendClass EMailShellBackendClass;
typedef struct _EMailShellBackendPrivate EMailShellBackendPrivate;
@@ -83,7 +81,8 @@ struct _EMFolderTreeModel;
* directory and local folders is too much of a pain for now. */
extern EMailShellBackend *global_mail_shell_backend;
-GType e_mail_shell_backend_get_type
+GType e_mail_shell_backend_get_type (void);
+void e_mail_shell_backend_register_type
(GTypeModule *type_module);
CamelFolder * e_mail_shell_backend_get_folder
(EMailShellBackend *mail_shell_backend,
diff --git a/mail/e-mail-shell-content.c b/mail/e-mail-shell-content.c
index 50bf0471bb..de07873dc2 100644
--- a/mail/e-mail-shell-content.c
+++ b/mail/e-mail-shell-content.c
@@ -78,6 +78,7 @@ enum {
};
static gpointer parent_class;
+static GType mail_shell_content_type;
static void
mail_shell_content_etree_unfreeze (MessageList *message_list,
@@ -677,37 +678,38 @@ mail_shell_content_init (EMailShellContent *mail_shell_content)
GType
e_mail_shell_content_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMailShellContentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mail_shell_content_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMailShellContent),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mail_shell_content_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo iface_info = {
- (GInterfaceInitFunc) mail_shell_content_iface_init,
- (GInterfaceFinalizeFunc) NULL,
- NULL /* interface_data */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_CONTENT, "EMailShellContent",
- &type_info, 0);
-
- g_type_add_interface_static (
- type, E_TYPE_MAIL_READER, &iface_info);
- }
+ return mail_shell_content_type;
+}
- return type;
+void
+e_mail_shell_content_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EMailShellContentClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mail_shell_content_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMailShellContent),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) mail_shell_content_init,
+ NULL /* value_table */
+ };
+
+ static const GInterfaceInfo iface_info = {
+ (GInterfaceInitFunc) mail_shell_content_iface_init,
+ (GInterfaceFinalizeFunc) NULL,
+ NULL /* interface_data */
+ };
+
+ mail_shell_content_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_CONTENT,
+ "EMailShellContent", &type_info, 0);
+
+ g_type_module_add_interface (
+ type_module, mail_shell_content_type,
+ E_TYPE_MAIL_READER, &iface_info);
}
GtkWidget *
diff --git a/mail/e-mail-shell-content.h b/mail/e-mail-shell-content.h
index 485a9a8233..2c5da1b27f 100644
--- a/mail/e-mail-shell-content.h
+++ b/mail/e-mail-shell-content.h
@@ -25,7 +25,7 @@
#include <shell/e-shell-content.h>
#include <shell/e-shell-view.h>
-#include "em-format-html-display.h"
+#include <mail/em-format-html-display.h>
/* Standard GObject macros */
#define E_TYPE_MAIL_SHELL_CONTENT \
@@ -62,30 +62,32 @@ struct _EMailShellContentClass {
};
GType e_mail_shell_content_get_type (void);
-GtkWidget * e_mail_shell_content_new (EShellView *shell_view);
+void e_mail_shell_content_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_mail_shell_content_new(EShellView *shell_view);
gboolean e_mail_shell_content_get_preview_visible
- (EMailShellContent *mail_shell_content);
+ (EMailShellContent *mail_shell_content);
void e_mail_shell_content_set_preview_visible
- (EMailShellContent *mail_shell_content,
+ (EMailShellContent *mail_shell_content,
gboolean preview_visible);
gboolean e_mail_shell_content_get_show_deleted
- (EMailShellContent *mail_shell_content);
+ (EMailShellContent *mail_shell_content);
void e_mail_shell_content_set_show_deleted
- (EMailShellContent *mail_shell_content,
- gboolean show_deleted);
+ (EMailShellContent *mail_shell_content,
+ gboolean show_deleted);
gboolean e_mail_shell_content_get_vertical_view
- (EMailShellContent *mail_shell_content);
+ (EMailShellContent *mail_shell_content);
void e_mail_shell_content_set_vertical_view
- (EMailShellContent *mail_shell_content,
- gboolean vertical_view);
+ (EMailShellContent *mail_shell_content,
+ gboolean vertical_view);
GalViewInstance *
e_mail_shell_content_get_view_instance
- (EMailShellContent *mail_shell_content);
+ (EMailShellContent *mail_shell_content);
void e_mail_shell_content_set_search_strings
- (EMailShellContent *mail_shell_content,
- GSList *search_strings);
+ (EMailShellContent *mail_shell_content,
+ GSList *search_strings);
void e_mail_shell_content_update_view_instance
- (EMailShellContent *mail_shell_content);
+ (EMailShellContent *mail_shell_content);
G_END_DECLS
diff --git a/mail/e-mail-shell-sidebar.c b/mail/e-mail-shell-sidebar.c
index 0429cdabf9..6f6bdf7bf8 100644
--- a/mail/e-mail-shell-sidebar.c
+++ b/mail/e-mail-shell-sidebar.c
@@ -43,6 +43,7 @@ enum {
};
static gpointer parent_class;
+static GType mail_shell_sidebar_type;
static void
mail_shell_sidebar_selection_changed_cb (EShellSidebar *shell_sidebar,
@@ -302,28 +303,28 @@ mail_shell_sidebar_init (EMailShellSidebar *mail_shell_sidebar)
GType
e_mail_shell_sidebar_get_type (void)
{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMailShellSidebarClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mail_shell_sidebar_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMailShellSidebar),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mail_shell_sidebar_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SHELL_SIDEBAR, "EMailShellSidebar",
- &type_info, 0);
- }
+ return mail_shell_sidebar_type;
+}
- return type;
+void
+e_mail_shell_sidebar_register_type (GTypeModule *type_module)
+{
+ static const GTypeInfo type_info = {
+ sizeof (EMailShellSidebarClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mail_shell_sidebar_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMailShellSidebar),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) mail_shell_sidebar_init,
+ NULL /* value_table */
+ };
+
+ mail_shell_sidebar_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_SIDEBAR,
+ "EMailShellSidebar", &type_info, 0);
}
GtkWidget *
diff --git a/mail/e-mail-shell-sidebar.h b/mail/e-mail-shell-sidebar.h
index e53c803db0..5075225fc4 100644
--- a/mail/e-mail-shell-sidebar.h
+++ b/mail/e-mail-shell-sidebar.h
@@ -70,9 +70,11 @@ struct _EMailShellSidebarClass {
};
GType e_mail_shell_sidebar_get_type (void);
-GtkWidget * e_mail_shell_sidebar_new (EShellView *shell_view);
+void e_mail_shell_sidebar_register_type
+ (GTypeModule *type_module);
+GtkWidget * e_mail_shell_sidebar_new(EShellView *shell_view);
EMFolderTree * e_mail_shell_sidebar_get_folder_tree
- (EMailShellSidebar *mail_shell_sidebar);
+ (EMailShellSidebar *mail_shell_sidebar);
G_END_DECLS
diff --git a/mail/e-mail-shell-view-private.c b/mail/e-mail-shell-view-private.c
index 615001ecb2..552ff1aff7 100644
--- a/mail/e-mail-shell-view-private.c
+++ b/mail/e-mail-shell-view-private.c
@@ -21,7 +21,7 @@
#include "e-mail-shell-view-private.h"
-#include <widgets/menus/gal-view-factory-etable.h>
+#include "widgets/menus/gal-view-factory-etable.h"
static void
mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view,
diff --git a/mail/e-mail-shell-view.c b/mail/e-mail-shell-view.c
index 6f4e6f9b88..f58d1f6288 100644
--- a/mail/e-mail-shell-view.c
+++ b/mail/e-mail-shell-view.c
@@ -21,8 +21,8 @@
#include "e-mail-shell-view-private.h"
-GType e_mail_shell_view_type = 0;
static gpointer parent_class;
+static GType mail_shell_view_type;
static void
mail_shell_view_dispose (GObject *object)
@@ -233,27 +233,28 @@ mail_shell_view_init (EMailShellView *mail_shell_view,
}
GType
-e_mail_shell_view_get_type (GTypeModule *type_module)
+e_mail_shell_view_get_type (void)
{
- if (e_mail_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (EMailShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) mail_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMailShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mail_shell_view_init,
- NULL /* value_table */
- };
-
- e_mail_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "EMailShellView", &type_info, 0);
- }
+ return mail_shell_view_type;
+}
- return e_mail_shell_view_type;
+void
+e_mail_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (EMailShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) mail_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EMailShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) mail_shell_view_init,
+ NULL /* value_table */
+ };
+
+ mail_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "EMailShellView", &type_info, 0);
}
diff --git a/mail/e-mail-shell-view.h b/mail/e-mail-shell-view.h
index 2c5a3642ab..2bc769557c 100644
--- a/mail/e-mail-shell-view.h
+++ b/mail/e-mail-shell-view.h
@@ -24,12 +24,9 @@
#include <shell/e-shell-view.h>
-#include <e-mail-shell-content.h>
-#include <e-mail-shell-sidebar.h>
-
/* Standard GObject macros */
#define E_TYPE_MAIL_SHELL_VIEW \
- (e_mail_shell_view_type)
+ (e_mail_shell_view_get_type ())
#define E_MAIL_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_MAIL_SHELL_VIEW, EMailShellView))
@@ -48,8 +45,6 @@
G_BEGIN_DECLS
-extern GType e_mail_shell_view_type;
-
typedef struct _EMailShellView EMailShellView;
typedef struct _EMailShellViewClass EMailShellViewClass;
typedef struct _EMailShellViewPrivate EMailShellViewPrivate;
@@ -63,7 +58,8 @@ struct _EMailShellViewClass {
EShellViewClass parent_class;
};
-GType e_mail_shell_view_get_type
+GType e_mail_shell_view_get_type (void);
+void e_mail_shell_view_register_type
(GTypeModule *type_module);
gboolean e_mail_shell_view_get_show_deleted
(EMailShellView *mail_shell_view);
diff --git a/mail/evolution-module-mail.c b/mail/evolution-module-mail.c
new file mode 100644
index 0000000000..6f6c956202
--- /dev/null
+++ b/mail/evolution-module-mail.c
@@ -0,0 +1,45 @@
+/*
+ * evolution-module-mail.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-mail-shell-backend.h"
+#include "e-mail-shell-content.h"
+#include "e-mail-shell-sidebar.h"
+#include "e-mail-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_mail_shell_backend_register_type (type_module);
+ e_mail_shell_content_register_type (type_module);
+ e_mail_shell_sidebar_register_type (type_module);
+ e_mail_shell_view_register_type (type_module);
+}
+
+void
+e_module_unload (GTypeModule *type_module)
+{
+}
diff --git a/shell/test/Makefile.am b/shell/test/Makefile.am
index 3b98d1b9ce..7982e29f17 100644
--- a/shell/test/Makefile.am
+++ b/shell/test/Makefile.am
@@ -1,4 +1,4 @@
-module_LTLIBRARIES = libevolution-test.la
+module_LTLIBRARIES = libevolution-module-test.la
INCLUDES = \
-I$(top_srcdir)/shell \
@@ -9,17 +9,18 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"evolution-test\" \
$(EVOLUTION_TEST_CFLAGS)
-libevolution_test_la_SOURCES = \
+libevolution_module_test_la_SOURCES = \
+ evolution-module-test.c \
e-test-shell-backend.c \
e-test-shell-backend.h \
e-test-shell-view.c \
e-test-shell-view.h
-libevolution_test_la_LIBADD = \
+libevolution_module_test_la_LIBADD = \
$(top_builddir)/shell/libeshell.la \
$(EVOLUTION_TEST_LIBS)
-libevolution_test_la_LDFLAGS = \
+libevolution_module_test_la_LDFLAGS = \
-avoid-version -module $(NO_UNDEFINED)
-include $(top_srcdir)/git.mk
diff --git a/shell/test/e-test-shell-backend.c b/shell/test/e-test-shell-backend.c
index cdceb603d1..0fc6c203aa 100644
--- a/shell/test/e-test-shell-backend.c
+++ b/shell/test/e-test-shell-backend.c
@@ -23,8 +23,8 @@
#include <glib/gi18n.h>
-#include <e-shell.h>
-#include <e-shell-window.h>
+#include "shell/e-shell.h"
+#include "shell/e-shell-window.h"
#include "e-test-shell-view.h"
@@ -36,12 +36,8 @@ struct _ETestShellBackendPrivate {
gint placeholder;
};
-/* Module Entry Point */
-void e_module_load (GTypeModule *type_module);
-void e_module_unload (GTypeModule *type_module);
-
-GType e_test_shell_backend_type = 0;
static gpointer parent_class;
+static GType test_shell_backend_type;
static void
action_test_item_new_cb (GtkAction *action,
@@ -217,39 +213,28 @@ test_shell_backend_init (ETestShellBackend *test_shell_backend)
}
GType
-e_test_shell_backend_get_type (GTypeModule *type_module)
-{
- if (e_test_shell_backend_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ETestShellBackendClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) test_shell_backend_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ETestShellBackend),
- 0, /* n_preallocs */
- (GInstanceInitFunc) test_shell_backend_init,
- NULL /* value_table */
- };
-
- e_test_shell_backend_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_BACKEND,
- "ETestShellBackend", &type_info, 0);
- }
-
- return e_test_shell_backend_type;
-}
-
-void
-e_module_load (GTypeModule *type_module)
+e_test_shell_backend_get_type (void)
{
- e_test_shell_backend_get_type (type_module);
- e_test_shell_view_get_type (type_module);
+ return test_shell_backend_type;
}
void
-e_module_unload (GTypeModule *type_module)
-{
+e_test_shell_backend_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ETestShellBackendClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) test_shell_backend_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (ETestShellBackend),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) test_shell_backend_init,
+ NULL /* value_table */
+ };
+
+ test_shell_backend_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_BACKEND,
+ "ETestShellBackend", &type_info, 0);
}
diff --git a/shell/test/e-test-shell-backend.h b/shell/test/e-test-shell-backend.h
index ccb04be7c2..0768e48a8f 100644
--- a/shell/test/e-test-shell-backend.h
+++ b/shell/test/e-test-shell-backend.h
@@ -1,5 +1,5 @@
/*
- * e-test-shell-backend.c
+ * e-test-shell-backend.h
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,7 +26,7 @@
/* Standard GObject macros */
#define E_TYPE_TEST_SHELL_BACKEND \
- (e_test_shell_backend_type)
+ (e_test_shell_backend_get_type ())
#define E_TEST_SHELL_BACKEND(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_TEST_SHELL_BACKEND, ETestShellBackend))
@@ -45,8 +45,6 @@
G_BEGIN_DECLS
-extern GType e_test_shell_backend_type;
-
typedef struct _ETestShellBackend ETestShellBackend;
typedef struct _ETestShellBackendClass ETestShellBackendClass;
typedef struct _ETestShellBackendPrivate ETestShellBackendPrivate;
@@ -60,7 +58,9 @@ struct _ETestShellBackendClass {
EShellBackendClass parent_class;
};
-GType e_test_shell_backend_get_type (GTypeModule *type_module);
+GType e_test_shell_backend_get_type (void);
+void e_test_shell_backend_register_type
+ (GTypeModule *type_module);
G_END_DECLS
diff --git a/shell/test/e-test-shell-view.c b/shell/test/e-test-shell-view.c
index a7326af687..f05abfff06 100644
--- a/shell/test/e-test-shell-view.c
+++ b/shell/test/e-test-shell-view.c
@@ -21,8 +21,8 @@
#include "e-test-shell-view.h"
-#include <e-shell-content.h>
-#include <e-shell-sidebar.h>
+#include "shell/e-shell-content.h"
+#include "shell/e-shell-sidebar.h"
#define E_TEST_SHELL_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -32,8 +32,8 @@ struct _ETestShellViewPrivate {
EActivity *activity;
};
-GType e_test_shell_view_type = 0;
static gpointer parent_class;
+static GType test_shell_view_type;
static void
test_shell_view_toggled (EShellView *shell_view)
@@ -128,27 +128,28 @@ test_shell_view_init (ETestShellView *test_shell_view)
}
GType
-e_test_shell_view_get_type (GTypeModule *type_module)
+e_test_shell_view_get_type (void)
{
- if (e_test_shell_view_type == 0) {
- const GTypeInfo type_info = {
- sizeof (ETestShellViewClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) test_shell_view_class_init,
- (GClassFinalizeFunc) NULL,
- type_module,
- sizeof (ETestShellView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) test_shell_view_init,
- NULL /* value_table */
- };
-
- e_test_shell_view_type =
- g_type_module_register_type (
- type_module, E_TYPE_SHELL_VIEW,
- "ETestShellView", &type_info, 0);
- }
+ return test_shell_view_type;
+}
- return e_test_shell_view_type;
+void
+e_test_shell_view_register_type (GTypeModule *type_module)
+{
+ const GTypeInfo type_info = {
+ sizeof (ETestShellViewClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) test_shell_view_class_init,
+ (GClassFinalizeFunc) NULL,
+ type_module,
+ sizeof (ETestShellView),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) test_shell_view_init,
+ NULL /* value_table */
+ };
+
+ test_shell_view_type = g_type_module_register_type (
+ type_module, E_TYPE_SHELL_VIEW,
+ "ETestShellView", &type_info, 0);
}
diff --git a/shell/test/e-test-shell-view.h b/shell/test/e-test-shell-view.h
index df1098ae56..b84fba9c44 100644
--- a/shell/test/e-test-shell-view.h
+++ b/shell/test/e-test-shell-view.h
@@ -22,11 +22,11 @@
#ifndef E_TEST_SHELL_VIEW_H
#define E_TEST_SHELL_VIEW_H
-#include <e-shell-view.h>
+#include <shell/e-shell-view.h>
/* Standard GObject macros */
#define E_TYPE_TEST_SHELL_VIEW \
- (e_test_shell_view_type)
+ (e_test_shell_view_get_type ())
#define E_TEST_SHELL_VIEW(obj) \
(G_TYPE_CHECK_INSTANCE_CAST \
((obj), E_TYPE_TEST_SHELL_VIEW, ETestShellView))
@@ -45,8 +45,6 @@
G_BEGIN_DECLS
-extern GType e_test_shell_view_type;
-
typedef struct _ETestShellView ETestShellView;
typedef struct _ETestShellViewClass ETestShellViewClass;
typedef struct _ETestShellViewPrivate ETestShellViewPrivate;
@@ -60,7 +58,8 @@ struct _ETestShellViewClass {
EShellViewClass parent_class;
};
-GType e_test_shell_view_get_type (GTypeModule *type_module);
+GType e_test_shell_view_get_type (void);
+void e_test_shell_view_register_type (GTypeModule *type_module);
G_END_DECLS
diff --git a/shell/test/evolution-module-test.c b/shell/test/evolution-module-test.c
new file mode 100644
index 0000000000..5f3bb26997
--- /dev/null
+++ b/shell/test/evolution-module-test.c
@@ -0,0 +1,41 @@
+/*
+ * evolution-module-test.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-test-shell-backend.h"
+#include "e-test-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_test_shell_backend_register_type (type_module);
+ e_test_shell_view_register_type (type_module);
+}
+
+void
+e_module_unload (GTypeModule *type_module)
+{
+}