Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
67665354
Commit
67665354
authored
Sep 23, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Sep 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Fix jump to today date.
parent
d3758e02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
9 deletions
+27
-9
monthcal.c
dlls/comctl32/monthcal.c
+27
-9
No files found.
dlls/comctl32/monthcal.c
View file @
67665354
...
...
@@ -1491,7 +1491,11 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
/* exit earlier if selection equals current */
if
(
MONTHCAL_IsDateEqual
(
&
infoPtr
->
minSel
,
curSel
))
return
TRUE
;
if
(
!
MONTHCAL_IsDateInValidRange
(
infoPtr
,
curSel
,
FALSE
))
return
FALSE
;
selection
=
*
curSel
;
selection
.
wHour
=
selection
.
wMinute
=
selection
.
wSecond
=
selection
.
wMilliseconds
=
0
;
MONTHCAL_CalculateDayOfWeek
(
&
selection
,
TRUE
);
if
(
!
MONTHCAL_IsDateInValidRange
(
infoPtr
,
&
selection
,
FALSE
))
return
FALSE
;
/* scroll calendars only if we have to */
diff
=
MONTHCAL_MonthDiff
(
&
infoPtr
->
calendars
[
MONTHCAL_GetCalCount
(
infoPtr
)
-
1
].
month
,
curSel
);
...
...
@@ -1509,6 +1513,7 @@ MONTHCAL_SetCurSel(MONTHCAL_INFO *infoPtr, SYSTEMTIME *curSel)
MONTHCAL_GetMonth
(
&
infoPtr
->
calendars
[
i
].
month
,
diff
);
}
/* we need to store time part as it is */
selection
=
*
curSel
;
MONTHCAL_CalculateDayOfWeek
(
&
selection
,
TRUE
);
infoPtr
->
minSel
=
infoPtr
->
maxSel
=
selection
;
...
...
@@ -1977,10 +1982,18 @@ MONTHCAL_RButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
if
(
TrackPopupMenu
(
hMenu
,
TPM_RIGHTBUTTON
|
TPM_NONOTIFY
|
TPM_RETURNCMD
,
menupoint
.
x
,
menupoint
.
y
,
0
,
infoPtr
->
hwndSelf
,
NULL
))
{
infoPtr
->
calendars
[
0
].
month
=
infoPtr
->
todaysDate
;
infoPtr
->
minSel
=
infoPtr
->
todaysDate
;
infoPtr
->
maxSel
=
infoPtr
->
todaysDate
;
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
{
SYSTEMTIME
range
[
2
];
range
[
0
]
=
range
[
1
]
=
infoPtr
->
todaysDate
;
MONTHCAL_SetSelRange
(
infoPtr
,
range
);
}
else
MONTHCAL_SetCurSel
(
infoPtr
,
&
infoPtr
->
todaysDate
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
MONTHCAL_NotifySelect
(
infoPtr
);
}
return
0
;
...
...
@@ -2153,10 +2166,15 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
}
case
MCHT_TODAYLINK
:
{
infoPtr
->
calendars
[
0
].
month
=
infoPtr
->
todaysDate
;
infoPtr
->
minSel
=
infoPtr
->
todaysDate
;
infoPtr
->
maxSel
=
infoPtr
->
todaysDate
;
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
{
SYSTEMTIME
range
[
2
];
range
[
0
]
=
range
[
1
]
=
infoPtr
->
todaysDate
;
MONTHCAL_SetSelRange
(
infoPtr
,
range
);
}
else
MONTHCAL_SetCurSel
(
infoPtr
,
&
infoPtr
->
todaysDate
);
MONTHCAL_NotifySelectionChange
(
infoPtr
);
MONTHCAL_NotifySelect
(
infoPtr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment