diff options
author | Milan Crha <mcrha@redhat.com> | 2014-01-30 03:01:22 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2014-01-30 03:01:22 +0800 |
commit | 285c6727853e4a5db88dde8ff300dbfc13ea176e (patch) | |
tree | d73d80ed0b4d197ba344b8ac26d7e88e946edc6a | |
parent | b9844c6afab3f15f4eafc978dee315cc047562e3 (diff) | |
download | gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar.gz gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar.bz2 gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar.lz gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar.xz gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.tar.zst gsoc2013-evolution-285c6727853e4a5db88dde8ff300dbfc13ea176e.zip |
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.
-rw-r--r-- | 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 618351a8d6..7b0460d2cb 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -495,18 +495,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; @@ -519,18 +511,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 |