Re: Bug in createimage?



Ottavio Campana wrote:
> 
> I just modified with  sed the source of an application  so that it could
> load the right images and I've noted a crazy behaviour of this function.
> 
> The source is the  one that was generated by glade, the  image had to be
> loaded and put in  a druid. If I specify a local  path (i.e. for example
> create_image("directory/name_of_file.gif") ) it works, the image appears
> and  everythning is  ok.  But if  I specifyan  absolute  path (i.e.  for
> example create_image("/path/to/directory/name_of_file.gif") ) it doesn't
> work as  it should. It  works only if  the program is  run in /.  So, it
> appears to be that the absolute path works as if it was local.
> 
> Why? Does it happen only to me?

create_image() is a function that Glade outputs in support.c.
It uses the gnome_pixmap_file() function which doesn't look like it
supports absolute paths.

You could just skip the call to create_image() and call the Imlib
function yourself:

  image = gdk_imlib_load_image (pathname);


Damon





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