BeremizIDE.py
changeset 1745 f9d32913bad4
parent 1744 69dfdb26f600
child 1749 d73b64672238
equal deleted inserted replaced
1744:69dfdb26f600 1745:f9d32913bad4
   309 
   309 
   310         self.EditMenuSize = self.EditMenu.GetMenuItemCount()
   310         self.EditMenuSize = self.EditMenu.GetMenuItemCount()
   311 
   311 
   312         inspectorID = wx.NewId()
   312         inspectorID = wx.NewId()
   313         self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID)
   313         self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID)
   314         accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL|wx.ACCEL_ALT, ord('I'), inspectorID)]
   314         accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL | wx.ACCEL_ALT, ord('I'), inspectorID)]
   315 
   315 
   316         keyID = wx.NewId()
   316         keyID = wx.NewId()
   317         self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=keyID)
   317         self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=keyID)
   318         accels += [wx.AcceleratorEntry(wx.ACCEL_NORMAL, wx.WXK_F12, keyID)]
   318         accels += [wx.AcceleratorEntry(wx.ACCEL_NORMAL, wx.WXK_F12, keyID)]
   319 
   319 
   550     def CheckSaveBeforeClosing(self, title=_("Close Project")):
   550     def CheckSaveBeforeClosing(self, title=_("Close Project")):
   551         if self.CTR.ProjectTestModified():
   551         if self.CTR.ProjectTestModified():
   552             dialog = wx.MessageDialog(self,
   552             dialog = wx.MessageDialog(self,
   553                                       _("There are changes, do you want to save?"),
   553                                       _("There are changes, do you want to save?"),
   554                                       title,
   554                                       title,
   555                                       wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION)
   555                                       wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
   556             answer = dialog.ShowModal()
   556             answer = dialog.ShowModal()
   557             dialog.Destroy()
   557             dialog.Destroy()
   558             if answer == wx.ID_YES:
   558             if answer == wx.ID_YES:
   559                 self.CTR.SaveProject()
   559                 self.CTR.SaveProject()
   560             elif answer == wx.ID_CANCEL:
   560             elif answer == wx.ID_CANCEL:
  1055     def DeleteConfNode(self, confnode):
  1055     def DeleteConfNode(self, confnode):
  1056         if self.CTR.CheckProjectPathPerm():
  1056         if self.CTR.CheckProjectPathPerm():
  1057             dialog = wx.MessageDialog(self,
  1057             dialog = wx.MessageDialog(self,
  1058                 _("Really delete node '%s'?") % confnode.CTNName(),
  1058                 _("Really delete node '%s'?") % confnode.CTNName(),
  1059                 _("Remove %s node") % confnode.CTNType,
  1059                 _("Remove %s node") % confnode.CTNType,
  1060                 wx.YES_NO|wx.NO_DEFAULT)
  1060                 wx.YES_NO | wx.NO_DEFAULT)
  1061             if dialog.ShowModal() == wx.ID_YES:
  1061             if dialog.ShowModal() == wx.ID_YES:
  1062                 confnode.CTNRemove()
  1062                 confnode.CTNRemove()
  1063                 del confnode
  1063                 del confnode
  1064                 self._Refresh(TITLE, FILEMENU, PROJECTTREE)
  1064                 self._Refresh(TITLE, FILEMENU, PROJECTTREE)
  1065             dialog.Destroy()
  1065             dialog.Destroy()