Adjust progress message on file move operation
Fixes QubesOS/qubes-issues#1269
This commit is contained in:
parent
8e497bffc0
commit
03f6ddc41a
@ -20,7 +20,7 @@
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
VM=$(qvm-mru-entry --title="File Copy" --text="Enter the destination domain name:" --mrufile "qvm-mru-filecopy")
|
VM=$(qvm-mru-entry --title="File Move" --text="Enter the destination domain name:" --mrufile "qvm-mru-filecopy")
|
||||||
if [ X$VM = X ] ; then exit 0 ; fi
|
if [ X$VM = X ] ; then exit 0 ; fi
|
||||||
|
|
||||||
SIZE=$(du --apparent-size -c -- "$@" 2>/dev/null | tail -1 | cut -f 1)
|
SIZE=$(du --apparent-size -c -- "$@" 2>/dev/null | tail -1 | cut -f 1)
|
||||||
@ -33,5 +33,5 @@ set -e
|
|||||||
(while read sentsize ; do
|
(while read sentsize ; do
|
||||||
CURRSIZE=$(($sentsize/1024))
|
CURRSIZE=$(($sentsize/1024))
|
||||||
echo $((100*$CURRSIZE/$SIZE))
|
echo $((100*$CURRSIZE/$SIZE))
|
||||||
done) | zenity --progress --text="Copying files to domain: $VM..." --auto-close
|
done) | zenity --progress --text="Moving files to domain: $VM..." --auto-close
|
||||||
rm -rf "$@"
|
rm -rf "$@"
|
||||||
|
@ -24,7 +24,7 @@ VM=$(kdialog -inputbox "Enter the VM name to send files to:")
|
|||||||
if [ X$VM = X ] ; then exit 0 ; fi
|
if [ X$VM = X ] ; then exit 0 ; fi
|
||||||
|
|
||||||
SIZE=$(du --apparent-size -c -- "$@" 2> /dev/null | tail -1 | cut -f 1)
|
SIZE=$(du --apparent-size -c -- "$@" 2> /dev/null | tail -1 | cut -f 1)
|
||||||
REF=$(kdialog --progressbar "Copy progress")
|
REF=$(kdialog --progressbar "Move progress")
|
||||||
qdbus $REF org.freedesktop.DBus.Properties.Set "" maximum $SIZE
|
qdbus $REF org.freedesktop.DBus.Properties.Set "" maximum $SIZE
|
||||||
|
|
||||||
export PROGRESS_TYPE=gui
|
export PROGRESS_TYPE=gui
|
||||||
|
Loading…
Reference in New Issue
Block a user