1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 20:43:04 +01:00

Add a visible notification for missing KDialog/Zenity

This commit is contained in:
Krutonium
2017-10-14 16:16:51 -04:00
committed by Michael Steenbeek
parent 0313183d13
commit fd459f0791
4 changed files with 36 additions and 20 deletions

View File

@@ -21,9 +21,11 @@
#include <stdexcept>
#include <openrct2/common.h>
#include <openrct2/core/String.hpp>
#include <openrct2/localisation/localisation.h>
#include <openrct2/ui/UiContext.h>
#include "UiContext.h"
#include <SDL.h>
namespace OpenRCT2 { namespace Ui
@@ -371,7 +373,10 @@ namespace OpenRCT2 { namespace Ui
static void ThrowMissingDialogApp()
{
throw std::runtime_error("KDialog or Zenity not installed.");
IUiContext * uiContext = GetContext()->GetUiContext();
std::string dialogMissingWarning = language_get_string(STR_MISSING_DIALOG_APPLICATION_ERROR);
uiContext->ShowMessageBox(dialogMissingWarning);
throw std::runtime_error(dialogMissingWarning);
}
};