mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 01:12:25 +00:00
comdlg32: Remove duplicate code (PVS-Studio).
This commit is contained in:
parent
9b810cd6e8
commit
c4747f46cf
@ -3270,7 +3270,6 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
|
||||
int iIndentation;
|
||||
TEXTMETRICW tm;
|
||||
LPSFOLDER tmpFolder;
|
||||
LookInInfos *liInfos = GetPropA(pDIStruct->hwndItem,LookInInfosStr);
|
||||
UINT shgfi_flags = SHGFI_PIDL | SHGFI_OPENICON | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME;
|
||||
UINT icon_width, icon_height;
|
||||
|
||||
@ -3293,16 +3292,8 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
|
||||
shgfi_flags |= SHGFI_SMALLICON;
|
||||
}
|
||||
|
||||
if(pDIStruct->itemID == liInfos->uSelectedItem)
|
||||
{
|
||||
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
|
||||
0, &sfi, sizeof (sfi), shgfi_flags );
|
||||
}
|
||||
else
|
||||
{
|
||||
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
|
||||
0, &sfi, sizeof (sfi), shgfi_flags );
|
||||
}
|
||||
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
|
||||
0, &sfi, sizeof (sfi), shgfi_flags );
|
||||
|
||||
/* Is this item selected ? */
|
||||
if(pDIStruct->itemState & ODS_SELECTED)
|
||||
@ -3320,16 +3311,10 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
|
||||
|
||||
/* Do not indent item if drawing in the edit of the combo */
|
||||
if(pDIStruct->itemState & ODS_COMBOBOXEDIT)
|
||||
{
|
||||
iIndentation = 0;
|
||||
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
|
||||
0, &sfi, sizeof (sfi), shgfi_flags );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
iIndentation = tmpFolder->m_iIndent;
|
||||
}
|
||||
|
||||
/* Draw text and icon */
|
||||
|
||||
/* Initialise the icon display area */
|
||||
|
Loading…
Reference in New Issue
Block a user