aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterchat.cpp22
-rw-r--r--linden/indra/newview/llfloaterchat.h2
-rw-r--r--linden/indra/newview/llprefschat.cpp11
-rw-r--r--linden/indra/newview/llviewercontrol.cpp31
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml15
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml75
6 files changed, 148 insertions, 8 deletions
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index b14930b..f7ff3f9 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -108,6 +108,8 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
108 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open); 108 LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml",&getFactoryMap(),no_open);
109 109
110 childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes 110 childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes
111 childSetCommitCallback("translate chat",onClickToggleTranslateChat,this);
112 childSetValue("translate chat", gSavedSettings.getBOOL("TranslateChat"));
111 childSetVisible("Chat History Editor with mute",FALSE); 113 childSetVisible("Chat History Editor with mute",FALSE);
112 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this); 114 childSetAction("toggle_active_speakers_btn", onClickToggleActiveSpeakers, this);
113 setDefaultBtn("Chat"); 115 setDefaultBtn("Chat");
@@ -429,6 +431,26 @@ void LLFloaterChat::onClickToggleShowMute(LLUICtrl* caller, void *data)
429 } 431 }
430} 432}
431 433
434// Update the "TranslateChat" pref after "translate chat" checkbox is toggled in
435// the "Local Chat" floater.
436//static
437void LLFloaterChat::onClickToggleTranslateChat(LLUICtrl* caller, void *data)
438{
439 LLFloaterChat* floater = (LLFloaterChat*)data;
440
441 BOOL translate_chat = floater->getChild<LLCheckBoxCtrl>("translate chat")->get();
442 gSavedSettings.setBOOL("TranslateChat", translate_chat);
443}
444
445// Update the "translate chat" checkbox after the "TranslateChat" pref is set in
446// some other place (e.g. prefs dialog).
447//static
448void LLFloaterChat::updateSettings()
449{
450 BOOL translate_chat = gSavedSettings.getBOOL("TranslateChat");
451 LLFloaterChat::getInstance(LLSD())->getChild<LLCheckBoxCtrl>("translate chat")->set(translate_chat);
452}
453
432// Put a line of chat in all the right places 454// Put a line of chat in all the right places
433void LLFloaterChat::addChat(const LLChat& chat, 455void LLFloaterChat::addChat(const LLChat& chat,
434 BOOL from_instant_message, 456 BOOL from_instant_message,
diff --git a/linden/indra/newview/llfloaterchat.h b/linden/indra/newview/llfloaterchat.h
index e2bb54c..f894675 100644
--- a/linden/indra/newview/llfloaterchat.h
+++ b/linden/indra/newview/llfloaterchat.h
@@ -65,6 +65,7 @@ public:
65 virtual void onVisibilityChange(BOOL cur_visibility); 65 virtual void onVisibilityChange(BOOL cur_visibility);
66 virtual void setMinimized(BOOL); 66 virtual void setMinimized(BOOL);
67 void updateConsoleVisibility(); 67 void updateConsoleVisibility();
68 void updateSettings();
68 69
69 static void setHistoryCursorAndScrollToEnd(); 70 static void setHistoryCursorAndScrollToEnd();
70 71
@@ -77,6 +78,7 @@ public:
77 78
78 static void onClickMute(void *data); 79 static void onClickMute(void *data);
79 static void onClickToggleShowMute(LLUICtrl* caller, void *data); 80 static void onClickToggleShowMute(LLUICtrl* caller, void *data);
81 static void onClickToggleTranslateChat(LLUICtrl* caller, void *data);
80 static void onClickToggleActiveSpeakers(void* userdata); 82 static void onClickToggleActiveSpeakers(void* userdata);
81 static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata); 83 static void chatFromLogFile(LLLogChat::ELogLineType type,std::string line, void* userdata);
82 static void loadHistory(); 84 static void loadHistory();
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 2e08cac..b4614b8 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -76,6 +76,8 @@ private:
76 BOOL mChatChannel; 76 BOOL mChatChannel;
77 F32 mConsoleOpacity; 77 F32 mConsoleOpacity;
78 F32 mBubbleOpacity; 78 F32 mBubbleOpacity;
79 std::string mTranslateLanguage;
80 BOOL mTranslateChat;
79}; 81};
80 82
81LLPrefsChatImpl::LLPrefsChatImpl() 83LLPrefsChatImpl::LLPrefsChatImpl()
@@ -110,6 +112,8 @@ LLPrefsChatImpl::LLPrefsChatImpl()
110 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect")); 112 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect"));
111 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); 113 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
112 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); 114 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
115 childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage"));
116 childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat"));
113} 117}
114 118
115void LLPrefsChatImpl::refreshValues() 119void LLPrefsChatImpl::refreshValues()
@@ -137,6 +141,8 @@ void LLPrefsChatImpl::refreshValues()
137 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect"); 141 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect");
138 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); 142 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity");
139 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); 143 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity");
144 mTranslateLanguage = gSavedSettings.getString("TranslateLanguage");
145 mTranslateChat = gSavedSettings.getBOOL("TranslateChat");
140} 146}
141 147
142void LLPrefsChatImpl::cancel() 148void LLPrefsChatImpl::cancel()
@@ -163,6 +169,8 @@ void LLPrefsChatImpl::cancel()
163 gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel); 169 gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel);
164 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); 170 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity);
165 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); 171 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity);
172 gSavedSettings.setString("TranslateLanguage", mTranslateLanguage);
173 gSavedSettings.setBOOL("TranslateChat", mTranslateChat);
166} 174}
167 175
168void LLPrefsChatImpl::apply() 176void LLPrefsChatImpl::apply()
@@ -194,6 +202,9 @@ void LLPrefsChatImpl::apply()
194 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); 202 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
195 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); 203 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
196 204
205 gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox"));
206 gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat"));
207
197 BOOL chan_check = childGetValue("toggle_channel_control"); 208 BOOL chan_check = childGetValue("toggle_channel_control");
198 gSavedSettings.setBOOL("ChatChannelSelect", chan_check); 209 gSavedSettings.setBOOL("ChatChannelSelect", chan_check);
199 if (mChatChannel != chan_check) 210 if (mChatChannel != chan_check)
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index e1507d4..a73d0ab 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -71,6 +71,7 @@
71#include "llrender.h" 71#include "llrender.h"
72#include "llmediamanager.h" 72#include "llmediamanager.h"
73#include "llslider.h" 73#include "llslider.h"
74#include "llfloaterchat.h"
74 75
75 76
76#ifdef TOGGLE_HACKED_GODLIKE_VIEWER 77#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
@@ -485,6 +486,32 @@ bool handleVoiceClientPrefsChanged(const LLSD& newvalue)
485 return true; 486 return true;
486} 487}
487 488
489bool handleTranslateChatPrefsChanged(const LLSD& newvalue)
490{
491 LLFloaterChat* floaterp = LLFloaterChat::getInstance();
492
493 if(floaterp)
494 {
495 // update "translate chat" pref in "Local Chat" floater
496 floaterp->updateSettings();
497 }
498 return true;
499}
500
501// [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h
502bool rlvHandleEnableLegacyNamingChanged(const LLSD& newvalue)
503{
504 rlv_handler_t::fLegacyNaming = newvalue.asBoolean();
505 return true;
506}
507
508bool rlvHandleShowNameTagsChanged(const LLSD& newvalue)
509{
510 RlvSettings::fShowNameTags = newvalue.asBoolean();
511 return true;
512}
513// [/RLVa:KB]
514
488bool handleMediaDebugLevelChanged(const LLSD& newvalue) 515bool handleMediaDebugLevelChanged(const LLSD& newvalue)
489{ 516{
490 LLMediaManager *mgr = LLMediaManager::getInstance(); 517 LLMediaManager *mgr = LLMediaManager::getInstance();
@@ -663,7 +690,8 @@ void settings_setup_listeners()
663 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1)); 690 gSavedSettings.getControl("LipSyncEnabled")->getSignal()->connect(boost::bind(&handleVoiceClientPrefsChanged, _1));
664 gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1)); 691 gSavedSettings.getControl("MediaDebugLevel")->getSignal()->connect(boost::bind(&handleMediaDebugLevelChanged, _1));
665 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1)); 692 gSavedSettings.getControl("SliderScrollWheelMultiplier")->getSignal()->connect(boost::bind(&handleSliderScrollWheelMultiplierChanged, _1));
666 693 gSavedSettings.getControl("TranslateChat")->getSignal()->connect(boost::bind(&handleTranslateChatPrefsChanged, _1));
694
667// [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h 695// [RLVa:KB] - Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h
668 if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING)) 696 if (gSavedSettings.controlExists(RLV_SETTING_ENABLELEGACYNAMING))
669 gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&rlvHandleEnableLegacyNamingChanged, _1)); 697 gSavedSettings.getControl(RLV_SETTING_ENABLELEGACYNAMING)->getSignal()->connect(boost::bind(&rlvHandleEnableLegacyNamingChanged, _1));
@@ -751,7 +779,6 @@ template <> eControlType get_control_type<LLSD>(const LLSD& in, LLSD& out)
751 return TYPE_LLSD; 779 return TYPE_LLSD;
752} 780}
753 781
754
755#if TEST_CACHED_CONTROL 782#if TEST_CACHED_CONTROL
756 783
757#define DECL_LLCC(T, V) static LLCachedControl<T> mySetting_##T("TestCachedControl"#T, V) 784#define DECL_LLCC(T, V) static LLCachedControl<T> mySetting_##T("TestCachedControl"#T, V)
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
index 54c146d..2e6fee4 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
@@ -65,9 +65,9 @@
65 Control your camera 65 Control your camera
66 </string> 66 </string>
67 67
68 <layout_stack border="false" bottom="2" follows="left|top|right|bottom" height="250" left="2" 68 <layout_stack border="false" bottom="2" follows="left|top|right|bottom" height="255" left="2"
69 orientation="horizontal" width="430" name="panels"> 69 orientation="horizontal" width="430" name="panels">
70 <layout_panel border="false" bottom="0" default_tab_group="1" height="130" left="0" 70 <layout_panel border="false" bottom="0" default_tab_group="1" height="135" left="0"
71 min_width="275" name="im_contents_panel" width="305"> 71 min_width="275" name="im_contents_panel" width="305">
72 <combo_box follows="left|top" height="20" label="Gestures" left="5" name="Gesture" 72 <combo_box follows="left|top" height="20" label="Gestures" left="5" name="Gesture"
73 width="120"> 73 width="120">
@@ -75,10 +75,13 @@
75 Gestures 75 Gestures
76 </combo_item> 76 </combo_item>
77 </combo_box> 77 </combo_box>
78 <check_box bottom_delta="0" enabled="true" follows="left|top" font="SansSerifSmall" 78 <check_box bottom_delta="7" enabled="true" follows="left|top" font="SansSerifSmall"
79 height="20" initial_value="false" label="Show muted text" left_delta="125" 79 height="20" initial_value="false" label="Show Muted Text" left_delta="125"
80 name="show mutes" radio_style="false" width="116" /> 80 name="show mutes" radio_style="false" width="116" />
81 <button bottom_delta="0" follows="right|top" height="20" label="&lt; &lt;" 81 <check_box bottom_delta="-15" enabled="true" follows="left|top" font="SansSerifSmall"
82 height="20" initial_value="false" label="Translate Chat (powered by Google)" left_delta="0"
83 name="translate chat" radio_style="false" width="100" />
84 <button bottom_delta="7" follows="right|top" height="20" label="&lt; &lt;"
82 label_selected="&gt; &gt;" left="272" name="toggle_active_speakers_btn" 85 label_selected="&gt; &gt;" left="272" name="toggle_active_speakers_btn"
83 right="305" 86 right="305"
84 tool_tip="Click here to show list of active participants in this IM session." 87 tool_tip="Click here to show list of active participants in this IM session."
@@ -107,7 +110,7 @@
107 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" 110 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0"
108 enabled="true" follows="left|right|bottom" font="SansSerif" 111 enabled="true" follows="left|right|bottom" font="SansSerif"
109 handle_edit_keys_directly="false" height="20" label="Click here to chat." 112 handle_edit_keys_directly="false" height="20" label="Click here to chat."
110 left="0" max_length="254" mouse_opaque="true" name="Chat Editor" 113 left="105" max_length="2147483647" mouse_opaque="true" name="Chat Editor"
111 right="-70" select_all_on_focus_received="false" select_on_focus="false" 114 right="-70" select_all_on_focus_received="false" select_on_focus="false"
112 tab_group="1" /> 115 tab_group="1" />
113 <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65" 116 <flyout_button bottom="0" follows="right|bottom" height="20" label="Say" left="-65"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
index 61c6b23..95d0c33 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
@@ -162,4 +162,79 @@
162 increment="0.05" initial_val="1" label="Bubble opacity:" left="148" max_val="1" 162 increment="0.05" initial_val="1" label="Bubble opacity:" left="148" max_val="1"
163 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true" 163 min_val="0" mouse_opaque="true" name="bubble_chat_opacity" show_text="true"
164 value="0.5" width="225" /> 164 value="0.5" width="225" />
165
166 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
167 bottom="-420" drop_shadow_visible="true" enabled="true" follows="left|top"
168 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"
169 mouse_opaque="false" name="text_translate_chat" v_pad="0" width="128">
170 Translate Chat:
171 </text>
172 <check_box bottom="-427" control_name="TranslateChat" enabled="true" follows="left|top"
173 font="SansSerifSmall" height="16" initial_value="false"
174 label="Use machine translation while chatting (powered by Google)" left="148" mouse_opaque="true"
175 name="translate_chat" radio_style="false" width="237" />
176 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
177 bottom="-442" drop_shadow_visible="true" enabled="true" follows="left|top"
178 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="149"
179 mouse_opaque="false" name="text_translate_chat" v_pad="0" width="160">
180 Translate into this language:
181 </text>
182 <combo_box allow_text_entry="true" bottom="-448" enabled="true"
183 follows="left|top" height="16" left_delta="183" max_chars="135"
184 mouse_opaque="true" name="translate_language_combobox" width="146">
185 <combo_item type="string" length="1" enabled="true" name="System Default Language" value="default">
186 System Default
187 </combo_item>
188 <combo_item type="string" length="1" enabled="true" name="English" value="en">
189 English
190 </combo_item>
191
192 <!-- After "System Default" and "English", please keep the rest of these combo_items in alphabetical order by the first character in the string. -->
193
194 <combo_item type="string" length="1" enabled="true" name="Danish" value="da">
195 Dansk (Danish)
196 </combo_item>
197 <combo_item type="string" length="1" enabled="true" name="Deutsch(German)" value="de">
198 Deutsch (German)
199 </combo_item>
200 <combo_item type="string" length="1" enabled="true" name="Spanish" value="es">
201 Español (Spanish)
202 </combo_item>
203 <combo_item type="string" length="1" enabled="true" name="French" value="fr">
204 Français (French)
205 </combo_item>
206 <combo_item type="string" length="1" enabled="true" name="Italian" value="it">
207 Italiano (Italian)
208 </combo_item>
209 <combo_item type="string" length="1" enabled="true" name="Hungarian" value="hu">
210 Magyar (Hungarian)
211 </combo_item>
212 <combo_item type="string" length="1" enabled="true" name="Dutch" value="nl">
213 Nederlands (Dutch)
214 </combo_item>
215 <combo_item type="string" length="1" enabled="true" name="Polish" value="pl">
216 Polski (Polish)
217 </combo_item>
218 <combo_item type="string" length="1" enabled="true" name="Portugese" value="pt">
219 Portugués (Portuguese)
220 </combo_item>
221 <combo_item type="string" length="1" enabled="true" name="Russian" value="ru">
222 Русский (Russian)
223 </combo_item>
224 <combo_item type="string" length="1" enabled="true" name="Turkish" value="tr">
225 Türkçe (Turkish)
226 </combo_item>
227 <combo_item type="string" length="1" enabled="true" name="Ukrainian" value="uk">
228 Українська (Ukrainian)
229 </combo_item>
230 <combo_item type="string" length="1" enabled="true" name="Chinese" value="zh">
231 中文 (简体) (Chinese)
232 </combo_item>
233 <combo_item type="string" length="1" enabled="true" name="(Japanese)" value="ja">
234 日本語 (Japanese)
235 </combo_item>
236 <combo_item type="string" length="1" enabled="true" name="(Korean)" value="ko">
237 한국어 (Korean)
238 </combo_item>
239 </combo_box>
165</panel> 240</panel>