Skip to content

Commit

Permalink
use always indent 4
Browse files Browse the repository at this point in the history
  • Loading branch information
retokromer committed Mar 1, 2020
1 parent d204b4c commit d559b13
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions vtest
Original file line number Diff line number Diff line change
Expand Up @@ -224,32 +224,33 @@ _config_check(){
}

_edit_prefs() {
_expand_list2items(){
LIST=( "$@" )
for i in "${LIST[@]}" ; do
echo "<item>${i}</item>"
done
}
_get_index_of_value(){
# run with function, value to look for as first argument, and array to look in as 2nd argument, such function as
# _get_index_of_value "${VIDEO_INPUT_CHOICE}" "${VIDEO_INPUT_OPTIONS[@]}"
VALUE="${1}"
shift
LIST=( "$@" )
INDEX=0
MATCH=""
for ITEM in "${LIST[@]}" ; do
if [[ "${VALUE}" = "${ITEM}" ]] ; then
MATCH="$INDEX"
fi
(( ++INDEX ))
done
if [[ -n "${MATCH}" ]] ; then
echo -n "${MATCH}"
fi
}
_expand_list2items(){
LIST=( "$@" )
for i in "${LIST[@]}" ; do
echo "<item>${i}</item>"
done
}

_get_index_of_value(){
# run with function, value to look for as first argument, and array to look in as 2nd argument, such function as
# _get_index_of_value "${VIDEO_INPUT_CHOICE}" "${VIDEO_INPUT_OPTIONS[@]}"
VALUE="${1}"
shift
LIST=( "$@" )
INDEX=0
MATCH=""
for ITEM in "${LIST[@]}" ; do
if [[ "${VALUE}" = "${ITEM}" ]] ; then
MATCH="$INDEX"
fi
(( ++INDEX ))
done
if [[ -n "${MATCH}" ]] ; then
echo -n "${MATCH}"
fi
}

export MAIN_DIALOG="<window title=\"vrecord configuration\">
export MAIN_DIALOG="<window title=\"vrecord configuration\">
<vbox>
<text>
<label>vtest configuration</label>
Expand Down

0 comments on commit d559b13

Please sign in to comment.