summaryrefslogtreecommitdiffhomepage
path: root/proto-wine/ftnoir_protocol_wine_dialog.cpp
diff options
context:
space:
mode:
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();
}