def language_ready(self): print 'LanguageModel:language_ready' for display in self.displays: gui.call_fg_async(display.language_ready, self.langName) self.status = 1 if self.__connector is not None: h1 = self.lang.roll_id(1) h2 = self.lang.roll_id(2) v1 = self.lang.yaw_id(1) v2 = self.lang.yaw_id(2) a1 = self.lang.activation_id(1) a2 = self.lang.activation_id(2) a3 = self.lang.activation_id(3) a4 = self.lang.activation_id(4) a5 = self.lang.activation_id(5) a6 = self.lang.activation_id(6) h6 = self.lang.roll_id(6) v6 = self.lang.yaw_id(6) a1 = self.lang.activation_id(1) gui.call_fg_async(self.__connector, h1, v1, h2, v2, a3, a4, a5, h6, v6, a1, a2, a6) self.lang.flush()
def language_ready(self): print 'LanguageModel:language_ready' for display in self.displays: gui.call_fg_async(display.language_ready,self.langName) self.status=1 self.lang.flush()
def node_changed(self, parts): proxy.AtomProxy.node_changed(self, parts) if 'timestamp' in parts: print 'node_changed', parts if self.listeners: for listener in self.listeners: print 'BrowseProxy data changed', self.__address gui.call_fg_async(listener.changed, self.__address)
def node_ready(self): proxy.AtomProxy.node_ready(self) if 'browse' not in self.protocols(): print "%s not browseable" % self.__address print 'node_ready', self.__address if self.listeners: for listener in self.listeners: gui.call_fg_async(listener.ready, self.__address)
def addDisplay(self,display): if not display in self.displays: self.displays.append(display) if self.status==1: gui.call_fg_async(display.language_ready,self.langName)
def language_disconnected(self): print 'LanguageModel:language_disconnected' for display in self.displays: gui.call_fg_async(display.language_disconnected) self.status=2
def language_gone(self): print 'LanguageModel:language_gone' for display in self.displays: gui.call_fg_async(display.language_gone,self.langName) self.status=0
def lexicon_changed(self): print 'LanguageModel:lexicon_changed' for display in self.displays: gui.call_fg_async(display.lexicon_changed)
def context_changed(self,name,listeners,lurkers): print 'context changed',name,listeners,lurkers for display in self.displays: gui.call_fg_async(display.context_changed,name,listeners,lurkers)
def cmdline_changed(self): picross.display_active() cmdline=self.lang.get_cmdline() print 'LanguageModel:cmdline_changed, ',cmdline for display in self.displays: gui.call_fg_async(display.cmdline_changed,cmdline)
def history_cleared(self): picross.display_active() print 'history_cleared' for display in self.displays: gui.call_fg_async(display.history_cleared)
def history_changed(self,max): picross.display_active() #print 'history changed, max=',max for display in self.displays: gui.call_fg_async(display.history_changed,max)