From 2f69520db8c5ba9501a23c329ef246613bc05927 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 24 Jan 2013 10:18:38 +0100 Subject: [PATCH 1/9] - fixed traceback in service manager --- openlp/core/ui/servicemanager.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 872deff0a..d7512561b 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -849,7 +849,8 @@ class ServiceManager(QtGui.QWidget): 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): @@ -863,7 +864,8 @@ class ServiceManager(QtGui.QWidget): 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): @@ -874,7 +876,7 @@ class ServiceManager(QtGui.QWidget): 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', From af1000bc4d5e0717b465e573f6688334a96aebe3 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 19:05:56 +0100 Subject: [PATCH 2/9] fixed data path missing --- openlp/core/lib/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index aad851dca..27ca8faee 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -98,6 +98,7 @@ class Settings(QtCore.QSettings): 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', From 320b692db736509edcc360c5a1f5e2de823fec63 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 19:24:41 +0100 Subject: [PATCH 3/9] fixed lower case on some settings --- openlp/core/ui/mainwindow.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index b5f069854..ddee38c05 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -921,7 +921,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): # 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) From 94be547550d6c8e6220497a785b3653ba8a71e04 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 19:29:10 +0100 Subject: [PATCH 4/9] removed not needed return --- openlp/core/ui/mainwindow.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index ddee38c05..6ab3f7f0a 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -940,7 +940,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): temp_conf.close() export_conf.close() os.remove(temp_file) - return def onModeDefaultItemClicked(self): """ From 68128af18fa8c271edca1c90c35a287bcf68fdf8 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 19:42:22 +0100 Subject: [PATCH 5/9] fixed test --- tests/functional/openlp_core_utils/test_applocation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/functional/openlp_core_utils/test_applocation.py b/tests/functional/openlp_core_utils/test_applocation.py index 38cc57d70..f874de4db 100644 --- a/tests/functional/openlp_core_utils/test_applocation.py +++ b/tests/functional/openlp_core_utils/test_applocation.py @@ -48,7 +48,7 @@ class TestAppLocation(TestCase): 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 @@ class TestAppLocation(TestCase): 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 @@ class TestAppLocation(TestCase): directory = AppLocation.get_directory(AppLocation.PluginsDir) # THEN: assert directory == u'plugins/dir', u'Directory should be "plugins/dir"' - + From f048abe326459b7e07d644c76e1fd320ae91b39b Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 20:05:52 +0100 Subject: [PATCH 6/9] fixed old missing setting --- openlp/core/lib/settings.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 27ca8faee..2dc9a9f61 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -228,7 +228,9 @@ class Settings(QtCore.QSettings): u'user interface/live splitter geometry': QtCore.QByteArray(), u'user interface/main window state': QtCore.QByteArray(), u'media/players': u'webkit', - u'media/override player': QtCore.Qt.Unchecked + u'media/override player': QtCore.Qt.Unchecked, + # Old settings (not used anymore). Have to be here, so that old setting.config backups can be imported. + u'advanced/stylesheet fix': u'' } __file_path__ = u'' __obsolete_settings__ = [ @@ -239,7 +241,8 @@ class Settings(QtCore.QSettings): (u'servicemanager/last directory', u'', []), (u'songs/last directory 1', u'songs/last directory import', []), (u'bibles/last directory 1', u'bibles/last directory import', []), - (u'songusage/last directory 1', u'songusage/last directory export', []) + (u'songusage/last directory 1', u'songusage/last directory export', []), + (u'advanced/stylesheet fix', u'', []) ] @staticmethod From 8b037d16d7119e4afff415914bf76facdc749d4b Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 20:11:58 +0100 Subject: [PATCH 7/9] fixed moved setting --- openlp/core/lib/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 2dc9a9f61..1ffb1eb44 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -242,7 +242,8 @@ class Settings(QtCore.QSettings): (u'songs/last directory 1', u'songs/last directory import', []), (u'bibles/last directory 1', u'bibles/last directory import', []), (u'songusage/last directory 1', u'songusage/last directory export', []), - (u'advanced/stylesheet fix', u'', []) + (u'advanced/stylesheet fix', u'', []), + (u'media/background colour', u'players/background color', []) ] @staticmethod From f7e44c4563e13fabdbb7d87342f76e13086227bd Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 20:14:39 +0100 Subject: [PATCH 8/9] fixed spelling --- openlp/core/lib/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 1ffb1eb44..3a8914645 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -243,7 +243,7 @@ class Settings(QtCore.QSettings): (u'bibles/last directory 1', u'bibles/last directory import', []), (u'songusage/last directory 1', u'songusage/last directory export', []), (u'advanced/stylesheet fix', u'', []), - (u'media/background colour', u'players/background color', []) + (u'media/background color', u'players/background color', []) ] @staticmethod From 827f978970423e60d7bf4425d0aa44a002cc091b Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Wed, 30 Jan 2013 20:16:51 +0100 Subject: [PATCH 9/9] moved setting --- openlp/core/lib/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 3a8914645..ba1e63fb9 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -141,7 +141,6 @@ class Settings(QtCore.QSettings): u'general/blank warning': False, u'players/background color': u'#000000', u'servicemanager/service theme': u'', - u'servicemanager/last directory': u'', u'servicemanager/last file': u'', u'SettingsImport/Make_Changes': u'At_Own_RISK', u'SettingsImport/type': u'OpenLP_settings_export', @@ -230,7 +229,8 @@ class Settings(QtCore.QSettings): u'media/players': u'webkit', u'media/override player': QtCore.Qt.Unchecked, # Old settings (not used anymore). Have to be here, so that old setting.config backups can be imported. - u'advanced/stylesheet fix': u'' + u'advanced/stylesheet fix': u'', + u'servicemanager/last directory': u'' } __file_path__ = u'' __obsolete_settings__ = [