Module: wine Branch: master Commit: 1a3b85a5bda240ef96a678781ef1a98e595932dd URL: http://source.winehq.org/git/wine.git/?a=commit;h=1a3b85a5bda240ef96a678781e...
Author: Per Johansson per@morth.org Date: Thu Aug 11 20:21:25 2011 +0200
winemenubuilder: Use start.exe to open URLs to respect URL handlers in registry.
---
programs/winemenubuilder/winemenubuilder.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c index 6d627cb..e6dc504 100644 --- a/programs/winemenubuilder/winemenubuilder.c +++ b/programs/winemenubuilder/winemenubuilder.c @@ -2962,6 +2962,7 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link IPropertyStorage *pPropStg; PROPSPEC ps[2]; PROPVARIANT pv[2]; + char *start_path = NULL;
if ( !link ) { @@ -3004,6 +3005,13 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link goto cleanup; }
+ start_path = get_start_exe_path(); + if (start_path == NULL) + { + WINE_ERR("out of memory\n"); + goto cleanup; + } + ps[0].ulKind = PRSPEC_PROPID; ps[0].u.propid = PID_IS_ICONFILE; ps[1].ulKind = PRSPEC_PROPID; @@ -3063,14 +3071,14 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link location = heap_printf("%s/%s.desktop", xdg_desktop_dir, lastEntry); if (location) { - r = !write_desktop_entry(NULL, location, lastEntry, "winebrowser", escaped_urlPath, NULL, NULL, icon_name); + r = !write_desktop_entry(NULL, location, lastEntry, start_path, escaped_urlPath, NULL, NULL, icon_name); if (r == 0) chmod(location, 0755); HeapFree(GetProcessHeap(), 0, location); } } else - r = !write_menu_entry(unix_link, link_name, "winebrowser", escaped_urlPath, NULL, NULL, icon_name); + r = !write_menu_entry(unix_link, link_name, start_path, escaped_urlPath, NULL, NULL, icon_name); ret = (r != 0); ReleaseSemaphore(hSem, 1, NULL);