From 77887df865769a9142cfdd50df689d472a25ea8a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 4 Dec 2013 15:25:19 +0530 Subject: [PATCH] Emblems for the opf and ncx files --- src/calibre/gui2/tweak_book/file_list.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/gui2/tweak_book/file_list.py b/src/calibre/gui2/tweak_book/file_list.py index 5cce0f3c20..31729e8f18 100644 --- a/src/calibre/gui2/tweak_book/file_list.py +++ b/src/calibre/gui2/tweak_book/file_list.py @@ -258,6 +258,7 @@ class FileList(QTreeWidget): ok_to_be_unmanifested = container.names_that_need_not_be_manifested cannot_be_renamed = container.names_that_must_not_be_changed + ncx_mime = guess_type('a.ncx') def create_item(name, linear=None): imt = container.mime_map.get(name, guess_type(name)) @@ -280,6 +281,10 @@ class FileList(QTreeWidget): emblems = [] if name in {cover_page_name, cover_image_name}: emblems.append('default_cover.png') + if name in container.opf_name: + emblems.append('metadata.png') + if imt == ncx_mime: + emblems.append('toc.png') if name not in manifested_names and name not in ok_to_be_unmanifested: emblems.append('dialog_question.png') if linear is False: