Version: (using KDE KDE 3.3.0) Installed from: SuSE RPMs OS: Linux It would be a great feature of Konqueror if it would support "Natural Order" sorting like PHP. That means: Normal Sorting: 1 img1.png 2 img100.png 3 img2.png Natural Order sorting: 1 img1.png 2 img2.png 3 img100.png I've read in the PHP Manual (www.php.net") that it's homepage is: http://sourcefrog.net/projects/natsort Here you can download it & see more examples. It's freeware.
*** This bug has been confirmed by popular vote. ***
Rather than referring to an extern project. The sorting just needs to separate strings in text and number parts, and then sort each part individually (e.g. img=img and 2<100).
*** Bug 121927 has been marked as a duplicate of this bug. ***
it makes sense to include this feature in KDE Bug Tracking System see the item "version" http://bugs.kde.org/query.cgi
As long as there is an option to disable it, I am in favor.
I talked to people on #kde-devel and was told that the underlying data model of Konqueror is going to be adopted to the QT 4.x means. Hence I looked into dolphin which is supposed to use the new data model. I adapted the code from http://sourcefrog.net/projects/natsort to work with QStrings (and Unicode/locales) and came up with the following patch. Martin Pool agreed to relicense the code under GPL or LGPL. It probably makes sense to move the natural order sorting code to kdelibs/kdecore/strings/kstringhandler.*. What do you think? I'd be happy to hear about reviews of the patch.
Created attachment 19213 [details] Patch for natural order sorting for dolphin
Will this get in trunk?
Dolphin now use the natural sort. I imagine that konqueror will use the dolphin engine for viewing files right? We can live without this feature in KDE 3.x :-)
I think we can close this request. The patch has been applied to Dolphin. Konqueror uses the dolphin part. File > Open uses natural sorting order as well.
So long as Konqueror in KDE4 uses natural sort, then we can close the bug. I don't think that I'll switch to Dolphin. As Konqueror uses the dolphin part, this should not be a problem. Thanks.
Which version of dolphin has natural sorting? I have 0.9.2 and it doesn't have natural sorting.
Fixed in KDE 4. Verified with konqueror 3.97 and dolphin 0.95
*** Bug 91391 has been marked as a duplicate of this bug. ***
Will there be/is there a way to disable natural sorting?
Hmmm... Why would anyone want to disable natural sorting?
This may not occur that often, but sometimes maybe: If you represent data of binary trees in the following way: filename0 --> First branch to the left filename1 --> First branch to the right filename01 --> First branch to the left, then right filename10 --> First branch to the right, then left Then the non-natural sorting would make more sense. Also, if you don't seperate Version numbers by dots, the non-natural sorting would be better: filename2 --> Version 2 filename21 --> Version 2.1 filename3 --> Version 3 Of course, this are not common cases of use - but they are possible so I think there should be a way to enable/disable this for specific folders
SVN commit 1127469 by carewolf: Fix natural sort. It assumes too much about the structure of the name. BUG: 234273 CCBUG: 87286 M +5 -1 kstringhandler.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1127469