Have wxLaunchDefaultBrowser fallback to the BROWSER environment
variable on *nix if the mimetype info fails to lead to a usable command. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -660,7 +660,13 @@ bool wxLaunchDefaultBrowser(const wxString& url)
|
||||
}
|
||||
}
|
||||
else
|
||||
return false;
|
||||
{
|
||||
// fallback to checking for the BROWSER environment variable
|
||||
cmd = wxGetenv(wxT("BROWSER"));
|
||||
if ( cmd.empty() || wxExecute(cmd + wxT(" ") + finalurl) == -1)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#else // !wxUSE_MIMETYPE && !(WXMSW && wxUSE_NATIVE_CONFIG)
|
||||
|
||||
|
Reference in New Issue
Block a user