linux fixes

This commit is contained in:
Jeroen 2023-09-17 15:57:07 +02:00
commit ff5b7673c3

View file

@ -2691,7 +2691,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
QMessageBox::critical( QMessageBox::critical(
this, tr("Create Shortcut"), this, tr("Create Shortcut"),
tr("Cannot create shortcut on desktop. Path \"%1\" does not exist.") tr("Cannot create shortcut on desktop. Path \"%1\" does not exist.")
.arg(target_directory.c_str()), .arg(QString::fromStdString(target_directory.generic_string())),
QMessageBox::StandardButton::Ok); QMessageBox::StandardButton::Ok);
return; return;
} }
@ -2699,11 +2699,12 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
target_directory = (xdg_data_home == nullptr ? home_path / ".local/share" : xdg_data_home) / target_directory = (xdg_data_home == nullptr ? home_path / ".local/share" : xdg_data_home) /
"applications"; "applications";
if (!Common::FS::CreateDirs(target_directory)) { if (!Common::FS::CreateDirs(target_directory)) {
QMessageBox::critical(this, tr("Create Shortcut"), QMessageBox::critical(
tr("Cannot create shortcut in applications menu. Path \"%1\" " this, tr("Create Shortcut"),
"does not exist and cannot be created.") tr("Cannot create shortcut in applications menu. Path \"%1\" "
.arg(target_directory.c_str()), "does not exist and cannot be created.")
QMessageBox::StandardButton::Ok); .arg(QString::fromStdString(target_directory.generic_string())),
QMessageBox::StandardButton::Ok);
return; return;
} }
} }
@ -2742,7 +2743,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga
QMessageBox::critical( QMessageBox::critical(
this, tr("Create Icon"), this, tr("Create Icon"),
tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.") tr("Cannot create icon file. Path \"%1\" does not exist and cannot be created.")
.arg(QString::fromStdString(system_icons_path)), .arg(QString::fromStdString(icons_path)),
QMessageBox::StandardButton::Ok); QMessageBox::StandardButton::Ok);
return; return;
} }