Did you know about the gtkdialog lib?
Puppies built from Woof-CE uses /usr/lib/gtkdialog/ to unify the look of builtin GUIs. Together with the new vector icon set (in /usr/share/pixmaps/puppy), the gtkdialog lib made it possible to give Puppy a facelift without adding any bloat to the core.
The lib is simple and small. It is meant to reduce the code for repeating requests (as message-boxes), and unify the look for graphical widgets (as scalegrips and svgs). A complete guide how to use the different snippets are found inside each file (open in text-editor). It contains 3 different categories:
These return running gtkdialog boxes with requested info. Gtkdialog is not complex at all, but dead simple boxes often used by Puppy, can be set up with a oneliner. This is not meant as a replacement for Xdialog.
There are atm 4 different types of boxes:
/usr/lib/gtkdialog/box_ok Title error "This is an error"
While the box-code produces a running gui, the xml-code is gtkdialog code meant to be embedded inside the parent gui. These are used to unify the look, and is cooperating with pTheme to follow the global theming.
There are 4 xml-snippets available:
Example: - Note the 'xml_info gtk' that activates the gtkdialog-theme set by pTheme.
<vbox space-expand="true" space-fill="true">
'"`/usr/lib/gtkdialog/xml_info fixed puppy_config.svg 60 "This is the header used in Puppy these days. It handles <b>markups</b>."`"'
. /usr/lib/gtkdialog/xml_info gtk #build bg_pixmap for gtk-theme
gtkdialog -p GUI
The svg category returns svg-code to embed in the gtkdialog code. Today, there are 3, but the knob shown in previous post should probably be added here. As expected, the svg bars and text follows the global theming set by pTheme.
<action>/usr/lib/gtkdialog/svg_analogclock 300 > /tmp/clock.svg</action>
<pixmap space-expand="false" space-fill="false">
</vbox>' | gtkdialog -s
Edit - Delete
No comments posted yet.