lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue

The two layers which cannot be removed, meta and meta-hob, should be the
first two items in the tree view.

(Bitbake rev: 6e51643325611f6cfc9090dcbbff20755d09c92d)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock 2012-03-23 17:22:59 -07:00 committed by Richard Purdie
parent 822af52bb9
commit 63defc9bf6
1 changed files with 7 additions and 1 deletions

View File

@ -803,8 +803,14 @@ class LayerSelectionDialog (CrumbsDialog):
table_layer.attach(scroll, 0, 10, 0, 1)
layer_store = gtk.ListStore(gobject.TYPE_STRING)
core_iter = None
for layer in layers:
layer_store.set(layer_store.append(), 0, layer)
if layer.endswith("/meta"):
core_iter = layer_store.prepend([layer])
elif layer.endswith("/meta-hob") and core_iter:
layer_store.insert_after(core_iter, [layer])
else:
layer_store.append([layer])
col1 = gtk.TreeViewColumn('Enabled')
layer_tv.append_column(col1)