summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/libs/lib-ui.sh17
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): "