Patchwork [bitbake-devel,10/10] lib/bb/ui/crumbs/hig: disable removal of meta-hob layer

login
register
mail settings
Submitter Joshua Lock
Date March 22, 2012, 2:10 a.m.
Message ID <2f70813e177d483b83392a775ca5bad4c7f7f629.1332381654.git.josh@linux.intel.com>
Download mbox | patch
Permalink /patch/24097/
State Accepted
Commit 431624678025b3d3fe04f1c6e8fc50820b3129fb
Headers show

Comments

Joshua Lock - March 22, 2012, 2:10 a.m.
The Hob GUI requires the meta-hob layer to function so prevent its removal
as we do with the core meta layer.

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

Patch

diff --git a/lib/bb/ui/crumbs/hig.py b/lib/bb/ui/crumbs/hig.py
index 05ac8d4..38f0f80 100644
--- a/lib/bb/ui/crumbs/hig.py
+++ b/lib/bb/ui/crumbs/hig.py
@@ -1007,7 +1007,7 @@  class LayerSelectionDialog (CrumbsDialog):
         # Trailing slashes are uncommon in bblayers.conf but confuse os.path.basename
         path.rstrip('/')
         name = os.path.basename(path)
-        if name == "meta":
+        if name == "meta" or name == "meta-hob":
             cell.set_sensitive(False)
             cell.set_property('pixbuf', None)
             cell.set_property('mode', gtk.CELL_RENDERER_MODE_INERT)
@@ -1028,6 +1028,8 @@  class LayerSelectionDialog (CrumbsDialog):
         name = os.path.basename(path)
         if name == "meta":
             cell.set_property('markup', "<b>Core layer for images: it cannot be removed</b>\n%s" % path)
+        elif name == "meta-hob":
+            cell.set_property('markup', "<b>Core layer for Hob: it cannot be removed</b>\n%s" % path)
         else:
             cell.set_property('text', path)