Patch for file sorting function type

Discuss development issues and submit patches here
Post Reply
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Patch for file sorting function type

Post by ajs »

Patch for file sorting function type

This patch adds an option to choose how to compare file names.
By default, E++ uses a logical comparison (StrCmpLogicalW). This means that the file 02.txt would be listed after the file 1.txt.
This patch allow to choose between logical comparison and normal comparison (in the latter case, the file 02.txt would be listed before the file 1.txt because of the leading 0)

The option is called "Use logical comparison for file sorting" and it is in Options -> Files and folders

Patch against commit 194
Attachments
patch_53__v194.7z
(5.01 KiB) Downloaded 497 times
David Erceg
Site Admin
Posts: 936
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch for file sorting function type

Post by David Erceg »

Sorry, but rejected. User flexibility is all well and good, but at some point things have to be constant. It also adds quite a bit of code for something that's very trivial.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for file sorting function type

Post by ajs »

David Erceg wrote:Sorry, but rejected. User flexibility is all well and good, but at some point things have to be constant. It also adds quite a bit of code for something that's very trivial.
I don't agree. It may be trivial from your point of view, but different users have different needs and preferences. For example, in my case I prefer to have the "normal sorting function", not the logical one. And I know at least two more people who also have the same preference.
I would understand your objection if this patch changed the sorting function from "logical" to "normal" in a fixed way. But since it added a user option for it, I don't see where the problem is in letting the user choose the one he likes the most.
David Erceg
Site Admin
Posts: 936
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch for file sorting function type

Post by David Erceg »

I understand the argument, and in reality it can be made about virtually anything. Every user will have a different way that they want to do things, but that doesn't mean that everything needs to be user configurable. The fact that I think it's trivial while you don't simply reinforces this point.

At the very least, it would have to be a command line switch, or hidden in some other way. I'm also concerned that it adds a relatively large amount of code over something small.

Finally, please tell me about new features like this before you send a patch in. I'm ok with bug fixes, but I'd prefer to know about additional functionality before it's coded.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for file sorting function type

Post by ajs »

David Erceg wrote:I understand the argument, and in reality it can be made about virtually anything. Every user will have a different way that they want to do things, but that doesn't mean that everything needs to be user configurable. The fact that I think it's trivial while you don't simply reinforces this point.

At the very least, it would have to be a command line switch, or hidden in some other way. I'm also concerned that it adds a relatively large amount of code over something small.

Finally, please tell me about new features like this before you send a patch in. I'm ok with bug fixes, but I'd prefer to know about additional functionality before it's coded.
Ok David, no big deal for me (I will use this patch on my local developed version). As for the list of new features, see my new PM
Post Reply