Primitivus (xmlui): use constants for BOOL_TRUE and BOOL_FALSE value

This commit is contained in:
Goffi 2016-12-20 21:06:42 +01:00
commit f237685c1a

View file

@ -157,7 +157,7 @@ class PrimitivusBoolWidget(xmlui.BoolWidget, urwid.CheckBox, PrimitivusEvents):
self.set_state(value == "true")
def _xmluiGetValue(self):
return "true" if self.get_state() else "false"
return C.BOOL_TRUE if self.get_state() else C.BOOL_FALSE
class PrimitivusIntWidget(xmlui.IntWidget, sat_widgets.AdvancedEdit, PrimitivusEvents):