From 2009091c304fa892727d90c23e93257ffa150d6b Mon Sep 17 00:00:00 2001 From: Manuel QuiƱones Date: Wed, 23 May 2012 20:23:27 +0000 Subject: Display the filename for untitled PDFs stored in the Journal SL #3622 It was set in the setup method of the pdf viewer, but was overwritten by the show_pdf method. This requires the patch attached in SL #3620 Signed-off-by: Manuel QuiƱones Tested-by: Manuel Kaufmann Acked-by: Simon Schampijer --- diff --git a/pdfviewer.py b/pdfviewer.py index cf435d6..5f607bf 100644 --- a/pdfviewer.py +++ b/pdfviewer.py @@ -329,7 +329,12 @@ class PDFTabPage(Gtk.HBox): self._evince_viewer.show() self.pack_start(self._evince_viewer, True, True, 0) - # if the PDF has a title, show it instead of the URI: + # If the PDF has a title, set it as the browse page title, + # otherwise use the last part of the URI. Only when the title + # was not set already from the Journal. + if from_journal: + self._browser.props.title = self._browser.props.title + return pdf_title = self._evince_viewer.get_pdf_title() if pdf_title is not None: self._browser.props.title = pdf_title -- cgit v0.9.1