#!/bin/bash

DIALOG="./confirmation_dialog"
PRESET="question_cancel"
TITLE="A Simple Question"
MESSAGE="Did the quick red fox jump over\nthe lazy brown dog?\n\n\
What do you think?\n"


# Display Confirmation Dialog and get response
#
"$DIALOG" -p "$PRESET" -q -t "$TITLE" "$MESSAGE" "$@"
RESPONSE="$?"

# Print response response
#
echo -n "User responded with: "
case $RESPONSE in
 0)
  echo "No"
 ;;
 1)
  echo "Yes"
 ;;
 2)
  echo "Yes to all"
 ;;
 3)
  echo "Cancel"
 ;;
 4)
  echo "OK"
 ;;
 *)
  echo "Other Response $?"
 ;;
esac
