diff --git a/menus.py b/menus.py index 9a6e3a0..f69b653 100644 --- a/menus.py +++ b/menus.py @@ -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) diff --git a/ostools.py b/ostools.py index f3d0126..e395477 100644 --- a/ostools.py +++ b/ostools.py @@ -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()) diff --git a/pesterchum.py b/pesterchum.py index a3e7cbc..e766fef 100644 --- a/pesterchum.py +++ b/pesterchum.py @@ -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)