From 59928e69ed7b769585282ae2b11bca1a9e9a1ca9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 19 Dec 2010 13:30:45 -0500 Subject: 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). --- modules/offline-alert/evolution-offline-alert.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'modules/offline-alert') 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); } -- cgit v1.2.3