Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
09d883fb
Commit
09d883fb
authored
Aug 08, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Properly adjust selections on scrolling.
parent
76d3e1d5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
23 deletions
+34
-23
monthcal.c
dlls/comctl32/monthcal.c
+34
-23
No files found.
dlls/comctl32/monthcal.c
View file @
09d883fb
...
...
@@ -1820,6 +1820,39 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr)
}
}
/* no valid range check performed */
static
void
MONTHCAL_Scroll
(
MONTHCAL_INFO
*
infoPtr
,
INT
delta
)
{
INT
i
,
selIdx
=
-
1
;
for
(
i
=
0
;
i
<
infoPtr
->
cal_num
;
i
++
)
{
/* save selection position to shift it later */
if
(
selIdx
==
-
1
&&
MONTHCAL_CompareMonths
(
&
infoPtr
->
minSel
,
&
infoPtr
->
calendars
[
i
].
month
)
==
0
)
selIdx
=
i
;
MONTHCAL_GetMonth
(
&
infoPtr
->
calendars
[
i
].
month
,
delta
);
}
/* selection is always shifted to first calendar */
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
{
SYSTEMTIME
range
[
2
];
MONTHCAL_GetSelRange
(
infoPtr
,
range
);
MONTHCAL_GetMonth
(
&
range
[
0
],
delta
-
selIdx
);
MONTHCAL_GetMonth
(
&
range
[
1
],
delta
-
selIdx
);
MONTHCAL_SetSelRange
(
infoPtr
,
range
);
}
else
{
SYSTEMTIME
st
=
infoPtr
->
minSel
;
MONTHCAL_GetMonth
(
&
st
,
delta
-
selIdx
);
MONTHCAL_SetCurSel
(
infoPtr
,
&
st
);
}
}
static
void
MONTHCAL_GoToMonth
(
MONTHCAL_INFO
*
infoPtr
,
enum
nav_direction
direction
)
{
INT
delta
=
infoPtr
->
delta
?
infoPtr
->
delta
:
infoPtr
->
cal_num
;
...
...
@@ -1841,29 +1874,7 @@ static void MONTHCAL_GoToMonth(MONTHCAL_INFO *infoPtr, enum nav_direction direct
if
(
!
MONTHCAL_IsDateInValidRange
(
infoPtr
,
&
st
,
FALSE
))
return
;
if
(
infoPtr
->
dwStyle
&
MCS_MULTISELECT
)
{
SYSTEMTIME
range
[
2
];
range
[
0
]
=
infoPtr
->
minSel
;
range
[
1
]
=
infoPtr
->
maxSel
;
if
(
direction
==
DIRECTION_BACKWARD
)
{
MONTHCAL_GetMonth
(
&
range
[
0
],
-
delta
);
MONTHCAL_GetMonth
(
&
range
[
1
],
-
delta
);
}
else
{
MONTHCAL_GetMonth
(
&
range
[
0
],
delta
);
MONTHCAL_GetMonth
(
&
range
[
1
],
delta
);
}
MONTHCAL_SetSelRange
(
infoPtr
,
range
);
}
else
MONTHCAL_SetCurSel
(
infoPtr
,
&
st
);
MONTHCAL_Scroll
(
infoPtr
,
direction
==
DIRECTION_BACKWARD
?
-
delta
:
delta
);
MONTHCAL_NotifyDayState
(
infoPtr
);
MONTHCAL_NotifySelectionChange
(
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