Closed Bug 473215 Opened 11 years ago Closed 11 years ago

hide/disable archive button when in archive folder


(Thunderbird :: Mail Window Front End, defect)

Windows XP
Not set


(Not tracked)

Thunderbird 3.0b2


(Reporter: Bienvenu, Assigned: Bienvenu)


(Blocks 1 open bug)


(Whiteboard: patch awaiting review)


(1 file)

We should hide or disable the archive button when displaying a message in the archive folder.
We should make sure the archive command doesn't do anything in this case either. And I said "the archive" folder, I should have said "an" archive folder. I don't remember if the sub-folders of the archive folder have the archive folder flag set...if they do, that would make this easier.
Target Milestone: --- → Thunderbird 3.0b2
Lets hide the button when in the archives (or sub-archives) folder.
Attached patch proposed fixSplinter Review
this removes the archive button when the current message is in a folder that's an archive folder, or the child of an archive folder.
Attachment #356869 - Flags: review?(mkmelin+mozilla)
Flags: blocking-thunderbird3+
Whiteboard: patch awaiting review
I definitely think this is the right thing to do for now.  However I also just saw davida try to archive messages from his mobile device.  Most mobile devices only offer simple move / copy functions, but we can't expect that people will archive correctly into the right sub folders (Archive/YYYY/YYYY-MM).  

It might make sense to allow for archiving messages in the main Archive folder such that people on other clients can move messages to the Archive folder and then cleanup later in Thunderbird.  Or perhaps Thunderbird could do the cleanup automatically...  There might be other better ways to solve this as well, but I think we need to be aware of the limited nature of archiving from other clients and then allow people to organize properly in Thunderbird after the fact.
Specifically, I now have an email in my Archives toplevel folder, and I do want to be able to tell Tb to move it into the right month-based folder.
Comment on attachment 356869 [details] [diff] [review]
proposed fix

>+        return GetNumSelectedMessages() > 0 && folder &&
>+          !(IsSpecialFolder(folder, Components.interfaces
>+                                    .nsMsgFolderFlags.Archive, true));

The wrapping here and the other place looks weird to me. Let the line be as long as it needs, make a local nsMsgFolderFlags to shorten it down, or at least put the dot on the first line.

Besides that, works as it should! r=mkmelin
Attachment #356869 - Flags: review?(mkmelin+mozilla) → review+
fix checked in, with slightly long lines.
Closed: 11 years ago
Resolution: --- → FIXED
this bug does not appear to be solved on thunderbird 24.1.1 on Windows 7 Ultimate SP1 32bit.

still have the archive button when i'm inside the archive folder.

all the best,
You need to log in before you can comment on or make changes to this bug.