aboutsummaryrefslogtreecommitdiffstats
path: root/capplet/anjal-settings-main.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@gnome.org>2012-02-16 18:57:40 +0800
committerSrinivasa Ragavan <sragavan@gnome.org>2012-02-16 18:59:07 +0800
commit02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e (patch)
tree171b90bf2218012a02f71e2e066a7e90ac9413e7 /capplet/anjal-settings-main.c
parentb8cfd5f9a43d4fefd89731257f0d1ac3863de7df (diff)
downloadgsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar.gz
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar.bz2
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar.lz
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar.xz
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.tar.zst
gsoc2013-evolution-02cbfd837abaf8ec1218cc97f7fed70cbd1fdf7e.zip
Make Capplet work again with new CamelSettings and other stuffs. Also add
EPlugin support to capplet so that exchange and other accoutns can be configured via this. now.
Diffstat (limited to 'capplet/anjal-settings-main.c')
-rw-r--r--capplet/anjal-settings-main.c55
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 ();