aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-config-hook.c8
-rw-r--r--modules/mail/e-mail-event-hook.c8
-rw-r--r--modules/mail/e-mail-shell-backend.c13
3 files changed, 21 insertions, 8 deletions
diff --git a/modules/mail/e-mail-config-hook.c b/modules/mail/e-mail-config-hook.c
index 4b37a6b171..def986f1c2 100644
--- a/modules/mail/e-mail-config-hook.c
+++ b/modules/mail/e-mail-config-hook.c
@@ -36,11 +36,15 @@ static const EConfigHookTargetMap targets[] = {
};
static void
-mail_config_hook_class_init (EPluginHookClass *class)
+mail_config_hook_class_init (EConfigHookClass *class)
{
+ EPluginHookClass *plugin_hook_class;
gint ii;
- class->id = "org.gnome.evolution.mail.config:1.0";
+ plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
+ plugin_hook_class->id = "org.gnome.evolution.mail.config:1.0";
+
+ class->config_class = g_type_class_ref (em_config_get_type ());
for (ii = 0; targets[ii].type != NULL; ii++)
e_config_hook_class_add_target_map (
diff --git a/modules/mail/e-mail-event-hook.c b/modules/mail/e-mail-event-hook.c
index a6be6d294f..becc80624e 100644
--- a/modules/mail/e-mail-event-hook.c
+++ b/modules/mail/e-mail-event-hook.c
@@ -60,11 +60,15 @@ static const EEventHookTargetMap targets[] = {
};
static void
-mail_event_hook_class_init (EPluginHookClass *class)
+mail_event_hook_class_init (EEventHookClass *class)
{
+ EPluginHookClass *plugin_hook_class;
gint ii;
- class->id = "org.gnome.evolution.mail.events:1.0";
+ plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
+ plugin_hook_class->id = "org.gnome.evolution.mail.events:1.0";
+
+ class->event = (EEvent *) em_event_peek ();
for (ii = 0; targets[ii].type != NULL; ii++)
e_event_hook_class_add_target_map (
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index fd1e7263c4..fd99edcfa0 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -187,12 +187,14 @@ static GtkActionEntry source_entries[] = {
G_CALLBACK (action_mail_folder_new_cb) }
};
-static void
+static gboolean
mail_shell_backend_init_preferences (EShell *shell)
{
EAccountList *account_list;
GtkWidget *preferences_window;
+ /* This is a main loop idle callback. */
+
account_list = e_get_account_list ();
preferences_window = e_shell_get_preferences_window (shell);
@@ -227,6 +229,8 @@ mail_shell_backend_init_preferences (EShell *shell)
_("Network Preferences"),
em_network_prefs_new (),
500);
+
+ return FALSE;
}
static void
@@ -848,10 +852,11 @@ mail_shell_backend_constructed (GObject *object)
data_dir = e_shell_backend_get_data_dir (shell_backend);
e_mail_store_init (data_dir);
- /* Initialize settings before initializing preferences,
- * since the preferences bind to the shell settings. */
e_mail_shell_settings_init (shell);
- mail_shell_backend_init_preferences (shell);
+
+ /* Initialize preferences after the main loop starts so
+ * that all EPlugins and EPluginHooks are loaded first. */
+ g_idle_add ((GSourceFunc) mail_shell_backend_init_preferences, shell);
}
static void