summaryrefslogtreecommitdiffhomepage
path: root/proto-wine/ftnoir_protocol_wine_dialog.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-10-27 07:25:43 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-10-28 07:45:44 +0100
commita5a2ec4f7a855ad35bde6362796a0a07fd419cf7 (patch)
tree60053965f601a5e14ba0f5eecc8e6f2c81ea26cc /proto-wine/ftnoir_protocol_wine_dialog.cpp
parent2716d8e2ae7df7fb99d9d64d1efaa554d1d38034 (diff)
proto/wine: add support for proton
Diffstat (limited to 'proto-wine/ftnoir_protocol_wine_dialog.cpp')
-rw-r--r--proto-wine/ftnoir_protocol_wine_dialog.cpp26
1 files changed, 21 insertions, 5 deletions
diff --git a/proto-wine/ftnoir_protocol_wine_dialog.cpp b/proto-wine/ftnoir_protocol_wine_dialog.cpp
index a388df70..bf431c66 100644
--- a/proto-wine/ftnoir_protocol_wine_dialog.cpp
+++ b/proto-wine/ftnoir_protocol_wine_dialog.cpp
@@ -2,18 +2,34 @@
#include <QDebug>
#include "api/plugin-api.hpp"
+static const char* proton_versions[] = {
+ "4.11", "4.2", "3.16", "3.7",
+};
+
FTControls::FTControls()
{
- ui.setupUi( this );
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
+ ui.setupUi(this);
+
+ for (const char* version : proton_versions)
+ ui.proton_version->addItem(version, QVariant{version});
+
+ tie_setting(s.proton_version, ui.proton_version);
+ tie_setting(s.variant_wine, ui.variant_wine);
+ tie_setting(s.variant_proton, ui.variant_proton);
+
+ connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &FTControls::doOK);
+ connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &FTControls::doCancel);
}
-void FTControls::doOK() {
+void FTControls::doOK()
+{
+ s.b->save();
close();
}
-void FTControls::doCancel() {
+void FTControls::doCancel()
+{
+ s.b->reload();
close();
}