Revert "SL-11841 make ‘Push to talk’ the default setting"
This reverts commits:master126877bc5bb661f62a7ace660c7e7b
parent
ce660c7e7b
commit
f30cc7b5bb
|
|
@ -32,7 +32,7 @@
|
|||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
|
||||
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
|
||||
</first_person>
|
||||
<third_person>
|
||||
<binding key="A" mask="NONE" command="turn_left"/>
|
||||
|
|
@ -125,7 +125,7 @@
|
|||
<binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
|
||||
|
||||
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
|
||||
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
|
||||
<binding key="" mask="NONE" mouse="LMB" command="walk_to"/>
|
||||
</third_person>
|
||||
<sitting>
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
<binding key="ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
|
||||
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
|
||||
</sitting>
|
||||
<edit_avatar>
|
||||
<!--Avatar editing camera controls-->
|
||||
|
|
@ -250,6 +250,6 @@
|
|||
<binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
|
||||
<binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
|
||||
|
||||
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
|
||||
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
|
||||
</edit_avatar>
|
||||
</keys>
|
||||
|
|
|
|||
|
|
@ -8308,13 +8308,13 @@
|
|||
<key>PushToTalkToggle</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Should the push-to-talk toolbar button behave as a toggle</string>
|
||||
<string>Should the push-to-talk button behave as a toggle</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>QAMode</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -4562,6 +4562,11 @@ void LLAppViewer::loadKeyBindings()
|
|||
LLKeyboard::keyFromString(key_string, &key);
|
||||
}
|
||||
|
||||
value = gSavedSettings.getBOOL("PushToTalkToggle");
|
||||
std::string control_name = value ? "toggle_voice" : "voice_follow_key";
|
||||
third_person_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
|
||||
sitting_view.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
|
||||
|
||||
if (third_person_view.hasUnsavedChanges())
|
||||
{
|
||||
// calls loadBindingsXML()
|
||||
|
|
@ -4573,6 +4578,25 @@ void LLAppViewer::loadKeyBindings()
|
|||
// calls loadBindingsXML()
|
||||
sitting_view.saveToSettings();
|
||||
}
|
||||
|
||||
// in case of voice we need to repeat this in other modes
|
||||
|
||||
for (U32 i = 0; i < LLKeyConflictHandler::MODE_COUNT - 1; ++i)
|
||||
{
|
||||
// edit and first person modes; MODE_SAVED_SETTINGS not in use at the moment
|
||||
if (i != LLKeyConflictHandler::MODE_THIRD_PERSON && i != LLKeyConflictHandler::MODE_SITTING)
|
||||
{
|
||||
LLKeyConflictHandler handler((LLKeyConflictHandler::ESourceMode)i);
|
||||
|
||||
handler.registerControl(control_name, 0, mouse, key, MASK_NONE, true);
|
||||
|
||||
if (handler.hasUnsavedChanges())
|
||||
{
|
||||
// calls loadBindingsXML()
|
||||
handler.saveToSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// since something might have gone wrong or there might have been nothing to save
|
||||
// (and because otherwise following code will have to be encased in else{}),
|
||||
|
|
|
|||
|
|
@ -644,6 +644,7 @@ void LLKeyConflictHandler::saveToSettings(bool temporary)
|
|||
data = getControl("voice_follow_key", 0);
|
||||
}
|
||||
|
||||
gSavedSettings.setBOOL("PushToTalkToggle", can_toggle);
|
||||
if (data.isEmpty())
|
||||
{
|
||||
// legacy viewer has a bug that might crash it if NONE value is assigned.
|
||||
|
|
|
|||
Loading…
Reference in New Issue