summaryrefslogtreecommitdiff
path: root/riscos/gui.c
diff options
context:
space:
mode:
authorAdrian Lees <adrian@aemulor.com>2009-01-10 00:18:34 +0000
committerAdrian Lees <adrian@aemulor.com>2009-01-10 00:18:34 +0000
commitd67a57c1e94f8b36b2c8f6785b6b7b404f85de21 (patch)
treec4d36bc29eecb315a4bb3bbb9268e9632556a23a /riscos/gui.c
parent4e3951660f5b3b719f79ba66f3d2aafdbee1f424 (diff)
downloadnetsurf-d67a57c1e94f8b36b2c8f6785b6b7b404f85de21.tar.gz
netsurf-d67a57c1e94f8b36b2c8f6785b6b7b404f85de21.tar.bz2
Assorted saving-related changes (WIP)
svn path=/trunk/netsurf/; revision=6010
Diffstat (limited to 'riscos/gui.c')
-rw-r--r--riscos/gui.c13
1 files changed, 10 insertions, 3 deletions
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));