mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-10-04 17:09:25 +00:00
NOISSUE shortcut support: set working directory in .desktop files
This commit is contained in:
@@ -92,6 +92,10 @@ void CreateShortcutDialog::updateDialogState()
|
|||||||
ui->profileComboBox->setEnabled(ui->useProfileCheckBox->isChecked());
|
ui->profileComboBox->setEnabled(ui->useProfileCheckBox->isChecked());
|
||||||
ui->offlineUsernameCheckBox->setEnabled(ui->launchOfflineCheckBox->isChecked());
|
ui->offlineUsernameCheckBox->setEnabled(ui->launchOfflineCheckBox->isChecked());
|
||||||
ui->offlineUsername->setEnabled(ui->launchOfflineCheckBox->isChecked() && ui->offlineUsernameCheckBox->isChecked());
|
ui->offlineUsername->setEnabled(ui->launchOfflineCheckBox->isChecked() && ui->offlineUsernameCheckBox->isChecked());
|
||||||
|
if (!ui->launchOfflineCheckBox->isChecked())
|
||||||
|
{
|
||||||
|
ui->offlineUsernameCheckBox->setChecked(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CreateShortcutDialog::getLaunchCommand()
|
QString CreateShortcutDialog::getLaunchCommand()
|
||||||
@@ -136,6 +140,7 @@ void CreateShortcutDialog::createShortcut()
|
|||||||
"Type=Application\n"
|
"Type=Application\n"
|
||||||
"Name=" + m_instance->name() + " - " + BuildConfig.LAUNCHER_DISPLAYNAME + "\n"
|
"Name=" + m_instance->name() + " - " + BuildConfig.LAUNCHER_DISPLAYNAME + "\n"
|
||||||
+ "Exec=" + getLaunchCommand() + "\n"
|
+ "Exec=" + getLaunchCommand() + "\n"
|
||||||
|
+ "Path=" + QCoreApplication::applicationDirPath() + "\n"
|
||||||
+ "Icon=" + QCoreApplication::applicationDirPath() + "/icons/shortcut-icon.png\n";
|
+ "Icon=" + QCoreApplication::applicationDirPath() + "/icons/shortcut-icon.png\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user