Hopefully made it so leopard users can actually use Pesterchum.

This commit is contained in:
Lexi 2011-09-22 18:23:33 +08:00 committed by Kiooeht
parent cb70650545
commit 7c530aaf7a
3 changed files with 23 additions and 14 deletions

View file

@ -1146,8 +1146,9 @@ class PesterOptions(QtGui.QDialog):
layout_6.addWidget(QtGui.QLabel("Check for\nPesterchum Updates:"))
layout_6.addWidget(self.updateBox)
self.mspaCheck = QtGui.QCheckBox("Check for MSPA Updates", self)
self.mspaCheck.setChecked(self.config.checkMSPA())
if not ostools.isOSXLeopard():
self.mspaCheck = QtGui.QCheckBox("Check for MSPA Updates", self)
self.mspaCheck.setChecked(self.config.checkMSPA())
self.randomscheck = QtGui.QCheckBox("Receive Random Encounters")
self.randomscheck.setChecked(parent.userprofile.randoms)

View file

@ -14,18 +14,15 @@ def isLinux():
def isOSXBundle():
return isOSX() and (os.path.abspath('.').find(".app") != -1)
def isOSXLeopard():
return isOSX() and platform.mac_ver()[0].startswith("10.5")
def osVer():
if isWin32():
return " ".join(platform.win32_ver())
elif isOSX():
ret = ""
for i in platform.mac_ver():
if type(i) == type(tuple()):
for j in i:
ret += " %s" % (j)
else:
ret += " %s" % (i)
return ret[1:]
ver = platform.mac_ver();
return " ".join((ver[0], " (", ver[2], ")"))
elif isLinux():
return " ".join(platform.linux_distribution())

View file

@ -71,7 +71,11 @@ from irc import PesterIRC
from logviewer import PesterLogUserSelect, PesterLogViewer
from bugreport import BugReporter
from randomer import RandomHandler
from updatecheck import MSPAChecker
# Rawr, fuck you OSX leopard
if not ostools.isOSXLeopard():
from updatecheck import MSPAChecker
from toast import PesterToastMachine, PesterToast
from libs import pytwmn
from profile import *
@ -1107,7 +1111,9 @@ class PesterWindow(MovingWindow):
if not self.config.defaultprofile():
self.changeProfile()
QtCore.QTimer.singleShot(1000, self, QtCore.SLOT('mspacheck()'))
# Fuck you some more OSX leopard! >:(
if not ostools.isOSXLeopard():
QtCore.QTimer.singleShot(1000, self, QtCore.SLOT('mspacheck()'))
self.connect(self, QtCore.SIGNAL('pcUpdate(QString, QString)'),
self, QtCore.SLOT('updateMsg(QString, QString)'))
@ -1120,7 +1126,9 @@ class PesterWindow(MovingWindow):
@QtCore.pyqtSlot()
def mspacheck(self):
checker = MSPAChecker(self)
# Fuck you EVEN more OSX leopard! >:((((
if not ostools.isOSXLeopard():
checker = MSPAChecker(self)
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString)
def updateMsg(self, ver, url):
@ -2224,7 +2232,10 @@ class PesterWindow(MovingWindow):
if updatechecksetting != curupdatecheck:
self.config.set('checkUpdates', updatechecksetting)
# mspa update check
mspachecksetting = self.optionmenu.mspaCheck.isChecked()
if ostools.isOSXLeopard():
mspachecksetting = false
else:
mspachecksetting = self.optionmenu.mspaCheck.isChecked()
curmspacheck = self.config.checkMSPA()
if mspachecksetting != curmspacheck:
self.config.set('mspa', mspachecksetting)