Move beep to UI componenent rather than boos, since that's where it belongs

This commit is contained in:
Kovid Goyal 2020-11-25 22:09:33 +05:30
parent 99032d9102
commit 18a8ecd534
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 1 additions and 1 deletions

View File

@ -429,7 +429,6 @@ class Boss(QObject):
@in_thread_job @in_thread_job
def delete_requested(self, spine_items, other_items): def delete_requested(self, spine_items, other_items):
QApplication.beep()
self.add_savepoint(_('Before: Delete files')) self.add_savepoint(_('Before: Delete files'))
self.commit_dirty_opf() self.commit_dirty_opf()
c = current_container() c = current_container()

View File

@ -748,6 +748,7 @@ class FileList(QTreeWidget, OpenWithHandler):
spine_removals = [(unicode_type(item.data(0, NAME_ROLE) or ''), item.isSelected()) for item in children] spine_removals = [(unicode_type(item.data(0, NAME_ROLE) or ''), item.isSelected()) for item in children]
other_removals = {unicode_type(item.data(0, NAME_ROLE) or '') for item in self.selectedItems() other_removals = {unicode_type(item.data(0, NAME_ROLE) or '') for item in self.selectedItems()
if unicode_type(item.data(0, CATEGORY_ROLE) or '') != 'text'} if unicode_type(item.data(0, CATEGORY_ROLE) or '') != 'text'}
QApplication.beep()
self.delete_requested.emit(spine_removals, other_removals) self.delete_requested.emit(spine_removals, other_removals)
def delete_done(self, spine_removals, other_removals): def delete_done(self, spine_removals, other_removals):