plugger.py
changeset 652 eb2d9f2b3567
parent 639 85dad46ae0f6
child 655 5becd66cca02
equal deleted inserted replaced
651:cbeb769b0a56 652:eb2d9f2b3567
   134     def PlugPath(self,PlugName=None):
   134     def PlugPath(self,PlugName=None):
   135         if not PlugName:
   135         if not PlugName:
   136             PlugName = self.BaseParams.getName()
   136             PlugName = self.BaseParams.getName()
   137         return os.path.join(self.PlugParent.PlugPath(),
   137         return os.path.join(self.PlugParent.PlugPath(),
   138                             PlugName + NameTypeSeparator + self.PlugType)
   138                             PlugName + NameTypeSeparator + self.PlugType)
       
   139     
       
   140     def GetIconPath(self, name):
       
   141         return opjimg(name)
   139     
   142     
   140     def PlugTestModified(self):
   143     def PlugTestModified(self):
   141         return self.ChangesToSave
   144         return self.ChangesToSave
   142 
   145 
   143     def ProjectTestModified(self):
   146     def ProjectTestModified(self):
   292         
   295         
   293         return LocationCFilesAndCFLAGS, LDFLAGS, extra_files
   296         return LocationCFilesAndCFLAGS, LDFLAGS, extra_files
   294 
   297 
   295     def BlockTypesFactory(self):
   298     def BlockTypesFactory(self):
   296         if self.LibraryControler is not None:
   299         if self.LibraryControler is not None:
   297             return [{"name" : "%s POUs" % self.PlugType, "list": self.LibraryControler.Project.GetCustomBlockTypes()}]
   300             return [{"name" : _("%s POUs") % self.PlugType, "list": self.LibraryControler.Project.GetCustomBlockTypes()}]
   298         return []
   301         return []
   299 
   302 
   300     def ParentsBlockTypesFactory(self):
   303     def ParentsBlockTypesFactory(self):
   301         return self.PlugParent.ParentsBlockTypesFactory() + self.BlockTypesFactory()
   304         return self.PlugParent.ParentsBlockTypesFactory() + self.BlockTypesFactory()
   302 
   305 
   788         if frame is not None:
   791         if frame is not None:
   789             # Timer to pull PLC status
   792             # Timer to pull PLC status
   790             ID_STATUSTIMER = wx.NewId()
   793             ID_STATUSTIMER = wx.NewId()
   791             self.StatusTimer = wx.Timer(self.AppFrame, ID_STATUSTIMER)
   794             self.StatusTimer = wx.Timer(self.AppFrame, ID_STATUSTIMER)
   792             self.AppFrame.Bind(wx.EVT_TIMER, self.PullPLCStatusProc, self.StatusTimer)
   795             self.AppFrame.Bind(wx.EVT_TIMER, self.PullPLCStatusProc, self.StatusTimer)
       
   796         
       
   797             self.RefreshPluginsBlockLists()
   793 
   798 
   794     def ResetAppFrame(self, logger):
   799     def ResetAppFrame(self, logger):
   795         if self.AppFrame is not None:
   800         if self.AppFrame is not None:
   796             self.AppFrame.Unbind(wx.EVT_TIMER, self.StatusTimer)
   801             self.AppFrame.Unbind(wx.EVT_TIMER, self.StatusTimer)
   797             self.StatusTimer = None
   802             self.StatusTimer = None