--- a/Beremiz.py Mon Jun 25 20:05:29 2012 +0200
+++ b/Beremiz.py Thu Jun 28 12:07:21 2012 +0200
@@ -562,7 +562,7 @@
- return ("confnode", tab.Controler.CTNFullName())
+ return ("confnode", tab.Controler.CTNFullName(), tab.GetTagName()) elif (isinstance(tab, TextViewer) and
(tab.Controler is None or isinstance(tab.Controler, MiniTextControler))):
return ("confnode", None, tab.GetInstancePath())
@@ -941,6 +941,17 @@
IDEFrame.OnProjectTreeItemActivated(self, event)
+ def ProjectTreeItemSelect(self, select_item): + name = self.ProjectTree.GetItemText(select_item) + item_infos = self.ProjectTree.GetPyData(select_item) + if item_infos["type"] == ITEM_CONFNODE: + item_infos["confnode"]._OpenView(onlyopened=True) + elif item_infos["type"] == ITEM_PROJECT: + self.CTR._OpenView(onlyopened=True) + IDEFrame.ProjectTreeItemSelect(self, select_item) def SelectProjectTreeItem(self, tagname):
if self.ProjectTree is not None:
root = self.ProjectTree.GetRootItem()
--- a/ConfigTreeNode.py Mon Jun 25 20:05:29 2012 +0200
+++ b/ConfigTreeNode.py Thu Jun 28 12:07:21 2012 +0200
@@ -405,15 +405,18 @@
self.BaseParams.setIEC_Channel(res)
- def _OpenView(self, name=None):
+ def _OpenView(self, name=None, onlyopened=False): if self.EditorType is not None:
+ app_frame = self.GetCTRoot().AppFrame - app_frame = self.GetCTRoot().AppFrame
self._View = self.EditorType(app_frame.TabsOpened, self, app_frame)
app_frame.EditProjectElement(self._View, self.CTNName())
+ app_frame.EditProjectElement(self._View, self.CTNName(), onlyopened) --- a/ProjectController.py Mon Jun 25 20:05:29 2012 +0200
+++ b/ProjectController.py Thu Jun 28 12:07:21 2012 +0200
@@ -17,6 +17,7 @@
from util.misc import CheckPathPerm, GetClassImporter
from util.MiniTextControler import MiniTextControler
from util.ProcessLogger import ProcessLogger
+from util.FileManagementPanel import FileManagementPanel from PLCControler import PLCControler
from TextViewer import TextViewer
from plcopen.structures import IEC_KEYWORDS
@@ -24,6 +25,7 @@
from util.discovery import DiscoveryDialog
from ConfigTreeNode import ConfigTreeNode
from ProjectNodeEditor import ProjectNodeEditor
+from utils.BitmapLibrary import GetBitmap base_folder = os.path.split(sys.path[0])[0]
@@ -932,14 +934,18 @@
def _editIECrawcode(self):
self._OpenView("IEC raw code")
- def _OpenView(self, name=None):
+ _ProjectFilesView = None + def _OpenProjectFiles(self): + self._OpenView("Project files") + def _OpenView(self, name=None, onlyopened=False): - if self._IEC_code_viewer is None:
+ if self._IECCodeView is None: plc_file = self._getIECcodepath()
self._IECCodeView = TextViewer(self.AppFrame.TabsOpened, "", None, None, instancepath=name)
- #self._IECCodeViewr.Enable(False)
+ #self._IECCodeView.Enable(False) self._IECCodeView.SetTextSyntax("ALL")
self._IECCodeView.SetKeywords(IEC_KEYWORDS)
@@ -947,29 +953,46 @@
text = '(* No IEC code have been generated at that time ! *)'
self._IECCodeView.SetText(text = text)
- self._IECCodeView.SetIcon(self.AppFrame.GenerateBitmap("ST"))
+ self._IECCodeView.SetIcon(GetBitmap("ST")) self.AppFrame.EditProjectElement(self._IECCodeView, name)
+ self.AppFrame.EditProjectElement(self._IECCodeView, name, onlyopened) elif name == "IEC raw code":
- if self.IEC_raw_code_viewer is None:
+ if self._IECRawCodeView is None: controler = MiniTextControler(self._getIECrawcodepath())
- self.IEC_raw_code_viewer = TextViewer(self.AppFrame.TabsOpened, "", None, controler, instancepath=name)
- #self.IEC_raw_code_viewer.Enable(False)
- self.IEC_raw_code_viewer.SetTextSyntax("ALL")
- self.IEC_raw_code_viewer.SetKeywords(IEC_KEYWORDS)
- self.IEC_raw_code_viewer.RefreshView()
- self.IEC_raw_code_viewer.SetIcon(self.AppFrame.GenerateBitmap("ST"))
+ self._IECRawCodeView = TextViewer(self.AppFrame.TabsOpened, "", None, controler, instancepath=name) + #self._IECRawCodeView.Enable(False) + self._IECRawCodeView.SetTextSyntax("ALL") + self._IECRawCodeView.SetKeywords(IEC_KEYWORDS) + self._IECRawCodeView.RefreshView() + self._IECRawCodeView.SetIcon(GetBitmap("ST")) - self.AppFrame.EditProjectElement(self.IEC_raw_code_viewer, name)
- return self.IEC_raw_code_viewer
+ self.AppFrame.EditProjectElement(self._IECRawCodeView, name) + self.AppFrame.EditProjectElement(self._IECRawCodeView, name, onlyopened) + return self._IECRawCodeView + elif name == "Project files": + if self._ProjectFilesView is None: + self._ProjectFilesView = FileManagementPanel(self.AppFrame.TabsOpened, self, name, self._getProjectFilesPath(), True) + self.AppFrame.EditProjectElement(self._ProjectFilesView, name) + self.AppFrame.EditProjectElement(self._ProjectFilesView, name, onlyopened) + return self._ProjectFilesView - return ConfigTreeNode._OpenView(self, name)
+ return ConfigTreeNode._OpenView(self, name, onlyopened) def OnCloseEditor(self, view):
ConfigTreeNode.OnCloseEditor(self, view)
@@ -977,6 +1000,8 @@
if self._IECRawCodeView == view:
self._IECRawCodeView = None
+ if self._ProjectFilesView == view: + self._ProjectFilesView = None self._CloseView(self._IECCodeView)
@@ -1414,16 +1439,6 @@
wx.CallAfter(self.UpdateMethodsFromPLCStatus)
- def _ImportProjectFile(self):
- dialog = wx.FileDialog(self.AppFrame, _("Choose a file"), os.getcwd(), "", _("All files|*.*"), wx.OPEN)
- if dialog.ShowModal() == wx.ID_OK:
- filepath = dialog.GetPath()
- if os.path.isfile(filepath):
- shutil.copy(filepath, self._getProjectFilesPath())
- self.logger.write_error(_("No such file: %s\n") % filepath)
@@ -1470,10 +1485,10 @@
"name" : _("Raw IEC code"),
"tooltip" : _("Edit raw IEC code added to code generated by PLCGenerator"),
"method" : "_editIECrawcode"},
- {"bitmap" : "ImportFile",
- "name" : _("Import file"),
- "tooltip" : _("Import into project a file to be transfered with PLC"),
- "method" : "_ImportProjectFile"},
+ {"bitmap" : "ManageFolder", + "name" : _("Project Files"), + "tooltip" : _("Open a file explorer to manage project files"), + "method" : "_OpenProjectFiles"}, --- a/c_ext/CFileEditor.py Mon Jun 25 20:05:29 2012 +0200
+++ b/c_ext/CFileEditor.py Thu Jun 28 12:07:21 2012 +0200
@@ -4,10 +4,10 @@
-from util.misc import opjimg
from controls import CustomGrid, CustomTable
from ConfTreeNodeEditor import ConfTreeNodeEditor
+from utils.BitmapLibrary import GetBitmap if wx.Platform == '__WXMSW__':
faces = { 'times': 'Times New Roman',
@@ -790,10 +790,10 @@
for idx, (name, panel_class) in enumerate(CFILE_PARTS):
button = FoldPanelCaption(id=button_id, name='FoldPanelCaption_%s' % name,
- label=name, bitmap=wx.Bitmap(opjimg("CollapsedIconData")),
+ label=name, bitmap=GetBitmap("CollapsedIconData"), parent=self.ConfNodeEditor, pos=wx.Point(0, 0),
size=wx.Size(0, 20), style=wx.NO_BORDER|wx.ALIGN_LEFT)
- button.SetBitmapSelected(wx.Bitmap(opjimg("ExpandedIconData")))
+ button.SetBitmapSelected(GetBitmap("ExpandedIconData")) button.Bind(wx.EVT_BUTTON, self.GenPanelButtonCallback(name), id=button_id)
self.MainSizer.AddWindow(button, 0, border=0, flag=wx.TOP|wx.GROW)
--- a/canfestival/canfestival.py Mon Jun 25 20:05:29 2012 +0200
+++ b/canfestival/canfestival.py Thu Jun 28 12:07:21 2012 +0200
@@ -255,8 +255,9 @@
def _ShowGeneratedMaster(self):
self._OpenView("Generated master")
- def _OpenView(self, name=None):
+ def _OpenView(self, name=None, onlyopened=False): if name == "Generated master":
+ app_frame = self.GetCTRoot().AppFrame if self._GeneratedMasterView is None:
buildpath = self._getBuildPath()
# Eventually create build dir
@@ -269,16 +270,17 @@
self.GetCTRoot().logger.write_error(_("Error: No Master generated\n"))
- app_frame = self.GetCTRoot().AppFrame
manager = MiniNodeManager(self, masterpath, self.CTNFullName() + ".generated_master")
self._GeneratedMasterView = MasterViewer(app_frame.TabsOpened, manager, app_frame)
app_frame.EditProjectElement(self._GeneratedMasterView, name)
+ app_frame.EditProjectElement(self._IECCodeView, name, onlyopened) return self._GeneratedMasterView
- ConfigTreeNode._OpenView(self)
+ ConfigTreeNode._OpenView(self, name, onlyopened) if self._View is not None:
self._View.SetBusId(self.GetCurrentLocation())
--- a/images/icons.svg Mon Jun 25 20:05:29 2012 +0200
+++ b/images/icons.svg Thu Jun 28 12:07:21 2012 +0200
@@ -43,9 +43,9 @@
- inkscape:zoom="2.5600001"
- inkscape:cx="643.14253"
- inkscape:cy="778.71873"
+ inkscape:zoom="14.481548" + inkscape:cx="571.21601" + inkscape:cy="800.14078" inkscape:current-layer="svg2"
@@ -85902,6 +85902,1777 @@
+ id="linearGradient2915" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1892.2,-872.89)" + id="radialGradient2917" + xlink:href="#linearGradient5060-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1891.6,-872.89)" + id="linearGradient5060-1"> + id="radialGradient2919" + xlink:href="#linearGradient5060-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.7744,0,0,1.9697,112.76,-872.89)" + id="linearGradient3035"> + id="linearGradient2932" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.054893,0.013851,0.0025726,0.052482,-0.7128,-0.26741)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient2934-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0083,0,0,1.0006,-8.2398e-4,-0.0066209)" + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="linearGradient2929" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29669,0,0,0.35207,1.8805,2.1186)" + style="stop-color:#fff;stop-opacity:.2" + style="stop-color:#fff;stop-opacity:0" + id="linearGradient2536" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.32803,0,0,0.32571,4.445,4.532)" + style="stop-color:#ecf5b6" + style="stop-color:#9fba48" + gradientTransform="translate(-40,0)" + gradientUnits="userSpaceOnUse" + id="linearGradient18010-6" + xlink:href="#linearGradient5175-3-7-9-2-7" + inkscape:collect="always" /> + id="linearGradient5175-3-7-9-2-7"> + style="stop-color:#bdcccd;stop-opacity:1;" + id="stop5177-6-9-6-1-9" /> + style="stop-color:#7979ff;stop-opacity:1;" + id="stop5179-73-8-3-1-8" /> + gradientTransform="translate(-40,0)" + gradientUnits="userSpaceOnUse" + id="linearGradient17986" + xlink:href="#linearGradient5175-3-7-9-2-7" + inkscape:collect="always" /> + id="linearGradient3262" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + style="stop-color:#f6f6f6" + style="stop-color:#ccc" + id="linearGradient3264" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + style="stop-color:#aaa" + style="stop-color:#8c8c8c" + id="linearGradient3260" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.096142,0,0,0.096142,1.8469,1.943)" + style="stop-color:#e5e5e5" + style="stop-color:#ababab" + inkscape:collect="always" + xlink:href="#linearGradient2447-4-6" + id="linearGradient17971-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.035207,0,0,0.0082353,273.01733,211.29633)" + id="linearGradient2447-4-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.035207,0,0,0.0082353,-0.72485,18.981)" + inkscape:collect="always" + xlink:href="#linearGradient5060-7" + id="radialGradient17973-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.012049,0,0,0.0082353,284.50318,211.29633)" + id="linearGradient5060-7"> + inkscape:collect="always" + xlink:href="#linearGradient5060-7" + id="radialGradient17975-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.012049,0,0,0.0082353,286.98118,211.29633)" + id="linearGradient18060"> + inkscape:collect="always" + xlink:href="#linearGradient2435-0-5" + id="linearGradient17977-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.48572,0,0,0.47803,274.08501,191.60938)" + id="linearGradient2435-0-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.48572,0,0,0.47803,274.08501,191.60938)" + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + inkscape:collect="always" + xlink:href="#linearGradient2438-2-4" + id="linearGradient17979-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.39221,0,0,0.44736,302.94118,191.07663)" + id="linearGradient2438-2-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.39221,0,0,0.44736,302.94118,191.07663)" + style="stop-color:#aaa" + style="stop-color:#c8c8c8" + inkscape:collect="always" + xlink:href="#radialGradient2432-9" + id="radialGradient17981-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.17021,0,0,-0.19072,274.84858,216.03233)" + id="radialGradient2432-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.17021,0,0,-0.19072,274.84858,216.03233)" + style="stop-color:#b7b8b9" + style="stop-color:#ececec" + style="stop-color:#fafafa;stop-opacity:0" + style="stop-color:#fff;stop-opacity:0" + style="stop-color:#fafafa;stop-opacity:0" + style="stop-color:#ebecec;stop-opacity:0" + style="stop-color:#e1e2e3;stop-opacity:0" + inkscape:collect="always" + xlink:href="#linearGradient2429-7-0" + id="linearGradient17983-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.45454,0,0,0.46512,274.83308,192.65256)" + id="linearGradient2429-7-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.45454,0,0,0.46512,274.83308,192.65256)" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + inkscape:collect="always" + xlink:href="#linearGradient2425-2-2" + id="linearGradient17985-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47785,0,0,0.55248,274.11443,192.2392)" + id="linearGradient2425-2-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.47785,0,0,0.55248,274.11443,192.2392)" + style="stop-color:#fefefe" + style="stop-color:#cbcbcb" + inkscape:collect="always" + xlink:href="#linearGradient1291-0-8" + id="linearGradient16528-1-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3316761,0,0,0.3316761,48.927852,9.2318583)" + id="linearGradient1291-0-8"> + style="stop-color:#ffffff;stop-opacity:1" + style="stop-color:#ffffff;stop-opacity:0" + id="linearGradient2528" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1892.2,-872.89)" + id="radialGradient2530" + xlink:href="#linearGradient5060-75" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1891.6,-872.89)" + id="linearGradient5060-75"> + id="radialGradient2532" + xlink:href="#linearGradient5060-75" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.7744,0,0,1.9697,112.76,-872.89)" + id="linearGradient3052"> + id="linearGradient2558" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(34.378,-14.501)" + style="stop-color:#fff" + style="stop-color:#cdcdcd" + style="stop-color:#a1a1a1" + id="linearGradient2560-6" + gradientUnits="userSpaceOnUse" + style="stop-color:#c1c1c1" + style="stop-color:#909090" + id="radialGradient2553-7" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.69,0,0,1.0436,-5.449,0.96175)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient2555" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.99458,0,0,0.99458,-0.33927,1.7178)" + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="radialGradient2550" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.016802,1.3943,-1.7966,-0.021651,14.152,2.1566)" + style="stop-color:#fff" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + id="linearGradient2547" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.44503,0,0,0.40237,2.8192,3.8499)" + style="stop-color:#fff;stop-opacity:.27451" + style="stop-color:#fff;stop-opacity:.078431" + id="linearGradient2995-1" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.46913,0,0,0.4663,7.7005,6.8085)" + style="stop-color:#d7e866" + style="stop-color:#8cab2a" + id="linearGradient2992" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2818,0,0,0.2801,12.197,11.015)" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + gradientTransform="matrix(0.2818,0,0,0.2801,12.197,11.015)" + gradientUnits="userSpaceOnUse" + id="linearGradient3099" + xlink:href="#linearGradient2992" + inkscape:collect="always" /> + inkscape:collect="always" + xlink:href="#linearGradient2528" + id="linearGradient18360" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1892.2,-872.89)" + inkscape:collect="always" + xlink:href="#linearGradient5060-75" + id="radialGradient18362" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1891.6,-872.89)" + inkscape:collect="always" + xlink:href="#linearGradient5060-75" + id="radialGradient18364" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.7744,0,0,1.9697,112.76,-872.89)" + inkscape:collect="always" + xlink:href="#linearGradient2558" + id="linearGradient18366" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(34.378,-14.501)" + inkscape:collect="always" + xlink:href="#linearGradient2560-6" + id="linearGradient18368" + gradientUnits="userSpaceOnUse" + inkscape:collect="always" + xlink:href="#radialGradient2553-7" + id="radialGradient18370" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.69,0,0,1.0436,-5.449,0.96175)" + inkscape:collect="always" + xlink:href="#linearGradient2555" + id="linearGradient18373" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.99458,0,0,0.99458,-0.33927,1.7178)" + inkscape:collect="always" + xlink:href="#radialGradient2550" + id="radialGradient18375" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.016802,1.3943,-1.7966,-0.021651,14.152,2.1566)" + inkscape:collect="always" + xlink:href="#linearGradient2547" + id="linearGradient18377" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.44503,0,0,0.40237,2.8192,3.8499)" + inkscape:collect="always" + xlink:href="#linearGradient2995-1" + id="linearGradient18380" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.46913,0,0,0.4663,7.7005,6.8085)" + inkscape:collect="always" + xlink:href="#linearGradient2992" + id="linearGradient18382" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2818,0,0,0.2801,12.197,11.015)" + id="linearGradient3262-6" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + style="stop-color:#f6f6f6" + style="stop-color:#ccc" + id="linearGradient3264-0" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + style="stop-color:#aaa" + style="stop-color:#8c8c8c" + id="linearGradient3260-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.096142,0,0,0.096142,1.8469,1.943)" + style="stop-color:#e5e5e5" + style="stop-color:#ababab" + inkscape:collect="always" + xlink:href="#linearGradient3262-6" + id="linearGradient18422" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + inkscape:collect="always" + xlink:href="#linearGradient3264-0" + id="linearGradient18424" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-17.058,0)" + inkscape:collect="always" + xlink:href="#linearGradient3260-9" + id="linearGradient18426" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.096142,0,0,0.096142,1.8469,1.943)" + id="linearGradient2990" + xlink:href="#linearGradient3600" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,705.20699,460.00841)" + id="linearGradient3600"> + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + id="linearGradient2992-8" + xlink:href="#linearGradient3931" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,735.76184,459.4883)" + id="linearGradient3931"> + style="stop-color:#787a75" + style="stop-color:#cbcbcb" + id="linearGradient2906" + xlink:href="#linearGradient3600" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,-5.8439,-5.2)" + id="linearGradient3015-2"> + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + id="linearGradient2908-0" + xlink:href="#linearGradient3931" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,24.711,-5.7201)" + id="linearGradient3022"> + style="stop-color:#787a75" + style="stop-color:#cbcbcb" + gradientTransform="matrix(0.51431,0,0,0.46669,699.20694,454.00842)" + gradientUnits="userSpaceOnUse" + id="linearGradient3031" + xlink:href="#linearGradient3600" + inkscape:collect="always" /> + gradientTransform="matrix(0.4153,0,0,0.43675,729.76184,453.48832)" + gradientUnits="userSpaceOnUse" + id="linearGradient3033-2" + xlink:href="#linearGradient3931" + inkscape:collect="always" /> + inkscape:collect="always" + xlink:href="#linearGradient3600" + id="linearGradient18516" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,699.20694,454.00842)" + inkscape:collect="always" + xlink:href="#linearGradient3931" + id="linearGradient18518" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,729.76184,453.48832)" + inkscape:collect="always" + xlink:href="#linearGradient3600" + id="linearGradient18520" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,705.20699,460.00841)" + inkscape:collect="always" + xlink:href="#linearGradient3931" + id="linearGradient18522" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,735.76184,459.4883)" + inkscape:collect="always" + xlink:href="#linearGradient3600-8" + id="linearGradient18516-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,699.20694,454.00842)" + id="linearGradient3600-8"> + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + inkscape:collect="always" + xlink:href="#linearGradient3931-4" + id="linearGradient18518-4" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,729.76184,453.48832)" + id="linearGradient3931-4"> + style="stop-color:#787a75" + style="stop-color:#cbcbcb" + inkscape:collect="always" + xlink:href="#linearGradient3600-8" + id="linearGradient18520-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.51431,0,0,0.46669,705.20699,460.00841)" + id="linearGradient18543"> + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + inkscape:collect="always" + xlink:href="#linearGradient3931-4" + id="linearGradient18522-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.4153,0,0,0.43675,735.76184,459.4883)" + id="linearGradient18550"> + style="stop-color:#787a75" + style="stop-color:#cbcbcb" + id="linearGradient3732" + xlink:href="#linearGradient3390-178-986-453-4-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92957,0,0,0.99594,51.302,-181.74)" + id="linearGradient3390-178-986-453-4-5"> + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="linearGradient3021" + xlink:href="#linearGradient3390-178-986-453-4-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92957,0,0,0.99594,51.302,-181.74)" + id="linearGradient3023"> + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="linearGradient4322-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92957,0,0,0.99594,51.302,-181.74)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient4324" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92957,0,0,0.99594,51.302,-181.74)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient3026" + xlink:href="#linearGradient4456" + gradientUnits="userSpaceOnUse" + id="linearGradient4456"> + style="stop-color:#f6daae" + style="stop-color:#f0c178;stop-opacity:0" + id="linearGradient4462-8" + xlink:href="#linearGradient4456" + gradientUnits="userSpaceOnUse" + id="linearGradient3042-4"> + style="stop-color:#f6daae" + style="stop-color:#f0c178;stop-opacity:0" + gradientTransform="matrix(0.92957,0,0,0.99594,51.302,-181.74)" + gradientUnits="userSpaceOnUse" + id="linearGradient3056-3" + xlink:href="#linearGradient3390-178-986-453-4-5" + inkscape:collect="always" /> + id="linearGradient3732-9" + xlink:href="#linearGradient3390-178-986-453-4-5-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" /> + id="linearGradient3390-178-986-453-4-5-2"> + style="stop-color:#bb2b12;stop-opacity:1" + style="stop-color:#cd7233;stop-opacity:1" + id="linearGradient4452-2" + xlink:href="#linearGradient3390-178-986-453-4-5-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" /> + id="linearGradient3021-6"> + style="stop-color:#bb2b12;stop-opacity:1" + style="stop-color:#cd7233;stop-opacity:1" + id="linearGradient4322-8" + xlink:href="#linearGradient7012-661-145-733-759-865-745-661-970-94-1-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" /> + id="linearGradient7012-661-145-733-759-865-745-661-970-94-1-0"> + style="stop-color:#f0c178;stop-opacity:1" + style="stop-color:#e18941;stop-opacity:1" + style="stop-color:#ec4f18;stop-opacity:1" + id="linearGradient4324-9" + xlink:href="#linearGradient7012-661-145-733-759-865-745-661-970-94-1-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.92956783,0,0,0.99594396,51.30231,-181.73954)" /> + id="linearGradient3033-9"> + style="stop-color:#f0c178;stop-opacity:1" + style="stop-color:#e18941;stop-opacity:1" + style="stop-color:#ec4f18;stop-opacity:1" + id="linearGradient3007-8" + xlink:href="#linearGradient4456-2" + gradientUnits="userSpaceOnUse" /> + id="linearGradient4456-2"> + style="stop-color:#f6daae;stop-opacity:1" + style="stop-color:#f0c178;stop-opacity:0" + id="linearGradient4462-81" + xlink:href="#linearGradient4456-2" + gradientUnits="userSpaceOnUse" /> + id="linearGradient3046-1"> + style="stop-color:#f6daae;stop-opacity:1" + style="stop-color:#f0c178;stop-opacity:0" + id="linearGradient2528-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1892.2,-872.89)" + id="radialGradient2530-6" + xlink:href="#linearGradient5060-14" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1891.6,-872.89)" + id="linearGradient5060-14"> + id="radialGradient2532-3" + xlink:href="#linearGradient5060-14" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.7744,0,0,1.9697,112.76,-872.89)" + id="linearGradient3120"> + id="linearGradient2558-0" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(34.378,-14.501)" + style="stop-color:#fff" + style="stop-color:#cdcdcd" + style="stop-color:#a1a1a1" + id="linearGradient2560-9" + gradientUnits="userSpaceOnUse" + style="stop-color:#c1c1c1" + style="stop-color:#909090" + id="radialGradient2553-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.69,0,0,1.0436,-5.449,0.96175)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient2555-2" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.99458,0,0,0.99458,-0.33927,1.7178)" + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="radialGradient2550-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-0.016802,1.3943,-1.7966,-0.021651,14.152,2.1566)" + style="stop-color:#fff" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + id="linearGradient2547-3" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.44503,0,0,0.40237,2.8192,3.8499)" + style="stop-color:#fff;stop-opacity:.27451" + style="stop-color:#fff;stop-opacity:.078431" + id="linearGradient2995-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.46913,0,0,0.4663,7.7005,6.8085)" + style="stop-color:#d7e866" + style="stop-color:#8cab2a" + id="linearGradient2992-9" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.2818,0,0,0.2801,12.197,11.015)" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + gradientTransform="matrix(0.2818,0,0,0.2801,12.197,11.015)" + gradientUnits="userSpaceOnUse" + id="linearGradient3167" + xlink:href="#linearGradient2992-9" + inkscape:collect="always" /> + id="linearGradient2517" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.31429,0,0,0.32593,0.45711,-0.32225)" + style="stop-color:#f4f4f4" + style="stop-color:#dbdbdb" + id="linearGradient2519" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.25379,0,0,0.30502,19.129,-0.68549)" + style="stop-color:#aaa" + style="stop-color:#c8c8c8" + id="linearGradient2511-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.27273,0,0,0.30232,1.4546,0.7442)" + style="stop-color:#fff" + style="stop-color:#fff;stop-opacity:0" + id="linearGradient2507-5" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.3092,0,0,0.37669,0.47615,0.10718)" + style="stop-color:#fefefe" + style="stop-color:#cbcbcb" + gradientTransform="matrix(0.3092,0,0,0.37669,0.47615,0.10718)" + gradientUnits="userSpaceOnUse" + id="linearGradient3039-3" + xlink:href="#linearGradient2507-5" + inkscape:collect="always" /> + gradientTransform="translate(-40,0)" + gradientUnits="userSpaceOnUse" + id="linearGradient17986-0" + xlink:href="#linearGradient5175-3-7-9-2-7-4" + inkscape:collect="always" /> + id="linearGradient5175-3-7-9-2-7-4"> + style="stop-color:#bdcccd;stop-opacity:1;" + id="stop5177-6-9-6-1-9-8" /> + style="stop-color:#7979ff;stop-opacity:1;" + id="stop5179-73-8-3-1-8-3" /> + id="linearGradient2915-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1892.2,-872.89)" + id="radialGradient2917-0" + xlink:href="#linearGradient5060-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(2.7744,0,0,1.9697,-1891.6,-872.89)" + id="linearGradient5060-0"> + id="radialGradient2919-7" + xlink:href="#linearGradient5060-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(-2.7744,0,0,1.9697,112.76,-872.89)" + id="linearGradient3035-2"> + id="linearGradient2932-6" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.054893,0.013851,0.0025726,0.052482,-0.7128,-0.26741)" + style="stop-color:#f0c178" + style="stop-color:#e18941" + style="stop-color:#ec4f18" + id="linearGradient2934-0" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.0083,0,0,1.0006,-8.2398e-4,-0.0066209)" + style="stop-color:#bb2b12" + style="stop-color:#cd7233" + id="linearGradient2929-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.29669,0,0,0.35207,1.8805,2.1186)" + style="stop-color:#fff;stop-opacity:.2" + style="stop-color:#fff;stop-opacity:0" + id="linearGradient2536-8" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.32803,0,0,0.32571,4.445,4.532)" + style="stop-color:#ecf5b6" + style="stop-color:#9fba48" + gradientTransform="matrix(0.32803,0,0,0.32571,4.445,4.532)" + gradientUnits="userSpaceOnUse" + id="linearGradient3065" + xlink:href="#linearGradient2536-8" + inkscape:collect="always" /> @@ -86085,7 +87856,7 @@
- sodipodi:role="line">%% Build Clean editPLC HMIEditor ImportFile ImportDEF ImportSVG NetworkEdit ShowMaster ExportSlave Run ShowIECcode Stop Unknown %%</tspan></text>
+ sodipodi:role="line">%% Build Clean editPLC HMIEditor ImportFile ManageFolder ImportDEF ImportSVG NetworkEdit ShowMaster ExportSlave Run ShowIECcode Stop Unknown %%</tspan></text> style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -86271,7 +88042,7 @@
inkscape:connector-curvature="0" />
- transform="translate(1777.0897,-400.03854)"
+ transform="translate(1869.0897,-400.03854)" @@ -86290,7 +88061,7 @@
inkscape:connector-curvature="0" />
- transform="translate(1560.1847,-369.94418)"
+ transform="translate(1652.1847,-369.94418)" @@ -86567,7 +88338,7 @@
- transform="translate(1830.9892,-430.1329)">
+ transform="translate(1922.9892,-430.1329)"> @@ -86577,7 +88348,7 @@
style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
- transform="matrix(1.6473499,0,0,1.6473499,910.92343,183.57576)"
+ transform="matrix(1.6473499,0,0,1.6473499,1002.9234,183.57576)" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient19976);fill-opacity:1;stroke:#547c1b;stroke-width:0.1061436;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Andale Mono"><flowRegion
@@ -86591,7 +88362,7 @@
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:url(#linearGradient34167);fill-opacity:1;stroke:#547c1b;stroke-width:0.1061436;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;font-family:Andale Mono" /></flowRegion><flowPara
style="fill:url(#linearGradient19974);fill-opacity:1;stroke:#547c1b;stroke-width:0.1061436;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none">ST</flowPara></flowRoot> <g
- transform="matrix(0.07159976,0,0,0.07159976,773.18029,195.95335)"
+ transform="matrix(0.07159976,0,0,0.07159976,865.18029,195.95335)" d="m 144.80549,88.557517 c 0,39.134993 -31.76158,70.896673 -70.896401,70.896673 -39.135167,0 -70.8967476,-31.76168 -70.8967476,-70.896673 0,-39.134957 31.7615806,-70.896643 70.8967476,-70.896643 39.134821,0 70.896401,31.761686 70.896401,70.896643 z"
@@ -86681,7 +88452,7 @@
inkscape:connector-curvature="0" />
- transform="translate(1898.8886,-460.22727)"
+ transform="translate(1990.8886,-460.22727)" @@ -86777,7 +88548,7 @@
transform="matrix(0.5724346,-0.3079575,0.3079575,0.5724346,131.42904,887.47867)" />
- transform="translate(1402.788,-309.831)"
+ transform="translate(1494.788,-309.831)" @@ -86857,7 +88628,7 @@
- transform="translate(1474.788,-339.84989)"
+ transform="translate(1566.788,-339.84989)" @@ -86999,7 +88770,7 @@
- sodipodi:role="line">%% Add Delete Disabled Enabled HideVars IECCDown IECCUp Maximize Minimize minus plus ShowVars %%</tspan></text>
+ sodipodi:role="line">%% Add Delete Disabled Enabled HideVars IECCDown IECCUp Maximize Minimize minus plus ShowVars LeftCopy RightCopy%%</tspan></text> transform="matrix(1.0031449,0,0,1.0031449,797.89799,82.2456)" />
@@ -89490,7 +91261,7 @@
- transform="translate(1635.0897,-400.03854)">
+ transform="translate(1727.0897,-400.03854)"> @@ -89787,7 +91558,7 @@
- sodipodi:role="line">%% Extension Cfile Pyfile wxGlade SVGUI %%</tspan></text>
+ sodipodi:role="line">%% Extension Cfile Pyfile wxGlade SVGUI FOLDER %%</tspan></text> inkscape:label="#use3839"
@@ -90756,7 +92527,7 @@
- transform="translate(1715.0897,-400.03854)">
+ transform="translate(1807.0897,-400.03854)"> @@ -90907,4 +92678,443 @@
transform="translate(0,0.99987)" />
+ transform="matrix(0.78594807,0,0,0.80079582,452.62316,322.85138)" + transform="matrix(0.36395,0,0,0.34457,-0.64485,-0.38545)"> + transform="matrix(0.021652,0,0,0.014857,43.008,42.685)"> + style="opacity:0.40206;fill:url(#linearGradient2915)" + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient2917)" + d="m -219.62,-150.68 v 478.33 c 142.87,0.90045 345.4,-107.17 345.4,-239.2 0,-132.03 -159.44,-239.13 -345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient2919)" + d="m -1559.3,-150.68 v 478.33 c -142.87,0.90045 -345.4,-107.17 -345.4,-239.2 0,-132.03 159.44,-239.13 345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="fill:#ffffff;stroke:#a8a8a8;stroke-width:0.97899997;stroke-linecap:round;stroke-linejoin:round" + d="m 0.60164,1.5216 c -0.056258,0 -0.10449,0.060345 -0.10449,0.12267 0,4.6046 0.00337,8.6512 -6.554e-4,12.857 4.7063,-0.02397 9.4151,-0.04826 14.1230004,-0.06552 -0.41713,0 -1.1123,-0.07009 -1.1024,-0.94049 0.0035,-3.597 0.02296,-7.4084 0.01078,-10.981 H 7.4759746 c -0.47749,0 -1.0963,-0.99306 -1.5261,-0.99306 h -5.3477 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient2932);stroke:url(#linearGradient2934-3);stroke-width:0.95339;stroke-linecap:round;stroke-linejoin:round" + d="m 2.5254,4.524 c 0.65636,0 12.48,0.031393 12.989,0.031393 0,0.61541 -0.02468,9.9581 -0.05407,9.9581 -4.5588,0.01775 -11.659,-0.01389 -12.987,-0.01389 0,-1.1615 0.05188,-7.5853 0.05188,-9.9756 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient2929);fill-rule:evenodd" + d="M 2.8355,4 C 2.37891,4 2.00106,4.44838 2.00106,4.9902 v 5.6331 c 0.00175,0.10077 0.044034,0.21567 0.11126,0.28606 0.067223,0.07039 0.15315,0.10008 0.25033,0.08802 0.00309,9.4e-5 0.00618,9.4e-5 0.00927,0 l 13.351,-2.5081 c 0.1548,-0.028972 0.27598,-0.18812 0.27815,-0.37407 v -3.1246 c 0,-0.54182 -0.37785,-0.9902 -0.83444,-0.9902 h -12.331 z" /> + inkscape:connector-curvature="0" + style="opacity:0.35;fill:none;stroke:#ffffff;stroke-width:1px" + d="M 3.499,14 V 5.5 h 11.5" /> + transform="translate(490.93931,321.78746)" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient17986);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" + d="m -40,0 0,16 16,0 0,-16 -16,0 z m 1,1 14,0 0,14 -14,0 0,-14 z" + sodipodi:nodetypes="cccccccccc" + inkscape:label="#rect2160" /> + transform="matrix(0.39454693,0,0,0.39454693,458.92849,329.94337)" + inkscape:connector-curvature="0" + style="fill:url(#linearGradient3262);stroke:url(#linearGradient3264);stroke-linejoin:round;display:block" + d="M 6.9375,0.5 C 6.6891,0.5 6.5,0.68908 6.5,0.9375 v 1.25 C 5.9461,2.3297 5.4488,2.5594 4.9688,2.8438 L 4.0625,1.9375 c -0.17566,-0.17566 -0.44934,-0.17566 -0.625,0 l -1.5,1.5 c -0.17566,0.17566 -0.17566,0.44934 0,0.625 L 2.8438,4.9688 C 2.5594,5.4488 2.3297,5.9461 2.1875,6.5 h -1.25 C 0.68908,6.5 0.5,6.6891 0.5,6.9375 v 2.125 c 1e-8,0.24842 0.18908,0.4375 0.4375,0.4375 h 1.25 c 0.1422,0.5539 0.37188,1.0512 0.65625,1.5312 l -0.9063,0.907 c -0.17566,0.17566 -0.17566,0.44934 0,0.625 l 1.5,1.5 c 0.17566,0.17566 0.44934,0.17566 0.625,0 l 0.9063,-0.907 c 0.48,0.285 0.9773,0.514 1.5312,0.656 v 1.25 c 1e-7,0.24842 0.18908,0.4375 0.4375,0.4375 h 2.125 c 0.2484,0 0.4375,-0.189 0.4375,-0.438 v -1.25 c 0.5539,-0.1422 1.0512,-0.37188 1.5312,-0.65625 l 0.90625,0.90625 c 0.17566,0.17566 0.44934,0.17566 0.625,0 l 1.5,-1.5 c 0.17566,-0.17566 0.17566,-0.44934 0,-0.625 l -0.906,-0.906 c 0.285,-0.48 0.514,-0.977 0.656,-1.531 h 1.25 c 0.249,0 0.438,-0.1891 0.438,-0.4375 v -2.125 c 0,-0.2484 -0.189,-0.4375 -0.438,-0.4375 h -1.25 c -0.142,-0.5539 -0.371,-1.0512 -0.656,-1.5312 l 0.906,-0.9063 c 0.17566,-0.17566 0.17566,-0.44934 0,-0.625 l -1.5,-1.5 c -0.17566,-0.17566 -0.44934,-0.17566 -0.625,0 l -0.906,0.9063 c -0.48,-0.2844 -0.977,-0.5141 -1.531,-0.6563 v -1.25 C 9.5004,0.68878 9.3113,0.4997 9.0629,0.4997 H 6.9379 z M 8,6 c 1.104,0 2,0.896 2,2 0,1.104 -0.896,2 -2,2 C 6.896,10 6,9.104 6,8 6,6.896 6.896,6 8,6 z" /> + inkscape:connector-curvature="0" + d="M 8,3.4651 C 5.4994,3.4651 3.4651,5.4994 3.4651,8 c 0,2.501 2.0343,4.535 4.5349,4.535 2.501,0 4.535,-2.034 4.535,-4.535 C 12.535,5.4994 10.501,3.4651 8,3.4651 z m 0,2.093 c 1.3479,0 2.4419,1.094 2.4419,2.4419 0,1.3479 -1.094,2.4419 -2.4419,2.4419 -1.3479,0 -2.4419,-1.0941 -2.4419,-2.442 C 5.5581,6.652 6.6521,5.558 8,5.558 z" /> + inkscape:connector-curvature="0" + style="fill:none;stroke:url(#linearGradient3260)" + d="M 8,4 C 5.7944,4 4,5.7944 4,8 c 0,2.206 1.7944,4 4,4 2.206,0 4,-1.794 4,-4 C 12,5.7944 10.206,4 8,4 z" /> + transform="translate(1419.0472,-309.64524)" + style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> + transform="translate(-1060.695,499.97716)" + transform="translate(0.036304,-1.2166e-7)"> + style="stroke-width:1.88259995" + transform="matrix(0.54593,0,0,0.51685,-1.002,-0.57818)"> + style="stroke-width:104.95999908" + transform="matrix(0.021652,0,0,0.014857,43.008,42.685)"> + style="opacity:0.40206;fill:url(#linearGradient18360)" + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient18362)" + d="m -219.62,-150.68 v 478.33 c 142.88,0.9 345.4,-107.17 345.4,-239.2 0,-132.02 -159.44,-239.13 -345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient18364)" + d="m -1559.3,-150.68 v 478.33 c -142.8,0.9 -345.4,-107.17 -345.4,-239.2 0,-132.02 159.5,-239.13 345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18366);stroke:url(#linearGradient18368);stroke-width:1.01110005;stroke-linecap:round;stroke-linejoin:round" + d="m 0.67728,2.5695 c -0.08554,0 -0.15887,0.0927 -0.15887,0.1885 0,5.8692 -0.04308,12.244 -0.04914,18.225 0.02908,0.895 0.53723,1.505 0.88963,1.508 1.0128,0.009 0.5393,-0.004 1.0486,0 6.4703,-0.016 13.578,-0.078 20.05,-0.094 0.053,0.007 -1.478,-0.108 -1.463,-1.446 0,-4.673 -0.502,-11.187 -0.502,-15.86 0,-0.1865 -0.015,-0.2905 -0.032,-0.3767 -0.012,-0.0665 -0.028,-0.0989 -0.063,-0.1257 -0.028,-0.0244 -0.055,-0.057 -0.096,-0.0628 h -8.82 c -0.815,0 -1.002,-1.992 -2.2134,-1.992 L 0.6768,2.5695 h -2e-5 z" /> + inkscape:connector-curvature="0" + style="fill:url(#radialGradient18370);stroke:url(#linearGradient18373);stroke-linecap:round;stroke-linejoin:round" + d="m 3.4994,6.5471 c 10.57,0 13.031,5e-4 19.994,-0.0275 0,1.5704 0.258,16.04 -0.484,16.04 -0.714,0 -14.046,-0.094 -21.009,-0.066 1.4717,0 1.4994,-0.623 1.4994,-15.947 v 1e-4 z" /> + inkscape:connector-curvature="0" + style="opacity:0.4;fill:none;stroke:url(#radialGradient18375);stroke-width:0.98119998" + d="m 22.939,7.6088 c 0,0 -16.832,0.0937 -18.397,-0.0923 -0.0829,13.83 -0.5009,14.44 -0.5009,14.44" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18377);fill-rule:evenodd" + d="M 4.2517,6 C 3.5668,6 3,6.5124 3,7.1317 v 6.4373 c 0.0026,0.116 0.0661,0.247 0.1669,0.327 0.1008,0.081 0.2297,0.115 0.3755,0.101 h 0.0139 l 20.027,-2.867 c 0.232,-0.033 0.414,-0.215 0.417,-0.427 V 7.1317 C 24.0003,6.5124 23.4333,6 22.7483,6 H 4.2523 4.252 z" /> + style="fill:#e9a961;display:block" + transform="matrix(0.82971192,0,0,0.82971192,-1050.1806,511.63512)" + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18422);stroke:url(#linearGradient18424);stroke-linejoin:round;display:block" + d="M 6.9375,0.5 C 6.6891,0.5 6.5,0.68908 6.5,0.9375 v 1.25 C 5.9461,2.3297 5.4488,2.5594 4.9688,2.8438 L 4.0625,1.9375 c -0.17566,-0.17566 -0.44934,-0.17566 -0.625,0 l -1.5,1.5 c -0.17566,0.17566 -0.17566,0.44934 0,0.625 L 2.8438,4.9688 C 2.5594,5.4488 2.3297,5.9461 2.1875,6.5 h -1.25 C 0.68908,6.5 0.5,6.6891 0.5,6.9375 v 2.125 c 1e-8,0.24842 0.18908,0.4375 0.4375,0.4375 h 1.25 c 0.1422,0.5539 0.37188,1.0512 0.65625,1.5312 l -0.9063,0.907 c -0.17566,0.17566 -0.17566,0.44934 0,0.625 l 1.5,1.5 c 0.17566,0.17566 0.44934,0.17566 0.625,0 l 0.9063,-0.907 c 0.48,0.285 0.9773,0.514 1.5312,0.656 v 1.25 c 1e-7,0.24842 0.18908,0.4375 0.4375,0.4375 h 2.125 c 0.2484,0 0.4375,-0.189 0.4375,-0.438 v -1.25 c 0.5539,-0.1422 1.0512,-0.37188 1.5312,-0.65625 l 0.90625,0.90625 c 0.17566,0.17566 0.44934,0.17566 0.625,0 l 1.5,-1.5 c 0.17566,-0.17566 0.17566,-0.44934 0,-0.625 l -0.906,-0.906 c 0.285,-0.48 0.514,-0.977 0.656,-1.531 h 1.25 c 0.249,0 0.438,-0.1891 0.438,-0.4375 v -2.125 c 0,-0.2484 -0.189,-0.4375 -0.438,-0.4375 h -1.25 c -0.142,-0.5539 -0.371,-1.0512 -0.656,-1.5312 l 0.906,-0.9063 c 0.17566,-0.17566 0.17566,-0.44934 0,-0.625 l -1.5,-1.5 c -0.17566,-0.17566 -0.44934,-0.17566 -0.625,0 l -0.906,0.9063 c -0.48,-0.2844 -0.977,-0.5141 -1.531,-0.6563 v -1.25 C 9.5004,0.68878 9.3113,0.4997 9.0629,0.4997 H 6.9379 z M 8,6 c 1.104,0 2,0.896 2,2 0,1.104 -0.896,2 -2,2 C 6.896,10 6,9.104 6,8 6,6.896 6.896,6 8,6 z" /> + inkscape:connector-curvature="0" + d="M 8,3.4651 C 5.4994,3.4651 3.4651,5.4994 3.4651,8 c 0,2.501 2.0343,4.535 4.5349,4.535 2.501,0 4.535,-2.034 4.535,-4.535 C 12.535,5.4994 10.501,3.4651 8,3.4651 z m 0,2.093 c 1.3479,0 2.4419,1.094 2.4419,2.4419 0,1.3479 -1.094,2.4419 -2.4419,2.4419 -1.3479,0 -2.4419,-1.0941 -2.4419,-2.442 C 5.5581,6.652 6.6521,5.558 8,5.558 z" /> + inkscape:connector-curvature="0" + style="fill:none;stroke:url(#linearGradient18426)" + d="M 8,4 C 5.7944,4 4,5.7944 4,8 c 0,2.206 1.7944,4 4,4 2.206,0 4,-1.794 4,-4 C 12,5.7944 10.206,4 8,4 z" /> + style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + transform="translate(60.836042,-28.859222)" + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18516-9);stroke:url(#linearGradient18518-4);stroke-width:0.99914002;stroke-linejoin:round" + d="m 707.55044,460.70882 h 13 v 15 h -13 v -15 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18520-5);stroke:url(#linearGradient18522-8);stroke-width:0.99914002;stroke-linejoin:round" + d="m 713.55044,466.70882 h 13 v 15 h -13 v -15 z" /> + inkscape:connector-curvature="0" + style="opacity:0.2;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:square" + d="m 715.55084,477.70842 h 7 m -7,-3 h 8 m -8,-3 h 5 m -5,-3 h 9 m -15,3 h 3 m -3,-3 h 3 m -3,-3 h 5 m -5,-3 h 9" /> + transform="matrix(-1,0,0,1,788.67933,437.2062)" + d="M 8.4802,-1.4936 2.5,4.9999 8.4802,11.494" + style="fill:none;stroke:url(#linearGradient3056-3);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + style="fill:none;stroke:url(#linearGradient3732);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + d="M 8.5111,-1.5245 2.5,4.9999 8.5112,11.524" + style="fill:none;stroke:url(#linearGradient4322-0);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + style="fill:none;stroke:url(#linearGradient4324);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + d="M 9.0423,10.543 6.5,8 C 5.5002,6.9998 6.5,6.5 8,6.5 h 10.5 c 3,0 2.5,-3 0,-3 h -10 c -1.5,0 -3,0 -2,-1.5 l 2.3356,-2.3382 c 1.5,-2 -0.5,-2.5 -1.5,-1.5 L 2,4 C 1.5,4.5 1.4724,5.3333 2,6 l 5.5423,6.0431 c 1,1 2.9997,2.54e-4 1.5,-1.5 z" + style="opacity:0.4;fill:none;stroke:url(#linearGradient3026);stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + d="m 6.5,2 2.4035,-2.1981 c 1.5,-2 -0.5,-2.5 -1.5,-1.5 L 2,4 C 1.5,4.5 1.4724,5.3333 2,6 l 4.7125,5.2812 c 1,1 2.9702,0.02922 1.5,-1.5 L 6.5,8.0002" + style="opacity:0.4;fill:none;stroke:url(#linearGradient4462-8);stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + style="opacity:0.23999999;fill:none;stroke:#f6daae;stroke-linecap:round;stroke-linejoin:round;enable-background:new" + inkscape:connector-curvature="0" /> + style="fill:#000000;fill-opacity:0;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + transform="translate(-5.3861648,-28.726212)" + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18516);stroke:url(#linearGradient18518);stroke-width:0.99914002;stroke-linejoin:round" + d="m 707.55044,460.70882 h 13 v 15 h -13 v -15 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient18520);stroke:url(#linearGradient18522);stroke-width:0.99914002;stroke-linejoin:round" + d="m 713.55044,466.70882 h 13 v 15 h -13 v -15 z" /> + inkscape:connector-curvature="0" + style="opacity:0.2;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:square" + d="m 715.55084,477.70842 h 7 m -7,-3 h 8 m -8,-3 h 5 m -5,-3 h 9 m -15,3 h 3 m -3,-3 h 3 m -3,-3 h 5 m -5,-3 h 9" /> + transform="translate(700.66938,437.48261)"> + style="fill:none;stroke:url(#linearGradient3732-9);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + d="M 8.4801887,-1.4935535 2.5,4.99993 8.4801887,11.493553" + inkscape:connector-curvature="0" /> + style="fill:none;stroke:url(#linearGradient4452-2);stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + inkscape:connector-curvature="0" /> + style="fill:none;stroke:url(#linearGradient4322-8);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + d="M 8.5110963,-1.5245386 2.5,4.99993 8.3036121,11.524354" + inkscape:connector-curvature="0" /> + style="fill:none;stroke:url(#linearGradient4324-9);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + inkscape:connector-curvature="0" /> + style="opacity:0.4;fill:none;stroke:url(#linearGradient3007-8);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + d="M 8.8347091,10.612303 6.5,8 C 5.5575961,6.9455453 6.5,6.5 8,6.5 l 10.5,0 c 3,0 2.5,-3 0,-3 l -10,0 c -1.5,0 -3,0 -2,-1.5 l 2.3355739,-2.54571541 c 1.5000001,-1.99999999 -0.5,-2.49999999 -1.5,-1.49999999 L 2,4 C 1.5,4.5 1.4724356,5.3333333 2,6 l 5.3347091,6.112303 c 1,1 2.9136049,0.08168 1.5,-1.5 z" + inkscape:connector-curvature="0" /> + style="opacity:0.4;fill:none;stroke:url(#linearGradient4462-81);stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + d="m 6.5,2 2.4034591,-2.54398585 c 1.4999999,-1.99999995 -0.5,-2.49999995 -1.5,-1.49999995 L 2,4 C 1.5,4.5 1.4724356,5.3333333 2,6 l 5.3351415,6.111439 c 1,1 2.9140115,0.08132 1.5,-1.5 L 6.5,8" + inkscape:connector-curvature="0" /> + style="opacity:0.41999996;fill:none;stroke:#f6daae;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline;enable-background:new" + d="M 7.1241352,-1.6267296 2,4" + inkscape:connector-curvature="0" /> + style="font-size:20px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + x="394.60934">Tree icons</tspan></text> + sodipodi:linespacing="125%" + style="font-size:12.76000023px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans" + sodipodi:role="line">%% tree_folder tree_file %%</tspan></text> + transform="translate(641.9507,260.10161)" + inkscape:connector-curvature="0" + style="fill:url(#linearGradient2517);stroke:url(#linearGradient2519);stroke-width:0.99992001;stroke-linejoin:round" + d="M 1.5,0.49997 H 9.9412 C 10.383,0.66176 12.88,2.63277 13.5,3.90907 v 11.591 h -12 v -15 z" /> + inkscape:connector-curvature="0" + style="opacity:0.6;fill:none;stroke:url(#linearGradient2511-6)" + d="m 12.5,4.2151 v 10.285 h -10 v -13 h 7.2363" /> + inkscape:connector-curvature="0" + style="fill:#c1c1c1;fill-rule:evenodd" + d="M 9.2941,0.8409 C 10.142,3.6448 9,5.0341 9,5.0341 c 0,0 1.893,-1.2514 4.171,-0.1023 1.943,0.9798 0.036,-1.008 -0.041,-1.129 C 12.587,2.9553 10.707,1.1697 10.025,0.8726 9.9696,0.84836 9.5814,0.8409 9.2941,0.8409 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient3039-3);fill-rule:evenodd" + d="m 9.2941,0.8409 c 0.9879,0 0.7059,3.181 0.7059,3.181 0,0 2.272,-0.5007 3.171,0.9099 0.163,0.2556 0.036,-1.008 -0.041,-1.129 C 12.587,2.9553 10.707,1.1697 10.025,0.8726 9.9696,0.84836 9.5814,0.8409 9.2941,0.8409 z" /> + transform="translate(681.24244,260.14902)" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + inkscape:connector-curvature="0" + style="fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" + d="m -40,0 0,16 16,0 0,-16 -16,0 z m 1,1 14,0 0,14 -14,0 0,-14 z" + id="path3806-1-6-1-9-8" + sodipodi:nodetypes="cccccccccc" + inkscape:label="#rect2160" /> + transform="translate(607.49098,259.77752)" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + inkscape:connector-curvature="0" + style="fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" + d="m -40,0 0,16 16,0 0,-16 -16,0 z m 1,1 14,0 0,14 -14,0 0,-14 z" + id="path3806-1-6-1-9-8-0" + sodipodi:nodetypes="cccccccccc" + inkscape:label="#rect2160" /> + transform="translate(567.4222,259.12098)" + transform="matrix(0.36395,0,0,0.34457,-0.64485,-0.38545)"> + transform="matrix(0.021652,0,0,0.014857,43.008,42.685)"> + style="opacity:0.40206;fill:url(#linearGradient2915-8)" + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient2917-0)" + d="m -219.62,-150.68 v 478.33 c 142.87,0.90045 345.4,-107.17 345.4,-239.2 0,-132.03 -159.44,-239.13 -345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="opacity:0.40206;fill:url(#radialGradient2919-7)" + d="m -1559.3,-150.68 v 478.33 c -142.87,0.90045 -345.4,-107.17 -345.4,-239.2 0,-132.03 159.44,-239.13 345.4,-239.13 z" /> + inkscape:connector-curvature="0" + style="fill:#ffffff;stroke:#a8a8a8;stroke-width:0.97899997;stroke-linecap:round;stroke-linejoin:round" + d="m 0.60164,1.5216 c -0.056258,0 -0.10449,0.060345 -0.10449,0.12267 0,4.6046 0.00337,8.6512 -6.554e-4,12.857 4.7063,-0.02397 9.4151,-0.04826 14.1230004,-0.06552 -0.41713,0 -1.1123,-0.07009 -1.1024,-0.94049 0.0035,-3.597 0.02296,-7.4084 0.01078,-10.981 H 7.4759746 c -0.47749,0 -1.0963,-0.99306 -1.5261,-0.99306 h -5.3477 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient2932-6);stroke:url(#linearGradient2934-0);stroke-width:0.95339;stroke-linecap:round;stroke-linejoin:round" + d="m 2.5254,4.524 c 0.65636,0 12.48,0.031393 12.989,0.031393 0,0.61541 -0.02468,9.9581 -0.05407,9.9581 -4.5588,0.01775 -11.659,-0.01389 -12.987,-0.01389 0,-1.1615 0.05188,-7.5853 0.05188,-9.9756 z" /> + inkscape:connector-curvature="0" + style="fill:url(#linearGradient2929-8);fill-rule:evenodd" + d="M 2.8355,4 C 2.37891,4 2.00106,4.44838 2.00106,4.9902 v 5.6331 c 0.00175,0.10077 0.044034,0.21567 0.11126,0.28606 0.067223,0.07039 0.15315,0.10008 0.25033,0.08802 0.00309,9.4e-5 0.00618,9.4e-5 0.00927,0 l 13.351,-2.5081 c 0.1548,-0.028972 0.27598,-0.18812 0.27815,-0.37407 v -3.1246 c 0,-0.54182 -0.37785,-0.9902 -0.83444,-0.9902 h -12.331 z" /> + inkscape:connector-curvature="0" + style="opacity:0.35;fill:none;stroke:#ffffff;stroke-width:1px" + d="M 3.499,14 V 5.5 h 11.5" /> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/util/FileManagementPanel.py Thu Jun 28 12:07:21 2012 +0200
@@ -0,0 +1,369 @@
+#This file is part of Beremiz, a Integrated Development Environment for +#programming IEC 61131-3 automates supporting plcopen standard and CanFestival. +#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 +from controls import EditorPanel +from utils.BitmapLibrary import GetBitmap +FILTER = _("All files (*.*)|*.*|CSV files (*.csv)|*.csv") + head, tail = os.path.split(path) + return splitpath(head) + [tail] +class FolderTree(wx.Panel): + def __init__(self, parent, folder, filter, editable=True): + wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL) + main_sizer = wx.BoxSizer(wx.VERTICAL) + self.Tree = wx.TreeCtrl(self, + style=wx.TR_HAS_BUTTONS| + self.Bind(wx.EVT_TREE_ITEM_EXPANDED, self.OnTreeItemExpanded, self.Tree) + self.Bind(wx.EVT_TREE_ITEM_COLLAPSED, self.OnTreeItemCollapsed, self.Tree) + self.Bind(wx.EVT_TREE_BEGIN_LABEL_EDIT, self.OnTreeBeginLabelEdit, self.Tree) + self.Bind(wx.EVT_TREE_END_LABEL_EDIT, self.OnTreeEndLabelEdit, self.Tree) + main_sizer.AddWindow(self.Tree, 1, flag=wx.GROW) + self.Filter = wx.ComboBox(self, style=wx.CB_READONLY) + self.Bind(wx.EVT_COMBOBOX, self.OnFilterChanged, self.Filter) + main_sizer.AddWindow(self.Filter, flag=wx.GROW) + self.SetSizer(main_sizer) + self.Editable = editable + self.TreeImageList = wx.ImageList(16, 16) + self.FOLDER_IMAGE = self.TreeImageList.Add(GetBitmap("tree_folder")) + self.FILE_IMAGE = self.TreeImageList.Add(GetBitmap("tree_file")) + self.Tree.SetImageList(self.TreeImageList) + filter_parts = filter.split("|") + for idx in xrange(0, len(filter_parts), 2): + if filter_parts[idx + 1] == "*.*": + self.Filters[filter_parts[idx]] = "" + self.Filters[filter_parts[idx]] = filter_parts[idx + 1].replace("*", "") + self.Filter.Append(filter_parts[idx]) + self.Filter.SetStringSelection(filter_parts[idx]) + self.CurrentFilter = self.Filters[self.Filter.GetStringSelection()] + def _GetFolderChildren(self, folderpath, recursive=True): + for filename in os.listdir(folderpath): + if not filename.startswith("."): + filepath = os.path.join(folderpath, filename) + if os.path.isdir(filepath): + children = len(self._GetFolderChildren(filepath, False)) + items.append((filename, True, children)) + elif (self.CurrentFilter == "" or + os.path.splitext(filename)[1] == self.CurrentFilter): + items.append((filename, False, None)) + items.sort(sort_folder) + root = self.Tree.GetRootItem() + root = self.Tree.AddRoot("") + self.GenerateTreeBranch(root, self.Folder) + def GenerateTreeBranch(self, root, folderpath): + item, item_cookie = self.Tree.GetFirstChild(root) + for idx, (filename, isdir, children) in enumerate(self._GetFolderChildren(folderpath)): + item = self.Tree.AppendItem(root, filename) + if wx.Platform != '__WXMSW__': + item, item_cookie = self.Tree.GetNextChild(root, item_cookie) + elif self.Tree.GetItemText(item) != filename: + item = self.Tree.InsertItemBefore(root, idx, filename) + filepath = os.path.join(folderpath, filename) + self.Tree.SetItemImage(item, self.FOLDER_IMAGE) + self.Tree.SetItemHasChildren(item) + elif self.Tree.IsExpanded(item): + self.GenerateTreeBranch(item, filepath) + self.Tree.SetItemImage(item, self.FILE_IMAGE) + item, item_cookie = self.Tree.GetNextChild(root, item_cookie) + item, item_cookie = self.Tree.GetNextChild(root, item_cookie) + def OnTreeItemExpanded(self, event): + self.GenerateTreeBranch(item, self.GetPath(item)) + def OnTreeItemCollapsed(self, event): + self.Tree.DeleteChildren(item) + self.Tree.SetItemHasChildren(item) + def OnTreeBeginLabelEdit(self, event): + if self.Editable and not self.Tree.ItemHasChildren(item): + def OnTreeEndLabelEdit(self, event): + def OnFilterChanged(self, event): + self.CurrentFilter = self.Filters[self.Filter.GetStringSelection()] + def _SelectItem(self, root, parts): + self.Tree.SelectItem(root) + item, item_cookie = self.Tree.GetFirstChild(root) + if self.Tree.GetItemText(item) == parts[0]: + if (self.Tree.ItemHasChildren(item) and + not self.Tree.IsExpanded(item)): + wx.CallAfter(self._SelectItem, item, parts[1:]) + self._SelectItem(item, parts[1:]) + item, item_cookie = self.Tree.GetNextChild(root, item_cookie) + def SetPath(self, path): + if path.startswith(self.Folder): + root = self.Tree.GetRootItem() + relative_path = path.replace(os.path.join(self.Folder, ""), "") + self._SelectItem(root, splitpath(relative_path)) + def GetPath(self, item=None): + item = self.Tree.GetSelection() + filepath = self.Tree.GetItemText(item) + parent = self.Tree.GetItemParent(item) + while parent.IsOk() and parent != self.Tree.GetRootItem(): + filepath = os.path.join(self.Tree.GetItemText(parent), filepath) + parent = self.Tree.GetItemParent(parent) + return os.path.join(self.Folder, filepath) +class FileManagementPanel(EditorPanel): + def _init_Editor(self, parent): + self.Editor = wx.Panel(parent) + main_sizer = wx.BoxSizer(wx.HORIZONTAL) + left_sizer = wx.BoxSizer(wx.VERTICAL) + main_sizer.AddSizer(left_sizer, 1, border=5, flag=wx.GROW|wx.ALL) + managed_dir_label = wx.StaticText(self.Editor, label=self.TagName + ":") + left_sizer.AddWindow(managed_dir_label, border=5, flag=wx.GROW|wx.BOTTOM) + self.ManagedDir = FolderTree(self.Editor, self.Folder, FILTER) + left_sizer.AddWindow(self.ManagedDir, 1, flag=wx.GROW) + managed_treectrl = self.ManagedDir.GetTreeCtrl() + self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnTreeItemChanged, managed_treectrl) + if self.EnableDragNDrop: + self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.OnTreeBeginDrag, managed_treectrl) + button_sizer = wx.BoxSizer(wx.VERTICAL) + main_sizer.AddSizer(button_sizer, border=5, + flag=wx.ALL|wx.ALIGN_CENTER_VERTICAL) + for idx, (name, bitmap, help) in enumerate([ + ("DeleteButton", "remove_element", _("Remove file from left folder")), + ("LeftCopyButton", "LeftCopy", _("Copy file from right folder to left")), + ("RightCopyButton", "RightCopy", _("copy file from left folder to right"))]): + button = wx.lib.buttons.GenBitmapButton(self.Editor, + bitmap=GetBitmap(bitmap), + size=wx.Size(28, 28), style=wx.NO_BORDER) + button.SetToolTipString(help) + setattr(self, name, button) + self.Bind(wx.EVT_BUTTON, getattr(self, "On" + name), button) + button_sizer.AddWindow(button, border=20, flag=flag) + right_sizer = wx.BoxSizer(wx.VERTICAL) + main_sizer.AddSizer(right_sizer, 1, border=5, flag=wx.GROW|wx.ALL) + if wx.Platform == '__WXMSW__': + system_dir_label = wx.StaticText(self.Editor, label=_("My Computer:")) + system_dir_label = wx.StaticText(self.Editor, label=_("Home Directory:")) + right_sizer.AddWindow(system_dir_label, border=5, flag=wx.GROW|wx.BOTTOM) + self.SystemDir = FolderTree(self.Editor, self.HomeDirectory, FILTER, False) + right_sizer.AddWindow(self.SystemDir, 1, flag=wx.GROW) + system_treectrl = self.SystemDir.GetTreeCtrl() + self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnTreeItemChanged, system_treectrl) + self.Editor.SetSizer(main_sizer) + def __init__(self, parent, controler, name, folder, enable_dragndrop=False): + self.Folder = os.path.realpath(folder) + self.EnableDragNDrop = enable_dragndrop + self.HomeDirectory = os.path.expanduser("~") + EditorPanel.__init__(self, parent, name, None, None) + self.Controler = controler + self.SetIcon(GetBitmap("FOLDER")) + self.Controler.OnCloseEditor(self) + self.ManagedDir.RefreshTree() + self.SystemDir.RefreshTree() + self.RefreshButtonsState() + def RefreshButtonsState(self): + managed_filepath = self.ManagedDir.GetPath() + system_filepath = self.SystemDir.GetPath() + self.DeleteButton.Enable(os.path.isfile(managed_filepath)) + self.LeftCopyButton.Enable(os.path.isfile(system_filepath)) + self.RightCopyButton.Enable(os.path.isfile(managed_filepath)) + def OnTreeItemChanged(self, event): + self.RefreshButtonsState() + def OnDeleteButton(self, event): + filepath = self.ManagedDir.GetPath() + if os.path.isfile(filepath): + folder, filename = os.path.split(filepath) + dialog = wx.MessageDialog(self, + _("Do you really want to delete the file '%s'?") % filename, + _("Delete File"), wx.YES_NO|wx.ICON_QUESTION) + remove = dialog.ShowModal() == wx.ID_YES + self.ManagedDir.RefreshTree() + def CopyFile(self, src, dst): + if os.path.isfile(src): + src_folder, src_filename = os.path.split(src) + if os.path.isfile(dst): + dst_folder, dst_filename = os.path.split(dst) + dst_filepath = os.path.join(dst_folder, src_filename) + if os.path.isfile(dst_filepath): + dialog = wx.MessageDialog(self, + _("The file '%s' already exist.\nDo you want to replace it?") % src_filename, + _("Replace File"), wx.YES_NO|wx.ICON_QUESTION) + copy = dialog.ShowModal() == wx.ID_YES + shutil.copyfile(src, dst_filepath) + def OnLeftCopyButton(self, event): + filepath = self.CopyFile(self.SystemDir.GetPath(), self.ManagedDir.GetPath()) + if filepath is not None: + self.ManagedDir.RefreshTree() + self.ManagedDir.SetPath(filepath) + def OnRightCopyButton(self, event): + filepath = self.CopyFile(self.ManagedDir.GetPath(), self.SystemDir.GetPath()) + if filepath is not None: + self.SystemDir.RefreshTree() + self.SystemDir.SetPath(filepath) + def OnTreeBeginDrag(self, event): + filepath = self.ManagedDir.GetPath() + if os.path.isfile(filepath): + relative_filepath = filepath.replace(os.path.join(self.Folder, ""), "") + data = wx.TextDataObject(str(("'%s'" % relative_filepath, "Constant"))) + dragSource = wx.DropSource(self) + dragSource.SetData(data) + dragSource.DoDragDrop() \ No newline at end of file