##// END OF EJS Templates
falta verificacion
ralonso -
r73:74
parent child
Show More
@@ -190,3 +190,53
190 self.btnStartburn.setEnabled(not(var_bool))
190 self.btnStartburn.setEnabled(not(var_bool))
191 self.btnStopburn.setEnabled(var_bool)
191 self.btnStopburn.setEnabled(var_bool)
192 self.chkCheck.setEnabled(not(var_bool))
192 self.chkCheck.setEnabled(not(var_bool))
193 self.actionChange_Parameters.setEnabled(False)
194
195
196
197
198 #---------------------------------------------- Actualiza estado en los labels -------------------------------------------------------
199
200 def update_message(type, self):
201
202 var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices)
203
204 if type == 1:
205 var_message = "BURNING"
206 if var_index == 0:
207 self.txtBstatusA.setText(var_message)
208 self.txtBdiscA.setText(str(self.var_disc_n))
209 self.txtBcopyA.setText(str(self.var_copy_n))
210
211 if var_index == 1:
212 self.txtBstatusB.setText(var_message)
213 self.txtBdiscB.setText(str(self.var_disc_n))
214 self.txtBcopyB.setText(str(self.var_copy_n))
215
216 if var_index == 2:
217 self.txtBstatusC.setText(var_message)
218 self.txtBdiscC.setText(str(self.var_disc_n))
219 self.txtBcopyC.setText(str(self.var_copy_n))
220
221 if var_index == 3:
222 self.txtBstatusD.setText(var_message)
223 self.txtBdiscD.setText(str(self.var_disc_n))
224 self.txtBcopyD.setText(str(self.var_copy_n))
225
226 if type == 2:
227 var_message = "COMPLETED"
228 if var_index == 0:
229 self.txtBstatusA.setText(var_message)
230
231 if var_index == 1:
232 self.txtBstatusB.setText(var_message)
233
234 if var_index == 2:
235 self.txtBstatusC.setText(var_message)
236
237 if var_index == 3:
238 self.txtBstatusD.setText(var_message)
239
240
241
242
@@ -109,6 +109,7
109 self.var_disc_n = dlgui.txtDisc.value()
109 self.var_disc_n = dlgui.txtDisc.value()
110 self.var_copy_n = dlgui.txtCopy.value()
110 self.var_copy_n = dlgui.txtCopy.value()
111 self.txtInfo.append("Changed parameters")
111 self.txtInfo.append("Changed parameters")
112 self.var_burned_discs = ( ( (self.var_disc_n - 1) * self.var_Copys) + self.var_copy_n -1 )
112
113
113
114
114 def about(self):
115 def about(self):
@@ -120,13 +121,14
120 #----------------------------------------------------- Funciones del proceso ---------------------------------------------------------------
121 #----------------------------------------------------- Funciones del proceso ---------------------------------------------------------------
121
122
122 def readOuput(self):
123 def readOuput(self):
123 self.txtInfo.insertPlainText("stdout: " + QtCore.QString(self.var_process.readAllStandardOutput()))
124 # self.txtInfo.insertPlainText("stdout: " + QtCore.QString(self.var_process.readAllStandardOutput()))
125 pass
124
126
125 def readError(self):
127 def readError(self):
126 self.txtInfo.insertPlainText("stderr: " + QtCore.QString(self.var_process.readAllStandardError()))
128 self.txtInfo.insertPlainText("stderr: " + QtCore.QString(self.var_process.readAllStandardError()))
127
129
128 def finished(self):
130 def finished(self):
129 self.txtInfo.insertPlainText("process completed"+QtCore.QString(self.var_process.exitCode())+"\n")
131 self.txtInfo.insertPlainText("\nprocess completed"+QtCore.QString(self.var_process.exitCode())+"\n")
130
132
131
133
132 if self.var_process.exitCode() != 0:
134 if self.var_process.exitCode() != 0:
@@ -137,6 +139,7
137 self.var_step = 1 #Se ira al paso de la grabacion en la siguiente llamada
139 self.var_step = 1 #Se ira al paso de la grabacion en la siguiente llamada
138
140
139 elif self.var_step == 1:
141 elif self.var_step == 1:
142 functions2.update_message(2, self)
140 self.var_copy_n += 1
143 self.var_copy_n += 1
141
144
142 self.burning()
145 self.burning()
@@ -363,7 +366,7
363 """
366 """
364 Se inicia el proceso de grabacion
367 Se inicia el proceso de grabacion
365 """
368 """
366 self.txtInfo.append("BUTTON: on_btnStartburn_clicked")
369 ####### self.txtInfo.append("BUTTON: on_btnStartburn_clicked")
367 #Verifica que exista algun dispositivo de grabacion seleccionado
370 #Verifica que exista algun dispositivo de grabacion seleccionado
368 if not(functions2.selected_devices(self)):
371 if not(functions2.selected_devices(self)):
369 self.txtInfo.append("There is no recording device selected")
372 self.txtInfo.append("There is no recording device selected")
@@ -409,7 +412,7
409 if self.var_copy_n > self.var_Copys:
412 if self.var_copy_n > self.var_Copys:
410 #borra la imagen.iso del numero de disco anterior
413 #borra la imagen.iso del numero de disco anterior
411 file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso"
414 file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso"
412 self.txtInfo.append("Deleting iso file")
415 # self.txtInfo.append("Deleting iso file")
413 # os.remove(file_iso)
416 # os.remove(file_iso)
414 self.var_copy_n = 1
417 self.var_copy_n = 1
415 self.var_disc_n += 1 # aumenta numero de disco actual para grabacion
418 self.var_disc_n += 1 # aumenta numero de disco actual para grabacion
@@ -420,9 +423,11
420 self.bool_state_burning = False
423 self.bool_state_burning = False
421 self.txtInfo.append("Recording process is complete")
424 self.txtInfo.append("Recording process is complete")
422 functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion
425 functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion
426 self.on_btnRestart_clicked()
427 self.btnStopburn.setEnabled(False)
423 return
428 return
424
429
425 self.txtInfo.append("\n"+str(self.var_disc_n)+" "+str(self.var_copy_n)+" "+str(self.var_step))
430 # self.txtInfo.append("\n"+str(self.var_disc_n)+" "+str(self.var_copy_n)+" "+str(self.var_step))
426
431
427 #Creacion del archivo.iso para la grabacion
432 #Creacion del archivo.iso para la grabacion
428 if self.var_step == 0:
433 if self.var_step == 0:
@@ -436,7 +441,7
436 functions2.make_burning_conf(self)
441 functions2.make_burning_conf(self)
437
442
438 var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices)
443 var_index = ( ( (self.var_disc_n - 1) * self.var_Copys) + (self.var_copy_n - 1) - self.var_burned_discs ) % len(self.var_devices)
439
444 # self.txtInfo.append("INDEX: "+str(var_index))
440 if var_index == 0 and self.blank_discs == False:
445 if var_index == 0 and self.blank_discs == False:
441 functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion
446 functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion
442 self.blank_discs = True
447 self.blank_discs = True
@@ -446,7 +451,8
446
451
447 self.blank_discs = False
452 self.blank_discs = False
448
453
449 self.txtInfo.append("Grabando la copia numero: "+str(self.var_copy_n))
454 self.txtInfo.append("recording disc:"+str(self.var_copy_n)+", copy:"+str(self.var_copy_n))
455 functions2.update_message(1, self)
450
456
451 var_dev_tmp = self.var_devices[var_index]
457 var_dev_tmp = self.var_devices[var_index]
452 file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso"
458 file_iso=var_Rpath_iso+"/"+functions.i2s(self.var_disc_n)+".iso"
General Comments 0
You need to be logged in to leave comments. Login now