diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-03-05 20:24:30 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2026-03-09 14:47:22 +0200 |
| commit | e3b28fddff322e39d26f369712f7237854cabd5b (patch) | |
| tree | f92bc8014571b0c06c04ce2c41223e67a57885a6 /indra/newview/llpanellogin.cpp | |
| parent | 1b9c85dc2d990e68e6934e5d54e85319313e03d6 (diff) | |
#5462 Login form update
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
| -rw-r--r-- | indra/newview/llpanellogin.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 868e02f28b..77de25c28e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -174,6 +174,19 @@ public: }; LLLoginLocationAutoHandler gLoginLocationAutoHandler; +std::string getShortGridLabel(const std::string& slurl_grid) +{ + if (slurl_grid == MAINGRID) + { + return LLTrans::getString("AgniGridLabelShort"); + } + if (slurl_grid == BETAGRID) + { + return LLTrans::getString("AditiGridLabelShort"); + } + return LLGridManager::getInstance()->getGridLabel(slurl_grid); +} + //--------------------------------------------------------------------------- // Public methods //--------------------------------------------------------------------------- @@ -221,13 +234,13 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, password_edit->setCommitCallback(boost::bind(&LLPanelLogin::onClickConnect, false)); childSetAction("connect_btn", onClickConnect, this); + childSetAction("sign_btn", onClickSignUp, this); mLoginBtn = getChild<LLButton>("connect_btn"); setDefaultBtn(mLoginBtn); // change z sort of clickable text to be behind buttons sendChildToBack(getChildView("forgot_password_text")); - sendChildToBack(getChildView("sign_up_text")); std::string current_grid = LLGridManager::getInstance()->getGrid(); if (!mFirstLoginThisInstall) @@ -251,13 +264,13 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, if (!grid_choice->first.empty() && current_grid != grid_choice->first) { LL_DEBUGS("AppInit") << "adding " << grid_choice->first << LL_ENDL; - server_choice_combo->add(grid_choice->second, grid_choice->first); + server_choice_combo->add(getShortGridLabel(grid_choice->first), grid_choice->first); } } server_choice_combo->sortByName(); LL_DEBUGS("AppInit") << "adding current " << current_grid << LL_ENDL; - server_choice_combo->add(LLGridManager::getInstance()->getGridLabel(), + server_choice_combo->add(getShortGridLabel(current_grid), current_grid, ADD_TOP); server_choice_combo->selectFirstItem(); @@ -308,9 +321,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* forgot_password_text = getChild<LLTextBox>("forgot_password_text"); forgot_password_text->setClickedCallback(onClickForgotPassword, NULL); - LLTextBox* sign_up_text = getChild<LLTextBox>("sign_up_text"); - sign_up_text->setClickedCallback(onClickSignUp, NULL); - // get the web browser control LLMediaCtrl* web_browser = getChild<LLMediaCtrl>("login_html"); web_browser->addObserver(this); @@ -752,6 +762,10 @@ void LLPanelLogin::updateLocationSelectorsVisibility() { server_combo->setVisible(show_server); } + if (LLTextBox* grid_txt = sInstance->getChild<LLTextBox>("grid_text")) + { + grid_txt->setVisible(show_server); + } } } @@ -787,7 +801,7 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl) // update the grid selector to match the slurl LLComboBox* server_combo = sInstance->getChild<LLComboBox>("server_combo"); - std::string server_label(LLGridManager::getInstance()->getGridLabel(slurl_grid)); + std::string server_label(getShortGridLabel(slurl_grid)); server_combo->setSimple(server_label); updateServer(); // to change the links and splash screen |
