[PATCH] winefile: in the Options > Font menu handler, initially select the current font.
Reece Dunn
msclrhd at googlemail.com
Tue Feb 8 13:06:42 CST 2011
Hi,
This is a simple usability enhancement to the winefile program.
- Reece
-------------- next part --------------
From 6bcd0cedda2ad525282783b29b8b4cf53bf635c9 Mon Sep 17 00:00:00 2001
From: Reece Dunn <msclrhd at gmail.com>
Date: Tue, 8 Feb 2011 19:03:25 +0000
Subject: [PATCH] winefile: in the Options > Font menu handler, initially select the current font.
---
programs/winefile/winefile.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index aed4d14..1135407 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -263,11 +263,14 @@ static inline void choose_font(HWND hwnd)
LOGFONTW lFont;
HDC hdc = GetDC(hwnd);
+
+ GetObjectW(Globals.hfont, sizeof(LOGFONTW), &lFont);
+
chFont.lStructSize = sizeof(CHOOSEFONTW);
chFont.hwndOwner = hwnd;
chFont.hDC = NULL;
chFont.lpLogFont = &lFont;
- chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL;
+ chFont.Flags = CF_SCREENFONTS | CF_FORCEFONTEXIST | CF_LIMITSIZE | CF_NOSCRIPTSEL | CF_INITTOLOGFONTSTRUCT;
chFont.rgbColors = RGB(0,0,0);
chFont.lCustData = 0;
chFont.lpfnHook = NULL;
--
1.7.1
More information about the wine-patches
mailing list