Ticket #1434: 0001-Escape-key-stops-page-load-SL-3373.patch

File 0001-Escape-key-stops-page-load-SL-3373.patch, 1.1 KB (added by humitos, 8 years ago)
  • webactivity.py

    From 9ccd6f187a94249c439bff81d67aff5533e0fabd Mon Sep 17 00:00:00 2001
    Message-Id: <9ccd6f187a94249c439bff81d67aff5533e0fabd.1335578296.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Fri, 27 Apr 2012 22:54:52 -0300
    Subject: [PATCH Browse] Escape key stops page load SL #3373
    
    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@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 b class WebActivity(activity.Activity): 
    463463                return False
    464464
    465465            return True
     466        else:
     467            if key_name == 'Escape':
     468                _logger.debug('keyboard: Stop loading')
     469                browser.stop_loading()
     470            else:
     471                _logger.debug('Unhandled key pressed')
     472                return False
     473
     474            return True
    466475
    467476        return False
    468477