From 1430862a90af24b81179b39dd103de7224820658 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 17 Apr 2022 22:47:16 -0400 Subject: [PATCH] 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. --- src/settingswindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/settingswindow.cpp b/src/settingswindow.cpp index ab8f3ff..e908e75 100644 --- a/src/settingswindow.cpp +++ b/src/settingswindow.cpp @@ -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( @@ -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);