--- a/Beremiz.py Wed Sep 16 14:06:50 2009 +0200
+++ b/Beremiz.py Mon Sep 21 11:56:55 2009 +0200
@@ -410,7 +410,10 @@
if self.PluginRoot is not None:
- self.SetTitle("%s - %s"%(name, self.PluginRoot.GetProjectName()))
+ projectname = self.PluginRoot.GetProjectName() + if self.PluginRoot.PlugTestModified(): + projectname = "~%s~" % projectname + self.SetTitle("%s - %s" % (name, projectname)) @@ -1206,6 +1209,13 @@
textctrl.Bind(wx.EVT_TEXT, self.GetTextCtrlCallBackFunction(textctrl, plugin, element_path))
+ IDEFrame.ResetView(self) + self.DebugVariablePanel.SetDataProducer(None) def OnNewProjectMenu(self, event):
if not self.Config.HasEntry("lastopenedfolder"):
defaultpath = os.path.expanduser("~")
@@ -1218,17 +1228,17 @@
self.Config.Write("lastopenedfolder", os.path.dirname(projectpath))
self.PluginRoot = PluginsRoot(self, self.Log)
self.Controler = self.PluginRoot
result = self.PluginRoot.NewProject(projectpath)
self.DebugVariablePanel.SetDataProducer(self.PluginRoot)
- self._Refresh(TITLE, FILEMENU, EDITMENU, TYPESTREE, INSTANCESTREE,
+ self._Refresh(TYPESTREE, INSTANCESTREE, LIBRARYTREE) self.ShowErrorMessage(result)
+ self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU) def OnOpenProjectMenu(self, event):
@@ -1243,7 +1253,7 @@
if os.path.isdir(projectpath):
self.Config.Write("lastopenedfolder", os.path.dirname(projectpath))
self.PluginRoot = PluginsRoot(self, self.Log)
self.Controler = self.PluginRoot
result = self.PluginRoot.LoadProject(projectpath)
@@ -1272,16 +1282,7 @@
self.PluginRoot.SaveProject()
elif answer == wx.ID_CANCEL:
- self.VariablePanelIndexer.RemoveAllPanels()
- self.TypesTree.DeleteAllItems()
- self.InstancesTree.DeleteAllItems()
- self.LibraryTree.DeleteAllItems()
- self.DebugVariablePanel.SetDataProducer(None)
self._Refresh(TITLE, TOOLBAR, FILEMENU, EDITMENU)
--- a/Beremiz_service.py Wed Sep 16 14:06:50 2009 +0200
+++ b/Beremiz_service.py Mon Sep 21 11:56:55 2009 +0200
@@ -526,9 +526,9 @@
class PLCStoppedHMI(PLCHMI):
docFactory = loaders.stan(tags.div(render=tags.directive('liveElement'))[
- tags.h1["PLC IS STOPPED"]
+ tags.h1["PLC IS STOPPED"],
class MainPage(athena.LiveElement):
jsClass = u"WebInterface.PLC"
docFactory = loaders.stan(tags.div(render=tags.directive('liveElement'))[
@@ -582,7 +582,7 @@
def detachFragmentChildren(self):
for child in self.liveFragmentChildren[:]:
class WebInterface(athena.LivePage):
docFactory = loaders.stan([tags.raw(xhtml_header),
@@ -594,7 +594,7 @@
def __init__(self, plcState=False, *a, **kw):
super(WebInterface, self).__init__(*a, **kw)
self.jsModules.mapping[u'WebInterface'] = util.sibpath(__file__, 'webinterface.js')
@@ -645,7 +645,7 @@
#print "We will be called back when the client disconnects"
reactor.registerWxApp(app)
--- a/plugger.py Wed Sep 16 14:06:50 2009 +0200
+++ b/plugger.py Mon Sep 21 11:56:55 2009 +0200
@@ -1325,11 +1325,11 @@
def ShowError(self, logger, from_location, to_location):
chunk_infos = self.GetChunkInfos(from_location, to_location)
for infos, (start_row, start_col) in chunk_infos:
start = (from_location[0] - start_row, from_location[1] - start_col)
end = (to_location[0] - start_row, to_location[1] - start_col)
- self.AppFrame.ShowError(infos, start, end)
+ if self.AppFrame is not None: + self.AppFrame.ShowError(infos, start, end) plc_file = self._getIECcodepath()
@@ -1356,18 +1356,6 @@
- if self.PLCEditor is None:
- self.RefreshPluginsBlockLists()
- self.PLCEditor = PLCOpenEditor(self.AppFrame, self)
- self.PLCEditor._onclose = _onclose
- self.PLCEditor._onsave = _onsave
if os.path.isdir(os.path.join(self._getBuildPath())):
self.logger.write(_("Cleaning the build directory\n"))
@@ -1727,6 +1715,7 @@
if self._connector.NewPLC(MD5, data, extrafiles):
if self.AppFrame is not None:
self.AppFrame.CloseDebugTabs()
+ self.AppFrame.RefreshInstanceTree() self.UnsubscribeAllDebugIECVariable()
self.ProgramTransferred()
self.logger.write(_("Transfer completed successfully.\n"))