The default bug view has changed. See this FAQ.

sort entries in the "Trust junk mail headers set by" menulist

RESOLVED FIXED in Thunderbird 22.0

Status

MailNews Core
Account Manager
--
trivial
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: aceman, Assigned: aceman)

Tracking

({polish})

Trunk
Thunderbird 22.0
polish
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

3.42 KB, patch
aceman
: review+
Details | Diff | Splinter Review
(Assignee)

Description

4 years ago
Sort the entries (spam filter names) in the "Trust junk mail headers set by" menulist. Currently they are random, as the directory service returns them. On the same machine I get different orders with different TB versions.
(Assignee)

Comment 1

4 years ago
Created attachment 720416 [details] [diff] [review]
patch

Apply on top of patch in bug 846694.
Attachment #720416 - Flags: review?(iann_bugzilla)
Comment on attachment 720416 [details] [diff] [review]
patch

Review of attachment 720416 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/base/prefs/content/am-junk.js
@@ +257,5 @@
>      if (ispDirectory)
> +      menuEntries.push.apply(menuEntries, buildServerFilterListFromDir(ispDirectory, menuEntries));
> +  }
> +
> +  menuEntries.sort();

Array.sort() is case sensitive:
["Aaron", "bethany", "Camille"].sort() returns ["Aaron, "Camille", "bethany"]
Two possibilities to fix this:
https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIXULSortService and http://mxr.mozilla.org/comm-central/source/editor/ui/dialogs/content/EdDialogCommon.js#1005
(Assignee)

Comment 3

4 years ago
Created attachment 720426 [details] [diff] [review]
patch v2

Thanks, so I'll use .localeCompare.
Attachment #720416 - Attachment is obsolete: true
Attachment #720416 - Flags: review?(iann_bugzilla)
Attachment #720426 - Flags: review?(iann_bugzilla)

Comment 4

4 years ago
Comment on attachment 720426 [details] [diff] [review]
patch v2

Seems to do what it says on the tin r=me
Attachment #720426 - Flags: review?(iann_bugzilla) → review+
(Assignee)

Updated

4 years ago
Attachment #720426 - Flags: review?(kent)

Comment 5

4 years ago
Comment on attachment 720426 [details] [diff] [review]
patch v2

Looks good.
Attachment #720426 - Flags: review?(kent) → review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
This doesn't apply cleanly. Please rebase.
Keywords: checkin-needed
(Assignee)

Comment 7

4 years ago
Created attachment 730290 [details] [diff] [review]
patch v3
Attachment #720426 - Attachment is obsolete: true
Attachment #730290 - Flags: review+
(Assignee)

Updated

4 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/99523d1da295
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 22.0
(Assignee)

Updated

3 years ago
Depends on: 946669
You need to log in before you can comment on or make changes to this bug.