# Dialog functions
# Original functions from slackpkg modified by Marek Wodzinski (majek@mamy.to)
#
export DIALOG_CANCEL="1"
export DIALOG_ERROR="126"
export DIALOG_ESC="1"
export DIALOG_EXTRA="3"
export DIALOG_HELP="2"
export DIALOG_ITEM_HELP="2"
export DIALOG_OK="0"
# Show the lists and asks if the user want to proceed with that action
# Return accepted list in $SHOWLIST
#
SELECT="$(sed -r 's/.*(select=)(on|off).*/\2/' <<< "$@")"
if [ -n $SELECT ]; then
DIALOG=on
ONOFF=$SELECT
fi
if [ "$DIALOG" = "on" ] || [ "$DIALOG" = "ON" ]; then