Changeset 2674
- Timestamp:
- Oct 25, 2016, 6:41:46 PM (4 years ago)
- Location:
- lliurex-up/trunk/fuentes/lliurex-up-gui
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-up/trunk/fuentes/lliurex-up-gui/lliurex-up
r2673 r2674 15 15 import sys 16 16 import time 17 import commands 17 18 18 19 from gi.repository import Gtk, Gdk, GdkPixbuf, GObject, GLib, PangoCairo, Pango, Vte … … 41 42 self.parse_desktop(desktop_file) 42 43 self.parse_changelog(changelog_file) 43 self.parse_installed(CACHED_ICON) 44 44 self.parse_installed_icon(CACHED_ICON) 45 46 #def__init__ 47 45 48 def parse_desktop(self,desktop_file): 46 49 … … 59 62 self.icon="package" 60 63 61 64 #def parse_desktop 65 62 66 def parse_changelog(self,changelog_file): 63 67 … … 72 76 self.changelog="Changelog not found" 73 77 74 def parse_installed(self, icon_file): 78 #def parse_changelog 79 80 def parse_installed_icon(self, icon_file): 75 81 image=Gtk.Image() 76 82 image.set_from_file(icon_file) 77 83 self.installed=image.get_pixbuf() 78 84 85 #def parse_installed_icon 79 86 80 87 class LliurexUp: … … 84 91 85 92 self.start_gui() 93 94 #def __init__ 86 95 87 96 def start_gui(self): … … 111 120 self.gather_box=builder.get_object("gather_box") 112 121 self.yes_button_box=builder.get_object("yes_button_box") 122 self.yes_button_eb=builder.get_object("yes_button_eventbox") 123 self.yes_button_eb.add_events(Gdk.EventMask.BUTTON_RELEASE_MASK) 124 self.yes_button_eb.connect("button-release-event", self.yes_button_clicked) 113 125 self.yes_button_label=builder.get_object("yes_button_label") 114 126 self.no_button_box=builder.get_object("no_button_box") … … 232 244 Gtk.main() 233 245 234 246 #def start_gui 247 235 248 def set_css_info(self): 236 249 … … 341 354 self.changelog_label.set_name("LABEL_OPTION") 342 355 self.changelog_texview.set_name("CHANGELOG_FONT") 356 self.return_arrow_box.set_name("BUTTON_COLOR") 357 358 #def set_css_info 343 359 344 360 def check_lliurexup_version(self): … … 349 365 time.sleep(2) 350 366 return True 351 367 368 #def check_lliurexup_version 352 369 353 370 def check_mirror(self): … … 368 385 return True 369 386 370 387 #def check_mirror 388 371 389 def gather_info(self): 372 390 … … 375 393 376 394 377 cmd="sudo apt-get update"378 395 msg_gather="<span><b>"+_("Checking for new updates")+"</b></span>" 379 396 self.gather_label.set_markup(msg_gather) … … 392 409 pass 393 410 411 #def gather_info 394 412 395 413 … … 418 436 return self.t.is_alive() 419 437 438 #def pulsate_gathering_ingo 420 439 421 440 def populate_packages_tv(self): … … 427 446 428 447 print len(self.packages_store) 448 429 449 #def populate_packages_tv 430 450 … … 448 468 pass 449 469 450 470 #def parse_simulate_output 471 451 472 def package_clicked(self,x,y): 452 473 … … 462 483 463 484 break 464 485 486 #def package_clicked 465 487 466 488 def execute(self): … … 476 498 ) 477 499 478 self.update_status() 500 self.update_installed_icon() 501 502 #def execute 479 503 480 504 def install_packages(self,widget, event=None): … … 491 515 self.terminal_label.set_markup(msg_terminal) 492 516 493 517 #def install_packages 494 518 495 519 def get_update_info(self): … … 510 534 self.size_update_label.set_markup(msg_size) 511 535 536 #def get_update_info 537 512 538 513 539 def pulsate_pbar(self): … … 516 542 else: 517 543 self.pbar.hide() 518 544 545 #def pulsate_pbar 519 546 520 547 def view_packages_clicked(self,widget,event): 521 548 self.stack.set_transition_type(Gtk.StackTransitionType.SLIDE_LEFT) 522 549 self.stack.set_visible_child_name("packages") 523 550 551 #def view_packages_clicked 552 524 553 525 554 def no_button_clicked(self,widget,event): 526 555 527 556 self.response=1 557 558 def yes_button_clicked(self,widget,event): 559 560 msg_gather="<span><b>"+_("Updating mirror in progess?")+"</b></span>" 561 self.gather_label.set_markup(msg_gather) 562 self.yes_button_box.hide() 563 self.no_button_box.hide() 564 565 command='/usr/share/lliurex-flavours-selector/lliurex-flavours-selector.py' 566 p=subprocess.Popen([command],shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE) 567 output=p.communicate() 568 self.thread_ret=p.returncode 569 self.flavour_error=output[1] 570 571 572 if self.thread_ret==0: 573 self.response=1 574 575 #def no_button_clicked 528 576 529 577 def arrow_clicked(self,widget,event): 530 578 self.stack.set_transition_type(Gtk.StackTransitionType.SLIDE_RIGHT) 531 579 self.stack.set_visible_child_name("update") 532 533 534 def update_status(self): 580 581 #def arrow_clicked 582 583 def update_installed_icon(self): 535 584 image=Gtk.Image() 536 585 image.set_from_file(ERROR_ICON) … … 539 588 for item in self.packages_store: 540 589 item[3]=icon 590 591 #def update_installed_icon 541 592 542 593 def quit(self,widget,event=None): -
lliurex-up/trunk/fuentes/lliurex-up-gui/rsrc/arrow.svg
r2654 r2674 47 47 fit-margin-bottom="0" 48 48 units="px" 49 inkscape:window-width=" 899"50 inkscape:window-height=" 429"51 inkscape:window-x=" 559"52 inkscape:window-y=" 520"53 inkscape:window-maximized=" 0">49 inkscape:window-width="1360" 50 inkscape:window-height="615" 51 inkscape:window-x="0" 52 inkscape:window-y="24" 53 inkscape:window-maximized="1"> 54 54 <inkscape:grid 55 55 type="xygrid" … … 76 76 transform="translate(-14.472185,-203.62984)"> 77 77 <path 78 style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:# 448aff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"78 style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" 79 79 d="m 22.472234,203.62984 -7,7 -0.998049,1.00001 -0.002,0.002 1,0.99805 7.499999,7.5 1.500001,-1.5 -6,-6 12,0 0,-2.00001 -12,0 5.499999,-5.49999 -1.5,-1.5 z" 80 80 id="rect5447" -
lliurex-up/trunk/fuentes/lliurex-up-gui/rsrc/lliurex-up.ui
r2673 r2674 435 435 </child> 436 436 <child> 437 <object class="GtkBox" id=" return_arrow_box">437 <object class="GtkBox" id="box"> 438 438 <property name="visible">True</property> 439 439 <property name="can_focus">False</property> 440 440 <property name="orientation">vertical</property> 441 441 <child> 442 <object class="GtkEventBox" id="return_arrow_eventbox"> 443 <property name="visible">True</property> 444 <property name="can_focus">False</property> 445 <child> 446 <object class="GtkImage" id="arrow_image"> 447 <property name="visible">True</property> 448 <property name="can_focus">False</property> 449 <property name="margin_left">10</property> 450 <property name="margin_right">10</property> 451 <property name="pixbuf">arrow.svg</property> 452 </object> 453 </child> 454 </object> 455 <packing> 456 <property name="expand">False</property> 457 <property name="fill">True</property> 442 <object class="GtkBox" id="return_arrow_box"> 443 <property name="visible">True</property> 444 <property name="can_focus">False</property> 445 <property name="halign">center</property> 446 <property name="orientation">vertical</property> 447 <child> 448 <object class="GtkEventBox" id="return_arrow_eventbox"> 449 <property name="visible">True</property> 450 <property name="can_focus">False</property> 451 <child> 452 <object class="GtkImage" id="return_arrow_image"> 453 <property name="visible">True</property> 454 <property name="can_focus">False</property> 455 <property name="margin_left">30</property> 456 <property name="margin_right">30</property> 457 <property name="margin_top">10</property> 458 <property name="margin_bottom">10</property> 459 <property name="pixbuf">arrow.png</property> 460 </object> 461 </child> 462 </object> 463 <packing> 464 <property name="expand">False</property> 465 <property name="fill">False</property> 466 <property name="position">0</property> 467 </packing> 468 </child> 469 </object> 470 <packing> 471 <property name="expand">False</property> 472 <property name="fill">False</property> 458 473 <property name="position">0</property> 459 474 </packing>
Note: See TracChangeset
for help on using the changeset viewer.