PHOE-3870: Force transilate to off

Mon, 05 Mar 2012 22:38:40 -0800

author
Kadah_Coba <kadah.coba@gmail.com>
date
Mon, 05 Mar 2012 22:38:40 -0800
changeset 1660
9dfd7b7c426b
parent 1659
59082f7329bc
child 1661
935ca6650ff8

PHOE-3870: Force transilate to off

indra/llui/lllineeditor.cpp file | annotate | diff | revisions
indra/llui/lltexteditor.cpp file | annotate | diff | revisions
indra/newview/app_settings/settings.xml file | annotate | diff | revisions
indra/newview/llfloaterchat.cpp file | annotate | diff | revisions
indra/newview/llprefschat.cpp file | annotate | diff | revisions
indra/newview/llviewercontrol.cpp file | annotate | diff | revisions
indra/newview/llviewermessage.cpp file | annotate | diff | revisions
     1.1 --- a/indra/llui/lllineeditor.cpp	Tue Mar 06 11:53:44 2012 -0800
     1.2 +++ b/indra/llui/lllineeditor.cpp	Mon Mar 05 22:38:40 2012 -0800
     1.3 @@ -109,7 +109,7 @@
     1.4  protected:
     1.5  	void handleResponse(const std::string &translation, const std::string &detectedLanguage)
     1.6  	{
     1.7 -		static LLCachedControl<bool> rep(gSavedSettings, "PhoenixTranslateReplace2");
     1.8 +		static LLCachedControl<bool> rep(gSavedSettings, "PhoenixTranslateReplace_Deprecated");
     1.9  		if(rep)
    1.10  			m_line->deleteSelection();
    1.11  		m_line->insert((rep?"":" (") + translation + (rep?"":")"),m_line->getCursor());
     2.1 --- a/indra/llui/lltexteditor.cpp	Tue Mar 06 11:53:44 2012 -0800
     2.2 +++ b/indra/llui/lltexteditor.cpp	Mon Mar 05 22:38:40 2012 -0800
     2.3 @@ -118,7 +118,7 @@
     2.4  protected:
     2.5  	void handleResponse(const std::string &translation, const std::string &detectedLanguage)
     2.6  	{
     2.7 -		BOOL rep = gSavedSettings.getBOOL("PhoenixTranslateReplace2");
     2.8 +		BOOL rep = gSavedSettings.getBOOL("PhoenixTranslateReplace_Deprecated");
     2.9  		m_line->insertText((rep?"":" (") + translation +(rep?"":")"),rep);
    2.10  	}
    2.11  	void handleFailure()
     3.1 --- a/indra/newview/app_settings/settings.xml	Tue Mar 06 11:53:44 2012 -0800
     3.2 +++ b/indra/newview/app_settings/settings.xml	Mon Mar 05 22:38:40 2012 -0800
     3.3 @@ -10254,10 +10254,10 @@
     3.4  			<key>Value</key>
     3.5  			<integer>1</integer>
     3.6  		</map>
     3.7 -		<key>PhoenixTranslateReplace2</key>
     3.8 -		<map>
     3.9 -			<key>Comment</key>
    3.10 -			<string>Whether or not right click tranlate replaces the selected text or adds to it.</string>
    3.11 +		<key>PhoenixTranslateReplace_Deprecated</key>
    3.12 +		<map>
    3.13 +			<key>Comment</key>
    3.14 +			<string>(Deprecated) Whether or not right click tranlate replaces the selected text or adds to it.</string>
    3.15  			<key>Persist</key>
    3.16  			<integer>1</integer>
    3.17  			<key>Type</key>
    3.18 @@ -14692,10 +14692,10 @@
    3.19  			<key>Value</key>
    3.20  			<integer>1</integer>
    3.21  		</map>
    3.22 -		<key>TranslateChat</key>
    3.23 -		<map>
    3.24 -			<key>Comment</key>
    3.25 -			<string>Translate incoming chat messages</string>
    3.26 +		<key>TranslateChat_Deprecated</key>
    3.27 +		<map>
    3.28 +			<key>Comment</key>
    3.29 +			<string>(Deprecated) Translate incoming chat messages</string>
    3.30  			<key>Persist</key>
    3.31  			<integer>1</integer>
    3.32  			<key>Type</key>
     4.1 --- a/indra/newview/llfloaterchat.cpp	Tue Mar 06 11:53:44 2012 -0800
     4.2 +++ b/indra/newview/llfloaterchat.cpp	Mon Mar 05 22:38:40 2012 -0800
     4.3 @@ -115,7 +115,7 @@
     4.4  	childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
     4.5  	// Disable translate chat permanently since Google killed it -- TS
     4.6  	//childSetCommitCallback("translate chat",onClickToggleTranslateChat,this);
     4.7 -	//childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat"));
     4.8 +	//childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat_Deprecated"));
     4.9  	childSetVisible("Chat History Editor with mute",FALSE);
    4.10  	childSetEnabled("ChatChannel", gSavedSettings.getBOOL("PhoenixShowChatChannel"));
    4.11  	childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
    4.12 @@ -398,7 +398,7 @@
    4.13  
    4.14  // Disable translate chat permanently since Google killed it -- TS
    4.15  #if 0
    4.16 -// Update the "TranslateChat" pref after "translate chat" checkbox is toggled in
    4.17 +// Update the "TranslateChat_Deprecated" pref after "translate chat" checkbox is toggled in
    4.18  // the "Local Chat" floater.
    4.19  //static
    4.20  void LLFloaterChat::onClickToggleTranslateChat(LLUICtrl* caller, void *data)
    4.21 @@ -406,15 +406,15 @@
    4.22  	LLFloaterChat* floater = (LLFloaterChat*)data;
    4.23  
    4.24  	BOOL translate_chat = floater->getChild<LLCheckBoxCtrl>("translate chat")->get();
    4.25 -	gSavedSettings.setBOOL("TranslateChat", translate_chat);
    4.26 +	gSavedSettings.setBOOL("TranslateChat_Deprecated", translate_chat);
    4.27  }
    4.28  
    4.29 -// Update the "translate chat" checkbox after the "TranslateChat" pref is set in
    4.30 +// Update the "translate chat" checkbox after the "TranslateChat_Deprecated" pref is set in
    4.31  // some other place (e.g. prefs dialog).
    4.32  //static
    4.33  void LLFloaterChat::updateSettings()
    4.34  {
    4.35 -	BOOL translate_chat = gSavedSettings.getBOOL("TranslateChat");
    4.36 +	BOOL translate_chat = gSavedSettings.getBOOL("TranslateChat_Deprecated");
    4.37  	LLFloaterChat::getInstance(LLSD())->getChild<LLCheckBoxCtrl>("translate chat")->set(translate_chat);
    4.38  }
    4.39  #endif // disable translate chat
     5.1 --- a/indra/newview/llprefschat.cpp	Tue Mar 06 11:53:44 2012 -0800
     5.2 +++ b/indra/newview/llprefschat.cpp	Mon Mar 05 22:38:40 2012 -0800
     5.3 @@ -114,7 +114,7 @@
     5.4  	childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
     5.5  	childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
     5.6  	childSetValue("translate_language_combobox", 	gSavedSettings.getString("TranslateLanguage"));
     5.7 -	childSetValue("translate_chat", 	gSavedSettings.getBOOL("TranslateChat"));
     5.8 +	childSetValue("translate_chat", 	gSavedSettings.getBOOL("TranslateChat_Deprecated"));
     5.9  }
    5.10  
    5.11  void LLPrefsChatImpl::refreshValues()
    5.12 @@ -145,7 +145,7 @@
    5.13  	static LLCachedControl<F32> sChatBubbleOpacity(gSavedSettings, "ChatBubbleOpacity");
    5.14  	mBubbleOpacity = sChatBubbleOpacity;
    5.15  	mTranslateLanguage = gSavedSettings.getString("TranslateLanguage");
    5.16 -	mTranslateChat = gSavedSettings.getBOOL("TranslateChat");
    5.17 +	mTranslateChat = gSavedSettings.getBOOL("TranslateChat_Deprecated");
    5.18  	mIMEncryptedChatColor = gSavedSettings.getColor4("PhoenixIMEncryptedChatColor");
    5.19  }
    5.20  
    5.21 @@ -174,7 +174,7 @@
    5.22  	gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity);
    5.23  	gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity);	
    5.24  	gSavedSettings.setString("TranslateLanguage", mTranslateLanguage);	
    5.25 -	gSavedSettings.setBOOL("TranslateChat", mTranslateChat);
    5.26 +	gSavedSettings.setBOOL("TranslateChat_Deprecated", mTranslateChat);
    5.27  	gSavedSettings.setColor4("PhoenixIMEncryptedChatColor", mIMEncryptedChatColor);
    5.28  }
    5.29  
    5.30 @@ -210,7 +210,7 @@
    5.31  	gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
    5.32  
    5.33  	gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox"));
    5.34 -	gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat"));
    5.35 +	gSavedSettings.setBOOL("TranslateChat_Deprecated", childGetValue("translate_chat"));
    5.36  
    5.37  	refreshValues(); // member values become the official values and cancel becomes a no-op.
    5.38  }
     6.1 --- a/indra/newview/llviewercontrol.cpp	Tue Mar 06 11:53:44 2012 -0800
     6.2 +++ b/indra/newview/llviewercontrol.cpp	Mon Mar 05 22:38:40 2012 -0800
     6.3 @@ -657,7 +657,7 @@
     6.4  	gSavedSettings.getControl("AudioLevelMic")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));
     6.5  	gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _2));	
     6.6  	// Disable translate chat permanently since Google killed it -- TS
     6.7 -	//gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _2));	
     6.8 +	//gSavedSettings.getControl("TranslateChat_Deprecated")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _2));	
     6.9  	gSavedSettings.getControl("PhoenixBlockSpam")->getSignal()->connect(boost::bind(&handlePhoenixBlockSpam, _2));
    6.10  	gSavedSettings.getControl("CheesyBeacon")->getSignal()->connect(boost::bind(&handleCheesyBeaconChanged, _2));	
    6.11  	gSavedSettings.getControl("NonBlockingFilePicker")->getSignal()->connect(boost::bind(&handleNonBlockingFilePickerChanged, _2));	
     7.1 --- a/indra/newview/llviewermessage.cpp	Tue Mar 06 11:53:44 2012 -0800
     7.2 +++ b/indra/newview/llviewermessage.cpp	Mon Mar 05 22:38:40 2012 -0800
     7.3 @@ -3173,7 +3173,7 @@
     7.4  
     7.5  void check_translate_chat(const std::string &mesg, LLChat &chat, const BOOL history)
     7.6  {
     7.7 -	const bool translate = LLUI::sConfigGroup->getBOOL("TranslateChat");
     7.8 +	const bool translate = LLUI::sConfigGroup->getBOOL("TranslateChat_Deprecated");
     7.9  
    7.10  	if (translate && chat.mSourceType != CHAT_SOURCE_SYSTEM)
    7.11  	{

mercurial