Commit 51cc3610 authored by Vladislav's avatar Vladislav

Added --pulsate for --progress

parent 3d6c08b3
......@@ -561,7 +561,7 @@ try_download () {
curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \
-H 'Pragma: no-cache' -L ${FIRST_URL[@]} -o "$dest" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"$pw_yad" --progress --text="${translations[Downloading]} $filename" --auto-close --no-escape \
"$pw_yad" --progress --pulsate --text="${translations[Downloading]} $filename" --auto-close --no-escape \
--auto-kill --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders="$PROGRESS_BAR_BORDERS_SIZE"
fi
......@@ -572,7 +572,7 @@ try_download () {
curl -f -# -A 'Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)' -H 'Cache-Control: no-cache, no-store' \
-H 'Pragma: no-cache' -L ${SECOND_URL[@]} -o "$dest" 2>&1 | \
tr '\r' '\n' | sed -ur 's|[# ]+||g;s|.*=.*||g;s|.*|#Downloading at &\n&|g' | \
"$pw_yad" --progress --text="${translations[Downloading]} $filename" --auto-close --no-escape \
"$pw_yad" --progress --pulsate --text="${translations[Downloading]} $filename" --auto-close --no-escape \
--auto-kill --text-align="center" --fixed --no-buttons --title "PortProton" --width=500 --height=90 \
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders="$PROGRESS_BAR_BORDERS_SIZE"
fi
......@@ -4161,6 +4161,8 @@ pw_stop_progress_bar () {
if [[ -n ${PW_YAD_PID_PROGRESS_BAR_BLOCK[0]} ]] ; then
local pid
for pid in ${PW_YAD_PID_PROGRESS_BAR_BLOCK[@]} ; do
# Здесь sleep нужен, потому что pid может уже быть, но kill его не убьет
# со sleep 0.01 он делает 2 kill, c 0.02 нормально один
while $(sleep 0.02) && [[ -f /proc/$pid/exe ]] ; do
kill -s SIGUSR1 "$pid" &>/dev/null
done
......
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