[evolution] Switch to anjal style on express mode.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Switch to anjal style on express mode.
- Date: Sun, 14 Mar 2010 02:10:17 +0000 (UTC)
commit 8e0c294e15ca3f765e330b1d6ae892b768453fa9
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Tue Mar 2 17:44:10 2010 +0530
Switch to anjal style on express mode.
modules/mail/em-account-prefs.c | 33 ++++++++++++++++--------------
plugins/startup-wizard/startup-wizard.c | 26 +++++++++++++-----------
2 files changed, 32 insertions(+), 27 deletions(-)
---
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 13ede1f..b74915b 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -39,6 +39,7 @@
#include "e-mail-store.h"
#include "em-config.h"
#include "em-account-editor.h"
+#include "shell/e-shell.h"
#include "capplet/mail-capplet-shell.h"
#define EM_ACCOUNT_PREFS_GET_PRIVATE(obj) \
@@ -112,21 +113,23 @@ account_prefs_add_account (EAccountManager *manager)
parent = gtk_widget_get_toplevel (GTK_WIDGET (manager));
parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
-#if 0
- /** @HookPoint-EMConfig: New Mail Account Assistant
- * @Id: org.gnome.evolution.mail.config.accountAssistant
- * @Type: E_CONFIG_ASSISTANT
- * @Class: org.gnome.evolution.mail.config:1.0
- * @Target: EMConfigTargetAccount
- *
- * The new mail account assistant.
- */
- emae = em_account_editor_new (
- NULL, EMAE_ASSISTANT,
- "org.gnome.evolution.mail.config.accountAssistant");
- priv->assistant = emae->editor;
-#endif
- priv->assistant = mail_capplet_shell_new (0, TRUE, FALSE);
+
+ if (!e_shell_get_express_mode (e_shell_get_default ())) {
+ /** @HookPoint-EMConfig: New Mail Account Assistant
+ * @Id: org.gnome.evolution.mail.config.accountAssistant
+ * @Type: E_CONFIG_ASSISTANT
+ * @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetAccount
+ *
+ * The new mail account assistant.
+ */
+ emae = em_account_editor_new (
+ NULL, EMAE_ASSISTANT,
+ "org.gnome.evolution.mail.config.accountAssistant");
+ priv->assistant = emae->editor;
+ } else {
+ priv->assistant = mail_capplet_shell_new (0, TRUE, FALSE);
+ }
g_object_add_weak_pointer (G_OBJECT (priv->assistant), &priv->assistant);
gtk_window_set_transient_for (GTK_WINDOW (priv->assistant), parent);
diff --git a/plugins/startup-wizard/startup-wizard.c b/plugins/startup-wizard/startup-wizard.c
index ede0015..44395b6 100644
--- a/plugins/startup-wizard/startup-wizard.c
+++ b/plugins/startup-wizard/startup-wizard.c
@@ -52,7 +52,7 @@ startup_wizard_terminate (void) {
_exit (0);
}
-G_GNUC_NORETURN static void
+static void
startup_wizard_close (void) {
gtk_main_quit ();
}
@@ -63,11 +63,10 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
GtkWidget *start_page;
GConfClient *client;
GSList *accounts;
-#if 0
EConfig *config;
GList *page_children;
EMAccountEditor *emae;
-#endif
+
client = gconf_client_get_default ();
accounts = gconf_client_get_list (client, "/apps/evolution/mail/accounts", GCONF_VALUE_STRING, NULL);
g_object_unref (client);
@@ -79,17 +78,21 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
return;
}
- start_page = (GtkWidget *)mail_capplet_shell_new(0, TRUE, TRUE);
- gtk_widget_show (start_page);
- g_signal_connect (
- start_page, "delete-event",
- G_CALLBACK (startup_wizard_terminate), NULL);
- g_signal_connect (
- start_page, "destroy",
+ if (e_shell_get_express_mode (e_shell_get_default ())) {
+ start_page = (GtkWidget *)mail_capplet_shell_new(0, TRUE, TRUE);
+ gtk_widget_show (start_page);
+ g_signal_connect (
+ start_page, "delete-event",
+ G_CALLBACK (startup_wizard_terminate), NULL);
+ g_signal_connect (
+ start_page, "destroy",
G_CALLBACK (startup_wizard_close), NULL);
+ gtk_main ();
+
+ return;
+ }
-#if 0
/** @HookPoint-EMConfig: New Mail Account Wizard
* @Id: org.gnome.evolution.mail.config.accountWizard
* @Type: E_CONFIG_ASSISTANT
@@ -129,7 +132,6 @@ startup_wizard (EPlugin *ep, ESEventTargetUpgrade *target)
gtk_widget_show (emae->editor);
-#endif
gtk_main ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]