From 45f2f8005024392b5e91bd4bcac428f995a4299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sun, 7 Jan 2018 15:07:37 +0100 Subject: [PATCH] MiRCARTFrame.py: remove obsolete MiRCARTTo{Pastebin,PngFile} imports. MiRCARTFrame.py:MiRCARTFrame.__init__(): initially disable (grey out) Copy, Cut, Delete, Paste, Export to Pastebin, and Export as PNG menu items. --- MiRCARTFrame.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/MiRCARTFrame.py b/MiRCARTFrame.py index d658eb6..3c92cc5 100644 --- a/MiRCARTFrame.py +++ b/MiRCARTFrame.py @@ -26,18 +26,6 @@ from MiRCARTCanvas import MiRCARTCanvas from MiRCARTColours import MiRCARTColours import os, wx -try: - from MiRCARTToPastebin import MiRCARTToPastebin - haveMiRCARTToPastebin = True -except ImportError: - haveMiRCARTToPastebin = False - -try: - from MiRCARTToPngFile import MiRCARTToPngFile - haveMiRCARTToPngFile = True -except ImportError: - haveMiRCARTToPngFile = False - class MiRCARTFrame(wx.Frame): """XXX""" panelSkin = panelCanvas = canvasPathName = None @@ -331,10 +319,12 @@ class MiRCARTFrame(wx.Frame): self._initMenus(self.menuBar, \ [self.MID_FILE, self.MID_EDIT, self.MID_TOOLS], self.onFrameCommand) self.SetMenuBar(self.menuBar) - if not haveMiRCARTToPastebin: - self.menuItemsById[self.CID_EXPORT_PASTEBIN[0]].Enable(False) - if not haveMiRCARTToPngFile: - self.menuItemsById[self.CID_EXPORT_AS_PNG[0]].Enable(False) + self.menuItemsById[self.CID_COPY[0]].Enable(False) + self.menuItemsById[self.CID_CUT[0]].Enable(False) + self.menuItemsById[self.CID_DELETE[0]].Enable(False) + self.menuItemsById[self.CID_PASTE[0]].Enable(False) + self.menuItemsById[self.CID_EXPORT_PASTEBIN[0]].Enable(False) + self.menuItemsById[self.CID_EXPORT_AS_PNG[0]].Enable(False) self.toolBar = wx.ToolBar(self.panelSkin, -1, \ style=wx.HORIZONTAL|wx.TB_FLAT|wx.TB_NODIVIDER)