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