What strategy to use to deal with Glade-3's problem in removing pixbuf directory paths in .glade file!



Hi,

I'm trying to find a way to deal with the problem with Glade-3 removing absolute or relative path from pixbuf property.

That is, given a .glade file containing:
<widget class="GtkImage" id="image">
   <property name="pixbuf">relativepath/image.png</property>
</widget>

Glade-3 would remove the path and generate this instead:
<widget class="GtkImage" id="image">
   <property name="pixbuf">image.png</property>
</widget>

Isn't it that, in general, when dealing with XML, it is a good idea not to regenerating everything, but to keep all XML tags/blocks that the application/tool doesn't understand? This is desired!

In this case, isn't it that Glade-3 shouldn't be discarding data (directory paths) when that relevant tags/blocks in the xml file aren't even modified?

The ideal case aside, is there a strategy to deal with the current, following, situation?
o Glade-3 insists on removing directory path from pixbufs. (Problem.)
o libglade is capable of supporting .glade-file-relative path. (Good.)
o gdk-pixbuf's gdk_pixbuf_new_from_file() requires absolute or relative paths without resource resolution based on any environment variables. So, application can't make libglade resolves resources by setting an environment variable.

Note that if Glade-3 were to not discard relative paths from pixbuf in .glade file, libglade would have worked.

I think one clumsy way I can deal with this is to create a script that post-process .glade file touched by Glade-3 to explicitly restore the pixbuf directory paths.

Is there another better way to deal with this problem?

Thanks.

--
Daniel Yek.




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