summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 4bae6af12e..a729b8c06f 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -39,7 +39,6 @@
#include "llfontgl.h"
#include "llmd5.h"
#include "llsecondlifeurls.h"
-#include "llversionviewer.h"
#include "v4color.h"
#include "llbutton.h"
@@ -57,7 +56,7 @@
#include "llui.h"
#include "lluiconstants.h"
#include "llurlsimstring.h"
-#include "llviewerbuild.h"
+#include "llversioninfo.h"
#include "llviewerhelp.h"
#include "llviewertexturelist.h"
#include "llviewermenu.h" // for handle_preferences()
@@ -71,7 +70,6 @@
#include "llmediactrl.h"
#include "llrootview.h"
-
#include "llfloatertos.h"
#include "lltrans.h"
#include "llglheaders.h"
@@ -248,11 +246,9 @@ 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 (%d)",
+ LLVersionInfo::getShortVersion().c_str(),
+ LLVersionInfo::getBuild());
LLTextBox* channel_text = getChild<LLTextBox>("channel_text");
channel_text->setTextArg("[CHANNEL]", channel); // though not displayed
channel_text->setTextArg("[VERSION]", version);
@@ -263,6 +259,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLTextBox* create_new_account_text = getChild<LLTextBox>("create_new_account_text");
create_new_account_text->setClickedCallback(onClickNewAccount, NULL);
+
+ LLTextBox* need_help_text = getChild<LLTextBox>("login_help");
+ need_help_text->setClickedCallback(onClickHelp, NULL);
#endif
// get the web browser control
@@ -741,8 +740,9 @@ 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 (%d)",
+ LLVersionInfo::getShortVersion().c_str(),
+ LLVersionInfo::getBuild());
char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0);
char* curl_version = curl_escape(version.c_str(), 0);
@@ -966,6 +966,16 @@ void LLPanelLogin::onClickForgotPassword(void*)
}
}
+//static
+void LLPanelLogin::onClickHelp(void*)
+{
+ if (sInstance)
+ {
+ LLViewerHelp* vhelp = LLViewerHelp::getInstance();
+ vhelp->showTopic(vhelp->getTopicFromFocus());
+ }
+}
+
// static
void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{