After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 147813 - gnome_vfs_volume_compare, gnome_vfs_drive_compare shouldn't use strcmp()
gnome_vfs_volume_compare, gnome_vfs_drive_compare shouldn't use strcmp()
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: Other
2.14.x
Other All
: High minor
: ---
Assigned To: Christian Neumair
Christian Neumair
: 155248 (view as bug list)
Depends on:
Blocks: 128625 310048 321320 336815 336818
 
 
Reported: 2004-07-18 11:01 UTC by Christian Neumair
Modified: 2006-04-25 12:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch against HEAD. NULL paranoia. (3.05 KB, patch)
2004-07-18 11:02 UTC, Christian Neumair
none Details | Review
New patch (3.68 KB, patch)
2006-03-03 16:47 UTC, Christian Neumair
none Details | Review
Proposed drive/volume comparison patch (9.25 KB, patch)
2006-04-01 11:09 UTC, Christian Neumair
none Details | Review

Description Christian Neumair 2004-07-18 11:01:46 UTC
Currently, the drive/volume lists of the vfs monitor aren't sorted at all, for
instance resulting in the drive order "CD-ROM", "Floppy", "CD-ROM (2)" inside
the filechooser. IMHO, we ought to sort these. Pretty trivial since it boils
down to glist magic.

regs,
 Chris
Comment 1 Christian Neumair 2004-07-18 11:02:23 UTC
Created attachment 29624 [details] [review]
Proposed patch against HEAD. NULL paranoia.
Comment 2 Christian Neumair 2004-10-20 04:55:55 UTC
Any news?
Comment 3 Vincent Noel 2005-07-11 19:36:57 UTC
Maybe you should post that on nautilus-list as well ;-) It looks like it speeds
things up a lot.
Comment 4 Sebastien Bacher 2005-07-11 19:40:57 UTC
gnome-vfs list rather for gnome-vfs bugs :)
Comment 5 Vincent Noel 2005-07-11 19:46:33 UTC
Yeah I didnt think of that - since Alex is the maintainer for both and the
problem shows up in nautilus I figured it would help :p
Comment 6 Trevor Davenport 2005-09-28 23:52:34 UTC
What's happening with this?
Comment 7 Christian Neumair 2006-03-03 16:47:52 UTC
Created attachment 60579 [details] [review]
New patch

The last one was really crappy.
Comment 8 Alexander Larsson 2006-03-03 17:28:04 UTC
If anything we should sort by gnome_vfs_volume_compare / gnome_vfs_drive_compare. Nautilus already does this by itself in the views. But i don't think keeping the source lists sorted is the best way to handle it, because they get concatenated in e.g. gnome_vfs_volume_monitor_get_mounted_volumes() so the sort can only move within sublists.

Either we should sort in gnome_vfs_volume_monitor_get_mounted_volumes, or in the app, and since some apps don't need to get a sorted list from get_mounted_volumes i think this make much better sense to do in the app.
Comment 9 Christian Neumair 2006-04-01 11:08:11 UTC
I'm updating this bug report. The problem with the solution proposed in comment 8 is that the drive/volume comparison uses strcmp() instead of casefolding and using collation keys. Thus, the comparison is not case-insensitive and doesn't work properly unless you use ASCII.
Comment 10 Christian Neumair 2006-04-01 11:09:35 UTC
Created attachment 62521 [details] [review]
Proposed drive/volume comparison patch

Discussion:

http://mail.gnome.org/archives/gnome-vfs-list/2006-April/msg00000.html
Comment 11 Christian Neumair 2006-04-01 11:11:22 UTC
Marking bug 321320 as dependant on this one.
Comment 12 Federico Mena Quintero 2006-04-03 18:52:56 UTC
*** Bug 155248 has been marked as a duplicate of this bug. ***
Comment 13 Xavier Claessens 2006-04-07 20:50:40 UTC
patch for bug #321320 is commited and this bug depend on the patch proposed here... can we commit the proposed patch for _compare() ?
Comment 14 Christian Neumair 2006-04-25 12:04:54 UTC
A patch very similar to attachment 62521 [details] [review] was committed (just with one function invocation fix). GnomeVFS 2.14.2 should sort volumes/drives correctly.