From e5e0b88d884c148a93aa1b28f5f3883681df6b74 Mon Sep 17 00:00:00 2001 From: Oleg Derevenetz Date: Thu, 28 Nov 2024 18:39:34 +0300 Subject: [PATCH] Put the dialog box headers in order (#9301) --- src/fheroes2/dialog/dialog_selectfile.cpp | 2 +- src/fheroes2/editor/editor_interface.cpp | 14 +++++++------- src/fheroes2/editor/editor_mainmenu.cpp | 2 +- src/fheroes2/editor/editor_save_map_window.cpp | 2 +- src/fheroes2/game/game_newgame.cpp | 4 ++-- src/fheroes2/gui/ui_keyboard.cpp | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/fheroes2/dialog/dialog_selectfile.cpp b/src/fheroes2/dialog/dialog_selectfile.cpp index 40ba0de6bf0..8badc05b085 100644 --- a/src/fheroes2/dialog/dialog_selectfile.cpp +++ b/src/fheroes2/dialog/dialog_selectfile.cpp @@ -423,7 +423,7 @@ namespace msg.append( "\n\n" ); msg.append( System::GetBasename( listbox.GetCurrent().filename ) ); - if ( Dialog::YES == fheroes2::showStandardTextMessage( _( "Warning!" ), msg, Dialog::YES | Dialog::NO ) ) { + if ( Dialog::YES == fheroes2::showStandardTextMessage( _( "Warning" ), msg, Dialog::YES | Dialog::NO ) ) { System::Unlink( listbox.GetCurrent().filename ); listbox.RemoveSelected(); diff --git a/src/fheroes2/editor/editor_interface.cpp b/src/fheroes2/editor/editor_interface.cpp index f1bf056c516..5ead6184e3d 100644 --- a/src/fheroes2/editor/editor_interface.cpp +++ b/src/fheroes2/editor/editor_interface.cpp @@ -1759,12 +1759,12 @@ namespace Interface bool EditorInterface::loadMap( const std::string & filePath ) { if ( !Maps::Map_Format::loadMap( filePath, _mapFormat ) ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), "Failed to load the map.", Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), "Failed to load the map.", Dialog::OK ); return false; } if ( !Maps::readMapInEditor( _mapFormat ) ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), "Failed to read the map.", Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), "Failed to read the map.", Dialog::OK ); return false; } @@ -1785,20 +1785,20 @@ namespace Interface void EditorInterface::saveMapToFile() { if ( !Maps::updateMapPlayers( _mapFormat ) ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), _( "The map is corrupted." ), Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), _( "The map is corrupted." ), Dialog::OK ); return; } const std::string dataPath = System::GetDataDirectory( "fheroes2" ); if ( dataPath.empty() ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), _( "Unable to locate data directory to save the map." ), Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), _( "Unable to locate data directory to save the map." ), Dialog::OK ); return; } std::string mapDirectory = System::concatPath( dataPath, "maps" ); if ( !System::IsDirectory( mapDirectory ) && !System::MakeDirectory( mapDirectory ) ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), _( "Unable to create a directory to save the map." ), Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), _( "Unable to create a directory to save the map." ), Dialog::OK ); return; } @@ -1807,7 +1807,7 @@ namespace Interface std::string correctedMapDirectory; if ( !System::GetCaseInsensitivePath( mapDirectory, correctedMapDirectory ) ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), _( "Unable to locate a directory to save the map." ), Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), _( "Unable to locate a directory to save the map." ), Dialog::OK ); return; } @@ -1849,7 +1849,7 @@ namespace Interface return; } - fheroes2::showStandardTextMessage( _( "Warning!" ), _( "Failed to save the map." ), Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Error" ), _( "Failed to save the map." ), Dialog::OK ); } void EditorInterface::openMapSpecificationsDialog() diff --git a/src/fheroes2/editor/editor_mainmenu.cpp b/src/fheroes2/editor/editor_mainmenu.cpp index fbbeca2d51d..24d3501ae31 100644 --- a/src/fheroes2/editor/editor_mainmenu.cpp +++ b/src/fheroes2/editor/editor_mainmenu.cpp @@ -101,7 +101,7 @@ namespace void showWIPInfo() { - fheroes2::showStandardTextMessage( _( "Warning!" ), "The Map Editor is still in development. This function is not available yet.", Dialog::OK ); + fheroes2::showStandardTextMessage( _( "Warning" ), "The Map Editor is still in development. This function is not available yet.", Dialog::OK ); } Maps::MapSize selectMapSize() diff --git a/src/fheroes2/editor/editor_save_map_window.cpp b/src/fheroes2/editor/editor_save_map_window.cpp index 8b0937b046a..e4200eed7c6 100644 --- a/src/fheroes2/editor/editor_save_map_window.cpp +++ b/src/fheroes2/editor/editor_save_map_window.cpp @@ -404,7 +404,7 @@ namespace Editor msg.append( "\n\n" ); msg.append( System::GetBasename( listbox.GetCurrent().filename ) ); - if ( Dialog::YES == fheroes2::showStandardTextMessage( _( "Warning!" ), msg, Dialog::YES | Dialog::NO ) ) { + if ( Dialog::YES == fheroes2::showStandardTextMessage( _( "Warning" ), msg, Dialog::YES | Dialog::NO ) ) { System::Unlink( listbox.GetCurrent().filename ); listbox.RemoveSelected(); diff --git a/src/fheroes2/game/game_newgame.cpp b/src/fheroes2/game/game_newgame.cpp index bd13a3e48b4..3907505df2f 100644 --- a/src/fheroes2/game/game_newgame.cpp +++ b/src/fheroes2/game/game_newgame.cpp @@ -131,7 +131,7 @@ namespace void showMissingVideoFilesWindow() { - fheroes2::showStandardTextMessage( _( "Warning!" ), + fheroes2::showStandardTextMessage( _( "Warning" ), _( "The required video files for the campaign selection window are missing. " "Please make sure that all necessary files are present in the system." ), Dialog::OK ); @@ -557,7 +557,7 @@ fheroes2::GameMode Game::NewGame( const bool isProbablyDemoVersion ) LocalEvent & le = LocalEvent::Get(); if ( isProbablyDemoVersion ) { - fheroes2::showStandardTextMessage( _( "Warning!" ), + fheroes2::showStandardTextMessage( _( "Warning" ), _( "fheroes2 needs data files from the original Heroes of Might and Magic II to operate. " "You appear to be using the demo version of Heroes of Might and Magic II for this purpose. " "Please note that only one scenario will be available in this setup." ), diff --git a/src/fheroes2/gui/ui_keyboard.cpp b/src/fheroes2/gui/ui_keyboard.cpp index f05de0e9d0f..5ad728c09ea 100644 --- a/src/fheroes2/gui/ui_keyboard.cpp +++ b/src/fheroes2/gui/ui_keyboard.cpp @@ -862,7 +862,7 @@ namespace fheroes2 break; case DialogAction::Close: { const auto handleInvalidValue = [&action]() { - showStandardTextMessage( _( "Warning" ), _( "The entered value is invalid." ), Dialog::OK ); + showStandardTextMessage( _( "Error" ), _( "The entered value is invalid." ), Dialog::OK ); action = DialogAction::DoNothing; }; @@ -872,7 +872,7 @@ namespace fheroes2 StringReplace( errorMessage, "%{minValue}", minValue ); StringReplace( errorMessage, "%{maxValue}", maxValue ); - showStandardTextMessage( _( "Warning" ), std::move( errorMessage ), Dialog::OK ); + showStandardTextMessage( _( "Error" ), std::move( errorMessage ), Dialog::OK ); action = DialogAction::DoNothing; };