aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-12-20 02:30:45 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:14 +0800
commitfdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd (patch)
tree28d901095b847134ba5d2dd8dd3a2e0ea90a652c /modules
parent6217c4110631d8e0c3cf5d8c08dc2a627b5b0c4d (diff)
downloadgsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar.gz
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar.bz2
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar.lz
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar.xz
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.tar.zst
gsoc2013-evolution-fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd.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')
-rw-r--r--modules/offline-alert/evolution-offline-alert.c16
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);
}