diff frontends/src/primitivus/xmlui.py @ 975:b37b1d183ac3

reverted changeset 5c7707c958d8 (revision 969)
author souliane <souliane@mailoo.org>
date Thu, 03 Apr 2014 14:38:48 +0200
parents 5c7707c958d8
children 68faf7d77a42
line wrap: on
line diff
--- a/frontends/src/primitivus/xmlui.py	Wed Apr 02 12:37:32 2014 +0200
+++ b/frontends/src/primitivus/xmlui.py	Thu Apr 03 14:38:48 2014 +0200
@@ -19,7 +19,6 @@
 
 from sat.core.i18n import _
 import urwid
-import copy
 from urwid_satext import sat_widgets
 from logging import debug, info, warning, error
 from xml.dom import minidom
@@ -79,15 +78,11 @@
 
         urwid.Divider.__init__(self, div_char)
 
-
 class PrimitivusStringWidget(xmlui.StringWidget, sat_widgets.AdvancedEdit, PrimitivusEvents):
 
     def __init__(self, parent, value):
         sat_widgets.AdvancedEdit.__init__(self, edit_text=value)
 
-    def _xmluiSetValue(self, value):
-        self.set_edit_text(value)
-
     def _xmluiGetValue(self):
         return self.get_edit_text()
 
@@ -97,9 +92,6 @@
     def __init__(self, parent, value):
         sat_widgets.Password.__init__(self, edit_text=value)
 
-    def _xmluiSetValue(self, value):
-        self.set_edit_text(value)
-
     def _xmluiGetValue(self):
         return self.get_edit_text()
 
@@ -109,9 +101,6 @@
     def __init__(self, parent, value):
         sat_widgets.AdvancedEdit.__init__(self, edit_text=value, multiline=True)
 
-    def _xmluiSetValue(self, value):
-        self.set_edit_text(value)
-
     def _xmluiGetValue(self):
         return self.get_edit_text()
 
@@ -121,9 +110,6 @@
     def __init__(self, parent, state):
         urwid.CheckBox.__init__(self, '', state=state)
 
-    def _xmluiSetValue(self, value):
-        self.set_state(value == "true")
-
     def _xmluiGetValue(self):
         return "true" if self.get_state() else "false"
 
@@ -149,21 +135,6 @@
     def _xmluiGetSelectedValues(self):
         return [option.value for option in self.getSelectedValues()]
 
-    def _xmluiAddValues(self, values, select=True):
-        current_values = self.getAllValues()
-        new_values = copy.deepcopy(current_values)
-        for value in values:
-            if value not in current_values:
-                new_values.append(value)
-        if select:
-            selected = self._xmluiGetSelectedValues()
-        self.changeValues(new_values)
-        if select:
-            for value in values:
-                if value not in selected:
-                    selected.append(value)
-            self._xmluiSelectValues(selected)
-
 
 class PrimitivusAdvancedListContainer(xmlui.AdvancedListContainer, sat_widgets.TableContainer, PrimitivusEvents):