From acd7d31f3ea161374f2fb32bc50defe43586af8d Mon Sep 17 00:00:00 2001 From: Jiao Li <angela@lindenlab.com> Date: Mon, 28 Sep 2009 06:17:18 +0000 Subject: [PATCH] EXT-735 Login failed if start location wasn't defined by user -- reviewed by oreh --- indra/newview/llpanellogin.cpp | 16 ++++++++++++---- .../skins/default/xui/en/notifications.xml | 11 +++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 9caa7518542..150fd399c63 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -837,14 +837,22 @@ void LLPanelLogin::onClickConnect(void *) std::string first = sInstance->childGetText("first_name_edit"); std::string last = sInstance->childGetText("last_name_edit"); - if (!first.empty() && !last.empty()) + LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo"); + std::string combo_text = combo->getSimple(); + + if (first.empty() || last.empty()) { - // has both first and last name typed - sInstance->mCallback(0, sInstance->mCallbackData); + LLNotifications::instance().add("MustHaveAccountToLogIn"); + } + else if( (combo_text=="<Type region name>" || combo_text =="") + && LLURLSimString::sInstance.mSimString =="") + { + LLNotifications::instance().add("StartRegionEmpty"); } else { - LLNotifications::instance().add("MustHaveAccountToLogIn"); + // has both first and last name typed + sInstance->mCallback(0, sInstance->mCallbackData); } } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 80d501b63ec..044194a4ed4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -994,6 +994,17 @@ The object may be out of range or may have been deleted. There was a problem saving a compiled script due to the following reason: [REASON]. Please try re-saving the script later. </notification> + <notification + icon="alertmodal.tga" + name="StartRegionEmpty" + type="alertmodal"> +Oops, Your Start Region is not defined. +Please type the Region name in Start Location box or choose My Last Location or My Home as your Start Location. + <usetemplate + name="okbutton" + yestext="OK"/> + </notification> + <notification icon="alertmodal.tga" name="CouldNotStartStopScript" -- GitLab