Mercurial > libervia-backend
comparison frontends/primitivus/xmlui.py @ 192:879beacb8e16
Primitivus: major changes in SelectableText, menu can now be used with mouse, TabsContainer show wich tab is selected
- SelectableText is a WidgetWrap of urwid.Text, and manage attributes and complexe combination like urwid.Text (list of tuples (attribute,text))
- Menu now use a ColumnsRoller, and can't anymore be displayed on 2 rows, avoiding potential bug when display MenuBox
- Mouse can be used in menu. Right click on MenuBox make it disappear
- Tab container now display which tab is selected by putting a 'title' attribute on the corresponding button
/!\ as SelectableText is heavily used, there can be regressions
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 19 Aug 2010 21:11:22 +0800 |
parents | 9ee4a1d0d7fb |
children | 3198bfd66daa |
comparison
equal
deleted
inserted
replaced
191:1438a1337732 | 192:879beacb8e16 |
---|---|
230 data = [] | 230 data = [] |
231 for ctrl_name in self.ctrl_list: | 231 for ctrl_name in self.ctrl_list: |
232 ctrl = self.ctrl_list[ctrl_name] | 232 ctrl = self.ctrl_list[ctrl_name] |
233 if isinstance(ctrl['control'], custom_widgets.List): | 233 if isinstance(ctrl['control'], custom_widgets.List): |
234 data.append((ctrl_name, ctrl['control'].getSelectedValue())) | 234 data.append((ctrl_name, ctrl['control'].getSelectedValue())) |
235 if isinstance(ctrl['control'], urwid.CheckBox): | 235 elif isinstance(ctrl['control'], urwid.CheckBox): |
236 data.append((ctrl_name, "true" if ctrl['control'].get_state() else "false")) | 236 data.append((ctrl_name, "true" if ctrl['control'].get_state() else "false")) |
237 else: | 237 else: |
238 data.append((ctrl_name, ctrl['control'].get_edit_text())) | 238 data.append((ctrl_name, ctrl['control'].get_edit_text())) |
239 if self.misc.has_key('action_back'): #FIXME FIXME FIXME: WTF ! Must be cleaned | 239 if self.misc.has_key('action_back'): #FIXME FIXME FIXME: WTF ! Must be cleaned |
240 raise NotImplementedError | 240 raise NotImplementedError |