summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2026-03-19 00:08:44 +0200
committerGitHub <noreply@github.com>2026-03-19 00:08:44 +0200
commit1bd6893388ed939f3d4628be2b5f00de49350d50 (patch)
tree4299fe4368df8aa02972ba0b56ae68dd59eb38cc /indra/newview/llpanellogin.cpp
parent76d8316e4f2c9ab662c4e94474edf8505ea9480f (diff)
parent1dca8b3257d6ac3fb56b28f4368aa0c00eb4795c (diff)
Merge pull request #5509 from secondlife/maxim/login_form_update
#5462 Login form update
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r--indra/newview/llpanellogin.cpp28
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