Re: "one file" Gtk2::GladeXML example



Quoting Joe Smith <jes martnet com>:

Chas Owens wrote:

FEATURES:
inline images via xpm imbedded in the glade file
inline images via jpg, png, gif, etc catted on the end (see Makefile)
*
custom Gtk2::SimpleList widget creation
custom widget creation via Perl code embedded in the glade file **
multiple inline files
 > ...

Just a mechanical question: how do you create the tweaked Glade file?  I
see an emacs mode line - I guess you just edit the Glade output.  Glade
itself has no way to stuff data into the XML, correct?

<Joe

If the code is one line I used the "String1:" entry in Properties.  If it is
more than one line I open it with Vim (the <!--*- mode: xml -*--> bit is
actually put in there by Glade).  I then open the file with Glade, make sure
that I didn't hork the XML, and save it (this changes things like > to &gt;). 
The theory behind code based custom widgets is that you may want to share the
same glade file between several Perl scripts and want to cut down on the amount
of code you have to copy & paste[1].


1.  This is actually a rationalization.  I really just thought "Would't it be
cool to just put the code to do the custom widget directly in the Glade file."



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