Empty trash should have confirmation dialog

VERIFIED FIXED in mozilla1.9.1a2

Status

MailNews Core
Backend
--
enhancement
VERIFIED FIXED
15 years ago
4 years ago

People

(Reporter: Boris 'pi' Piwinger, Assigned: mats)

Tracking

Trunk
mozilla1.9.1a2
Bug Flags:
wanted-thunderbird3 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

15 years ago
I often hit "empty trash" by mistake (instead of "compact folder"). There is no
way to bring back the messages. So it would be very useful if there were an
(optional) warning, so that you could say no to it.

pi

Comment 1

15 years ago
I agree. 
This warning is only required for the function called from "File/Empty Trash",
not in the context-menue.

Comment 2

15 years ago
In the Finder in Mac OS and Mac OS X, hold Option while choosing Empty Trash
from the menu to bypass the warning.  I don't remember in OS9, but in OSX there
is no warning when using the contextual menu.  It would be nice for Mozilla to
behave the same way.

Is there a suitable modifier key on other platforms to bypass the warning when
selecting from the menu, or should that be implemented as Mac-only?

Updated

15 years ago
QA Contact: olgam → laurel

Comment 3

15 years ago
I also wish this feature was added.  I actually archive my trash in case I need
to search for a message later and I've lost 2 batches of email as a result the
fact that "Empty Trash" is right in between both "Search Messages" and "Compact
this Folder" in the right click menu.

I think a confirmation should be provided in both the Right Click Menu and the
File menu.

As far as a modifier to bypass, how about the control key.  I think I've seen
that used in other cases for the same behaviour but I can't recall where.
(Reporter)

Comment 4

15 years ago
*** Bug 125865 has been marked as a duplicate of this bug. ***

Comment 5

14 years ago
I disagree with comment 1 above. There should be a confirm dialog when Empty 
Trash is invoked from the context menu as well. Perhaps a way to satisfy both 
camps is a "Do not show me this dialog again" checkbox.

Comment 6

13 years ago
This has become no less of a problem, and I have now lost
several batches of mail in my Trash folder accidentally now
when attempting to compress my folders.  There really needs
to be a confirmation dialog on the Empty Trash option under
the File menu.  At the very least, perhaps the Empty Trash
option could be relocated or just removed - it doesn't really
belong there anyway.
Product: Browser → Seamonkey

Comment 7

12 years ago
*** Bug 260175 has been marked as a duplicate of this bug. ***

Updated

12 years ago
Assignee: sspitzer → mail

Updated

11 years ago
Assignee: mail → nobody
Component: MailNews: Main Mail Window → MailNews: Backend
Product: Mozilla Application Suite → Core
QA Contact: laurel → backend
(Assignee)

Updated

11 years ago
Assignee: nobody → mats.palmgren
(Assignee)

Comment 8

11 years ago
Created attachment 253044 [details] [diff] [review]
Patch rev. 1

Use the confirmToProceed() function from bug 189911.
Attachment #253044 - Flags: superreview?(bienvenu)
Attachment #253044 - Flags: review?(bienvenu)

Comment 9

11 years ago
Comment on attachment 253044 [details] [diff] [review]
Patch rev. 1

Thx, Mats, looks good.

One nit - Do we really need two identical don't ask me again strings?

 emptyJunkDontAsk=Don't ask me again.
+emptyTrashDontAsk=Don't ask me again.

are they ever going to be different?

There's some overlap with this code:

http://lxr.mozilla.org/mailnews/source/mailnews/imap/src/nsImapMailFolder.cpp#1406

We might want to just remove that imap code, and the associated pref, once this goes in.
Attachment #253044 - Flags: superreview?(bienvenu)
Attachment #253044 - Flags: superreview+
Attachment #253044 - Flags: review?(bienvenu)
Attachment #253044 - Flags: review+

Updated

9 years ago
Duplicate of this bug: 426492

Comment 11

9 years ago
I also would like a warning message before permanently deleted emails.

Updated

9 years ago
Duplicate of this bug: 447658

Comment 13

9 years ago
Mats: plan to check this in (with the one nit addressed)? 
Flags: wanted-thunderbird3+
(Assignee)

Comment 14

9 years ago
Created attachment 331827 [details] [diff] [review]
comm-central patch
(Assignee)

Comment 15

9 years ago
(In reply to comment #9)
> One nit - Do we really need two identical don't ask me again strings?

They are needed because confirmToProceed() derives both the
pref name and UI strings from its arg and I think we still
want different prefs for Junk and Trash.  So I checked it
in as is (sorry for the delay).

> We might want to just remove that imap code ...

Filed bug 448624
(Assignee)

Comment 16

9 years ago
http://hg.mozilla.org/comm-central/index.cgi/rev/6dce3f744b71

-> FIXED
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Updated

9 years ago
Target Milestone: --- → mozilla1.9.1a2
Product: Core → MailNews Core
Thank you. I like it.
Verified. Sorry for the delay.
Status: RESOLVED → VERIFIED

Comment 19

4 years ago
Does anybody remember why we have to use 2 separate pref sets for this? mail.*.dontAskAgain and mailnews.*.dontAskAgain ?
Thunderbird 

Can this be cleaned up today? Maybe for backwards compatibility accept both versions but only define defaults for the mailnews.* version?

Comment 20

4 years ago
Oh, incomplete sentence: Thunderbird sees both prefs so could use mailnews.* too. Even if we drop support for the mail.* variant immediately, users only will be reprompted and can set the new prefs.

Updated

4 years ago
Blocks: 448624
You need to log in before you can comment on or make changes to this bug.