dom0/dispvm: new progress window for DispVM generation (#422)

This commit is contained in:
Marek Marczykowski 2012-03-16 12:26:31 +01:00
parent edecda6a97
commit 0e195de5f6

View File

@ -1,14 +1,26 @@
#!/bin/sh
trap "exit 1" USR1 TERM
export SHELL_PID=$$
(
echo "1"
if ! qvm-create-default-dvm --used-template --default-script >/var/run/qubes/qvm-create-default-dvm.stdout </dev/null ; then
kill -USR1 $SHELL_PID
fi
echo 100
) | zenity --progress --pulsate --auto-close \
--text="Please wait (up to 120s) while the DispVM savefile is being updated. This only happens when you have updated the template, next time will be much faster." \
--title="Updating default DispVM savefile"
exit 0
ref=`kdialog --title="Updating default DispVM savefile" \
--progressbar \
"<center>
<font>
<b>Please wait (up to 120s) while the DispVM savefile is being updated.</b>
<br>
<i><small>
This only happens when you have updated the template.<br>
Next time will be much faster.
</small></i>
</font>
</center>" 0`;
trap "qdbus $ref close" EXIT
#qdbus $ref showCancelButton true;
ret=0
if ! qvm-create-default-dvm --used-template --default-script >/var/run/qubes/qvm-create-default-dvm.stdout </dev/null ; then
ret=1
fi
exit $ret