forked from openlp/openlp
merge with trunk
This commit is contained in:
commit
306826bbeb
@ -64,6 +64,7 @@ class UiStrings(object):
|
||||
self.Cancel = translate('OpenLP.Ui', 'Cancel')
|
||||
self.CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
|
||||
self.CreateService = translate('OpenLP.Ui', 'Create a new service.')
|
||||
self.ConfirmDelete = translate('OpenLP.Ui', 'Confirm Delete')
|
||||
self.Continuous = translate('OpenLP.Ui', 'Continuous')
|
||||
self.Default = unicode(translate('OpenLP.Ui', 'Default'))
|
||||
self.Delete = translate('OpenLP.Ui', '&Delete')
|
||||
|
@ -200,6 +200,17 @@ class CustomMediaItem(MediaManagerItem):
|
||||
Remove a custom item from the list and database
|
||||
"""
|
||||
if check_item_selected(self.listView, UiStrings().SelectDelete):
|
||||
items = self.listView.selectedIndexes()
|
||||
if QtGui.QMessageBox.question(self,
|
||||
UiStrings().ConfirmDelete,
|
||||
translate('CustomPlugin.MediaItem',
|
||||
'Are you sure you want to delete the %n selected custom'
|
||||
' slides(s)?', '',
|
||||
QtCore.QCoreApplication.CodecForTr, len(items)),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
|
||||
return
|
||||
row_list = [item.row() for item in self.listView.selectedIndexes()]
|
||||
row_list.sort(reverse=True)
|
||||
id_list = [(item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
|
@ -353,13 +353,13 @@ class SongMediaItem(MediaManagerItem):
|
||||
if check_item_selected(self.listView, UiStrings().SelectDelete):
|
||||
items = self.listView.selectedIndexes()
|
||||
if QtGui.QMessageBox.question(self,
|
||||
translate('SongsPlugin.MediaItem', 'Delete Song(s)?'),
|
||||
UiStrings().ConfirmDelete,
|
||||
translate('SongsPlugin.MediaItem',
|
||||
'Are you sure you want to delete the %n selected song(s)?', '',
|
||||
QtCore.QCoreApplication.CodecForTr, len(items)),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok |
|
||||
QtGui.QMessageBox.Cancel),
|
||||
QtGui.QMessageBox.Ok) == QtGui.QMessageBox.Cancel:
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
QtGui.QMessageBox.Yes) == QtGui.QMessageBox.No:
|
||||
return
|
||||
for item in items:
|
||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||
|
Loading…
Reference in New Issue
Block a user