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/llfloaterpreference.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/llfloaterpreference.cpp') 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); -- cgit v1.2.3 From 526087d9ab6f1fb24e8808a6bef83e26fe6da857 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 4 Oct 2017 12:43:53 -0700 Subject: MAINT-7468: Show tooltip on disabled IM to Email if unverified email. --- indra/newview/llfloaterpreference.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llfloaterpreference.cpp') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e369403e22..5222637039 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1856,6 +1856,13 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im getChild("online_visibility")->setValue(mOriginalHideOnlineStatus); getChild("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility); getChildView("send_im_to_email")->setEnabled(is_verified_email); + + std::string tooltip; + if (!is_verified_email) + tooltip = getString("email_unverified_tooltip"); + + getChildView("send_im_to_email")->setToolTip(tooltip); + // *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); -- cgit v1.2.3