[glade--]bug in including pixmaps



Hello glade-- folks:


I'm using glade-- 1.1.3d with the following project structure:

   $srctop/src/ui   -- this directory contains all my UI code, including my
*.glade and *.gladep files

   $srctop/src/ui/pixmaps  -- this directory contains .xpm files

There does not seem to be any combination of <source_directory> and
<pixmaps_directory> values in foo.gladep that allows my configuration to
work.

What happens is, depending on the settings of the two identifiers in my
gladep file, either:

   1. With the settings in gladep of
         <source_directory>.</source_directory>
         <pixmaps_directory>pixmaps</pixmaps_directory>

      my *_glade.cc file contains include lines that look like:

#include "../pixmaps/foo.xpm"

      Note the incorrect "../".  Debugging proves that xpmname (in
xpmname.cc) was able to read the file in the location "pixmaps/foo.xpm",
it's just that the #include line got constructed incorrectly; or


   2. With the settings in gladep of
         <source_directory>.</source_directory>
         <pixmaps_directory>ui/pixmaps</pixmaps_directory>

      my *_glade.cc file contains empty XPM definitions along the lines of

static const unsigned char foo_xpm_data[] =
{
};
      In this configuration xpmname is not able to open the file at all.




I've also tried moving the pixmaps directory to $srctop/src/pixmaps, but
that doesn't work either.

The culprit for this seems to be in glade--.cc, line 194, where an extra
../ is prepended to the variable Configuration.pixmap_dir_relative_to_src.

Perhaps the right solution is to do a few stat calls in glade--.cc to hunt
around for the pixmaps directory?  It could look for
<src_dir>/<pixmap_dir>, and if not found try <src_dir>/../<pixmap_dir>.  I
would think it should be an error condition to set the variable
pixmap_dir_relative_to_src to a non-existent directory, which seems to be
happening currently.

Alternately, if someone could tell me the right combination of settings in
gladep to use, that would be cool; otherwise I have to carry a patched
glade-- around to about 4 development machines ;-).

Anyway, hope this helps....

--Howdy, a new glade-- user

  =============================
  Howdy Pierce
  Managing Partner
  Cardinal Peak, llc

  email: howdy cardinalpeak com
  main: (303) 665-3962
  cell: (303) 589-1645
  =============================





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