This commit is contained in:
Kovid Goyal 2011-02-14 09:18:44 -07:00
parent 1677268ed1
commit 99fffaef8a

View File

@ -278,6 +278,7 @@ class DeleteAction(InterfaceAction):
else: else:
view = self.gui.card_b_view view = self.gui.card_b_view
paths = view.model().paths(rows) paths = view.model().paths(rows)
ids = view.model().indices(rows)
if not confirm('<p>'+_('The selected books will be ' if not confirm('<p>'+_('The selected books will be '
'<b>permanently deleted</b> ' '<b>permanently deleted</b> '
'from your device. Are you sure?') 'from your device. Are you sure?')
@ -285,6 +286,6 @@ class DeleteAction(InterfaceAction):
return return
job = self.gui.remove_paths(paths) job = self.gui.remove_paths(paths)
self.delete_memory[job] = (paths, view.model()) self.delete_memory[job] = (paths, view.model())
view.model().mark_for_deletion(job, rows) view.model().mark_for_deletion(job, ids, rows_are_ids=True)
self.gui.status_bar.show_message(_('Deleting books from device.'), 1000) self.gui.status_bar.show_message(_('Deleting books from device.'), 1000)