Changeset 6571 for zero-center/trunk
- Timestamp:
- Jan 12, 2018, 12:06:02 PM (3 years ago)
- Location:
- zero-center/trunk/fuentes
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
zero-center/trunk/fuentes/debian/changelog
r6455 r6571 1 zero-center (1:2.12) xenial; urgency=high 2 3 * Adding search box 4 5 -- Hector Garcia Huerta <hectorgh@gmail.com> Fri, 12 Jan 2018 10:15:53 +0100 6 1 7 zero-center (1:2.11) xenial; urgency=high 2 8 -
zero-center/trunk/fuentes/install-files/usr/share/zero-center/rsrc/zero-center.glade
r4250 r6571 2 2 <!-- Generated with glade 3.18.3 --> 3 3 <interface> 4 <requires lib="gtk+" version="3. 0"/>4 <requires lib="gtk+" version="3.6"/> 5 5 <object class="GtkWindow" id="window1"> 6 6 <property name="width_request">800</property> … … 19 19 <property name="margin_bottom">6</property> 20 20 <property name="orientation">vertical</property> 21 <property name="spacing">4</property> 21 22 <child> 22 23 <object class="GtkBox" id="box2"> 23 24 <property name="visible">True</property> 24 25 <property name="can_focus">False</property> 26 <property name="spacing">5</property> 25 27 <child> 26 <object class="GtkImage" id="image 2">28 <object class="GtkImage" id="image1"> 27 29 <property name="visible">True</property> 28 30 <property name="can_focus">False</property> … … 33 35 <property name="fill">True</property> 34 36 <property name="position">0</property> 37 </packing> 38 </child> 39 <child> 40 <object class="GtkEntry" id="entry"> 41 <property name="visible">True</property> 42 <property name="can_focus">True</property> 43 <property name="primary_icon_stock">gtk-find</property> 44 <property name="placeholder_text" translatable="yes">Search...</property> 45 </object> 46 <packing> 47 <property name="expand">False</property> 48 <property name="fill">True</property> 49 <property name="pack_type">end</property> 50 <property name="position">1</property> 51 </packing> 52 </child> 53 <child> 54 <object class="GtkButton" id="button1"> 55 <property name="label" translatable="yes">button</property> 56 <property name="can_focus">True</property> 57 <property name="receives_default">True</property> 58 </object> 59 <packing> 60 <property name="expand">False</property> 61 <property name="fill">True</property> 62 <property name="position">2</property> 35 63 </packing> 36 64 </child> -
zero-center/trunk/fuentes/install-files/usr/share/zero-center/zero-center.py
r4896 r6571 373 373 self.msg_label.set_tooltip_text(self.msg_text) 374 374 375 self.hidden_button=builder.get_object("button1") 376 self.hidden_button.grab_focus() 377 378 self.search_entry=builder.get_object("entry") 379 self.search_entry.connect("changed",self.entry_changed) 380 375 381 self.progress_bar=builder.get_object("progressbar") 376 382 self.progress_label=builder.get_object("progress_label") … … 386 392 #def start_gui 387 393 394 395 def entry_changed(self,widget): 396 self.add_categories_to_window("",False) 388 397 389 398 def scroll_me(self,img): … … 936 945 937 946 938 def check_app_groups(self,app): 939 940 sys.stdout.write(" * Checking " + app["ID"] + " ... ") 947 def check_app_groups(self,app,verbose=True): 948 949 if verbose: 950 sys.stdout.write(" * Checking " + app["ID"] + " ... ") 941 951 groups=[] 942 952 if "Groups" not in app: 943 print("OK") 953 if verbose: 954 print("OK") 944 955 return True 945 956 … … 947 958 948 959 if os.environ["USER"]=="root": 949 print("OK") 960 if verbose: 961 print("OK") 950 962 return True 951 963 … … 953 965 for group in groups: 954 966 if group in self.user_groups: 955 print("OK") 967 if verbose: 968 print("OK") 956 969 return True 957 970 … … 959 972 print e 960 973 pass 961 962 print "NOT ALLOWED" 963 print "\t[!] App groups: ",sorted(groups) 974 975 if verbose: 976 print "NOT ALLOWED" 977 print "\t[!] App groups: ",sorted(groups) 964 978 return False 965 979 … … 1006 1020 1007 1021 1008 def add_categories_to_window(self,category): 1022 def add_categories_to_window(self,category,verbose=True): 1023 1024 for child in self.content_hbox.get_children(): 1025 self.content_hbox.remove(child) 1009 1026 1010 1027 for category in self.categories_parser.categories: … … 1021 1038 for app in sorted(self.app_parser.apps[category]): 1022 1039 1023 if self.check_app_groups(app): 1024 1025 1040 if self.check_app_groups(app,verbose): 1041 1042 search_txt=self.search_entry.get_text().lower() 1043 1044 if search_txt not in app["ID"] and search_txt not in self.get_translation(app["Category"]).lower() and search_txt not in self.get_name(app).lower(): 1045 continue 1026 1046 button=Gtk.Button() 1027 1047 button.set_name("APPBUTTON") … … 1079 1099 child.set_margin_left(20) 1080 1100 self.content_hbox.pack_start(hbox,False,False,5) 1081 1082 self.content_hbox.get_children()[-1].set_margin_bottom(10) 1101 1102 if len(self.content_hbox.get_children()) > 0: 1103 self.content_hbox.get_children()[-1].set_margin_bottom(10) 1083 1104 1084 1105 #def add_categories_to_window
Note: See TracChangeset
for help on using the changeset viewer.