Exemplo n.º 1
0
Arquivo: gnaf.py Projeto: ziberna/gnaf
 def initialize_applet(self):
     # Set flags and GUI elements
     self.initializing = True
     self.log('Initializing', '...')
     self.icon = 'updating'
     self.tooltip = 'Initializing...'
     # Call applet's initialize method
     self.initialize_id = id()
     try:
         self.appletting = True
         self.success = self.initialize()
     except:
         self.success = None
         self.initialize_id = 0
         self.debug()
     finally:
         self.appletting = False
     # Determine success
     if self.success:
         self.initialized = True
         self.log('Initialization', 'DONE')
         self.update_id = id()
         thread(self.run, self.update_id)
     else:
         self.log('Initialization', 'ERROR')
         self.icon = 'error'
         self.context = []
         threadTimeout(self.interval, self.run)
     self.tooltip = None
     # Final
     self.initializing = False
Exemplo n.º 2
0
Arquivo: gnaf.py Projeto: ziberna/gnaf
 def main():
     gui.ThreadsInit()
     global GnafApplets
     for applet in GnafApplets:
         thread(applet.run)
     gui.Main()