Patchwork [bitbake-devel,10/11] Hob: fix static variable "self.search" to parameter "search" in signal callback function

login
register
mail settings
Submitter Shane Wang
Date March 20, 2012, 2:41 p.m.
Message ID <a95b61d48bf92948ff5a21896e71ed3cb323ab38.1332254194.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/23883/
State New
Headers show

Comments

Shane Wang - March 20, 2012, 2:41 p.m.
From: Liming An <limingx.l.an@intel.com>

To fix the signal callback function code, and make the temp parameter to replaced the static global variable, as required.

Signed-off-by: Liming An <limingx.l.an@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobwidget.py |   31 ++++++++++++++-----------------
 1 files changed, 14 insertions(+), 17 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index a5c52f7..0bb83d7 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -673,20 +673,17 @@  class HobNotebook(gtk.VBox):
 
     def blank_area_resize_cb(self, widget, request_x, request_y, request_width, request_height):
         self.search.set_size_request(request_width, request_height)
-        widget.modify_bg(gtk.STATE_SELECTED, gtk.gdk.color_parse(HobColors.YELLOW))
-
-    def set_search_entry_editable_cb(self, widget, event):
-        if self.search:
-            self.search.set_editable(True)
-            self.search.set_text("")
-            style = self.search.get_style()
-            style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.BLACK, False, False)
-            self.search.set_style(style)
-
-    def set_search_entry_reset_cb(self, widget, event):
-        if self.search:
-            style = self.search.get_style()
-            style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.GRAY, False, False)
-            self.search.set_style(style)
-            self.search.set_text(self.search_name)
-            self.search.set_editable(False)
+
+    def set_search_entry_editable_cb(self, search, event):
+        search.set_editable(True)
+        search.set_text("")
+        style = self.search.get_style()
+        style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.BLACK, False, False)
+        search.set_style(style)
+
+    def set_search_entry_reset_cb(self, search, event):
+        style = search.get_style()
+        style.text[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(HobColors.GRAY, False, False)
+        search.set_style(style)
+        search.set_text(self.search_name)
+        search.set_editable(False)