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/branches/WX_3_0_BRANCH@75605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -605,6 +605,7 @@ wxMSW:
|
||||
- Fix wxRegion::Offset() with shared objects (Joost Nieuwenhuijse).
|
||||
- Fix wxSocket::Initialize() after Shutdown() (Laurent Poujoulat).
|
||||
- Fix coordinates of EVT_MOUSEWHEEL in frames with toolbars (LtJax).
|
||||
- Support "show" verb as well as "open" in wxFileType (Eric Jensen).
|
||||
|
||||
wxOSX:
|
||||
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user