108 updateinfoThread.start() |
108 updateinfoThread.start() |
109 updateinfoThread.join(2) |
109 updateinfoThread.join(2) |
110 splash.SetText(text=updateinfo) |
110 splash.SetText(text=updateinfo) |
111 wx.Yield() |
111 wx.Yield() |
112 |
112 |
113 from util.TranslationCatalogs import AddCatalog |
113 from util.misc import InstallLocalRessources |
114 from util.BitmapLibrary import AddBitmapFolder, GetBitmap |
114 InstallLocalRessources(CWD) |
115 |
115 |
116 AddCatalog(os.path.join(CWD, "locale")) |
|
117 AddBitmapFolder(os.path.join(CWD, "images")) |
|
118 |
|
119 if __name__ == '__main__': |
|
120 # Import module for internationalization |
|
121 import gettext |
|
122 |
|
123 __builtin__.__dict__['_'] = wx.GetTranslation |
|
124 |
|
125 # Load extensions |
116 # Load extensions |
126 for extfilename in extensions: |
117 for extfilename in extensions: |
127 extension_folder = os.path.split(os.path.realpath(extfilename))[0] |
118 extension_folder = os.path.split(os.path.realpath(extfilename))[0] |
128 sys.path.append(extension_folder) |
119 sys.path.append(extension_folder) |
129 AddCatalog(os.path.join(extension_folder, "locale")) |
120 AddCatalog(os.path.join(extension_folder, "locale")) |
130 AddBitmapFolder(os.path.join(extension_folder, "images")) |
121 AddBitmapFolder(os.path.join(extension_folder, "images")) |
131 execfile(extfilename, locals()) |
122 execfile(extfilename, locals()) |
132 |
123 |
|
124 |
133 import wx.lib.buttons, wx.lib.statbmp, wx.stc |
125 import wx.lib.buttons, wx.lib.statbmp, wx.stc |
134 import cPickle |
126 import cPickle |
135 import types, time, re, platform, time, traceback, commands |
127 import types, time, re, platform, time, traceback, commands |
136 |
128 |
137 from docutil import OpenHtmlFrame |
129 from docutil import OpenHtmlFrame |
138 from IDEFrame import IDEFrame, AppendMenu |
|
139 from IDEFrame import TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES |
|
140 from IDEFrame import EncodeFileSystemPath, DecodeFileSystemPath |
|
141 from editors.EditorPanel import EditorPanel |
130 from editors.EditorPanel import EditorPanel |
142 from editors.Viewer import Viewer |
131 from editors.Viewer import Viewer |
143 from editors.TextViewer import TextViewer |
132 from editors.TextViewer import TextViewer |
144 from editors.ResourceEditor import ConfigurationEditor, ResourceEditor |
133 from editors.ResourceEditor import ConfigurationEditor, ResourceEditor |
145 from editors.DataTypeEditor import DataTypeEditor |
134 from editors.DataTypeEditor import DataTypeEditor |
275 |
264 |
276 def isatty(self): |
265 def isatty(self): |
277 return False |
266 return False |
278 |
267 |
279 ID_FILEMENURECENTPROJECTS = wx.NewId() |
268 ID_FILEMENURECENTPROJECTS = wx.NewId() |
|
269 |
|
270 from IDEFrame import TITLE,\ |
|
271 EDITORTOOLBAR,\ |
|
272 FILEMENU,\ |
|
273 EDITMENU,\ |
|
274 DISPLAYMENU,\ |
|
275 PROJECTTREE,\ |
|
276 POUINSTANCEVARIABLESPANEL,\ |
|
277 LIBRARYTREE,\ |
|
278 SCALING,\ |
|
279 PAGETITLES,\ |
|
280 IDEFrame, AppendMenu,\ |
|
281 EncodeFileSystemPath, DecodeFileSystemPath |
|
282 from util.BitmapLibrary import GetBitmap |
280 |
283 |
281 class Beremiz(IDEFrame): |
284 class Beremiz(IDEFrame): |
282 |
285 |
283 def _init_utils(self): |
286 def _init_utils(self): |
284 self.ConfNodeMenu = wx.Menu(title='') |
287 self.ConfNodeMenu = wx.Menu(title='') |