// Default constructor LLFloaterAbout::LLFloaterAbout() : LLFloater("floater_about", "FloaterAboutRect", "") { gUICtrlFactory->buildFloater(this, "floater_about.xml"); // Support for changing product name. LLString title("About "); title += gSecondLife; setTitle(title); LLString support; // Version string LLString version = gSecondLife + llformat(" %d.%d.%d (%d) %s %s", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__); support.append(version); support.append("\n\n"); // Position LLViewerRegion* region = gAgent.getRegion(); if (region) { //XUI:translate const LLVector3d &pos = gAgent.getPositionGlobal(); LLString pos_text = llformat("You are at %.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ]); support.append(pos_text); LLString region_text = llformat("in %s located at ", gAgent.getRegion()->getName().c_str()); support.append(region_text); char buffer[MAX_STRING]; /*Flawfinder: ignore*/ gAgent.getRegion()->getHost().getHostName(buffer, MAX_STRING); support.append(buffer); support.append(" ("); gAgent.getRegion()->getHost().getString(buffer, MAX_STRING); support.append(buffer); support.append(")\n\n"); } // CPU support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support.append("\n"); U32 memory = gSysMemory.getPhysicalMemory() / 1024 / 1024; // For some reason, the reported amount of memory is always wrong by one meg memory++; LLString mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( gSysOS.getOSString().c_str() ); support.append("\n"); support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support.append("\n"); support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support.append("\n"); support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); support.append("\n"); #if LL_LIBXUL_ENABLED support.append("LLMozLib Version: "); support.append( (const char*) LLMozLib::getInstance()->getVersion().c_str() ); support.append("\n"); #endif // LL_LIBXUL_ENABLED if (gViewerStats && gPacketsIn > 0) { LLString packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", gViewerStats->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*gViewerStats->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support.append("\n"); } // MD5 digest of executable support.append("Viewer Digest: "); char viewer_digest_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ gViewerDigest.toString( viewer_digest_string ); support.append(viewer_digest_string); // Fix views childDisable("credits_editor"); childDisable("support_editor"); childSetText("support_editor", support); center(); sInstance = this; }
// Default constructor LLFloaterAbout::LLFloaterAbout() : LLFloater(std::string("floater_about"), std::string("FloaterAboutRect"), LLStringUtil::null) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml"); // Support for changing product name. std::string title("About "); title += LLAppViewer::instance()->getSecondLifeTitle(); setTitle(title); LLViewerTextEditor *support_widget = getChild<LLViewerTextEditor>("support_editor", true); LLViewerTextEditor *credits_widget = getChild<LLViewerTextEditor>("credits_editor", true); if (!support_widget || !credits_widget) { return; } // For some reason, adding style doesn't work unless this is true. support_widget->setParseHTML(TRUE); // Text styles for release notes hyperlinks LLStyleSP viewer_link_style(new LLStyle); viewer_link_style->setVisible(true); viewer_link_style->setFontName(LLStringUtil::null); viewer_link_style->setLinkHREF(get_viewer_release_notes_url()); viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); // Version string std::string version = llformat( "%s %d.%d.%d %s / %s %d.%d.%d (%d), %s %s\n", IMP_VIEWER_NAME, IMP_VERSION_MAJOR, IMP_VERSION_MINOR, IMP_VERSION_PATCH, IMP_VERSION_TEST, LL_VIEWER_NAME, LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); std::string support; support.append("\n\n"); #if LL_MSVC support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER)); #endif #if LL_GNUC support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION)); #endif // Position LLViewerRegion* region = gAgent.getRegion(); // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-04 (RLVa-1.0.0a) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { support.append(rlv_handler_t::cstrHidden); support.append("\n\n"); } else if (region) // [/RLVa:KB] // if (region) { LLStyleSP server_link_style(new LLStyle); server_link_style->setVisible(true); server_link_style->setFontName(LLStringUtil::null); server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes")); server_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); const LLVector3d &pos = gAgent.getPositionGlobal(); LLUIString pos_text = getString("you_are_at"); pos_text.setArg("[POSITION]", llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ])); support.append(pos_text); std::string region_text = llformat("in %s located at ", gAgent.getRegion()->getName().c_str()); support.append(region_text); std::string buffer; buffer = gAgent.getRegion()->getHost().getHostName(); support.append(buffer); support.append(" ("); buffer = gAgent.getRegion()->getHost().getString(); support.append(buffer); support.append(")\n"); support.append(gLastVersionChannel); support.append("\n"); support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); support = "\n\n"; } // *NOTE: Do not translate text like GPU, Graphics Card, etc - // Most PC users that know what these mean will be used to the english versions, // and this info sometimes gets sent to support // CPU support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support.append("\n"); U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; // Moved hack adjustment to Windows memory size into llsys.cpp std::string mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( LLAppViewer::instance()->getOSInfo().getOSString() ); support.append("\n"); support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support.append("\n"); support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support.append("\n"); #if LL_WINDOWS getWindow()->incBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); support.append("Windows Graphics Driver Version: "); LLSD driver_info = gDXHardware.getDisplayInfo(); if (driver_info.has("DriverVersion")) { support.append(driver_info["DriverVersion"]); } support.append("\n"); getWindow()->decBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); support.append("\n"); support.append("\n"); support.append("libcurl Version: "); support.append( LLCurl::getVersionString() ); support.append("\n"); support.append("J2C Decoder Version: "); support.append( LLImageJ2C::getEngineInfo() ); support.append("\n"); support.append("Audio Driver Version: "); bool want_fullname = true; support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); support.append("\n"); LLMediaManager *mgr = LLMediaManager::getInstance(); if (mgr) { LLMediaBase *gstreamer = mgr->createSourceFromMimeType("http", "audio/mpeg"); if (gstreamer) { support.append("GStreamer Version: "); support.append( gstreamer->getVersion() ); support.append("\n"); } LLMediaBase *media_source = mgr->createSourceFromMimeType("http", "text/html"); if (media_source) { support.append("LLMozLib Version: "); support.append(media_source->getVersion()); support.append("\n"); mgr->destroySource(media_source); } } if (gPacketsIn > 0) { std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support.append("\n"); } support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); // Fix views support_widget->setCursorPos(0); support_widget->setEnabled(FALSE); support_widget->setTakesFocus(TRUE); support_widget->setHandleEditKeysDirectly(TRUE); credits_widget->setCursorPos(0); credits_widget->setEnabled(FALSE); credits_widget->setTakesFocus(TRUE); credits_widget->setHandleEditKeysDirectly(TRUE); center(); sInstance = this; }
// Default constructor LLFloaterAbout::LLFloaterAbout() : LLFloater("floater_about", "FloaterAboutRect", "") { gUICtrlFactory->buildFloater(this, "floater_about.xml"); // Support for changing product name. LLString title("About "); title += LLAppViewer::instance()->getSecondLifeTitle(); setTitle(title); LLString support; // Version string LLString version = LLAppViewer::instance()->getSecondLifeTitle() + llformat(" %d.%d.%d.%d Netbook Edition v1.2 %s %s", LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD, __DATE__, __TIME__); //MK if (RRenabled) { version += "\n" + gAgent.mRRInterface.getVersion (); } //mk support.append(version); support.append("\n\n"); // Position LLViewerRegion* region = gAgent.getRegion(); if (region) { const LLVector3d &pos = gAgent.getPositionGlobal(); LLUIString pos_text = childGetText("you_are_at"); pos_text.setArg("[POSITION]", llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ])); //MK if (RRenabled && gAgent.mRRInterface.mContainsShowloc) { pos_text = "(Position hidden)\n"; } //mk support.append(pos_text); LLString region_text = llformat("in %s located at ", gAgent.getRegion()->getName().c_str()); //MK if (RRenabled && gAgent.mRRInterface.mContainsShowloc) { region_text = "(Region hidden)\n"; } //mk support.append(region_text); //MK if (!RRenabled || !gAgent.mRRInterface.mContainsShowloc) { //mk char buffer[MAX_STRING]; /*Flawfinder: ignore*/ gAgent.getRegion()->getHost().getHostName(buffer, MAX_STRING); support.append(buffer); support.append(" ("); gAgent.getRegion()->getHost().getString(buffer, MAX_STRING); support.append(buffer); support.append(")\n"); support.append(gLastVersionChannel); support.append("\n\n"); //MK } else { support.append ("(Server info hidden)\n\n"); } //mk } //*NOTE: Do not translate text like GPU, Graphics Card, etc - // Most PC users that know what these mean will be used to the english versions, // and this info sometimes gets sent to support // CPU support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support.append("\n"); U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; // Moved hack adjustment to Windows memory size into llsys.cpp LLString mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( LLAppViewer::instance()->getOSInfo().getOSString().c_str() ); support.append("\n"); support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support.append("\n"); support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support.append("\n"); support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); support.append("\n"); #if LL_LIBXUL_ENABLED support.append("LLMozLib Version: "); support.append( (const char*) LLMozLib::getInstance()->getVersion().c_str() ); support.append("\n"); #endif // LL_LIBXUL_ENABLED if (gViewerStats && gPacketsIn > 0) { LLString packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", gViewerStats->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*gViewerStats->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support.append("\n"); } // MD5 digest of executable support.append("Viewer Digest: "); char viewer_digest_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ gViewerDigest.toString( viewer_digest_string ); support.append(viewer_digest_string); // Fix views childDisable("credits_editor"); LLTextEditor * support_widget = (LLTextEditor *) getChildByName("support_editor", true); if (support_widget) { support_widget->setEnabled( FALSE ); support_widget->setTakesFocus( TRUE ); support_widget->setText( support ); support_widget->setHandleEditKeysDirectly( TRUE ); } center(); sInstance = this; }
// static LLSD LLFloaterAbout::getInfo() { // The point of having one method build an LLSD info block and the other // construct the user-visible About string is to ensure that the same info // is available to a getInfo() caller as to the user opening // LLFloaterAbout. LLSD info; LLSD version; version.append(LLVersionInfo::getMajor()); version.append(LLVersionInfo::getMinor()); version.append(LLVersionInfo::getPatch()); version.append(LLVersionInfo::getBuild()); info["VIEWER_VERSION"] = version; info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["BUILD_DATE"] = __DATE__; info["BUILD_TIME"] = __TIME__; info["CHANNEL"] = LLVersionInfo::getChannel(); info["VIEWER_RELEASE_NOTES_URL"] = get_viewer_release_notes_url(); #if LL_MSVC info["COMPILER"] = "MSVC"; info["COMPILER_VERSION"] = _MSC_VER; #elif LL_GNUC info["COMPILER"] = "GCC"; info["COMPILER_VERSION"] = GCC_VERSION; #endif // Position LLViewerRegion* region = gAgent.getRegion(); if (region) { const LLVector3d &pos = gAgent.getPositionGlobal(); info["POSITION"] = ll_sd_from_vector3d(pos); info["REGION"] = gAgent.getRegion()->getName(); info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName(); info["HOSTIP"] = gAgent.getRegion()->getHost().getString(); info["SERVER_VERSION"] = gLastVersionChannel; info["SERVER_RELEASE_NOTES_URL"] = LLWeb::escapeURL(region->getCapability("ServerReleaseNotes")); } // CPU info["CPU"] = gSysCPU.getCPUString(); info["MEMORY_MB"] = LLSD::Integer(gSysMemory.getPhysicalMemoryKB() / 1024); // Moved hack adjustment to Windows memory size into llsys.cpp info["OS_VERSION"] = LLAppViewer::instance()->getOSInfo().getOSString(); info["GRAPHICS_CARD_VENDOR"] = (const char*)(glGetString(GL_VENDOR)); info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); #if LL_WINDOWS LLSD driver_info = gDXHardware.getDisplayInfo(); if (driver_info.has("DriverVersion")) { info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"]; } #endif info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION)); info["LIBCURL_VERSION"] = LLCurl::getVersionString(); info["J2C_VERSION"] = LLImageJ2C::getEngineInfo(); bool want_fullname = true; info["AUDIO_DRIVER_VERSION"] = gAudiop ? LLSD(gAudiop->getDriverName(want_fullname)) : LLSD(); if(LLVoiceClient::getInstance()->voiceEnabled()) { LLVoiceVersionInfo version = LLVoiceClient::getInstance()->getVersion(); std::ostringstream version_string; version_string << version.serverType << " " << version.serverVersion << std::endl; info["VOICE_VERSION"] = version_string.str(); } else { info["VOICE_VERSION"] = LLTrans::getString("NotConnected"); } // TODO: Implement media plugin version query info["QT_WEBKIT_VERSION"] = "4.7.1 (version number hard-coded)"; if (gPacketsIn > 0) { info["PACKETS_LOST"] = LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(); info["PACKETS_IN"] = F32(gPacketsIn); info["PACKETS_PCT"] = 100.f*info["PACKETS_LOST"].asReal() / info["PACKETS_IN"].asReal(); } return info; }
// Default constructor LLFloaterAbout::LLFloaterAbout() : LLFloater(std::string("floater_about"), std::string("FloaterAboutRect"), LLStringUtil::null) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml"); // Support for changing product name. std::string title("About "); title += LLAppViewer::instance()->getSecondLifeTitle(); setTitle(title); LLViewerTextEditor *support_widget = getChild<LLViewerTextEditor>("support_editor", true); LLViewerTextEditor *credits_widget = getChild<LLViewerTextEditor>("credits_editor", true); LLViewerTextEditor *licenses_widget = getChild<LLViewerTextEditor>("licenses_editor", true); childSetAction("copy_btn", onAboutClickCopyToClipboard, this); if (!support_widget || !credits_widget) { return; } // For some reason, adding style doesn't work unless this is true. support_widget->setParseHTML(TRUE); // Text styles for release notes hyperlinks LLStyleSP viewer_link_style(new LLStyle); viewer_link_style->setVisible(true); viewer_link_style->setFontName(LLStringUtil::null); viewer_link_style->setLinkHREF(get_viewer_release_notes_url()); viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); // Version string std::string version = std::string(LLAppViewer::instance()->getSecondLifeTitle() #if defined(_WIN64) || defined(__x86_64__) + " (64 bit)" #endif + llformat(" %d.%d.%d (%d) %s %s (%s)\n", LLVersionInfo::getMajor(), LLVersionInfo::getMinor(), LLVersionInfo::getPatch(), LLVersionInfo::getBuild(), __DATE__, __TIME__, LLVersionInfo::getChannel().c_str())); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); std::string support; support.append("\n\n"); support.append("Grid: " + gHippoGridManager->getConnectedGrid()->getGridName() + "\n\n"); #if LL_MSVC support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER)); #endif #if LL_CLANG support.append(llformat("Built with Clang version %d\n\n", CLANG_VERSION)); #endif #if LL_INTELC support.append(llformat("Built with ICC version %d\n\n", __ICC)); #endif #if LL_GNUC support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION)); #endif // Position LLViewerRegion* region = gAgent.getRegion(); if (region) { // [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10) if (RlvActions::canShowLocation()) { const LLVector3d &pos = gAgent.getPositionGlobal(); LLUIString pos_text = getString("you_are_at"); pos_text.setArg("[POSITION]", llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ])); support.append(pos_text); if (const LLViewerRegion* region = gAgent.getRegion()) { const LLVector3d& coords(region->getOriginGlobal()); std::string region_text = llformat("in %s (%.0f, %.0f) located at ", region->getName().c_str(), coords.mdV[VX]/REGION_WIDTH_METERS, coords.mdV[VY]/REGION_WIDTH_METERS); support.append(region_text); std::string buffer; buffer = region->getHost().getHostName(); support.append(buffer); support.append(" ("); buffer = region->getHost().getString(); support.append(buffer); support.append(")"); } } else support.append(RlvStrings::getString(RLV_STRING_HIDDEN_REGION)); // [/RLVa:KN] support += '\n'; support.append(gLastVersionChannel); support += '\n'; support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); const std::string url(region->getCapability("ServerReleaseNotes")); if (!url.empty()) { LLStyleSP server_link_style(new LLStyle(*viewer_link_style)); server_link_style->setLinkHREF(url); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); } support = "\n\n"; } // *NOTE: Do not translate text like GPU, Graphics Card, etc - // Most PC users that know what these mean will be used to the english versions, // and this info sometimes gets sent to support // CPU support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support += '\n'; /* This is confusing and WRONG. support.append("SSE Support:"); if(gSysCPU.hasSSE()) support.append(" SSE2\n"); else if(gSysCPU.hasSSE()) support.append(" SSE\n"); else support.append(" None\n"); */ U32Megabytes memory = gSysMemory.getPhysicalMemoryKB(); // Moved hack adjustment to Windows memory size into llsys.cpp std::string mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( LLAppViewer::instance()->getOSInfo().getOSString() ); support += '\n'; support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support += '\n'; support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support += '\n'; #if LL_WINDOWS getWindow()->incBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); support.append("Windows Graphics Driver Version: "); LLSD driver_info = gDXHardware.getDisplayInfo(); if (driver_info.has("DriverVersion")) { support.append(driver_info["DriverVersion"]); } support += '\n'; getWindow()->decBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); // [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0) support += '\n'; support.append("RLV Version: " + (RlvActions::isRlvEnabled() ? RlvStrings::getVersionAbout() : "(disabled)")); // [/RLVa:KB] support.append("\n\n"); support.append("libcurl Version: "); support.append( LLCurl::getVersionString() ); support += '\n'; support.append("J2C Decoder Version: "); support.append( LLImageJ2C::getEngineInfo() ); support += '\n'; support.append("Audio Driver Version: "); bool want_fullname = true; support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); support += '\n'; support.append("LLCEFLib/CEF Version: "); support.append(LLCEFLIB_VERSION); support += '\n'; if (gPacketsIn > 0) { std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support += '\n'; } support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); // Fix views support_widget->setCursorPos(0); support_widget->setEnabled(FALSE); support_widget->setTakesFocus(TRUE); support_widget->setHandleEditKeysDirectly(TRUE); credits_widget->setCursorPos(0); credits_widget->setEnabled(FALSE); credits_widget->setTakesFocus(TRUE); credits_widget->setHandleEditKeysDirectly(TRUE); // Get the Versions and Copyrights, created at build time std::string licenses_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "packages-info.txt"); llifstream licenses_file; licenses_file.open(licenses_path); /* Flawfinder: ignore */ if (licenses_file.is_open()) { std::string license_line; licenses_widget->clear(); while (std::getline(licenses_file, license_line)) { licenses_widget->appendColoredText(license_line + '\n', FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); } licenses_file.close(); } else { // this case will use the (out of date) hard coded value from the XUI LL_INFOS("AboutInit") << "Could not read licenses file at " << licenses_path << LL_ENDL; } licenses_widget->setCursorPos(0); licenses_widget->setEnabled(FALSE); licenses_widget->setTakesFocus(TRUE); licenses_widget->setHandleEditKeysDirectly(TRUE); center(); sInstance = this; }
// Default constructor LLFloaterAbout::LLFloaterAbout() : LLFloater(std::string("floater_about"), std::string("FloaterAboutRect"), LLStringUtil::null) { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_about.xml"); // Support for changing product name. std::string title("About "); title += "Impostor"; setTitle(title); LLViewerTextEditor *support_widget = getChild<LLViewerTextEditor>("support_editor", true); LLViewerTextEditor *credits_widget = getChild<LLViewerTextEditor>("credits_editor", true); childSetAction("copy_btn", onAboutClickCopyToClipboard, this); if (!support_widget || !credits_widget) { return; } // For some reason, adding style doesn't work unless this is true. support_widget->setParseHTML(TRUE); // Text styles for release notes hyperlinks LLStyleSP viewer_link_style(new LLStyle); viewer_link_style->setVisible(true); viewer_link_style->setFontName(LLStringUtil::null); viewer_link_style->setLinkHREF(get_viewer_release_notes_url()); viewer_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); // Version string std::string version = std::string(LLAppViewer::instance()->getSecondLifeTitle() + llformat(" %d.%d.%d (%d) %s %s (%s)\n", gSavedSettings.getU32("SpecifiedVersionMaj"), gSavedSettings.getU32("SpecifiedVersionMin"), gSavedSettings.getU32("SpecifiedVersionPatch"), gSavedSettings.getU32("SpecifiedVersionBuild"), __DATE__, __TIME__, gSavedSettings.getString("SpecifiedChannel").c_str())); support_widget->appendColoredText(version, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, viewer_link_style); std::string support; support.append("\n\n"); support.append("Grid: " + gHippoGridManager->getConnectedGrid()->getGridName() + " (" + gHippoGridManager->getConnectedGrid()->getGridNick() + ")\n\n"); #if LL_MSVC support.append(llformat("Built with MSVC version %d\n\n", _MSC_VER)); #endif #if LL_GNUC support.append(llformat("Built with GCC version %d\n\n", GCC_VERSION)); #endif // Position LLViewerRegion* region = gAgent.getRegion(); // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-04 (RLVa-1.0.0a) if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) { support.append(RlvStrings::getString(RLV_STRING_HIDDEN)); support.append("\n\n"); } else if (region) // [/RLVa:KB] // if (region) { LLStyleSP server_link_style(new LLStyle); server_link_style->setVisible(true); server_link_style->setFontName(LLStringUtil::null); server_link_style->setLinkHREF(region->getCapability("ServerReleaseNotes")); server_link_style->setColor(gSavedSettings.getColor4("HTMLLinkColor")); const LLVector3d &pos = gAgent.getPositionGlobal(); LLUIString pos_text = getString("you_are_at"); pos_text.setArg("[POSITION]", llformat("%.1f, %.1f, %.1f ", pos.mdV[VX], pos.mdV[VY], pos.mdV[VZ])); support.append(pos_text); std::string region_text = llformat("in %s located at ", gAgent.getRegion()->getName().c_str()); support.append(region_text); std::string buffer; buffer = gAgent.getRegion()->getHost().getHostName(); support.append(buffer); support.append(" ("); buffer = gAgent.getRegion()->getHost().getString(); support.append(buffer); support.append(")\n"); support.append(gLastVersionChannel); support.append("\n"); support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); support_widget->appendStyledText(LLTrans::getString("ReleaseNotes"), false, false, server_link_style); support = "\n\n"; } // *NOTE: Do not translate text like GPU, Graphics Card, etc - // Most PC users that know what these mean will be used to the english versions, // and this info sometimes gets sent to support // CPU support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support.append("\n"); U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; // Moved hack adjustment to Windows memory size into llsys.cpp std::string mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( LLAppViewer::instance()->getOSInfo().getOSString() ); support.append("\n"); support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support.append("\n"); support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support.append("\n"); #if LL_WINDOWS getWindow()->incBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); support.append("Windows Graphics Driver Version: "); LLSD driver_info = gDXHardware.getDisplayInfo(); if (driver_info.has("DriverVersion")) { support.append(driver_info["DriverVersion"]); } support.append("\n"); getWindow()->decBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); support.append("\n"); std::string sse_ver = "None"; #if _M_IX86_FP > 0 //Windows sse_ver = llformat("SSE%i", _M_IX86_FP ); #elif defined(__SSE2__) //GCC sse_ver = "SSE2"; #elif defined(__SSE__) //GCC sse_ver = "SSE"; #endif support.append("SSE Version: "); support.append(sse_ver); support.append("\n"); support.append("\n"); support.append("libcurl Version: "); support.append( LLCurl::getVersionString() ); support.append("\n"); support.append("J2C Decoder Version: "); support.append( LLImageJ2C::getEngineInfo() ); support.append("\n"); support.append("Audio Driver Version: "); bool want_fullname = true; support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); support.append("\n"); // TODO: Implement media plugin version query support.append("Qt Webkit Version: 4.7.1 "); support.append("\n"); if (gPacketsIn > 0) { std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support.append("\n"); } support_widget->appendColoredText(support, FALSE, FALSE, gColors.getColor("TextFgReadOnlyColor")); // Fix views support_widget->setCursorPos(0); support_widget->setEnabled(FALSE); support_widget->setTakesFocus(TRUE); support_widget->setHandleEditKeysDirectly(TRUE); credits_widget->setCursorPos(0); credits_widget->setEnabled(FALSE); credits_widget->setTakesFocus(TRUE); credits_widget->setHandleEditKeysDirectly(TRUE); center(); sInstance = this; }
std::string LLFloaterAbout::get_viewer_misc_info() { std::string support; support.append("CPU: "); support.append( gSysCPU.getCPUString() ); support.append("\n"); U32 memory = gSysMemory.getPhysicalMemoryKB() / 1024; // Moved hack adjustment to Windows memory size into llsys.cpp std::string mem_text = llformat("Memory: %u MB\n", memory ); support.append(mem_text); support.append("OS Version: "); support.append( LLAppViewer::instance()->getOSInfo().getOSString() ); support.append("\n"); support.append("Graphics Card Vendor: "); support.append( (const char*) glGetString(GL_VENDOR) ); support.append("\n"); support.append("Graphics Card: "); support.append( (const char*) glGetString(GL_RENDERER) ); support.append("\n"); #if LL_WINDOWS getWindow()->incBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); support.append("Windows Graphics Driver Version: "); LLSD driver_info = gDXHardware.getDisplayInfo(); if (driver_info.has("DriverVersion")) { support.append(driver_info["DriverVersion"]); } support.append("\n"); getWindow()->decBusyCount(); getWindow()->setCursor(UI_CURSOR_ARROW); #endif support.append("OpenGL Version: "); support.append( (const char*) glGetString(GL_VERSION) ); support.append("\n"); support.append("\n"); support.append("libcurl Version: "); support.append( LLCurl::getVersionString() ); support.append("\n"); support.append("J2C Decoder Version: "); support.append( LLImageJ2C::getEngineInfo() ); support.append("\n"); support.append("Audio Driver Version: "); bool want_fullname = true; support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); support.append("\n"); // TODO: Implement media plugin version query support.append("Qt Webkit Version: 4.5.2 "); support.append("\n"); if (gPacketsIn > 0) { std::string packet_loss = llformat("Packets Lost: %.0f/%.0f (%.1f%%)", LLViewerStats::getInstance()->mPacketsLostStat.getCurrent(), F32(gPacketsIn), 100.f*LLViewerStats::getInstance()->mPacketsLostStat.getCurrent() / F32(gPacketsIn) ); support.append(packet_loss); support.append("\n"); } return support; }