Commit 3c9206b9ecaad08d3367054133fbf64dba92e120
1 parent
42ca1e0e
Exists in
master
and in
3 other branches
Adding selection move actions.
Showing
1 changed file
with
75 additions
and
0 deletions
Show diff stats
src/core/actions/table.c
@@ -71,6 +71,26 @@ | @@ -71,6 +71,26 @@ | ||
71 | return lib3270_move_cursor(hSession,LIB3270_DIR_RIGHT,1); | 71 | return lib3270_move_cursor(hSession,LIB3270_DIR_RIGHT,1); |
72 | } | 72 | } |
73 | 73 | ||
74 | + static int selection_up(H3270 *hSession) | ||
75 | + { | ||
76 | + return lib3270_move_selection(hSession,LIB3270_DIR_UP); | ||
77 | + } | ||
78 | + | ||
79 | + static int selection_down(H3270 *hSession) | ||
80 | + { | ||
81 | + return lib3270_move_selection(hSession,LIB3270_DIR_DOWN); | ||
82 | + } | ||
83 | + | ||
84 | + static int selection_left(H3270 *hSession) | ||
85 | + { | ||
86 | + return lib3270_move_selection(hSession,LIB3270_DIR_LEFT); | ||
87 | + } | ||
88 | + | ||
89 | + static int selection_right(H3270 *hSession) | ||
90 | + { | ||
91 | + return lib3270_move_selection(hSession,LIB3270_DIR_RIGHT); | ||
92 | + } | ||
93 | + | ||
74 | /** | 94 | /** |
75 | * @brief Get LIB3270 action table; | 95 | * @brief Get LIB3270 action table; |
76 | * | 96 | * |
@@ -341,6 +361,61 @@ | @@ -341,6 +361,61 @@ | ||
341 | .activatable = lib3270_is_connected | 361 | .activatable = lib3270_is_connected |
342 | }, | 362 | }, |
343 | 363 | ||
364 | + { | ||
365 | + .name = "selection-up", | ||
366 | + .type = LIB3270_ACTION_TYPE_SELECTION, | ||
367 | + | ||
368 | + .keys = "<Alt>Up", | ||
369 | + .icon = NULL, | ||
370 | + .label = N_( "Move selection up" ), | ||
371 | + .summary = NULL, | ||
372 | + .activate = selection_up, | ||
373 | + | ||
374 | + .group = LIB3270_ACTION_GROUP_SELECTION, | ||
375 | + .activatable = lib3270_get_has_selection | ||
376 | + }, | ||
377 | + | ||
378 | + { | ||
379 | + .name = "selection-down", | ||
380 | + .type = LIB3270_ACTION_TYPE_SELECTION, | ||
381 | + | ||
382 | + .keys = "<Alt>Down", | ||
383 | + .icon = NULL, | ||
384 | + .label = N_( "Move selection down" ), | ||
385 | + .summary = NULL, | ||
386 | + .activate = selection_down, | ||
387 | + | ||
388 | + .group = LIB3270_ACTION_GROUP_SELECTION, | ||
389 | + .activatable = lib3270_get_has_selection | ||
390 | + }, | ||
391 | + | ||
392 | + { | ||
393 | + .name = "selection-left", | ||
394 | + .type = LIB3270_ACTION_TYPE_SELECTION, | ||
395 | + | ||
396 | + .keys = "<Alt>Left", | ||
397 | + .icon = NULL, | ||
398 | + .label = N_( "Move selection left" ), | ||
399 | + .summary = NULL, | ||
400 | + .activate = selection_left, | ||
401 | + | ||
402 | + .group = LIB3270_ACTION_GROUP_SELECTION, | ||
403 | + .activatable = lib3270_get_has_selection | ||
404 | + }, | ||
405 | + | ||
406 | + { | ||
407 | + .name = "selection-right", | ||
408 | + .type = LIB3270_ACTION_TYPE_SELECTION, | ||
409 | + | ||
410 | + .keys = "<Alt>Right", | ||
411 | + .icon = NULL, | ||
412 | + .label = N_( "Move selection right" ), | ||
413 | + .summary = NULL, | ||
414 | + .activate = selection_right, | ||
415 | + .activatable = lib3270_get_has_selection | ||
416 | + | ||
417 | + }, | ||
418 | + | ||
344 | // | 419 | // |
345 | // Field actions. | 420 | // Field actions. |
346 | // | 421 | // |