Re: Gnome::Glade::Xml::create_from_buffer question



Thanks Doug,

I used your perl script and it works. It ends up producing an executable image on my machine a couple of K bytes larger than the one produced when using the file I create with my utility. We both end up having a human readable string containing the xml for the UI in the executable image file.

Bob


Douglas C. MacKenzie wrote:

I use the attached perl script to convert the glade file into a
binary text file with a commandline like:

binary2text.pl  matcon.glade matcon.data

then I include it using something like:

// The glade file as a string buffer
#include "matcon.data"

and then load the ui like:

refXml =
Gnome::Glade::Xml::create_from_buffer((char*)matcon_data,sizeof(matcon_data)-1);


Doug

On Wed, 2006-01-18 at 09:35 -0600, Bob Caryl wrote:
Hi guys,

I am using Glade version 2.10.0 and libglademm-2.4 (2.6.1). Because I do not want my application to be dependent on loading anything at run time, I decided to use Gnome::Glade::Xml::create_from_buffer in order to bring my UI into my application. This question is probably off topic, but I cannot seem to figure out how to make glade output anything that can be included in my application (like a ".h" file) that can be used in conjunction with the aforementioned creation routine.

If I'm off topic, the please give me a hint as to which list I need to consult.

Btw, I wrote my own little helper application that reads the ".glade" file and creates a ".h" file with this format:

const char *<desired pointer name> = "
// all xml code content from glade in here with newlines and beginning line whitespace stripped out,
// and with all double quotes converted to single quotes
";

The reason I want to use the native "Glade way" to do this is that I do not want other programmers in my organization to have to use my conversion application if possible.

Thanks!

Bob Caryl
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list


begin:vcard
fn:Robert Caryl
n:Caryl;Robert
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108
x-mozilla-html:TRUE
url:http://www.fis-cal.com
version:2.1
end:vcard



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