Logo Search packages:      
Sourcecode: qa-assistant version File versions  Download package

def gnomeglade::GnomeApp::__init__ (   self,
  name,
  version,
  humanName,
  gladeFile,
  root 
) [inherited]

Initialise program 'name' and version from 'file' containing root node 'root'.

Definition at line 124 of file gnomeglade.py.

00124                                                                  :
        """Initialise program 'name' and version from 'file' containing root node 'root'.
        """
        props = {gnome.PARAM_HUMAN_READABLE_NAME : humanName,
            gnome.PARAM_APP_DATADIR : paths.datadir,
            gnome.PARAM_APP_LIBDIR : paths.datadir,
            gnome.PARAM_APP_PREFIX : paths.prefix,
            gnome.PARAM_APP_SYSCONFDIR : paths.sysconfdir}
            
        self.program = gnome.program_init(name, version, properties=props)

        gladeXML = uninstalled_file(gladeFile)
        if gladeXML == None:
            filename = os.path.join(name, gladeFile)
            gladeXML = self.program.locate_file(gnome.FILE_DOMAIN_APP_DATADIR,
                                    filename, True)
            if gladeXML == []:
                ### FIXME: Need to use something less generic than this
                raise Exception("Unable to locate %s" % (filename))
            else:
                gladeXML = gladeXML[0]

        GtkApp.__init__(self, gladeXML, root)

        if 0:
            self.client = gnome.ui.Client()
            self.client.disconnect()
            def connected(*args):
                print "CONNECTED", args
            def cb(name):
                def cb2(*args):
                    print name, args, "\n"
                return cb2
            self.client.connect("connect", cb("CON"))
            self.client.connect("die", cb("DIE"))
            self.client.connect("disconnect", cb("DIS"))
            self.client.connect("save-yourself", cb("SAVE"))
            self.client.connect("shutdown-cancelled", cb("CAN"))
            self.client.connect_to_session_manager()

#
# Utility Functions
#

def uninstalled_file(filename):


Generated by  Doxygen 1.6.0   Back to index