Adding canfestival specific buttons for opening slave and network editors
authorLaurent Bessard
Mon, 18 Jun 2012 19:40:06 +0200
changeset 14 37734da73adc
parent 13 2e3c3da3593e
child 15 1c68bb669806
Adding canfestival specific buttons for opening slave and network editors
LPCManager.py
--- a/LPCManager.py	Sun Jun 17 12:56:54 2012 +0200
+++ b/LPCManager.py	Mon Jun 18 19:40:06 2012 +0200
@@ -558,6 +558,13 @@
         def GetCanDevice(self):
             return str(self.BaseParams.getIEC_Channel())
     
+        ConfNodeMethods = [
+            {"bitmap" : "NetworkEdit",
+             "name" : _("Edit slave"), 
+             "tooltip" : _("Edit CanOpen slave with ObjdictEdit"),
+             "method" : "_OpenView"},
+        ] + _SlaveCTN.ConfNodeMethods
+    
     class LPCNetworkEditor(NetworkEditor):
         SHOW_BASE_PARAMS = False
         
@@ -579,6 +586,13 @@
         def GetCanDevice(self):
             return str(self.BaseParams.getIEC_Channel())
     
+        ConfNodeMethods = [
+            {"bitmap" : "NetworkEdit",
+             "name" : _("Edit network"), 
+             "tooltip" : _("Edit CanOpen Network with NetworkEdit"),
+             "method" : "_OpenView"},
+        ] + _NodeListCTN.ConfNodeMethods
+    
     class LPCCanOpen(CanOpenRootClass):
         XSD = None
         CTNChildrenTypes = [("CanOpenNode", LPCCanOpenMaster, "CanOpen Master"),
@@ -599,7 +613,6 @@
                 slave = self.CTNAddChild("Slave", "CanOpenSlave", 1)
                 #slave.BaseParams.setEnabled(False)
                 slave.CTNRequestSave()
-    
 
 #-------------------------------------------------------------------------------
 #                              LPCProjectController Class