[Geany] 'natural sort' in file browser

Enrico Tröger enrico.troeger at xxxxx
Wed Feb 27 14:20:45 UTC 2008


On Wed, 27 Feb 2008 12:01:34 +0000, Nick Treleaven
<nick.treleaven at btinternet.com> wrote:

> On Mon, 25 Feb 2008 11:58:15 +0100
> Harold Aling <h.aling at home.nl> wrote:
> 
> [...]
> > GTK Open dialog:
> > File_1.ext
> > File_2.ext
> > File_10.ext
> > File_11.ext
> > File_100.ext
> > 
> > I don't know if this would be an easy fix, but it would help me a lot!
> 
> I think we should do this. Probably a related issue is using
> case-insensitive sorting as well. I think there may be a function in
> GLib for sorting filenames that does this, but I can't seem to find it

I think GLib(or maybe GTK not completely sure) sorts file lists
automatically. At least, if I start a GTK app on my system it uses the
German locale and when I open a GTK file open dialog, files are listed
case-insensitive, i.e. I get a list of
k.file
M.file
n.file
O.file
p.file
If I start the same app with the C locale(LANG=C app) the file open
dialog lists the files sorted by case:
M.file
O.file
k.file
n.file
p.file

Maybe there is a GTK/GLib preference which can be set by the user in
~/.gtkrc-2.0. This isn't really related to the topic, I just wanted to
mention it ;-).


By the way, if I remember correctly, "naturally" means in relation to
file sorting the sorting files are actually saved on the disc, the
"natural" sort. This is what you get when you read the contents
of a directory. So, there is no need that files in a directory have any
real sorting.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20080227/cb9f5200/attachment.pgp>


More information about the Users mailing list