Commit cbd49cfb authored by Mikhail Tergoev's avatar Mikhail Tergoev

fixed test formatting if ppdb is found

parent bf201271
......@@ -5172,10 +5172,19 @@ yad_question () {
local pw_yad="yad"
command -v "${pw_yad}" &>/dev/null || fatal "yad not found"
fi
local text_align
case "$1" in
left) text_align=left ; shift ;;
right) text_align=right ; shift ;;
center) text_align=center ; shift ;;
*) text_align=center ;;
esac
"${pw_yad}" --text "${1}" --width=400 --height=150 --borders=15 --title "${translations[Choices]}" \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --image="$PW_GUI_ICON_PATH/question.svg" \
--gui-type-layout="${YAD_INFO_GUI_TYPE_LAYOUT}" \
--no-wrap --text-align=center --fixed \
--no-wrap --text-align=$text_align --fixed \
--button="${translations[CANCEL]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":1 \
--button="${translations[OK]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0 2>/dev/null
[[ "$?" != 0 ]] && return 1 || return 0
......@@ -8240,14 +8249,15 @@ find_ext_ppdb () {
print_info "New variables from $find_metadata_url:"
declare -p ${!json_@} | awk -F'--' '{print $2}'
if yad_question "\
${translations[Settings file was found for]} $exe_filename:
if yad_question left "\
${translations[Settings file was found for]} $exe_filename:
${translations[Name]}: $json_name
${translations[Rating]}: $json_rating
${translations[URL]}: $json_url
${translations[Name]}: $json_name
${translations[Rating]}: $json_rating
${translations[URL]}: <a href=\"$json_url\">${json_url:0:40}...</a>
${translations[Would you like to use this settings file?]}"
${translations[Would you like to use this settings file?]}
"
then
print_info "Replacing PPDB from: $json_ppdb_url"
try_remove_file "$current_ppdb_file"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment