[Glade-users] Fwd: How to write a catalog for use in glade 3.3.4



On Fri, 2007-09-07 at 12:59 +0200, Germ?n Diago wrote:
[...]
<?xml version="1.0" encoding="UTF-8"?> 
<glade-catalog name="myappcatalog" depends="gtk+"> 
     <glade-widget-classes>
        <glade-widget-class name="sdlwidget" generic-name="sdlwidget"
title="SDL Widget" parent="GtkWindow">
            <properties> 
                  <property id="resolution">
                    <displayable-values>
                <value id="640x480" name="640x480"></value>
                <value id="800x600" name="800x600"></value> 
                  </displayable-values>
                </property>
            </properties>
        </glade-widget-class>
    </glade-widget-classes>
    
    <glade-widget-group name="ftr" title="Follow the rabbit"> 
        <glade-widget-class-ref name="sdlwidget"/>
    </glade-widget-group>
</glade-catalog>


I wonder if I have to write supporting code for this kind of things.
It shouldn't be necessary I guess. 
Thanks for your help again.

Adding properties shouldn't require code support, currently
though - we dont have a way to define pspecs in the catalog
xml (there's a bug open for that), so you have to specify
a function that creates the pspec - that /could/ be defined
in a support module - but we have some standard ones defined
in gladeui/glade-builtins.c (like glade_standard_int_spec etc).

See the gtk+ catalog for examples of how these specs are used.

Currently I think you are trying to define an enum pspec, this
wont work without support code creating the pspec or fixing
that bug and letting us define pspecs in the catalog.

Cheers,
     -Tristan






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