gnustep-dev
[Top][All Lists]
Advanced

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

Theming non-main-app images


From: Riccardo Mottola
Subject: Theming non-main-app images
Date: Tue, 17 Nov 2015 18:47:49 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39

Hi,

I want to be able to theme the recycler bin icons of GWorkspace.

The icons themselves are in "many places" I find the Recycler icon in three places:

Framework: /FSNode/Resources/Images/Recycler.tiff
GWorkspace app: /GWorkspace/Resources/Icons/Recycler.tiff
Recycler app: Recycler/Resources/Images/Recycler.tiff

The code however is done like this:

NSBundle *bundle = [NSBundle bundleForClass: [FSNodeRep class]];

imagepath = [bundle pathForResource: @"Recycler" ofType: @"tiff"];
trashIcon = [[NSImage alloc] initWithContentsOfFile: imagepath];

I think this code is done so that the Framework's Resource, indepdendently if it is called from inside GWorkspace or Recycler.

Can I "theme" a Framework by specifying a bundle idnentifier?

Nevertheless, having duplication, I tried to "theme" this quick way:
trashIcon = [[NSImage imageNamed:@"Recycler.tiff"] retain];

and then providing an Image for GWorkspace in my theme (I would probably duplicate it wor Recycler then). However I get no Icon at all.

What am I doing wrong? Another way to make this themable?

Riccardo



reply via email to

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