diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2008-01-18 14:53:39 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2008-01-18 14:53:39 +0800 |
commit | de7843234354f8aec863a80b3d354818603023a6 (patch) | |
tree | 77b54a9df027143c18e6db2aed71823de89c3183 /shell/e-shell.c | |
parent | cd14d28ca592cccf52c2c886334f266c1ac46359 (diff) | |
download | gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar.gz gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar.bz2 gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar.lz gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar.xz gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.tar.zst gsoc2013-evolution-de7843234354f8aec863a80b3d354818603023a6.zip |
** Fix for bug #329712
2008-01-18 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #329712
* e-shell-window-commands.c: (update_offline_menu_item):
* e-shell-window.c: (update_offline_toggle_status),
(update_send_receive_sensitivity),
(offline_toggle_clicked_callback):
* e-shell.c: (e_shell_construct), (e_shell_save_settings),
(set_line_status):
* e-shell.h: Add a new state to maintian forced offline.
svn path=/trunk/; revision=34847
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index cd34d2e03d..bdab938293 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -716,6 +716,8 @@ e_shell_construct (EShell *shell, if (start_online) e_shell_go_online (shell, NULL, GNOME_Evolution_USER_ONLINE); + else + e_shell_go_online (shell, NULL, GNOME_Evolution_FORCED_OFFLINE); return E_SHELL_CONSTRUCT_RESULT_OK; } @@ -1029,7 +1031,7 @@ e_shell_save_settings (EShell *shell) GConfClient *client; gboolean is_offline; - is_offline = ( e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_OFFLINE ); + is_offline = ( e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_OFFLINE || e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_FORCED_OFFLINE); client = gconf_client_get_default (); gconf_client_set_bool (client, "/apps/evolution/shell/start_offline", is_offline, NULL); @@ -1131,16 +1133,19 @@ set_line_status(EShell *shell, GNOME_Evolution_ShellState shell_state) CORBA_Environment ev; GConfClient *client; gboolean status; + gboolean forced = FALSE; priv = shell->priv; - if (shell_state == GNOME_Evolution_FORCED_OFFLINE || shell_state == GNOME_Evolution_USER_OFFLINE) + if (shell_state == GNOME_Evolution_FORCED_OFFLINE || shell_state == GNOME_Evolution_USER_OFFLINE) { status = FALSE; - else + if (shell_state == GNOME_Evolution_FORCED_OFFLINE) + forced = TRUE; + } else status = TRUE; if ((status && priv->line_status == E_SHELL_LINE_STATUS_ONLINE) - || (!status && priv->line_status != E_SHELL_LINE_STATUS_ONLINE)) + || (!status && priv->line_status == shell_state)) return; /* we use 'going offline' to mean 'changing status' now */ @@ -1151,7 +1156,7 @@ set_line_status(EShell *shell, GNOME_Evolution_ShellState shell_state) gconf_client_set_bool (client, "/apps/evolution/shell/start_offline", !status, NULL); g_object_unref (client); - priv->line_status_working = status?E_SHELL_LINE_STATUS_ONLINE:E_SHELL_LINE_STATUS_OFFLINE; + priv->line_status_working = status?E_SHELL_LINE_STATUS_ONLINE: forced?E_SHELL_LINE_STATUS_FORCED_OFFLINE:E_SHELL_LINE_STATUS_OFFLINE; /* we start at 2: setLineStatus could recursively call back, we therefore `need to not complete till we're really complete */ priv->line_status_pending += 2; |