def set_active(self,yes): if yes: self.active=1 a="*" keytable.activate("window",self) cmdtable.activate("window",self) else: self.active=0 a="" keytable.deactivate("window",self) cmdtable.deactivate("window",self) d=self.status_bar.get_dict() d["active"]=a if cjc_globals.screen: self.status_bar.update(0) if yes and cjc_globals.screen.input_handler: cjc_globals.screen.input_handler.current_buffer_changed(self.buffer)
def set_active(self, yes): if yes: self.active = 1 a = "*" keytable.activate("window", self) cmdtable.activate("window", self) else: self.active = 0 a = "" keytable.deactivate("window", self) cmdtable.deactivate("window", self) d = self.status_bar.get_dict() d["active"] = a if cjc_globals.screen: self.status_bar.update(0) if yes and cjc_globals.screen.input_handler: cjc_globals.screen.input_handler.current_buffer_changed( self.buffer)
def __init__(self,screen): self.__logger=logging.getLogger("cjc.ui.Screen") self.scr=screen self.screen=self self.attrs={} self.pairs={} self.next_pair=1 self.content=None self.active=True self.active_window=None self.windows=[] self.input_handler=None self.escape=0 self.lock=threading.RLock() lc,self.encoding=locale.getlocale() if self.encoding is None: self.encoding="us-ascii" if self.encoding.lower().replace("-","") == "utf8": self.utf8_mode = True else: self.utf8_mode = False keytable.activate("screen",self,input_window=self.scr) cmdtable.activate("screen",self) complete.ActiveBufferDefinedCompletion().register("text")
def set_parent(self, parent): InputWidget.set_parent(self, parent) if parent: keytable.activate("bool-input", self, input_window=self.win) else: keytable.deactivate("bool-input", self)
def set_window(self, win): Buffer.set_window(self, win) if win: keytable.activate("list-buffer", self) else: keytable.deactivate("list-buffer", self)
def set_parent(self,parent): InputWidget.set_parent(self,parent) if parent: keytable.activate("choice-input",self,self.keypressed,self.win) else: keytable.deactivate("choice-input",self)
def set_parent(self, parent): InputWidget.set_parent(self, parent) if parent: keytable.activate("choice-input", self, self.keypressed, self.win) else: keytable.deactivate("choice-input", self)
def set_parent(self,parent): InputWidget.set_parent(self,parent) if parent: keytable.activate("list-input",self,input_window=self.win) else: keytable.deactivate("list-input",self)