aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2010-08-11 04:17:40 +0800
committerMichael Meeks <michael.meeks@novell.com>2010-08-11 04:17:40 +0800
commit18813ccd8f4367ac98348f08e183d858cfe963f5 (patch)
tree370b866001d65bd5d1c343331bd01d8d4df3f975 /modules/calendar
parentabd3e2a257586a96cac80f9ac860bba3c3d65d30 (diff)
downloadgsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.gz
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.bz2
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.lz
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.xz
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.tar.zst
gsoc2013-evolution-18813ccd8f4367ac98348f08e183d858cfe963f5.zip
Defer the load / creation of configuration UI with changes to
e_preferences_window to take factory callbacks and store a reference to the shell. - This makes start-up substantially faster, particularly on Atom (eg.). Remove a number of idle handlers used to create these UIs in the first instance, cleaning the code.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-backend.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index cab1f2fa3d..8861a82cf3 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -442,26 +442,6 @@ cal_shell_backend_init_importers (void)
}
static gboolean
-cal_shell_backend_init_preferences (EShell *shell)
-{
- GtkWidget *preferences_window;
-
- /* This is a main loop idle callback. */
-
- preferences_window = e_shell_get_preferences_window (shell);
-
- e_preferences_window_add_page (
- E_PREFERENCES_WINDOW (preferences_window),
- "calendar-and-tasks",
- "preferences-calendar-and-tasks",
- _("Calendar and Tasks"),
- calendar_prefs_dialog_new (shell),
- 600);
-
- return FALSE;
-}
-
-static gboolean
cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
const gchar *uri)
{
@@ -696,6 +676,7 @@ cal_shell_backend_constructed (GObject *object)
{
EShell *shell;
EShellBackend *shell_backend;
+ GtkWidget *preferences_window;
shell_backend = E_SHELL_BACKEND (object);
shell = e_shell_backend_get_shell (shell_backend);
@@ -716,9 +697,16 @@ cal_shell_backend_constructed (GObject *object)
e_cal_shell_backend_init_settings (shell);
- /* Initialize preferences after the main loop starts so
- * that all EPlugins and EPluginHooks are loaded first. */
- g_idle_add ((GSourceFunc) cal_shell_backend_init_preferences, shell);
+ /* Setup preference widget factories */
+ preferences_window = e_shell_get_preferences_window (shell);
+
+ e_preferences_window_add_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ "calendar-and-tasks",
+ "preferences-calendar-and-tasks",
+ _("Calendar and Tasks"),
+ calendar_prefs_dialog_new,
+ 600);
}
static void