# HG changeset patch # User greg # Date 1205425837 -3600 # Node ID f37abf3ee358708d119321344fc1db3e16b6354d # Parent 43cd3ef83a1f048f3a9f728e00fdd552177a724d added to helpmenu : about + plcopen + plcopeneditor removed old docpf.py and use now docutils diff -r 43cd3ef83a1f -r f37abf3ee358 Images/aboutlogo.png Binary file Images/aboutlogo.png has changed diff -r 43cd3ef83a1f -r f37abf3ee358 PLCOpenEditor.py --- 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 diff -r 43cd3ef83a1f -r f37abf3ee358 doc/about.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/about.html Thu Mar 13 17:30:37 2008 +0100 @@ -0,0 +1,21 @@ + +
+