summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-17 15:33:32 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-01-17 15:33:32 +0000
commit65ab38fc1c26bed356fc61dd4adfe1f0495fab65 (patch)
tree41d82a60d528c084100e6f75d7e1d958a4233568
parentbf14b2ddb1c535a97f1eded6b874e96f00f51d4f (diff)
downloadnetsurf-65ab38fc1c26bed356fc61dd4adfe1f0495fab65.tar.gz
netsurf-65ab38fc1c26bed356fc61dd4adfe1f0495fab65.tar.bz2
Clear a selection after it has been copied, as per the AmigaOS Style Guide
-rw-r--r--amiga/gui.c4
-rw-r--r--amiga/tree.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/amiga/gui.c b/amiga/gui.c
index b24ae1c88..6f2f402e8 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -1207,7 +1207,6 @@ int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie)
break;
case 'c':
nskey = KEY_COPY_SELECTION;
- /**\todo this should also send KEY_CLEAR_SELECTION */
break;
case 'v':
nskey = KEY_PASTE;
@@ -2393,6 +2392,9 @@ static void ami_handle_msg(void)
ami_help_open(AMI_HELP_GUI, scrn);
break;
}
+ } else if(nskey == KEY_COPY_SELECTION) {
+ /* if we've copied a selection we need to clear it - style guide rules */
+ browser_window_key_press(gwin->gw->bw, KEY_CLEAR_SELECTION);
}
}
break;
diff --git a/amiga/tree.c b/amiga/tree.c
index 75ba123ad..e44c821e0 100644
--- a/amiga/tree.c
+++ b/amiga/tree.c
@@ -1183,6 +1183,10 @@ BOOL ami_tree_event(struct treeview_window *twin)
GetAttr(WINDOW_InputEvent,twin->objects[OID_MAIN],(ULONG *)&ie);
nskey = ami_key_to_nskey(storage, ie);
tree_keypress(twin->tree, nskey);
+ if(nskey == KEY_COPY_SELECTION) {
+ /* if we've copied a selection we need to clear it - style guide rules */
+ tree_keypress(twin->tree, KEY_CLEAR_SELECTION);
+ }
break;
case WMHI_MENUPICK: