From 74fcf68fe2231873127b4d26a2ebe2bd2f54497f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 22 Feb 2012 20:47:24 +0000 Subject: [PATCH] Improve the error message when autoload scripts fail to load Remove a reference to errors "above" as the message appears both above and below the actual errors. Shorten the message a bit to reduce the chance of it getting truncated by wx. Fix the name of the button in the automation manager dialog. Originally committed to SVN as r6500. --- aegisub/src/auto4_base.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aegisub/src/auto4_base.cpp b/aegisub/src/auto4_base.cpp index 1f10c97aa..791829492 100644 --- a/aegisub/src/auto4_base.cpp +++ b/aegisub/src/auto4_base.cpp @@ -439,8 +439,12 @@ namespace Automation4 { more = dir.GetNext(&fn); } } - if (error_count > 0) { - wxLogWarning("One or more scripts placed in the Automation autoload directory failed to load\nPlease review the errors above, correct them and use the Reload Autoload dir button in Automation Manager to attempt loading the scripts again."); + + if (error_count == 1) { + wxLogWarning("A script in the Automation autoload directory failed to load.\nPlease review the errors, fix them and use the Rescan Autoload Dir button in Automation Manager to load the scripts again."); + } + else if (error_count > 1) { + wxLogWarning("Multiple scripts in the Automation autoload directory failed to load.\nPlease review the errors, fix them and use the Rescan Autoload Dir button in Automation Manager to load the scripts again."); } ScriptsChanged();