[evolution/express2] Store the initial view request and use that to decide whether to show startup wizard or not. Show on
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/express2] Store the initial view request and use that to decide whether to show startup wizard or not. Show on
- Date: Thu, 22 Apr 2010 12:09:18 +0000 (UTC)
commit a650f15f0090d68a503b5b11561bfb3cdb4663dc
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Thu Apr 22 17:27:20 2010 +0530
Store the initial view request and use that to decide whether to show
startup wizard or not. Show only for mail and not calendar.
plugins/startup-wizard/startup-wizard.c | 8 ++++++++
shell/e-shell.c | 23 +++++++++++++++++++++++
shell/e-shell.h | 3 +++
shell/main.c | 5 +++++
4 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c
index a38b2d9..97d2297 100644
--- a/plugins/startup-wizard/startup-wizard.c
+++ b/plugins/startup-wizard/startup-wizard.c
@@ -66,7 +66,15 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
GSList *accounts;
EConfig *config;
EMAccountEditor *emae;
+ char *req_view;
+ req_view = e_shell_get_startup_view(e_shell_get_default());
+
+ if (req_view && strcmp (req_view, "mail") && e_shell_get_express_mode(e_shell_get_default())) {
+ return;
+ }
+
+
client = gconf_client_get_default ();
accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL);
g_object_unref (client);
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 7f29174..d238f22 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -61,6 +61,8 @@ struct _EShellPrivate {
gchar *geometry;
gchar *module_directory;
+
+ gchar *startup_view;
guint auto_reconnect : 1;
guint network_available : 1;
@@ -617,6 +619,11 @@ shell_dispose (GObject *object)
priv = E_SHELL_GET_PRIVATE (object);
+ if (priv->startup_view != NULL) {
+ g_free (priv->startup_view);
+ priv->startup_view = NULL;
+ }
+
if (priv->settings != NULL) {
g_object_unref (priv->settings);
priv->settings = NULL;
@@ -1153,6 +1160,8 @@ e_shell_init (EShell *shell)
shell->priv->backends_by_scheme = backends_by_scheme;
shell->priv->safe_mode = e_file_lock_exists ();
+ shell->priv->startup_view = NULL;
+
g_object_ref_sink (shell->priv->preferences_window);
/* Add our icon directory to the theme's search path
@@ -1936,3 +1945,17 @@ e_shell_adapt_window_size (EShell *shell,
gtk_window_set_decorated (window, FALSE);
gtk_window_maximize (window);
}
+
+void
+e_shell_set_startup_view (EShell *shell,
+ const char *view)
+{
+ shell->priv->startup_view = g_strdup(view);
+}
+
+
+const char *
+e_shell_get_startup_view (EShell *shell)
+{
+ return shell->priv->startup_view;
+}
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 1b191e4..0b8c333 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -127,6 +127,9 @@ void e_shell_cancel_quit (EShell *shell);
void e_shell_adapt_window_size (EShell *shell,
GtkWindow *window);
+void e_shell_set_startup_view (EShell *shell,
+ const char *view);
+const char * e_shell_get_startup_view (EShell *shell);
G_END_DECLS
diff --git a/shell/main.c b/shell/main.c
index 5a9855b..e327065 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -576,6 +576,11 @@ main (gint argc, gchar **argv)
e_plugin_load_plugins ();
}
+ if (requested_view)
+ e_shell_set_startup_view(shell, requested_view);
+ else if (express_mode)
+ e_shell_set_startup_view(shell, "mail");
+
/* Attempt migration -after- loading all modules and plugins,
* as both shell backends and certain plugins hook into this. */
e_shell_migrate_attempt (shell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]