2019-02-09 14:00:35 -08:00
|
|
|
From ad78908234abc43ef56b5d005e22abde445f8760 Mon Sep 17 00:00:00 2001
|
2015-08-09 09:15:24 -07:00
|
|
|
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
|
|
|
Date: Sun, 9 Aug 2015 18:01:11 +0200
|
|
|
|
Subject: winecfg: Add option to enable/disable GTK3 theming.
|
|
|
|
|
|
|
|
---
|
|
|
|
programs/winecfg/resource.h | 1 +
|
|
|
|
programs/winecfg/staging.c | 29 +++++++++++++++++++++++++++++
|
|
|
|
programs/winecfg/winecfg.rc | 1 +
|
|
|
|
3 files changed, 31 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
|
2019-02-09 14:00:35 -08:00
|
|
|
index f8c2fdf8..96f24290 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/resource.h
|
|
|
|
+++ b/programs/winecfg/resource.h
|
2019-02-09 14:00:35 -08:00
|
|
|
@@ -218,6 +218,7 @@
|
2015-08-09 09:15:24 -07:00
|
|
|
#define IDC_ENABLE_VAAPI 9002
|
|
|
|
#define IDC_ENABLE_EAX 9003
|
|
|
|
#define IDC_ENABLE_HIDEWINE 9004
|
|
|
|
+#define IDC_ENABLE_GTK3 9005
|
|
|
|
|
|
|
|
/* About tab */
|
|
|
|
#define IDC_ABT_OWNER 8432
|
|
|
|
diff --git a/programs/winecfg/staging.c b/programs/winecfg/staging.c
|
2019-02-09 14:00:35 -08:00
|
|
|
index 2e305a2c..b573db71 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/staging.c
|
|
|
|
+++ b/programs/winecfg/staging.c
|
2018-04-01 15:22:59 -07:00
|
|
|
@@ -99,6 +99,27 @@ static void hidewine_set(BOOL status)
|
2015-08-09 09:15:24 -07:00
|
|
|
set_reg_key(config_key, keypath(""), "HideWineExports", status ? "Y" : "N");
|
|
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * GTK3
|
|
|
|
+ */
|
|
|
|
+static BOOL gtk3_get(void)
|
|
|
|
+{
|
|
|
|
+#ifdef HAVE_GTK3
|
|
|
|
+ BOOL ret;
|
2019-02-09 14:00:35 -08:00
|
|
|
+ char *value = get_reg_key(config_key, keypath(""), "ThemeEngine", NULL);
|
|
|
|
+ ret = (value && !strcasecmp(value, "GTK"));
|
2015-08-09 09:15:24 -07:00
|
|
|
+ HeapFree(GetProcessHeap(), 0, value);
|
|
|
|
+ return ret;
|
|
|
|
+#else
|
|
|
|
+ return FALSE;
|
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
+static void gtk3_set(BOOL status)
|
|
|
|
+{
|
|
|
|
+#ifdef HAVE_GTK3
|
2019-02-09 14:00:35 -08:00
|
|
|
+ set_reg_key(config_key, keypath(""), "ThemeEngine", status ? "GTK" : NULL);
|
2015-08-09 09:15:24 -07:00
|
|
|
+#endif
|
|
|
|
+}
|
|
|
|
|
|
|
|
static void load_staging_settings(HWND dialog)
|
|
|
|
{
|
2018-04-01 15:22:59 -07:00
|
|
|
@@ -106,10 +127,14 @@ static void load_staging_settings(HWND dialog)
|
2015-08-09 09:15:24 -07:00
|
|
|
CheckDlgButton(dialog, IDC_ENABLE_VAAPI, vaapi_get() ? BST_CHECKED : BST_UNCHECKED);
|
|
|
|
CheckDlgButton(dialog, IDC_ENABLE_EAX, eax_get() ? BST_CHECKED : BST_UNCHECKED);
|
|
|
|
CheckDlgButton(dialog, IDC_ENABLE_HIDEWINE, hidewine_get() ? BST_CHECKED : BST_UNCHECKED);
|
|
|
|
+ CheckDlgButton(dialog, IDC_ENABLE_GTK3, gtk3_get() ? BST_CHECKED : BST_UNCHECKED);
|
|
|
|
|
|
|
|
#ifndef HAVE_VAAPI
|
|
|
|
disable(IDC_ENABLE_VAAPI);
|
|
|
|
#endif
|
|
|
|
+#ifndef HAVE_GTK3
|
|
|
|
+ disable(IDC_ENABLE_GTK3);
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
2018-04-01 15:22:59 -07:00
|
|
|
@@ -151,6 +176,10 @@ INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
|
2015-08-09 09:15:24 -07:00
|
|
|
hidewine_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_HIDEWINE) == BST_CHECKED);
|
|
|
|
SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
|
|
|
return TRUE;
|
|
|
|
+ case IDC_ENABLE_GTK3:
|
|
|
|
+ gtk3_set(IsDlgButtonChecked(hDlg, IDC_ENABLE_GTK3) == BST_CHECKED);
|
|
|
|
+ SendMessageW(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
|
|
|
+ return TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
|
2019-02-09 14:00:35 -08:00
|
|
|
index 469ae101..33f2642e 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/winecfg.rc
|
|
|
|
+++ b/programs/winecfg/winecfg.rc
|
2019-02-09 14:00:35 -08:00
|
|
|
@@ -323,6 +323,7 @@ BEGIN
|
2015-08-09 09:15:24 -07:00
|
|
|
CONTROL "Enable &VAAPI as backend for DXVA2 GPU decoding",IDC_ENABLE_VAAPI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,55,230,8
|
|
|
|
CONTROL "Enable Environmental Audio E&xtensions (EAX)",IDC_ENABLE_EAX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,70,230,8
|
|
|
|
CONTROL "&Hide Wine version from applications",IDC_ENABLE_HIDEWINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,85,230,8
|
|
|
|
+ CONTROL "Enable >K3 Theming",IDC_ENABLE_GTK3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,230,8
|
|
|
|
END
|
|
|
|
|
|
|
|
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|
|
|
--
|
2019-02-09 14:00:35 -08:00
|
|
|
2.20.1
|
2015-08-09 09:15:24 -07:00
|
|
|
|