Portable mode fix
The option should not be available if the directory with the executable is not writable, such as when running from a dmg on OSX.
This commit is contained in:
parent
4dbd444053
commit
ff207c1b56
|
@ -4162,6 +4162,14 @@ class settingsDialog(QtGui.QDialog):
|
||||||
|
|
||||||
if shared.appdata == shared.lookupExeFolder():
|
if shared.appdata == shared.lookupExeFolder():
|
||||||
self.ui.checkBoxPortableMode.setChecked(True)
|
self.ui.checkBoxPortableMode.setChecked(True)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
import tempfile
|
||||||
|
file = tempfile.NamedTemporaryFile(dir=shared.lookupExeFolder(), delete=True)
|
||||||
|
file.close # should autodelete
|
||||||
|
except:
|
||||||
|
self.ui.checkBoxPortableMode.setDisabled(True)
|
||||||
|
|
||||||
if 'darwin' in sys.platform:
|
if 'darwin' in sys.platform:
|
||||||
self.ui.checkBoxStartOnLogon.setDisabled(True)
|
self.ui.checkBoxStartOnLogon.setDisabled(True)
|
||||||
self.ui.checkBoxStartOnLogon.setText(_translate(
|
self.ui.checkBoxStartOnLogon.setText(_translate(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user