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:
@@ -1154,13 +1154,8 @@ void show_log_browser(const std::string& name, const std::string& id)
|
||||
const std::string file(LLLogChat::makeLogFileName(name));
|
||||
if (gSavedSettings.getBOOL("LiruLegacyLogLaunch"))
|
||||
{
|
||||
#if LL_WINDOWS || LL_DARWIN
|
||||
gViewerWindow->getWindow()->ShellEx(file);
|
||||
#elif LL_LINUX
|
||||
// xdg-open might not actually be installed on all distros, but it's our best bet.
|
||||
if (!std::system(("/usr/bin/xdg-open \"" + file +'"').c_str())) // 0 = success, otherwise fallback on internal browser.
|
||||
#endif
|
||||
return;
|
||||
if (!LLWindow::ShellEx(file)) // 0 = success, otherwise fallback on internal browser.
|
||||
return;
|
||||
}
|
||||
LLFloaterWebContent::Params p;
|
||||
p.url("file:///" + file);
|
||||
|
||||
Reference in New Issue
Block a user