--- a/PLCOpenEditor.py Thu Mar 13 10:20:23 2008 +0100
+++ b/PLCOpenEditor.py Thu Mar 13 17:30:37 2008 +0100
@@ -35,11 +35,14 @@
from RessourceEditor import *
from DataTypeEditor import *
from PLCControler import *
-from plcopen import OpenPDFDoc
from plcopen.structures import LOCATIONDATATYPES
import os, re, platform, sys, time, traceback, getopt
+base_folder = os.path.split(sys.path[0])[0]
+sys.path.append(base_folder)
+from docutils import *
+
__version__ = "$Revision$"
CWD = os.path.split(os.path.realpath(__file__))[0]
@@ -270,12 +273,14 @@
kind=wx.ITEM_NORMAL, text=u'PLCOpenEditor\tF1')
AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
kind=wx.ITEM_NORMAL, text=u'PLCOpen\tF2')
- AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
- kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')
+ #AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
+ # kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')
if self.ModeSolo:
AppendMenu(parent, help='', id=wx.ID_ABOUT,
kind=wx.ITEM_NORMAL, text=u'About')
- self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_ABOUT)
+ self.Bind(wx.EVT_MENU, self.OnPLCOpenEditorMenu, id=wx.ID_HELP)
+ self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
+ self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT)
def _init_utils(self):
self.MenuBar = wx.MenuBar()
@@ -1936,15 +1941,20 @@
self.RefreshEditMenu()
self.RefreshProjectTree()
event.Skip()
-
+
+ def OnPLCOpenEditorMenu(self, event):
+ wx.MessageBox("No documentation available.\nComing soon.")
+ event.Skip()
+
def OnPLCOpenMenu(self, event):
- result = OpenPDFDoc()
- if type(result) == StringType:
- message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
- message.ShowModal()
- message.Destroy()
- event.Skip()
-
+ open_pdf(os.path.join(CWD, "plcopen", "TC6_XML_V101.pdf"))
+ event.Skip()
+
+ def OnAboutMenu(self, event):
+ OpenHtmlFrame(self,"About PLCOpenEditor", os.path.join(CWD, "doc","about.html"), wx.Size(350, 350))
+ event.Skip()
+
+
current_num = 0
def GetNewNum():
global current_num