forked from openlp/openlp
Changed name of settings INI to conform to PortableApps Standards
Disabled data path change when running portable
This commit is contained in:
parent
2f38d55261
commit
eb58ee10e8
@ -264,7 +264,7 @@ def main(args=None):
|
||||
# Get location OpenLPPortable.ini
|
||||
app_path = AppLocation.get_directory(AppLocation.AppDir)
|
||||
portable_settings_file = os.path.abspath(os.path.join(app_path, u'..',
|
||||
u'..', u'Data', u'settings', u'OpenLPPortable.ini'))
|
||||
u'..', u'Data', u'settings', u'OpenLP.ini'))
|
||||
# Make this our settings file
|
||||
log.info(u'INI file: %s' % portable_settings_file)
|
||||
Settings.setFilename(portable_settings_file)
|
||||
@ -275,6 +275,7 @@ def main(args=None):
|
||||
log.info(u'Data path: %s' % data_path)
|
||||
# Point to our data path
|
||||
portable_settings.setValue(u'advanced/data path',data_path)
|
||||
portable_settings.setValue(u'advanced/is portable',True)
|
||||
portable_settings.sync()
|
||||
else:
|
||||
app.setApplicationName(u'OpenLP')
|
||||
|
@ -543,6 +543,9 @@ class AdvancedTab(SettingsTab):
|
||||
os.path.join(self.currentDataPath, u'..')))
|
||||
self.defaultColorButton.setStyleSheet(
|
||||
u'background-color: %s' % self.defaultColor)
|
||||
# Don't allow data directory change if running portable
|
||||
if Settings().contains(u'advanced/is portable'):
|
||||
self.dataDirectoryGroupBox.hide()
|
||||
|
||||
def save(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user