Configtool: remove "Load default" menu entry.
This one is pretty pointless, because every user has a different printer, so we can't deliver a meaningful default with the distribution.
This commit is contained in:
parent
73f7e43227
commit
be8b0da71a
|
|
@ -20,8 +20,7 @@ ID_LOAD_BOARD = 1010
|
||||||
ID_SAVE_BOARD = 1011
|
ID_SAVE_BOARD = 1011
|
||||||
ID_SAVE_BOARD_AS = 1012
|
ID_SAVE_BOARD_AS = 1012
|
||||||
ID_LOAD_CONFIG = 1020
|
ID_LOAD_CONFIG = 1020
|
||||||
ID_LOAD_DEFAULT = 1021
|
ID_SAVE_CONFIG = 1021
|
||||||
ID_SAVE_CONFIG = 1022
|
|
||||||
ID_BUILD = 1030
|
ID_BUILD = 1030
|
||||||
ID_UPLOAD = 1031
|
ID_UPLOAD = 1031
|
||||||
ID_SETTINGS = 1040
|
ID_SETTINGS = 1040
|
||||||
|
|
@ -116,11 +115,6 @@ class ConfigFrame(wx.Frame):
|
||||||
self.Bind(wx.EVT_MENU, self.onLoadConfig, id = ID_LOAD_CONFIG)
|
self.Bind(wx.EVT_MENU, self.onLoadConfig, id = ID_LOAD_CONFIG)
|
||||||
file_menu.Enable(ID_LOAD_CONFIG, False)
|
file_menu.Enable(ID_LOAD_CONFIG, False)
|
||||||
|
|
||||||
file_menu.Append(ID_LOAD_DEFAULT, "Load default",
|
|
||||||
"Load default config.h and its named printer and board files.")
|
|
||||||
self.Bind(wx.EVT_MENU, self.onLoadDefault, id = ID_LOAD_DEFAULT)
|
|
||||||
file_menu.Enable(ID_LOAD_DEFAULT, False)
|
|
||||||
|
|
||||||
file_menu.Append(ID_SAVE_CONFIG, "Save config.h", "Save config.h file.")
|
file_menu.Append(ID_SAVE_CONFIG, "Save config.h", "Save config.h file.")
|
||||||
self.Bind(wx.EVT_MENU, self.onSaveConfig, id = ID_SAVE_CONFIG)
|
self.Bind(wx.EVT_MENU, self.onSaveConfig, id = ID_SAVE_CONFIG)
|
||||||
file_menu.Enable(ID_SAVE_CONFIG, False)
|
file_menu.Enable(ID_SAVE_CONFIG, False)
|
||||||
|
|
@ -217,12 +211,6 @@ class ConfigFrame(wx.Frame):
|
||||||
self.fileMenu.Enable(ID_LOAD_CONFIG, False)
|
self.fileMenu.Enable(ID_LOAD_CONFIG, False)
|
||||||
self.buildMenu.Enable(ID_BUILD, False)
|
self.buildMenu.Enable(ID_BUILD, False)
|
||||||
|
|
||||||
fn = os.path.join(cmd_folder, "config.default.h")
|
|
||||||
if os.path.isfile(fn):
|
|
||||||
self.fileMenu.Enable(ID_LOAD_DEFAULT, True)
|
|
||||||
else:
|
|
||||||
self.fileMenu.Enable(ID_LOAD_DEFAULT, False)
|
|
||||||
|
|
||||||
def checkEnableUpload(self):
|
def checkEnableUpload(self):
|
||||||
fn = os.path.join(cmd_folder, "teacup.hex")
|
fn = os.path.join(cmd_folder, "teacup.hex")
|
||||||
if os.path.isfile(fn):
|
if os.path.isfile(fn):
|
||||||
|
|
@ -254,9 +242,6 @@ class ConfigFrame(wx.Frame):
|
||||||
def onLoadConfig(self, evt):
|
def onLoadConfig(self, evt):
|
||||||
self.loadConfigFile("config.h")
|
self.loadConfigFile("config.h")
|
||||||
|
|
||||||
def onLoadDefault(self, evt):
|
|
||||||
self.loadConfigFile("config.default.h")
|
|
||||||
|
|
||||||
def loadConfigFile(self, fn):
|
def loadConfigFile(self, fn):
|
||||||
if not self.pgPrinter.confirmLoseChanges("load config"):
|
if not self.pgPrinter.confirmLoseChanges("load config"):
|
||||||
return
|
return
|
||||||
|
|
@ -359,9 +344,8 @@ class ConfigFrame(wx.Frame):
|
||||||
|
|
||||||
fp.close()
|
fp.close()
|
||||||
|
|
||||||
m = ("%s successfully saved.\n"
|
self.message("config.h successfully saved.", "Save configuration success",
|
||||||
"%s successfully saved.\nconfig.h successfully saved.") % (rbfn, rpfn)
|
wx.OK + wx.ICON_INFORMATION)
|
||||||
self.message(m, "Save configuration success", wx.OK + wx.ICON_INFORMATION)
|
|
||||||
|
|
||||||
self.checkEnableLoadConfig()
|
self.checkEnableLoadConfig()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue