[PATCH] winecfg: Temporary advertise our network capabilities
André Hentschel
nerv at dawncrow.de
Thu Jun 14 13:14:24 CDT 2018
Signed-off-by: André Hentschel <nerv at dawncrow.de>
---
For our next release...
If not this patch, can we PLEASE do something similar?
programs/winecfg/about.c | 28 ++++++++++++++++++++++++++--
programs/winecfg/resource.h | 1 +
programs/winecfg/winecfg.rc | 3 ++-
3 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/programs/winecfg/about.c b/programs/winecfg/about.c
index a2b4022..bddcf98 100644
--- a/programs/winecfg/about.c
+++ b/programs/winecfg/about.c
@@ -36,6 +36,8 @@
static HICON logo = NULL;
static HFONT titleFont = NULL;
+static HFONT descFont = NULL;
+static HFONT versFont = NULL;
INT_PTR CALLBACK
AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -118,7 +120,28 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
SendMessageW(hWnd, WM_SETFONT, (WPARAM)titleFont, TRUE);
SetWindowTextA(hWnd, PACKAGE_NAME);
}
- SetDlgItemTextA(hDlg, IDC_ABT_PANEL_TEXT, PACKAGE_VERSION);
+ /* prepare the title description */
+ hWnd = GetDlgItem(hDlg, IDC_ABT_TITLE_DESC);
+ if(hWnd)
+ {
+ static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
+ descFont = CreateFontW(
+ -MulDiv(18, GetDeviceCaps(hDC, LOGPIXELSY), 72),
+ 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, tahomaW);
+ SendMessageW(hWnd, WM_SETFONT, (WPARAM)descFont, TRUE);
+ SetWindowTextA(hWnd, "for Workgroups");
+ }
+ /* prepare the version */
+ hWnd = GetDlgItem(hDlg, IDC_ABT_PANEL_TEXT);
+ if(hWnd)
+ {
+ static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
+ versFont = CreateFontW(
+ -MulDiv(8, GetDeviceCaps(hDC, LOGPIXELSY), 72),
+ 0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, tahomaW);
+ SendMessageW(hWnd, WM_SETFONT, (WPARAM)versFont, TRUE);
+ SetWindowTextA(hWnd, "Version " PACKAGE_VERSION);
+ }
/* prepare the web link */
SetDlgItemTextA(hDlg, IDC_ABT_WEB_LINK, "<a href=\"" PACKAGE_URL "\">" PACKAGE_URL "</a>");
@@ -166,9 +189,10 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(GetDlgCtrlID((HWND)lParam))
{
case IDC_ABT_TITLE_TEXT:
+ case IDC_ABT_TITLE_DESC:
+ case IDC_ABT_PANEL_TEXT:
/* set the title to a wine color */
SetTextColor((HDC)wParam, 0x0000007F);
- case IDC_ABT_PANEL_TEXT:
case IDC_ABT_LICENSE_TEXT:
case IDC_ABT_WEB_LINK:
SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h
index 0c0b038..673c21c 100644
--- a/programs/winecfg/resource.h
+++ b/programs/winecfg/resource.h
@@ -218,3 +218,4 @@
#define IDC_ABT_TITLE_TEXT 8436
#define IDC_ABT_WEB_LINK 8437
#define IDC_ABT_LICENSE_TEXT 8438
+#define IDC_ABT_TITLE_DESC 8439
diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc
index 5908b49..0c26761 100644
--- a/programs/winecfg/winecfg.rc
+++ b/programs/winecfg/winecfg.rc
@@ -134,7 +134,8 @@ STYLE WS_CHILD
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "", IDC_ABT_PANEL, "STATIC", SS_OWNERDRAW, 0, 0, 260, 140
- LTEXT "",IDC_ABT_TITLE_TEXT,105,30,55,30
+ LTEXT "",IDC_ABT_TITLE_TEXT,155,0,55,22
+ LTEXT "",IDC_ABT_TITLE_DESC,123,22,123,20
LTEXT "",IDC_ABT_PANEL_TEXT,160,43,140,8
CONTROL "",IDC_ABT_WEB_LINK,"SysLink", LWS_TRANSPARENT, 105,53,106,8
LTEXT "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.",
--
2.7.4
More information about the wine-devel
mailing list