Commit 3073a172 authored by Alexandre Julliard's avatar Alexandre Julliard

winecfg: Avoid depending on the PACKAGE_* macros.

parent 928d1e64
......@@ -24,8 +24,6 @@
#define COBJMACROS
#include "config.h"
#include <windows.h>
#include <commctrl.h>
#include <shellapi.h>
......@@ -40,6 +38,9 @@ static HFONT titleFont = NULL;
INT_PTR CALLBACK
AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static const WCHAR openW[] = {'o','p','e','n',0};
static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
const char * (CDECL *wine_get_version)(void);
HWND hWnd;
HDC hDC;
RECT rcClient, rcRect;
......@@ -72,13 +73,12 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case NM_CLICK:
case NM_RETURN:
if(wParam == IDC_ABT_WEB_LINK)
ShellExecuteA(NULL, "open", PACKAGE_URL, NULL, NULL, SW_SHOW);
ShellExecuteW(NULL, openW, ((NMLINK *)lParam)->item.szUrl, NULL, NULL, SW_SHOW);
break;
}
break;
case WM_INITDIALOG:
hDC = GetDC(hDlg);
/* read owner and organization info from registry, load it into text box */
......@@ -108,20 +108,12 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
/* prepare the title text */
hWnd = GetDlgItem(hDlg, IDC_ABT_TITLE_TEXT);
if(hWnd)
{
static const WCHAR tahomaW[] = {'T','a','h','o','m','a',0};
titleFont = CreateFontW(
-MulDiv(24, GetDeviceCaps(hDC, LOGPIXELSY), 72),
0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, tahomaW);
SendMessageW(hWnd, WM_SETFONT, (WPARAM)titleFont, TRUE);
SetWindowTextA(hWnd, PACKAGE_NAME);
}
SetDlgItemTextA(hDlg, IDC_ABT_PANEL_TEXT, PACKAGE_VERSION);
titleFont = CreateFontW( -MulDiv(24, GetDeviceCaps(hDC, LOGPIXELSY), 72),
0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0, tahomaW );
SendDlgItemMessageW(hDlg, IDC_ABT_TITLE_TEXT, WM_SETFONT, (WPARAM)titleFont, TRUE);
/* prepare the web link */
SetDlgItemTextA(hDlg, IDC_ABT_WEB_LINK, "<a href=\"" PACKAGE_URL "\">" PACKAGE_URL "</a>");
wine_get_version = (void *)GetProcAddress( GetModuleHandleA("ntdll.dll"), "wine_get_version" );
if (wine_get_version) SetDlgItemTextA(hDlg, IDC_ABT_PANEL_TEXT, wine_get_version());
ReleaseDC(hDlg, hDC);
......
......@@ -20,7 +20,6 @@
*
*/
#include "config.h" /* Needed for the PACKAGE_STRING definition */
#include "resource.h"
#pragma makedep po
......@@ -134,9 +133,9 @@ 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 "Wine",IDC_ABT_TITLE_TEXT,105,30,55,30
LTEXT "",IDC_ABT_PANEL_TEXT,160,43,140,8
CONTROL "",IDC_ABT_WEB_LINK,"SysLink", LWS_TRANSPARENT, 105,53,106,8
CONTROL "#msgctxt#do not translate#<a href=\"https://www.winehq.org\">https://www.winehq.org</a>",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.",
IDC_ABT_LICENSE_TEXT,105,64,145,66
GROUPBOX "Windows registration information", IDC_STATIC, 15, 155, 230, 55
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment