diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2021-10-01 14:09:12 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-11-30 01:19:43 +0200 | 
| commit | ef0b48ce5a918d30e4303c7b6eebec69c21ab8cf (patch) | |
| tree | 87780a033d402dcf8a27b3cc82d553c7aa9fcec6 /indra/newview | |
| parent | 850767eb214371737970aad00c9b3e8103f98b32 (diff) | |
SL-16119 Viewer should now direct IM 2 Email setting to web
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llagent.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llagent.h | 6 | ||||
| -rw-r--r-- | indra/newview/llfloaterpreference.cpp | 23 | ||||
| -rw-r--r-- | indra/newview/llfloaterpreference.h | 5 | ||||
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_preferences.xml | 6 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 24 | 
7 files changed, 33 insertions, 57 deletions
| diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 1e7711e577..50e0d1d935 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -4636,23 +4636,19 @@ void LLAgent::requestAgentUserInfoCoro(std::string capurl)          return;      } -    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, is_verified_email); +    LLFloaterPreference::updateUserInfo(dir_visibility);      LLFloaterSnapshot::setAgentEmail(email);  } -void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& directory_visibility) +void LLAgent::sendAgentUpdateUserInfo(const std::string& directory_visibility)  {      std::string cap; @@ -4665,16 +4661,16 @@ void LLAgent::sendAgentUpdateUserInfo(bool im_via_email, const std::string& dire      if (!cap.empty())      {          LLCoros::instance().launch("updateAgentUserInfoCoro", -            boost::bind(&LLAgent::updateAgentUserInfoCoro, this, cap, im_via_email, directory_visibility)); +            boost::bind(&LLAgent::updateAgentUserInfoCoro, this, cap, directory_visibility));      }      else      { -        sendAgentUpdateUserInfoMessage(im_via_email, directory_visibility); +        sendAgentUpdateUserInfoMessage(directory_visibility);      }  } -void LLAgent::updateAgentUserInfoCoro(std::string capurl, bool im_via_email, std::string directory_visibility) +void LLAgent::updateAgentUserInfoCoro(std::string capurl, std::string directory_visibility)  {      LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);      LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t @@ -4685,8 +4681,8 @@ void LLAgent::updateAgentUserInfoCoro(std::string capurl, bool im_via_email, std      httpOpts->setFollowRedirects(true);      LLSD body(LLSDMap -        ("dir_visibility",  LLSD::String(directory_visibility)) -        ("im_via_email",    LLSD::Boolean(im_via_email))); +        ("dir_visibility",  LLSD::String(directory_visibility))); +      LLSD result = httpAdapter->postAndSuspend(httpRequest, capurl, body, httpOpts, httpHeaders); @@ -4714,14 +4710,13 @@ void LLAgent::sendAgentUserInfoRequestMessage()      sendReliableMessage();  } -void LLAgent::sendAgentUpdateUserInfoMessage(bool im_via_email, const std::string& directory_visibility) +void LLAgent::sendAgentUpdateUserInfoMessage(const std::string& directory_visibility)  {      gMessageSystem->newMessageFast(_PREHASH_UpdateUserInfo);      gMessageSystem->nextBlockFast(_PREHASH_AgentData);      gMessageSystem->addUUIDFast(_PREHASH_AgentID, getID());      gMessageSystem->addUUIDFast(_PREHASH_SessionID, getSessionID());      gMessageSystem->nextBlockFast(_PREHASH_UserData); -    gMessageSystem->addBOOLFast(_PREHASH_IMViaEMail, im_via_email);      gMessageSystem->addString("DirectoryVisibility", directory_visibility);      gAgent.sendReliableMessage(); diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index 134540c6b3..498bea3c07 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -928,14 +928,14 @@ public:  	void 			sendAgentUserInfoRequest();  // IM to Email and Online visibility -	void			sendAgentUpdateUserInfo(bool im_to_email, const std::string& directory_visibility); +	void			sendAgentUpdateUserInfo(const std::string& directory_visibility);  private:      void            requestAgentUserInfoCoro(std::string capurl); -    void            updateAgentUserInfoCoro(std::string capurl, bool im_via_email, std::string directory_visibility); +    void            updateAgentUserInfoCoro(std::string capurl, std::string directory_visibility);      // DEPRECATED: may be removed when User Info cap propagates       void 			sendAgentUserInfoRequestMessage(); -    void            sendAgentUpdateUserInfoMessage(bool im_via_email, const std::string& directory_visibility); +    void            sendAgentUpdateUserInfoMessage(const std::string& directory_visibility);  	//--------------------------------------------------------------------  	// Receive diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 82f01fb747..da01457126 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -261,7 +261,6 @@ std::string LLFloaterPreference::sSkin = "";  LLFloaterPreference::LLFloaterPreference(const LLSD& key)  	: LLFloater(key),  	mGotPersonalInfo(false), -	mOriginalIMViaEmail(false),  	mLanguageChanged(false),  	mAvatarDataInitialized(false),  	mSearchDataDirty(true) @@ -557,11 +556,9 @@ void LLFloaterPreference::apply()  	if (mGotPersonalInfo)  	{  -		bool new_im_via_email = getChild<LLUICtrl>("send_im_to_email")->getValue().asBoolean();  		bool new_hide_online = getChild<LLUICtrl>("online_visibility")->getValue().asBoolean();		 -		if ((new_im_via_email != mOriginalIMViaEmail) -			||(new_hide_online != mOriginalHideOnlineStatus)) +		if (new_hide_online != mOriginalHideOnlineStatus)  		{  			// This hack is because we are representing several different 	   			// possible strings with a single checkbox. Since most users 	  @@ -575,7 +572,7 @@ void LLFloaterPreference::apply()  			 //Update showonline value, otherwise multiple applys won't work  				mOriginalHideOnlineStatus = new_hide_online;  			} -			gAgent.sendAgentUpdateUserInfo(new_im_via_email,mDirectoryVisibility); +			gAgent.sendAgentUpdateUserInfo(mDirectoryVisibility);  		}  	} @@ -980,12 +977,12 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata)  }  // static  -void LLFloaterPreference::updateUserInfo(const std::string& visibility, bool im_via_email, bool is_verified_email) +void LLFloaterPreference::updateUserInfo(const std::string& visibility)  {  	LLFloaterPreference* instance = LLFloaterReg::findTypedInstance<LLFloaterPreference>("preferences");  	if (instance)  	{ -        instance->setPersonalInfo(visibility, im_via_email, is_verified_email); +        instance->setPersonalInfo(visibility);  	}  } @@ -1694,10 +1691,9 @@ bool LLFloaterPreference::moveTranscriptsAndLog()  	return true;  } -void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im_via_email, bool is_verified_email) +void LLFloaterPreference::setPersonalInfo(const std::string& visibility)  {  	mGotPersonalInfo = true; -	mOriginalIMViaEmail = im_via_email;  	mDirectoryVisibility = visibility;  	if (visibility == VISIBILITY_DEFAULT) @@ -1719,16 +1715,7 @@ 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(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<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 4c8568c385..5ef2ca68d3 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -88,7 +88,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, bool is_verified_email); +	static void updateUserInfo(const std::string& visibility);  	// refresh all the graphics preferences menus  	static void refreshEnabledGraphics(); @@ -160,7 +160,7 @@ public:  	void changeLogPath(const std::vector<std::string>& filenames, std::string proposed_name);  	bool moveTranscriptsAndLog();  	void enableHistory(); -	void setPersonalInfo(const std::string& visibility, bool im_via_email, bool is_verified_email); +	void setPersonalInfo(const std::string& visibility);  	void refreshEnabledState();  	void onCommitWindowedMode();  	void refresh();	// Refresh enable/disable @@ -206,7 +206,6 @@ private:  	static std::string sSkin;  	notifications_map mNotificationOptions;  	bool mGotPersonalInfo; -	bool mOriginalIMViaEmail;  	bool mLanguageChanged;  	bool mAvatarDataInitialized;  	std::string mPriorInstantMessageLogPath; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 0c55e3276b..14442c9705 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6430,15 +6430,12 @@ void process_user_info_reply(LLMessageSystem* msg, void**)  				<< "wrong agent id." << LL_ENDL;  	} -	BOOL im_via_email; -	msg->getBOOLFast(_PREHASH_UserData, _PREHASH_IMViaEMail, im_via_email);  	std::string email;  	msg->getStringFast(_PREHASH_UserData, _PREHASH_EMail, email);  	std::string dir_visibility;  	msg->getString( "UserData", "DirectoryVisibility", dir_visibility); -    // For Message based user info information the is_verified is assumed to be false. -	LLFloaterPreference::updateUserInfo(dir_visibility, im_via_email, false);    +	LLFloaterPreference::updateUserInfo(dir_visibility);     	LLFloaterSnapshot::setAgentEmail(email);  } diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index ee730dcb01..c4adf0409d 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -11,12 +11,6 @@   single_instance="true"   title="PREFERENCES"   width="658"> -    <floater.string -     name="email_unverified_tooltip"> -        Please verify your email to enable IM to Email by visiting -https://accounts.secondlife.com/change_email/ -    </floater.string> -      <button       follows="right|bottom"       height="23" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index c023cb036e..fee745aca3 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -44,16 +44,6 @@      <check_box          enabled="false"          height="16" -        label="Email me IMs when I'm offline" -        layout="topleft" -        name="send_im_to_email" -        top_pad="6" -        width="330"> -    </check_box> - -    <check_box -        enabled="false" -        height="16"          label="Only friends and groups can call or IM me"          layout="topleft"          name="voice_call_friends_only_check" @@ -62,6 +52,20 @@      </check_box>      <text +       font="SansSerifSmall" +       height="16" +       layout="topleft" +       length="1"        +       name="email_settings" +       skip_link_underline="true" +       top_pad="6" +       left_delta="2" +       type="string" +       width="350"> +      [https://accounts.secondlife.com/change_email Open email notification settings] +    </text> + +    <text          layout="topleft"          left="345"          height="12" | 
