Closed Bug 179891 Opened 18 years ago Closed 12 years ago

Empty trash should have confirmation dialog


(MailNews Core :: Backend, enhancement)

Not set


(Not tracked)



(Reporter: 3.14, Assigned: mats)




(2 files)

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.

I agree. 
This warning is only required for the function called from "File/Empty Trash",
not in the context-menue.
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?
QA Contact: olgam → laurel
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.
*** Bug 125865 has been marked as a duplicate of this bug. ***
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.
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
*** Bug 260175 has been marked as a duplicate of this bug. ***
Assignee: sspitzer → mail
Assignee: mail → nobody
Component: MailNews: Main Mail Window → MailNews: Backend
Product: Mozilla Application Suite → Core
QA Contact: laurel → backend
Assignee: nobody → mats.palmgren
Attached patch Patch rev. 1Splinter Review
Use the confirmToProceed() function from bug 189911.
Attachment #253044 - Flags: superreview?(bienvenu)
Attachment #253044 - Flags: review?(bienvenu)
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:

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+
Duplicate of this bug: 426492
I also would like a warning message before permanently deleted emails.
Duplicate of this bug: 447658
Mats: plan to check this in (with the one nit addressed)? 
Flags: wanted-thunderbird3+
(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

Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
Product: Core → MailNews Core
Thank you. I like it.
Verified. Sorry for the delay.
Does anybody remember why we have to use 2 separate pref sets for this? mail.*.dontAskAgain and mailnews.*.dontAskAgain ?

Can this be cleaned up today? Maybe for backwards compatibility accept both versions but only define defaults for the mailnews.* version?
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.
Blocks: 448624
You need to log in before you can comment on or make changes to this bug.