diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-12-20 02:30:45 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-12-27 12:31:55 +0800 |
commit | 59928e69ed7b769585282ae2b11bca1a9e9a1ca9 (patch) | |
tree | d5401373e09201c099d3b09d65caeccb948f42d1 /modules/offline-alert | |
parent | a1906cdfa44854cddce552250ca6f82a3b108781 (diff) | |
download | gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar.gz gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar.bz2 gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar.lz gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar.xz gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.tar.zst gsoc2013-evolution-59928e69ed7b769585282ae2b11bca1a9e9a1ca9.zip |
Add e_shell_submit_alert().
An easy way to broadcast application-wide alerts to shell windows.
These alerts will persist in all current and future shell windows
until responded to (either programmatically or by the user).
Diffstat (limited to 'modules/offline-alert')
-rw-r--r-- | modules/offline-alert/evolution-offline-alert.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/modules/offline-alert/evolution-offline-alert.c b/modules/offline-alert/evolution-offline-alert.c index 74a63bf697..ad6cd3607c 100644 --- a/modules/offline-alert/evolution-offline-alert.c +++ b/modules/offline-alert/evolution-offline-alert.c @@ -76,8 +76,6 @@ offline_alert_network_available_cb (EShell *shell, GParamSpec *pspec, EOfflineAlert *extension) { - GList *list, *iter; - if (e_shell_get_network_available (shell)) return; @@ -88,17 +86,7 @@ offline_alert_network_available_cb (EShell *shell, g_object_add_weak_pointer ( G_OBJECT (extension->alert), &extension->alert); - /* Broadcast the alert to all EShellWindows. */ - list = e_shell_get_watched_windows (shell); - for (iter = list; iter != NULL; iter = g_list_next (iter)) { - GtkWidget *window = iter->data; - - if (!E_IS_SHELL_WINDOW (window)) - continue; - - e_alert_sink_submit_alert ( - E_ALERT_SINK (window), extension->alert); - } + e_shell_submit_alert (shell, extension->alert); g_object_unref (extension->alert); } @@ -149,7 +137,7 @@ offline_alert_window_created_cb (EShell *shell, g_object_add_weak_pointer ( G_OBJECT (extension->alert), &extension->alert); - e_alert_sink_submit_alert (E_ALERT_SINK (window), extension->alert); + e_shell_submit_alert (shell, extension->alert); g_object_unref (extension->alert); } |