--- a/c_ext/c_ext.py Mon Aug 14 22:23:17 2017 +0300
+++ b/c_ext/c_ext.py Mon Aug 14 22:30:41 2017 +0300
@@ -47,13 +47,13 @@
return os.path.join(self.CTNPath(), "cfile.xml")
def CTNGenerate_C(self, buildpath, locations):
@@ -70,17 +70,17 @@
current_location = self.GetCurrentLocation()
# define a unique name for the generated C file
location_str = "_".join(map(str, current_location))
text = "/* Code generated by Beremiz c_ext confnode */\n\n"
text += "#include <stdio.h>\n\n"
text += "/* User includes */\n"
text += self.CodeFile.includes.getanyText().strip()
text += '#include "iec_types_all.h"\n\n'
config = self.GetCTRoot().GetProjectConfigNames()[0]
text += "/* User variables reference */\n"
@@ -93,36 +93,35 @@
text += "extern %(type)s %(global)s;\n" % var_infos
text += "#define %(name)s %(global)s.value\n" % var_infos
# Adding user global variables and routines
text += "/* User internal user variables and routines */\n"
text += self.CodeFile.globals.getanyText().strip()
# Adding Beremiz confnode functions
text += "/* Beremiz confnode functions */\n"
text += "int __init_%s(int argc,char **argv)\n{\n" % location_str
text += self.CodeFile.initFunction.getanyText().strip()
text += " return 0;\n}\n\n"
text += "void __cleanup_%s(void)\n{\n" % location_str
text += self.CodeFile.cleanUpFunction.getanyText().strip()
text += "void __retrieve_%s(void)\n{\n" % location_str
text += self.CodeFile.retrieveFunction.getanyText().strip()
text += "void __publish_%s(void)\n{\n" % location_str
text += self.CodeFile.publishFunction.getanyText().strip()
Gen_Cfile_path = os.path.join(buildpath, "CFile_%s.c" % location_str)
cfile = open(Gen_Cfile_path,'w')
matiec_CFLAGS = '"-I%s"' % os.path.abspath(self.GetCTRoot().GetIECLibPath())
return [(Gen_Cfile_path, str(self.CExtension.getCFLAGS() + matiec_CFLAGS))],str(self.CExtension.getLDFLAGS()),True
--- a/controls/CustomEditableListBox.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/CustomEditableListBox.py Mon Aug 14 22:30:41 2017 +0300
@@ -26,15 +26,15 @@
class CustomEditableListBox(wx.gizmos.EditableListBox):
def __init__(self, *args, **kwargs):
wx.gizmos.EditableListBox.__init__(self, *args, **kwargs)
listbox = self.GetListCtrl()
listbox.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
listbox.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnLabelBeginEdit)
listbox.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnLabelEndEdit)
for button, tooltip, call_function in [
(self.GetEditButton(), _("Edit item"), "_OnEditButton"),
(self.GetNewButton(), _("New item"), "_OnNewButton"),
@@ -43,13 +43,13 @@
(self.GetDownButton(), _("Move down"), "_OnDownButton")]:
button.SetToolTipString(tooltip)
button.Bind(wx.EVT_BUTTON, self.GetButtonPressedFunction(call_function))
def EnsureCurrentItemVisible(self):
listctrl = self.GetListCtrl()
listctrl.EnsureVisible(listctrl.GetFocusedItem())
def OnLabelBeginEdit(self, event):
func = getattr(self, "_OnLabelBeginEdit", None)
@@ -57,7 +57,7 @@
def OnLabelEndEdit(self, event):
func = getattr(self, "_OnLabelEndEdit", None)
@@ -65,7 +65,7 @@
def GetButtonPressedFunction(self, call_function):
def OnButtonPressed(event):
if wx.Platform != '__WXMSW__' or not self.Editing:
@@ -77,7 +77,7 @@
wx.CallAfter(self.EnsureCurrentItemVisible)
def OnKeyDown(self, event):
keycode = event.GetKeyCode()
--- a/controls/CustomGrid.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/CustomGrid.py Mon Aug 14 22:30:41 2017 +0300
@@ -26,45 +26,45 @@
class CustomGrid(wx.grid.Grid):
def __init__(self, *args, **kwargs):
wx.grid.Grid.__init__(self, *args, **kwargs)
self.SetFont(wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
self.SetLabelFont(wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.NORMAL, False, 'Sans'))
self.SetSelectionBackground(wx.WHITE)
self.SetSelectionForeground(wx.BLACK)
self.DisableDragRowSize()
self.Bind(wx.grid.EVT_GRID_SELECT_CELL, self.OnSelectCell)
self.Bind(wx.grid.EVT_GRID_EDITOR_HIDDEN, self.OnEditorHidden)
self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
wx.grid.Grid.SetFocus(self)
def SetDefaultValue(self, default_value):
self.DefaultValue = default_value
def SetEditable(self, editable=True):
def SetButtons(self, buttons):
for name in ["Add", "Delete", "Up", "Down"]:
button = buttons.get(name, None)
setattr(self, "%sButton" % name, button)
button.Bind(wx.EVT_BUTTON, getattr(self, "On%sButton" % name))
def RefreshButtons(self):
rows = self.Table.GetNumberRows()
@@ -77,7 +77,7 @@
self.UpButton.Enable(self.Editable and row > 0)
if self.DownButton is not None:
self.DownButton.Enable(self.Editable and 0 <= row < rows - 1)
def CloseEditControl(self):
row, col = self.GetGridCursorRow(), self.GetGridCursorCol()
if row != -1 and col != -1:
@@ -119,27 +119,27 @@
self.Table.ResetView(self)
self.SetSelectedCell(new_row, col)
def SetSelectedCell(self, row, col):
self.SetGridCursor(row, col)
self.MakeCellVisible(row, col)
def OnAddButton(self, event):
def OnDeleteButton(self, event):
def OnUpButton(self, event):
self.MoveRow(self.GetGridCursorRow(), -1)
def OnDownButton(self, event):
self.MoveRow(self.GetGridCursorRow(), 1)
--- a/controls/CustomStyledTextCtrl.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/CustomStyledTextCtrl.py Mon Aug 14 22:30:41 2017 +0300
@@ -82,12 +82,12 @@
class CustomStyledTextCtrl(wx.stc.StyledTextCtrl):
def __init__(self, *args, **kwargs):
wx.stc.StyledTextCtrl.__init__(self, *args, **kwargs)
self.Bind(wx.EVT_MOTION, self.OnMotion)
def OnMotion(self, event):
if wx.Platform == '__WXMSW__':
--- a/controls/CustomTable.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/CustomTable.py Mon Aug 14 22:30:41 2017 +0300
@@ -31,7 +31,7 @@
class CustomTable(wx.grid.PyGridTableBase):
A custom wx.grid.Grid Table using user supplied data
@@ -47,10 +47,10 @@
# see if the table has changed size
self._rows = self.GetNumberRows()
self._cols = self.GetNumberCols()
return len(self.colnames)
@@ -66,11 +66,11 @@
def GetValue(self, row, col):
if row < self.GetNumberRows():
return self.data[row].get(self.GetColLabelValue(col, False), "")
def SetValue(self, row, col, value):
if col < len(self.colnames):
self.data[row][self.GetColLabelValue(col, False)] = value
def GetValueByName(self, row, colname):
if row < self.GetNumberRows():
return self.data[row].get(colname)
@@ -125,33 +125,33 @@
row_highlights = self.Highlights.get(row, {})
for col in range(self.GetNumberCols()):
colname = self.GetColLabelValue(col, False)
grid.SetReadOnly(row, col, True)
grid.SetCellEditor(row, col, None)
grid.SetCellRenderer(row, col, None)
highlight_colours = row_highlights.get(colname.lower(), [(wx.WHITE, wx.BLACK)])[-1]
grid.SetCellBackgroundColour(row, col, highlight_colours[0])
grid.SetCellTextColour(row, col, highlight_colours[1])
self.ResizeRow(grid, row)
def ResizeRow(self, grid, row):
if grid.GetRowSize(row) < ROW_HEIGHT:
grid.SetRowMinimalHeight(row, ROW_HEIGHT)
grid.AutoSizeRow(row, False)
def GetCurrentIndex(self):
def SetCurrentIndex(self, index):
self.CurrentIndex = index
def AppendRow(self, row_content):
self.data.append(row_content)
--- a/controls/LogViewer.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/LogViewer.py Mon Aug 14 22:30:41 2017 +0300
@@ -403,7 +403,7 @@
def ResetLogCounters(self):
self.previous_log_count = [None]*LogLevelsCount
def SetLogCounters(self, log_count):
for level, count, prev in zip(xrange(LogLevelsCount), log_count, self.previous_log_count):
@@ -559,7 +559,7 @@
def IsMessagePanelTop(self, message_idx=None):
message_idx = self.CurrentMessage
--- a/controls/TextCtrlAutoComplete.py Mon Aug 14 22:23:17 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py Mon Aug 14 22:30:41 2017 +0300
@@ -35,28 +35,28 @@
LISTBOX_INTERVAL_HEIGHT = 6
class PopupWithListbox(wx.PopupWindow):
def __init__(self, parent, choices=[]):
wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)
self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL|wx.LB_SINGLE|wx.LB_SORT)
self.ListBox.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
self.ListBox.Bind(wx.EVT_MOTION, self.OnMotion)
def SetChoices(self, choices):
self.ListBox.Append(choice)
w, h = self.ListBox.GetTextExtent(choice)
max_text_width = max(max_text_width, w)
max_text_height = max(max_text_height, h)
itemcount = min(len(choices), MAX_ITEM_SHOWN)
width = self.Parent.GetSize()[0]
height = max_text_height * itemcount + \
@@ -69,7 +69,7 @@
self.ListBox.SetSize(size)
def MoveSelection(self, direction):
selected = self.ListBox.GetSelection()
if selected == wx.NOT_FOUND:
@@ -82,10 +82,10 @@
if selected == self.ListBox.GetCount():
self.ListBox.SetSelection(selected)
return self.ListBox.GetStringSelection()
def OnLeftDown(self, event):
selected = self.ListBox.HitTest(wx.Point(event.GetX(), event.GetY()))
parent_size = self.Parent.GetSize()
@@ -99,12 +99,12 @@
wx.CallAfter(self.Parent.DismissListBox)
def OnMotion(self, event):
self.ListBox.SetSelection(
self.ListBox.HitTest(wx.Point(event.GetX(), event.GetY())))
class TextCtrlAutoComplete(wx.TextCtrl):
def __init__ (self, parent, choices=None, dropDownClick=True,
@@ -118,17 +118,17 @@
therest['style'] = wx.TE_PROCESS_ENTER | therest.get('style', 0)
wx.TextCtrl.__init__(self, parent, **therest)
self._dropDownClick = dropDownClick
self._lastinsertionpoint = None
self._screenheight = wx.SystemSettings.GetMetric(wx.SYS_SCREEN_Y)
self.element_path = element_path
@@ -201,14 +201,14 @@
def SetChoices(self, choices):
self.RefreshListBoxChoices()
def SetValueFromSelected(self, selected):
Sets the wx.TextCtrl value from the selected wx.ListCtrl item.
@@ -217,7 +217,7 @@
def RefreshListBoxChoices(self):
if self.listbox is not None:
@@ -227,7 +227,7 @@
self.listbox = PopupWithListbox(self)
# Show the popup right below or above the button
# depending on available screen space...
pos = self.ClientToScreen((0, 0))
@@ -236,9 +236,9 @@
self.listbox.Position(pos, (0, sz[1]))
self.RefreshListBoxChoices()
def DismissListBox(self):
--- a/docutil/dochtml.py Mon Aug 14 22:23:17 2017 +0300
+++ b/docutil/dochtml.py Mon Aug 14 22:30:41 2017 +0300
@@ -46,7 +46,7 @@
wx.PyEvent.__init__(self)
self.SetEventType(EVT_HTML_URL_CLICK)
self.linkinfo = (linkinfo.GetHref(), linkinfo.GetTarget())
class UrlClickHtmlWindow(wx.html.HtmlWindow):
""" HTML window that generates and OnLinkClicked event.
@@ -54,7 +54,7 @@
def OnLinkClicked(self, linkinfo):
wx.PostEvent(self, HtmlWindowUrlClick(linkinfo))
def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
if event == HtmlWindowUrlClick:
self.Connect(-1, -1, EVT_HTML_URL_CLICK, handler)
@@ -68,7 +68,7 @@
style=wx.DEFAULT_FRAME_STYLE, title='')
self.Bind(wx.EVT_CLOSE, self.OnCloseFrame)
self.HtmlContent = UrlClickHtmlWindow(id=ID_HTMLFRAMEHTMLCONTENT,
name='HtmlContent', parent=self, pos=wx.Point(0, 0),
size=wx.Size(-1, -1), style=wx.html.HW_SCROLLBAR_AUTO|wx.html.HW_NO_SELECTION)
@@ -77,17 +77,17 @@
def __init__(self, parent, opened):
self.HtmlFrameOpened = opened
def SetHtmlCode(self, htmlcode):
self.HtmlContent.SetPage(htmlcode)
def SetHtmlPage(self, htmlpage):
self.HtmlContent.LoadPage(htmlpage)
def OnCloseFrame(self, event):
self.HtmlFrameOpened.remove(self.GetTitle())
def OnLinkClick(self, event):
--- a/editors/DataTypeEditor.py Mon Aug 14 22:23:17 2017 +0300
+++ b/editors/DataTypeEditor.py Mon Aug 14 22:30:41 2017 +0300
@@ -74,7 +74,7 @@
colname = self.GetColLabelValue(col, False)
value = self.data[row].get(colname, "")
if colname == "Type" and isinstance(value, TupleType):
return "ARRAY [%s] OF %s" % (",".join(map(lambda x : "..".join(x), value[2])), value[1])
@@ -574,7 +574,7 @@
dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
def OnStructureElementsGridCellChange(self, event):
row, col = event.GetRow(), event.GetCol()
colname = self.StructureElementsTable.GetColLabelValue(col, False)
@@ -812,4 +812,3 @@
listctrl.SetItemBackgroundColour(infos[1], highlight_type[0])
listctrl.SetItemTextColour(infos[1], highlight_type[1])
listctrl.Select(listctrl.FocusedItem, False)
--- a/editors/EditorPanel.py Mon Aug 14 22:23:17 2017 +0300
+++ b/editors/EditorPanel.py Mon Aug 14 22:30:41 2017 +0300
@@ -27,66 +27,66 @@
from controls import VariablePanel
class EditorPanel(wx.SplitterWindow):
VARIABLE_PANEL_TYPE = None
def _init_Editor(self, prnt):
def _init_MenuItems(self):
def _init_ctrls(self, parent):
wx.SplitterWindow.__init__(self, parent,
style=wx.SUNKEN_BORDER|wx.SP_3D)
self.SetMinimumPaneSize(1)
if self.VARIABLE_PANEL_TYPE is not None:
self.VariableEditor = VariablePanel(self, self, self.Controler, self.VARIABLE_PANEL_TYPE, self.Debug)
self.VariableEditor.SetTagName(self.TagName)
self.VariableEditor = None
if self.Editor is not None and self.VariableEditor is not None:
self.SplitHorizontally(self.VariableEditor, self.Editor, 200)
elif self.VariableEditor is not None:
self.Initialize(self.VariableEditor)
elif self.Editor is not None:
self.Initialize(self.Editor)
def __init__(self, parent, tagname, window, controler, debug=False):
self.ParentWindow = window
self.Controler = controler
def SetTagName(self, tagname):
if self.VARIABLE_PANEL_TYPE is not None:
self.VariableEditor.SetTagName(tagname)
self.ParentWindow.EditProjectElement(None, self.GetTagName(), True)
return ".".join(self.TagName.split("::")[1:])
def IsViewing(self, tagname):
return self.GetTagName() == tagname
@@ -98,54 +98,54 @@
def CheckSaveBeforeClosing(self):
def GetBufferState(self):
if self.Controler is not None:
return self.Controler.GetBufferState()
if self.Controler is not None:
self.Controler.LoadPrevious()
if self.Controler is not None:
self.Controler.LoadNext()
def Find(self, direction, search_params):
def RefreshView(self, variablepanel=True):
self.RefreshVariablePanel()
def RefreshVariablePanel(self):
if self.VariableEditor is not None:
self.VariableEditor.RefreshView()
def GetConfNodeMenuItems(self):
def RefreshConfNodeMenu(self, confnode_menu):
def _Refresh(self, *args):
self.ParentWindow._Refresh(*args)
@@ -159,7 +159,7 @@
def RemoveHighlight(self, infos, start, end, highlight_type):
if self.VariableEditor is not None and infos[0] in ["var_local", "var_input", "var_output", "var_inout"]:
self.VariableEditor.RemoveVariableHighlight(infos[1:], highlight_type)
def ClearHighlights(self, highlight_type=None):
if self.VariableEditor is not None:
self.VariableEditor.ClearHighlights(highlight_type)
--- a/editors/IECCodeViewer.py Mon Aug 14 22:23:17 2017 +0300
+++ b/editors/IECCodeViewer.py Mon Aug 14 22:30:41 2017 +0300
@@ -26,15 +26,15 @@
from plcopen.plcopen import TestTextElement
class IECCodeViewer(TextViewer):
if getattr(self, "_OnClose"):
if self.Controler is not None:
def Search(self, criteria):
return [((self.TagName, "body", 0),) + result for result in TestTextElement(self.Editor.GetText(), criteria)]
--- a/editors/ProjectNodeEditor.py Mon Aug 14 22:23:17 2017 +0300
+++ b/editors/ProjectNodeEditor.py Mon Aug 14 22:30:41 2017 +0300
@@ -29,53 +29,53 @@
from ConfTreeNodeEditor import ConfTreeNodeEditor
class ProjectNodeEditor(ConfTreeNodeEditor):
(_("Config variables"), "_create_VariablePanel"),
(_("Project properties"), "_create_ProjectPropertiesPanel")]
def _create_VariablePanel(self, prnt):
self.VariableEditorPanel = VariablePanel(prnt, self, self.Controler, "config", self.Debug)
self.VariableEditorPanel.SetTagName(self.TagName)
return self.VariableEditorPanel
def _create_ProjectPropertiesPanel(self, prnt):
self.ProjectProperties = ProjectPropertiesPanel(prnt, self.Controler, self.ParentWindow, self.ENABLE_REQUIRED)
return self.ProjectProperties
def __init__(self, parent, controler, window):
configuration = controler.GetProjectMainConfigurationName()
if configuration is not None:
tagname = controler.ComputeConfigurationName(configuration)
ConfTreeNodeEditor.__init__(self, parent, controler, window, tagname)
buttons_sizer = self.GenerateMethodButtonSizer()
self.MainSizer.InsertSizer(0, buttons_sizer, 0, border=5, flag=wx.ALL)
self.VariableEditor = self.VariableEditorPanel
return self.Controler.CTNName()
def SetTagName(self, tagname):
if self.VariableEditor is not None:
self.VariableEditor.SetTagName(tagname)
fullname = _(self.Controler.CTNName())
if self.Controler.CTNTestModified():
def RefreshView(self, variablepanel=True):
ConfTreeNodeEditor.RefreshView(self)
self.VariableEditorPanel.RefreshView()
@@ -83,12 +83,11 @@
def GetBufferState(self):
return self.Controler.GetBufferState()
self.Controler.LoadPrevious()
self.ParentWindow.CloseTabsWithoutModel()
self.Controler.LoadNext()
self.ParentWindow.CloseTabsWithoutModel()
--- a/targets/toolchain_gcc.py Mon Aug 14 22:23:17 2017 +0300
+++ b/targets/toolchain_gcc.py Mon Aug 14 22:30:41 2017 +0300
@@ -41,7 +41,7 @@
self.CTRInstance = CTRInstance
self.SetBuildPath(self.CTRInstance._getBuildPath())
def getBuilderCFLAGS(self):
Returns list of builder specific CFLAGS
@@ -60,19 +60,19 @@
return self.CTRInstance.GetTarget().getcontent().getCompiler()
return self.CTRInstance.GetTarget().getcontent().getLinker()
return open(self.exe_path, "rb").read()
def _GetMD5FileName(self):
return os.path.join(self.buildpath, "lastbuildPLC.md5")
@@ -82,7 +82,7 @@
os.remove(self._GetMD5FileName())
def GetBinaryCodeMD5(self):
if self.md5key is not None:
@@ -91,7 +91,7 @@
return open(self._GetMD5FileName(), "r").read()
def SetBuildPath(self, buildpath):
if self.buildpath != buildpath:
self.buildpath = buildpath
@@ -99,7 +99,7 @@
self.exe_path = os.path.join(self.buildpath, self.exe)
def append_cfile_deps(self, src, deps):
for l in src.splitlines():
res = includes_re.match(l)
@@ -107,7 +107,7 @@
if os.path.exists(os.path.join(self.buildpath, depfn)):
def concat_deps(self, bn):
src = open(os.path.join(self.buildpath, bn),"r").read()
@@ -117,7 +117,7 @@
# TODO detect cicular deps.
return reduce(operator.concat, map(self.concat_deps, deps), src)
def check_and_update_hash_and_deps(self, bn):
# Get latest computed hash and deps
oldhash, deps = self.srcmd5.get(bn,(None,[]))
@@ -137,7 +137,7 @@
# TODO detect cicular deps.
return reduce(operator.and_, map(self.check_and_update_hash_and_deps, deps), match)
def calc_source_md5(self):
for Location, CFilesAndCFLAGS, DoCalls in self.CTRInstance.LocationCFilesAndCFLAGS:
@@ -146,10 +146,10 @@
CFileName = os.path.basename(CFile)
wholesrcdata += self.concat_deps(CFileName)
return hashlib.md5(wholesrcdata).hexdigest()
return hashlib.md5(self.GetBinaryCode()).hexdigest()
# Retrieve compiler and linker
self.compiler = self.getCompiler()
@@ -167,7 +167,7 @@
self.CTRInstance.logger.write(".".join(map(str,Location))+" :\n")
self.CTRInstance.logger.write(_("PLC :\n"))
for CFile, CFLAGS in CFilesAndCFLAGS:
bn = os.path.basename(CFile)
@@ -175,14 +175,14 @@
objectfilename = os.path.splitext(CFile)[0]+".o"
match = self.check_and_update_hash_and_deps(bn)
self.CTRInstance.logger.write(" [pass] "+bn+" -> "+obn+"\n")
self.CTRInstance.logger.write(" [CC] "+bn+" -> "+obn+"\n")
status, result, err_result = ProcessLogger(
"\"%s\" -c \"%s\" -o \"%s\" %s %s"%
@@ -204,14 +204,14 @@
self.CTRInstance.logger.write(_("Linking :\n"))
listobjstring = '"' + '" "'.join(objs) + '"'
ALLldflags = ' '.join(self.getBuilderLDFLAGS())
self.CTRInstance.logger.write(" [CC] " + ' '.join(obns)+" -> " + self.exe + "\n")
status, result, err_result = ProcessLogger(
"\"%s\" %s -o \"%s\" %s"%
@@ -220,13 +220,13 @@
self.CTRInstance.logger.write(" [pass] " + ' '.join(obns)+" -> " + self.exe + "\n")
# Calculate md5 key and get data for the new created PLC
self.md5key = self.calc_md5()
@@ -234,6 +234,5 @@
f = open(self._GetMD5FileName(), "w")
--- a/util/BitmapLibrary.py Mon Aug 14 22:23:17 2017 +0300
+++ b/util/BitmapLibrary.py Mon Aug 14 22:30:41 2017 +0300
@@ -47,24 +47,24 @@
if os.path.isfile(bmp_path):
return wx.Bitmap(bmp_path)
def GetBitmap(bmp_name1, bmp_name2=None, size=None):
bmp = BitmapLibrary.get((bmp_name1, bmp_name2, size))
bmp = SearchBitmap(bmp_name1)
bmp1 = SearchBitmap(bmp_name1)
bmp2 = SearchBitmap(bmp_name2)
if bmp1 is not None and bmp2 is not None:
width = bmp1.GetWidth() + bmp2.GetWidth() - 1
height = max(bmp1.GetHeight(), bmp2.GetHeight())
# Create bitmap with both icons
bmp = wx.EmptyBitmap(width, height)
@@ -73,13 +73,13 @@
dc.DrawBitmap(bmp1, 0, 0)
dc.DrawBitmap(bmp2, bmp1.GetWidth() - 1, 0)
BitmapLibrary[(bmp_name1, bmp_name2, size)] = bmp
--- a/util/MiniTextControler.py Mon Aug 14 22:23:17 2017 +0300
+++ b/util/MiniTextControler.py Mon Aug 14 22:30:41 2017 +0300
@@ -29,22 +29,22 @@
def __init__(self, filepath, controller):
self.BaseController = controller
self.BaseController = None
def SetEditedElementText(self, tagname, text):
file = open(self.FilePath, "w")
def GetEditedElementText(self, tagname, debug = False):
if os.path.isfile(self.FilePath):
file = open(self.FilePath, "r")
@@ -52,25 +52,25 @@
def GetEditedElementInterfaceVars(self, tagname, tree=False, debug = False):
def GetEditedElementType(self, tagname, debug = False):
def GetBlockType(self, type, inputs = None, debug = False):
return self.BaseController.GetBlockType(type, inputs, debug)
def GetBlockTypes(self, tagname = "", debug = False):
return self.BaseController.GetBlockTypes(tagname, debug)
def GetDataTypes(self, tagname = "", basetypes = True, only_locatables = False, debug = False):
return self.BaseController.GetDataTypes(tagname, basetypes, only_locatables, debug)
def GetEnumeratedDataValues(self, debug = False):
return self.BaseController.GetEnumeratedDataValues(debug)
def StartBuffering(self):
@@ -79,4 +79,3 @@
--- a/version.py Mon Aug 14 22:23:17 2017 +0300
+++ b/version.py Mon Aug 14 22:30:41 2017 +0300
@@ -52,7 +52,7 @@
# if this is not mercurial repository
# try to read revision from file
@@ -69,17 +69,17 @@
info.Version = app_version
info.Copyright = "(C) 2016 Andrey Skvortsov\n"
info.Copyright += "(C) 2008-2015 Eduard Tisserant\n"
info.Copyright += "(C) 2008-2015 Laurent Bessard"
info.WebSite = ("http://beremiz.org", "beremiz.org")
info.Description = _("Open Source framework for automation, "
"implemented IEC 61131 IDE with constantly growing set of extensions "
"and flexible PLC runtime.")
info.Developers = ("Andrey Skvortsov <andrej.skvortzov@gmail.com>",
"Sergey Surkov <surkov.sv@summatechnology.ru>",
"Edouard Tisserant <edouard.tisserant@gmail.com>",
@@ -124,6 +124,3 @@
app_version = app_version + "-" + rev.rstrip()