diff options
Diffstat (limited to 'capplet/anjal-settings-main.c')
-rw-r--r-- | capplet/anjal-settings-main.c | 55 |
1 files changed, 53 insertions, 2 deletions
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c index c04722e42f..2fb5b448dd 100644 --- a/capplet/anjal-settings-main.c +++ b/capplet/anjal-settings-main.c @@ -39,6 +39,11 @@ #include <libemail-utils/mail-mt.h> #include "settings/mail-capplet-shell.h" #include <libedataserver/e-categories.h> +#include "e-util/e-plugin.h" +#include "e-util/e-plugin-ui.h" +#include "shell/es-event.h" +#include "shell/e-shell-meego.h" +#include "e-util/e-import.h" #ifdef G_OS_WIN32 #define WIN32_LEAN_AND_MEAN @@ -91,12 +96,47 @@ categories_icon_theme_hack (void) g_free (dirname); } -static void +static EShell * create_default_shell (void) { + EShell *shell; + const gchar *key; + gboolean is_meego = FALSE, small_screen = FALSE; + gboolean express_mode = TRUE; + GSettings *settings; + GError *error = NULL; + GApplicationFlags flags; + + settings = g_settings_new ("org.gnome.evolution.shell"); + main_window = mail_capplet_shell_new (socket_id, FALSE, TRUE); if (!socket_id) gtk_widget_show (main_window); + + if (!express_mode) + express_mode = g_settings_get_boolean (settings, "express-mode"); + + if (express_mode) + e_shell_detect_meego (&is_meego, &small_screen); + + flags = G_APPLICATION_HANDLES_OPEN | + G_APPLICATION_HANDLES_COMMAND_LINE; + + shell = g_initable_new ( + E_TYPE_SHELL, NULL, &error, + "application-id", "org.gnome.EvolutionSettings", + "flags", flags, + "geometry", "", + "module-directory", EVOLUTION_MODULEDIR, + "meego-mode", is_meego, + "express-mode", express_mode, + "small-screen-mode", small_screen, + "online", TRUE, + NULL); + + g_object_unref (settings); + + return shell; } gint @@ -104,6 +144,7 @@ main (gint argc, gchar *argv[]) { GError *error = NULL; + EShell *shell; #ifdef G_OS_WIN32 /* Reduce risks */ @@ -170,7 +211,17 @@ main (gint argc, e_passwords_init (); categories_icon_theme_hack (); - create_default_shell (); + shell = create_default_shell (); + e_shell_load_modules (shell); + + /* Register built-in plugin hook types. */ + es_event_hook_get_type (); + e_import_hook_get_type (); + e_plugin_ui_hook_get_type (); + + /* All EPlugin and EPluginHook subclasses should be + * registered in GType now, so load plugins now. */ + e_plugin_load_plugins (); gtk_main (); |