mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Confirm on remove highlight
This commit is contained in:
parent
7d38da5243
commit
6b85665584
@ -12,7 +12,7 @@ from PyQt5.Qt import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from calibre.constants import plugins
|
from calibre.constants import plugins
|
||||||
from calibre.gui2 import error_dialog
|
from calibre.gui2 import error_dialog, question_dialog
|
||||||
from calibre.gui2.viewer.search import SearchInput
|
from calibre.gui2.viewer.search import SearchInput
|
||||||
from polyglot.builtins import range
|
from polyglot.builtins import range
|
||||||
|
|
||||||
@ -143,6 +143,9 @@ class HighlightsPanel(QWidget):
|
|||||||
h = self.highlights.current_highlight
|
h = self.highlights.current_highlight
|
||||||
if h is None:
|
if h is None:
|
||||||
return self.no_selected_highlight()
|
return self.no_selected_highlight()
|
||||||
|
if question_dialog(self, _('Are you sure?'), _(
|
||||||
|
'Are you sure you want to delete this highlight permanently?')
|
||||||
|
):
|
||||||
self.request_highlight_action.emit(h['uuid'], 'delete')
|
self.request_highlight_action.emit(h['uuid'], 'delete')
|
||||||
|
|
||||||
def add_highlight(self):
|
def add_highlight(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user