From 946df431d671adb8eff5da2b8d1a119645eb3324 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sun, 23 Oct 2011 13:31:50 +0200 Subject: [PATCH] Update progress bar during ISO copy and close help cloud on page change (Ercolinux) --- gui.pyc | Bin 4630 -> 4600 bytes usbinstall.py | 9 ++++++--- usbinstall.sh | 12 +++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) mode change 100644 => 100755 usbinstall.sh diff --git a/gui.pyc b/gui.pyc index 021c505ee87f50a5b83ba2737844c01be644618d..b1bc2093b0cfcfadb8f7dc8baa1dd2ac584532e1 100644 GIT binary patch delta 134 zcmbQH@W@LQJ gi(AQNM*anixTPm=5s1Yjt0LHsM;2)N0BEE*kpKVy diff --git a/usbinstall.py b/usbinstall.py index 55e5ed8..1193c37 100644 --- a/usbinstall.py +++ b/usbinstall.py @@ -194,17 +194,20 @@ def aggiorna_oggetti(immagine, titolo, descrizione): ui.b_indietro.setText(QtGui.QApplication.translate("Dialog", "Annulla", None, QtGui.QApplication.UnicodeUTF8)) # Visualizzo gli oggetti del passo 1 visualizza_scegli_file() - + # Chiudi la nuovola dell'help al cambio di passo + chiudi_nuvola() elif passo == 2: ext = "iso" path_Iso = "" ui.b_indietro.setText(QtGui.QApplication.translate("Dialog", "Indietro", None, QtGui.QApplication.UnicodeUTF8)) visualizza_scegli_file() - + # Chiudi la nuovola dell'help al cambio di passo + chiudi_nuvola() elif passo == 3: visualizza_lista_usb() lista_usb() - + # Chiudi la nuovola dell'help al cambio di passo + chiudi_nuvola() ui.t_file.setText(QtGui.QApplication.translate("Dialog", "", None, QtGui.QApplication.UnicodeUTF8)) ui.i_back.setPixmap(QtGui.QPixmap(immagine)) Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", titolo, None, QtGui.QApplication.UnicodeUTF8)) diff --git a/usbinstall.sh b/usbinstall.sh old mode 100644 new mode 100755 index e411951..23d53e3 --- a/usbinstall.sh +++ b/usbinstall.sh @@ -54,9 +54,15 @@ inst_make_boot() inst_copy_iso() { cd ~/tmpmamba - cp $1 ./ + orig_size=$(stat -c %s $1) + cp "$1" ./ & + dest_size=0 + while [ $orig_size -gt $dest_size ] ; do + dest_size=$(stat -c %s "./`basename $1`") + percentuale=$(((45 + 50 * $dest_size ) / $orig_size )) + pbar $percentuale + done ln -fs `basename $1` ./openmamba-live.iso - } @@ -76,7 +82,7 @@ pbar() descrizione() { - dbus-send --print-reply --session --dest=org.openmamba.usbinstall /org/openmamba/usbinstall org.openmamba.usbinstall.Descrizione string:$1 + dbus-send --print-reply --session --dest=org.openmamba.usbinstall /org/openmamba/usbinstall org.openmamba.usbinstall.Descrizione "string:$1" }