summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-rw-r--r--src/core/libs/lib-ui.sh11
2 files changed, 7 insertions, 5 deletions
diff --git a/TODO b/TODO
index 08f2285..a9fd031 100644
--- a/TODO
+++ b/TODO
@@ -14,7 +14,6 @@ ALPHA PHASE: get some people to test and suggest ideas, while fixing bugs and re
* lib things sometimes call die_error but we go back to the menu.. or something.. i think
* test fancy dm_crypt/lvm etc setups
* automatically configure grub for dm_crypt and lvm
-* 'additional, optional info' not shown correctly in _dia_ask_option bug
BETA PHASE: try to get aif on the (beta) installcd as an experimental, alternative installer.
* find a way to not have to preload libs and stuff, only load them when needed. -> faster start of install program
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh
index 3f64ee6..f7fd42c 100644
--- a/src/core/libs/lib-ui.sh
+++ b/src/core/libs/lib-ui.sh
@@ -346,8 +346,9 @@ _dia_ask_option ()
[ -z "$5" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user
DIA_MENU_TITLE=$2
+ EXTRA_INFO=$3
shift 3
- _dia_DIALOG $DEFAULT --colors --title " $DIA_MENU_TITLE " --menu "$DIA_MENU_TEXT $3" 20 80 16 "$@" 2>$ANSWER
+ _dia_DIALOG $DEFAULT --colors --title " $DIA_MENU_TITLE " --menu "$DIA_MENU_TEXT $EXTRA_INFO" 20 80 16 "$@" 2>$ANSWER
ret=$?
ANSWER_OPTION=`cat $ANSWER`
debug "dia_ask_option: User choose $ANSWER_OPTION ($2)"
@@ -481,10 +482,12 @@ _cli_ask_option ()
# $3 is optional more info
[ -z "$5" ] && debug "_dia_ask_option args: $@" && die_error "ask_option makes only sense if you specify at least one option (with tag and name)" #nothing wrong with only 1 option. it still shows useful info to the user
+ MENU_TITLE=$2
+ EXTRA_INFO=$3
shift 3
- echo "$2"
- [ -n "$3" ] && echo "$3"
+ echo "$MENU_TITLE"
+ [ -n "$EXTRA_INFO" ] && echo "$EXTRA_INFO"
while [ -n "$1" ]
do
echo "$1 ] $2"
@@ -495,7 +498,7 @@ _cli_ask_option ()
[ -z "$DEFAULT" ] && echo -n " > "
read ANSWER_OPTION
[ -z "$ANSWER_OPTION" -a -n "$DEFAULT" ] && ANSWER_OPTION="$DEFAULT"
- debug "cli_ask_option: User choose $ANSWER_OPTION ($2)"
+ debug "cli_ask_option: User choose $ANSWER_OPTION ($MENU_TITLE)"
[ "$ANSWER_OPTION" = CANCEL ] && return 1
return 0
}