[evolution] Add 'express mode' gconf setting



commit 2166e7f4c73e8cc1f9b7f00027eec9de05961ee2
Author: Michael Meeks <michael meeks novell com>
Date:   Wed Feb 24 15:08:43 2010 +0000

    Add 'express mode' gconf setting

 shell/apps_evolution_shell.schemas.in |    8 ++++++++
 shell/e-shell.c                       |   22 +++++++++++++++++++++-
 shell/e-shell.h                       |    1 +
 3 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/shell/apps_evolution_shell.schemas.in b/shell/apps_evolution_shell.schemas.in
index db96c9b..5682e64 100644
--- a/shell/apps_evolution_shell.schemas.in
+++ b/shell/apps_evolution_shell.schemas.in
@@ -389,5 +389,13 @@
       </locale>
     </schema>
 
+    <schema>
+      <key>/schemas/apps/evolution/shell/express_mode</key>
+      <applyto>/apps/evolution/shell/express_mode</applyto>
+      <owner>evolution</owner>
+      <type>bool</type>
+      <default>false</default>
+    </schema>
+
   </schemalist>  
 </gconfschemafile>
diff --git a/shell/e-shell.c b/shell/e-shell.c
index fe046a4..3fc2347 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -60,6 +60,7 @@ struct _EShellPrivate {
 	guint online		: 1;
 	guint quit_cancelled	: 1;
 	guint safe_mode		: 1;
+	guint express		: 1;
 };
 
 enum {
@@ -1037,7 +1038,8 @@ shell_init (EShell *shell)
 	shell->priv->backends_by_name = backends_by_name;
 	shell->priv->backends_by_scheme = backends_by_scheme;
 	shell->priv->safe_mode = e_file_lock_exists ();
-
+	shell->priv->express = gconf_client_get_bool (
+		shell->priv->gconf_client, "/apps/evolution/shell/express_mode", NULL);
 	g_object_ref_sink (shell->priv->preferences_window);
 
 #if defined(NM_SUPPORT) && NM_SUPPORT
@@ -1659,6 +1661,24 @@ e_shell_set_online (EShell *shell,
 }
 
 /**
+ * e_shell_get_online:
+ * @shell: an #EShell
+ *
+ * Returns %TRUE if Evolution is online, %FALSE if Evolution is offline.
+ * Evolution may be offline because the user elected to work offline, or
+ * because the network has become unavailable.
+ *
+ * Returns: %TRUE if Evolution is online
+ **/
+gboolean
+e_shell_get_express_mode (EShell *shell)
+{
+	g_return_val_if_fail (E_IS_SHELL (shell), FALSE);
+
+	return shell->priv->online;
+}
+
+/**
  * e_shell_get_preferences_window:
  * @shell: an #EShell
  *
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 1a32480..33d1e1c 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -121,6 +121,7 @@ void		e_shell_set_network_available	(EShell *shell,
 gboolean	e_shell_get_online		(EShell *shell);
 void		e_shell_set_online		(EShell *shell,
 						 gboolean online);
+gboolean	e_shell_get_express_mode	(EShell *shell);
 GtkWidget *	e_shell_get_preferences_window	(EShell *shell);
 void		e_shell_event			(EShell *shell,
 						 const gchar *event_name,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]