X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FModalDialog.hh;h=68a6d285f99f414297d98e49a61093932fbb573c;hp=11d9d7997916926b4fff50c25e44211af078f36d;hb=e495074443d9fd7bc16137084cf9de3d031b75c4;hpb=c9e20ac06383b20ceb5404c9237e319c2e90d157 diff --git a/src/Moof/ModalDialog.hh b/src/Moof/ModalDialog.hh index 11d9d79..68a6d28 100644 --- a/src/Moof/ModalDialog.hh +++ b/src/Moof/ModalDialog.hh @@ -31,6 +31,10 @@ #include +#if HAVE_CONFIG_H +#include "../config.h" +#endif + #if defined(_WIN32) || defined(__WIN32__) #include #elif defined(__APPLE__) && defined(__MACH__) @@ -43,12 +47,9 @@ #include #endif +#include #include -#if HAVE_CONFIG_H -#include "config.h" -#endif - namespace Mf { @@ -66,13 +67,31 @@ struct ModalDialog CRITICAL = 3 }; + std::string title; Type type; std::string text1; std::string text2; + void run() const { + switch (type) + { + case WARNING: + logWarning("%s", text1.c_str()); + logWarning("%s", text2.c_str()); + break; + case CRITICAL: + logError("%s", text1.c_str()); + logError("%s", text2.c_str()); + break; + default: + logInfo("%s", text1.c_str()); + logInfo("%s", text2.c_str()); + break; + } + #if USE_GTK int argc = 0;