def _send_chat_message(self): """Sends a chat message. Called when user presses enter in the input field""" msg = self.textfield.text if msg: Chat(msg).execute(self.session) self.textfield.text = u'' self._display_chat_history()
def _do_chat(self): """Actually initiates chatting and hides the dialog""" msg = self.widgets['chat'].findChild(name='msg').text Chat(msg).execute(self.session) self.widgets['chat'].findChild(name='msg').text = u'' self._hide_chat_dialog()
def act(self, send_message): """Actually initiates chatting and hides the dialog""" if not send_message: return msg = self._gui.findChild(name="msg").text Chat(msg).execute(self._session)