Re: [Gtk-osx-users] Trouble loading images with gtk-osx ('Couldn't recognize the image file format for file')

John Ralls wrote:
> On Sep 23, 2009, at 11:28 PM, John Pye wrote:
>> 24/09/09 4:21:47 PM [0x0-0x8f08f].edu.cmu.cheme.ascend[3877]
>> (ascend:3877): libglade-WARNING **: Error loading image: Couldn't
>> recognize the image file format for file
>> '/Users/john/ascinst/Applications/ 
>> glade/incidence.png'
> When you run "open" from the command line, your shell  
> environment is passed in to the application; when you double-click in  
> Finder, a default environment is passed in, modified by ~/.MacOS/ 
> Make sure that your startup script sets all the environment variables  
> your app needs before exec-ing your program.

I finally identified what the offending/missing environment variables 
were here. What needs to be added to the environment can be seen here:

    if platform.system()=="Darwin":
        if not 'XDG_DATA_HOME' in os.environ:
#            os.environ['XDG_CONFIG_HOME']=os.path.expanduser('~/.config')
#            os.environ['XDG_CACHE_HOME']=os.path.expanduser('~/.cache')
#            os.environ['XDG_CONFIG_DIRS']='/sw/etc/xdg'
#            os.environ['XML_CATALOG_FILES']='/sw/etc/xml/catalog'
            restart = 1

So, basically, I need to have XDG_DATA_DIRS and XDG_DATA_HOME in my 
environment in order for GTK's image loading routines to work correctly!

What is this XDG thing, and why does GTK-OSX (or at least my copy of it) 
depend upon it?

Does this imply that I didn't have a clean environment when I built GTK?


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