forked from openlp/openlp
fix delete
This commit is contained in:
parent
121f0908a1
commit
6f76c164e0
@ -213,13 +213,6 @@ class MediaManagerItem(QtGui.QWidget, RegistryProperties):
|
||||
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 @@ class MediaManagerItem(QtGui.QWidget, RegistryProperties):
|
||||
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,
|
||||
|
@ -128,3 +128,21 @@ class TestMainWindow(TestCase, TestMixin):
|
||||
# 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.')
|
||||
|
Loading…
Reference in New Issue
Block a user