! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Case insensitive sort of menu items


Description Alexander Rødseth 2014-01-02 12:50:05 CET
Created attachment 5291 
Case insensitive sort of menu items


Currently, garcon sorts the menu items in a case sensitive way. This makes it so that applications with names like "jEdit", "mtPaint" and "qGo" are placed at the bottom of the menu, instead of in alphabetical order.

The attached patch (output from "git diff") fixes this by calling the g_utf8_casefold function, which is suitable for this use according to the documentation (https://developer.gnome.org/glib/2.30/glib-Unicode-Manipulation.html#g-utf8-casefold).

I tested the patch on Arch Linux and it works perfectly fine here.

Best regards,
Alexander Rødseth
Comment 1 Alexander Rødseth 2014-01-02 16:42:59 CET
I see that two spaces (blanks) are missing in front of the second call to g_utf8_casefold. I can resubmit the patch, if so desired.
Comment 2 Alexander Rødseth 2014-05-15 12:03:20 CEST
Will this patch be included in the next version of Garcon?
Comment 3 Nick Schermer editbugs 2014-07-28 12:02:45 CEST
Sure, but beside that fact that the patch leaks all the casefolded names, we might want to cache them somehow since sorting it taking quite some time when building the menu.
Comment 4 Nick Schermer editbugs 2014-07-28 18:33:01 CEST
Fixed in 65a793c.
Comment 5 Alexander Rødseth 2014-07-28 20:49:26 CEST
Absolutely, caching would speed things up. However, the sorting is normally done on extremely few elements at a time, which leads me to wonder if anyone would notice a difference if the sorting itself was cached. It would have to be measured.

What I think could really have the potential for speeding things up, is the caching of .desktop files, as mentioned in this bug report: https://bugzilla.xfce.org/show_bug.cgi?id=10607

Thanks for accepting the patch. Looking forward to the 4.12 release.

Bug #10594

Reported by:
Alexander Rødseth
Reported on: 2014-01-02
Last modified on: 2014-07-28


Jannis Pohlmann
CC List:
1 user



Case insensitive sort of menu items (758 bytes, patch)
2014-01-02 12:50 CET , Alexander Rødseth
no flags

Additional information