openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19018
[Merge] lp:~googol/openlp/central-settings-place into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/central-settings-place into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
Raoul Snyman (raoul-snyman)
Related bugs:
Bug #1096559 in OpenLP: "Central place for default settings"
https://bugs.launchpad.net/openlp/+bug/1096559
For more details, see:
https://code.launchpad.net/~googol/openlp/central-settings-place/+merge/145685
Hello,
- fixed a traceback in the service manager
--
https://code.launchpad.net/~googol/openlp/central-settings-place/+merge/145685
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/settings.py'
--- openlp/core/lib/settings.py 2013-01-21 19:50:19 +0000
+++ openlp/core/lib/settings.py 2013-01-30 18:48:29 +0000
@@ -98,6 +98,7 @@
u'advanced/hide mouse': True,
u'advanced/current media plugin': -1,
u'advanced/double click live': False,
+ u'advanced/data path': u'',
u'advanced/default service hour': 11,
u'advanced/default color': u'#ffffff',
u'advanced/default image': u':/graphics/openlp-splash-screen.png',
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2013-01-24 06:00:51 +0000
+++ openlp/core/ui/mainwindow.py 2013-01-30 18:48:29 +0000
@@ -921,7 +921,8 @@
# Write all the sections and keys.
for section_key in keys:
# FIXME: We are conflicting with the standard "General" section.
- section_key = section_key.lower()
+ if u'eneral' in section_key:
+ section_key = section_key.lower()
key_value = settings.value(section_key)
if key_value is not None:
export_settings.setValue(section_key, key_value)
@@ -939,7 +940,6 @@
temp_conf.close()
export_conf.close()
os.remove(temp_file)
- return
def onModeDefaultItemClicked(self):
"""
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2013-01-24 20:08:52 +0000
+++ openlp/core/ui/servicemanager.py 2013-01-30 18:48:29 +0000
@@ -848,7 +848,8 @@
service_item.auto_play_slides_loop = False
self.autoPlaySlidesLoop.setChecked(False)
if service_item.auto_play_slides_once and service_item.timed_slide_interval == 0:
- service_item.timed_slide_interval = Settings().value(u'loop delay')
+ service_item.timed_slide_interval = Settings().value(
+ self.mainwindow.generalSettingsSection + u'/loop delay')
self.setModified()
def toggleAutoPlaySlidesLoop(self):
@@ -862,7 +863,8 @@
service_item.auto_play_slides_once = False
self.autoPlaySlidesOnce.setChecked(False)
if service_item.auto_play_slides_loop and service_item.timed_slide_interval == 0:
- service_item.timed_slide_interval = Settings().value(u'loop delay')
+ service_item.timed_slide_interval = Settings().value(
+ self.mainwindow.generalSettingsSection + u'/loop delay')
self.setModified()
def onTimedSlideInterval(self):
@@ -873,7 +875,7 @@
item = self.findServiceItem()[0]
service_item = self.serviceItems[item][u'service_item']
if service_item.timed_slide_interval == 0:
- timed_slide_interval = Settings().value(u'loop delay')
+ timed_slide_interval = Settings().value(self.mainwindow.generalSettingsSection + u'/loop delay')
else:
timed_slide_interval = service_item.timed_slide_interval
timed_slide_interval, ok = QtGui.QInputDialog.getInteger(self, translate('OpenLP.ServiceManager',
=== modified file 'tests/functional/openlp_core_utils/test_applocation.py'
--- tests/functional/openlp_core_utils/test_applocation.py 2013-01-07 12:05:19 +0000
+++ tests/functional/openlp_core_utils/test_applocation.py 2013-01-30 18:48:29 +0000
@@ -48,7 +48,7 @@
data_path = AppLocation.get_data_path()
# THEN: the mocked Settings methods were called and the value returned was our set up value
mocked_settings.contains.assert_called_with(u'advanced/data path')
- mocked_settings.value.assert_called_with(u'advanced/data path', u'')
+ mocked_settings.value.assert_called_with(u'advanced/data path')
assert data_path == u'custom/dir', u'Result should be "custom/dir"'
def get_section_data_path_test(self):
@@ -76,7 +76,7 @@
directory = AppLocation.get_directory(AppLocation.AppDir)
# THEN:
assert directory == u'app/dir', u'Directory should be "app/dir"'
-
+
def get_directory_for_plugins_dir_test(self):
"""
Test the AppLocation.get_directory() method for AppLocation.PluginsDir
@@ -94,4 +94,4 @@
directory = AppLocation.get_directory(AppLocation.PluginsDir)
# THEN:
assert directory == u'plugins/dir', u'Directory should be "plugins/dir"'
-
+
Follow ups