david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

14 Commits

Author SHA1 Message Date
Michael Brown 58752cc10d [menu] Abstract out the generic concept of a jump scroller
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-03 02:47:37 +00:00
Michael Brown 2f020a8df3 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
These files cannot be automatically relicensed by util/relicense.pl
since they either contain unusual but trivial contributions (such as
the addition of __nonnull function attributes), or contain lines
dating back to the initial git revision (and so require manual
knowledge of the code's origin).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 16:35:29 +00:00
Michael Brown 259858950a [mucurses] Use centralised concept of colour pairs
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-09 15:34:14 +00:00
Michael Brown f79592545b [menu] Adapt user interface to fit display size
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-06 17:00:06 +00:00
Michael Brown fb6edd4e13 [menu] Hide cursor when displaying menu
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-02 17:25:36 +00:00
Michael Brown 5e1fa5cd40 [parseopt] Add parse_timeout()
Parsing a timeout value (specified in milliseconds) into an internal
timeout value measured in timer ticks is a common operation.  Provide
a parse_timeout() value to carry out this conversion automatically.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-01 02:26:19 +00:00
Michael Brown c08025137b [menu] Prevent separators with shortcut keys from being selected
Nothing currently prevents a menu separator from being assigned a
shortcut key, and then from being selected using that shortcut key.
This produces an inconsistency in the user interface, since separators
cannot be selected by other means of menu navigation (arrow keys, page
up/down, etc).

It would be trivial to prevent separators from being assigned shortcut
keys, but this would eliminate one potentially useful use case: having
a large menu and using shortcut keys to jump to a section within the
menu.

Fix by treating a shortcut key on a separator as equivalent to "select
the separator, then press the down arrow key".  This has the effect of
moving to the first non-separator menu item following the specified
separator, which is probably the most intuitive behaviour.  (The
existing logic for moving the selection already handles the various
nasty corner cases such as a menu ending with one or more separators.)

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-06 15:11:49 +00:00
Michael Brown b8cbdbbb53 [menu] Prevent character code zero from acting as a shortcut key
Unrecognised keys may be returned by getkey() as character code zero,
which currently matches against the first menu item with no shortcut
key defined.

Prevent this unintended behaviour by explicitly checking that the menu
item has a defined shortcut key.

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-03-06 14:41:46 +00:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Christian Hesse b3adabd07b [menu] Truncate menu title when necessary
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-03 14:12:47 +01:00
Christian Hesse 512ed2b921 [ui] Allow colours to be configured via config/colour.h
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-06-27 18:40:17 +01:00
Michael Brown 838a76a042 [menu] Add "--default" option to "choose" command
Suggested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-28 23:42:15 +01:00
Michael Brown f5c644cbe1 [menu] Fix default selection when default is item 0
Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-30 17:57:52 +01:00
Michael Brown 493f194531 [menu] Add menu user interface
Inspired-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-03-29 14:01:55 +01:00