Ticket #3622: pdf_title_fix.patch

File pdf_title_fix.patch, 805 bytes (added by manuq, 12 years ago)
  • pdfviewer.py

    diff --git a/pdfviewer.py b/pdfviewer.py
    index cf435d6..540b9a1 100644
    a b class PDFTabPage(Gtk.HBox): 
    329329        self._evince_viewer.show()
    330330        self.pack_start(self._evince_viewer, True, True, 0)
    331331
    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 self._browser.props.title != '':
     336            # ugly:
     337            self._browser.props.title = self._browser.props.title
     338            return
    333339        pdf_title = self._evince_viewer.get_pdf_title()
    334340        if pdf_title is not None:
    335341            self._browser.props.title = pdf_title