Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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")
Пример #4
0
 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)
Пример #5
0
 def set_window(self, win):
     Buffer.set_window(self, win)
     if win:
         keytable.activate("list-buffer", self)
     else:
         keytable.deactivate("list-buffer", self)
Пример #6
0
 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)
Пример #7
0
 def set_window(self, win):
     Buffer.set_window(self, win)
     if win:
         keytable.activate("list-buffer", self)
     else:
         keytable.deactivate("list-buffer", self)
Пример #8
0
 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)
Пример #9
0
 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)