Re: gnome_file_locate writes:
> gnome-util.c, line 70: (gnome_file_locate)
> 	if(filename[0] == '/')
> This checks if gnome_file_locate was given an absolute path.  If the path is
> absolute, it adds that path to the locations list.
> Shouldn't this also support relative paths?
> If the user wants to try out the app before they run 'make install', I'd
> like to be able to specify something like "../pixmaps/filename.png" and 
> have gnome_pixmap_file still return a path.

For debugging I usually do this:

filename = gnome_pixmap_file("blah.png");
#ifdef DEBUG
 if (filename == NULL) 
    filename = g_strdup(TOP_SRCDIR"/pixmaps/blah.png");

where TOP_SRCDIR is defined in and passed in to the app
via a -D in INCLUDES. Look at 'gconf' in CVS for how to set up and for this.

The ../pixmaps/filename.png thing doesn't actually work all the time,
since you can configure with --builddir=/somewhere/else


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