usbinstall.py: remove bootusb dialog from GUI; also update background images
23
po/it.po
@ -63,26 +63,23 @@ msgstr "Avanti"
|
||||
msgid "Cancel"
|
||||
msgstr "Annulla"
|
||||
|
||||
msgid "Step 1/4 - choice of boot file"
|
||||
msgstr "Passo 1/4 - scelta del file di boot"
|
||||
msgid "Step 1/3 - choice of ISO file"
|
||||
msgstr "Passo 1/3 - scelta del file ISO"
|
||||
|
||||
msgid "Step 2/4 - choice of iso file"
|
||||
msgstr "Passo 2/4 - scelta del file iso"
|
||||
msgid "Step 2/3 - choice of USB key"
|
||||
msgstr "Passo 2/3 - scelta della chiavetta USB"
|
||||
|
||||
msgid "Step 3/4 - choice of usb key"
|
||||
msgstr "Passo 3/4 - scelta della chiavetta"
|
||||
|
||||
msgid "Step 4/4 - installation of openmamba to usb"
|
||||
msgstr "Passo 4/4 - installazione di openmamba su usb"
|
||||
msgid "Step 3/3 - installation of openmamba to USB"
|
||||
msgstr "Passo 3/3 - installazione di openmamba su USB"
|
||||
|
||||
msgid "Choose the .cpio file"
|
||||
msgstr "Scegli l'archivio .cpio per il boot"
|
||||
|
||||
msgid "Choose the openmamba .iso file"
|
||||
msgstr "Scegli il file iso di openmamba"
|
||||
msgid "Choose the openmamba ISO file"
|
||||
msgstr "Scegli il file ISO di openmamba"
|
||||
|
||||
msgid "Choose the usb key"
|
||||
msgstr "Scegli la chiavetta usb"
|
||||
msgid "Choose the USB key"
|
||||
msgstr "Scegli la chiavetta USB"
|
||||
|
||||
msgid "Installazione in corso..."
|
||||
msgstr "Installation in progress..."
|
||||
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 119 KiB |
@ -36,7 +36,7 @@ path_dev = ""
|
||||
dev_model = ""
|
||||
a_path_dev = [] # Array of choosen devices
|
||||
a_dev_model = [] # Their models.
|
||||
step = 1
|
||||
step = 1
|
||||
choose_type = "" # Type of dialog in choose_file()
|
||||
#1)###############################(VARIABILI)########################################
|
||||
|
||||
@ -157,20 +157,16 @@ def add_events():
|
||||
def go_on():
|
||||
global step, path_cpio, path_iso, path_dev, dev_model
|
||||
cloud_hide()
|
||||
# Step n°1 to n°2
|
||||
# Step 1 to 2
|
||||
if step == 1:
|
||||
step += 1
|
||||
step2()
|
||||
# Step n°2 to n°3
|
||||
elif step == 2:
|
||||
if path_iso == "":
|
||||
msg_warn(_("An openmamba's iso is required"))
|
||||
return
|
||||
else:
|
||||
step += 1
|
||||
step3()
|
||||
# Step n°3 to n°4
|
||||
elif step == 3:
|
||||
step2()
|
||||
# Step 2 to 3
|
||||
elif step == 2:
|
||||
if path_dev == "":
|
||||
msg_warn(_("You must choose a usb key"))
|
||||
return
|
||||
@ -180,7 +176,7 @@ def go_on():
|
||||
# Go on only if was pressed yes button
|
||||
if msg == QtGui.QMessageBox.Yes:
|
||||
step += 1
|
||||
step4()
|
||||
step3()
|
||||
else:
|
||||
return
|
||||
|
||||
@ -190,31 +186,22 @@ def go_back():
|
||||
step -= 1
|
||||
cloud_hide()
|
||||
obj_chang_hide()
|
||||
# Step n°1 to n°0 -> exit
|
||||
# Step 1 to 0 -> exit
|
||||
if step == 0:
|
||||
app.exit(1)
|
||||
print _("Application terminated by pressing \"cancel\" button")
|
||||
# Step n°2 to n°1
|
||||
# Step 2 to 1
|
||||
elif step == 1:
|
||||
step1()
|
||||
# Step n°3 to n°2
|
||||
# Step 3 to 2
|
||||
elif step == 2:
|
||||
step2()
|
||||
#~ NON SONO SICURO SERVA (DA TESTARE)
|
||||
# Step n°4 to n°3
|
||||
elif step == 3:
|
||||
step3()
|
||||
|
||||
# Event n°3
|
||||
def choose_file():
|
||||
global path_cpio, path_iso, choose_type
|
||||
# If step in n°1
|
||||
if choose_type == "boot":
|
||||
nfileName = QtGui.QFileDialog.getOpenFileName(window, _("Choose the boot file"), "/home", "File .cpio.gz (*.cpio.gz)", "cpio *.cpio.gz")
|
||||
path_cpio = nfileName
|
||||
window.t_file.setText(nfileName)
|
||||
# Else if step is n°2
|
||||
elif choose_type == "iso":
|
||||
# if step is 1
|
||||
if choose_type == "iso":
|
||||
nfileName = QtGui.QFileDialog.getOpenFileName(window, _("Choose the iso file"), "/home", "File .iso (*.iso)", "iso *.iso")
|
||||
path_iso = nfileName
|
||||
window.t_file.setText(nfileName)
|
||||
@ -223,10 +210,8 @@ def choose_file():
|
||||
def manage_cloud():
|
||||
global step
|
||||
if step == 1:
|
||||
aiuto = _("This archive is designed to make the usb bootable.") + _(" You can find this file <a style=\"color: green; \"href=\"http://www.openmamba.org/distribution/media/bootusb.html?lang=en\">here</a>")
|
||||
elif step == 2:
|
||||
aiuto = _("The file .iso contains the operating system. You can download it from <a style=\"color: green; \"href=\"http://www.openmamba.org/distribution/download.html?lang=en\">here</a>")
|
||||
elif step == 3:
|
||||
elif step == 2:
|
||||
aiuto = _("Choose an usb key for the installation. <span style=\"color:red;\">All data will be lost</span>")
|
||||
window.l_cloud.setText(aiuto)
|
||||
cloud_show()
|
||||
@ -342,34 +327,24 @@ def set_objs(i_back, title, descr):
|
||||
|
||||
|
||||
def step1():
|
||||
global choose_type, path_cpio
|
||||
choose_type = "boot"
|
||||
path_cpio = ""
|
||||
window.t_file.setText(path_cpio) # Clean path box
|
||||
window.b_back.setText(_("Cancel"))
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back1.png", _("Step 1/4 - choice of boot file"), _("Choose the .cpio file"))
|
||||
obj_chang_hide()
|
||||
list_obj1() # Show a set of object
|
||||
|
||||
def step2():
|
||||
global choose_type, path_iso
|
||||
choose_type = "iso"
|
||||
path_iso = ""
|
||||
window.t_file.setText(path_iso) # Clean path box
|
||||
window.b_back.setText(_("Go back"))
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back2.png", _("Step 2/4 - choice of iso file"), _("Choose the openmamba .iso file"))
|
||||
window.b_back.setText(_("Cancel"))
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back1.png", _("Step 1/3 - choice of ISO file"), _("Choose the openmamba ISO file")+":")
|
||||
obj_chang_hide()
|
||||
list_obj1() # Show a set of object
|
||||
|
||||
def step3():
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back3.png", _("Step 3/4 - choice of usb key"), _("Choose the usb key"))
|
||||
def step2():
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back2.png", _("Step 2/3 - choice of USB key"), _("Choose the USB key")+":")
|
||||
obj_chang_hide()
|
||||
list_obj2()
|
||||
get_list() # Get available devices
|
||||
|
||||
def step4():
|
||||
def step3():
|
||||
global process_sh
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back4.png", _("Step 4/4 - installation of openmamba to usb"), _("Installation in progress..."))
|
||||
set_objs("/usr/share/openmamba/usbinstall/img/back3.png", _("Step 3/3 - installation of openmamba to USB"), _("Installation in progress..."))
|
||||
# Hide all unnecessary objects
|
||||
obj_chang_hide()
|
||||
window.b_help.hide()
|
||||
@ -381,14 +356,13 @@ def step4():
|
||||
dbus_start()
|
||||
process_sh = Popen(["pkexec", "/usr/sbin/usbinstall", path_dev, path_cpio, path_iso, "-d"])
|
||||
|
||||
|
||||
# Show a list of object (step 1 and 2)
|
||||
# Show a list of object (step 1)
|
||||
def list_obj1():
|
||||
window.t_file.show()
|
||||
window.pach1.show()
|
||||
window.b_open_file.show()
|
||||
|
||||
# Show a list of object (step 3)
|
||||
# Show a list of object (step 2)
|
||||
def list_obj2():
|
||||
window.c_usb.show()
|
||||
window.b_refresh.show()
|
||||
@ -414,7 +388,6 @@ def end_forced():
|
||||
#print _("Installation aborted")
|
||||
app.exit(1)
|
||||
|
||||
|
||||
# Program start
|
||||
app = QtGui.QApplication(['usbinstall'])
|
||||
gettext.install('usbinstall', '/usr/share/locale', unicode=1)
|
||||
@ -428,6 +401,3 @@ def run():
|
||||
if __name__ == "__main__":
|
||||
run()
|
||||
#5)##############################(PROGRAM CODE)######################################
|
||||
|
||||
|
||||
|
||||
|