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.cpp34
1 files changed, 21 insertions, 13 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index af6695b521..31138b939a 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
@@ -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;