mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit Book: In the right click menu, do not show cut/copy/undo/redo items if they are disabled
This commit is contained in:
parent
580c35d407
commit
0c8044e7b6
@ -477,10 +477,14 @@ class Editor(QMainWindow):
|
||||
m.addAction(_('Show help for: %s') % word, partial(open_url, url))
|
||||
|
||||
for x in ('undo', 'redo'):
|
||||
a(actions['editor-%s' % x])
|
||||
ac = actions['editor-%s' % x]
|
||||
if ac.isEnabled():
|
||||
a(ac)
|
||||
m.addSeparator()
|
||||
for x in ('cut', 'copy', 'paste'):
|
||||
a(actions['editor-' + x])
|
||||
ac = actions['editor-' + x]
|
||||
if ac.isEnabled():
|
||||
a(ac)
|
||||
m.addSeparator()
|
||||
m.addAction(_('&Select all'), self.editor.select_all)
|
||||
m.addAction(actions['mark-selected-text'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user