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
1c3d6ab9
Commit
1c3d6ab9
authored
Nov 29, 2016
by
Lauri Kenttä
Committed by
Alexandre Julliard
Nov 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Cosmetic changes to file type names.
Signed-off-by:
Lauri Kenttä
<
lauri.kentta@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
590c9080
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
pidl.c
dlls/shell32/pidl.c
+8
-5
shell32_main.c
dlls/shell32/shell32_main.c
+18
-5
No files found.
dlls/shell32/pidl.c
View file @
1c3d6ab9
...
...
@@ -2408,15 +2408,18 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{
char
sTemp
[
64
];
if
(
uOutSize
>
0
)
pOut
[
0
]
=
0
;
if
(
_ILGetExtension
(
pidl
,
sTemp
,
64
))
/* "name" or "name." or any unhandled => "File" */
lstrcpynA
(
pOut
,
"File"
,
uOutSize
);
/* If there's space for more, try to get a better description. */
if
(
uOutSize
>
6
&&
_ILGetExtension
(
pidl
,
sTemp
,
64
))
{
if
(
!
(
HCR_MapTypeToValueA
(
sTemp
,
sTemp
,
64
,
TRUE
)
&&
HCR_MapTypeToValueA
(
sTemp
,
pOut
,
uOutSize
,
FALSE
)))
&&
HCR_MapTypeToValueA
(
sTemp
,
pOut
,
uOutSize
,
FALSE
))
&&
sTemp
[
0
])
{
lstrcpynA
(
pOut
,
sTemp
,
uOutSize
-
6
);
strcat
(
pOut
,
"
-
file"
);
strcat
(
pOut
,
"
file"
);
}
}
}
...
...
dlls/shell32/shell32_main.c
View file @
1c3d6ab9
...
...
@@ -537,8 +537,9 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
/* get the type name */
if
(
SUCCEEDED
(
hr
)
&&
(
flags
&
SHGFI_TYPENAME
))
{
static
const
WCHAR
szFolder
[]
=
{
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
szFile
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
sz
DashFile
[]
=
{
'-
'
,
'f'
,
'i'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
sz
SpaceFile
[]
=
{
'
'
,
'f'
,
'i'
,
'l'
,
'e'
,
0
};
if
(
!
(
flags
&
SHGFI_USEFILEATTRIBUTES
)
||
(
flags
&
SHGFI_PIDL
))
{
...
...
@@ -550,17 +551,29 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
else
{
if
(
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
strcatW
(
psfi
->
szTypeName
,
szF
ile
);
strcatW
(
psfi
->
szTypeName
,
szF
older
);
else
{
WCHAR
sTemp
[
64
];
lstrcpyW
(
sTemp
,
PathFindExtensionW
(
szFullPath
));
if
(
!
(
HCR_MapTypeToValueW
(
sTemp
,
sTemp
,
64
,
TRUE
)
&&
if
(
sTemp
[
0
]
==
0
||
(
sTemp
[
0
]
==
'.'
&&
sTemp
[
1
]
==
0
))
{
/* "name" or "name." => "File" */
lstrcpynW
(
psfi
->
szTypeName
,
szFile
,
64
);
}
else
if
(
!
(
HCR_MapTypeToValueW
(
sTemp
,
sTemp
,
64
,
TRUE
)
&&
HCR_MapTypeToValueW
(
sTemp
,
psfi
->
szTypeName
,
80
,
FALSE
)))
{
lstrcpynW
(
psfi
->
szTypeName
,
sTemp
,
64
);
strcatW
(
psfi
->
szTypeName
,
szDashFile
);
if
(
sTemp
[
0
])
{
lstrcpynW
(
psfi
->
szTypeName
,
sTemp
,
64
);
strcatW
(
psfi
->
szTypeName
,
szSpaceFile
);
}
else
{
lstrcpynW
(
psfi
->
szTypeName
,
szFile
,
64
);
}
}
}
}
...
...
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