Skip to content
Permalink
Browse files

Merge pull request #1224 from R1dO/fix/zenityErrorDialog

Fix zenity error dialog
  • Loading branch information...
SupSuper committed Jul 28, 2019
2 parents 84786c4 + e1b3a9b commit e712c3baf3106ac717967e455423f1a8fd29a9d8
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/Engine/CrossPlatform.cpp
@@ -96,7 +96,7 @@ void getErrorDialog()
if (getenv("KDE_SESSION_UID") && system("which kdialog 2>&1 > /dev/null") == 0)
errorDlg = "kdialog --error ";
else if (system("which zenity 2>&1 > /dev/null") == 0)
errorDlg = "zenity --error --text=";
errorDlg = "zenity --no-wrap --error --text=";
else if (system("which kdialog 2>&1 > /dev/null") == 0)
errorDlg = "kdialog --error ";
else if (system("which gdialog 2>&1 > /dev/null") == 0)
@@ -212,7 +212,9 @@ std::vector<std::string> findDataFolders()
// Get global data folders
if (char *xdg_data_dirs = getenv("XDG_DATA_DIRS"))
{
char *dir = strtok(xdg_data_dirs, ":");
char xdg_data_dirs_copy[strlen(xdg_data_dirs)+1];
strcpy(xdg_data_dirs_copy, xdg_data_dirs);
char *dir = strtok(xdg_data_dirs_copy, ":");
while (dir != 0)
{
snprintf(path, MAXPATHLEN, "%s/openxcom/", dir);

0 comments on commit e712c3b

Please sign in to comment.
You can’t perform that action at this time.