#9402 closed Patch (fixed)
Support customizable sort mode
Reported by: | Francois Ferrand | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | FileZilla Client |
Keywords: | Cc: | ||
Component version: | Operating system type: | ||
Operating system version: |
Description
Add support case sensitive, case insensitive and natural sort modes.
The mode is used in file list view as well as directory list view.
The patch also includes the UI and settings changes and unit tests.
Attachments (3)
Change History (9)
by , 11 years ago
Attachment: | 0001-Support-sensitive-insensitive-and-natural-name-sort.patch added |
---|
comment:1 by , 10 years ago
Status: | new → moreinfo |
---|
by , 10 years ago
Attachment: | 0001-Support-sensitive-insensitive-and-natural-name-sort.2.patch added |
---|
patch v2
comment:2 by , 10 years ago
Status: | moreinfo → new |
---|
Natural sort from http://sourcefrog.net/projects/natsort/ has some strange behavior as well: it produces 010 < 02, as part of its behavior of not ignoring leading zeros, which tends to give more reasonable results on decimal fractions (e.g. it produces 0.010 < 0.02).
Ignoring fractions seems more reasonable for file names, since we probably do not have fractions in file names, except for version numbers which should be sorted 'normally'.
Thus I just fixed my earlier implementation, to fix the 25 < 021 issue, and added the test cases from http://sourcefrog.net/projects/natsort/, except for the two cases '1.010' < '02' and '1.02' < '1.1' (which would break '010' > '02' and '02' > '1', respectively).
Other issues taken into account as well.
comment:3 by , 10 years ago
Status: | new → moreinfo |
---|
Version numbers usually don't have leading zeroes in each segment. FileZilla 3.008.001 would just be bizarre ;)
Two issues still:
The choice on some platforms still has the wrong item sufficed with " (default)". I'd solve it using platform attributes in the XRC file: http://docs.wxwidgets.org/trunk/overview_xrcformat.html#overview_xrcformat_platform
Inconsistent indentation in the patch. FileZilla uses tabs for indentation.
by , 10 years ago
Attachment: | 0001-Support-sensitive-insensitive-and-natural-name-sort.3.patch added |
---|
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks, I've applied and committed your patch. Keep up the good work.
comment:6 by , 10 years ago
Small follow-up: I've refactored the sorting code to greatly reduce code duplication.
A couple of issues, ordered by severity:
Could you please address these issues?