diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 92 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 3 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
3 files changed, 16 insertions, 81 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 73f70dffe4..c357244c46 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3218,7 +3218,7 @@ LLSD LLAppViewer::getViewerInfo() const return info; } -std::string LLAppViewer::getViewerInfoString() const +std::string LLAppViewer::getViewerInfoString(bool default_string) const { std::ostringstream support; @@ -3228,7 +3228,7 @@ std::string LLAppViewer::getViewerInfoString() const LLStringUtil::format_map_t args; // allow the "Release Notes" URL label to be localized - args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes"); + args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes", default_string); for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap()); ii != iend; ++ii) @@ -3238,7 +3238,7 @@ std::string LLAppViewer::getViewerInfoString() const // Scalar value if (ii->second.isUndefined()) { - args[ii->first] = LLTrans::getString("none_text"); + args[ii->first] = LLTrans::getString("none_text", default_string); } else { @@ -3257,101 +3257,37 @@ std::string LLAppViewer::getViewerInfoString() const } // Now build the various pieces - support << LLTrans::getString("AboutHeader", args); + support << LLTrans::getString("AboutHeader", args, default_string); if (info.has("BUILD_CONFIG")) { - support << "\n" << LLTrans::getString("BuildConfig", args); + support << "\n" << LLTrans::getString("BuildConfig", args, default_string); } if (info.has("REGION")) { - support << "\n\n" << LLTrans::getString("AboutPosition", args); + support << "\n\n" << LLTrans::getString("AboutPosition", args, default_string); } - support << "\n\n" << LLTrans::getString("AboutSystem", args); + support << "\n\n" << LLTrans::getString("AboutSystem", args, default_string); support << "\n"; if (info.has("GRAPHICS_DRIVER_VERSION")) { - support << "\n" << LLTrans::getString("AboutDriver", args); + support << "\n" << LLTrans::getString("AboutDriver", args, default_string); } - support << "\n" << LLTrans::getString("AboutOGL", args); - support << "\n\n" << LLTrans::getString("AboutSettings", args); - support << "\n\n" << LLTrans::getString("AboutLibs", args); + support << "\n" << LLTrans::getString("AboutOGL", args, default_string); + support << "\n\n" << LLTrans::getString("AboutSettings", args, default_string); + support << "\n\n" << LLTrans::getString("AboutLibs", args, default_string); if (info.has("COMPILER")) { - support << "\n" << LLTrans::getString("AboutCompiler", args); + support << "\n" << LLTrans::getString("AboutCompiler", args, default_string); } if (info.has("PACKETS_IN")) { - support << '\n' << LLTrans::getString("AboutTraffic", args); + support << '\n' << LLTrans::getString("AboutTraffic", args, default_string); } // SLT timestamp LLSD substitution; substitution["datetime"] = (S32)time(NULL);//(S32)time_corrected(); - support << "\n" << LLTrans::getString("AboutTime", substitution); - - return support.str(); -} - -std::string LLAppViewer::getShortViewerInfoString() const -{ - std::ostringstream support; - LLSD info(getViewerInfo()); - - support << info["CHANNEL"].asString() << " "; - support << info["VIEWER_VERSION_STR"].asString() << " (" << info["ADDRESS_SIZE"].asString() << "bit)"; - if (info.has("BUILD_CONFIG")) - { - support << "\n" << "Build Configuration " << info["BUILD_CONFIG"].asString(); - } - if (info.has("REGION")) - { - support << "\n\n" << "You are at " << ll_vector3_from_sd(info["POSITION_LOCAL"]) << " in " << info["REGION"].asString(); - support << " located at " << info["HOSTNAME"].asString() << " (" << info["HOSTIP"].asString() << ")"; - support << "\n" << "SLURL: " << info["SLURL"].asString(); - support << "\n" << "(Global coordinates " << ll_vector3_from_sd(info["POSITION"]) << ")"; - support << "\n" << info["SERVER_VERSION"].asString(); - } - - support << "\n\n" << "CPU: " << info["CPU"].asString(); - support << "\n" << "Memory: " << info["MEMORY_MB"].asString() << " MB"; - support << "\n" << "OS: " << info["OS_VERSION"].asString(); - support << "\n" << "Graphics Card: " << info["GRAPHICS_CARD"].asString() << " (" << info["GRAPHICS_CARD_VENDOR"].asString() << ")"; - - if (info.has("GRAPHICS_DRIVER_VERSION")) - { - support << "\n" << "Windows Graphics Driver Version: " << info["GRAPHICS_DRIVER_VERSION"].asString(); - } - - support << "\n" << "OpenGL Version: " << info["OPENGL_VERSION"].asString(); - - support << "\n\n" << "Window size:" << info["WINDOW_WIDTH"].asString() << "x" << info["WINDOW_HEIGHT"].asString(); - support << "\n" << "Language: " << LLUI::getLanguage(); - support << "\n" << "Font Size Adjustment: " << info["FONT_SIZE_ADJUSTMENT"].asString() << "pt"; - support << "\n" << "UI Scaling: " << info["UI_SCALE"].asString(); - support << "\n" << "Draw distance: " << info["DRAW_DISTANCE"].asString(); - support << "\n" << "Bandwidth: " << info["NET_BANDWITH"].asString() << "kbit/s"; - support << "\n" << "LOD factor: " << info["LOD_FACTOR"].asString(); - support << "\n" << "Render quality: " << info["RENDER_QUALITY"].asString() << " / 7"; - support << "\n" << "ALM: " << info["GPU_SHADERS"].asString(); - support << "\n" << "Texture memory: " << info["TEXTURE_MEMORY"].asString() << "MB"; - support << "\n" << "VFS (cache) creation time: " << info["VFS_TIME"].asString(); - - support << "\n\n" << "J2C Decoder: " << info["J2C_VERSION"].asString(); - support << "\n" << "Audio Driver: " << info["AUDIO_DRIVER_VERSION"].asString(); - support << "\n" << "LLCEFLib/CEF: " << info["LLCEFLIB_VERSION"].asString(); - support << "\n" << "LibVLC: " << info["LIBVLC_VERSION"].asString(); - support << "\n" << "Voice Server: " << info["VOICE_VERSION"].asString(); - - if (info.has("PACKETS_IN")) - { - support << "\n" << "Packets Lost: " << info["PACKETS_LOST"].asInteger() << "/" << info["PACKETS_IN"].asInteger(); - F32 packets_pct = info["PACKETS_PCT"].asReal(); - support << " (" << ll_round(packets_pct, 0.001f) << "%)"; - } - - LLSD substitution; - substitution["datetime"] = (S32)time(NULL); - support << "\n" << LLTrans::getString("AboutTime", substitution); + support << "\n" << LLTrans::getString("AboutTime", substitution, default_string); return support.str(); } diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index e5a8883725..e607b4a994 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -99,8 +99,7 @@ public: void setServerReleaseNotesURL(const std::string& url) { mServerReleaseNotesURL = url; } LLSD getViewerInfo() const; - std::string getViewerInfoString() const; - std::string getShortViewerInfoString() const; + std::string getViewerInfoString(bool default_string = false) const; // Report true if under the control of a debugger. A null-op default. virtual bool beingDebugged() { return false; } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5bbf5650ad..e973363e0f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8001,7 +8001,7 @@ void handle_report_bug(const LLSD& param) LLUIString url(param.asString()); LLStringUtil::format_map_t replace; - replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getShortViewerInfoString()); + replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString(true)); LLSLURL location_url; LLAgentUI::buildSLURL(location_url); replace["[LOCATION]"] = LLURI::escape(location_url.getSLURLString()); |