Reece Dunn : winefile: In the Options > Font menu handler, initially select the current font.

Alexandre Julliard julliard at winehq.org
Tue Feb 8 17:23:49 CST 2011


Module: wine
Branch: master
Commit: c013e44b1eae46a996334f063047bd34384c9210
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c013e44b1eae46a996334f063047bd34384c9210

Author: Reece Dunn <msclrhd at gmail.com>
Date:   Tue Feb  8 19:03:25 2011 +0000

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;




More information about the wine-cvs mailing list