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:
Robin Dunn
2005-05-10 23:38:12 +00:00
parent 4e04f77781
commit 2830b4a411

View File

@@ -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)