winemenubuilder: use the command from the "open" verb

Damjan Jovanovic damjan.jov at gmail.com
Tue Aug 23 21:47:07 CDT 2011


Changelog:
* winemenubuilder: use the command from the "open" verb

ASSOCSTR_COMMAND, and all values derived from it, are specific to the
verb. If no verb is specified, the first one found is used. Since we
currently only support "open", that verb should be used everywhere.

Damjan Jovanovic
-------------- next part --------------
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 6d627cb..baf03b2 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -974,6 +974,7 @@ end:
 
 static HRESULT open_file_type_icon(LPCWSTR szFileName, IStream **ppStream)
 {
+    static const WCHAR openW[] = {'o','p','e','n',0};
     WCHAR *extension;
     WCHAR *icon = NULL;
     WCHAR *comma;
@@ -999,7 +1000,7 @@ static HRESULT open_file_type_icon(LPCWSTR szFileName, IStream **ppStream)
     }
     else
     {
-        executable = assoc_query(ASSOCSTR_EXECUTABLE, extension, NULL);
+        executable = assoc_query(ASSOCSTR_EXECUTABLE, extension, openW);
         if (executable)
             hr = open_icon(executable, 0, FALSE, ppStream);
     }
@@ -2612,7 +2613,7 @@ static BOOL generate_associations(const char *xdg_data_home, const char *package
             if (executableW)
                 openWithIconA = extract_icon(executableW, 0, NULL, FALSE);
 
-            friendlyAppNameW = assoc_query(ASSOCSTR_FRIENDLYAPPNAME, extensionW, NULL);
+            friendlyAppNameW = assoc_query(ASSOCSTR_FRIENDLYAPPNAME, extensionW, openW);
             if (friendlyAppNameW)
             {
                 friendlyAppNameA = wchars_to_utf8_chars(friendlyAppNameW);


More information about the wine-patches mailing list