User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:18.104.22.168) Gecko/20110414 Thunderbird/3.1.10
A custom column layout can be created and applied to most folders, but not to virtual folders (aka search folders).
Therefore, for every (old or new) search folder, one's preferred column layout has to be re-created manually.
Steps to Reproduce:
1. Create a custom column layout
2. Apply your custom column layout to "all folders and subfolders" of a mail account (that also has virtual folders)
3. Virtual folders (search folders) of this account will still be in default layout
Virtual folders (search folders) of any account are always created in default layout, and remain such unless manually changed one by one.
Virtual folders (search folders) should inherit a custom layout that is applied to "all folders and subfolders" of the respective mail account
It should be possible to create and save a custom column layout that in turn is applied automatically to every new folder, including virtual folders (search folders).
*** Bug 576528 has been marked as a duplicate of this bug. ***
Please note that the original bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=505035) had 74 votes, so this is something a significant number of people want.
When implementing bug 505035, asuth set this to only work on folders into which messages can be filed by the user (So POP3, IMAP4, RSS, Local Folders).
I'd like to ask if that was intentional? Maybe, because Virtual folders could have a different layout to normal folders. E.g. at least by default they add the Location column.
Technically the columns settings can be copied to virtual folders and also newsgroups if we expose the accounts/folders in the menu.
So the question is how to implement this:
1. allow to apply columns unconditionally to any folder selected and its children, regardless of type. So e.g. copy columns from POP3 folder to Virtual folder or newsgroup.
2. allow to apply columns only to folders of the same type (type being in [normal, virtual, newsgroup] or based on the server type) skipping folders in the selection that do not match. So when copying from POP3 folder to another POP3 account and choosing all folders, Virtual folders there will be skipped.
(In reply to :aceman from comment #4)
> When implementing bug 505035, asuth set this to only work on folders into
> which messages can be filed by the user (So POP3, IMAP4, RSS, Local Folders).
I don't see anything in my patch on bug 505035 that limited the type of folders we apply things to.
Now, for deciding whether to inherit columns or not from the Inbox when you enter a folder, we definitely do blacklist certain cases. This is determined by to doNotInherit flag which has its rationale in a comment:
If applying the config to virtual folders isn't working, I think it's a bug or some emergent property of virtual folders. Make DBViewWrapper._prepareToLoadView is being called at the wrong time, or not firing?
(In reply to Andrew Sutherland (:asuth) from comment #5)
> I don't see anything in my patch on bug 505035 that limited the type of
> folders we apply things to.
It is the mode="filing" on the folder picker. Virtual and news folders can't be filed to. And then in MailUtils.js::setStringPropertyOnFolderAndDescendents() you also exclude !folder.canFileMessages.
> If applying the config to virtual folders isn't working, I think it's a bug
> or some emergent property of virtual folders. Make
> DBViewWrapper._prepareToLoadView is being called at the wrong time, or not
I was talking about the applying from threadPaneColumnPicker.xml and said that applying columns to virtual and news folders DOES work for me.
So the question is which folders to expose in the threadPaneColumnPicker folder picker (apply columns to...) and if to skip some when applying columns.
(In reply to :aceman from comment #6)
> (In reply to Andrew Sutherland (:asuth) from comment #5)
> > I don't see anything in my patch on bug 505035 that limited the type of
> > folders we apply things to.
> It is the mode="filing" on the folder picker. Virtual and news folders can't
> be filed to. And then in
> MailUtils.js::setStringPropertyOnFolderAndDescendents() you also exclude
Ah, I should have found the mercurial link instead of looking at the diff; they're not the same! (There were a lot of messages in that bug... :)
I think my intent in using canFileMessages was to skip over \NoSelect IMAP folders. Virtual folders and news folders being excluded were an unintentional side effect. Specifically, my comment was "// skip folders that can't hold messages, no point setting things there." which makes me think I was treating canFileMessages as an indicator of whether there could be messages in a folder or not, rather than what it actually means.
I 100% agree that we want those settings to be able to apply to virtual folders and news folders. Ideally we would use whatever our proxy for \NoSelect is, but otherwise it seems fine to put useless properties on those rather than short-change virtual folders/news folders. I think we can have NNTP fake-server accounts now, so all of this should be testable?
*** Bug 854847 has been marked as a duplicate of this bug. ***
Created attachment 731215 [details] [diff] [review]
Comment on attachment 731215 [details] [diff] [review]
r=asuth by inspection
*** Bug 834571 has been marked as a duplicate of this bug. ***
Which bits of this bug are fixed? There are several cases described above, the one I'm particularly concerned about - that Search Folders (as created when you click "Open email as list" don't remember your preferred column layout and have to be edited each time (e.g. to add Location, or switch From to use Correspondant (from the SHowInOut extension) both of which are often relevant when you are searching).
Since this bug is marked as Fixed, and its not 100% clear its the same issue, I believe I'm supposed to file a new bug - which I've done Bug #931118