diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-10 10:57:10 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-10 10:57:10 +0100 |
commit | d4480c3400f1cb082e787ae56e4d91187895594f (patch) | |
tree | 9d266e1f79fb3132722f0014ed87c4cec72575e8 | |
parent | 040cd0f9338ce40a88ad690fc19f52cecf595d74 (diff) |
timezone cleanup
-rw-r--r-- | src/core/libs/lib-ui.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index ccbd909..4210e51 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -211,9 +211,10 @@ ask_string () } -ask_timezone () # TODO: how to do this in dia? +ask_timezone () { - ANSWER_TIMEZONE=`tzselect` + [ "$var_UI_TYPE" = dia ] && { _dia_ask_timezone "$@" ; return $? ; } + [ "$var_UI_TYPE" = cli ] && { _cli_ask_timezone "$@" ; return $? ; } } @@ -385,6 +386,12 @@ _dia_ask_string () } +_dia_ask_timezone () +{ + ANSWER_TIMEZONE=`tzselect` #TODO: implement nicer then this +} + + _dia_ask_yesno () { height=$((`echo -e "$1" | wc -l` +7)) @@ -530,6 +537,12 @@ _cli_ask_string () } +_cli_ask_timezone () +{ + ANSWER_TIMEZONE=`tzselect` +} + + _cli_ask_yesno () { [ -z "$2" ] && echo -n "$1 (y/n): " |