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
9954735e
Commit
9954735e
authored
Jun 08, 2010
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Jun 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Also extract .lnk icons from file types's open handler.
parent
a2791a09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
+20
-10
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+20
-10
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
9954735e
...
...
@@ -819,10 +819,11 @@ static int ExtractFromICO(LPCWSTR szFileName, char *szXPMFileName)
static
int
ExtractFromFileType
(
LPCWSTR
szFileName
,
char
*
szXPMFileName
)
{
int
ret
=
1
;
int
ret
=
0
;
WCHAR
*
extension
;
WCHAR
*
icon
=
NULL
;
WCHAR
*
comma
;
WCHAR
*
executable
=
NULL
;
int
index
=
0
;
char
*
output_path
=
NULL
;
...
...
@@ -831,21 +832,30 @@ static int ExtractFromFileType(LPCWSTR szFileName, char *szXPMFileName)
goto
end
;
icon
=
assoc_query
(
ASSOCSTR_DEFAULTICON
,
extension
,
NULL
);
if
(
icon
==
NULL
)
goto
end
;
comma
=
strrchrW
(
icon
,
','
);
if
(
comma
)
if
(
icon
)
{
comma
=
strrchrW
(
icon
,
','
);
if
(
comma
)
{
*
comma
=
0
;
index
=
atoiW
(
comma
+
1
);
}
output_path
=
extract_icon
(
icon
,
index
,
NULL
,
FALSE
);
WINE_TRACE
(
"defaulticon %s -> icon %s
\n
"
,
wine_dbgstr_w
(
icon
),
wine_dbgstr_a
(
output_path
));
}
else
{
*
comma
=
0
;
index
=
atoiW
(
comma
+
1
);
executable
=
assoc_query
(
ASSOCSTR_EXECUTABLE
,
extension
,
NULL
);
if
(
executable
)
output_path
=
extract_icon
(
executable
,
0
,
NULL
,
FALSE
);
WINE_TRACE
(
"executable %s -> icon %s
\n
"
,
wine_dbgstr_w
(
executable
),
wine_dbgstr_a
(
output_path
));
}
output_path
=
extract_icon
(
icon
,
index
,
NULL
,
FALSE
);
if
(
output_path
)
ret
=
rename
(
output_path
,
szXPMFileName
);
ret
=
(
rename
(
output_path
,
szXPMFileName
)
==
0
);
end:
HeapFree
(
GetProcessHeap
(),
0
,
icon
);
HeapFree
(
GetProcessHeap
(),
0
,
executable
);
HeapFree
(
GetProcessHeap
(),
0
,
output_path
);
return
ret
;
}
...
...
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