merge
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Tue, 09 Apr 2019 13:08:03 +0200
changeset 2584 adfdeaba5a6a
parent 2579 8fb5c6eddc72 (diff)
parent 2583 e172ab28d04e (current diff)
child 2585 fc6f441582cb
merge
--- a/ConfigTreeNode.py	Tue Apr 09 13:05:35 2019 +0200
+++ b/ConfigTreeNode.py	Tue Apr 09 13:08:03 2019 +0200
@@ -127,7 +127,7 @@
         # TODO match config's fields name and fields contents
         return reduce(add, [
             CTNChild.CTNSearch(criteria)
-            for CTNChild in self.IterChildren()],[])
+            for CTNChild in self.IterChildren()], [])
 
     def GetIconName(self):
         return None
--- a/README.md	Tue Apr 09 13:05:35 2019 +0200
+++ b/README.md	Tue Apr 09 13:08:03 2019 +0200
@@ -26,7 +26,7 @@
 		sudo apt-get install python-autobahn python-u-msgpack
 
 		sudo apt-get install libpython2.7-dev
-		pip2 install --use sslpsk posix_spawn
+		pip2 install --user sslpsk posix_spawn
 
 * Prepare
 
--- a/controls/LocationCellEditor.py	Tue Apr 09 13:05:35 2019 +0200
+++ b/controls/LocationCellEditor.py	Tue Apr 09 13:08:03 2019 +0200
@@ -85,7 +85,7 @@
 
     def GetName(self):
         return self.VariableName
-    
+
     def OnSize(self, event):
         self.Layout()
 
@@ -188,7 +188,7 @@
                 if message is not None:
                     wx.CallAfter(self.Table.Parent.ShowErrorMessage, message)
                     return None
-                old_name  = self.Table.GetValueByName(row, 'Name')
+                old_name = self.Table.GetValueByName(row, 'Name')
                 self.Table.SetValueByName(row, 'Name', name)
                 self.Table.Parent.OnVariableNameChange(old_name, name)
             self.Table.SetValueByName(row, 'Location', loc)
@@ -197,7 +197,7 @@
                 self.Table.SetValueByName(row, 'Type', var_type)
         else:
             wx.CallAfter(self.Table.Parent.ShowErrorMessage,
-                _("Selected location is identical to previous one"))
+                         _("Selected location is identical to previous one"))
         self.CellControl.Disable()
         return changed
 
--- a/controls/VariablePanel.py	Tue Apr 09 13:05:35 2019 +0200
+++ b/controls/VariablePanel.py	Tue Apr 09 13:08:03 2019 +0200
@@ -151,7 +151,6 @@
             return value
 
     def SetValue(self, row, col, value):
-        print("SetValue",row, col, value)
         if col < len(self.colnames):
             colname = self.GetColLabelValue(col, False)
             if colname == "Name":
--- a/editors/Viewer.py	Tue Apr 09 13:05:35 2019 +0200
+++ b/editors/Viewer.py	Tue Apr 09 13:08:03 2019 +0200
@@ -595,8 +595,8 @@
 
     # Add Divergence Menu items to the given menu
     def AddDivergenceMenuItems(self, menu, delete=False):
-        add_branch = self.AppendItem(menu, _(u'Add Divergence Branch'),
-                                     self.OnAddBranchMenu)
+        self.AppendItem(menu, _(u'Add Divergence Branch'),
+                        self.OnAddBranchMenu)
         delete_branch = self.AppendItem(menu, _(u'Delete Divergence Branch'),
                                         self.OnDeleteBranchMenu)
 
@@ -640,7 +640,7 @@
             menu.AppendSeparator()
 
         self.AppendItem(menu, _(u'Comment'),
-                       self.GetAddMenuCallBack(self.AddNewComment))
+                        self.GetAddMenuCallBack(self.AddNewComment))
 
     # Add Default Menu items to the given menu
     def AddDefaultMenuItems(self, menu, edit=False, block=False):
@@ -667,8 +667,8 @@
 
         menu.AppendSeparator()
 
-        cut   = self.AppendItem(menu, _(u'Cut'), self.GetClipboardCallBack(self.Cut))
-        copy  = self.AppendItem(menu, _(u'Copy'), self.GetClipboardCallBack(self.Copy))
+        cut = self.AppendItem(menu, _(u'Cut'), self.GetClipboardCallBack(self.Cut))
+        copy = self.AppendItem(menu, _(u'Copy'), self.GetClipboardCallBack(self.Copy))
         paste = self.AppendItem(menu, _(u'Paste'), self.GetAddMenuCallBack(self.Paste))
 
         cut.Enable(block)
@@ -1631,13 +1631,13 @@
     def PopupVariableMenu(self):
         menu = wx.Menu(title='')
         variable_type = self.SelectedElement.GetType()
-        for type_label, type in [(_("Input"), INPUT),
-                                 (_("Output"), OUTPUT),
-                                 (_("InOut"), INOUT)]:
+        for type_label, vtype in [(_("Input"), INPUT),
+                                  (_("Output"), OUTPUT),
+                                  (_("InOut"), INOUT)]:
             item = self.AppendItem(menu, type_label,
-                                   self.GetChangeVariableTypeMenuFunction(type),
+                                   self.GetChangeVariableTypeMenuFunction(vtype),
                                    kind=wx.ITEM_RADIO)
-            if type == variable_type:
+            if vtype == variable_type:
                 item.Check(True)
         menu.AppendSeparator()
         self.AddDefaultMenuItems(menu, block=True)
@@ -1647,12 +1647,12 @@
     def PopupConnectionMenu(self):
         menu = wx.Menu(title='')
         connection_type = self.SelectedElement.GetType()
-        for type_label, type in [(_("Connector"), CONNECTOR),
-                                 (_("Continuation"), CONTINUATION)]:
+        for type_label, ctype in [(_("Connector"), CONNECTOR),
+                                  (_("Continuation"), CONTINUATION)]:
             item = self.AppendItem(menu, type_label,
-                                   self.GetChangeConnectionTypeMenuFunction(type),
+                                   self.GetChangeConnectionTypeMenuFunction(ctype),
                                    kind=wx.ITEM_RADIO)
-            if type == variable_type:
+            if ctype == connection_type:
                 item.Check(True)
         menu.AppendSeparator()
         self.AddDefaultMenuItems(menu, block=True)
@@ -2135,8 +2135,8 @@
 
                         # Popup contextual menu
                         menu = wx.Menu()
-                        for text, callback in items :
-                            self.AppendItem(menu, text, callback) 
+                        for text, callback in items:
+                            self.AppendItem(menu, text, callback)
                         self.PopupMenu(menu)
 
                     self.SelectedElement.StartConnected.HighlightParentBlock(False)