# HG changeset patch
# User Edouard Tisserant
# Date 1542373491 -3600
# Node ID 8689ce77076f49b7445ff7e320490f1bbfd703a6
# Parent 869a61616b4247e0a21ee53117653f609cfce9eb
Added toolbar button to launch ID Manager dialog.
diff -r 869a61616b42 -r 8689ce77076f ProjectController.py
--- a/ProjectController.py Fri Nov 16 10:00:06 2018 +0100
+++ b/ProjectController.py Fri Nov 16 14:04:51 2018 +0100
@@ -55,7 +55,7 @@
from editors.ProjectNodeEditor import ProjectNodeEditor
from editors.IECCodeViewer import IECCodeViewer
from editors.DebugViewer import DebugViewer, REFRESH_PERIOD
-from dialogs import UriEditor
+from dialogs import UriEditor, IDManager
from PLCControler import PLCControler
from plcopen.structures import IEC_KEYWORDS
from plcopen.types_enums import ComputeConfigurationResourceName, ITEM_CONFNODE
@@ -1259,6 +1259,11 @@
_IECCodeView = None
+ def _showIDManager(self):
+ dlg = IDManager(self.AppFrame, self)
+ dlg.ShowModal()
+ dlg.Destroy()
+
def _showIECcode(self):
self._OpenView("IEC code")
@@ -1950,6 +1955,12 @@
"shown": False,
},
{
+ "bitmap": "IDManager",
+ "name": _("ID Manager"),
+ "tooltip": _("Manage secure connection identities"),
+ "method": "_showIDManager",
+ },
+ {
"bitmap": "ShowIECcode",
"name": _("Show code"),
"tooltip": _("Show IEC code generated by PLCGenerator"),
diff -r 869a61616b42 -r 8689ce77076f dialogs/IDManager.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dialogs/IDManager.py Fri Nov 16 14:04:51 2018 +0100
@@ -0,0 +1,18 @@
+from __future__ import absolute_import
+
+import wx
+from connectors import ConnectorSchemes, EditorClassFromScheme
+from controls.DiscoveryPanel import DiscoveryPanel
+from controls.IDBrowser import IDBrowser
+
+class IDManager(wx.Dialog):
+ def __init__(self, parent, ctr):
+ self.ctr = ctr
+ wx.Dialog.__init__(self,
+ name='IDManager', parent=parent,
+ title=_('URI Editor'),
+ style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
+ # start IDBrowser in manager mode
+ self.browser = IDBrowser(self, ctr)
+
+
diff -r 869a61616b42 -r 8689ce77076f dialogs/__init__.py
--- a/dialogs/__init__.py Fri Nov 16 10:00:06 2018 +0100
+++ b/dialogs/__init__.py Fri Nov 16 14:04:51 2018 +0100
@@ -49,3 +49,5 @@
from dialogs.FindInPouDialog import FindInPouDialog
from dialogs.BrowseValuesLibraryDialog import BrowseValuesLibraryDialog
from dialogs.UriEditor import UriEditor
+from dialogs.IDManager import IDManager
+
diff -r 869a61616b42 -r 8689ce77076f images/IDManager.png
Binary file images/IDManager.png has changed
diff -r 869a61616b42 -r 8689ce77076f images/icons.svg
--- a/images/icons.svg Fri Nov 16 10:00:06 2018 +0100
+++ b/images/icons.svg Fri Nov 16 14:04:51 2018 +0100
@@ -15,7 +15,7 @@
height="1052.3622"
id="svg2"
sodipodi:version="0.32"
- inkscape:version="0.92.3 (2405546, 2018-03-11)"
+ inkscape:version="0.91 r13725"
sodipodi:docname="icons.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
%% editIECrawcode editWXGLADE editPYTHONcode EditCfile Transfer Connect Disconnect Debug %%
+ style="font-size:12.76095104px;line-height:1.25">%% editIECrawcode editWXGLADE editPYTHONcode EditCfile Transfer Connect Disconnect Debug IDManager %%
%% fullscreen %%
+
+
+
+
+
+