diff options
author | Manuel Quiñones <manuq@laptop.org> | 2012-05-23 20:23:27 (GMT) |
---|---|---|
committer | Manuel Quiñones <manuq@laptop.org> | 2012-05-30 11:51:36 (GMT) |
commit | 2009091c304fa892727d90c23e93257ffa150d6b (patch) | |
tree | b5d1f991c94e6d87048312706c8fa04c23d626d8 | |
parent | d6c56f8184de2b3980aca34fb644d2a8f0f4b64f (diff) |
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 <manuq@laptop.org>
Tested-by: Manuel Kaufmann <humitos@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r-- | pdfviewer.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |