diff sat_frontends/jp/xmlui_manager.py @ 2961:620bbcec884c

jp (xmlui): check root read_only status in addition to widget one
author Goffi <goffi@goffi.org>
date Fri, 14 Jun 2019 12:49:45 +0200
parents 5d13d357896c
children ab2696e34d29
line wrap: on
line diff
--- a/sat_frontends/jp/xmlui_manager.py	Fri Jun 14 12:49:44 2019 +0200
+++ b/sat_frontends/jp/xmlui_manager.py	Fri Jun 14 12:49:45 2019 +0200
@@ -215,7 +215,7 @@
     type = u"string"
 
     def show(self):
-        if self.read_only:
+        if self.read_only or self.root.read_only:
             self.disp(self.value)
         else:
             elems = []
@@ -240,7 +240,7 @@
 
     def show(self):
         self.verboseName()
-        if self.read_only:
+        if self.read_only or self.root.read_only:
             self.disp(self.value)
         else:
             if self.value:
@@ -325,7 +325,7 @@
     def show(self):
         disp_true = A.color(A.FG_GREEN, u"TRUE")
         disp_false = A.color(A.FG_RED, u"FALSE")
-        if self.read_only:
+        if self.read_only or self.root.read_only:
             self.disp(disp_true if self.value else disp_false)
         else:
             self.disp(A.color(C.A_HEADER, u"0: ",