mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Allow Virtual Library removal confirmation dialog to be skipped
This commit is contained in:
parent
9c0a1ca2f3
commit
c3301f8cc3
1 changed files with 4 additions and 4 deletions
|
|
@ -13,6 +13,7 @@
|
|||
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 @@ def add_action(name, search):
|
|||
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…
Reference in a new issue