diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-01 12:52:21 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-01 12:52:21 -0500 |
commit | 27351b8bf59c3b2cfc31c27947397055a40b52d7 (patch) | |
tree | 6720e5dc77c8fee7f7fdecb46f220fb30247efb0 /indra/newview/llpanellogin.cpp | |
parent | c361ee133761412acf766f6680b14e29e60f8a1e (diff) | |
parent | 677938e6531209ca9ccd29146454af67f1c743c7 (diff) |
automated merge for viewer-2.0 -> avp.
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llpanellogin.cpp')
-rw-r--r-- | indra/newview/llpanellogin.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index ec0f8e303c..d2a17dbd97 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -51,6 +51,7 @@ #include "llfloaterpreference.h" #include "llfocusmgr.h" #include "lllineeditor.h" +#include "llnotificationsutil.h" #include "llstartup.h" #include "lltextbox.h" #include "llui.h" @@ -225,6 +226,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); + LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); std::string sim_string = LLURLSimString::sInstance.mSimString; if (!sim_string.empty()) { @@ -892,14 +894,29 @@ void LLPanelLogin::onClickConnect(void *) LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); std::string combo_text = combo->getSimple(); - if (first.empty() || last.empty()) + bool has_first_and_last = !(first.empty() || last.empty()); + bool has_location = false; + + if(combo_text=="<Type region name>" || combo_text =="") + { + // *NOTE: Mani - Location field is not always committed by this point! + // This may be duplicate work, but better than not doing the work! + LLURLSimString::sInstance.setString(""); + } + else + { + // *NOTE: Mani - Location field is not always committed by this point! + LLURLSimString::sInstance.setString(combo_text); + has_location = true; + } + + if(!has_first_and_last) { - LLNotifications::instance().add("MustHaveAccountToLogIn"); + LLNotificationsUtil::add("MustHaveAccountToLogIn"); } - else if( (combo_text=="<Type region name>" || combo_text =="") - && LLURLSimString::sInstance.mSimString =="") + else if(!has_location) { - LLNotifications::instance().add("StartRegionEmpty"); + LLNotificationsUtil::add("StartRegionEmpty"); } else { @@ -913,7 +930,7 @@ void LLPanelLogin::onClickConnect(void *) // static bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD& response) { - S32 option = LLNotification::getSelectedOption(notification, response); + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == option) { llinfos << "Going to account creation URL" << llendl; @@ -954,7 +971,7 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == FALSE) { - LLNotifications::instance().add("CapsKeyOn"); + LLNotificationsUtil::add("CapsKeyOn"); sCapslockDidNotification = TRUE; } } |