diff --git a/gameview.py b/gameview.py index 88b6233..eeb646d 100644 --- a/gameview.py +++ b/gameview.py @@ -2935,7 +2935,7 @@ class gui(QtGui.QWidget): buckets[0] = webAO_bucket self.charselect.setCharList(charlist) - autopick = get_option("General", "auto pick").lower() + autopick = get_option("General", "auto pick").decode('utf-8').lower() coincidence = -1 for i, char in enumerate(self.charlist): if char[0].lower() == autopick and char[1] == 0: diff --git a/options.py b/options.py index bbe7298..5f40f5e 100644 --- a/options.py +++ b/options.py @@ -102,7 +102,7 @@ class Settings(QtGui.QDialog): self.autoconnect = QtGui.QComboBox() autopick_layout = QtGui.QHBoxLayout() - autopick_label = QtGui.QLabel("Pick this character automatically after connecting") + autopick_label = QtGui.QLabel("Pick this character automatically on join") self.autopick = QtGui.QComboBox() for folder in listdir(unicode(AOpath + 'characters')): if exists(AOpath + 'characters/' + folder + '/char.ini'): @@ -141,9 +141,9 @@ class Settings(QtGui.QDialog): general_layout.addLayout(allowdownload_layout) general_layout.addWidget(separators[2]) general_layout.addLayout(currtheme_layout) - general_layout.addWidget(separators[3]) general_layout.addLayout(autoconnect_layout) general_layout.addLayout(autopick_layout) + general_layout.addWidget(separators[3]) general_layout.addLayout(update_layout) general_layout.addWidget(savechangeswarn, 50, QtCore.Qt.AlignBottom) @@ -220,7 +220,7 @@ class Settings(QtGui.QDialog): self.allowdownload_evidence.setChecked(ini.read_ini_bool(self.inifile, "General", "download evidence")) self.currtheme.setCurrentIndex(self.themes.index(ini.read_ini(self.inifile, "General", "theme", "default"))) self.autoconnect.setCurrentIndex(ini.read_ini_int(self.inifile, "General", "auto connect", -1) + 1) - self.autopick.setEditText(ini.read_ini(self.inifile, "General", "auto pick")) + self.autopick.setEditText(ini.read_ini(self.inifile, "General", "auto pick").decode('utf-8')) self.check_updates.setChecked(ini.read_ini_bool(self.inifile, "General", "install updates", False)) # Automatic updates are opt-in! self.device_list.setCurrentIndex(ini.read_ini_int(self.inifile, "Audio", "device", audio.getcurrdevice())) @@ -271,7 +271,7 @@ class Settings(QtGui.QDialog): self.inifile.set("General", "download evidence", self.allowdownload_evidence.isChecked()) self.inifile.set("General", "theme", self.currtheme.currentText()) self.inifile.set("General", "auto connect", self.autoconnect.currentIndex() - 1) - self.inifile.set("General", "auto pick", self.autopick.currentText()) + self.inifile.set("General", "auto pick", self.autopick.currentText().toUtf8()) self.inifile.set("General", "install updates", self.check_updates.isChecked()) self.inifile.set("Audio", "device", self.device_list.currentIndex()) @@ -279,7 +279,7 @@ class Settings(QtGui.QDialog): self.inifile.set("Audio", "Sound volume", self.soundslider.value()) self.inifile.set("Audio", "Blip volume", self.blipslider.value()) - self.inifile.write(open("AO2XP.ini", "w")) + self.inifile.write(open("AO2XP.ini", "wb")) with open(AO2XPpath+"callwords.ini", "w") as f: f.write(self.callwords_edit.toPlainText().toUtf8())