From eb95f16c46ecb1777c7a76bac5c63fe6b3371d60 Mon Sep 17 00:00:00 2001 From: John Schember Date: Thu, 18 Jun 2009 07:25:16 -0400 Subject: [PATCH] Implement bug 2654: Show source file type in ebook-viewer with metadata. --- src/calibre/gui2/viewer/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/viewer/main.py b/src/calibre/gui2/viewer/main.py index eca3e93b36..256e528e85 100644 --- a/src/calibre/gui2/viewer/main.py +++ b/src/calibre/gui2/viewer/main.py @@ -138,9 +138,9 @@ class Metadata(QLabel): self.setWordWrap(True) self.setVisible(False) - def show_opf(self, opf): + def show_opf(self, opf, ext=''): mi = MetaInformation(opf) - html = '

%s

%s'%(_('Metadata'), u''.join(mi.to_html())) + html = '

%s

%s\nSource Type %s'%(_('Metadata'), u''.join(mi.to_html()), ext) self.setText(html) def setVisible(self, x): @@ -550,7 +550,7 @@ class EbookViewer(MainWindow, Ui_EbookViewer): unicode(r), det_msg=worker.traceback, show=True) self.close_progress_indicator() else: - self.metadata.show_opf(self.iterator.opf) + self.metadata.show_opf(self.iterator.opf, os.path.splitext(pathtoebook)[1][1:]) title = self.iterator.opf.title if not title: title = os.path.splitext(os.path.basename(pathtoebook))[0]