2021-09-07 19:47:35 -07:00
|
|
|
From 99b2ab3b3885000f3669de87a5298f7e2a221ca4 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
|
2021-09-07 19:47:35 -07:00
|
|
|
Subject: [PATCH] winecfg: Add option to enable/disable GTK3 theming.
|
2015-08-09 09:15:24 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
programs/winecfg/resource.h | 1 +
|
2021-09-07 19:47:35 -07:00
|
|
|
programs/winecfg/staging.c | 20 ++++++++++++++++++++
|
2015-08-09 09:15:24 -07:00
|
|
|
programs/winecfg/winecfg.rc | 1 +
|
2021-09-07 19:47:35 -07:00
|
|
|
3 files changed, 22 insertions(+)
|
2015-08-09 09:15:24 -07:00
|
|
|
|
|
|
|
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
|
2021-09-07 19:47:35 -07:00
|
|
|
index 01d31f6c8dd..d77f6a23a5a 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/resource.h
|
|
|
|
+++ b/programs/winecfg/resource.h
|
2021-09-07 19:47:35 -07:00
|
|
|
@@ -217,6 +217,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
|
2021-09-07 19:47:35 -07:00
|
|
|
index 13d0fa2ecb0..56dbda33cc9 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/staging.c
|
|
|
|
+++ b/programs/winecfg/staging.c
|
2021-09-07 19:47:35 -07:00
|
|
|
@@ -90,6 +90,21 @@ static void hidewine_set(BOOL status)
|
|
|
|
set_reg_key(config_key, keypath(L""), L"HideWineExports", status ? L"Y" : L"N");
|
2015-08-09 09:15:24 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * GTK3
|
|
|
|
+ */
|
|
|
|
+static BOOL gtk3_get(void)
|
|
|
|
+{
|
|
|
|
+ BOOL ret;
|
2021-09-07 19:47:35 -07:00
|
|
|
+ WCHAR *value = get_reg_key(config_key, keypath(L""), L"ThemeEngine", NULL);
|
|
|
|
+ ret = (value && !wcsicmp(value, L"GTK"));
|
2023-06-20 15:23:37 -07:00
|
|
|
+ free(value);
|
2015-08-09 09:15:24 -07:00
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+static void gtk3_set(BOOL status)
|
|
|
|
+{
|
2021-09-07 19:47:35 -07:00
|
|
|
+ set_reg_key(config_key, keypath(L""), L"ThemeEngine", status ? L"GTK" : NULL);
|
2015-08-09 09:15:24 -07:00
|
|
|
+}
|
|
|
|
|
|
|
|
static void load_staging_settings(HWND dialog)
|
|
|
|
{
|
2021-09-07 19:47:35 -07:00
|
|
|
@@ -97,6 +112,7 @@ 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);
|
|
|
|
}
|
|
|
|
|
|
|
|
INT_PTR CALLBACK StagingDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
2021-09-07 19:47:35 -07:00
|
|
|
@@ -138,6 +154,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
|
2021-09-07 19:47:35 -07:00
|
|
|
index ead9a54d5d2..738c4702aa3 100644
|
2015-08-09 09:15:24 -07:00
|
|
|
--- a/programs/winecfg/winecfg.rc
|
|
|
|
+++ b/programs/winecfg/winecfg.rc
|
2021-09-07 19:47:35 -07:00
|
|
|
@@ -321,6 +321,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
|
|
|
|
--
|
2021-09-07 19:47:35 -07:00
|
|
|
2.33.0
|
2015-08-09 09:15:24 -07:00
|
|
|
|