From de2f8212f0c8a42d02e636ecd0744d3ddfd0dce9 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Mon, 7 Dec 2009 20:05:52 +0000 Subject: DEV-43439: Added calls to query the viewer version. Rather than copy/paste the same version string formatting pattern again, I added new string-based version routines: /// return the full viewer version as a string like "2.0.0.200030" const std::string &llGetViewerVersion(); /// return the viewer version as a string like "2.0.0" const std::string &llGetViewerShortVersion(); /// return the viewer build version as a string, e.g., "200130" const std::string &llGetViewerBuildVersion(); --- indra/newview/llpanellogin.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'indra/newview/llpanellogin.cpp') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 4bae6af12e..a72b7a9d7a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -248,11 +248,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, getChild("login_widgets")->setDefaultBtn("connect_btn"); std::string channel = gSavedSettings.getString("VersionChannelName"); - std::string version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, - LL_VIEWER_BUILD ); + std::string version = llformat("%s (%s)", llGetViewerShortVersion().c_str(), + llGetViewerBuildVersion().c_str()); LLTextBox* channel_text = getChild("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[VERSION]", version); @@ -741,8 +738,8 @@ void LLPanelLogin::loadLoginPage() } // Channel and Version - std::string version = llformat("%d.%d.%d (%d)", - LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VIEWER_BUILD); + std::string version = llformat("%s (%s)", llGetViewerShortVersion().c_str(), + llGetViewerBuildVersion().c_str()); char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); -- cgit v1.2.3