From 06429722acae74a856589ccf92d31c2e10b0832d Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 8 Dec 2009 12:20:22 +0000 Subject: EXT-2350: Added a help link to login panel. There is now a new "Need help logging in?" link on the right-hand side of the login panel. Clicking on this brings up the help browser with the pre_login_help topic (the same as pressing F1). --- indra/newview/llpanellogin.cpp | 14 +++++++++++++- indra/newview/llpanellogin.h | 1 + indra/newview/skins/default/textures/textures.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_login.xml | 15 +++++++++++++-- 4 files changed, 29 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d80d5c3d2e..e73c65e252 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -71,7 +71,6 @@ #include "llmediactrl.h" #include "llrootview.h" - #include "llfloatertos.h" #include "lltrans.h" #include "llglheaders.h" @@ -260,6 +259,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* create_new_account_text = getChild("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount, NULL); + + LLTextBox* need_help_text = getChild("login_help"); + need_help_text->setClickedCallback(onClickHelp, NULL); #endif // get the web browser control @@ -963,6 +965,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) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index acb2001c22..e3d30d7d0c 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -96,6 +96,7 @@ private: // static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); static void onClickVersion(void*); static void onClickForgotPassword(void*); + static void onClickHelp(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onServerComboLostFocus(LLFocusableElement*); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 7e309d2bad..6f9801491a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -194,8 +194,8 @@ with the same filename but different name - - + + diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index efe26d3887..22977b2274 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -167,8 +167,8 @@ text_color="EmphasisColor" halign="right" height="16" - top="17" - left_pad="10" + top="12" + left_pad="5" right="-10" name="create_new_account_text" width="180"> @@ -185,6 +185,17 @@ width="180"> Forgot your name or password? + + Need help logging in? +