mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Book Details: Do not show the "Copy link" context menu item unless there is an actual link at the cursor location. Fixes #1605594 [Comments right click menu](https://bugs.launchpad.net/calibre/+bug/1605594)
This commit is contained in:
parent
5323f39aa5
commit
e1c3d4afb1
@ -180,7 +180,7 @@ def details_context_menu_event(view, ev, book_info): # {{{
|
|||||||
el = r.linkElement()
|
el = r.linkElement()
|
||||||
data = el.attribute('data-item')
|
data = el.attribute('data-item')
|
||||||
author = el.toPlainText() if unicode(el.attribute('calibre-data')) == u'authors' else None
|
author = el.toPlainText() if unicode(el.attribute('calibre-data')) == u'authors' else None
|
||||||
if not url.startswith('search:'):
|
if url and not url.startswith('search:'):
|
||||||
for a, t in [('copy', _('&Copy Link')),
|
for a, t in [('copy', _('&Copy Link')),
|
||||||
]:
|
]:
|
||||||
ac = getattr(book_info, '%s_link_action'%a)
|
ac = getattr(book_info, '%s_link_action'%a)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user