[Glade-users] Problem with custom PyGTK widgets within Glade



Hi all,

This is the first time that I've tried to create custom widgets
(written in Python) for use within Glade so I'm pretty much lost here.
I followed the tutorial here:
http://www.pygtk.org/articles/custom-widgets-glade/Custom_PyGTK_Widgets_in_Glade3.html

and came up with ma3xwidgets.xml:

<?xml version="1.0" encoding="UTF-8"?>
<glade-catalog name="ma3x" library="ma3xwidgets" domain="glade3"
depends="gtk+" language="python">
        <glade-widget-classes>
                <glade-widget-class title="Date" name="Date"></glade-widget-class>
                <glade-widget-class title="Time" name="Time"></glade-widget-class>
        </glade-widget-classes>
        <glade-widget-group name="ma3x-widgets" title="MA3X Widgets">
                <glade-widget-class-ref name="Date"/>
                <glade-widget-class-ref name="Time"/>
        </glade-widget-group>
</glade-catalog>

and ma3xwidgets.py:

from ma3x.widgets import Time, Date


Unfortunately, when I run Glade, I get the error below:

...
(glade-3:29883): GladeUI-CRITICAL **: Unable to load module
'ma3xwidgets' from any search paths

(glade-3:29883): GladeUI-WARNING **: Failed to load external library
'ma3xwidgets'
...

The catalog file and the support module are both in the right places
(/usr/share/glade3/catalogs and /usr/lib/glade3/modules respectively)
but I'm getting nowhere. I've ran out of ideas as to why Glade can't
load the support module (ma3xwidgets.py).

I don't know if my build of glade/libglade/pygtk are missing some
magical ./configure flags.
Help will be very much appreciated. Thanks.




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