rcedit.subr (ab2043b81eaba0d7d7769b4a58b2b6d17bc464a3) | rcedit.subr (89498fdf4174b08bb67d684d14886539aff698b4) |
---|---|
1if [ ! "$_STARTUP_RCEDIT_SUBR" ]; then _STARTUP_RCEDIT_SUBR=1 2# 3# Copyright (c) 2012 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 63 unchanged lines hidden (view full) --- 72 "$DIALOG_BACKTITLE" \ 73 "$msg" \ 74 "$_input" \ 75 "$hline" ) 76 77 local opterm="--" 78 [ "$USE_XDIALOG" ] && opterm= 79 | 1if [ ! "$_STARTUP_RCEDIT_SUBR" ]; then _STARTUP_RCEDIT_SUBR=1 2# 3# Copyright (c) 2012 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 63 unchanged lines hidden (view full) --- 72 "$DIALOG_BACKTITLE" \ 73 "$msg" \ 74 "$_input" \ 75 "$hline" ) 76 77 local opterm="--" 78 [ "$USE_XDIALOG" ] && opterm= 79 |
80 eval $DIALOG \ | 80 local dialog_inputbox 81 dialog_inputbox=$( eval $DIALOG \ |
81 --title \"\$DIALOG_TITLE\" \ 82 --backtitle \"\$DIALOG_BACKTITLE\" \ 83 --hline \"\$hline\" \ 84 --ok-label \"\$msg_ok\" \ 85 --cancel-label \"\$msg_cancel\" \ 86 --inputbox \"\$msg\" $size \ 87 $opterm \"\$_input\" \ | 82 --title \"\$DIALOG_TITLE\" \ 83 --backtitle \"\$DIALOG_BACKTITLE\" \ 84 --hline \"\$hline\" \ 85 --ok-label \"\$msg_ok\" \ 86 --cancel-label \"\$msg_cancel\" \ 87 --inputbox \"\$msg\" $size \ 88 $opterm \"\$_input\" \ |
88 2> $DIALOG_TMPDIR/dialog.inputbox.$$ | 89 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD 90 ) |
89 90 retval=$? | 91 92 retval=$? |
93 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox" |
|
91 _input=$( f_dialog_inputstr ) 92 93 # Return if user has either pressed ESC or chosen Cancel/No 94 [ $retval -eq $SUCCESS ] || return $retval 95 96 # Return if the value has not changed from current 97 local cur_val="$( f_sysrc_get "$var" )" 98 [ "$_input" = "$cur_val" ] && return $SUCCESS 99 100 f_dprintf "$var: [$cur_val]->[$_input]" 101 102 err=$( f_sysrc_set "$var" "$_input" 2>&1 ) || 103 f_show_msg "$err" 104} 105 106fi # ! $_STARTUP_RCEDIT_SUBR | 94 _input=$( f_dialog_inputstr ) 95 96 # Return if user has either pressed ESC or chosen Cancel/No 97 [ $retval -eq $SUCCESS ] || return $retval 98 99 # Return if the value has not changed from current 100 local cur_val="$( f_sysrc_get "$var" )" 101 [ "$_input" = "$cur_val" ] && return $SUCCESS 102 103 f_dprintf "$var: [$cur_val]->[$_input]" 104 105 err=$( f_sysrc_set "$var" "$_input" 2>&1 ) || 106 f_show_msg "$err" 107} 108 109fi # ! $_STARTUP_RCEDIT_SUBR |