From dde727aa0f293b4a91ebe5ed573a55e87caa413a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Jun 2017 10:21:34 -0700 Subject: MAINT-7254, MAINT-7255: Use cap to get and set UserInfo on simhost. Check new is_verified flag and disable IM2Email if value is false. --- indra/newview/llagent.cpp | 4 +++- indra/newview/llfloaterpreference.cpp | 11 ++++++----- indra/newview/llfloaterpreference.h | 4 ++-- indra/newview/llviewermessage.cpp | 3 ++- 4 files changed, 13 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index ebff73debf..f67bb22f5b 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4383,16 +4383,18 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl) } bool im_via_email; + bool is_verified_email; std::string email; std::string dir_visibility; im_via_email = result["im_via_email"].asBoolean(); + is_verified_email = result["is_verified"].asBoolean(); email = result["email"].asString(); dir_visibility = result["directory_visibility"].asString(); // TODO: This should probably be changed. I'm not entirely comfortable // having LLAgent interact directly with the UI in this way. - LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); + LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, is_verified_email); LLFloaterSnapshot::setAgentEmail(email); } diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1f460c05ec..e369403e22 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1016,12 +1016,12 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata) } // static -void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email) +void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, bool is_verified_email) { LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences"); if (instance) { - instance->setPersonalInfo(visibility, im_via_email); + instance->setPersonalInfo(visibility, im_via_email, is_verified_email); } } @@ -1830,7 +1830,7 @@ bool LLFloaterPreference::moveTranscriptsAndLog() return true; } -void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email) +void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, bool is_verified_email) { mGotPersonalInfo = true; mOriginalIMViaEmail = im_via_email; @@ -1855,8 +1855,9 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im getChildView("friends_online_notify_checkbox")->setEnabled(TRUE); getChild("online_visibility")->setValue(mOriginalHideOnlineStatus); getChild("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility); - getChildView("send_im_to_email")->setEnabled(TRUE); - getChild("send_im_to_email")->setValue(im_via_email); + getChildView("send_im_to_email")->setEnabled(is_verified_email); + // *TODO: Show or hide verify email text here based on is_verified_email + getChild("send_im_to_email")->setValue(im_via_email); getChildView("favorites_on_login_check")->setEnabled(TRUE); getChildView("log_path_button")->setEnabled(TRUE); getChildView("chat_font_size")->setEnabled(TRUE); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 2bb2e7e9ff..444ad5a928 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -75,7 +75,7 @@ public: /*virtual*/ void changed(const LLUUID& session_id, U32 mask) {}; // static data update, called from message handler - static void updateUserInfo(const std::string& visibility, bool im_via_email); + static void updateUserInfo(const std::string& visibility, bool im_via_email, bool is_verified_email); // refresh all the graphics preferences menus static void refreshEnabledGraphics(); @@ -147,7 +147,7 @@ public: void onClickLogPath(); bool moveTranscriptsAndLog(); void enableHistory(); - void setPersonalInfo(const std::string& visibility, bool im_via_email); + void setPersonalInfo(const std::string& visibility, bool im_via_email, bool is_verified_email); void refreshEnabledState(); void onCommitWindowedMode(); void refresh(); // Refresh enable/disable diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 98093344a9..2144c7d481 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -7277,7 +7277,8 @@ void process_user_info_reply(LLMessageSystem* msg, void**) std::string dir_visibility; msg->getString( "UserData", "DirectoryVisibility", dir_visibility); - LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email); + // For Message based user info information the is_verified is assumed to be false. + LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, false); LLFloaterSnapshot::setAgentEmail(email); } -- cgit v1.2.3