summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/crumbs/hig.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs/hig.py')
-rw-r--r--bitbake/lib/bb/ui/crumbs/hig.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hig.py b/bitbake/lib/bb/ui/crumbs/hig.py
index d973086102..e56cf2a759 100644
--- a/bitbake/lib/bb/ui/crumbs/hig.py
+++ b/bitbake/lib/bb/ui/crumbs/hig.py
@@ -1665,11 +1665,12 @@ class LayerSelectionDialog (CrumbsDialog):
1665 def add_leave_cb(self, button, event): 1665 def add_leave_cb(self, button, event):
1666 self.im.set_from_file(hic.ICON_INDI_ADD_FILE) 1666 self.im.set_from_file(hic.ICON_INDI_ADD_FILE)
1667 1667
1668 def __init__(self, title, layers, all_layers, parent, flags, buttons=None): 1668 def __init__(self, title, layers, layers_non_removable, all_layers, parent, flags, buttons=None):
1669 super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons) 1669 super(LayerSelectionDialog, self).__init__(title, parent, flags, buttons)
1670 1670
1671 # class members from other objects 1671 # class members from other objects
1672 self.layers = layers 1672 self.layers = layers
1673 self.layers_non_removable = layers_non_removable
1673 self.all_layers = all_layers 1674 self.all_layers = all_layers
1674 self.layers_changed = False 1675 self.layers_changed = False
1675 1676
@@ -1709,10 +1710,7 @@ class LayerSelectionDialog (CrumbsDialog):
1709 """ 1710 """
1710 def draw_delete_button_cb(self, col, cell, model, it, tv): 1711 def draw_delete_button_cb(self, col, cell, model, it, tv):
1711 path = model.get_value(it, 0) 1712 path = model.get_value(it, 0)
1712 # Trailing slashes are uncommon in bblayers.conf but confuse os.path.basename 1713 if path in self.layers_non_removable:
1713 path.rstrip('/')
1714 name = os.path.basename(path)
1715 if name == "meta" or name == "meta-hob":
1716 cell.set_sensitive(False) 1714 cell.set_sensitive(False)
1717 cell.set_property('pixbuf', None) 1715 cell.set_property('pixbuf', None)
1718 cell.set_property('mode', gtk.CELL_RENDERER_MODE_INERT) 1716 cell.set_property('mode', gtk.CELL_RENDERER_MODE_INERT)
@@ -1730,11 +1728,8 @@ class LayerSelectionDialog (CrumbsDialog):
1730 """ 1728 """
1731 def draw_layer_path_cb(self, col, cell, model, it): 1729 def draw_layer_path_cb(self, col, cell, model, it):
1732 path = model.get_value(it, 0) 1730 path = model.get_value(it, 0)
1733 name = os.path.basename(path) 1731 if path in self.layers_non_removable:
1734 if name == "meta": 1732 cell.set_property('markup', "<b>It cannot be removed</b>\n%s" % path)
1735 cell.set_property('markup', "<b>Core layer for images: it cannot be removed</b>\n%s" % path)
1736 elif name == "meta-hob":
1737 cell.set_property('markup', "<b>Core layer for Hob: it cannot be removed</b>\n%s" % path)
1738 else: 1733 else:
1739 cell.set_property('text', path) 1734 cell.set_property('text', path)
1740 1735