From 90f67ce3327230cef9f15e5b5e57e59b7b649fec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Wed, 23 May 2012 17:23:27 -0300
Subject: [PATCH Browse 2/2] Display the filename for untitled PDFs stored in
the Journal SL #3622
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
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>
---
pdfviewer.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pdfviewer.py b/pdfviewer.py
index cf435d6..5f607bf 100644
a
|
b
|
class PDFTabPage(Gtk.HBox): |
329 | 329 | self._evince_viewer.show() |
330 | 330 | self.pack_start(self._evince_viewer, True, True, 0) |
331 | 331 | |
332 | | # if the PDF has a title, show it instead of the URI: |
| 332 | # If the PDF has a title, set it as the browse page title, |
| 333 | # otherwise use the last part of the URI. Only when the title |
| 334 | # was not set already from the Journal. |
| 335 | if from_journal: |
| 336 | self._browser.props.title = self._browser.props.title |
| 337 | return |
333 | 338 | pdf_title = self._evince_viewer.get_pdf_title() |
334 | 339 | if pdf_title is not None: |
335 | 340 | self._browser.props.title = pdf_title |