media.subr (ab2043b81eaba0d7d7769b4a58b2b6d17bc464a3) media.subr (89498fdf4174b08bb67d684d14886539aff698b4)
1if [ ! "$_NETWORKING_MEDIA_SUBR" ]; then _NETWORKING_MEDIA_SUBR=1
2#
3# Copyright (c) 2006-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:

--- 109 unchanged lines hidden (view full) ---

118 "$setting" )"
119 f_dialog_msgbox "$message"
120 return $FAILURE
121 fi
122
123 local msg="$( printf "$msg_please_enter_mediaopts" "$interface" )"
124 local hline="$hline_alnum_punc_tab_enter"
125
1if [ ! "$_NETWORKING_MEDIA_SUBR" ]; then _NETWORKING_MEDIA_SUBR=1
2#
3# Copyright (c) 2006-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:

--- 109 unchanged lines hidden (view full) ---

118 "$setting" )"
119 f_dialog_msgbox "$message"
120 return $FAILURE
121 fi
122
123 local msg="$( printf "$msg_please_enter_mediaopts" "$interface" )"
124 local hline="$hline_alnum_punc_tab_enter"
125
126 $DIALOG \
126 local dialog_inputbox
127 dialog_inputbox=$( $DIALOG \
127 --title "$DIALOG_TITLE" \
128 --backtitle "$DIALOG_BACKTITLE" \
129 --hline "$hline" \
130 --ok-label "$msg_ok" \
131 --cancel-label "$msg_cancel" \
132 --inputbox "$msg" 9 70 \
133 "$options" \
128 --title "$DIALOG_TITLE" \
129 --backtitle "$DIALOG_BACKTITLE" \
130 --hline "$hline" \
131 --ok-label "$msg_ok" \
132 --cancel-label "$msg_cancel" \
133 --inputbox "$msg" 9 70 \
134 "$options" \
134 2> "$DIALOG_TMPDIR/dialog.inputbox.$$"
135 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
136 )
135
136 local retval=$?
137
138 local retval=$?
139 setvar DIALOG_INPUTBOX_$$ "$dialog_inputbox"
137 local _options="$( f_dialog_inputstr )"
138
139 [ $retval -eq $SUCCESS ] && options="$_options"
140
141 return $retval
142}
143
144# f_dialog_menu_media_options $interface

--- 55 unchanged lines hidden (view full) ---

200 "$interface" "$interface" )
201 else
202 msg=$( printf "$msg_supported_media_options" \
203 "$interface" "$interface" )
204 fi
205
206 local hline="$hline_arrows_tab_enter"
207
140 local _options="$( f_dialog_inputstr )"
141
142 [ $retval -eq $SUCCESS ] && options="$_options"
143
144 return $retval
145}
146
147# f_dialog_menu_media_options $interface

--- 55 unchanged lines hidden (view full) ---

203 "$interface" "$interface" )
204 else
205 msg=$( printf "$msg_supported_media_options" \
206 "$interface" "$interface" )
207 fi
208
209 local hline="$hline_arrows_tab_enter"
210
208 eval $DIALOG \
211 local dialog_menu
212 dialog_menu=$( eval $DIALOG \
209 --clear --title \"\$DIALOG_TITLE\" \
210 --backtitle \"\$DIALOG_BACKTITLE\" \
211 --hline \"\$hline\" \
212 --ok-label \"\$msg_ok\" \
213 --cancel-label \"\$msg_cancel\" \
214 --menu \"\$msg\" 21 60 12 \
215 $supported_media \
213 --clear --title \"\$DIALOG_TITLE\" \
214 --backtitle \"\$DIALOG_BACKTITLE\" \
215 --hline \"\$hline\" \
216 --ok-label \"\$msg_ok\" \
217 --cancel-label \"\$msg_cancel\" \
218 --menu \"\$msg\" 21 60 12 \
219 $supported_media \
216 2> "$DIALOG_TMPDIR/dialog.menu.$$"
220 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD
221 )
217
218 local retval=$?
222
223 local retval=$?
224 setvar DIALOG_MENU_$$ "$dialog_menu"
219 if [ $retval -eq $SUCCESS ]; then
220 local tag="$( f_dialog_menutag )"
221 options=$( eval f_dialog_menutag2item \"\$tag\" \
222 $supported_media )
223 [ "$options" = "$opt_none" ] && options=
224
225 if [ "$options" = "$opt_cust" ]; then
226 options="$_options"
227 f_dialog_input_options "$interface"
228 retval=$?
229 fi
230 fi
231
232 return $retval
233}
234
235fi # ! $_NETWORKING_MEDIA_SUBR
225 if [ $retval -eq $SUCCESS ]; then
226 local tag="$( f_dialog_menutag )"
227 options=$( eval f_dialog_menutag2item \"\$tag\" \
228 $supported_media )
229 [ "$options" = "$opt_none" ] && options=
230
231 if [ "$options" = "$opt_cust" ]; then
232 options="$_options"
233 f_dialog_input_options "$interface"
234 retval=$?
235 fi
236 fi
237
238 return $retval
239}
240
241fi # ! $_NETWORKING_MEDIA_SUBR