[bitbake-devel] [PATCH 1/9] lib/bb/ui/crumbs/hig: sort layers in Layer Selection dialogue

Joshua Lock josh at linux.intel.com
Sat Mar 24 00:22:59 UTC 2012


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

Signed-off-by: Joshua Lock <josh at linux.intel.com>
---
 lib/bb/ui/crumbs/hig.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 1db93ea..3a66e7c 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -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)
-- 
1.7.7.6





More information about the bitbake-devel mailing list