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:
@@ -3361,20 +3361,6 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
|
||||
return retval;
|
||||
}
|
||||
|
||||
void LLWindowWin32::ShellEx(const std::string& command)
|
||||
{
|
||||
LLWString url_wstring = utf8str_to_wstring( "\"" + command + "\"" );
|
||||
llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
|
||||
|
||||
SHELLEXECUTEINFO sei = { sizeof( sei ) };
|
||||
sei.fMask = SEE_MASK_FLAG_DDEWAIT;
|
||||
sei.nShow = SW_SHOWNORMAL;
|
||||
sei.lpVerb = L"open";
|
||||
sei.lpFile = url_utf16.c_str();
|
||||
ShellExecuteEx( &sei );
|
||||
}
|
||||
|
||||
|
||||
void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
{
|
||||
if (!isWhitelistedProtocol(escaped_url))
|
||||
|
||||
Reference in New Issue
Block a user