Hopefully made it so leopard users can actually use Pesterchum.
This commit is contained in:
parent
cb70650545
commit
7c530aaf7a
3 changed files with 23 additions and 14 deletions
1
menus.py
1
menus.py
|
@ -1146,6 +1146,7 @@ class PesterOptions(QtGui.QDialog):
|
||||||
layout_6.addWidget(QtGui.QLabel("Check for\nPesterchum Updates:"))
|
layout_6.addWidget(QtGui.QLabel("Check for\nPesterchum Updates:"))
|
||||||
layout_6.addWidget(self.updateBox)
|
layout_6.addWidget(self.updateBox)
|
||||||
|
|
||||||
|
if not ostools.isOSXLeopard():
|
||||||
self.mspaCheck = QtGui.QCheckBox("Check for MSPA Updates", self)
|
self.mspaCheck = QtGui.QCheckBox("Check for MSPA Updates", self)
|
||||||
self.mspaCheck.setChecked(self.config.checkMSPA())
|
self.mspaCheck.setChecked(self.config.checkMSPA())
|
||||||
|
|
||||||
|
|
13
ostools.py
13
ostools.py
|
@ -14,18 +14,15 @@ def isLinux():
|
||||||
def isOSXBundle():
|
def isOSXBundle():
|
||||||
return isOSX() and (os.path.abspath('.').find(".app") != -1)
|
return isOSX() and (os.path.abspath('.').find(".app") != -1)
|
||||||
|
|
||||||
|
def isOSXLeopard():
|
||||||
|
return isOSX() and platform.mac_ver()[0].startswith("10.5")
|
||||||
|
|
||||||
def osVer():
|
def osVer():
|
||||||
if isWin32():
|
if isWin32():
|
||||||
return " ".join(platform.win32_ver())
|
return " ".join(platform.win32_ver())
|
||||||
elif isOSX():
|
elif isOSX():
|
||||||
ret = ""
|
ver = platform.mac_ver();
|
||||||
for i in platform.mac_ver():
|
return " ".join((ver[0], " (", ver[2], ")"))
|
||||||
if type(i) == type(tuple()):
|
|
||||||
for j in i:
|
|
||||||
ret += " %s" % (j)
|
|
||||||
else:
|
|
||||||
ret += " %s" % (i)
|
|
||||||
return ret[1:]
|
|
||||||
elif isLinux():
|
elif isLinux():
|
||||||
return " ".join(platform.linux_distribution())
|
return " ".join(platform.linux_distribution())
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,11 @@ from irc import PesterIRC
|
||||||
from logviewer import PesterLogUserSelect, PesterLogViewer
|
from logviewer import PesterLogUserSelect, PesterLogViewer
|
||||||
from bugreport import BugReporter
|
from bugreport import BugReporter
|
||||||
from randomer import RandomHandler
|
from randomer import RandomHandler
|
||||||
|
|
||||||
|
# Rawr, fuck you OSX leopard
|
||||||
|
if not ostools.isOSXLeopard():
|
||||||
from updatecheck import MSPAChecker
|
from updatecheck import MSPAChecker
|
||||||
|
|
||||||
from toast import PesterToastMachine, PesterToast
|
from toast import PesterToastMachine, PesterToast
|
||||||
from libs import pytwmn
|
from libs import pytwmn
|
||||||
from profile import *
|
from profile import *
|
||||||
|
@ -1107,6 +1111,8 @@ class PesterWindow(MovingWindow):
|
||||||
if not self.config.defaultprofile():
|
if not self.config.defaultprofile():
|
||||||
self.changeProfile()
|
self.changeProfile()
|
||||||
|
|
||||||
|
# Fuck you some more OSX leopard! >:(
|
||||||
|
if not ostools.isOSXLeopard():
|
||||||
QtCore.QTimer.singleShot(1000, self, QtCore.SLOT('mspacheck()'))
|
QtCore.QTimer.singleShot(1000, self, QtCore.SLOT('mspacheck()'))
|
||||||
|
|
||||||
self.connect(self, QtCore.SIGNAL('pcUpdate(QString, QString)'),
|
self.connect(self, QtCore.SIGNAL('pcUpdate(QString, QString)'),
|
||||||
|
@ -1120,6 +1126,8 @@ class PesterWindow(MovingWindow):
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def mspacheck(self):
|
def mspacheck(self):
|
||||||
|
# Fuck you EVEN more OSX leopard! >:((((
|
||||||
|
if not ostools.isOSXLeopard():
|
||||||
checker = MSPAChecker(self)
|
checker = MSPAChecker(self)
|
||||||
|
|
||||||
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString)
|
@QtCore.pyqtSlot(QtCore.QString, QtCore.QString)
|
||||||
|
@ -2224,6 +2232,9 @@ class PesterWindow(MovingWindow):
|
||||||
if updatechecksetting != curupdatecheck:
|
if updatechecksetting != curupdatecheck:
|
||||||
self.config.set('checkUpdates', updatechecksetting)
|
self.config.set('checkUpdates', updatechecksetting)
|
||||||
# mspa update check
|
# mspa update check
|
||||||
|
if ostools.isOSXLeopard():
|
||||||
|
mspachecksetting = false
|
||||||
|
else:
|
||||||
mspachecksetting = self.optionmenu.mspaCheck.isChecked()
|
mspachecksetting = self.optionmenu.mspaCheck.isChecked()
|
||||||
curmspacheck = self.config.checkMSPA()
|
curmspacheck = self.config.checkMSPA()
|
||||||
if mspachecksetting != curmspacheck:
|
if mspachecksetting != curmspacheck:
|
||||||
|
|
Loading…
Reference in a new issue