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
a3508545
Commit
a3508545
authored
Jul 31, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/monthcal: Rename button navigation helper to better reflect its purpose.
parent
8851a4eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
monthcal.c
dlls/comctl32/monthcal.c
+14
-8
No files found.
dlls/comctl32/monthcal.c
View file @
a3508545
...
...
@@ -150,6 +150,12 @@ static const SYSTEMTIME st_null;
static
const
SYSTEMTIME
max_allowed_date
=
{
.
wYear
=
9999
,
.
wMonth
=
12
,
.
wDay
=
31
};
static
const
SYSTEMTIME
min_allowed_date
=
{
.
wYear
=
1752
,
.
wMonth
=
9
,
.
wDay
=
14
};
/* Prev/Next buttons */
enum
nav_direction
{
DIRECTION_BACKWARD
,
DIRECTION_FORWARD
};
#define MONTHCAL_GetInfoPtr(hwnd) ((MONTHCAL_INFO *)GetWindowLongPtrW(hwnd, 0))
...
...
@@ -1764,13 +1770,13 @@ static void MONTHCAL_NotifyDayState(MONTHCAL_INFO *infoPtr)
}
}
static
void
MONTHCAL_GoTo
PrevNextMonth
(
MONTHCAL_INFO
*
infoPtr
,
BOOL
prev
)
static
void
MONTHCAL_GoTo
Month
(
MONTHCAL_INFO
*
infoPtr
,
enum
nav_direction
direction
)
{
SYSTEMTIME
st
=
infoPtr
->
curSel
;
TRACE
(
"%s
\n
"
,
prev
?
"prev"
:
"next
"
);
TRACE
(
"%s
\n
"
,
direction
==
DIRECTION_BACKWARD
?
"back"
:
"fwd
"
);
if
(
prev
)
MONTHCAL_GetPrevMonth
(
&
st
);
else
MONTHCAL_GetNextMonth
(
&
st
);
if
(
direction
==
DIRECTION_BACKWARD
)
MONTHCAL_GetPrevMonth
(
&
st
);
else
MONTHCAL_GetNextMonth
(
&
st
);
if
(
!
MONTHCAL_IsDateInValidRange
(
infoPtr
,
&
st
,
FALSE
))
return
;
...
...
@@ -1781,7 +1787,7 @@ static void MONTHCAL_GoToPrevNextMonth(MONTHCAL_INFO *infoPtr, BOOL prev)
range
[
0
]
=
infoPtr
->
minSel
;
range
[
1
]
=
infoPtr
->
maxSel
;
if
(
prev
)
if
(
direction
==
DIRECTION_BACKWARD
)
{
MONTHCAL_GetPrevMonth
(
&
range
[
0
]);
MONTHCAL_GetPrevMonth
(
&
range
[
1
]);
...
...
@@ -1939,14 +1945,14 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
switch
(
hit
)
{
case
MCHT_TITLEBTNNEXT
:
MONTHCAL_GoTo
PrevNextMonth
(
infoPtr
,
FALSE
);
MONTHCAL_GoTo
Month
(
infoPtr
,
DIRECTION_FORWARD
);
infoPtr
->
status
=
MC_NEXTPRESSED
;
SetTimer
(
infoPtr
->
hwndSelf
,
MC_PREVNEXTMONTHTIMER
,
MC_PREVNEXTMONTHDELAY
,
0
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
return
0
;
case
MCHT_TITLEBTNPREV
:
MONTHCAL_GoTo
PrevNextMonth
(
infoPtr
,
TRUE
);
MONTHCAL_GoTo
Month
(
infoPtr
,
DIRECTION_BACKWARD
);
infoPtr
->
status
=
MC_PREVPRESSED
;
SetTimer
(
infoPtr
->
hwndSelf
,
MC_PREVNEXTMONTHTIMER
,
MC_PREVNEXTMONTHDELAY
,
0
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
...
...
@@ -2081,8 +2087,8 @@ MONTHCAL_Timer(MONTHCAL_INFO *infoPtr, WPARAM id)
switch
(
id
)
{
case
MC_PREVNEXTMONTHTIMER
:
if
(
infoPtr
->
status
&
MC_NEXTPRESSED
)
MONTHCAL_GoTo
PrevNextMonth
(
infoPtr
,
FALSE
);
if
(
infoPtr
->
status
&
MC_PREVPRESSED
)
MONTHCAL_GoTo
PrevNextMonth
(
infoPtr
,
TRUE
);
if
(
infoPtr
->
status
&
MC_NEXTPRESSED
)
MONTHCAL_GoTo
Month
(
infoPtr
,
DIRECTION_FORWARD
);
if
(
infoPtr
->
status
&
MC_PREVPRESSED
)
MONTHCAL_GoTo
Month
(
infoPtr
,
DIRECTION_BACKWARD
);
InvalidateRect
(
infoPtr
->
hwndSelf
,
NULL
,
FALSE
);
break
;
case
MC_TODAYUPDATETIMER
:
...
...
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