aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-backend.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-01 00:53:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-01 00:53:52 +0800
commitf5991437c3e620708f1701310bd1e67b40ca3b42 (patch)
treeb8fbe876e5c5eb0dd0e96d6505aabe898b09c6fb /modules/mail/e-mail-shell-backend.c
parentcd0112576878cb5de3930835ff09f1562e9f5c10 (diff)
downloadgsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar.gz
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar.bz2
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar.lz
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar.xz
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.tar.zst
gsoc2013-evolution-f5991437c3e620708f1701310bd1e67b40ca3b42.zip
Get EConfig and EEvent hooks working again.
There were a number of problems: - Walk the GType tree to find EPluginHook subclasses, instead of just registering the immediate children. - Some EConfig and EEvent subclasses were not being configured properly (particularly the mail and calendar subclasses). - Add preference window pages after the main loop starts to make sure all plugins and plugin hooks are installed first.
Diffstat (limited to 'modules/mail/e-mail-shell-backend.c')
-rw-r--r--modules/mail/e-mail-shell-backend.c13
1 files changed, 9 insertions, 4 deletions
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