Fix up ShellEx

It's now crossplatform wrapper for std::system opening of a file/path/url.
It returns an int just like std::system, 0 means it worked.
It's static so you don't need to gViewerWindow->getWindow() anymore,
honestly it should've been static in the first place.

Clean up other code to use this function because duplicate code sucks.

# Conflicts:
#	indra/llwindow/llwindowmacosx.h
#	indra/llwindow/llwindowsdl2.cpp
This commit is contained in:
Lirusaito
2019-02-19 04:11:41 -05:00
parent 45228f920d
commit cfc71a47db
8 changed files with 60 additions and 81 deletions

View File

@@ -1756,13 +1756,6 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
}
}
// Open a URL with the user's default web browser.
// Must begin with protocol identifier.
void LLWindowMacOSX::ShellEx(const std::string& command)
{
std::system(("open " + command).data());
}
LLSD LLWindowMacOSX::getNativeKeyData()
{
LLSD result = LLSD::emptyMap();