Logo Search packages:      
Sourcecode: wajig version File versions

def glutil::Base::__init__ (   self,
  file,
  root 
) [inherited]

Load the widgets from the node 'root' in file 'file'.

 Automatically connects signal handlers named 'on_*'.

Reimplemented in glutil::Component, and glutil::Dialog.

Definition at line 60 of file glutil.py.

00060                                   :
        """Load the widgets from the node 'root' in file 'file'.

         Automatically connects signal handlers named 'on_*'.
        """
        self.xml = gtk.glade.XML(file, root)
        #
        # Is this now replacable by the locals() as in:
        # self.xml.signal_autoconnect(locals())
        #
        handlers = {}
        for h in filter(lambda x:x.startswith("on_"), dir(self.__class__)):
            handlers[h] = getattr(self, h)
        self.xml.signal_autoconnect( handlers )
        self.widget = getattr(self, root)
        self.widget.set_data("pyobject", self)
        #
        # Handle the widow manger close button.
        #
        self.widget.connect("destroy", self.quit)

    def __getattr__(self, key):


Generated by  Doxygen 1.6.0   Back to index