1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 20:47:45 +00:00

Disable some useless settings when running in Flatpak

The wine version isn't reported correctly, so we won't show it. It's
also currently not possible to select a custom Wine path in the GUI,
since the file portal will return a useless sandboxed copy of anything
in /usr.
This commit is contained in:
Joshua Goins 2022-04-17 22:47:16 -04:00
parent 79466c02cf
commit 1430862a90

View file

@ -268,12 +268,19 @@ SettingsWindow::SettingsWindow(int defaultTab, LauncherWindow& window, LauncherC
#endif
wineTypeCombo->insertItem(0, "System Wine");
// custom wine selection is broken under flatpak
#ifndef FLATPAK
wineTypeCombo->insertItem(1, "Custom Wine");
#endif
wineBoxLayout->addWidget(wineTypeCombo);
selectWineButton = new QPushButton("Select Wine Executable");
#ifndef FLATPAK
wineBoxLayout->addWidget(selectWineButton);
#endif
connect(wineTypeCombo,
static_cast<void (QComboBox::*)(int)>(
@ -294,9 +301,12 @@ SettingsWindow::SettingsWindow(int defaultTab, LauncherWindow& window, LauncherC
this->reloadControls();
});
// wine version is reported incorrectly under flatpak too
wineVersionLabel = new QLabel();
#ifndef FLATPAK
wineVersionLabel->setTextInteractionFlags(Qt::TextInteractionFlag::TextSelectableByMouse);
wineBoxLayout->addRow("Wine Version", wineVersionLabel);
#endif
winePrefixDirectory = new QLineEdit();
winePrefixDirectory->setReadOnly(true);