Merge branch 'DRTVWR-545-maint-mix' of https://bitbucket.org/lindenlab/viewer

master
Ansariel 2021-09-20 13:16:41 +02:00
commit 7cdd463954
8 changed files with 58 additions and 42 deletions

View File

@ -16,6 +16,29 @@
# * The special style in which python is invoked is intentional to permit
# use of a native python install on windows - which requires paths in DOS form
retry_cmd()
{
max_attempts="$1"; shift
initial_wait="$1"; shift
attempt_num=1
echo "trying" "$@"
until "$@"
do
if ((attempt_num==max_attempts))
then
echo "Last attempt $attempt_num failed"
return 1
else
wait_time=$(($attempt_num*$initial_wait))
echo "Attempt $attempt_num failed. Trying again in $wait_time seconds..."
sleep $wait_time
attempt_num=$(($attempt_num+1))
fi
done
echo "succeeded"
return 0
}
build_dir_Darwin()
{
echo build-darwin-x86_64
@ -460,7 +483,7 @@ then
succeeded=$build_coverity
else
# Upload base package.
python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput Installer "$package" \
|| fatal "Upload of installer failed"
wait_for_codeticket
@ -470,7 +493,7 @@ then
package=$(installer_$arch "$package_id")
if [ x"$package" != x ]
then
python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Installer $package_id" "$package" \
|| fatal "Upload of installer $package_id failed"
wait_for_codeticket
else
@ -484,7 +507,7 @@ then
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
then
# Upload crash reporter file
python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Symbolfile" "$VIEWER_SYMBOL_FILE" \
|| fatal "Upload of symbolfile failed"
wait_for_codeticket
fi
@ -494,10 +517,7 @@ then
if [ -r "$build_dir/llphysicsextensions_package" ]
then
llphysicsextensions_package=$(cat $build_dir/llphysicsextensions_package)
# This next upload is a frequent failure; see if giving the last one some time helps
# JJ is making changes to Codeticket that we hope will eliminate this failure soon
sleep 300
python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \
retry_cmd 4 30 python_cmd "$helpers/codeticket.py" addoutput "Physics Extensions Package" "$llphysicsextensions_package" --private \
|| fatal "Upload of physics extensions package failed"
fi
fi

View File

@ -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="toggle_voice"/>
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
</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="toggle_voice"/>
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
</third_person>
<sitting>
<binding key="A" mask="ALT" command="spin_around_cw"/>
@ -222,7 +222,7 @@
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
</sitting>
<edit_avatar>
<!--Avatar editing camera controls-->
@ -249,6 +249,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="toggle_voice"/>
<binding key="" mask="NONE" mouse="MMB" command="voice_follow_key"/>
</edit_avatar>
</keys>

View File

@ -11112,7 +11112,7 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>PushToTalkToggle</key>
<map>
<key>Comment</key>
<string>Should the push-to-talk button behave as a toggle</string>
<string>Should the push-to-talk toolbar button behave as a toggle</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>

View File

@ -4744,10 +4744,10 @@ void LLAppViewer::removeMarkerFiles()
void LLAppViewer::removeDumpDir()
{
if (gDirUtilp->dumpDirExists())
//Call this routine only on clean exit. Crash reporter will clean up
//its locking table for us.
if (gDirUtilp->dumpDirExists()) // Check if dump dir was created this run
{
//Call this routine only on clean exit. Crash reporter will clean up
//its locking table for us.
std::string dump_dir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
gDirUtilp->deleteDirAndContents(dump_dir);
}
@ -5233,11 +5233,6 @@ 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()
@ -5249,25 +5244,6 @@ 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{}),

View File

@ -144,8 +144,6 @@ namespace
// second instance does not have own log files
if (!LLAppViewer::instance()->isSecondInstance())
{
// send the main viewer log file
// widen to wstring, convert to __wchar_t, then pass c_str()
// <FS:ND> We don't send log files
// sBugSplatSender->sendAdditionalFile(
// WCSTR(LLError::logFileName()));

View File

@ -644,7 +644,6 @@ 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.

View File

@ -76,6 +76,8 @@ public:
static void onDefault(void* user_data);
static void onClickTimeout(void* user_data, MASK mask);
static bool isRecording() { return sRecordKeys; }
class Updater;
private:

View File

@ -42,6 +42,7 @@
#include "llkeybind.h" // LLKeyData
#include "llmorphview.h"
#include "llmoveview.h"
#include "llsetkeybinddialog.h"
#include "lltoolfocus.h"
#include "lltoolpie.h"
#include "llviewercontrol.h"
@ -1143,18 +1144,38 @@ BOOL LLViewerInput::handleKeyUp(KEY translated_key, MASK translated_mask)
bool LLViewerInput::handleGlobalBindsKeyDown(KEY key, MASK mask)
{
if (LLSetKeyBindDialog::isRecording())
{
// handleGlobalBindsKeyDown happens before view handling, so can't
// be interupted by LLSetKeyBindDialog, check manually
return false;
}
S32 mode = getMode();
return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, TRUE, FALSE, FALSE, FALSE);
}
bool LLViewerInput::handleGlobalBindsKeyUp(KEY key, MASK mask)
{
if (LLSetKeyBindDialog::isRecording())
{
// handleGlobalBindsKeyUp happens before view handling, so can't
// be interupted by LLSetKeyBindDialog, check manually
return false;
}
S32 mode = getMode();
return scanKey(mGlobalKeyBindings[mode], mGlobalKeyBindings[mode].size(), key, mask, FALSE, TRUE, FALSE, FALSE);
}
bool LLViewerInput::handleGlobalBindsMouse(EMouseClickType clicktype, MASK mask, bool down)
{
if (LLSetKeyBindDialog::isRecording())
{
// handleGlobalBindsMouse happens before view handling, so can't
// be interupted by LLSetKeyBindDialog, check manually
return false;
}
bool res = false;
S32 mode = getMode();
if (down)