From 224f26b84d9c12b0dd1d337f51c14b6ebb901007 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 4 Sep 2011 09:48:24 -0400 Subject: 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. --- mail/mail-mt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mail/mail-mt.c') diff --git a/mail/mail-mt.c b/mail/mail-mt.c index d904eed546..0d05a21a86 100644 --- a/mail/mail-mt.c +++ b/mail/mail-mt.c @@ -200,6 +200,7 @@ mail_msg_check_error (gpointer msg) EShellView *shell_view; EShellWindow *shell_window = NULL; EShellContent *shell_content; + GtkApplication *application; MailMsg *m = msg; gchar *what; GList *list, *iter; @@ -226,9 +227,10 @@ mail_msg_check_error (gpointer msg) return; shell = e_shell_get_default (); + 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); -- cgit v1.2.3