[Sugar-devel] [PATCH Browse] Escape key stops page load SL #3373
Manuel Kaufmann
humitos at gmail.com
Fri Apr 27 21:58:36 EDT 2012
When a page is still loading the user is able to press
the Escape key to stop its load.
Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
webactivity.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/webactivity.py b/webactivity.py
index 156ea3c..3892010 100644
--- a/webactivity.py
+++ b/webactivity.py
@@ -463,6 +463,15 @@ class WebActivity(activity.Activity):
return False
return True
+ else:
+ if key_name == 'Escape':
+ _logger.debug('keyboard: Stop loading')
+ browser.stop_loading()
+ else:
+ _logger.debug('Unhandled key pressed')
+ return False
+
+ return True
return False
--
1.7.7.6
More information about the Sugar-devel
mailing list