made a start with script functions

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@62 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-31 12:17:36 +00:00
parent 0caaf01a78
commit 1ffaa5bd58
20 changed files with 372 additions and 29 deletions
+10 -1
View File
@@ -37,7 +37,8 @@ void handle_error(const String& e, bool allow_duplicate = true, bool now = true)
}
// Only show errors in the main thread
if (!now || !wxThread::IsMain()) {
pending_error = e;
if (!pending_error.empty()) pending_error += _("\n\n");
pending_error += e;
return;
}
// show message
@@ -47,3 +48,11 @@ void handle_error(const String& e, bool allow_duplicate = true, bool now = true)
void handle_error(const Error& e, bool allow_duplicate, bool now) {
handle_error(e.what(), allow_duplicate, now);
}
void handle_pending_errors() {
assert(wxThread::IsMain());
if (!pending_error.empty()) {
handle_error(pending_error);
pending_error.clear();
}
}