diff --git a/AO2XPbase/ao2xp_themes/default/theme.py b/AO2XPbase/ao2xp_themes/default/theme.py index cd46ecc..2d5481e 100644 --- a/AO2XPbase/ao2xp_themes/default/theme.py +++ b/AO2XPbase/ao2xp_themes/default/theme.py @@ -1,4 +1,5 @@ self.gamewindow.setFixedSize(820, 730) +self.gamewindow.center() self.ooclog.setGeometry(814 - 288, 0, 288, 248) self.oocnameinput.resize(self.oocnameinput.sizeHint().width() - 32, self.oocnameinput.sizeHint().height()) diff --git a/gameview.py b/gameview.py index 914ee8c..f40c990 100644 --- a/gameview.py +++ b/gameview.py @@ -1346,6 +1346,7 @@ class gui(QtGui.QWidget): def onPVPacket(self, charname): exec open(AO2XPpath+"ao2xp_themes/"+get_option("General", "theme", "default")+"/theme.py") + self.gamewindow.center() if not self.swapping: self.loadCharacter(charname) @@ -1887,7 +1888,7 @@ class gui(QtGui.QWidget): #if f_char.lower() != self.charlist[f_char_id][0].lower(): # logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')' - if self.m_chatmessage[SHOWNAME]: + if self.m_chatmessage[SHOWNAME] and self.m_chatmessage[SHOWNAME].lower() != f_char.lower(): try: logcharname += " ("+self.m_chatmessage[SHOWNAME].decode('utf-8')+")" except: @@ -2589,14 +2590,15 @@ class gui(QtGui.QWidget): audio.sethandleattr(self.music, BASS_ATTRIB_VOL, self.musicslider.value() / 100.0) audio.playhandle(self.music, True) else: - print "[audio] Couldn't play music. Error", audio.getbasserror() + error = audio.getbasserror() + print "[audio] Couldn't play music. Error", error # Here comes the evil HTTPS hack for XP systems, but it also allows us to download and play modules and midis, because, why not? musext = os.path.splitext(basename(musl))[-1] if musext in ['.mid', '.midi']: self.specialstream = 1 elif musext in ['.xm', '.mod', '.mo3', '.it', '.s3m', '.mtm', '.umx']: self.specialstream = 2 - if musl.startswith("https") or self.specialstream: + if (musl.startswith("https") and error == 2) or self.specialstream: print "[audio] Downloading music with urllib2" self.download_thread = DownloadThread(self, mus) self.download_thread.finished_signal.connect(self.playDownloadedMusic) diff --git a/mainmenu.py b/mainmenu.py index 0bd93a1..d8e93ba 100644 --- a/mainmenu.py +++ b/mainmenu.py @@ -349,6 +349,7 @@ class lobby(QtGui.QWidget): def move_to_game(self, tcp, playerlist, charlist, musiclist, background, evidence, areas, features=[], oocjoin=[], hplist=[], webAO_bucket=""): self.gamewindow.showGame(tcp, playerlist, charlist, musiclist, background, evidence, areas, features, oocjoin, hplist, webAO_bucket) + self.gamewindow.center() def lobby_sendchat(self): #text = self.lobbychatinput.text().toUtf8()