mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add the ToC emblem for the EPUB 3 nav file
This commit is contained in:
parent
fadba2dfa1
commit
8544b1c53b
@ -355,6 +355,7 @@ class FileList(QTreeWidget):
|
||||
|
||||
cannot_be_renamed = container.names_that_must_not_be_changed
|
||||
ncx_mime = guess_type('a.ncx')
|
||||
nav_items = frozenset(container.manifest_items_with_property('nav'))
|
||||
|
||||
def create_item(name, linear=None):
|
||||
imt = container.mime_map.get(name, guess_type(name))
|
||||
@ -381,7 +382,7 @@ class FileList(QTreeWidget):
|
||||
if name in container.opf_name:
|
||||
emblems.append('metadata.png')
|
||||
tooltips.append(_('This file contains all the metadata and book structure information'))
|
||||
if imt == ncx_mime:
|
||||
if imt == ncx_mime or name in nav_items:
|
||||
emblems.append('toc.png')
|
||||
tooltips.append(_('This file contains the metadata table of contents'))
|
||||
if name not in manifested_names and not container.ok_to_be_unmanifested(name):
|
||||
|
Loading…
x
Reference in New Issue
Block a user