Module: wine Branch: master Commit: 28ec8565f036849e25eeffc0f30835863bf65e77 URL: http://source.winehq.org/git/wine.git/?a=commit;h=28ec8565f036849e25eeffc0f3...
Author: Nikolay Sivov bunglehead@gmail.com Date: Thu Oct 1 21:52:16 2009 +0400
comctl32/monthcal: Don't request locale data when it isn't needed.
---
dlls/comctl32/monthcal.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c index 71e477e..16d3dcf 100644 --- a/dlls/comctl32/monthcal.c +++ b/dlls/comctl32/monthcal.c @@ -877,18 +877,19 @@ static LRESULT MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day) { int prev = MAKELONG(infoPtr->firstDay, infoPtr->firstDayHighWord); - int localFirstDay; - WCHAR buf[40];
TRACE("day %d\n", day);
- GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, countof(buf)); - TRACE("%s %d\n", debugstr_w(buf), strlenW(buf)); - - localFirstDay = atoiW(buf); - if(day == -1) { + int localFirstDay; + WCHAR buf[80]; + + GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_IFIRSTDAYOFWEEK, buf, countof(buf)); + TRACE("%s %d\n", debugstr_w(buf), strlenW(buf)); + + localFirstDay = atoiW(buf); + infoPtr->firstDay = localFirstDay; infoPtr->firstDayHighWord = FALSE; }