Configtool: be helpful when trying to overwrite protected files.

This commit is contained in:
Markus Hitter 2015-07-14 16:52:01 +02:00
parent a8ab755f31
commit 6c7133792e
2 changed files with 4 additions and 2 deletions

View File

@ -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()

View File

@ -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()