summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2009-12-07 20:05:52 +0000
committerLynx Linden <lynx@lindenlab.com>2009-12-07 20:05:52 +0000
commitde2f8212f0c8a42d02e636ecd0744d3ddfd0dce9 (patch)
treeaf6922e5ee3d022317924d35f60c6f4ea436d75a /indra/newview/llpanellogin.cpp
parent37c7e4059cab2a7152e730ca5d68530f14f8f51e (diff)
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();
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp11
1 files changed, 4 insertions, 7 deletions
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<LLPanel>("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<LLTextBox>("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);