Comments
Patch
@@ -150,6 +150,10 @@ class HobViewTable (gtk.VBox):
col.pack_end(cell, True)
col.set_attributes(cell, active=column['col_id'])
self.toggle_columns.append(column['col_name'])
+ elif column['col_style'] == 'binb':
+ cell = gtk.CellRendererText()
+ col.pack_start(cell, True)
+ col.set_cell_data_func(cell, self.display_binb_cb, column['col_id'])
scroll = gtk.ScrolledWindow()
scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
@@ -157,6 +161,15 @@ class HobViewTable (gtk.VBox):
scroll.add(self.table_tree)
self.pack_start(scroll, True, True, 0)
+ def display_binb_cb(self, col, cell, model, it, col_id):
+ binb = model.get_value(it, col_id)
+ # Just display the first item
+ if binb:
+ bin = binb.split(', ')
+ cell.set_property('text', bin[0])
+
+ return True
+
def set_model(self, tree_model):
self.table_tree.set_model(tree_model)
@@ -45,7 +45,7 @@ class PackageSelectionPage (HobPage):
}, {
'col_name' : 'Brought in by',
'col_id' : PackageListModel.COL_BINB,
- 'col_style': 'text',
+ 'col_style': 'binb',
'col_min' : 100,
'col_max' : 350
}, {
@@ -45,7 +45,7 @@ class RecipeSelectionPage (HobPage):
}, {
'col_name' : 'Brought in by',
'col_id' : RecipeListModel.COL_BINB,
- 'col_style': 'text',
+ 'col_style': 'binb',
'col_min' : 100,
'col_max' : 500
}, {
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. Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/ui/crumbs/hobwidget.py | 13 +++++++++++++ lib/bb/ui/crumbs/packageselectionpage.py | 2 +- lib/bb/ui/crumbs/recipeselectionpage.py | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-)