Changeset 2702 for lliurex-up/trunk/fuentes/lliurex-up-gui
- Timestamp:
- Oct 27, 2016, 1:50:12 PM (4 years ago)
- Location:
- lliurex-up/trunk/fuentes/lliurex-up-gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-up/trunk/fuentes/lliurex-up-gui/lliurex-up
r2689 r2702 131 131 self.gather_logo_box=builder.get_object("gather_logo_box") 132 132 self.gather_label=builder.get_object("gather_label") 133 self.spinner=builder.get_object("spinner") 133 134 134 135 self.update_box=builder.get_object("update_box") … … 199 200 column=Gtk.TreeViewColumn("Installed") 200 201 cell=Gtk.CellRendererPixbuf() 201 #cell.set_property("stock-size",Gtk.IconSize.DIALOG)202 202 column.pack_start(cell,True) 203 203 column.add_attribute(cell,"pixbuf",3) … … 235 235 self.t.daemon=True 236 236 self.t.start() 237 self.spinner.start() 237 238 238 239 self.package_list=[] … … 363 364 364 365 is_lliurexup_update=True #Call to the function to get the version of lliurex-up 366 self.updated_percentage(0.5) 365 367 time.sleep(1) 366 368 … … 372 374 while not is_lliurexup_updated: 373 375 pass 376 377 msg_gather="<span><b>"+_("Lliurex-up is now updated and will be reboot")+"</b></span>" 378 self.gather_label.set_markup(msg_gather) 379 self.updated_percentage(1.0) 380 time.sleep(2) 374 381 os.execl(sys.executable, sys.executable, *sys.argv) 375 self.updated_percentage(1.0)382 376 383 return True 377 384 … … 383 390 384 391 def check_mirror(self): 392 print "Check mirror" 385 393 386 394 self.response=-1 387 395 msg_gather="<span><b>"+_("Checking if mirror exist and there is updated")+"</b></span>" 388 396 self.gather_label.set_markup(msg_gather) 397 self.updated_percentage(0.5) 389 398 390 399 exist_mirror=False #Call to the function to check mirror … … 404 413 if self.response==0: 405 414 self.updated_percentage(1.0) 415 time.sleep(1) 406 416 return True 407 417 … … 409 419 msg_gather="<span><b>"+_("Updating mirror")+"</b></span>" 410 420 self.gather_label.set_markup(msg_gather) 411 421 self.updated_percentage(0.75) 412 422 is_mirror_updated=True # Call to the function to update mirror 413 423 time.sleep(1) … … 425 435 426 436 self.total_process=3.0 437 self.total_progress=0.0 427 438 self.pbar_rang=1.0 428 439 self.percentage=0.0 429 self.updated_percentage(0.01) 440 self.ending_process=0.0 441 self.updated_percentage(0.0) 430 442 431 443 check_lliurexup=self.check_lliurexup_version() … … 439 451 440 452 try: 441 self.updated_percentage(0.25) 453 print ("Checking info") 454 self.updated_percentage(0.5) 442 455 p1=subprocess.Popen(["llxcfg-upgrade-version-scripts","details"],stdout=subprocess.PIPE,stderr=subprocess.PIPE) 443 456 output=p1.communicate()[0] … … 463 476 self.pbar.hide() 464 477 self.pbar_label.hide() 478 self.spinner.stop() 465 479 if len(self.package_list)==0: 466 480 msg_gather="<span><b>"+_("Your system is update")+"</b></span>" … … 501 515 502 516 self.process_block=(self.pbar_rang/self.total_process) 503 print self.process_block 504 self.percentage=self.percentage+self.process_block*completed 505 506 print self.percentage 507 self.pbar.set_fraction(self.percentage) 508 509 value=self.percentage*100 517 self.percentage=self.process_block*completed 518 519 if self.percentage==self.process_block: 520 self.ending_process=self.ending_process+1 521 self.total_progress=self.process_block*self.ending_process 522 else: 523 self.total_progress=self.total_progress+self.percentage 524 525 self.pbar.set_fraction(self.total_progress) 526 527 value=self.total_progress*100 510 528 value=format(value,'.2f') 511 529 … … 564 582 #def package_clicked 565 583 566 def execute_scri tps(self):584 def execute_scripts(self): 567 585 568 586 self.vterminal.spawn_sync( … … 581 599 582 600 def upgrade_process(self,widget, event=None): 601 583 602 self.total_process=1.0 603 self.total_progress=0.0 584 604 self.pbar_rang=1.0 585 605 self.percentage=0.0 586 self.updated_percentage(0.01) 606 self.ending_process=0.0 607 self.updated_percentage(0.0) 587 608 588 609 self.t=threading.Thread(target=self.execute_scripts,args=()) -
lliurex-up/trunk/fuentes/lliurex-up-gui/rsrc/lliurex-up.ui
r2674 r2702 141 141 <property name="fill">True</property> 142 142 <property name="position">2</property> 143 </packing> 144 </child> 145 <child> 146 <object class="GtkBox" id="box4"> 147 <property name="visible">True</property> 148 <property name="can_focus">False</property> 149 <property name="orientation">vertical</property> 150 <child> 151 <object class="GtkBox" id="box_spinner"> 152 <property name="visible">True</property> 153 <property name="can_focus">False</property> 154 <property name="orientation">vertical</property> 155 <child> 156 <object class="GtkSpinner" id="spinner"> 157 <property name="width_request">50</property> 158 <property name="height_request">50</property> 159 <property name="visible">True</property> 160 <property name="can_focus">False</property> 161 <property name="opacity">0.97999999999999998</property> 162 <property name="margin_left">5</property> 163 <property name="margin_right">5</property> 164 <property name="margin_top">5</property> 165 <property name="margin_bottom">5</property> 166 </object> 167 <packing> 168 <property name="expand">False</property> 169 <property name="fill">True</property> 170 <property name="position">0</property> 171 </packing> 172 </child> 173 </object> 174 <packing> 175 <property name="expand">False</property> 176 <property name="fill">True</property> 177 <property name="position">0</property> 178 </packing> 179 </child> 180 </object> 181 <packing> 182 <property name="expand">False</property> 183 <property name="fill">True</property> 184 <property name="position">3</property> 143 185 </packing> 144 186 </child>
Note: See TracChangeset
for help on using the changeset viewer.