summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2012-04-05 14:39:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-11 00:04:41 +0100
commit49cd60e3c3953a71fac816c01224efbfb970310c (patch)
treee67a84d88ae1ea97414da0af57a2822fef6b303b
parente5a63fd66b7855e0c9cafb788d95294e1b06ba58 (diff)
downloadpoky-49cd60e3c3953a71fac816c01224efbfb970310c.tar.gz
lib/bb/ui/crumbs: only display one 'Brought in by' item in Hob trees
The design calls for a single 'Brought in by' item to be shown in the tree views with any extra items to be shown in the tooltip. (Bitbake rev: 6866271da738237d3a119e291ac8f9d2c517e124) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/crumbs/hobwidget.py13
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/packageselectionpage.py2
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/recipeselectionpage.py2
3 files changed, 15 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobwidget.py b/bitbake/lib/bb/ui/crumbs/hobwidget.py
index a7e5538b18..006307b3bb 100644
--- a/bitbake/lib/bb/ui/crumbs/hobwidget.py
+++ b/bitbake/lib/bb/ui/crumbs/hobwidget.py
@@ -150,6 +150,10 @@ class HobViewTable (gtk.VBox):
150 col.pack_end(cell, True) 150 col.pack_end(cell, True)
151 col.set_attributes(cell, active=column['col_id']) 151 col.set_attributes(cell, active=column['col_id'])
152 self.toggle_columns.append(column['col_name']) 152 self.toggle_columns.append(column['col_name'])
153 elif column['col_style'] == 'binb':
154 cell = gtk.CellRendererText()
155 col.pack_start(cell, True)
156 col.set_cell_data_func(cell, self.display_binb_cb, column['col_id'])
153 157
154 scroll = gtk.ScrolledWindow() 158 scroll = gtk.ScrolledWindow()
155 scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS) 159 scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
@@ -157,6 +161,15 @@ class HobViewTable (gtk.VBox):
157 scroll.add(self.table_tree) 161 scroll.add(self.table_tree)
158 self.pack_start(scroll, True, True, 0) 162 self.pack_start(scroll, True, True, 0)
159 163
164 def display_binb_cb(self, col, cell, model, it, col_id):
165 binb = model.get_value(it, col_id)
166 # Just display the first item
167 if binb:
168 bin = binb.split(', ')
169 cell.set_property('text', bin[0])
170
171 return True
172
160 def set_model(self, tree_model): 173 def set_model(self, tree_model):
161 self.table_tree.set_model(tree_model) 174 self.table_tree.set_model(tree_model)
162 175
diff --git a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
index 7926636e07..78963f6914 100755
--- a/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
@@ -45,7 +45,7 @@ class PackageSelectionPage (HobPage):
45 }, { 45 }, {
46 'col_name' : 'Brought in by', 46 'col_name' : 'Brought in by',
47 'col_id' : PackageListModel.COL_BINB, 47 'col_id' : PackageListModel.COL_BINB,
48 'col_style': 'text', 48 'col_style': 'binb',
49 'col_min' : 100, 49 'col_min' : 100,
50 'col_max' : 350 50 'col_max' : 350
51 }, { 51 }, {
diff --git a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
index e4616a8e1a..956b02dd95 100755
--- a/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
+++ b/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
@@ -45,7 +45,7 @@ class RecipeSelectionPage (HobPage):
45 }, { 45 }, {
46 'col_name' : 'Brought in by', 46 'col_name' : 'Brought in by',
47 'col_id' : RecipeListModel.COL_BINB, 47 'col_id' : RecipeListModel.COL_BINB,
48 'col_style': 'text', 48 'col_style': 'binb',
49 'col_min' : 100, 49 'col_min' : 100,
50 'col_max' : 500 50 'col_max' : 500
51 }, { 51 }, {