Closed Bug 847172 Opened 11 years ago Closed 11 years ago

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

Categories

(MailNews Core :: Account Manager, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 22.0

People

(Reporter: aceman, Assigned: aceman)

References

Details

(Keywords: polish)

Attachments

(1 file, 2 obsolete files)

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.
Attached patch patch (obsolete) — Splinter Review
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
Attached patch patch v2 (obsolete) — Splinter Review
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 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+
Attachment #720426 - Flags: review?(kent)
Comment on attachment 720426 [details] [diff] [review]
patch v2

Looks good.
Attachment #720426 - Flags: review?(kent) → review+
Keywords: checkin-needed
This doesn't apply cleanly. Please rebase.
Keywords: checkin-needed
Attached patch patch v3Splinter Review
Attachment #720426 - Attachment is obsolete: true
Attachment #730290 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/99523d1da295
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 22.0
Depends on: 946669
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: