diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-01-21 15:25:15 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-05-05 15:03:41 +1000 |
commit | ec12bbd7bbfb3dd31dbd987ecff463542d54542f (patch) | |
tree | d7bbee18416d58c098a07a57ce2bbc15c194887c /ui | |
parent | 6bb1301835dbd6ff54e1becb5b684fedb0e4caaf (diff) | |
download | talos-petitboot-ec12bbd7bbfb3dd31dbd987ecff463542d54542f.tar.gz talos-petitboot-ec12bbd7bbfb3dd31dbd987ecff463542d54542f.zip |
ui/ncurses: Use sorted field navigation
Changing the visual order of widgets will cause their associated fields to be
out of order relative to the widgetset field array. Rather than manually
resorting the array, use sorted navigation to move according to a field's
visual positon
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ncurses/nc-widgets.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/ncurses/nc-widgets.c b/ui/ncurses/nc-widgets.c index 5c67d82..3daced1 100644 --- a/ui/ncurses/nc-widgets.c +++ b/ui/ncurses/nc-widgets.c @@ -1066,19 +1066,19 @@ bool widgetset_process_key(struct nc_widgetset *set, int key) tab = true; /* fall through */ case KEY_UP: - req = REQ_PREV_FIELD; + req = REQ_SPREV_FIELD; break; case '\t': tab = true; /* fall through */ case KEY_DOWN: - req = REQ_NEXT_FIELD; + req = REQ_SNEXT_FIELD; break; case KEY_PPAGE: - req = REQ_FIRST_FIELD; + req = REQ_SFIRST_FIELD; break; case KEY_NPAGE: - req = REQ_LAST_FIELD; + req = REQ_SLAST_FIELD; break; } |