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
d72e7af9
Commit
d72e7af9
authored
Oct 27, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Specify the full application path when starting winemenubuilder.exe.
parent
c4ebf368
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
33 deletions
+32
-33
changenotify.c
dlls/shell32/changenotify.c
+2
-26
shell32_main.h
dlls/shell32/shell32_main.h
+2
-0
shelllink.c
dlls/shell32/shelllink.c
+28
-7
No files found.
dlls/shell32/changenotify.c
View file @
d72e7af9
...
@@ -105,31 +105,6 @@ static const char * DumpEvent( LONG event )
...
@@ -105,31 +105,6 @@ static const char * DumpEvent( LONG event )
#undef DUMPEV
#undef DUMPEV
}
}
static
BOOL
RefreshFileTypeAssociations
(
void
)
{
static
WCHAR
szWinemenubuilder
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'e'
,
'n'
,
'u'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'-'
,
'a'
,
0
};
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
BOOL
ret
;
TRACE
(
"starting %s
\n
"
,
debugstr_w
(
szWinemenubuilder
));
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcessW
(
NULL
,
szWinemenubuilder
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
if
(
ret
)
{
CloseHandle
(
pi
.
hProcess
);
CloseHandle
(
pi
.
hThread
);
}
return
ret
;
}
static
const
char
*
NodeName
(
const
NOTIFICATIONLIST
*
item
)
static
const
char
*
NodeName
(
const
NOTIFICATIONLIST
*
item
)
{
{
const
char
*
str
;
const
char
*
str
;
...
@@ -425,8 +400,9 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
...
@@ -425,8 +400,9 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
if
(
wEventId
&
SHCNE_ASSOCCHANGED
)
if
(
wEventId
&
SHCNE_ASSOCCHANGED
)
{
{
static
const
WCHAR
args
[]
=
{
' '
,
'-'
,
'a'
,
0
};
TRACE
(
"refreshing file type associations
\n
"
);
TRACE
(
"refreshing file type associations
\n
"
);
RefreshFileTypeAssociations
(
);
run_winemenubuilder
(
args
);
}
}
/* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */
/* if we allocated it, free it. The ANSI flag is also set in its Unicode sibling. */
...
...
dlls/shell32/shell32_main.h
View file @
d72e7af9
...
@@ -197,6 +197,8 @@ BOOL UNIXFS_is_rooted_at_desktop(void);
...
@@ -197,6 +197,8 @@ BOOL UNIXFS_is_rooted_at_desktop(void);
extern
const
GUID
CLSID_UnixFolder
;
extern
const
GUID
CLSID_UnixFolder
;
extern
const
GUID
CLSID_UnixDosFolder
;
extern
const
GUID
CLSID_UnixDosFolder
;
extern
BOOL
run_winemenubuilder
(
const
WCHAR
*
args
);
/* Default shell folder value registration */
/* Default shell folder value registration */
HRESULT
SHELL_RegisterShellFolders
(
void
);
HRESULT
SHELL_RegisterShellFolders
(
void
);
...
...
dlls/shell32/shelllink.c
View file @
d72e7af9
...
@@ -395,30 +395,33 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFile
...
@@ -395,30 +395,33 @@ static HRESULT WINAPI IPersistFile_fnLoad(IPersistFile* iface, LPCOLESTR pszFile
return
r
;
return
r
;
}
}
static
BOOL
StartLinkProcessor
(
LPCOLESTR
szLink
)
BOOL
run_winemenubuilder
(
const
WCHAR
*
args
)
{
{
static
const
WCHAR
szFormat
[]
=
{
static
const
WCHAR
menubuilder
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'e'
,
'n'
,
'u'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'e'
,
'n'
,
'u'
,
'b'
,
'u'
,
'i'
,
'l'
,
'd'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'-'
,
'w'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
LONG
len
;
LONG
len
;
LPWSTR
buffer
;
LPWSTR
buffer
;
STARTUPINFOW
si
;
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
PROCESS_INFORMATION
pi
;
BOOL
ret
;
BOOL
ret
;
WCHAR
app
[
MAX_PATH
];
len
=
sizeof
(
szFormat
)
+
lstrlenW
(
szLink
)
*
sizeof
(
WCHAR
);
GetSystemDirectoryW
(
app
,
MAX_PATH
-
sizeof
(
menubuilder
)
/
sizeof
(
WCHAR
)
);
strcatW
(
app
,
menubuilder
);
len
=
(
strlenW
(
app
)
+
strlenW
(
args
)
+
1
)
*
sizeof
(
WCHAR
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
buffer
)
if
(
!
buffer
)
return
FALSE
;
return
FALSE
;
wsprintfW
(
buffer
,
szFormat
,
szLink
);
strcpyW
(
buffer
,
app
);
strcatW
(
buffer
,
args
);
TRACE
(
"starting %s
\n
"
,
debugstr_w
(
buffer
));
TRACE
(
"starting %s
\n
"
,
debugstr_w
(
buffer
));
memset
(
&
si
,
0
,
sizeof
(
si
));
memset
(
&
si
,
0
,
sizeof
(
si
));
si
.
cb
=
sizeof
(
si
);
si
.
cb
=
sizeof
(
si
);
ret
=
CreateProcessW
(
NULL
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcessW
(
app
,
buffer
,
NULL
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
...
@@ -431,6 +434,24 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink )
...
@@ -431,6 +434,24 @@ static BOOL StartLinkProcessor( LPCOLESTR szLink )
return
ret
;
return
ret
;
}
}
static
BOOL
StartLinkProcessor
(
LPCOLESTR
szLink
)
{
static
const
WCHAR
szFormat
[]
=
{
' '
,
'-'
,
'w'
,
' '
,
'"'
,
'%'
,
's'
,
'"'
,
0
};
LONG
len
;
LPWSTR
buffer
;
BOOL
ret
;
len
=
sizeof
(
szFormat
)
+
lstrlenW
(
szLink
)
*
sizeof
(
WCHAR
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
if
(
!
buffer
)
return
FALSE
;
wsprintfW
(
buffer
,
szFormat
,
szLink
);
ret
=
run_winemenubuilder
(
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
ret
;
}
static
HRESULT
WINAPI
IPersistFile_fnSave
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
,
BOOL
fRemember
)
static
HRESULT
WINAPI
IPersistFile_fnSave
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
,
BOOL
fRemember
)
{
{
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
IShellLinkImpl
*
This
=
impl_from_IPersistFile
(
iface
);
...
...
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