diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2009-07-03 02:12:52 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchenthill@novell.com> | 2009-07-03 02:15:11 +0800 |
commit | e2bf5a174aee32d888b96f04ef6e1da11f9f5f50 (patch) | |
tree | 75ab2089f453e9c70140c233fb9515db3225c7ab /shell/e-shell.c | |
parent | afea64785f1fbcb9852fa520f67f3a60f303c372 (diff) | |
download | gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar.gz gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar.bz2 gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar.lz gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar.xz gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.tar.zst gsoc2013-evolution-e2bf5a174aee32d888b96f04ef6e1da11f9f5f50.zip |
Set the start_in_offline state only when the user chooses to go
offline and not when network goes offline.
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 9869d6e9e9..3eb063928b 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -1030,7 +1030,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 || e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_FORCED_OFFLINE); + is_offline = ( e_shell_get_line_status (shell) == E_SHELL_LINE_STATUS_OFFLINE ); client = gconf_client_get_default (); gconf_client_set_bool (client, "/apps/evolution/shell/start_offline", is_offline, NULL); @@ -1132,20 +1132,20 @@ e_shell_set_line_status (EShell *shell, GSList *p; CORBA_Environment ev; GConfClient *client; - gboolean status; + gboolean is_online; gboolean forced = FALSE; priv = shell->priv; if (shell_state == GNOME_Evolution_FORCED_OFFLINE || shell_state == GNOME_Evolution_USER_OFFLINE) { - status = FALSE; + is_online = FALSE; if (shell_state == GNOME_Evolution_FORCED_OFFLINE) forced = TRUE; } else - status = TRUE; + is_online = TRUE; - if ((status && priv->line_status == E_SHELL_LINE_STATUS_ONLINE) - || (!status && priv->line_status == E_SHELL_LINE_STATUS_OFFLINE && !forced)) + if ((is_online && priv->line_status == E_SHELL_LINE_STATUS_ONLINE) + || (!is_online && priv->line_status == E_SHELL_LINE_STATUS_OFFLINE && !forced)) return; /* we use 'going offline' to mean 'changing status' now */ @@ -1153,10 +1153,11 @@ e_shell_set_line_status (EShell *shell, g_signal_emit (shell, signals[LINE_STATUS_CHANGED], 0, priv->line_status); client = gconf_client_get_default (); - gconf_client_set_bool (client, "/apps/evolution/shell/start_offline", !status, NULL); + if (!forced) + gconf_client_set_bool (client, "/apps/evolution/shell/start_offline", !is_online, NULL); g_object_unref (client); - priv->line_status_working = status?E_SHELL_LINE_STATUS_ONLINE: forced?E_SHELL_LINE_STATUS_FORCED_OFFLINE:E_SHELL_LINE_STATUS_OFFLINE; + priv->line_status_working = is_online ? 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; |