forked from openlp/openlp
CodecForTr was dropped in Qt5
The deletion of songs still depended on that. Just a minor edit to drop the dependency bzr-revno: 2590
This commit is contained in:
commit
a6ef19683d
@ -190,8 +190,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
if QtWidgets.QMessageBox.question(
|
||||
self, UiStrings().ConfirmDelete,
|
||||
translate('CustomPlugin.MediaItem',
|
||||
'Are you sure you want to delete the %n selected custom slide(s)?',
|
||||
'', QtCore.QCoreApplication.CodecForTr, len(items)),
|
||||
'Are you sure you want to delete the "%d" selected custom slide(s)?') %len(items),
|
||||
QtWidgets.QMessageBox.StandardButtons(
|
||||
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No),
|
||||
QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No:
|
||||
|
@ -363,8 +363,8 @@ class SongMediaItem(MediaManagerItem):
|
||||
items = self.list_view.selectedIndexes()
|
||||
if QtWidgets.QMessageBox.question(
|
||||
self, UiStrings().ConfirmDelete,
|
||||
translate('SongsPlugin.MediaItem', 'Are you sure you want to delete the %n selected song(s)?', '',
|
||||
QtCore.QCoreApplication.CodecForTr, len(items)),
|
||||
translate('SongsPlugin.MediaItem',
|
||||
'Are you sure you want to delete the "%d" selected song(s)?') % len(items),
|
||||
QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No),
|
||||
QtWidgets.QMessageBox.Yes) == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
|
@ -60,6 +60,22 @@ class TestMediaManagerItem(TestCase, TestMixin):
|
||||
# THEN: on_preview_click() should have been called
|
||||
mocked_on_preview_click.assert_called_with()
|
||||
|
||||
def required_icons_test(self):
|
||||
"""
|
||||
Test the default icons for plugins
|
||||
"""
|
||||
# GIVEN: A MediaManagerItem
|
||||
mmi = MediaManagerItem(None)
|
||||
# WHEN: Object is created
|
||||
mmi.required_icons()
|
||||
# THEN: Default icons should be populated
|
||||
self.assertFalse(mmi.has_import_icon, 'There should be no import icon by default')
|
||||
self.assertTrue(mmi.has_new_icon, 'By default a new icon should be present')
|
||||
self.assertFalse(mmi.has_file_icon, 'There should be no file icon by default')
|
||||
self.assertTrue(mmi.has_delete_icon, 'By default a delete icon should be present')
|
||||
self.assertFalse(mmi.add_to_service_item, 'There should be no add_to_service icon by default')
|
||||
|
||||
|
||||
@patch(u'openlp.core.lib.mediamanageritem.Settings')
|
||||
@patch(u'openlp.core.lib.mediamanageritem.MediaManagerItem.on_live_click')
|
||||
def on_double_clicked_go_live_test(self, mocked_on_live_click, MockedSettings):
|
||||
|
Loading…
Reference in New Issue
Block a user