Changeset 3807 for lliurex-store/trunk/fuentes/lliurex-store-gui
- Timestamp:
- Mar 2, 2017, 3:07:34 PM (4 years ago)
- Location:
- lliurex-store/trunk/fuentes/lliurex-store-gui
- Files:
-
- 13 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
lliurex-store/trunk/fuentes/lliurex-store-gui/DetailsBox.py
r3796 r3807 2 2 gi.require_version('Gtk', '3.0') 3 3 4 from gi.repository import Gtk, Pango, GdkPixbuf, Gdk, Gio 4 from gi.repository import Gtk, Pango, GdkPixbuf, Gdk, Gio,GLib 5 5 import Screenshot 6 6 import ImageManager … … 12 12 13 13 import gettext 14 import time 15 import threading 14 16 15 17 _=gettext.gettext … … 47 49 48 50 self.app_details.pack_start(self.app_banner,False,False,0) 49 self.install_button=Gtk.Button("Install/Installed") 50 self.app_details.pack_start(self.install_button,False,False,10) 51 self.install_button=Gtk.Button() 52 self.install_button_label=Gtk.Label("Install") 53 self.install_button.add(self.install_button_label) 54 self.install_stack=Gtk.Stack() 55 self.install_stack.set_transition_type(Gtk.StackTransitionType.CROSSFADE) 56 self.install_stack.set_transition_duration(500) 57 self.install_stack.add_titled(self.install_button,"button","Install") 58 vbox=Gtk.VBox() 59 self.install_label=Gtk.Label("Installing...") 60 self.install_label.set_name("DETAILS_LABEL") 61 vbox.pack_start(self.install_label,False,False,0) 62 vbox.set_valign(Gtk.Align.FILL) 63 vbox.set_halign(Gtk.Align.FILL) 64 65 self.install_label.set_halign(Gtk.Align.START) 66 self.install_pbar=Gtk.ProgressBar() 67 self.install_pbar.set_valign(Gtk.Align.FILL) 68 self.install_pbar.set_halign(Gtk.Align.FILL) 69 vbox.pack_start(self.install_pbar,True,True,0) 70 71 self.install_stack.add_titled(vbox,"progress","Progress") 72 self.install_button.connect("clicked",self.install_clicked) 73 74 75 76 self.app_details.pack_start(self.install_stack,False,False,10) 51 77 52 78 self.details_label=Gtk.Label("Details") … … 379 405 #def related_app_clicked 380 406 381 407 def install_clicked(self,widget): 408 409 self.install_stack.set_visible_child_name("progress") 410 self.install_pbar.set_text("HOLA") 411 t=threading.Thread(target=self.install_pkg) 412 t.daemon=True 413 t.start() 414 GLib.timeout_add(100,self.pulse_pbar,t) 415 416 417 #def install_clicked 418 419 def pulse_pbar(self,t): 420 421 if t.is_alive(): 422 self.install_pbar.pulse() 423 return True 424 425 self.install_button_label.set_text("Installed") 426 self.install_stack.set_visible_child_name("button") 427 428 return False 429 430 #def pulse_pbar 431 432 def install_pkg(self): 433 434 time.sleep(3) 435 436 #def 437 438 -
lliurex-store/trunk/fuentes/lliurex-store-gui/ImageManager.py
r3796 r3807 23 23 img_y=y 24 24 25 pixbuf=pixbuf.scale_simple(img_x*ratio,img_y*ratio,GdkPixbuf.InterpType. BILINEAR)25 pixbuf=pixbuf.scale_simple(img_x*ratio,img_y*ratio,GdkPixbuf.InterpType.HYPER) 26 26 img=Gtk.Image.new_from_pixbuf(pixbuf) 27 27 -
lliurex-store/trunk/fuentes/lliurex-store-gui/MainMenu.py
r3796 r3807 201 201 hbox=Gtk.HBox() 202 202 hbox.set_halign(Gtk.Align.START) 203 img_path= "/home/cless/Desktop/icons/clean_icons/%s"%icon_name203 img_path=RSRC_DIR+"clean_icons/"+icon_name 204 204 205 205 s=Screenshot.ScreenshotNeo() -
lliurex-store/trunk/fuentes/lliurex-store-gui/MainWindow.py
r3796 r3807 130 130 self.menu_button.connect("clicked",self.menu_button_clicked) 131 131 self.search_entry.connect("changed",self.search_entry_changed) 132 self.search_entry.connect("activate",self.entries_press_event) 132 133 133 134 #def connect_signals … … 268 269 # ## SEARCH FUNCTIONS ###################### 269 270 271 272 def entries_press_event(self,widget): 273 274 self.last_search=None 275 self.search_entry_changed(None) 276 277 #def entries_press_event 278 270 279 def search_entry_changed(self,widget): 271 280 272 txt= widget.get_text()281 txt=self.search_entry.get_text() 273 282 current_stack=self.stack.get_visible_child_name() 274 283 txt=txt.strip(" ") … … 394 403 395 404 if self.fade_box_revealer.get_reveal_child(): 405 self.fade_box_revealer.set_transition_type(Gtk.RevealerTransitionType.CROSSFADE) 396 406 GLib.timeout_add(30,self.check_fade_out) 397 407 self.fade_box_revealer.set_reveal_child(False) … … 402 412 def menu_button_clicked(self,widget): 403 413 404 if self.popup_menu.revealer.get_reveal_child()==True: 405 GLib.timeout_add(250,self.check_fade_out) 406 else: 407 self.fade_box_revealer.set_transition_type(Gtk.RevealerTransitionType.CROSSFADE) 408 414 self.fade_box_revealer.set_transition_type(Gtk.RevealerTransitionType.CROSSFADE) 409 415 self.popup_menu.revealer.set_reveal_child(not self.popup_menu.revealer.get_reveal_child()) 410 416 self.fade_box_revealer.set_reveal_child(True) -
lliurex-store/trunk/fuentes/lliurex-store-gui/PopupMenu.py
r3796 r3807 98 98 def hide_revealer(self,widget,event): 99 99 100 self. revealer.set_reveal_child(False)100 self.core.main_window.main_eb_clicked(None,None) 101 101 102 102 #def hide_revealer -
lliurex-store/trunk/fuentes/lliurex-store-gui/lliurex-store.ui
r3796 r3807 725 725 <property name="can_focus">False</property> 726 726 <property name="yalign">1</property> 727 <property name="pixbuf"> /home/cless/Desktop/icons/office.svg</property>727 <property name="pixbuf">clean_icons/office.svg</property> 728 728 <property name="pixel_size">24</property> 729 729 </object> … … 771 771 <property name="can_focus">False</property> 772 772 <property name="yalign">1</property> 773 <property name="pixbuf"> /home/cless/Desktop/icons/shadow_icons/favorite.svg</property>773 <property name="pixbuf">clean_icons/favorite.svg</property> 774 774 <property name="pixel_size">24</property> 775 775 </object> … … 831 831 <property name="can_focus">False</property> 832 832 <property name="yalign">1</property> 833 <property name="pixbuf"> /home/cless/Desktop/icons/shadow_icons/audio.svg</property>833 <property name="pixbuf">clean_icons/audio.svg</property> 834 834 <property name="pixel_size">24</property> 835 835 </object> … … 877 877 <property name="can_focus">False</property> 878 878 <property name="yalign">1</property> 879 <property name="pixbuf"> /home/cless/Desktop/icons/shadow_icons/games.svg</property>879 <property name="pixbuf">clean_icons/games.svg</property> 880 880 <property name="pixel_size">24</property> 881 881 </object> … … 923 923 <property name="can_focus">False</property> 924 924 <property name="yalign">1</property> 925 <property name="pixbuf"> /home/cless/Desktop/icons/shadow_icons/video.svg</property>925 <property name="pixbuf">clean_icons/video.svg</property> 926 926 <property name="pixel_size">24</property> 927 927 </object>
Note: See TracChangeset
for help on using the changeset viewer.