def say(self, source): self.model.set_target(source) self.model.set_mc("_message_private") self.model.psyc._assign("_nick", get_user(self.model.center.ME())) text = self.get_input(self.windows[source]["entryfield"]) self.model.set_text(text.strip()) self.append_text(self.windows[source]["displayfield"], "Du sagst: " + text) self.model.send()
def received(self, source, mc, mmp, psyc): if mc == "_message_private": source = mmp.get_source() if not self.windows.has_key(source): self.makewindow(source) self.append_text(self.windows[source]["displayfield"], get_user(source)+":"+parsetext(mmp, psyc)) elif mc == "_internal_message_private_window_popup": target = mmp._query("_target") print "target:", target if not self.windows.has_key(target): self.makewindow(target)
def say(self, event): text = event.GetString() #source self.tabs[] source = self.source self.model.set_target(source) self.model.set_mc("_message_private") self.model.psyc._assign("_nick", get_user(self.model.center.ME())) #text = self.get_input(self.windows[source]["entryfield"]) self.model.set_text(text.strip()) #self.append_text(self.windows[source]["displayfield"], "Du sagst: " + text) self.model.send() self.query_inst[source].append_text('Du> ' + text + '\n') self.query_inst[source].clear_entry() event.Skip()