Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cedar/WinUi.c')
-rw-r--r--src/Cedar/WinUi.c65
1 files changed, 61 insertions, 4 deletions
diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c
index 0bf99f79..c0d0d7a7 100644
--- a/src/Cedar/WinUi.c
+++ b/src/Cedar/WinUi.c
@@ -3,9 +3,9 @@
//
// SoftEther VPN Server, Client and Bridge are free software under GPLv2.
//
-// Copyright (c) 2012-2015 Daiyuu Nobori.
-// Copyright (c) 2012-2015 SoftEther VPN Project, University of Tsukuba, Japan.
-// Copyright (c) 2012-2015 SoftEther Corporation.
+// Copyright (c) 2012-2016 Daiyuu Nobori.
+// Copyright (c) 2012-2016 SoftEther VPN Project, University of Tsukuba, Japan.
+// Copyright (c) 2012-2016 SoftEther Corporation.
//
// All Rights Reserved.
//
@@ -462,6 +462,10 @@ WINUI_UPDATE *InitUpdateUi(wchar_t *title, char *name, char *family_name, UINT64
{
return NULL;
}
+ if (MsIsWine())
+ {
+ return false;
+ }
if (IsEmptyStr(family_name))
{
family_name = UPDATE_FAMILY_NAME;
@@ -3143,9 +3147,57 @@ void InitDialogInternational(HWND hWnd, void *pparam)
if (hControl != NULL)
{
+ bool set_font = true;
HFONT hFont = GetDialogDefaultFontEx(param && ((DIALOG_PARAM *)param)->meiryo);
- SetFont(hControl, 0, hFont);
+ if (MsIsWine())
+ {
+ char classname[MAX_PATH];
+ char parent_classname[MAX_PATH];
+ HWND hParent = GetParent(hControl);
+
+ Zero(classname, sizeof(classname));
+ Zero(parent_classname, sizeof(parent_classname));
+
+ GetClassNameA(hControl, classname, sizeof(classname));
+
+ if (hParent != NULL)
+ {
+ GetClassNameA(hParent, parent_classname, sizeof(parent_classname));
+ }
+
+ if (StrCmpi(classname, "edit") == 0)
+ {
+ set_font = false;
+ }
+
+ if (StrCmpi(classname, "combobox") == 0)
+ {
+ set_font = false;
+ }
+
+ if (StrCmpi(classname, "syslistview32") == 0)
+ {
+ set_font = false;
+ }
+
+ if (StrCmpi(classname, "sysheader32") == 0)
+ {
+ set_font = false;
+ }
+
+ if (StrCmpi(parent_classname, "SysIPAddress32") == 0 ||
+ StrCmpi(classname, "SysIPAddress32") == 0)
+ {
+ set_font = true;
+ hFont = GetFont("Tahoma", 8, false, false, false, false);
+ }
+ }
+
+ if (set_font)
+ {
+ SetFont(hControl, 0, hFont);
+ }
if (MsIsVista())
{
@@ -3727,6 +3779,11 @@ void AboutDlgInit(HWND hWnd, WINUI_ABOUT *a)
SetFont(hWnd, S_INFO3, GetFont("Arial", 7, false, false, false, false));
+ if (MsIsWine())
+ {
+ Disable(hWnd, B_LANGUAGE);
+ }
+
//DlgFont(hWnd, S_INFO4, 8, false);
SetShow(hWnd, B_UPDATE_CONFIG, (a->Update != NULL));