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
9d80b367
Commit
9d80b367
authored
Apr 05, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
May 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: Skip desktop integration for certain associations.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=41275
parent
fac1aabb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
5 deletions
+49
-5
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+49
-5
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
9d80b367
...
...
@@ -1974,6 +1974,46 @@ static BOOL is_extension_banned(LPCWSTR extension)
return
FALSE
;
}
static
BOOL
on_exclude_list
(
const
WCHAR
*
command
)
{
static
const
WCHAR
default_exclude_list
[]
=
L"ieframe.dll
\0
iexplore.exe
\0
notepad.exe
\0
"
L"winebrowser.exe
\0
wordpad.exe
\0
"
;
WCHAR
*
exclude_list
=
NULL
;
const
WCHAR
*
pattern
;
HKEY
key
;
DWORD
size
;
LSTATUS
status
;
BOOL
found
=
FALSE
;
if
((
key
=
open_associations_reg_key
()))
{
status
=
RegGetValueW
(
key
,
NULL
,
L"Exclude"
,
RRF_RT_REG_MULTI_SZ
,
NULL
,
NULL
,
&
size
);
if
(
status
==
ERROR_SUCCESS
)
{
exclude_list
=
xmalloc
(
size
);
status
=
RegGetValueW
(
key
,
NULL
,
L"Exclude"
,
RRF_RT_REG_MULTI_SZ
,
NULL
,
exclude_list
,
&
size
);
if
(
status
!=
ERROR_SUCCESS
)
{
heap_free
(
exclude_list
);
exclude_list
=
NULL
;
}
}
RegCloseKey
(
key
);
}
for
(
pattern
=
exclude_list
?
exclude_list
:
default_exclude_list
;
*
pattern
;
pattern
+=
wcslen
(
pattern
)
+
1
)
{
if
(
wcsstr
(
command
,
pattern
))
{
found
=
TRUE
;
break
;
}
}
heap_free
(
exclude_list
);
return
found
;
}
static
WCHAR
*
get_special_mime_type
(
LPCWSTR
extension
)
{
if
(
!
wcsicmp
(
extension
,
L".lnk"
))
...
...
@@ -2054,6 +2094,15 @@ static BOOL generate_associations(const WCHAR *packages_dir, const WCHAR *applic
WCHAR
*
mimeProgId
=
NULL
;
struct
rb_string_entry
*
entry
;
commandW
=
assoc_query
(
ASSOCSTR_COMMAND
,
extensionW
,
L"open"
);
if
(
commandW
==
NULL
)
/* no command => no application is associated */
goto
end
;
if
(
on_exclude_list
(
commandW
))
/* command is on the exclude list => desktop integration is not desirable */
goto
end
;
wcslwr
(
extensionW
);
friendlyDocNameW
=
assoc_query
(
ASSOCSTR_FRIENDLYDOCNAME
,
extensionW
,
NULL
);
...
...
@@ -2093,11 +2142,6 @@ static BOOL generate_associations(const WCHAR *packages_dir, const WCHAR *applic
hasChanged
=
TRUE
;
}
commandW
=
assoc_query
(
ASSOCSTR_COMMAND
,
extensionW
,
L"open"
);
if
(
commandW
==
NULL
)
/* no command => no application is associated */
goto
end
;
executableW
=
assoc_query
(
ASSOCSTR_EXECUTABLE
,
extensionW
,
L"open"
);
if
(
executableW
)
openWithIcon
=
compute_native_identifier
(
0
,
executableW
,
NULL
);
...
...
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