diff options
author | Loren Shih <seraph@lindenlab.com> | 2010-03-18 10:19:18 -0400 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2010-03-18 10:19:18 -0400 |
commit | c86f61fd313a9f64dd0f1c5d100f39d6a3cb8eb0 (patch) | |
tree | bd2064d723a9596b45ce2df3c33f0556cf01a681 /indra/newview/llfloaterpreference.cpp | |
parent | 896b88063ed0e08362c9e277e7ef8aba5afef0db (diff) | |
parent | a3a4235a8904cf4d6e565c82d5d90d8a64c15180 (diff) |
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 25 |
1 files changed, 23 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; } |