Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2012-05-21 15:37:27 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2012-05-22 11:52:34 (GMT)
commitca214d1893f54286c199e66d8617e764e49a6a99 (patch)
tree3ff619dbdc4f2ce7c7efd1c6f7b807595ad882ad
parentbe99ea710eafe281f6fd4c2592544dc0c7a41f32 (diff)
Fix for displaying filename in untitled PDFs SL #3597
This patch moves the line that sets the title to the filename of the PDF, so we display "Loading..." until we know the title, and if title is None, we show the filename. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Reviewed-By: Manuel Kaufmann <humitos@gmail.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--pdfviewer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pdfviewer.py b/pdfviewer.py
index ef6a6ea..cf435d6 100644
--- a/pdfviewer.py
+++ b/pdfviewer.py
@@ -289,8 +289,6 @@ class PDFTabPage(Gtk.HBox):
# The title may be given from the Journal:
if title is not None:
self._browser.props.title = title
- else:
- self._browser.props.title = os.path.basename(requested_uri)
self._browser.props.uri = requested_uri
self._browser.props.load_status = WebKit.LoadStatus.PROVISIONAL
@@ -335,6 +333,8 @@ class PDFTabPage(Gtk.HBox):
pdf_title = self._evince_viewer.get_pdf_title()
if pdf_title is not None:
self._browser.props.title = pdf_title
+ else:
+ self._browser.props.title = os.path.basename(self._requested_uri)
def _get_path_from_journal(self, journal_uri):
"""Get the system tree URI of the file for the Journal object."""