openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #25931
[Merge] lp:~trb143/openlp/bug-1416528a into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/bug-1416528a into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #1416528 in OpenLP: "Consider moving the delete option in the right click menu to the bottom of the menu."
https://bugs.launchpad.net/openlp/+bug/1416528
For more details, see:
https://code.launchpad.net/~trb143/openlp/bug-1416528a/+merge/248170
Move the delete to the bottom of the menu
Test that the main window initialise the correct number of services.
lp:~trb143/openlp/bug-1416528a (revision 2490)
[SUCCESS] http://ci.openlp.org/job/Branch-01-Pull/925/
[SUCCESS] http://ci.openlp.org/job/Branch-02-Functional-Tests/851/
[SUCCESS] http://ci.openlp.org/job/Branch-03-Interface-Tests/796/
[SUCCESS] http://ci.openlp.org/job/Branch-04a-Windows_Functional_Tests/707/
[SUCCESS] http://ci.openlp.org/job/Branch-04b-Windows_Interface_Tests/306/
[SUCCESS] http://ci.openlp.org/job/Branch-05a-Code_Analysis/445/
[SUCCESS] http://ci.openlp.org/job/Branch-05b-Test_Coverage/316/
--
Your team OpenLP Core is requested to review the proposed merge of lp:~trb143/openlp/bug-1416528a into lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2015-01-22 17:31:00 +0000
+++ openlp/core/lib/mediamanageritem.py 2015-01-30 21:24:38 +0000
@@ -213,13 +213,6 @@
icon=':/general/general_edit.png',
triggers=self.on_edit_click)
create_widget_action(self.list_view, separator=True)
- if self.has_delete_icon:
- create_widget_action(self.list_view,
- 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()),
- text=self.plugin.get_string(StringContent.Delete)['title'],
- icon=':/general/general_delete.png',
- can_shortcuts=True, triggers=self.on_delete_click)
- create_widget_action(self.list_view, separator=True)
create_widget_action(self.list_view,
'listView%s%sItem' % (self.plugin.name.title(), StringContent.Preview.title()),
text=self.plugin.get_string(StringContent.Preview)['title'],
@@ -238,6 +231,13 @@
text=self.plugin.get_string(StringContent.Service)['title'],
icon=':/general/general_add.png',
triggers=self.on_add_click)
+ if self.has_delete_icon:
+ create_widget_action(self.list_view, separator=True)
+ create_widget_action(self.list_view,
+ 'listView%s%sItem' % (self.plugin.name.title(), StringContent.Delete.title()),
+ text=self.plugin.get_string(StringContent.Delete)['title'],
+ icon=':/general/general_delete.png',
+ can_shortcuts=True, triggers=self.on_delete_click)
if self.add_to_service_item:
create_widget_action(self.list_view, separator=True)
create_widget_action(self.list_view,
=== modified file 'tests/functional/openlp_core_ui/test_mainwindow.py'
--- tests/functional/openlp_core_ui/test_mainwindow.py 2015-01-18 13:39:21 +0000
+++ tests/functional/openlp_core_ui/test_mainwindow.py 2015-01-30 21:24:38 +0000
@@ -128,3 +128,21 @@
# THEN the main window's title should be set to the
self.assertEqual(self.main_window.windowTitle(), '%s - %s' % (UiStrings().OLPV2x, 'test.osz'),
'The main window\'s title should be set to "<the contents of UiStrings().OLPV2x> - test.osz"')
+
+ def mainwindow_configuration_test(self):
+ """
+ Check that the Main Window initialises the Registry Correctly
+ """
+ # GIVEN: A built main window
+
+ # WHEN: you check the started functions
+
+ # THEN: the following registry functions should have been registered
+ self.assertEqual(len(self.registry.service_list), 6, 'The registry should have 6 services.')
+ self.assertEqual(len(self.registry.functions_list), 16, 'The registry should have 16 functions')
+ self.assertTrue('application' in self.registry.service_list, 'The application should have been registered.')
+ self.assertTrue('main_window' in self.registry.service_list, 'The main_window should have been registered.')
+ self.assertTrue('media_controller' in self.registry.service_list, 'The media_controller should have been '
+ 'registered.')
+ self.assertTrue('plugin_manager' in self.registry.service_list,
+ 'The plugin_manager should have been registered.')
Follow ups