From 2f8d4418415511460bd7b3b3e532f6b328cf993f Mon Sep 17 00:00:00 2001 From: "Alfonso S. Siciliano" Date: Sun, 13 Mar 2022 02:34:57 +0100 Subject: [PATCH] bsddialog: Import version0.2 This version provides improvements and fixes mainly to use bsddialog utility in bsdinstall/scripts. The lib API is not broken so the previous converted utilities (tzsetup, distextract, etc.) are OK. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D34458 --- .gitignore | 1 + CHANGELOG | 61 ++++++++++++ GNUMakefile | 2 +- Makefile | 8 +- README.md | 5 +- bsddialog.1 | 12 +-- bsddialog.c | 107 +++++++++++--------- examples_library/checklist.c | 3 +- examples_library/compile | 2 +- examples_library/datebox.c | 8 +- examples_library/form.c | 4 +- examples_library/formw.c | 61 ++++++++++++ examples_library/infobox.c | 3 +- examples_library/menu.c | 3 +- examples_library/mixedlist.c | 20 ++-- examples_library/msgbox.c | 3 +- examples_library/pause.c | 3 +- examples_library/radiolist.c | 3 +- examples_library/rangebox.c | 3 +- examples_library/theme.c | 13 ++- examples_library/timebox.c | 8 +- examples_library/yesno.c | 3 +- examples_utility/checklist.sh | 27 ++++- examples_utility/form.sh | 27 ++++- examples_utility/gauge.sh | 4 +- examples_utility/infobox.sh | 3 +- examples_utility/inputbox.sh | 30 +++++- examples_utility/menu.sh | 28 +++++- examples_utility/mixedform.sh | 36 +++++-- examples_utility/mixedgauge.sh | 3 +- examples_utility/msgbox.sh | 19 +++- examples_utility/passwordbox.sh | 30 +++++- examples_utility/passwordform.sh | 30 +++++- examples_utility/pause.sh | 36 +++++++ examples_utility/radiolist.sh | 29 +++++- examples_utility/timebox.sh | 34 +++++++ examples_utility/treeview.sh | 17 ---- examples_utility/yesno.sh | 23 ++++- lib/GNUMakefile | 5 +- lib/Makefile | 11 +-- lib/barbox.c | 54 +++++----- lib/bsddialog.3 | 43 ++++---- lib/bsddialog.h | 7 +- lib/bsddialog_theme.h | 11 ++- lib/formbox.c | 108 +++++++++++++------- lib/infobox.c | 3 - lib/lib_util.c | 59 +++++------ lib/lib_util.h | 10 +- lib/libbsddialog.c | 9 +- lib/menubox.c | 118 ++++++++++++---------- lib/messagebox.c | 9 +- lib/textbox.c | 5 +- lib/theme.c | 60 +++++------ lib/timebox.c | 165 ++++++++++++++++++++++--------- 54 files changed, 957 insertions(+), 432 deletions(-) create mode 100644 CHANGELOG create mode 100644 examples_library/formw.c create mode 100755 examples_utility/pause.sh create mode 100755 examples_utility/timebox.sh delete mode 100755 examples_utility/treeview.sh diff --git a/.gitignore b/.gitignore index 557ad3300d1f..62f7b594a708 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ examples_library/buildlist examples_library/checklist examples_library/datebox examples_library/form +examples_library/formw examples_library/menu examples_library/mixedlist examples_library/radiolist diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 000000000000..22eb3342cfe2 --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,61 @@ +2022-03-02 version 0.2 + + Utility: + * add: (this) CHANGELOG. + * add: "menus" print item with focus (except with OK and ERROR). + * add: pause.sh example. + * add: timebox.sh example. + * change: --theme name "default" -> "flat". + * delete: treeview.sh example. + * fix: --separate-output does not quote (except with --quoted). + * fix: --datebox and --date-format month in output. + * improve: examples handle exit status. + + Library: + * add: conf.form.enable_wchar for wide characters in bsddialog_form(). + * add: theme.menu.f_selectorcolor. + * add: formw.c example. + * change: move conf.f1_file and conf.f1_message in conf.key. + * change: theme.button.[left|right]ch -> theme.button.[left|right]delim. + * change: theme.button.space -> theme.button.hmargin. + * change: theme.menu.arrowcolor -> theme.dialog.arrowcolor. + * change: default menu item depth 4 -> 2. + * fix: disable HOME, PPAGE, END and NPAGE keys in bsddialog_form(). + * fix: visible cursor for timebox.c and form.c in VM VirtualBox. + * fix: mixedlist, center position of separator with big pad. + * fix: timebox and datebox set values only with BSDDIALOG_OK. + * fix: menurows autosize with fullscreen. + * fix: bar color with 0%. + * fix: bar label position. + * improve: timebox and datebox navigation (keys, buttons and shortcuts). + * improve: "menus" colors for accessibility. + + +2022-01-27 version 0.1 + + * Common-Options: --ascii-lines, --backtitle , --begin-x , + --begin-y , --cancel-label