Mercurial > libervia-web
comparison src/browser/sat_browser/xmlui.py @ 564:fed185c95f1c
browser_side: add XMLUI "int" widget type + historyPrint uses the new param "Chat history limit"
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 03 Oct 2014 12:33:03 +0200 |
parents | f030491cff75 |
children | a5019e62c3e9 |
comparison
equal
deleted
inserted
replaced
563:d888bb2a23a9 | 564:fed185c95f1c |
---|---|
146 def _xmluiGetValue(self): | 146 def _xmluiGetValue(self): |
147 return "true" if self.isChecked() else "false" | 147 return "true" if self.isChecked() else "false" |
148 | 148 |
149 def _xmluiOnChange(self, callback): | 149 def _xmluiOnChange(self, callback): |
150 self.addClickListener(callback) | 150 self.addClickListener(callback) |
151 | |
152 | |
153 class IntWidget(xmlui.IntWidget, TextBox): | |
154 | |
155 def __init__(self, _xmlui_parent, value, read_only=False): | |
156 TextBox.__init__(self) | |
157 self.setText(value) | |
158 self.setReadonly(read_only) | |
159 | |
160 def _xmluiSetValue(self, value): | |
161 self.setText(value) | |
162 | |
163 def _xmluiGetValue(self): | |
164 return self.getText() | |
165 | |
166 def _xmluiOnChange(self, callback): | |
167 self.addChangeListener(callback) | |
151 | 168 |
152 | 169 |
153 class ButtonWidget(xmlui.ButtonWidget, Button): | 170 class ButtonWidget(xmlui.ButtonWidget, Button): |
154 | 171 |
155 def __init__(self, _xmlui_parent, value, click_callback): | 172 def __init__(self, _xmlui_parent, value, click_callback): |