diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-12-20 02:30:45 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:14 +0800 |
commit | fdf1c024b57e28f8cdee3f3590f008bd1d5ee9bd (patch) | |
tree | 28d901095b847134ba5d2dd8dd3a2e0ea90a652c /modules | |
parent | 6217c4110631d8e0c3cf5d8c08dc2a627b5b0c4d (diff) | |
download | gsoc2013-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.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); } |