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
01e82f2b
Commit
01e82f2b
authored
Oct 25, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Oct 25, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Abstract autoarranging decision to a helper function.
parent
5b836146
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
listview.c
dlls/comctl32/listview.c
+17
-13
No files found.
dlls/comctl32/listview.c
View file @
01e82f2b
...
...
@@ -1169,6 +1169,13 @@ static inline LRESULT CallWindowProcT(WNDPROC proc, HWND hwnd, UINT uMsg,
else
return
CallWindowProcA
(
proc
,
hwnd
,
uMsg
,
wParam
,
lParam
);
}
static
inline
BOOL
is_autoarrange
(
LISTVIEW_INFO
*
infoPtr
)
{
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
return
(
infoPtr
->
dwStyle
&
LVS_AUTOARRANGE
)
&&
(
uView
==
LVS_ICON
||
uView
==
LVS_SMALLICON
);
}
/******** Internal API functions ************************************/
static
inline
COLUMN_INFO
*
LISTVIEW_GetColumnInfo
(
LISTVIEW_INFO
*
infoPtr
,
INT
nSubItem
)
...
...
@@ -4034,7 +4041,7 @@ static void LISTVIEW_ScrollOnInsert(LISTVIEW_INFO *infoPtr, INT nItem, INT dir)
assert
(
abs
(
dir
)
==
1
);
/* arrange icons if autoarrange is on */
if
(
i
nfoPtr
->
dwStyle
&
LVS_AUTOARRANGE
)
if
(
i
s_autoarrange
(
infoPtr
)
)
{
BOOL
arrange
=
TRUE
;
if
(
dir
<
0
&&
nItem
>=
infoPtr
->
nItemCount
)
arrange
=
FALSE
;
...
...
@@ -6819,14 +6826,12 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare,
*/
static
BOOL
LISTVIEW_Update
(
LISTVIEW_INFO
*
infoPtr
,
INT
nItem
)
{
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
TRACE
(
"(nItem=%d)
\n
"
,
nItem
);
if
(
nItem
<
0
&&
nItem
>=
infoPtr
->
nItemCount
)
return
FALSE
;
/* rearrange with default alignment style */
if
(
(
infoPtr
->
dwStyle
&
LVS_AUTOARRANGE
)
&&
(
uView
==
LVS_ICON
||
uView
==
LVS_SMALLICON
))
if
(
is_autoarrange
(
infoPtr
))
LISTVIEW_Arrange
(
infoPtr
,
LVA_DEFAULT
);
else
LISTVIEW_InvalidateItem
(
infoPtr
,
nItem
);
...
...
@@ -7653,12 +7658,13 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, LPNMHEADERW l
*/
static
LRESULT
LISTVIEW_NotifyFormat
(
LISTVIEW_INFO
*
infoPtr
,
HWND
hwndFrom
,
INT
nCommand
)
{
TRACE
(
"(hwndFrom=%p, nCommand=%d)
\n
"
,
hwndFrom
,
nCommand
);
TRACE
(
"(hwndFrom=%p, nCommand=%d)
\n
"
,
hwndFrom
,
nCommand
);
if
(
nCommand
==
NF_REQUERY
)
infoPtr
->
notifyFormat
=
SendMessageW
(
hwndFrom
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwndSelf
,
(
LPARAM
)
NF_QUERY
);
return
0
;
if
(
nCommand
!=
NF_REQUERY
)
return
0
;
infoPtr
->
notifyFormat
=
SendMessageW
(
hwndFrom
,
WM_NOTIFYFORMAT
,
(
WPARAM
)
infoPtr
->
hwndSelf
,
NF_QUERY
);
return
0
;
}
/***
...
...
@@ -7961,15 +7967,13 @@ static LRESULT LISTVIEW_SetRedraw(LISTVIEW_INFO *infoPtr, BOOL bRedraw)
*/
static
LRESULT
LISTVIEW_Size
(
LISTVIEW_INFO
*
infoPtr
,
int
Width
,
int
Height
)
{
UINT
uView
=
infoPtr
->
dwStyle
&
LVS_TYPEMASK
;
TRACE
(
"(width=%d, height=%d)
\n
"
,
Width
,
Height
);
if
(
!
is_redrawing
(
infoPtr
))
return
0
;
if
(
!
LISTVIEW_UpdateSize
(
infoPtr
))
return
0
;
if
(
(
infoPtr
->
dwStyle
&
LVS_AUTOARRANGE
)
&&
(
uView
==
LVS_SMALLICON
||
uView
==
LVS_ICON
))
if
(
is_autoarrange
(
infoPtr
))
LISTVIEW_Arrange
(
infoPtr
,
LVA_DEFAULT
);
LISTVIEW_UpdateScroll
(
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