← Back to team overview

openlp-core team mailing list archive

[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/221622

Fix the load_last_service bug.
Fix a validation bug with presentations being loaded from services
-- 
https://code.launchpad.net/~trb143/openlp/gen1/+merge/221622
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/gen1 into lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2014-05-07 23:52:51 +0000
+++ openlp/core/ui/mainwindow.py	2014-05-31 20:16:17 +0000
@@ -598,7 +598,7 @@
         if self.arguments:
             self.open_cmd_line_files()
         elif Settings().value(self.general_settings_section + '/auto open'):
-            self.service_manager_contents.load_Last_file()
+            self.service_manager_contents.load_last_file()
         self.timer_version_id = self.startTimer(1000)
         view_mode = Settings().value('%s/view mode' % self.general_settings_section)
         if view_mode == 'default':

=== 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-05-31 20:16:17 +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-05-31 20:16:17 +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')