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>
This commit is contained in:
parent
e5a63fd66b
commit
49cd60e3c3
|
@ -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
|
||||
}, {
|
||||
|
|
Loading…
Reference in New Issue