From d67a57c1e94f8b36b2c8f6785b6b7b404f85de21 Mon Sep 17 00:00:00 2001 From: Adrian Lees Date: Sat, 10 Jan 2009 00:18:34 +0000 Subject: Assorted saving-related changes (WIP) svn path=/trunk/netsurf/; revision=6010 --- riscos/gui.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'riscos/gui.c') diff --git a/riscos/gui.c b/riscos/gui.c index 2f01f7881..348db5d0e 100644 --- a/riscos/gui.c +++ b/riscos/gui.c @@ -1292,10 +1292,17 @@ void ro_gui_drag_end(wimp_dragged *drag) void ro_gui_keypress(wimp_key *key) { - os_error *error; + if (key->c == wimp_KEY_ESCAPE && + (gui_current_drag_type == GUI_DRAG_SAVE || + gui_current_drag_type == GUI_DRAG_DOWNLOAD_SAVE)) { - if (!ro_gui_wimp_event_keypress(key)) { - error = xwimp_process_key(key->c); + /* Allow Escape key to be used for cancelling a drag save + (easier than finding somewhere safe to abort the drag) */ + ro_gui_drag_box_cancel(); + gui_current_drag_type = GUI_DRAG_NONE; + } + else if (!ro_gui_wimp_event_keypress(key)) { + os_error *error = xwimp_process_key(key->c); if (error) { LOG(("xwimp_process_key: 0x%x: %s", error->errnum, error->errmess)); -- cgit v1.2.3