changeset 247:fe83837d3491

browser_side: removed some trailing spaces
author Goffi <goffi@goffi.org>
date Sat, 09 Nov 2013 17:08:45 +0100
parents d7c41c84d062
children 8fdd20399a06
files browser_side/xmlui.py
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/browser_side/xmlui.py	Sat Nov 09 10:24:03 2013 +0100
+++ b/browser_side/xmlui.py	Sat Nov 09 17:08:45 2013 +0100
@@ -41,7 +41,7 @@
 class Pairs(Grid):
 
     def __init__(self):
-        Grid.__init__(self, 0, 0) 
+        Grid.__init__(self, 0, 0)
         self.row = 0
         self.col = 0
 
@@ -53,9 +53,9 @@
         if self.col == 2:
             self.row +=1
             self.col = 0
-        
+
 class XMLUI(VerticalPanel):
-    
+
     def __init__(self, host, xml_data, title = None, options = None, misc = None, close_cb = None):
         print "XMLUI init"
         VerticalPanel.__init__(self)
@@ -89,7 +89,7 @@
             node_type = elem.getAttribute("type")
             value = elem.getAttribute("value") if elem.hasAttribute('value') else u''
             if node_type=="empty":
-                ctrl = Label('') 
+                ctrl = Label('')
             elif node_type=="text":
                 try:
                     value = elem.childNodes[0].wholeText
@@ -169,10 +169,10 @@
                     print("WARNING: Unknown layout [%s], using default one" % (node_type,))
                     self.__parseElems(node, current)
             elif node.nodeName == "category":
-                name = node.getAttribute('name') 
-                label = node.getAttribute('label') 
+                name = node.getAttribute('name')
+                label = node.getAttribute('label')
                 if not name or not isinstance(data,TabPanel):
-                    raise InvalidXMLUI 
+                    raise InvalidXMLUI
                 if self.node_type == 'param':
                     self._current_category = name #XXX: awful hack because params need category and we don't keep parent
                 tab_cont = data
@@ -184,9 +184,9 @@
                 raise NotImplementedError(message)
 
     def constructUI(self, xml_data):
-        
+
         cat_dom = self.dom.parseString(xml_data)
-        
+
         top=cat_dom.documentElement
         self.node_type = top.getAttribute("type")
         self.title = top.getAttribute("title") or self.title
@@ -197,7 +197,7 @@
             self.param_changed = set()
 
         self.__parseChilds(self, cat_dom.documentElement)
-        
+
         if self.node_type == 'form':
             hpanel = HorizontalPanel()
             hpanel.add(Button('Submit',self.onFormSubmitted))
@@ -207,8 +207,8 @@
         elif self.node_type == 'param':
             assert(isinstance(self.children[0],TabPanel))
             hpanel = HorizontalPanel()
-            hpanel.add(Button('Cancel', lambda ignore: self.close())) 
-            hpanel.add(Button('Save', self.onSaveParams)) 
+            hpanel.add(Button('Cancel', lambda ignore: self.close()))
+            hpanel.add(Button('Save', self.onSaveParams))
             self.add(hpanel)
 
     ##EVENTS##
@@ -237,7 +237,7 @@
 
     def onFormSubmitted(self, button):
         print "onFormSubmitted"
-        # FIXME: untested 
+        # FIXME: untested
         print "FIXME FIXME FIXME: Form submitting not managed yet"
         data = []
         for ctrl_name in self.ctrl_list:
@@ -256,7 +256,7 @@
             print ("WARNING: The form data is not sent back, the type is not managed properly")
 
         self.close()
-    
+
     def onFormCancelled(self, button):
         self.close()