summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index 4b0a0cf808..db52c47415 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -622,6 +622,8 @@ class HobNotebook(gtk.VBox):
622 self.search.set_style(style) 622 self.search.set_style(style)
623 self.search.set_text(name) 623 self.search.set_text(name)
624 self.search.set_editable(False) 624 self.search.set_editable(False)
625 self.search.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY, gtk.STOCK_CLEAR)
626 self.search.connect("icon-release", self.set_search_entry_clear_cb)
625 self.search.show() 627 self.search.show()
626 self.align = gtk.Alignment(xalign=1.0, yalign=0.7) 628 self.align = gtk.Alignment(xalign=1.0, yalign=0.7)
627 self.align.add(self.search) 629 self.align.add(self.search)
@@ -682,9 +684,16 @@ class HobNotebook(gtk.VBox):
682 style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.BLACK, False, False) 684 style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.BLACK, False, False)
683 search.set_style(style) 685 search.set_style(style)
684 686
685 def set_search_entry_reset_cb(self, search, event): 687 def reset_entry(self, entry):
686 style = search.get_style() 688 style = entry.get_style()
687 style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.GRAY, False, False) 689 style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.GRAY, False, False)
688 search.set_style(style) 690 entry.set_style(style)
689 search.set_text(self.search_name) 691 entry.set_text(self.search_name)
690 search.set_editable(False) 692 entry.set_editable(False)
693
694 def set_search_entry_reset_cb(self, search, event):
695 self.reset_entry(search)
696
697 def set_search_entry_clear_cb(self, search, icon_pos, event):
698 self.reset_entry(search)
699