[evolution] Avoid delay when going online with --force-online command-line option



commit 2dd576b9b3cf0bd1c0a9d695a42a566cfabce77c
Author: Milan Crha <mcrha redhat com>
Date:   Thu Feb 4 10:37:42 2016 +0100

    Avoid delay when going online with --force-online command-line option

 shell/e-shell.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 9e4d01a..7f6fb69 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -2574,6 +2574,14 @@ e_shell_lock_network_available (EShell *shell)
 
        e_shell_set_network_available (shell, TRUE);
        shell->priv->network_available_locked = TRUE;
+
+       /* As this is a user choice to go online, do not wait and switch online immediately */
+       if (shell->priv->set_online_timeout_id > 0) {
+               g_source_remove (shell->priv->set_online_timeout_id);
+               shell->priv->set_online_timeout_id = 0;
+
+               e_shell_set_online (shell, TRUE);
+       }
 }
 
 /**


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