diff options
author | dteske <dteske@FreeBSD.org> | 2012-12-21 18:58:19 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2012-12-21 18:58:19 +0000 |
commit | 5e7ea05b1afc71ededb3af74c2ab29cec62cc286 (patch) | |
tree | b36ed1ce72c48c84674686128b0f6e806b3330e4 /usr.sbin/bsdconfig/mouse | |
parent | 804c67a4867afb8b7ef41a3ade748cab870b788c (diff) | |
download | FreeBSD-src-5e7ea05b1afc71ededb3af74c2ab29cec62cc286.zip FreeBSD-src-5e7ea05b1afc71ededb3af74c2ab29cec62cc286.tar.gz |
Add much-needed dialog(1) --inputbox function for simplifying the process of
requesting input from the user.
Diffstat (limited to 'usr.sbin/bsdconfig/mouse')
-rwxr-xr-x | usr.sbin/bsdconfig/mouse/flags | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/usr.sbin/bsdconfig/mouse/flags b/usr.sbin/bsdconfig/mouse/flags index 21478de..62f9c84 100755 --- a/usr.sbin/bsdconfig/mouse/flags +++ b/usr.sbin/bsdconfig/mouse/flags @@ -79,32 +79,10 @@ flags=$( f_sysrc_get moused_flags ) # Prompt the user with the current value # f_dialog_title "$msg_value_required" -title="$DIALOG_TITLE" -btitle="$DIALOG_BACKTITLE" +flags=$( f_dialog_input "$msg_please_specify_the_mouse_daemon_flags" \ + "$flags" + ) || f_die f_dialog_title_restore -hline= -prompt="$msg_please_specify_the_mouse_daemon_flags" -size=$( f_dialog_inputbox_size \ - "$title" \ - "$btitle" \ - "$prompt" \ - "$flags" \ - "$hline" ) -dialog_inputbox=$( eval $DIALOG \ - --title \"\$title\" \ - --backtitle \"\$btitle\" \ - --hline \"\$hline\" \ - --ok-label \"\$msg_ok\" \ - --cancel-label \"\$msg_cancel\" \ - --inputbox \"\$prompt\" $size \ - \"\$flags\" \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD -) -retval=$? -setvar MENU_INPUTBOX_$$ "$dialog_inputbox" -flags=$( f_dialog_inputstr ) - -[ $retval -eq $SUCCESS ] || f_die # # Save the new value |