Add a <Cancel> button to the "Install Package(s)" dialog.

Signed-off-by: Mauro Giachero <mauro.giachero@gmail.com>
This commit is contained in:
mauro.giachero 2009-06-25 08:03:29 +00:00
parent 3e3be5b1c7
commit 9f69b21d0d

View file

@ -3413,14 +3413,12 @@ start_dialog_queue() {
# When using cli, the -b or -i option will determine whether we build or # When using cli, the -b or -i option will determine whether we build or
# build and install. # build and install.
dialog --title "Install Package(s)" --yesno \ dialog --title "Install Package(s)" \
--help-button --help-label "Cancel" --yesno \
"$(crunch "Would you like to install the packages as they are \ "$(crunch "Would you like to install the packages as they are \
built? Press <Yes> to install, <No> to build only, or <Esc> \ built? Press <Yes> to install, <No> to build only, or <Cancel> \
to exit.")" 8 50 to exit.")" 8 50
case $? in case $? in
255|-1 ) # The user pressed ESC
return 0
;;
0 ) # Build and install 0 ) # Build and install
process_queue buildinstall process_queue buildinstall
if [[ $? == 1 ]]; then if [[ $? == 1 ]]; then
@ -3435,6 +3433,9 @@ start_dialog_queue() {
packages found.")" 8 40 packages found.")" 8 40
fi fi
;; ;;
* ) # Cancel, or the user pressed ESC
return 0
;;
esac esac
} }