Configtool: report save settings success directly in SettingsDlg.

There we have access to the actual file name.
This commit is contained in:
Markus Hitter 2015-02-25 17:49:38 +01:00
parent a217465e65
commit c7ef3b9ff9
2 changed files with 3 additions and 5 deletions

View File

@ -454,11 +454,6 @@ class ConfigFrame(wx.Frame):
dlg = SettingsDlg(self, self.settings) dlg = SettingsDlg(self, self.settings)
rc = dlg.ShowModal() rc = dlg.ShowModal()
dlg.Destroy() dlg.Destroy()
if rc != wx.ID_OK:
return
m = "configtool.default.ini successfully saved.\n"
self.message(m, "Save settings success", wx.OK + wx.ICON_INFORMATION)
def message(self, text, title, style = wx.OK + wx.ICON_ERROR): def message(self, text, title, style = wx.OK + wx.ICON_ERROR):
dlg = wx.MessageDialog(self, text, title, style) dlg = wx.MessageDialog(self, text, title, style)

View File

@ -70,6 +70,9 @@ class Settings:
self.cfg.write(cfp) self.cfg.write(cfp)
cfp.close() cfp.close()
self.app.message(INIFILE + " successfully saved.\n",
"Save settings success", wx.OK + wx.ICON_INFORMATION)
ARDUINODIR = 0 ARDUINODIR = 0
CFLAGS = 1 CFLAGS = 1