274 def _init_coll_HelpMenu_Items(self, parent): |
274 def _init_coll_HelpMenu_Items(self, parent): |
275 handler=lambda event: { |
275 handler=lambda event: { |
276 wx.MessageBox(version.GetCommunityHelpMsg(), _(u'Community support'), wx.OK | wx.ICON_INFORMATION) |
276 wx.MessageBox(version.GetCommunityHelpMsg(), _(u'Community support'), wx.OK | wx.ICON_INFORMATION) |
277 } |
277 } |
278 id = wx.NewId() |
278 id = wx.NewId() |
279 parent.Append(help='', id=id, kind=wx.ITEM_NORMAL, text=_(u'Community support')) |
279 parent.Append(help='', id=id, kind=wx.ITEM_NORMAL, text=_(u'Community support')) |
280 self.Bind(wx.EVT_MENU, handler, id=id) |
280 self.Bind(wx.EVT_MENU, handler, id=id) |
281 |
281 |
282 parent.Append(help='', id=wx.ID_ABOUT, |
282 parent.Append(help='', id=wx.ID_ABOUT, |
283 kind=wx.ITEM_NORMAL, text=_(u'About')) |
283 kind=wx.ITEM_NORMAL, text=_(u'About')) |
284 self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) |
284 self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT) |
285 |
285 |
286 def _init_coll_ConnectionStatusBar_Fields(self, parent): |
286 def _init_coll_ConnectionStatusBar_Fields(self, parent): |
369 self.AUIManager.Update() |
369 self.AUIManager.Update() |
370 |
370 |
371 self.ConnectionStatusBar = esb.EnhancedStatusBar(self, style=wx.ST_SIZEGRIP) |
371 self.ConnectionStatusBar = esb.EnhancedStatusBar(self, style=wx.ST_SIZEGRIP) |
372 self._init_coll_ConnectionStatusBar_Fields(self.ConnectionStatusBar) |
372 self._init_coll_ConnectionStatusBar_Fields(self.ConnectionStatusBar) |
373 self.ProgressStatusBar = wx.Gauge(self.ConnectionStatusBar, -1, range = 100) |
373 self.ProgressStatusBar = wx.Gauge(self.ConnectionStatusBar, -1, range = 100) |
374 self.ConnectionStatusBar.AddWidget(self.ProgressStatusBar, esb.ESB_EXACT_FIT, esb.ESB_EXACT_FIT, 2) |
374 self.ConnectionStatusBar.AddWidget(self.ProgressStatusBar, esb.ESB_EXACT_FIT, esb.ESB_EXACT_FIT, 2) |
375 self.ProgressStatusBar.Hide() |
375 self.ProgressStatusBar.Hide() |
376 self.SetStatusBar(self.ConnectionStatusBar) |
376 self.SetStatusBar(self.ConnectionStatusBar) |
377 |
377 |
378 def __init_execute_path(self): |
378 def __init_execute_path(self): |
379 if os.name == 'nt': |
379 if os.name == 'nt': |
381 # with working dir set to mingw/bin. |
381 # with working dir set to mingw/bin. |
382 # then we prefix CWD to PATH in order to ensure that |
382 # then we prefix CWD to PATH in order to ensure that |
383 # commands invoked by build process by default are |
383 # commands invoked by build process by default are |
384 # found here. |
384 # found here. |
385 os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] |
385 os.environ["PATH"] = os.getcwd()+';'+os.environ["PATH"] |
386 |
386 |
387 |
387 |
388 def __init__(self, parent, projectOpen=None, buildpath=None, ctr=None, debug=True): |
388 def __init__(self, parent, projectOpen=None, buildpath=None, ctr=None, debug=True): |
389 # Add beremiz's icon in top left corner of the frame |
389 # Add beremiz's icon in top left corner of the frame |
390 self.icon = wx.Icon(Bpath("images", "brz.ico"), wx.BITMAP_TYPE_ICO) |
390 self.icon = wx.Icon(Bpath("images", "brz.ico"), wx.BITMAP_TYPE_ICO) |
391 self.__init_execute_path() |
391 self.__init_execute_path() |
392 |
392 |
393 IDEFrame.__init__(self, parent, debug) |
393 IDEFrame.__init__(self, parent, debug) |
394 self.Log = LogPseudoFile(self.LogConsole,self.SelectTab) |
394 self.Log = LogPseudoFile(self.LogConsole,self.SelectTab) |
395 |
395 |
396 self.local_runtime = None |
396 self.local_runtime = None |
397 self.runtime_port = None |
397 self.runtime_port = None |
930 |
930 |
931 def OnQuitMenu(self, event): |
931 def OnQuitMenu(self, event): |
932 self.Close() |
932 self.Close() |
933 |
933 |
934 def OnAboutMenu(self, event): |
934 def OnAboutMenu(self, event): |
935 info = version.GetAboutDialogInfo() |
935 info = version.GetAboutDialogInfo() |
936 ShowAboutDialog(self, info) |
936 ShowAboutDialog(self, info) |
937 |
937 |
938 def OnProjectTreeItemBeginEdit(self, event): |
938 def OnProjectTreeItemBeginEdit(self, event): |
939 selected = event.GetItem() |
939 selected = event.GetItem() |
940 if self.ProjectTree.GetPyData(selected)["type"] == ITEM_CONFNODE: |
940 if self.ProjectTree.GetPyData(selected)["type"] == ITEM_CONFNODE: |