changeset 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 b2c9b85372de
files sat_frontends/jp/output_xmlui.py sat_frontends/jp/xmlui_manager.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/jp/output_xmlui.py	Fri Jun 14 12:49:44 2019 +0200
+++ b/sat_frontends/jp/output_xmlui.py	Fri Jun 14 12:49:45 2019 +0200
@@ -41,7 +41,7 @@
 
     def xmlui(self, data):
         xmlui = xmlui_manager.create(self.host, data)
-        xmlui.show(values_only=True)
+        xmlui.show(values_only=True, read_only=True)
         self.host.disp(u"")
 
     def xmlui_list(self, data):
--- 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: ",