Mon, 22 Apr 2013 16:43:01 +0300
A saving failure is a critical error, not a warning and should be drawn as such
file.cpp | file | annotate | diff | comparison | revisions | |
gui_actions.cpp | file | annotate | diff | comparison | revisions |
--- a/file.cpp Mon Apr 22 16:30:33 2013 +0300 +++ b/file.cpp Mon Apr 22 16:43:01 2013 +0300 @@ -182,8 +182,12 @@ if (!save ()) { str errormsg = format ("Failed to save %s: %s\nDo you still want to close?", zFileName.chars (), strerror (lastError)); - if (!confirm ("Save Failure", errormsg)) + + if (QMessageBox::critical (g_ForgeWindow, "Save Failure", errormsg, + (QMessageBox::Yes | QMessageBox::No), QMessageBox::No) == QMessageBox::No) + { return false; + } } break;
--- a/gui_actions.cpp Mon Apr 22 16:30:33 2013 +0300 +++ b/gui_actions.cpp Mon Apr 22 16:43:01 2013 +0300 @@ -72,7 +72,7 @@ setlocale (LC_ALL, "C"); // Tell the user the save failed, and give the option for saving as with it. - QMessageBox dlg (QMessageBox::Warning, "Save Failure", + QMessageBox dlg (QMessageBox::Critical, "Save Failure", format ("Failed to save to %s\nReason: %s", path.chars(), strerror (g_CurrentFile->lastError)), QMessageBox::Close, g_ForgeWindow);