[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] [PATCH]: Icon themability patch for -GUI images/icons

From: Alex Perez
Subject: Re: [RFC] [PATCH]: Icon themability patch for -GUI images/icons
Date: Sat, 30 Oct 2004 12:40:41 -0700
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Fred Kiefer wrote:
Alex Perez wrote:

This patch builds upon a previous non-behavior-changing patch which I wrote and Alexander Malmberg comitted this morning on my behalf. For some background:

NSWorkspace had a private convenience class called _getImageWithName: which, with the permission of Alexander Malmberg, we moved to NSImage and renamed to -standardImageWithName: and modified slightly so the alternate: argument was not necessary (it now intelligently looks for "ImageName" and then for "common_ImageName" (and anything else for that matter, like "camaelon_ImageName", if you override the method.) In any event, What this patch does is enable icon themability. You can have sets of icons which you can use by simply having a very small bundle override the -getImageWithName: method.

This patch builds upon the previous one, by making nearly every single image which was previously loaded directly via NSImage -imageNamed: "common_ImageName" load with the new convenience NSImage method.

Unless you want your own icon set, you will notice zero behavioral change.

Everyone, please comment on this...If I don't hear anything negative from anyone by tuesday or so of next week, I will commit it as-is. It works on my machine.

Sorry to repeat myself, but NSImage has been themable all the time. There is the file nsmapping.strings in gui/Images, which defines which file name will be used instead of a given image name. What else would you need for themability? Yes, the problem is that this feature is currently not widely used in GNUstep GUI and in the GNUstep applications. Hard coded image names are often used in them. Do you expect the introduction of an additional API, which you even expect to be overwritten in theme bundles to resolve this?

This method is far more flexible then the nsmapping.strings which IMHO is a shoddy solution at best, does not allow for multiple sets of icons to be easily loaded/unloaded, etc. Alexander Malmberg even suggested discussing the possibility of removing it, and personally I agree with both him and Nicolas Roard, that it "adds complexity for not much added value". To reiterate: you are incorrect in asserting that an additional API was created. Nothing extra was created; it was only moved, renamed as the suggestion of alexander malmberg, and very slightly improved upon.

Sorry, I am actually getting bored of this and most other pseudo-discussions going on in the GNUstep mailing lists. Perhaps I should think about dropping out of them.

It's up to you, but if you feel the need to disparage a new contribution instead of explaining in a reasonable manner why you disagree with said contribution, maybe it would be for the best.

Alex Perez

reply via email to

[Prev in Thread] Current Thread [Next in Thread]