diff options
author | Joshua Lock <josh@linux.intel.com> | 2012-04-05 14:39:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-11 00:04:41 +0100 |
commit | 49cd60e3c3953a71fac816c01224efbfb970310c (patch) | |
tree | e67a84d88ae1ea97414da0af57a2822fef6b303b /bitbake/lib/bb/ui/crumbs/hobwidget.py | |
parent | e5a63fd66b7855e0c9cafb788d95294e1b06ba58 (diff) | |
download | poky-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>
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hobwidget.py')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobwidget.py | 13 |
1 files changed, 13 insertions, 0 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 | ||