[evolution/gnome-3-10] Avoid multiple save of folder changes on application quit
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-10] Avoid multiple save of folder changes on application quit
- Date: Wed, 29 Jan 2014 19:05:38 +0000 (UTC)
commit b47a02ac31aa2b67a90f3df1681306b095951149
Author: Milan Crha <mcrha redhat com>
Date: Wed Jan 29 20:01:22 2014 +0100
Avoid multiple save of folder changes on application quit
While looking at bug #721286, I found out that mail_shell_view_prepare_for_quit_cb
calls a sync of the folder changes to the server, but mail_backend_prepare_for_quit_cb
does the same thing (or even more, because it calls to synchronize changes in all folders),
thus the former is redundant and can be dropped.
modules/mail/e-mail-shell-view-private.c | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
---
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index dd980e7..58f658a 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -499,18 +499,10 @@ mail_shell_view_reader_update_actions_cb (EMailReader *reader,
}
static void
-mail_shell_view_prepare_for_quit_done_cb (CamelFolder *folder,
- gpointer user_data)
-{
- g_object_unref (E_ACTIVITY (user_data));
-}
-
-static void
mail_shell_view_prepare_for_quit_cb (EMailShellView *mail_shell_view,
EActivity *activity)
{
EMailShellContent *mail_shell_content;
- CamelFolder *folder;
EMailReader *reader;
EMailView *mail_view;
GtkWidget *message_list;
@@ -523,18 +515,11 @@ mail_shell_view_prepare_for_quit_cb (EMailShellView *mail_shell_view,
mail_view = e_mail_shell_content_get_mail_view (mail_shell_content);
reader = E_MAIL_READER (mail_view);
- folder = e_mail_reader_ref_folder (reader);
message_list = e_mail_reader_get_message_list (reader);
-
message_list_save_state (MESSAGE_LIST (message_list));
- if (folder != NULL) {
- mail_sync_folder (
- folder, TRUE,
- mail_shell_view_prepare_for_quit_done_cb,
- g_object_ref (activity));
- g_object_unref (folder);
- }
+ /* Do not sync folder content here, it's duty of EMailBackend,
+ which does it for all accounts */
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]