mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Allow Virtual Library removal confirmation dialog to be skipped
This commit is contained in:
parent
9c0a1ca2f3
commit
c3301f8cc3
@ -13,6 +13,7 @@ from PyQt4.Qt import (
|
||||
QDialogButtonBox, QSize, QVBoxLayout, QListWidget, QStringList, QRadioButton)
|
||||
|
||||
from calibre.gui2 import error_dialog, question_dialog
|
||||
from calibre.gui2.dialogs.confirm_delete import confirm
|
||||
from calibre.gui2.widgets import ComboBoxWithHelp
|
||||
from calibre.utils.config_base import tweaks
|
||||
from calibre.utils.icu import sort_key
|
||||
@ -457,10 +458,9 @@ class SearchRestrictionMixin(object):
|
||||
menu.setEnabled(False)
|
||||
|
||||
def remove_vl_triggered(self, name=None):
|
||||
if not question_dialog(self, _('Are you sure?'),
|
||||
_('Are you sure you want to remove '
|
||||
'the virtual library {0}').format(name),
|
||||
default_yes=False):
|
||||
if not confirm(
|
||||
_('Are you sure you want to remove the virtual library <b>{0}</b>?').format(name),
|
||||
'confirm_vl_removal', parent=self):
|
||||
return
|
||||
self._remove_vl(name, reapply=True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user