Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pdfviewer.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2013-02-13 15:22:29 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2013-02-19 01:51:23 (GMT)
commit080f092c8bbaf0f770cb4a177f1d0f2bd0ba37d5 (patch)
treea0b9536c175c52f7f540cd4e58b8e79a5adab25a /pdfviewer.py
parente4ddc6dbb1695911679d4cbcd21ee29f108c386b (diff)
Cancel PDF download when 'X' from TabLabel is clicked SL #4390
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> Conflicts resolved: pdfviewer.py
Diffstat (limited to 'pdfviewer.py')
-rw-r--r--pdfviewer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pdfviewer.py b/pdfviewer.py
index f1eb6a8..b98fab4 100644
--- a/pdfviewer.py
+++ b/pdfviewer.py
@@ -280,7 +280,7 @@ class DummyBrowser(GObject.GObject):
return 0
def stop_loading(self):
- self._tab.cancel_download()
+ self._tab.close_tab()
def reload(self):
pass
@@ -408,9 +408,11 @@ class PDFTabPage(Gtk.HBox):
logging.debug('Download error! code %s, detail %s: %s' % \
(err_code, err_detail, reason))
+ def close_tab(self, button=None):
+ self._browser.emit_close_tab()
+
def cancel_download(self):
self._download.cancel()
- self._browser.emit_close_tab()
def __journal_id_to_uri(self, journal_id):
"""Return an URI for a Journal object ID."""