diff options
author | Simon Schampijer <simon@schampijer.de> | 2012-01-12 20:55:39 (GMT) |
---|---|---|
committer | Manuel QuiƱones <manuq@laptop.org> | 2012-01-23 11:50:15 (GMT) |
commit | ca4ae1c7374304c872a4f38f670aa590e45150ff (patch) | |
tree | b7ef10de690710063c1c84a3d2af6e34d2f0d798 /webactivity.py | |
parent | 2274e5c13fd331c9ed6305859445011e9b4d6098 (diff) |
Bring back download functionality using WebKit
This brings back the download functionality to
Browse using WebKit, it handles the cases when you
click on a link and the Browser is not setup to view
this file.
Requesting a download through Palettes is still to
come.
The code is inspired by the download code in Surf.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/webactivity.py b/webactivity.py index d3beb8b..7f2eafa 100644 --- a/webactivity.py +++ b/webactivity.py @@ -156,8 +156,7 @@ from browser import TabbedView from webtoolbar import PrimaryToolbar from edittoolbar import EditToolbar from viewtoolbar import ViewToolbar -# FIXME -# import downloadmanager +import downloadmanager # TODO: make the registration clearer SL #3087 # import filepicker # pylint: disable=W0611 @@ -574,8 +573,7 @@ class WebActivity(activity.Activity): def can_close(self): if self._force_close: return True - # FIXME - elif True: # downloadmanager.can_quit(): + elif downloadmanager.can_quit(): return True else: alert = Alert() @@ -589,7 +587,8 @@ class WebActivity(activity.Activity): cancel_icon = Icon(icon_name='dialog-cancel') cancel_label = ngettext('Continue download', 'Continue downloads', downloadmanager.num_downloads()) - alert.add_button(Gtk.ResponseType.CANCEL, cancel_label, cancel_icon) + alert.add_button(Gtk.ResponseType.CANCEL, cancel_label, + cancel_icon) stop_icon = Icon(icon_name='dialog-ok') alert.add_button(Gtk.ResponseType.OK, _('Stop'), stop_icon) stop_icon.show() |