From 6c7133792e1ffb338866f9b73170512e86d7289b Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 14 Jul 2015 16:52:01 +0200 Subject: [PATCH] Configtool: be helpful when trying to overwrite protected files. --- configtool/boardpanel.py | 3 ++- configtool/printerpanel.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configtool/boardpanel.py b/configtool/boardpanel.py index f44f30b..9293b91 100644 --- a/configtool/boardpanel.py +++ b/configtool/boardpanel.py @@ -456,7 +456,8 @@ class BoardPanel(wx.Panel): def saveConfigFile(self, path): if os.path.basename(path) in protectedFiles: - dlg = wx.MessageDialog(self, "Unable to overwrite %s." % path, + dlg = wx.MessageDialog(self, "It's not allowed to overwrite files " + "distributed by Teacup. Choose another name.", "Protected file error", wx.OK + wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() diff --git a/configtool/printerpanel.py b/configtool/printerpanel.py index f7e2f52..3a48f82 100644 --- a/configtool/printerpanel.py +++ b/configtool/printerpanel.py @@ -315,7 +315,8 @@ class PrinterPanel(wx.Panel): def saveConfigFile(self, path): if os.path.basename(path) in protectedFiles: - dlg = wx.MessageDialog(self, "Unable to overwrite %s." % path, + dlg = wx.MessageDialog(self, "It's not allowed to overwrite files " + "distributed by Teacup. Choose another name.", "Protected file error", wx.OK + wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy()