diff --git a/gameview.py b/gameview.py index 5dd75d0..8c2730f 100644 --- a/gameview.py +++ b/gameview.py @@ -1091,6 +1091,7 @@ class gui(QtGui.QWidget): self.charemotes = [] self.selectedemote = 0 self.charname = '' + self.charshowname = '' self.charside = 'def' self.lastmsg = '' self.msgqueue = [] @@ -1359,6 +1360,9 @@ class gui(QtGui.QWidget): charname = unicode(charname.toLower()) self.charname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "name", charname).decode('utf-8').lower() + self.charshowname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "showname") + if not self.charshowname == "": + self.charshowname = self.charshowname.decode('utf-8') self.charside = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "side", "def") self.posdropdown.setCurrentIndex(self.posdropdown.findText(self.charside)) @@ -1623,7 +1627,10 @@ class gui(QtGui.QWidget): text = mockStr(text) if self.autocaps.isChecked(): l = list(text) - l[0] = l[0].upper() + if isinstance(l[0], QtCore.QString): + l[0] = l[0].toUpper() + else: + l[0] = l[0].upper() if l[-1] != ".": l.append(".") text = "".join(l).replace(" i ", " I ").replace("i'm", "I'm").replace("it's", "It's") @@ -1714,7 +1721,10 @@ class gui(QtGui.QWidget): msg += str(self.mychatcolor)+"#" if "cccc_ic_support" in self.features: - msg += self.showname+"#" # custom showname + showname = self.showname + if self.showname == "" and not self.charshowname == "": + showname = self.charshowname + msg += showname+"#" # custom showname if self.paircheckbox.isChecked(): msg += str(self.pairdropdown.currentIndex()) # pair charID if "effects" in self.features: