summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2017-06-06 10:21:34 -0700
committerRider Linden <rider@lindenlab.com>2017-06-06 10:21:34 -0700
commitdde727aa0f293b4a91ebe5ed573a55e87caa413a (patch)
treefc222dbffc8d043e7d2004ff522cedfe7c74b3d6 /indra/newview
parent746848bee9a2358a6229498901208db38c4b4542 (diff)
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.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp4
-rw-r--r--indra/newview/llfloaterpreference.cpp11
-rw-r--r--indra/newview/llfloaterpreference.h4
-rw-r--r--indra/newview/llviewermessage.cpp3
4 files changed, 13 insertions, 9 deletions
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<LLFloaterPreference>("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<LLUICtrl>("online_visibility")->setValue(mOriginalHideOnlineStatus);
getChild<LLUICtrl>("online_visibility")->setLabelArg("[DIR_VIS]", mDirectoryVisibility);
- getChildView("send_im_to_email")->setEnabled(TRUE);
- getChild<LLUICtrl>("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<LLUICtrl>("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);
}