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. --- modules/mail/e-mail-shell-backend.c | 11 ++++++----- modules/mail/em-composer-prefs.c | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 4cf3cb78a5..ba812c1440 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -298,10 +298,11 @@ mail_shell_backend_window_weak_notify_cb (EShell *shell, } static void -mail_shell_backend_window_created_cb (EShell *shell, - GtkWindow *window, - EShellBackend *shell_backend) +mail_shell_backend_window_added_cb (GtkApplication *application, + GtkWindow *window, + EShellBackend *shell_backend) { + EShell *shell = E_SHELL (application); const gchar *backend_name; /* This applies to both the composer and signature editor. */ @@ -392,8 +393,8 @@ mail_shell_backend_constructed (GObject *object) shell_backend); g_signal_connect ( - shell, "window-created", - G_CALLBACK (mail_shell_backend_window_created_cb), + shell, "window-added", + G_CALLBACK (mail_shell_backend_window_added_cb), shell_backend); e_mail_shell_settings_init (shell_backend); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 12a521b454..8453b88540 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -547,11 +547,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, gtk_container_add (GTK_CONTAINER (container), widget); gtk_widget_show (widget); - /* The mail shell backend responds to the "window-created" signal + /* The mail shell backend responds to the "window-added" signal * that this triggers and configures it with composer preferences. */ g_signal_connect_swapped ( widget, "editor-created", - G_CALLBACK (e_shell_watch_window), shell); + G_CALLBACK (gtk_application_add_window), shell); /* Express mode does not honor this setting. */ if (!e_shell_get_express_mode (shell)) -- cgit v1.2.3 From d79ca40b62e72b1ec516631bbffabd6e2cad15e6 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 6 Oct 2011 16:59:04 +0200 Subject: Adapt to CamelFolderSummary API changes --- modules/mail/e-mail-shell-view-private.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index 30a6756ddf..50525c7c7f 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -983,11 +983,11 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view) folder_name = camel_folder_get_display_name (folder); parent_store = camel_folder_get_parent_store (folder); - num_deleted = folder->summary->deleted_count; - num_junked = folder->summary->junk_count; - num_junked_not_deleted = folder->summary->junk_not_deleted_count; - num_unread = folder->summary->unread_count; - num_visible = folder->summary->visible_count; + num_deleted = camel_folder_summary_get_deleted_count (folder->summary); + num_junked = camel_folder_summary_get_junk_count (folder->summary); + num_junked_not_deleted = camel_folder_summary_get_junk_not_deleted_count (folder->summary); + num_unread = camel_folder_summary_get_unread_count (folder->summary); + num_visible = camel_folder_summary_get_visible_count (folder->summary); buffer = g_string_sized_new (256); uids = e_mail_reader_get_selected_uids (reader); -- cgit v1.2.3