[evolution/kill-bonobo] Update GConf when the online/offline button is clicked.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution/kill-bonobo] Update GConf when the online/offline button is clicked.
- Date: Thu, 13 Aug 2009 17:25:52 +0000 (UTC)
commit 59c73e97a64345cb4e6dd9f9542bb94094fd1917
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Aug 13 13:24:44 2009 -0400
Update GConf when the online/offline button is clicked.
shell/e-shell-window-actions.c | 16 ++++++++++++++++
shell/e-shell.c | 4 ++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index a53412c..235456e 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -1361,9 +1361,17 @@ action_work_offline_cb (GtkAction *action,
EShellWindow *shell_window)
{
EShell *shell;
+ EShellSettings *shell_settings;
shell = e_shell_window_get_shell (shell_window);
+ shell_settings = e_shell_get_shell_settings (shell);
+
e_shell_set_online (shell, FALSE);
+
+ /* XXX The sense of the setting is reversed. Would be more
+ * intuitive and less error-prone as "start-online". */
+ e_shell_settings_set_boolean (
+ shell_settings, "start-offline", TRUE);
}
/**
@@ -1379,9 +1387,17 @@ action_work_online_cb (GtkAction *action,
EShellWindow *shell_window)
{
EShell *shell;
+ EShellSettings *shell_settings;
shell = e_shell_window_get_shell (shell_window);
+ shell_settings = e_shell_get_shell_settings (shell);
+
e_shell_set_online (shell, TRUE);
+
+ /* XXX The sense of the setting is reversed. Would be more
+ * intuitive and less error-prone as "start-online". */
+ e_shell_settings_set_boolean (
+ shell_settings, "start-offline", FALSE);
}
/**
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 5b1e3be..e8a95b1 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -967,6 +967,10 @@ shell_init (EShell *shell)
* otherwise the GConf bindings will not get set up. */
e_shell_settings_install_property_for_key (
+ "start-offline",
+ "/apps/evolution/shell/start_offline");
+
+ e_shell_settings_install_property_for_key (
"disable-application-handlers",
"/desktop/gnome/lockdown/disable_application_handlers");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]