using post_create_function in python

Chris Morley <[email protected]> Sat, 30 Nov 2013 15:26:16 +0000
Newsgroups gmane.comp.gnome.glade.user
Message-ID <[email protected]>
I am looking for a python example for use of post_create_function.
I wish to override the image of the window or fixed container with an image.
I am creating a custom widget for a machine controller (linuxcnc)

XML file snippit:

    <glade-widget-class name="MAPPED" generic-name="mapped" title="Mapped">
    <post-create-function>do_post_create</post-create-function>
    </glade-widget-class>


python code snippit:

import gobject,gtk

class MAPPED(gtk.Window):
    __gtype_name__ = 'MAPPED'
    __gproperties__ = {
        'filename' : ( gobject.TYPE_STRING, 'File name for mapped image',
                'file name',
                "Filename", gobject.PARAM_READWRITE|gobject.PARAM_CONSTRUCT),
    }
    __gproperties = __gproperties__

    def do_post_create(self, obj, reason):
        print "post create"
 
I am using glade 3.6.7 (I must at present)
I could not find a current example on the net.
closest I could find:
http://www.pygtk.org/articles/custom-widgets-glade/Custom_PyGTK_Widgets_in_Glade3-part-2.html
Which is way out of date.
Thanks for any help.

Chris M

_______________________________________________
Glade-users maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users