From c7ef3b9ff9cec2e9ce08c3103039d7894c516a8e Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Wed, 25 Feb 2015 17:49:38 +0100 Subject: [PATCH] Configtool: report save settings success directly in SettingsDlg. There we have access to the actual file name. --- configtool.py | 5 ----- configtool/settings.py | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/configtool.py b/configtool.py index 5983d1b..b68ab76 100755 --- a/configtool.py +++ b/configtool.py @@ -454,11 +454,6 @@ class ConfigFrame(wx.Frame): dlg = SettingsDlg(self, self.settings) rc = dlg.ShowModal() 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): dlg = wx.MessageDialog(self, text, title, style) diff --git a/configtool/settings.py b/configtool/settings.py index 3fd7c85..dee057e 100644 --- a/configtool/settings.py +++ b/configtool/settings.py @@ -70,6 +70,9 @@ class Settings: self.cfg.write(cfp) cfp.close() + self.app.message(INIFILE + " successfully saved.\n", + "Save settings success", wx.OK + wx.ICON_INFORMATION) + ARDUINODIR = 0 CFLAGS = 1