]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/ModalDialog.hh
cade lab fixes
[chaz/yoink] / src / Moof / ModalDialog.hh
index 68a6d285f99f414297d98e49a61093932fbb573c..f630cb6a21c64c5cab567a46e8880a10f376813a 100644 (file)
@@ -79,20 +79,39 @@ struct ModalDialog
                switch (type)
                {
                        case WARNING:
-                               logWarning("%s", text1.c_str());
-                               logWarning("%s", text2.c_str());
+                               logWarning(text1);
+                               logWarning(text2);
                                break;
                        case CRITICAL:
-                               logError("%s", text1.c_str());
-                               logError("%s", text2.c_str());
+                               logError(text1);
+                               logError(text2);
                                break;
                        default:
-                               logInfo("%s", text1.c_str());
-                               logInfo("%s", text2.c_str());
+                               logInfo(text1);
+                               logInfo(text2);
                                break;
                }
 
-#if USE_GTK
+#if defined(_WIN32) || defined(__WIN32__)
+
+               int iconType;
+               switch (type)
+               {
+                       case WARNING:
+                               iconType = MB_ICONWARNING;
+                               break;
+                       case CRITICAL:
+                               iconType = MB_ICONERROR;
+                               break;
+                       default:
+                               iconType = MB_ICONINFORMATION;
+                               break;
+               }
+
+               MessageBox(0, (text1 + "\n" + text2).c_str(), title.c_str(),
+                               MB_OK | iconType);
+
+#elif USE_GTK
 
                int argc = 0;
                char** argv;
@@ -126,7 +145,7 @@ struct ModalDialog
                gtk_dialog_run(GTK_DIALOG(dialog));
                gtk_widget_destroy(dialog);
                // FIXME - this doesn't seem to actually remove the window from the
-               // screen when it closes, not sure why...
+               // screen when it closes
 
 #elif USE_QT4
 
This page took 0.019099 seconds and 4 git commands to generate.