[Glade-users] Userdefined Widgets in catalog file



On Tue, 2017-04-25 at 17:42 +0200, Elmar Haneke wrote:
I'm trying to include some user defined widgets by using an catalog
file.
The Widget itself becomes available within glade 3.20, but the
information about properties and signals is lost.

This is the catalog-file used:

<glade-catalog name="DlgUtils" depends="gtk+">
    <glade-widget-classes>
        <glade-widget-class name="DlgUtils_DatumEingabe"
title="DatumEingabe" parent="GtkEventBox">
            <signals>
                <signal id="changed"/>
            </signals>
            <properties>
                <property id="date" default="" visible="True"/>
                <property id="date-string" default=""/>
                <property id="mit-zeit" default="False"/>
                <property id="mit-heute-button" default="False"/>
                <property id="leer" default="False"/>
            </properties>
        </glade-widget-class>
    </glade-widget-classes>
    <glade-widget-group name="DlgUtils" title="DlgUtils">
        <glade-widget-class-ref name="DlgUtils_DatumEingabe" />
    </glade-widget-group>
</glade-catalog>


What can be done to make it work?

You are not loading your library, so glade does not know the properties
 DlgUtils_DatumEingabe has.

since you specified parent="GtkEventBox", glade will use that as the
base of DlgUtils_DatumEingabe but you need to specify the param spec of
each property you want to edit in glade (see https://developer.gnome.or
g/gladeui/3.20/properties.html)

I recommend trying to load your library 
<glade-catalog name="foo" library="foo" depends="gtk+">

greets

JP




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