[Java-gnome-developer] Reading Quickly glade files
Brought to you by:
afcowie
From: Andres A. <aal...@gm...> - 2010-02-03 18:41:41
|
Hello devs! I'm working on a Gtk plugin for the Griffon framework that relies on java-gnome to do its thing (great work you guys!). However attempts to read a glade file that was created by using Ubuntu Quickly resulted in some manual mangling of the xml before java-gnome was happy with it. Thought I should share what I did to get it to run http://www.jroller.com/aalmiray/entry/griffon_the_quickly_connection Basically I had to follow these steps: 1. change <interface> to <glade-interface> 2. comment out <requires lib="gtk+" version="2.16"/> 3. change all <object> elements to <widget> 4. remove type="submenu" from every menu widget Also had to remove an image widget definition as the image filename was translated (erroneously) as '/tmp/background.png' instead of 'background.png'. Which brings me to the next point I noticed while working with java-gnome: it expect resources to be defined as files that can be read from the native side. This hinders the ability to place resources on the classpath (inside jars for example) and let the library picke them up. Would it be possible to have the Java wrappers expose Java friendly InputStream methods? Internally they can read a stream and feed the contents to a temporal file, then feed the file to the native code; no changes needed on the gtk side :-) This is actually a 'hack' I put in place on the griffon-gtk plugin but if won't work while reading glade files. Cheers, Andres |