def __init__(self, portinghacks=None): self.profiles = None self.selected_profile = None self.dirty = False self.portinghacks = portinghacks self.imagedir = 'external/commotion_mesh_applet/' self.mesh_status = MeshStatus(self.portinghacks, imagedir=self.imagedir) self.commotion = WindowsCommotionCore( profiledir="".join([core.get_own_path('/profiles/'), "/"]), #TODO: are these even needed? olsrdpath=core.olsrd_exe_path, olsrdconf=core.olsrd_conf_path ) if not is_ui_test_mode(): core.refresh_net_list() self.profiles = self.read_profiles() self.init_ui()
def __init__(self, portinghacks=None): self.profiles = None self.selected_profile = None self.dirty = False self.portinghacks = portinghacks self.imagedir = 'external/commotion_mesh_applet/' self.mesh_status = MeshStatus(self.portinghacks, imagedir=self.imagedir) self.commotion = WindowsCommotionCore( profiledir="".join([core.get_own_path('/profiles/'), "/"]), #TODO: are these even needed? olsrdpath=core.olsrd_exe_path, olsrdconf=core.olsrd_conf_path) if not is_ui_test_mode(): core.refresh_net_list() self.profiles = self.read_profiles() self.init_ui()
port.BUTTONS_CLOSE = gtk.BUTTONS_CLOSE port.FILE_CHOOSER_ACTION_SAVE = gtk.FILE_CHOOSER_ACTION_SAVE port.MESSAGE_ERROR = gtk.MESSAGE_ERROR port.MESSAGE_OTHER = gtk.MESSAGE_OTHER port.RESPONSE_CANCEL = gtk.RESPONSE_CANCEL port.RESPONSE_OK = gtk.RESPONSE_OK port.DIALOG_DESTROY_WITH_PARENT = gtk.DIALOG_DESTROY_WITH_PARENT port.SELECTION_NONE = gtk.SELECTION_NONE port.STOCK_ABOUT = gtk.STOCK_ABOUT port.pixbuf_new_from_file = gtk.gdk.pixbuf_new_from_file return port def is_ui_test_mode(): return len(sys.argv) > 1 and sys.argv[1] == 'testui' if __name__ == "__main__": app = WinMeshUI(get_portinghacks()) if not is_ui_test_mode(): co = ConsoleOutput(None, app) sys.stdout = co sys.stderr = co core.refresh_net_list() # TODO cli mode #app.print_directions() #core.print_available_networks() app.main()
port.MESSAGE_ERROR = gtk.MESSAGE_ERROR port.MESSAGE_OTHER = gtk.MESSAGE_OTHER port.RESPONSE_CANCEL = gtk.RESPONSE_CANCEL port.RESPONSE_OK = gtk.RESPONSE_OK port.DIALOG_DESTROY_WITH_PARENT = gtk.DIALOG_DESTROY_WITH_PARENT port.SELECTION_NONE = gtk.SELECTION_NONE port.STOCK_ABOUT = gtk.STOCK_ABOUT port.pixbuf_new_from_file = gtk.gdk.pixbuf_new_from_file return port def is_ui_test_mode(): return len(sys.argv) > 1 and sys.argv[1] == 'testui' if __name__ == "__main__": app = WinMeshUI(get_portinghacks()) if not is_ui_test_mode(): co = ConsoleOutput(None, app) sys.stdout = co sys.stderr = co core.refresh_net_list() # TODO cli mode #app.print_directions() #core.print_available_networks() app.main()