Closed
Bug 553633
Opened 16 years ago
Closed 15 years ago
[PATCH] adding smart folder with space in name fails
Categories
(Thunderbird :: Folder and Message Lists, defect)
Thunderbird
Folder and Message Lists
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 553747
People
(Reporter: mixedpuppy, Assigned: mixedpuppy)
Details
Attachments
(1 file, 2 obsolete files)
I'm adding a new smart folder type with the following code:
let smartMode = gFolderTreeView._modes["smart"];
smartMode._flagNameList.push([Components.interfaces.nsMsgFolderFlags.Unused2,
"Mailing Lists", false]);
This works for inserting a new type and having the folder created, however folderPane.js fails to find the folder after the initial creation, causing a failure to display the unified folders pane. patch to follow.
| Assignee | ||
Comment 1•16 years ago
|
||
| Assignee | ||
Comment 2•16 years ago
|
||
There were a few more areas that had to be addressed to support adding new virtual folder types
Attachment #433586 -
Attachment is obsolete: true
| Assignee | ||
Updated•16 years ago
|
Assignee: nobody → bugmail
| Assignee | ||
Updated•16 years ago
|
Attachment #433590 -
Flags: review?(bugmail)
Comment 3•16 years ago
|
||
sid, do you have time to take a look at the patch, attachment 433590 [details] [diff] [review]
Assignee: bugmail → mixedpuppy
OS: Mac OS X → All
Hardware: x86 → All
| Assignee | ||
Comment 4•16 years ago
|
||
Attachment #433590 -
Attachment is obsolete: true
Attachment #433590 -
Flags: review?(bugmail)
| Assignee | ||
Comment 5•16 years ago
|
||
also see bug 553747, where I'm looking into ability to add new smart folder types easily without having to muck around with nsMsgFolderFlags.idl.
Comment 6•16 years ago
|
||
Comment on attachment 433599 [details] [diff] [review]
fix dynamically adding new smart folder types (hg diff)
Thanks for fixing this!
>diff --git a/mail/base/content/folderPane.js b/mail/base/content/folderPane.js
>--- a/mail/base/content/folderPane.js
>+++ b/mail/base/content/folderPane.js
>@@ -959,18 +959,17 @@ let gFolderTreeView = {
> else
> map[position] = folderItem;
> // No smart folder was added
> return null;
> }
>
> let smartFolder;
> try {
>- let folderUri = smartRootFolder.URI + "/" + folderName;
>- smartFolder = smartRootFolder.getChildWithURI(folderUri, false, true);
>+ smartFolder = smartRootFolder.getChildNamed(folderName);
getChildWithURI's third parameter is true, which implies a case-insensitive search. However I don't think getChildNamed is case insensitive -- could you double-check that this won't cause problems? I don't think there should be any, since I believe we've been using the same capitalization everywhere all along.
>+ let specialFlags = gFolderTreeView._modes["smart"]._allFlags;
So I'm fine with this here, but looking at bug 553747 it seems like we'll need a method for this -- extensions really shouldn't be poking around in underscored stuff if they can avoid it. getFolderTreeMode(aCommonName) maybe?
Attachment #433599 -
Flags: review+
Comment 7•16 years ago
|
||
Comment on attachment 433599 [details] [diff] [review]
fix dynamically adding new smart folder types (hg diff)
This should be trivially testable with Mozmill, so by our test policy it'll need one.
Attachment #433599 -
Flags: review+
| Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #6)
> > let smartFolder;
> > try {
> >- let folderUri = smartRootFolder.URI + "/" + folderName;
> >- smartFolder = smartRootFolder.getChildWithURI(folderUri, false, true);
> >+ smartFolder = smartRootFolder.getChildNamed(folderName);
>
> getChildWithURI's third parameter is true, which implies a case-insensitive
> search. However I don't think getChildNamed is case insensitive -- could you
> double-check that this won't cause problems? I don't think there should be any,
> since I believe we've been using the same capitalization everywhere all along.
Looking at nsMsgDBFolder.cpp#3329, it is using a case insensitive comparison.
| Assignee | ||
Comment 9•15 years ago
|
||
this bug was fixed along with some extension work
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•