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