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
7c8f5feb
Commit
7c8f5feb
authored
Feb 25, 2011
by
Damjan Jovanovic
Committed by
Alexandre Julliard
Feb 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemenubuilder: FriendlyDocName isn't part of the association.
parent
0e5aa05e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
winemenubuilder.c
programs/winemenubuilder/winemenubuilder.c
+4
-13
No files found.
programs/winemenubuilder/winemenubuilder.c
View file @
7c8f5feb
...
...
@@ -1971,10 +1971,9 @@ static HKEY open_associations_reg_key(void)
}
static
BOOL
has_association_changed
(
LPCWSTR
extensionW
,
LPCSTR
mimeType
,
LPCWSTR
progId
,
LPCSTR
appName
,
LPC
WSTR
docName
,
LPC
STR
openWithIcon
)
LPCSTR
appName
,
LPCSTR
openWithIcon
)
{
static
const
WCHAR
ProgIDW
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
DocNameW
[]
=
{
'D'
,
'o'
,
'c'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
MimeTypeW
[]
=
{
'M'
,
'i'
,
'm'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
AppNameW
[]
=
{
'A'
,
'p'
,
'p'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
OpenWithIconW
[]
=
{
'O'
,
'p'
,
'e'
,
'n'
,
'W'
,
'i'
,
't'
,
'h'
,
'I'
,
'c'
,
'o'
,
'n'
,
0
};
...
...
@@ -2003,11 +2002,6 @@ static BOOL has_association_changed(LPCWSTR extensionW, LPCSTR mimeType, LPCWSTR
ret
=
TRUE
;
HeapFree
(
GetProcessHeap
(),
0
,
valueA
);
value
=
reg_get_valW
(
assocKey
,
extensionW
,
DocNameW
);
if
(
docName
&&
(
!
value
||
strcmpW
(
value
,
docName
)))
ret
=
TRUE
;
HeapFree
(
GetProcessHeap
(),
0
,
value
);
valueA
=
reg_get_val_utf8
(
assocKey
,
extensionW
,
OpenWithIconW
);
if
((
openWithIcon
&&
!
valueA
)
||
(
!
openWithIcon
&&
valueA
)
||
...
...
@@ -2026,10 +2020,9 @@ static BOOL has_association_changed(LPCWSTR extensionW, LPCSTR mimeType, LPCWSTR
}
static
void
update_association
(
LPCWSTR
extension
,
LPCSTR
mimeType
,
LPCWSTR
progId
,
LPCSTR
appName
,
LPC
WSTR
docName
,
LPC
STR
desktopFile
,
LPCSTR
openWithIcon
)
LPCSTR
appName
,
LPCSTR
desktopFile
,
LPCSTR
openWithIcon
)
{
static
const
WCHAR
ProgIDW
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
DocNameW
[]
=
{
'D'
,
'o'
,
'c'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
MimeTypeW
[]
=
{
'M'
,
'i'
,
'm'
,
'e'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
static
const
WCHAR
AppNameW
[]
=
{
'A'
,
'p'
,
'p'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
DesktopFileW
[]
=
{
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
'F'
,
'i'
,
'l'
,
'e'
,
0
};
...
...
@@ -2088,8 +2081,6 @@ static void update_association(LPCWSTR extension, LPCSTR mimeType, LPCWSTR progI
RegSetValueExW
(
subkey
,
MimeTypeW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
mimeTypeW
,
(
lstrlenW
(
mimeTypeW
)
+
1
)
*
sizeof
(
WCHAR
));
RegSetValueExW
(
subkey
,
ProgIDW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
progId
,
(
lstrlenW
(
progId
)
+
1
)
*
sizeof
(
WCHAR
));
RegSetValueExW
(
subkey
,
AppNameW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
appNameW
,
(
lstrlenW
(
appNameW
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
docName
)
RegSetValueExW
(
subkey
,
DocNameW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
docName
,
(
lstrlenW
(
docName
)
+
1
)
*
sizeof
(
WCHAR
));
RegSetValueExW
(
subkey
,
DesktopFileW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
desktopFileW
,
(
lstrlenW
(
desktopFileW
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
openWithIcon
)
RegSetValueExW
(
subkey
,
OpenWithIconW
,
0
,
REG_SZ
,
(
const
BYTE
*
)
openWithIconW
,
(
lstrlenW
(
openWithIconW
)
+
1
)
*
sizeof
(
WCHAR
));
...
...
@@ -2455,7 +2446,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
}
}
if
(
has_association_changed
(
extensionW
,
mimeTypeA
,
progIdW
,
friendlyAppNameA
,
friendlyDocNameW
,
openWithIconA
))
if
(
has_association_changed
(
extensionW
,
mimeTypeA
,
progIdW
,
friendlyAppNameA
,
openWithIconA
))
{
char
*
desktopPath
=
heap_printf
(
"%s/wine-extension-%s.desktop"
,
applications_dir
,
&
extensionA
[
1
]);
if
(
desktopPath
)
...
...
@@ -2463,7 +2454,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
if
(
write_freedesktop_association_entry
(
desktopPath
,
extensionA
,
friendlyAppNameA
,
mimeTypeA
,
progIdA
,
openWithIconA
))
{
hasChanged
=
TRUE
;
update_association
(
extensionW
,
mimeTypeA
,
progIdW
,
friendlyAppNameA
,
friendlyDocNameW
,
desktopPath
,
openWithIconA
);
update_association
(
extensionW
,
mimeTypeA
,
progIdW
,
friendlyAppNameA
,
desktopPath
,
openWithIconA
);
}
HeapFree
(
GetProcessHeap
(),
0
,
desktopPath
);
}
...
...
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