mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-06 20:46:19 +01:00
Allow disabling the confirmation popup when open the folder of multiple books. Fixes #1735862 [[Enhancement] Customization panel](https://bugs.launchpad.net/calibre/+bug/1735862)
This commit is contained in:
parent
d7994e8d1d
commit
a81f948ef0
1 changed files with 3 additions and 3 deletions
|
|
@ -200,7 +200,7 @@ def open_fmt_with(self, row, fmt, entry):
|
|||
book_id = self.gui.library_view.model().id(row)
|
||||
self.gui.book_details.open_fmt_with.emit(book_id, fmt, entry)
|
||||
|
||||
def _view_check(self, num, max_=3):
|
||||
def _view_check(self, num, max_=5, skip_dialog_name=None):
|
||||
if num <= max_:
|
||||
return True
|
||||
return question_dialog(self.gui, _('Multiple books selected'),
|
||||
|
|
@ -208,7 +208,7 @@ def _view_check(self, num, max_=3):
|
|||
'books at once can be slow and have a negative effect on the '
|
||||
'responsiveness of your computer. Once started the process '
|
||||
'cannot be stopped until complete. Do you wish to continue?'
|
||||
) % num, show_copy_button=False)
|
||||
) % num, show_copy_button=False, skip_dialog_name=skip_dialog_name)
|
||||
|
||||
def view_folder(self, *args):
|
||||
rows = self.gui.current_view().selectionModel().selectedRows()
|
||||
|
|
@ -217,7 +217,7 @@ def view_folder(self, *args):
|
|||
_('No book selected'))
|
||||
d.exec_()
|
||||
return
|
||||
if not self._view_check(len(rows)):
|
||||
if not self._view_check(len(rows), max_=10, skip_dialog_name='open-folder-many-check'):
|
||||
return
|
||||
for i, row in enumerate(rows):
|
||||
path = self.gui.library_view.model().db.abspath(row.row())
|
||||
|
|
|
|||
Loading…
Reference in a new issue