def __init__(self): global USE_THREADS ttk.Frame.__init__(self, name='application', width=300, height=500) self.pack(expand='yes', fill='both') self.master.title('pjsua2 Demo') self.master.geometry('500x500+100+100') # Accounts self.accList = [] self.quitting = False # Construct GUI self.initGui() # Instantiate endpoint self.ep = endpoint.Endpoint() self.ep.libCreate() # Default config self.appConfig = settings.AppConfig() if USE_THREADS: self.appConfig.epConfig.uaConfig.threadCnt = 1 self.appConfig.epConfig.uaConfig.mainThreadOnly = False else: self.appConfig.epConfig.uaConfig.threadCnt = 0 self.appConfig.epConfig.uaConfig.mainThreadOnly = True
def __init__(self): global USE_THREADS ttk.Frame.__init__(self, name='application', width=300, height=500) self.pack(expand='yes', fill='both') self.master.title('pjsua2 Demo') self.master.geometry('500x500+100+100') # Logger self.logger = log.Logger() # Accounts self.accList = [] # GUI variables self.showLogWindow = tk.IntVar(value=0) self.quitting = False # Construct GUI self._createWidgets() # Log window self.logWindow = log.LogWindow(self) self._onMenuShowHideLogWindow() # Instantiate endpoint self.ep = endpoint.Endpoint() self.ep.libCreate() # Default config self.appConfig = settings.AppConfig() if USE_THREADS: self.appConfig.epConfig.uaConfig.threadCnt = 1 self.appConfig.epConfig.uaConfig.mainThreadOnly = False else: self.appConfig.epConfig.uaConfig.threadCnt = 0 self.appConfig.epConfig.uaConfig.mainThreadOnly = True self.appConfig.epConfig.logConfig.writer = self.logger self.appConfig.epConfig.logConfig.filename = "pygui.log" self.appConfig.epConfig.logConfig.fileFlags = pj.PJ_O_APPEND self.appConfig.epConfig.logConfig.level = 5 self.appConfig.epConfig.logConfig.consoleLevel = 5