mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-24 19:02:16 +02:00
removed creation of shortcuts for flatpak / appimage users
Signed-off-by: sshcrack <34072808+sshcrack@users.noreply.github.com>
This commit is contained in:
parent
a737d5df42
commit
59efca764c
@ -1633,6 +1633,7 @@ void MainWindow::on_actionCreateInstanceShortcut_triggered()
|
|||||||
#endif
|
#endif
|
||||||
args.append({ "--launch", m_selectedInstance->id() });
|
args.append({ "--launch", m_selectedInstance->id() });
|
||||||
|
|
||||||
|
bool userDefinedShortcutPath = !shortcutFilePath.isEmpty();
|
||||||
if (shortcutFilePath.isEmpty())
|
if (shortcutFilePath.isEmpty())
|
||||||
shortcutFilePath = FS::PathCombine(shortcutDirPath, FS::RemoveInvalidFilenameChars(m_selectedInstance->name()));
|
shortcutFilePath = FS::PathCombine(shortcutDirPath, FS::RemoveInvalidFilenameChars(m_selectedInstance->name()));
|
||||||
if (!FS::createShortcut(shortcutFilePath, appPath, args, m_selectedInstance->name(), iconPath)) {
|
if (!FS::createShortcut(shortcutFilePath, appPath, args, m_selectedInstance->name(), iconPath)) {
|
||||||
@ -1640,7 +1641,11 @@ void MainWindow::on_actionCreateInstanceShortcut_triggered()
|
|||||||
iconFile.remove();
|
iconFile.remove();
|
||||||
#endif
|
#endif
|
||||||
QMessageBox::critical(this, tr("Create instance shortcut"), tr("Failed to create instance shortcut!"));
|
QMessageBox::critical(this, tr("Create instance shortcut"), tr("Failed to create instance shortcut!"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(userDefinedShortcutPath)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#if not defined(Q_OS_MACOS)
|
#if not defined(Q_OS_MACOS)
|
||||||
QMessageBox::information(this, tr("Create instance shortcut"), tr("Created a shortcut to this instance!"));
|
QMessageBox::information(this, tr("Create instance shortcut"), tr("Created a shortcut to this instance!"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user