diff --git a/gameview.py b/gameview.py index e3edd85..6553809 100644 --- a/gameview.py +++ b/gameview.py @@ -1193,20 +1193,20 @@ class gui(QtGui.QWidget): self.nointerruptbtn = QtGui.QCheckBox(self) self.nointerruptbtn.setChecked(False) self.nointerruptbtn.stateChanged.connect(self.icchat_focus) - self.nointerruptbtn.setText('No Interrupt') + self.nointerruptbtn.setText('&No interrupt') self.nointerruptbtn.setToolTip("Show the next message immediately, ignoring animations") # AO 2.8 self.additivebtn = QtGui.QCheckBox(self) self.additivebtn.setChecked(False) - self.additivebtn.setText('Additive') + self.additivebtn.setText('Additi&ve') self.additivebtn.resize(self.additivebtn.sizeHint()) self.additivebtn.clicked.connect(self.onAdditiveCheck) self.additivebtn.setToolTip('Append the next message to the previous one, without a new textbox') self.deskbtn = QtGui.QCheckBox(self) self.deskbtn.setChecked(True) - self.deskbtn.setText('Desk') + self.deskbtn.setText('&Desk') self.deskbtn.stateChanged.connect(self.icchat_focus) self.deskbtn.resize(self.nointerruptbtn.sizeHint()) self.deskbtn.setToolTip('Show or hide the desk in front of your character') @@ -1402,10 +1402,10 @@ class gui(QtGui.QWidget): self.screenshake.stop() def onAdditiveCheck(self): - if self.additivebtn.isChecked(): - self.icchatinput.home(False) - self.icchatinput.insert(" ") - self.icchatinput.end(False) + # if self.additivebtn.isChecked(): + # self.icchatinput.home(False) + # self.icchatinput.insert(" ") + # self.icchatinput.end(False) self.icchat_focus() def icchat_focus(self): @@ -1923,14 +1923,14 @@ class gui(QtGui.QWidget): self.changeEvidence(0, 0) def onClick_callMod(self): - # self.do_slide() + self.do_slide() - if "modcall_reason" in self.features: - reason, ok = QtGui.QInputDialog.getText(self, "Call a moderator", "Enter your reason.") - if ok and reason: - self.tcp.send("ZZ#"+reason.toUtf8()+"#%") - else: - self.tcp.send("ZZ#%") + # if "modcall_reason" in self.features: + # reason, ok = QtGui.QInputDialog.getText(self, "Call a moderator", "Enter your reason.") + # if ok and reason: + # self.tcp.send("ZZ#"+reason.toUtf8()+"#%") + # else: + # self.tcp.send("ZZ#%") def onClick_changeChar(self): #self.tcp.send('RD#%') @@ -2139,22 +2139,26 @@ class gui(QtGui.QWidget): self.oocinput.clear() def onICreturn(self): - text = str(self.icchatinput.text().toUtf8()).replace('#', '').replace('%', '').replace('&', '').replace('$', '')#.replace('/n', '\n') + text = unicode(self.icchatinput.text()).replace('#', '').replace('%', '').replace('&', '').replace('$', '')#.replace('/n', '\n') - if self.mocktext.isChecked(): - text = mockStr(text) - if self.autocaps.isChecked(): - l = list(text) - l[0] = l[0].upper() - last = [".", "?", "!", "<", ">", ")", "]"] - if not l[-1] in last: - l.append(".") - text = "".join(l).replace(" i ", " I ").replace("i'm", "I'm").replace("it's", "It's") - if self.spacebartext.isChecked(): - l = list(text) - for i in range(1, len(l)+len(l)-1, 2): - l.insert(i, " ") - text = "".join(l) + if text: + if self.mocktext.isChecked(): + text = mockStr(text) + if self.autocaps.isChecked(): + l = list(text) + if l[0] == " " and len(l) > 1: + l[1] = l[1].upper() + else: + l[0] = l[0].upper() + last = [".", "?", "!", "<", ">", ")", "]"] + if not l[-1] in last: + l.append(".") + text = "".join(l).replace(" i ", " I ").replace("i'm", "I'm").replace("it's", "It's") + if self.spacebartext.isChecked(): + l = list(text) + for i in range(1, len(l)+len(l)-1, 2): + l.insert(i, " ") + text = "".join(l) emote = self.charemotes[self.selectedemote] @@ -2189,14 +2193,14 @@ class gui(QtGui.QWidget): else: modifier = 2 - msg = "MS#" + msg = u"MS#" # Visible desk modifier if "deskmod" in self.features: if emote[3] == '5': # Zoom forcibly hides the desk msg += "0#" elif emote[7]: # Respect deskmod if found - msg += "%s#" % emote[7] + msg += "%s#" % str(emote[7]) else: msg += "%d#" % self.deskbtn.isChecked() else: @@ -2205,7 +2209,7 @@ class gui(QtGui.QWidget): msg += emote[1]+"#" #pre-anim msg += self.charname.title()+"#" msg += emote[2]+"#" #anim - msg += text.decode('utf-8')+"#" + msg += text+"#" msg += self.charside+"#" msg += emote[4]+"#" #sfx msg += str(modifier)+"#" #emote modifier