Esempio n. 1
0
    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()
Esempio n. 2
0
    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()
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 def language_disconnected(self):
     print 'LanguageModel:language_disconnected' 
     for display in self.displays:
         gui.call_fg_async(display.language_disconnected)
     self.status=2
Esempio n. 7
0
 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
Esempio n. 8
0
 def lexicon_changed(self):
     print 'LanguageModel:lexicon_changed'
     for display in self.displays:
         gui.call_fg_async(display.lexicon_changed)
Esempio n. 9
0
 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)
Esempio n. 10
0
 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)
Esempio n. 11
0
 def history_cleared(self):
     picross.display_active()
     print 'history_cleared'
     for display in self.displays:
         gui.call_fg_async(display.history_cleared)
Esempio n. 12
0
 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)