summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp44
1 files changed, 26 insertions, 18 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index af6695b521..071214715b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -66,6 +66,7 @@
#include "llchatentry.h"
#include "indra_constants.h"
#include "llassetstorage.h"
+#include "lldate.h"
#include "llerrorcontrol.h"
#include "llfontgl.h"
#include "llmousehandler.h"
@@ -1425,10 +1426,16 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
- && !gDisconnected)
+ if (!gDisconnected)
{
- gAgent.clearAFK();
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ {
+ gAgent.clearAFK();
+ }
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
}
}
@@ -1545,6 +1552,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
// *NOTE: We want to interpret KEY_RETURN later when it arrives as
// a Unicode char, not as a keydown. Otherwise when client frame
@@ -2997,7 +3008,8 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
if ((focusedFloaterName == "nearby_chat") || (focusedFloaterName == "im_container") || (focusedFloaterName == "impanel"))
{
- if (gSavedSettings.getBOOL("ArrowKeysAlwaysMove"))
+ LLCachedControl<bool> key_move(gSavedSettings, "ArrowKeysAlwaysMove");
+ if (key_move())
{
// let Control-Up and Control-Down through for chat line history,
if (!(key == KEY_UP && mask == MASK_CONTROL)
@@ -3011,10 +3023,9 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
case KEY_RIGHT:
case KEY_UP:
case KEY_DOWN:
- case KEY_PAGE_UP:
- case KEY_PAGE_DOWN:
- case KEY_HOME:
- case KEY_END:
+ case KEY_PAGE_UP: //jump
+ case KEY_PAGE_DOWN: // down
+ case KEY_HOME: // toggle fly
// when chatbar is empty or ArrowKeysAlwaysMove set,
// pass arrow keys on to avatar...
return FALSE;
@@ -4775,22 +4786,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
}
// Look for an unused file name
- BOOL is_snapshot_name_loc_set = isSnapshotLocSet();
+ auto is_snapshot_name_loc_set = isSnapshotLocSet();
std::string filepath;
- S32 i = 1;
- S32 err = 0;
- std::string extension("." + image->getExtension());
+ auto i = 1;
+ auto err = 0;
+ auto extension("." + image->getExtension());
+ auto now = LLDate::now();
do
{
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
-
- if (is_snapshot_name_loc_set)
- {
- filepath += llformat("_%.3d",i);
- }
-
+ filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
+ filepath += llformat("%.2d", i);
filepath += extension;
llstat stat_info;