diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2010-03-17 13:25:18 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2010-03-17 13:25:18 +0200 |
commit | 5cae8140f4dfbdd9c4b3237a0d47248753180913 (patch) | |
tree | 2181785d5ad6c21b3fa67919c817681ee76eadb7 /indra/newview | |
parent | 8bf0509959e5f8ff7d8628d02f9193c8609b2f31 (diff) |
fixed EXT-6284 ([HARD CODED] - Menu Einstellungen, Tab Erweitert: "MiddleMouse" needs to be localized)
Control value is preserved, it is being localized on presentation
Reviewed by Richard at https://codereview.productengine.com/secondlife/r/24/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 25 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_advanced.xml | 4 |
2 files changed, 27 insertions, 2 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 8bffe9bf57..e998d10fcc 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -110,6 +110,9 @@ const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; +//control value for middle mouse as talk2push button +const static std::string MIDDLE_MOUSE_CV = "MiddleMouse"; + class LLVoiceSetKeyDialog : public LLModalDialog { public: @@ -1008,9 +1011,17 @@ void LLFloaterPreference::setKey(KEY key) void LLFloaterPreference::onClickSetMiddleMouse() { - childSetValue("modifier_combo", "MiddleMouse"); + LLUICtrl* p2t_line_editor = getChild<LLUICtrl>("modifier_combo"); + // update the control right away since we no longer wait for apply - getChild<LLUICtrl>("modifier_combo")->onCommit(); + p2t_line_editor->setControlValue(MIDDLE_MOUSE_CV); + + //push2talk button "middle mouse" control value is in English, need to localize it for presentation + LLPanel* advanced_preferences = dynamic_cast<LLPanel*>(p2t_line_editor->getParent()); + if (advanced_preferences) + { + p2t_line_editor->setValue(advanced_preferences->getString("middle_mouse")); + } } /* void LLFloaterPreference::onClickSkipDialogs() @@ -1302,6 +1313,16 @@ BOOL LLPanelPreference::postBuild() getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2)); } + // Panel Advanced + if (hasChild("modifier_combo")) + { + //localizing if push2talk button is set to middle mouse + if (MIDDLE_MOUSE_CV == childGetValue("modifier_combo").asString()) + { + childSetValue("modifier_combo", getString("middle_mouse")); + } + } + apply(); return true; } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 4be4d6b432..c658e0de6f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -13,6 +13,10 @@ name="aspect_ratio_text"> [NUM]:[DEN] </panel.string> + <panel.string + name="middle_mouse"> + Middle Mouse + </panel.string> <icon follows="left|top" height="18" |