From 66502df0502f1c2aa6aa9fda0a2a61921535a645 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 20 Apr 2018 20:21:20 +0300 Subject: MAINT-8540 Eliminated a lot of xui related log warnings on startup and opening preferences --- indra/newview/llviewerwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e90b4ac86c..a6a083ec6b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1946,6 +1946,10 @@ void LLViewerWindow::initBase() // Create global views + // Login screen and main_view.xml need edit menus for preferences and browser + LL_DEBUGS("AppInit") << "initializing edit menu" << LL_ENDL; + initialize_edit_menu(); + // Create the floater view at the start so that other views can add children to it. // (But wait to add it as a child of the root view so that it will be in front of the // other views.) -- cgit v1.2.3 From 869c8728bc22f614e53fbcc70b0e55c71d93a0b6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 24 Apr 2018 17:16:15 +0300 Subject: MAINT-8427 Make snapshot path consistant over sessions --- indra/newview/llviewerwindow.cpp | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index a6a083ec6b..2d92f394dd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -261,10 +261,8 @@ static const F32 MIN_UI_SCALE = 0.75f; static const F32 MAX_UI_SCALE = 7.0f; static const F32 MIN_DISPLAY_SCALE = 0.75f; -std::string LLViewerWindow::sSnapshotBaseName; -std::string LLViewerWindow::sSnapshotDir; - -std::string LLViewerWindow::sMovieBaseName; +static LLCachedControl sSnapshotBaseName(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); +static LLCachedControl sSnapshotDir(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseDir", "")); LLTrace::SampleStatHandle<> LLViewerWindow::sMouseVelocityStat("Mouse Velocity"); @@ -1694,11 +1692,6 @@ LLViewerWindow::LLViewerWindow(const Params& p) LL_INFOS() << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << LL_ENDL; } - // Default to application directory. - LLViewerWindow::sSnapshotBaseName = "Snapshot"; - LLViewerWindow::sMovieBaseName = "SLmovie"; - resetSnapshotLoc(); - /* LLWindowCallbacks* callbacks, @@ -1877,6 +1870,11 @@ void LLViewerWindow::showSystemUIScaleFactorChanged() LLNotificationsUtil::add("SystemUIScaleFactorChanged", LLSD(), LLSD(), onSystemUIScaleFactorChanged); } +std::string LLViewerWindow::getLastSnapshotDir() +{ + return sSnapshotDir; +} + //static bool LLViewerWindow::onSystemUIScaleFactorChanged(const LLSD& notification, const LLSD& response) { @@ -4401,11 +4399,12 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke // Copy the directory + file name std::string filepath = picker.getFirstFile(); - LLViewerWindow::sSnapshotBaseName = gDirUtilp->getBaseFileName(filepath, true); - LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath); + gSavedPerAccountSettings.setString("SnapshotBaseName", gDirUtilp->getBaseFileName(filepath, true)); + gSavedPerAccountSettings.setString("SnapshotBaseDir", gDirUtilp->getDirName(filepath)); } - if(LLViewerWindow::sSnapshotDir.empty()) + std::string snapshot_dir = sSnapshotDir; + if(snapshot_dir.empty()) { return FALSE; } @@ -4452,7 +4451,7 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke void LLViewerWindow::resetSnapshotLoc() { - sSnapshotDir.clear(); + gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string()); } // static @@ -4506,6 +4505,17 @@ void LLViewerWindow::playSnapshotAnimAndSound() send_sound_trigger(LLUUID(gSavedSettings.getString("UISndSnapshot")), 1.0f); } +BOOL LLViewerWindow::isSnapshotLocSet() const +{ + std::string snapshot_dir = sSnapshotDir; + return !snapshot_dir.empty(); +} + +void LLViewerWindow::resetSnapshotLoc() const +{ + gSavedPerAccountSettings.setString("SnapshotBaseDir", std::string()); +} + BOOL LLViewerWindow::thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type) { return rawSnapshot(raw, preview_width, preview_height, FALSE, FALSE, show_ui, do_rebuild, type); -- cgit v1.2.3 From bc1642d286dddba7cd3b6c051eb35a5a579ba48c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 26 Apr 2018 17:00:45 +0300 Subject: MAINT-8427 Cache to path convertion fix --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2d92f394dd..7e90a35f88 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4411,9 +4411,9 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, BOOL force_picke // Check if there is enough free space to save snapshot #ifdef LL_WINDOWS - boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir)); + boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(snapshot_dir)); #else - boost::filesystem::space_info b_space = boost::filesystem::space(sSnapshotDir); + boost::filesystem::space_info b_space = boost::filesystem::space(snapshot_dir); #endif if (b_space.free < image->getDataSize()) { -- cgit v1.2.3 From 43335283bd2aaa9934f152cf95840f722a9d841e Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 3 May 2018 17:55:17 +0300 Subject: MAINT-1421 FIXED "Show Memory" doesn't display memory stats on mac --- indra/newview/llviewerwindow.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7e90a35f88..d54138b80e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -391,14 +391,12 @@ public: } } -#if LL_WINDOWS if (gSavedSettings.getBOOL("DebugShowMemory")) { addText(xpos, ypos, STRINGIZE("Memory: " << (LLMemory::getCurrentRSS() / 1024) << " (KB)")); ypos += y_inc; } -#endif if (gDisplayCameraPos) { -- cgit v1.2.3 From 18bb3f6b86b32c4ca22f0466ee175d68969a03fd Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 1 Jun 2018 13:51:03 +0000 Subject: MAINT-8712 Crash on close in LLWindowWin32 --- indra/newview/llviewerwindow.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d54138b80e..f394d6913f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2156,6 +2156,15 @@ void LLViewerWindow::shutdownViews() RecordToChatConsole::getInstance()->stopRecorder(); LL_INFOS() << "Warning logger is cleaned." << LL_ENDL ; + gFocusMgr.unlockFocus(); + gFocusMgr.setMouseCapture(NULL); + gFocusMgr.setKeyboardFocus(NULL); + gFocusMgr.setTopCtrl(NULL); + if (mWindow) + { + mWindow->allowLanguageTextInput(NULL, FALSE); + } + delete mDebugText; mDebugText = NULL; @@ -2188,7 +2197,11 @@ void LLViewerWindow::shutdownViews() view_listener_t::cleanup(); LL_INFOS() << "view listeners destroyed." << LL_ENDL ; - + + // Clean up pointers that are going to be invalid. (todo: check sMenuContainer) + mProgressView = NULL; + mPopupView = NULL; + // Delete all child views. delete mRootView; mRootView = NULL; -- cgit v1.2.3