Commit 0666c0da authored by Damjan Jovanovic's avatar Damjan Jovanovic Committed by Alexandre Julliard

winemenubuilder: associate .lnk files with wine.

parent 231396de
...@@ -1994,6 +1994,14 @@ static BOOL is_extension_blacklisted(LPCWSTR extension) ...@@ -1994,6 +1994,14 @@ static BOOL is_extension_blacklisted(LPCWSTR extension)
return FALSE; return FALSE;
} }
static const char* get_special_mime_type(LPCWSTR extension)
{
static const WCHAR lnkW[] = {'.','l','n','k',0};
if (!strcmpiW(extension, lnkW))
return "application/x-ms-shortcut";
return NULL;
}
static BOOL write_freedesktop_association_entry(const char *desktopPath, const char *dot_extension, static BOOL write_freedesktop_association_entry(const char *desktopPath, const char *dot_extension,
const char *friendlyAppName, const char *mimeType, const char *friendlyAppName, const char *mimeType,
const char *progId) const char *progId)
...@@ -2102,6 +2110,8 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package ...@@ -2102,6 +2110,8 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
{ {
if (contentTypeW != NULL && strchrW(contentTypeW, '/')) if (contentTypeW != NULL && strchrW(contentTypeW, '/'))
mimeTypeA = wchars_to_utf8_chars(contentTypeW); mimeTypeA = wchars_to_utf8_chars(contentTypeW);
else if ((get_special_mime_type(extensionW)))
mimeTypeA = strdupA(get_special_mime_type(extensionW));
else else
mimeTypeA = heap_printf("application/x-wine-extension-%s", &extensionA[1]); mimeTypeA = heap_printf("application/x-wine-extension-%s", &extensionA[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment