[Glade-users] Button with image



On Mon, 2007-03-26 at 13:36 -0600, Jeffrey Barish wrote:
I want a button with an image, so I change the Edit Type of the button to
Container and drop an image in the container.  Then on the image's
properties, I select Image Type Filename and specify the File Name using
the ... button.  Two things go wrong.  First, the image file lives in a
subdirectory of the glade file.  Glade copies the image file into the
directory of the glade file.  If I insert "subdirectory/" before the image
filename, Glade removes the prefix.

This is intended albiet it could be improved (theres a bugzilla entry
wrt resource files in glade projects for that), point is that libglade
will always search in the CWD or in the directory containing the glade
file.

Note that full-paths should also work from the libglade POV, not sure
if the editor will allow you to specify a full-path ATM though.

Second, my glade file contains a property for the image with name="stock"
and value gtk-missing-image.  That property seems to take precedence over
the pixbuf property, so what appears when I run my program is the broken
icon.  I have to manually delete the offending property to get the image to
appear correctly.

That is a bug that has been fixed for a while, sorry for the
inconvenience (it's fixed in 3.0.3 & altenatively 3.2.x).

Cheers,
               -Tristan






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