mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
46f32de20b
commit
db486c684f
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user