Commit 94666ebf authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/monthcal: Prepare MCM_GETMONTHRANGE with GMR_VISIBLE for multiple calendars.

parent 34fba5a2
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Copyright 1999 Chris Morgan <cmorgan@wpi.edu> and * Copyright 1999 Chris Morgan <cmorgan@wpi.edu> and
* James Abbatiello <abbeyj@wpi.edu> * James Abbatiello <abbeyj@wpi.edu>
* Copyright 2000 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> * Copyright 2000 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* Copyright 2009 Nikolay Sivov * Copyright 2009, 2010 Nikolay Sivov
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -1241,7 +1241,8 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day) ...@@ -1241,7 +1241,8 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day)
{ {
/* Native behaviour for that case is broken: invalid date number >31 /* Native behaviour for that case is broken: invalid date number >31
got displayed at (0,0) position, current month starts always from got displayed at (0,0) position, current month starts always from
(1,0) position. Should be implemnted here as well. */ (1,0) position. Should be implemented here as well only if there's
nothing else to do. */
if (day < -1) if (day < -1)
FIXME("No bug compatibility for day=%d\n", day); FIXME("No bug compatibility for day=%d\n", day);
...@@ -1261,19 +1262,18 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day) ...@@ -1261,19 +1262,18 @@ MONTHCAL_SetFirstDayOfWeek(MONTHCAL_INFO *infoPtr, INT day)
static LRESULT static LRESULT
MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st) MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st)
{ {
TRACE("\n"); TRACE("flag=%d, st=%p\n", flag, st);
if(st) if(st)
{ {
switch (flag) { switch (flag) {
case GMR_VISIBLE: case GMR_VISIBLE:
{ {
/*FIXME: currently multicalendar feature isn't implemented, so entirely st[0] = infoPtr->calendars[0].month;
visible month is current */ st[1] = infoPtr->calendars[infoPtr->cal_num-1].month;
st[0] = st[1] = infoPtr->curSel;
if (infoPtr->curSel.wMonth == min_allowed_date.wMonth && if (st[0].wMonth == min_allowed_date.wMonth &&
infoPtr->curSel.wYear == min_allowed_date.wYear) st[0].wYear == min_allowed_date.wYear)
{ {
st[0].wDay = min_allowed_date.wDay; st[0].wDay = min_allowed_date.wDay;
} }
...@@ -1283,8 +1283,8 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st) ...@@ -1283,8 +1283,8 @@ MONTHCAL_GetMonthRange(const MONTHCAL_INFO *infoPtr, DWORD flag, SYSTEMTIME *st)
st[1].wDay = MONTHCAL_MonthLength(st[1].wMonth, st[1].wYear); st[1].wDay = MONTHCAL_MonthLength(st[1].wMonth, st[1].wYear);
MONTHCAL_CalculateDayOfWeek(&st[1], TRUE); MONTHCAL_CalculateDayOfWeek(&st[1], TRUE);
/* a single current month used */
return 1; return infoPtr->cal_num;
} }
case GMR_DAYSTATE: case GMR_DAYSTATE:
{ {
......
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