talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 6e07ee63b095bed0a715007327639c9e0a51c723
parent 0f3a48d7db4a051e11fb8c56d25356d42b8643d8
Author: Paul <paul@claws-mail.org>
Date:   Tue, 16 Apr 2013 09:50:48 +0100

fix bug #2909, 'Changing folder quickly can cause wrong email to be deleted'

Diffstat:
Msrc/summaryview.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/summaryview.c b/src/summaryview.c @@ -4372,6 +4372,8 @@ void summary_delete(SummaryView *summaryview) if (summary_is_locked(summaryview)) return; if (!summaryview->folder_item) return; + + START_LONG_OPERATION(summaryview, FALSE); if (!summaryview->folder_item->folder->account || summaryview->folder_item->folder->account->imap_use_trash) { if (!prefs_common.live_dangerously) { @@ -4385,7 +4387,10 @@ void summary_delete(SummaryView *summaryview) buf, GTK_STOCK_CANCEL, "+"GTK_STOCK_DELETE, NULL); g_free(buf); - if (aval != G_ALERTALTERNATE) return; + if (aval != G_ALERTALTERNATE) { + END_LONG_OPERATION(summaryview); + return; + } } } @@ -4402,7 +4407,6 @@ void summary_delete(SummaryView *summaryview) /* next code sets current row focus right. We need to find a row * that is not deleted. */ - START_LONG_OPERATION(summaryview, FALSE); folder_item_set_batch(summaryview->folder_item, TRUE); for (cur = GTK_CMCLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next) { sel_last = GTK_CMCTREE_NODE(cur->data);