X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FModalDialog.hh;h=9b3820a210867f51b7cc626c07daef938efdfaef;hp=11d9d7997916926b4fff50c25e44211af078f36d;hb=7f3984f3f9524f5b6813e01ceb2fe576dadff94e;hpb=8a1acac01b444dccf8b57cedf08392ada2e473c1 diff --git a/src/Moof/ModalDialog.hh b/src/Moof/ModalDialog.hh index 11d9d79..9b3820a 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(text1); + logWarning(text2); + break; + case CRITICAL: + logError(text1); + logError(text2); + break; + default: + logInfo(text1); + logInfo(text2); + break; + } + #if USE_GTK int argc = 0;