Exemplo n.º 1
0
 def load(self, gmwidg):
     self.chatView = ChatView()
     self.chatView.disable("Waiting for game to load")
     self.chatView.connect("messageTyped", self.onMessageSent)
     self.gamemodel = gmwidg.gamemodel
     self.gamemodel.connect("game_started", self.onGameStarted)
     return self.chatView
Exemplo n.º 2
0
 def onConversationAdded(self, panel, grp_id, text, grp_type):
     # deferred import to not slow down PyChess starting up
     from pychess.widgets.ChatView import ChatView
     chatView = ChatView()
     plus_channel = '+channel ' + str(grp_id)
     self.connection.cm.connection.client.run_command(plus_channel)
     for panel in self.panels:
         panel.addItem(grp_id, text, grp_type, chatView)
Exemplo n.º 3
0
 def load(self, gmwidg):
     self.gamemodel = gmwidg.gamemodel
     self.gamemodel.connect("game_started", self.onGameStarted)
     self.chatView = ChatView(self.gamemodel)
     self.chatView.disable("Waiting for game to load")
     self.chatView.connect("messageTyped", self.onMessageSent)
     if isinstance(self.gamemodel, ICGameModel):
         self.gamemodel.connect("observers_received",
                                self.chatView.update_observers)
         self.gamemodel.connect("message_received", self.onICMessageReieved)
     return self.chatView
Exemplo n.º 4
0
 def load(self, gmwidg):
     self.gamemodel = gmwidg.gamemodel
     self.model_cids = [
         self.gamemodel.connect("game_started", self.onGameStarted),
         self.gamemodel.connect_after("game_terminated", self.on_game_terminated),
     ]
     self.chatView = ChatView(self.gamemodel)
     self.chatView.disable("Waiting for game to load")
     self.chatview_cid = self.chatView.connect("messageTyped", self.onMessageSent)
     if isinstance(self.gamemodel, ICGameModel):
         self.model_cids.append(self.gamemodel.connect("observers_received",
                                self.chatView.update_observers))
         self.model_cids.append(self.gamemodel.connect("message_received",
                                self.onICMessageReieved))
     return self.chatView
Exemplo n.º 5
0
 def onConversationAdded(self, panel, id, text, type):
     chatView = ChatView()
     for panel in self.panels:
         panel.addItem(id, text, type, chatView)
Exemplo n.º 6
0
 def onConversationAdded(self, panel, grp_id, text, grp_type):
     chatView = ChatView()
     plus_channel = '+channel ' + str(grp_id)
     self.connection.cm.connection.client.run_command(plus_channel)
     for panel in self.panels:
         panel.addItem(grp_id, text, grp_type, chatView)