Ejemplo n.º 1
0
void show_log_browser(const std::string& name, const std::string& id)
{
#if LL_WINDOWS // Singu TODO: Other platforms?
	if (gSavedSettings.getBOOL("LiruLegacyLogLaunch"))
	{
		gViewerWindow->getWindow()->ShellEx("\"" + LLLogChat::makeLogFileName(name) + "\"");
		return;
	}
#endif
	LLFloaterWebContent::Params p;
	p.url("file:///" + LLLogChat::makeLogFileName(name));
	p.id(id);
	p.show_chrome(false);
	p.trusted_content(true);
	LLFloaterWebContent::showInstance("log", p); // If we passed id instead of "log", there would be no control over how many log browsers opened at once.
}
Ejemplo n.º 2
0
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;
	}
	LLFloaterWebContent::Params p;
	p.url("file:///" + file);
	p.id(id);
	p.show_chrome(false);
	p.trusted_content(true);
	LLFloaterWebContent::showInstance("log", p); // If we passed id instead of "log", there would be no control over how many log browsers opened at once.
}