From c70a4c92c554ccca13edcb60b15e12af56d13f60 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 1 Aug 2009 21:23:44 +0200 Subject: use auto-sizing for yesno dialogs --- src/core/libs/lib-ui.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 113e66d..5a8140f 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -438,11 +438,10 @@ _dia_ask_string () _dia_ask_yesno () { local default - height=$((`echo -e "$1" | wc -l` +7)) str=$1 # If $2 contains an explicit 'no' we set defaultno for yesno dialog [ "$2" == "no" ] && default="--defaultno" - dialog $default --yesno "$str" $height 55 # returns 0 for yes, 1 for no + dialog $default --yesno "$str" 0 0 # returns 0 for yes, 1 for no local ret=$? [ $ret -eq 0 ] && debug 'UI' "dia_ask_yesno: User picked YES" [ $ret -gt 0 ] && debug 'UI' "dia_ask_yesno: User picked NO" -- cgit v1.2.3-54-g00ecf