[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Using a resource file inside a .star package
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] Using a resource file inside a .star package |
Date: |
Thu, 26 Aug 2010 13:45:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5 |
On 08/26/2010 01:18 PM, ZuLuuuuuu wrote:
Hello,
I have an application which uses an image as its icon. I included the image
into the .star package I created for the application as:
<file>Resources/logo.png</file>
My question is, how can I refer to this file inside my source files? For
example:
GtkWindow setDefaultIconFromFile: ???
This is currently not possible because Gtk doesn't know about .star files.
Gtk bindings should provide its own implementation of
#setDefaultIconFromFile: that builds its own GdkPixbuf. It's not hard
to do.
When this is done, you would do this as
GtkWindow setDefaultIconFromFile:
(PackageLoader packageAt: 'YourPackage') / 'Resources/logo.png'
Note that VisualGST is already loading pixbufs from resources, so you
can take a look there as well.
Paolo