summaryrefslogtreecommitdiff
path: root/src/common/msg_handler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/msg_handler.h')
-rw-r--r--src/common/msg_handler.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/common/msg_handler.h b/src/common/msg_handler.h
index 7c5319ec3..9bfdf950e 100644
--- a/src/common/msg_handler.h
+++ b/src/common/msg_handler.h
@@ -15,7 +15,7 @@ enum MSG_TYPE
15 CRITICAL 15 CRITICAL
16}; 16};
17 17
18typedef bool (*MsgAlertHandler)(const char* caption, const char* text, 18typedef bool (*MsgAlertHandler)(const char* caption, const char* text,
19 bool yes_no, int Style); 19 bool yes_no, int Style);
20typedef std::string (*StringTranslator)(const char* text); 20typedef std::string (*StringTranslator)(const char* text);
21 21
@@ -31,29 +31,29 @@ void SetEnableAlert(bool enable);
31 31
32#ifndef GEKKO 32#ifndef GEKKO
33#ifdef _WIN32 33#ifdef _WIN32
34 #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__) 34 #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__)
35 #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__) 35 #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__)
36 #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__) 36 #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__)
37 #define AskYesNo(format, ...) MsgAlert(true, QUESTION, format, __VA_ARGS__) 37 #define AskYesNo(format, ...) MsgAlert(true, QUESTION, format, __VA_ARGS__)
38 #define CriticalAlert(format, ...) MsgAlert(false, CRITICAL, format, __VA_ARGS__) 38 #define CriticalAlert(format, ...) MsgAlert(false, CRITICAL, format, __VA_ARGS__)
39 // Use these macros (that do the same thing) if the message should be translated. 39 // Use these macros (that do the same thing) if the message should be translated.
40 #define SuccessAlertT(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__) 40 #define SuccessAlertT(format, ...) MsgAlert(false, INFORMATION, format, __VA_ARGS__)
41 #define PanicAlertT(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__) 41 #define PanicAlertT(format, ...) MsgAlert(false, WARNING, format, __VA_ARGS__)
42 #define PanicYesNoT(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__) 42 #define PanicYesNoT(format, ...) MsgAlert(true, WARNING, format, __VA_ARGS__)
43 #define AskYesNoT(format, ...) MsgAlert(true, QUESTION, format, __VA_ARGS__) 43 #define AskYesNoT(format, ...) MsgAlert(true, QUESTION, format, __VA_ARGS__)
44 #define CriticalAlertT(format, ...) MsgAlert(false, CRITICAL, format, __VA_ARGS__) 44 #define CriticalAlertT(format, ...) MsgAlert(false, CRITICAL, format, __VA_ARGS__)
45#else 45#else
46 #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, ##__VA_ARGS__) 46 #define SuccessAlert(format, ...) MsgAlert(false, INFORMATION, format, ##__VA_ARGS__)
47 #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, ##__VA_ARGS__) 47 #define PanicAlert(format, ...) MsgAlert(false, WARNING, format, ##__VA_ARGS__)
48 #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, ##__VA_ARGS__) 48 #define PanicYesNo(format, ...) MsgAlert(true, WARNING, format, ##__VA_ARGS__)
49 #define AskYesNo(format, ...) MsgAlert(true, QUESTION, format, ##__VA_ARGS__) 49 #define AskYesNo(format, ...) MsgAlert(true, QUESTION, format, ##__VA_ARGS__)
50 #define CriticalAlert(format, ...) MsgAlert(false, CRITICAL, format, ##__VA_ARGS__) 50 #define CriticalAlert(format, ...) MsgAlert(false, CRITICAL, format, ##__VA_ARGS__)
51 // Use these macros (that do the same thing) if the message should be translated. 51 // Use these macros (that do the same thing) if the message should be translated.
52 #define SuccessAlertT(format, ...) MsgAlert(false, INFORMATION, format, ##__VA_ARGS__) 52 #define SuccessAlertT(format, ...) MsgAlert(false, INFORMATION, format, ##__VA_ARGS__)
53 #define PanicAlertT(format, ...) MsgAlert(false, WARNING, format, ##__VA_ARGS__) 53 #define PanicAlertT(format, ...) MsgAlert(false, WARNING, format, ##__VA_ARGS__)
54 #define PanicYesNoT(format, ...) MsgAlert(true, WARNING, format, ##__VA_ARGS__) 54 #define PanicYesNoT(format, ...) MsgAlert(true, WARNING, format, ##__VA_ARGS__)
55 #define AskYesNoT(format, ...) MsgAlert(true, QUESTION, format, ##__VA_ARGS__) 55 #define AskYesNoT(format, ...) MsgAlert(true, QUESTION, format, ##__VA_ARGS__)
56 #define CriticalAlertT(format, ...) MsgAlert(false, CRITICAL, format, ##__VA_ARGS__) 56 #define CriticalAlertT(format, ...) MsgAlert(false, CRITICAL, format, ##__VA_ARGS__)
57#endif 57#endif
58#else 58#else
59// GEKKO 59// GEKKO