Stevan Pettit has proposed merging lp:~smpettit/openlp/custom-delete into 
lp:openlp.

Requested reviews:
  Raoul Snyman (raoul-snyman)
  Tim Bentley (trb143)
  Andreas Preikschat (googol)

For more details, see:
https://code.launchpad.net/~smpettit/openlp/custom-delete/+merge/66198

Added code to openlp/plugins/custom/lib/customtab.py to allow the user to set 
an option if they want delete confirmation for Custom slides or not.

Added code to openlp/plugins/custom/lib/mediaitem.py to ask for delete 
confirmation when deleting a Custom slide if the user has set the option.

Moved signal to end of the __init__

I am requesting this change because the person running OpenLP at church 
"accidentally" delete our Announcements custom containing 17 slides (all of 
which had to be retyped)

Removed custom delete settings

Changed dialog message and button names

Changed dialog heading to "Confirm Delete"
Changed Songs dialog to match Custom Slides

-- 
https://code.launchpad.net/~smpettit/openlp/custom-delete/+merge/66198
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/plugins/custom/lib/mediaitem.py'
--- openlp/plugins/custom/lib/mediaitem.py	2011-06-17 14:15:07 +0000
+++ openlp/plugins/custom/lib/mediaitem.py	2011-06-28 19:12:39 +0000
@@ -200,6 +200,17 @@
         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,
+                translate('CustomPlugin.MediaItem', 'Confirm Delete'),
+                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]

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2011-06-19 22:18:06 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2011-06-28 19:12:39 +0000
@@ -353,13 +353,13 @@
         if check_item_selected(self.listView, UiStrings().SelectDelete):
             items = self.listView.selectedIndexes()
             if QtGui.QMessageBox.question(self,
-                translate('SongsPlugin.MediaItem', 'Delete Song(s)?'),
+                translate('SongsPlugin.MediaItem', 'Confirm Delete'),
                 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]

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to