Date: Mon, 12 Dec 2016 19:07:42 +0000 (UTC) From: Devin Teske <dteske@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309923 - head/usr.sbin/bsdinstall/scripts Message-ID: <201612121907.uBCJ7gwk081582@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dteske Date: Mon Dec 12 19:07:42 2016 New Revision: 309923 URL: https://svnweb.freebsd.org/changeset/base/309923 Log: There is zero harm in always passing --default-item to dialog Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig Modified: head/usr.sbin/bsdinstall/scripts/wlanconfig ============================================================================== --- head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 19:01:04 2016 (r309922) +++ head/usr.sbin/bsdinstall/scripts/wlanconfig Mon Dec 12 19:07:42 2016 (r309923) @@ -80,8 +80,9 @@ country_set() dialog_country_select() { local input regdomains countries regdomain country - local def_item_regdomain= - local def_item_country= + local no_default="<not selected>" + local def_item_regdomain="${1:-$no_default}" + local def_item_country="${2:-$no_default}" # # Parse available countries/regdomains @@ -104,14 +105,6 @@ dialog_country_select() } }' | sort -k 2 | tr '\n' ' ' ) - # Change default cursor position (if required). - if [ "$1" != "<not selected>" ]; then - def_item_regdomain="--default-item $1" - fi - if [ "$2" != "<not selected>" ]; then - def_item_country="--default-item $2" - fi - f_dialog_menu_size height width rows \"Regdomain selection\" \ \"$DIALOG_BACKTITLE\" \"Select your regdomain.\" \ \"\" $regdomains @@ -119,7 +112,7 @@ dialog_country_select() --backtitle \"$DIALOG_BACKTITLE\" \ --title \"Regdomain selection\" \ --cancel-label \"Skip\" \ - $def_item_regdomain \ + --default-item \"$def_item_regdomain\" \ --no-items \ --stdout \ --menu \"Select your regdomain.\" \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612121907.uBCJ7gwk081582>