forked from CastroFidel/PortWINE
Added --pulsate for --progress
This commit is contained in:
parent
3d6c08b319
commit
51cc3610b8
@ -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' \
|
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 | \
|
-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' | \
|
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 \
|
--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"
|
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders="$PROGRESS_BAR_BORDERS_SIZE"
|
||||||
fi
|
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' \
|
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 | \
|
-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' | \
|
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 \
|
--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"
|
--window-icon="$PW_GUI_ICON_PATH/portproton.svg" --borders="$PROGRESS_BAR_BORDERS_SIZE"
|
||||||
fi
|
fi
|
||||||
@ -4161,6 +4161,8 @@ pw_stop_progress_bar () {
|
|||||||
if [[ -n ${PW_YAD_PID_PROGRESS_BAR_BLOCK[0]} ]] ; then
|
if [[ -n ${PW_YAD_PID_PROGRESS_BAR_BLOCK[0]} ]] ; then
|
||||||
local pid
|
local pid
|
||||||
for pid in ${PW_YAD_PID_PROGRESS_BAR_BLOCK[@]} ; do
|
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
|
while $(sleep 0.02) && [[ -f /proc/$pid/exe ]] ; do
|
||||||
kill -s SIGUSR1 "$pid" &>/dev/null
|
kill -s SIGUSR1 "$pid" &>/dev/null
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user