mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Book details panel: Fix removal of identifiers via right click not working
This commit is contained in:
parent
91e2b16deb
commit
e4f2cdf947
@ -200,7 +200,7 @@ def mi_to_html(mi, field_list=None, default_author_link=None, use_roman_numbers=
|
|||||||
urls = urls_from_identifiers(mi.identifiers)
|
urls = urls_from_identifiers(mi.identifiers)
|
||||||
links = [
|
links = [
|
||||||
'<a href="%s" title="%s:%s">%s</a>' % (
|
'<a href="%s" title="%s:%s">%s</a>' % (
|
||||||
action('identifier', url=url, name=namel, type=id_typ, value=id_val, field='identifiers', book_id=book_id),
|
action('identifier', url=url, name=namel, id_type=id_typ, value=id_val, field='identifiers', book_id=book_id),
|
||||||
a(id_typ), a(id_val), p(namel))
|
a(id_typ), a(id_val), p(namel))
|
||||||
for namel, id_typ, id_val, url in urls]
|
for namel, id_typ, id_val, url in urls]
|
||||||
links = u', '.join(links)
|
links = u', '.join(links)
|
||||||
|
@ -251,13 +251,14 @@ def add_item_specific_entries(menu, data, book_info):
|
|||||||
field = data.get('field')
|
field = data.get('field')
|
||||||
if field is not None:
|
if field is not None:
|
||||||
book_id = int(data['book_id'])
|
book_id = int(data['book_id'])
|
||||||
value = data['value']
|
value = remove_value = data['value']
|
||||||
if field == 'identifiers':
|
if field == 'identifiers':
|
||||||
menu.addAction(book_info.edit_identifiers_action)
|
menu.addAction(book_info.edit_identifiers_action)
|
||||||
|
remove_value = data['id_type']
|
||||||
elif field in ('tags', 'series', 'publisher') or is_category(field):
|
elif field in ('tags', 'series', 'publisher') or is_category(field):
|
||||||
menu.addAction(init_manage_action(book_info.manage_action, field, value))
|
menu.addAction(init_manage_action(book_info.manage_action, field, value))
|
||||||
ac = book_info.remove_item_action
|
ac = book_info.remove_item_action
|
||||||
ac.data = (field, value, book_id)
|
ac.data = (field, remove_value, book_id)
|
||||||
ac.setText(_('Remove %s from this book') % value)
|
ac.setText(_('Remove %s from this book') % value)
|
||||||
menu.addAction(ac)
|
menu.addAction(ac)
|
||||||
return search_internet_added
|
return search_internet_added
|
||||||
|
Loading…
x
Reference in New Issue
Block a user