diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-14 04:55:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-14 04:55:07 +0800 |
commit | b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3 (patch) | |
tree | 9b17b0d61c3fb2e62dab36b6984a23c930f6dbe4 /shell/e-shell.c | |
parent | 9108b38d83a16110e5973d73a15ab4d3b8188ca4 (diff) | |
download | gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar.gz gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar.bz2 gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar.lz gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar.xz gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.tar.zst gsoc2013-evolution-b4f97aea9b6681c3483f355c9081e2b3b9ee5fd3.zip |
Bug 461769 - Add a --force-online command line option
Use it to override network availability detection as reported by
NetworkManager or other network monitoring software.
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r-- | shell/e-shell.c | 42 |
1 files changed, 33 insertions, 9 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c index 28abe028dc..62cae09cfc 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -65,15 +65,16 @@ struct _EShellPrivate { gchar *startup_view; - guint auto_reconnect : 1; - guint modules_loaded : 1; - guint network_available : 1; - guint online : 1; - guint quit_cancelled : 1; - guint safe_mode : 1; - guint express_mode : 1; - guint meego_mode : 1; - guint small_screen_mode : 1; + guint auto_reconnect : 1; + guint express_mode : 1; + guint meego_mode : 1; + guint modules_loaded : 1; + guint network_available : 1; + guint network_available_locked : 1; + guint online : 1; + guint quit_cancelled : 1; + guint safe_mode : 1; + guint small_screen_mode : 1; }; enum { @@ -1801,6 +1802,9 @@ e_shell_set_network_available (EShell *shell, { g_return_if_fail (E_IS_SHELL (shell)); + if (shell->priv->network_available_locked) + return; + if (network_available == shell->priv->network_available) return; @@ -1821,6 +1825,26 @@ e_shell_set_network_available (EShell *shell, } /** + * e_shell_lock_network_available: + * @shell: an #EShell + * + * Locks the value of #EShell:network-available to %TRUE. Further + * attempts to set the property will be ignored. + * + * This is used for the --force-online command-line option, which is + * intended to override the network availability status as reported + * by NetworkManager or other network monitoring software. + **/ +void +e_shell_lock_network_available (EShell *shell) +{ + g_return_if_fail (E_IS_SHELL (shell)); + + e_shell_set_network_available (shell, TRUE); + shell->priv->network_available_locked = TRUE; +} + +/** * e_shell_get_online: * @shell: an #EShell * |