summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp39
1 files changed, 32 insertions, 7 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 224514dd48..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:
@@ -537,10 +540,10 @@ void LLFloaterPreference::onOpen(const LLSD& key)
{
childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel());
childSetVisible("maturity_desired_combobox", false);
-
- // Display selected maturity icons.
- onChangeMaturity();
}
+
+ // Display selected maturity icons.
+ onChangeMaturity();
// Enabled/disabled popups, might have been changed by user actions
// while preferences floater was closed.
@@ -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()
@@ -1289,7 +1300,7 @@ BOOL LLPanelPreference::postBuild()
if (hasChild("media_enabled"))
{
bool media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
- getChild<LLCheckBoxCtrl>("voice_call_friends_only_check")->setCommitCallback(boost::bind(&showFriendsOnlyWarning, _1, _2));
+
getChild<LLCheckBoxCtrl>("media_enabled")->set(media_enabled);
getChild<LLCheckBoxCtrl>("autoplay_enabled")->setEnabled(media_enabled);
}
@@ -1297,7 +1308,21 @@ BOOL LLPanelPreference::postBuild()
{
getChild<LLCheckBoxCtrl>("music_enabled")->set(gSavedSettings.getBOOL("AudioStreamingMusic"));
}
-
+ if (hasChild("voice_call_friends_only_check"))
+ {
+ 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;
}