Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Workshop.activity/TutorialStoreSearch.py
diff options
context:
space:
mode:
authorerick <erick@sugar-dev-erick.(none)>2009-12-05 21:03:59 (GMT)
committer erick <erick@sugar-dev-erick.(none)>2009-12-05 21:03:59 (GMT)
commitc14688d67a82b7ec7746beda90da915c98600a3d (patch)
tree1b5fb911f16826290bb4fbebc29e3dd1308626de /Workshop.activity/TutorialStoreSearch.py
parent3a1303ab5fa37d2a9881682af29fa4e177ea67ec (diff)
parent0e6a6e03c520b86ee36d79d4cd0daf06f84632a3 (diff)
Merge branch 'frame_integration' into revamped_dragndrop
Conflicts: tutorius/actions.py
Diffstat (limited to 'Workshop.activity/TutorialStoreSearch.py')
-rw-r--r--Workshop.activity/TutorialStoreSearch.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/Workshop.activity/TutorialStoreSearch.py b/Workshop.activity/TutorialStoreSearch.py
new file mode 100644
index 0000000..4303a07
--- /dev/null
+++ b/Workshop.activity/TutorialStoreSearch.py
@@ -0,0 +1,38 @@
+import sys, os
+import gtk
+
+class TutorialStoreSearch(gtk.HBox):
+
+ def __init__(self,controller):
+ gtk.HBox.__init__(self,False, 5)
+ self.controller = controller
+ search_label = gtk.Label('Search :')
+ self.search_box = gtk.Entry(400)
+ in_label = gtk.Label('in')
+ self.search_combobox = gtk.combo_box_new_text()
+ self.search_button = gtk.Button('Search')
+
+ self.pack_start(search_label, True, True, 5)
+ self.pack_start(self.search_box, True, True, 5)
+ self.pack_start(in_label, True, True, 5)
+ self.pack_start(self.search_combobox, True, True, 5)
+ self.pack_start(self.search_button, True, True, 5)
+
+ search_label.show()
+ self.search_box.show()
+ in_label.show()
+ self.search_combobox.show()
+ self.search_button.show()
+
+ self.search_button.connect("clicked",self.controller.search_store,{'keyword':self.search_box,
+ 'category':self.search_combobox})
+
+ def set_categories(self,categories):
+ self.search_combobox.set_active(0)
+ while self.search_combobox.get_active_text() is not None:
+ self.search_combobox.remove_text(0)
+ self.search_combobox.set_active(0)
+
+ for category in categories:
+ self.search_combobox.append_text(category)
+ \ No newline at end of file