Fix #1901234 [[Enhancement - Content server] Add tooltip to the Show random book button on the Book details page](https://bugs.launchpad.net/calibre/+bug/1901234)

This commit is contained in:
Kovid Goyal 2020-10-24 06:35:58 +05:30
parent c930bbcf7d
commit 3c7907b93c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -527,7 +527,9 @@ def add_top_bar_buttons(container_id):
add_button(container, 'trash', action=delete_book, tooltip=_('Delete this book'))
book_id = parse_url_params().book_id
if book_id is '0':
add_button(container, 'random', def(): fetch_metadata(container_id, 0, proceed_after_succesful_fetch_metadata);)
add_button(container, 'random', tooltip=_('Show a random book'), action=def():
fetch_metadata(container_id, 0, proceed_after_succesful_fetch_metadata)
)
add_button(container, 'ellipsis-v', action=show_subsequent_panel.bind(None, 'more_actions'), tooltip=_('More actions'))