Patchwork [bitbake-devel,1/2] Hob: fixed an issue about no 'set_page' function in hob failed page show

login
register
mail settings
Submitter An, LimingX L
Date June 14, 2012, 12:22 p.m.
Message ID <d226436d6adfb063aee2c549e7dd28620414aa9b.1339676383.git.limingx.l.an@intel.com>
Download mbox | patch
Permalink /patch/29831/
State New
Headers show

Comments

An, LimingX L - June 14, 2012, 12:22 p.m.
Due in mistake deletion in previous patches, if building failed, will report
the error of no 'set_page', so add that function.

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/hobwidget.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index afcd5b8..dba278c 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -532,6 +532,12 @@  class HobNotebook(gtk.Notebook):
         if search.get_editable() == True:
             search.set_text("")
 
+    def set_page(self, title):
+        for child in self.pages:
+            if child.lbl.get_label() == title:
+                child.grab_focus()
+                self.set_current_page(self.page_num(child))
+
 class HobWarpCellRendererText(gtk.CellRendererText):
     def __init__(self, col_number):
         gtk.CellRendererText.__init__(self)