openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #23682
[Merge] lp:~trb143/openlp/gen1 into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/gen1 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~trb143/openlp/gen1/+merge/221981
Fix a validation bug with presentations being loaded from services
Fix range bug stopping service items being triggered unless it was the first!
--
https://code.launchpad.net/~trb143/openlp/gen1/+merge/221981
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/gen1 into lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2014-04-19 05:29:00 +0000
+++ openlp/core/ui/servicemanager.py 2014-06-04 04:56:09 +0000
@@ -1081,6 +1081,7 @@
:param field:
:param message: The data passed in from a remove message
"""
+ self.log_debug(message)
self.set_item(int(message))
def set_item(self, index):
@@ -1089,7 +1090,7 @@
:param index: The index of the service item list to be actioned.
"""
- if 0 >= index < self.service_manager_list.topLevelItemCount():
+ if 0 <= index < self.service_manager_list.topLevelItemCount():
item = self.service_manager_list.topLevelItem(index)
self.service_manager_list.setCurrentItem(item)
self.make_live()
=== modified file 'openlp/plugins/presentations/lib/mediaitem.py'
--- openlp/plugins/presentations/lib/mediaitem.py 2014-03-31 18:48:10 +0000
+++ openlp/plugins/presentations/lib/mediaitem.py 2014-06-04 04:56:09 +0000
@@ -92,7 +92,7 @@
for file_type in file_types:
if file_type not in file_type_string:
file_type_string += '*.%s ' % file_type
- self.service_manager.supported_suffixes(file_type)
+ self.service_manager.supported_suffixes([file_type])
self.on_new_file_masks = translate('PresentationPlugin.MediaItem', 'Presentations (%s)') % file_type_string
def required_icons(self):
=== modified file 'tests/functional/openlp_core_ui/test_servicemanager.py'
--- tests/functional/openlp_core_ui/test_servicemanager.py 2014-04-02 19:35:09 +0000
+++ tests/functional/openlp_core_ui/test_servicemanager.py 2014-06-04 04:56:09 +0000
@@ -71,7 +71,18 @@
service_manager._save_lite = False
service_manager.service_theme = 'test_theme'
service = service_manager.create_basic_service()[0]
- # THEN: The the controller should be registered in the registry.
+ # THEN: The controller should be registered in the registry.
self.assertNotEqual(service, None, 'The base service should be created')
self.assertEqual(service['openlp_core']['service-theme'], 'test_theme', 'The test theme should be saved')
self.assertEqual(service['openlp_core']['lite-service'], False, 'The lite service should be saved')
+
+ def supported_suffixes_test(self):
+ """
+ Test the create basic service array
+ """
+ # GIVEN: A new service manager instance.
+ service_manager = ServiceManager(None)
+ # WHEN: a suffix is added.
+ service_manager.supported_suffixes(['txt'])
+ # THEN: The the controller should be registered in the registry.
+ self.assertEqual('txt' in service_manager.suffixes, True, 'The suffix should be in the list')