Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdfviewer.py
Commit message (Collapse)AuthorAgeFilesLines
* PDF tabs: set status FINISHED if the URL is local - SL #4471Manuel Quiñones2013-04-101-0/+2
| | | | | | | | For the remote tabs, FINISHED is set when the download finishes, but for remote we were leaving the tabs in PROVISIONAL state. This caused an error when the user tried to close the tab with the local PDF. Signed-off-by: Manuel Quiñones <manuq@laptop.org>
* Download progress bar SL #4385Manuel Kaufmann2013-04-101-1/+11
| | | | | | | | | | | | This patch is a workaround for a WebKit's bug[1] regarding the 'notify::progress' signal that is not emitted when it should be. So, we use 'notify::current-size' signal instead and compare the 'current-size' with the 'total-size' to get the proper progress. [1] https://bugs.webkit.org/show_bug.cgi?id=107308 Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel Quiñones <manuq@laptop.org>
* Show error page when downloading a PDF fails SL #4011Manuel Kaufmann2013-02-181-2/+75
| | | | | | | | | When the 'error' signal is emitted while a PDF file is being downloaded, Browse shows an error page similar to the one showed when a web page could not be reached. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Signed-off-by: Manuel Quiñones <manuq@laptop.org>
* Cancel PDF download when 'X' from TabLabel is clicked SL #4390Manuel Kaufmann2013-02-131-4/+6
| | | | | | | | | When the 'X' button is clicked from the TabLabel we emit 'tab-close' signal and cancel the download on its callback if the tab closed is a PDFTabPage. Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel Quiñones <manuq@laptop.org>
* Persist zoom level of tabs between sessions - SL #4368Manuel Quiñones2013-01-251-0/+6
| | | | | | | | | | | | - Read the zoom level using Dictionary.get() to make it backwards compatible. - Add getter and setter to DummyBrowser for the duck typing. Initial patch from Ariel Calzada <ariel@acivitycentral.com> Signed-off-by: Ariel Calzada <ariel@acivitycentral.com> Signed-off-by: Manuel Quiñones <manuq@laptop.org>
* Fix "Actual zoom" button in PDF tabs - SL #4383Manuel Quiñones2013-01-231-0/+13
| | | | | | | | | - Make 'Actual zoom' button from the subtoolbar insensitive, just like the others - Add 'Actual zoom' button to PDF toolbar overflow Signed-off-by: Manuel Quiñones <manuq@laptop.org>
* Add a message box while the PDF is being downloaded - SL #4384Manuel Quiñones2013-01-171-1/+63
| | | | | | | | | | | The message box is designed in the same style as others in Sugar, like in the Journal and the "no matches" in the Home activities list view. A book icon displays the download progress. The icon is stolen from Read Activity. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Manuel Kaufmann <humitos@gmail.com>
* Display security as a lock icon for secured pages - SL #4245Manuel Quiñones2012-11-291-0/+2
| | | | | | | | | | | | | For pages using the https protocol, display a) a lock icon if there were no errors in the certification, or b) a broken lock icon if the certification failed. Use the same logic as Epiphany: http://git.gnome.org/browse/epiphany/tree/embed/ephy-web-view.c#n2321 Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Manuel Kaufmann <humitos@gmail.com>
* Button to clear the url entry SL #3499Manuel Kaufmann2012-09-281-0/+6
| | | | | | | | | | Added an 'X' to clear the url entry easily. This button is shown when the url entry has focus and the user is not reading a .pdf webpage. When the focus is left the icon changes again to the correct one (reload, stop loading or none) Signed-off-by: Manuel Kaufmann <humitos@gmail.com> Acked-by: Manuel Quiñones <manuq@laptop.org>
* Display the filename for untitled PDFs stored in the Journal SL #3622Manuel Quiñones2012-05-301-1/+6
| | | | | | | | | | | 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>
* Fix for displaying filename in untitled PDFs SL #3597Manuel Quiñones2012-05-221-2/+2
| | | | | | | | | | 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>
* Update progress bar and stop/reload buttons when switching tabsManuel Quiñones2012-03-281-1/+0
| | | | | | | | | | | | | | | | | | | | Calling the _set_status and _set_progress methods in the web toolbar directly when a new tab is activated. Also the callback for load-status is disconnected now in the previous tab, like the other callbacks. Removed the update of the navigation buttons when the loading status changes. This is only needed when the adress changes or when the tabs are switched. Removed the title set to None when loading status chenges, this was giving the following Gtk error: Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
* Basic PDF readingManuel Quiñones2012-03-221-0/+420
When a request is made with a MIME type 'application/pdf', a new tab is opened next to the current one to show the document. If the document is remote, a download starts, and the progress is shown in the toolbar's URL entry. It can be cancelled with the X button, the same for cancelling the loading. Basic navigation is provided to allow a quick read of the PDF. The user can also save the document to the Journal to store it, and later it may be opened in Read for featureful usage. The controls are in a floating toolbar, at the bottom of the document. The PDF tabs are restored between sessions as expected. If the user clicks on a hyperlink in a PDF, a new tab is opened next to the current to browse it. This uses Evince, the same backend to display the PDF document as Read. And WebKit to download the document, as per other downloads in Browse. Signed-off-by: Manuel Quiñones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>