[evolution/wip/webkit2] Bug 746686 - [mail-notification] Focus existing 'mail' window, if exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 746686 - [mail-notification] Focus existing 'mail' window, if exists
- Date: Tue, 23 Feb 2016 20:02:57 +0000 (UTC)
commit 62076ef3630556f41aa3cc274e8fffcff78c68e8
Author: Milan Crha <mcrha redhat com>
Date: Wed Apr 1 09:18:50 2015 +0200
Bug 746686 - [mail-notification] Focus existing 'mail' window, if exists
plugins/mail-notification/mail-notification.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index 1e624fd..e74c5a3 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -299,15 +299,27 @@ notify_default_action_cb (NotifyNotification *notification,
EMFolderTree *folder_tree;
GtkApplication *application;
GtkAction *action;
- GList *list;
+ GList *list, *fallback = NULL;
shell = e_shell_get_default ();
application = GTK_APPLICATION (shell);
list = gtk_application_get_windows (application);
/* Find the first EShellWindow in the list. */
- while (list != NULL && !E_IS_SHELL_WINDOW (list->data))
+ while (list != NULL) {
+ if (E_IS_SHELL_WINDOW (list->data)) {
+ if (!fallback)
+ fallback = list;
+
+ if (g_strcmp0 (e_shell_window_get_active_view (list->data), "mail") == 0)
+ break;
+ }
+
list = g_list_next (list);
+ }
+
+ if (!list)
+ list = fallback;
g_return_if_fail (list != NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]