Support file associations using "show" verb under MSW too.
If we failed to find the "open" command, try the "show" one as some programs (notable Microsoft viewers for Office file formats) only define the latter but not the former. Closes #15821. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d66e7af9aa
commit
8ab2bad7c1
@ -339,6 +339,11 @@ wxFileTypeImpl::GetOpenCommand(wxString *openCmd,
|
||||
{
|
||||
wxString cmd = GetCommand(wxT("open"));
|
||||
|
||||
// Some viewers don't define the "open" verb but do define "show" one, try
|
||||
// to use it as a fallback.
|
||||
if ( cmd.empty() )
|
||||
cmd = GetCommand(wxT("show"));
|
||||
|
||||
*openCmd = wxFileType::ExpandCommand(cmd, params);
|
||||
|
||||
return !openCmd->empty();
|
||||
|
Loading…
Reference in New Issue
Block a user