Binary file Images/aboutlogo.png has changed
--- 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
--- /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 @@
+<HTML>
+<BODY>
+<CENTER>
+<IMG SRC="../Images/aboutlogo.png">
+<BR><BR>
+<font size="3">The PLCopen Editor saves and loads XML projects,<BR>accordingly to PLCopen TC6-XML Schemes.</font>
+<BR><BR>
+More informations on :
+<a href="http://www.beremiz.org/">http://www.beremiz.org/</a>
+<BR><BR>
+<TABLE border="0">
+ <TR>
+ Supported by LOLITech :
+ </TR>
+ <TR>
+ <a href="http://www.lolitech.fr">http://www.lolitech.fr</a>
+ </TR>
+</TABLE>
+</CENTER>
+</BODY>
+</HTML>
\ No newline at end of file
--- a/plcopen/__init__.py Thu Mar 13 10:20:23 2008 +0100
+++ b/plcopen/__init__.py Thu Mar 13 17:30:37 2008 +0100
@@ -31,4 +31,3 @@
from plcopen import VarOrder
from structures import *
-from docpdf import *
\ No newline at end of file
--- a/plcopen/docpdf.py Thu Mar 13 10:20:23 2008 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-#This file is part of PLCOpenEditor, a library implementing an IEC 61131-3 editor
-#based on the plcopen standard.
-#
-#Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD
-#
-#See COPYING file for copyrights details.
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-#General Public License for more details.
-#
-#You should have received a copy of the GNU General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-# Package initialisation
-
-# plcopen module dynamically creates its classes
-
-import os
-
-def OpenPDFDoc():
- if not os.path.isfile("plcopen/TC6_XML_V101.pdf"):
- return """No documentation file available."""
- try:
- os.system("xpdf -remote PLCOpen plcopen/TC6_XML_V101.pdf &")
- return True
- except:
- return """Check if xpdf is correctly installed on your computer"""
\ No newline at end of file