aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanellogin.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-15 21:07:29 -0700
committerMcCabe Maxsted2011-04-15 21:07:29 -0700
commitf7df6f323e4746abae0a0858cb7ef56bedbb94ca (patch)
tree7a4a9e3be1ca658c0d72c78f413946249a38ad21 /linden/indra/newview/llpanellogin.cpp
parenttest commit - slviewer-0-v12500-DeadObjectsFixes_v2.patch (diff)
downloadmeta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.zip
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.gz
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.bz2
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.xz
Updated the grid manager to save names and passwords along with grid info. This commit includes the following:
* Fixed missing GPL headers from hippo grid manager * Fixed grids named <required> or "" being saved in the list * Fixed grid manager list only showing grid nicks, not grid names * Fixed grid names not settable in the grid manager * Grid manager now remembers avatar names and passwords * Usernames can now be set in the grid manager for SL (needs work) * Fixed grid manager being stuck in an updating state * Some general code cleanup
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanellogin.cpp75
1 files changed, 40 insertions, 35 deletions
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 3f748d4..1dff0cc 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -829,9 +829,9 @@ void LLPanelLogin::refreshLoginPage()
829 if (!sInstance) return; 829 if (!sInstance) return;
830 830
831 sInstance->childSetVisible("create_new_account_text", 831 sInstance->childSetVisible("create_new_account_text",
832 !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); 832 !gHippoGridManager->getCurrentGrid()->getRegisterURL().empty());
833 sInstance->childSetVisible("forgot_password_text", 833 sInstance->childSetVisible("forgot_password_text",
834 !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); 834 !gHippoGridManager->getCurrentGrid()->getPasswordURL().empty());
835 835
836 // kick off a request to grab the url manually 836 // kick off a request to grab the url manually
837 gResponsePtr = LLIamHereLogin::build(sInstance); 837 gResponsePtr = LLIamHereLogin::build(sInstance);
@@ -853,44 +853,43 @@ void LLPanelLogin::loadLoginForm()
853 if (!sInstance) return; 853 if (!sInstance) return;
854 854
855 // toggle between username/first+last login based on grid -- MC 855 // toggle between username/first+last login based on grid -- MC
856 LLTextBox* firstnamet = sInstance->getChild<LLTextBox>("first_name_text"); 856 LLTextBox* firstname_t = sInstance->getChild<LLTextBox>("first_name_text");
857 LLTextBox* lastnamet = sInstance->getChild<LLTextBox>("last_name_text"); 857 LLTextBox* lastname_t = sInstance->getChild<LLTextBox>("last_name_text");
858 LLTextBox* usernamet = sInstance->getChild<LLTextBox>("username_text"); 858 LLTextBox* username_t = sInstance->getChild<LLTextBox>("username_text");
859 859
860 LLLineEditor* firstnamel = sInstance->getChild<LLLineEditor>("first_name_edit"); 860 LLLineEditor* firstname_l = sInstance->getChild<LLLineEditor>("first_name_edit");
861 LLLineEditor* lastnamel = sInstance->getChild<LLLineEditor>("last_name_edit"); 861 LLLineEditor* lastname_l = sInstance->getChild<LLLineEditor>("last_name_edit");
862 LLLineEditor* usernamel = sInstance->getChild<LLLineEditor>("username_edit"); 862 LLLineEditor* username_l = sInstance->getChild<LLLineEditor>("username_edit");
863 863
864 firstnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 864 firstname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
865 lastnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 865 lastname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
866 usernamet->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 866 username_t->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat());
867 867
868 firstnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 868 firstname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
869 lastnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 869 lastname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
870 usernamel->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 870 username_l->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat());
871 871
872 // these should really REALLY be stored in the grid info -- MC 872 // get name info if we've got it
873 std::string firstnames = gSavedSettings.getString("FirstName"); 873 std::string firstname_s = gHippoGridManager->getCurrentGrid()->getFirstName();
874 std::string lastnames = gSavedSettings.getString("LastName"); 874 std::string lastname_s = gHippoGridManager->getCurrentGrid()->getLastName();
875 if (!firstnames.empty() && !lastnames.empty()) 875 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat())
876 { 876 {
877 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat()) 877 if (lastname_s == "resident" || lastname_s == "Resident")
878 { 878 {
879 if (lastnames == "resident" || lastnames == "Resident") 879 username_l->setText(firstname_s);
880 {
881 usernamel->setText(firstnames);
882 }
883 else
884 {
885 usernamel->setText(firstnames+"."+lastnames);
886 }
887 } 880 }
888 else 881 else
889 { 882 {
890 firstnamel->setText(firstnames); 883 username_l->setText(firstname_s+"."+lastname_s);
891 lastnamel->setText(lastnames);
892 } 884 }
893 } 885 }
886 else
887 {
888 firstname_l->setText(firstname_s);
889 lastname_l->setText(lastname_s);
890 }
891
892 setPassword(gHippoGridManager->getCurrentGrid()->getAvatarPassword());
894} 893}
895 894
896 895
@@ -1208,11 +1207,14 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD&
1208// static 1207// static
1209void LLPanelLogin::onClickNewAccount(void*) 1208void LLPanelLogin::onClickNewAccount(void*)
1210{ 1209{
1211 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); 1210 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL();
1212 if (!url.empty()) { 1211 if (!url.empty())
1212 {
1213 llinfos << "Going to account creation URL." << llendl; 1213 llinfos << "Going to account creation URL." << llendl;
1214 LLWeb::loadURLExternal(url); 1214 LLWeb::loadURLExternal(url);
1215 } else { 1215 }
1216 else
1217 {
1216 llinfos << "Account creation URL is empty." << llendl; 1218 llinfos << "Account creation URL is empty." << llendl;
1217 sInstance->setFocus(TRUE); 1219 sInstance->setFocus(TRUE);
1218 } 1220 }
@@ -1246,10 +1248,13 @@ void LLPanelLogin::onClickForgotPassword(void*)
1246{ 1248{
1247 if (sInstance ) 1249 if (sInstance )
1248 { 1250 {
1249 const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); 1251 const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordURL();
1250 if (!url.empty()) { 1252 if (!url.empty())
1253 {
1251 LLWeb::loadURLExternal(url); 1254 LLWeb::loadURLExternal(url);
1252 } else { 1255 }
1256 else
1257 {
1253 llwarns << "Link for 'forgotton password' not set." << llendl; 1258 llwarns << "Link for 'forgotton password' not set." << llendl;
1254 } 1259 }
1255 } 1260 }