diff options
author | Milan Crha <mcrha@redhat.com> | 2012-04-23 17:44:45 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-04-23 17:46:05 +0800 |
commit | bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf (patch) | |
tree | 0b1984407c2f046f109c1468f88dd8f933a6587a /modules/offline-alert | |
parent | 68978b5a021e73f44a05a19b6492469c3da13f79 (diff) | |
download | gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar.gz gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar.bz2 gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar.lz gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar.xz gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.tar.zst gsoc2013-evolution-bf2c718d1f1ecdaf0feec0274c2b12eee57aa6bf.zip |
Bug #655753 - Improve offline notification for network outage
Diffstat (limited to 'modules/offline-alert')
-rw-r--r-- | modules/offline-alert/evolution-offline-alert.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/offline-alert/evolution-offline-alert.c b/modules/offline-alert/evolution-offline-alert.c index 5fcb79706c..4c3678f477 100644 --- a/modules/offline-alert/evolution-offline-alert.c +++ b/modules/offline-alert/evolution-offline-alert.c @@ -81,7 +81,13 @@ offline_alert_network_available_cb (EShell *shell, GParamSpec *pspec, EOfflineAlert *extension) { - if (e_shell_get_network_available (shell)) + if (e_shell_get_network_available (shell)) { + if (extension->alert != NULL) + e_alert_response (extension->alert, GTK_RESPONSE_OK); + return; + } + + if (!e_shell_get_online (shell)) return; g_return_if_fail (extension->alert == NULL); @@ -124,11 +130,6 @@ offline_alert_window_added_cb (GtkApplication *application, if (e_shell_get_online (shell)) return; - if (!e_shell_get_network_available (shell)) { - g_object_notify (G_OBJECT (shell), "network-available"); - return; - } - g_return_if_fail (extension->alert == NULL); /* This alert only shows at startup, not when the user @@ -137,7 +138,7 @@ offline_alert_window_added_cb (GtkApplication *application, action = E_SHELL_WINDOW_ACTION_WORK_ONLINE (window); - extension->alert = e_alert_new ("offline-alert:offline", NULL); + extension->alert = e_alert_new (e_shell_get_network_available (shell) ? "offline-alert:offline" : "offline-alert:no-network", NULL); e_alert_add_action (extension->alert, action, GTK_RESPONSE_NONE); g_object_add_weak_pointer ( |