aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-backend.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-09-04 21:48:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-06 20:16:21 +0800
commit224f26b84d9c12b0dd1d337f51c14b6ebb901007 (patch)
treec88109d0fe00df4b14dcf1ce641cd5ed91013f0f /mail/e-mail-backend.c
parentda3e201c064f877c884befc0a0b434619b056e09 (diff)
downloadgsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar.gz
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar.bz2
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar.lz
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar.xz
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.tar.zst
gsoc2013-evolution-224f26b84d9c12b0dd1d337f51c14b6ebb901007.zip
GtkApplication has some new EShell-like features.
I pushed a few EShell features up to GtkApplication for GTK+ 3.2, so we can now trim off the redundancies in EShell. 1) GtkApplication has a new "window-added" signal which replaces EShell's own "window-created" signal. 2) GtkApplication has a new "window-removed" signal which replaces EShell's own "window-destroyed" signal. 3) gtk_application_get_windows() now returns a list of windows sorted by most recently focused, replacing e_shell_get_watched_windows(). 4) GtkApplication now provides enough hooks to subclasses that we can remove e_shell_watch_window() and call gtk_application_add_window() directly.
Diffstat (limited to 'mail/e-mail-backend.c')
-rw-r--r--mail/e-mail-backend.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5768934b1a..7cc33c14c6 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -632,10 +632,13 @@ mail_backend_job_finished_cb (CamelSession *session,
} else if (error != NULL) {
EShell *shell;
+ GtkApplication *application;
GList *list, *iter;
shell = e_shell_backend_get_shell (shell_backend);
- list = e_shell_get_watched_windows (shell);
+
+ application = GTK_APPLICATION (shell);
+ list = gtk_application_get_windows (application);
/* Submit the error to an appropriate EAlertSink. */
for (iter = list; iter != NULL; iter = g_list_next (iter)) {
@@ -917,6 +920,7 @@ e_mail_backend_submit_alert (EMailBackend *backend,
EShellContent *shell_content;
EShellWindow *shell_window = NULL;
EShellBackendClass *class;
+ GtkApplication *application;
GList *list, *iter;
va_list va;
@@ -931,8 +935,10 @@ e_mail_backend_submit_alert (EMailBackend *backend,
shell_backend = E_SHELL_BACKEND (backend);
shell = e_shell_backend_get_shell (shell_backend);
+ application = GTK_APPLICATION (shell);
+ list = gtk_application_get_windows (application);
+
/* Find the most recently used EShellWindow. */
- list = e_shell_get_watched_windows (shell);
for (iter = list; iter != NULL; iter = g_list_next (iter)) {
if (E_IS_SHELL_WINDOW (iter->data)) {
shell_window = E_SHELL_WINDOW (iter->data);