mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1988443 [[Enhancement] Add warning pop-up when deleting custom highlight style](https://bugs.launchpad.net/calibre/+bug/1988443)
This commit is contained in:
parent
b8366228fb
commit
afeefef650
@ -473,6 +473,13 @@ class EditNotesAndColors: # {{{
|
|||||||
return item
|
return item
|
||||||
|
|
||||||
def remove_custom_color(self):
|
def remove_custom_color(self):
|
||||||
|
question_dialog(_('Are you sure?'), _(
|
||||||
|
'Do you want to permanently delete this highlighting style?'), def (yes):
|
||||||
|
if yes:
|
||||||
|
self.do_remove_custom_color()
|
||||||
|
)
|
||||||
|
|
||||||
|
def do_remove_custom_color(self):
|
||||||
item = self.container.getElementsByClassName('current-swatch')[0]
|
item = self.container.getElementsByClassName('current-swatch')[0]
|
||||||
cct = JSON.parse(item.dataset.style)
|
cct = JSON.parse(item.dataset.style)
|
||||||
p = item.parentNode
|
p = item.parentNode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user