예제 #1
0
파일: urtsb.py 프로젝트: fabianod/UrTSB
   
    gobject.threads_init() # enable threads for gtk
    
    #init global definitions:
    Globals.initialize(determine_path())
    
    #init logging
    Log(loglevel)
    
    if sys.platform == 'win32':
        #apply gtk style for win32 (wimp theme)
        gtkrcpath = os.path.normpath(os.path.join(Globals.resource_dir, \
                                                               'win_gtk/gtkrc'))
        gtk.rc_parse(gtkrcpath)
    
    window = Window() # create the urtsb window
    guicontroller = GuiController() # initialize the gui controller
    guicontroller.setWindow(window)  
       
    gtk.main() # run the gtk main loop
    
    #on exit save the window size informations
    Log.log.info('Exiting....')
    fm = FileManager()
    Log.log.debug('Saving window size informations')
    fm.save_window_sizing()
    
if __name__ == "__main__":
    start()