GNOME Bugzilla – Bug 402656
Cursor theme list display
Last modified: 2007-08-07 18:18:50 UTC
Most cursor themes at gnome-look.org install several (color) variants and sizes of the same basic theme. I found out that gnome-mouse-properties does not support some of the more popular cursor sizes, and the "Pointers" list quickly becomes an ugly unorganized mess if you install two or three themes that come in five different colors and three different sizes each. I'll attach a small, trivial patch that: 1. Adds support for two of the more popular cursor sizes at gnome-look.org (40/"regular", 64/"huge"). 2. Sorts the "Pointers" list alphabetically (quite handy if you have more than 10 cursor themes installed). Other information: Version info: control-center-2.16.3.
Created attachment 81562 [details] [review] Patch to support two popular cursor sizes and a sorted theme list
Looks good, although I think this may have to wait until 2.20 since we are already in the feature freeze period for 2.18.
Well, I don't know how strict these rules are, but I'd put this patch into the "[...] refining the new features [...]" category (as per http://live.gnome.org/ReleasePlanning/Freezes#head-3a79564fea2b5b8ed57e2d202d07d2dbfa828136) rather than anything else. And it's not even _new_ features that are refined. gnome-mouse-properties already does read cursors of various sizes, and now there's two more sizes. It already does display a list of installed cursor themes, and now the list is sorted. Not a big deal, IMHO - it's not like the underlying basic functionality hasn't been there before. But that's your call, of course, as I won't be the one getting LARTed by the Freeze Break Squad anyway. ;-)
I don't think this qualifies as a new feature, either.
The patch is so small, I doubt anyone would notice it anyway ;-) It looks fine on first glance, but someone ought to test exactly how it works, and why this apparent filtering is done in the first place.
You mean the size filtering? That's probably only done to be roughly in sync with the icon sizes from f.d.o's hicolor-icon-theme, plus 12 for really really small cursors, minus anything larger than 48. This throws out 40 (not in hicolor-icon-theme) and 64 (which is admittedly ridiculously large for a cursor, but hey - each to her/his own! :-). Anyway, the size filtering seems pretty much arbitrary to me, probably just a common sense/best guess/try to cover most standard cases decision. At least there's nothing in the code that would explain that cursors must not be of any other size. As far as X.org's Xcursor library is concerned, the only limit is 32767x32767 as an upper limit for the cursor size (look for XCURSOR_IMAGE_MAX_SIZE in X11/Xcursor/Xcursor.h). Also GDK's gdk_pixbuf_new_from_data() (which is called from gdk_pixbuf_from_xcursor_image()) doesn't impose any size restrictions, AFAIK. So, considering this, plus the fact that the currently highest-rated cursor theme on gnome-look.org (see http://www.gnome-look.org/index.php?xsortmode=high&page=0 and http://www.gnome-look.org/content/show.php?content=32627) actually uses these "non-standard" sizes, I'd say it's a rather safe bet to include this patch. What do you think?
Oh, and I just checked the old CVS/SVN logs - the size filtering has been there since day one, when mouse theme management was first introduced to gnome-mouse-properties based on a small application called "gcursor", back in July 2005: http://svn.gnome.org/viewcvs/gnome-control-center/trunk/capplets/mouse/gnome-mouse-properties.c?rev=5894&view=markup http://svn.gnome.org/viewcvs/gnome-control-center/trunk/capplets/mouse/gnome-mouse-properties.c?rev=5894&r1=5782&r2=5894 So I guess that specific selection of supported sizes is only there for historic reasons.
I've comitted the patch, but I have not closed the bug as we should probably take a look at whether we can remove the size filter.
Turns out we can't really remove the filter because of the way xcursor files (and API) work. Closing...