Viewer: Show full path to book in the metadata display

Fixes #1843312 [ENHANCEMENT: ePub Reader metadata should show filepath for current open ePub book](https://bugs.launchpad.net/calibre/+bug/1843312)
This commit is contained in:
Kovid Goyal 2019-09-20 11:19:05 +05:30
parent 46f32de20b
commit db486c684f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -575,13 +575,17 @@ class Overlay:
def show_metadata(self):
self.hide_current_panel()
def show_metadata_overlay(mi, overlay, container):
def show_metadata_overlay(mi, pathtoebook, overlay, container):
container.appendChild(E.div(class_=BD_CLASS_NAME, style='padding: 1ex 1em'))
table = E.table(class_='metadata')
container.lastChild.appendChild(table)
render_metadata(mi, table)
if pathtoebook:
container.lastChild.appendChild(E.div(
style='font-size: smaller; margin-top: 1ex; padding-top: 1ex; border-top: solid 1px',
_('Path: {}').format(pathtoebook)))
self.panels.push(SimpleOverlay(self, show_metadata_overlay.bind(None, self.view.book.metadata), self.view.book.metadata.title))
self.panels.push(SimpleOverlay(self, show_metadata_overlay.bind(None, self.view.book.metadata, self.view.book.manifest.pathtoebook), self.view.book.metadata.title))
self.show_current_panel()
def show_ask_for_location(self):