From owner-svn-src-head@FreeBSD.ORG Sat Jun 8 17:46:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DE1AE70D; Sat, 8 Jun 2013 17:46:39 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B6FA61AFE; Sat, 8 Jun 2013 17:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r58Hkd4V047202; Sat, 8 Jun 2013 17:46:39 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r58HkdbJ047201; Sat, 8 Jun 2013 17:46:39 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306081746.r58HkdbJ047201@svn.freebsd.org> From: Devin Teske Date: Sat, 8 Jun 2013 17:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251543 - head/usr.sbin/bsdconfig/usermgmt/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2013 17:46:39 -0000 Author: dteske Date: Sat Jun 8 17:46:39 2013 New Revision: 251543 URL: http://svnweb.freebsd.org/changeset/base/251543 Log: Track defaultitem in the password and account expiry menus; if the user presses ESC or chooses Cancel/No in any of the sub-menus, we want to return to the expiry menu with that item selected. Modified: head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Modified: head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Sat Jun 8 17:36:31 2013 (r251542) +++ head/usr.sbin/bsdconfig/usermgmt/share/user_input.subr Sat Jun 8 17:46:39 2013 (r251543) @@ -483,12 +483,13 @@ f_dialog_input_expire_password() # # Loop until the user provides taint-free/cancellation-free input # - local date_type + local date_type defaultitem= while :; do date_type=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ + --default-item \"\$defaultitem\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" \ @@ -498,6 +499,7 @@ f_dialog_input_expire_password() ) retval=$? f_dialog_data_sanitize date_type + defaultitem="$date_type" f_dprintf "retval=%u date_type=[%s]" $retval "$date_type" # Return if user has either pressed ESC or chosen Cancel/No @@ -666,12 +668,13 @@ f_dialog_input_expire_account() # # Loop until the user provides taint-free/cancellation-free input # - local date_type + local date_type defaultitem= while :; do date_type=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ + --default-item \"\$defaultitem\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" \ @@ -681,6 +684,7 @@ f_dialog_input_expire_account() ) retval=$? f_dialog_data_sanitize date_type + defaultitem="$date_type" f_dprintf "retval=%u date_type=[%s]" $retval "$date_type" # Return if user has either pressed ESC or chosen Cancel/No