From bc3f0e0a81af79820a0c0a6877d266fca46ef917 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 20 Sep 2011 18:47:13 -0700 Subject: EXP-1230 FIX As a resident, I want to not have to choose a UI mode removed all references to basic mode --- indra/newview/llappviewer.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4e1ef59765..43c8750b02 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2324,7 +2324,6 @@ bool LLAppViewer::initConfiguration() if (gSavedSettings.getBOOL("FirstRunThisInstall")) { - gSavedSettings.setString("SessionSettingsFile", "settings_minimal.xml"); gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); } @@ -3520,20 +3519,6 @@ static bool finish_quit(const LLSD& notification, const LLSD& response) } static LLNotificationFunctorRegistration finish_quit_reg("ConfirmQuit", finish_quit); -static bool switch_standard_skin_and_quit(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - if (option == 0) - { - gSavedSettings.setString("SessionSettingsFile", ""); - LLAppViewer::instance()->requestQuit(); - } - return false; -} - -static LLNotificationFunctorRegistration standard_skin_quit_reg("SwitchToStandardSkinAndQuit", switch_standard_skin_and_quit); - void LLAppViewer::userQuit() { if (gDisconnected || gViewerWindow->getProgressView()->getVisible()) -- cgit v1.2.3 From 9d3fc5d930bd1dae07771350080e5140c0113891 Mon Sep 17 00:00:00 2001 From: Paul ProductEngine Date: Thu, 29 Sep 2011 21:43:07 +0300 Subject: EXP-1209 FIXED Sidetray removed. - Removed all sidetray dependencies and the sidetray itself. - Also removed LLFloaterSidetrayTab and LLSidetrayListener as unused. --- indra/newview/llappviewer.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 43c8750b02..7b75bbf430 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,6 @@ #include "llviewermenufile.h" #include "llvoicechannel.h" #include "llvoavatarself.h" -#include "llsidetray.h" #include "llurlmatch.h" #include "lltextutil.h" #include "lllogininstance.h" @@ -3499,8 +3498,6 @@ void LLAppViewer::requestQuit() gFloaterView->closeAllChildren(true); } - LLSideTray::getInstance()->notifyChildren(LLSD().with("request","quit")); - send_stats(); gLogoutTimer.reset(); @@ -4559,10 +4556,6 @@ void LLAppViewer::idleShutdown() return; } - if (LLSideTray::getInstance()->notifyChildren(LLSD().with("request","wait_quit"))) - { - return; - } -- cgit v1.2.3 From e61569d71422931e0d1f8d7e2f6e4db13d8b03ba Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 10 Oct 2011 14:08:14 -0700 Subject: added compound LLSD parsing to param blocks reviewed by Leslie --- indra/newview/llappviewer.cpp | 47 +++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index fa0b392f1b..5077a0a596 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -109,6 +109,7 @@ // Third party library includes #include +#include #if LL_WINDOWS @@ -2041,42 +2042,37 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, llerrs << "Invalid settings location list" << llendl; } - for(LLInitParam::ParamIterator::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end(); - it != end_it; - ++it) + BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) { // skip settings groups that aren't the one we requested - if (it->name() != location_key) continue; + if (group.name() != location_key) continue; - ELLPath path_index = (ELLPath)it->path_index(); + ELLPath path_index = (ELLPath)group.path_index(); if(path_index <= LL_PATH_NONE || path_index >= LL_PATH_LAST) { llerrs << "Out of range path index in app_settings/settings_files.xml" << llendl; return false; } - LLInitParam::ParamIterator::const_iterator file_it, end_file_it; - for (file_it = it->files.begin(), end_file_it = it->files.end(); - file_it != end_file_it; - ++file_it) + BOOST_FOREACH(const SettingsFile& file, group.files) { - llinfos << "Attempting to load settings for the group " << file_it->name() + llinfos << "Attempting to load settings for the group " << file.name() << " - from location " << location_key << llendl; - LLControlGroup* settings_group = LLControlGroup::getInstance(file_it->name); + LLControlGroup* settings_group = LLControlGroup::getInstance(file.name); if(!settings_group) { - llwarns << "No matching settings group for name " << file_it->name() << llendl; + llwarns << "No matching settings group for name " << file.name() << llendl; continue; } std::string full_settings_path; - if (file_it->file_name_setting.isProvided() - && gSavedSettings.controlExists(file_it->file_name_setting)) + if (file.file_name_setting.isProvided() + && gSavedSettings.controlExists(file.file_name_setting)) { // try to find filename stored in file_name_setting control - full_settings_path = gSavedSettings.getString(file_it->file_name_setting); + full_settings_path = gSavedSettings.getString(file.file_name_setting); if (full_settings_path.empty()) { continue; @@ -2090,16 +2086,16 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, else { // by default, use specified file name - full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file_it->file_name()); + full_settings_path = gDirUtilp->getExpandedFilename((ELLPath)path_index, file.file_name()); } - if(settings_group->loadFromFile(full_settings_path, set_defaults, file_it->persistent)) + if(settings_group->loadFromFile(full_settings_path, set_defaults, file.persistent)) { // success! llinfos << "Loaded settings file " << full_settings_path << llendl; } else { // failed to load - if(file_it->required) + if(file.required) { llerrs << "Error: Cannot load required settings file from: " << full_settings_path << llendl; return false; @@ -2122,20 +2118,15 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, std::string LLAppViewer::getSettingsFilename(const std::string& location_key, const std::string& file) { - for(LLInitParam::ParamIterator::const_iterator it = mSettingsLocationList->groups.begin(), end_it = mSettingsLocationList->groups.end(); - it != end_it; - ++it) + BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) { - if (it->name() == location_key) + if (group.name() == location_key) { - LLInitParam::ParamIterator::const_iterator file_it, end_file_it; - for (file_it = it->files.begin(), end_file_it = it->files.end(); - file_it != end_file_it; - ++file_it) + BOOST_FOREACH(const SettingsFile& settings_file, group.files) { - if (file_it->name() == file) + if (settings_file.name() == file) { - return file_it->file_name; + return settings_file.file_name; } } } -- cgit v1.2.3 From f9e900f5ac9002f5ef3b44b02ac300971288e89b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 11 Oct 2011 17:36:23 -0700 Subject: * New floater positioning code. Better than what's checked in but not great. * Floater updates for positioning and to revert some earlier string changes. --- indra/newview/llappviewer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5077a0a596..2a9e411762 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4293,12 +4293,15 @@ void LLAppViewer::idle() return; } - gViewerWindow->updateUI(); + if (!quitRequested()) + { + gViewerWindow->updateUI(); + } /////////////////////////////////////// // Agent and camera movement // - LLCoordGL current_mouse = gViewerWindow->getCurrentMouse(); + LLCoordGL current_mouse = gViewerWindow->getCurrentMouse(); { // After agent and camera moved, figure out if we need to -- cgit v1.2.3 From d0cda13235079c6626ebc7bbe4de542784d50fa0 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 11 Oct 2011 22:49:00 -0700 Subject: EXP-1275 FIX A UI element or Keyboard shortcut to clear the viewport Ctrl+Shift+U now toggles UI and hides floaters refactored main_view.xml made all members of llviewerwindow private --- indra/newview/llappviewer.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5077a0a596..4d02093d2e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1217,7 +1217,7 @@ bool LLAppViewer::mainLoop() if (gViewerWindow) { LLFastTimer t2(FTM_MESSAGES); - gViewerWindow->mWindow->processMiscNativeEvents(); + gViewerWindow->getWindow()->processMiscNativeEvents(); } pingMainloopTimeout("Main:GatherInput"); @@ -1230,7 +1230,7 @@ bool LLAppViewer::mainLoop() llwarns << " Someone took over my signal/exception handler (post messagehandling)!" << llendl; } - gViewerWindow->mWindow->gatherInput(); + gViewerWindow->getWindow()->gatherInput(); } #if 1 && !LL_RELEASE_FOR_DOWNLOAD @@ -1259,9 +1259,9 @@ bool LLAppViewer::mainLoop() // Scan keyboard for movement keys. Command keys and typing // are handled by windows callbacks. Don't do this until we're // done initializing. JC - if ((gHeadlessClient || gViewerWindow->mWindow->getVisible()) + if ((gHeadlessClient || gViewerWindow->getWindow()->getVisible()) && gViewerWindow->getActive() - && !gViewerWindow->mWindow->getMinimized() + && !gViewerWindow->getWindow()->getMinimized() && LLStartUp::getStartupState() == STATE_STARTED && (gHeadlessClient || !gViewerWindow->getShowProgress()) && !gFocusMgr.focusLocked()) @@ -1340,7 +1340,7 @@ bool LLAppViewer::mainLoop() } // yield cooperatively when not running as foreground window - if ( (gViewerWindow && !gViewerWindow->mWindow->getVisible()) + if ( (gViewerWindow && !gViewerWindow->getWindow()->getVisible()) || !gFocusMgr.getAppHasFocus()) { // Sleep if we're not rendering, or the window is minimized. @@ -2920,7 +2920,7 @@ bool LLAppViewer::initWindow() if (gSavedSettings.getBOOL("WindowMaximized")) { - gViewerWindow->mWindow->maximize(); + gViewerWindow->getWindow()->maximize(); } // @@ -2963,7 +2963,7 @@ bool LLAppViewer::initWindow() if (gSavedSettings.getBOOL("WindowMaximized")) { - gViewerWindow->mWindow->maximize(); + gViewerWindow->getWindow()->maximize(); } LLUI::sWindow = gViewerWindow->getWindow(); @@ -2975,7 +2975,7 @@ bool LLAppViewer::initWindow() gViewerWindow->initBase(); // show viewer window - //gViewerWindow->mWindow->show(); + //gViewerWindow->getWindow()->show(); LL_INFOS("AppInit") << "Window initialization done." << LL_ENDL; return true; @@ -3009,12 +3009,12 @@ void LLAppViewer::cleanupSavedSettings() // as we don't track it in callbacks if(NULL != gViewerWindow) { - BOOL maximized = gViewerWindow->mWindow->getMaximized(); + BOOL maximized = gViewerWindow->getWindow()->getMaximized(); if (!maximized) { LLCoordScreen window_pos; - if (gViewerWindow->mWindow->getPosition(&window_pos)) + if (gViewerWindow->getWindow()->getPosition(&window_pos)) { gSavedSettings.setS32("WindowX", window_pos.mX); gSavedSettings.setS32("WindowY", window_pos.mY); -- cgit v1.2.3 From 4331c112aba074562e9a8826fe6d271a94f790f0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 14 Oct 2011 11:52:40 -0500 Subject: Backed out changeset b782a75c99e6 --- indra/newview/llappviewer.cpp | 47 ++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1f76e2af40..a23f809b71 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1026,7 +1026,7 @@ bool LLAppViewer::mainLoop() //------------------------------------------- // Create IO Pump to use for HTTP Requests. - gServicePump = new LLPumpIO; + gServicePump = new LLPumpIO(gAPRPoolp); LLHTTPClient::setPump(*gServicePump); LLCurl::setCAFile(gDirUtilp->getCAFile()); @@ -1387,16 +1387,16 @@ bool LLAppViewer::cleanup() } // *TODO - generalize this and move DSO wrangling to a helper class -brad - for(std::map >::iterator plugin = mPlugins.begin(); - plugin != mPlugins.end(); ++plugin) + std::set::const_iterator i; + for(i = mPlugins.begin(); i != mPlugins.end(); ++i) { int (*ll_plugin_stop_func)(void) = NULL; - apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, plugin->first, "ll_plugin_stop"); + apr_status_t rv = apr_dso_sym((apr_dso_handle_sym_t*)&ll_plugin_stop_func, *i, "ll_plugin_stop"); ll_plugin_stop_func(); - rv = apr_dso_unload(plugin->first); + rv = apr_dso_unload(*i); } - mPlugins.clear(); // Forget handles and destroy all memory pools. + mPlugins.clear(); //flag all elements as needing to be destroyed immediately // to ensure shutdown order @@ -1828,7 +1828,7 @@ bool LLAppViewer::initThreads() if (LLFastTimer::sLog || LLFastTimer::sMetricLog) { - LLFastTimer::sLogLock = new LLMutex; + LLFastTimer::sLogLock = new LLMutex(NULL); mFastTimerLogThread = new LLFastTimerLogThread(LLFastTimer::sLogName); mFastTimerLogThread->start(); } @@ -2969,7 +2969,8 @@ void LLAppViewer::handleViewerCrash() else crash_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,ERROR_MARKER_FILE_NAME); llinfos << "Creating crash marker file " << crash_file_name << llendl; - LLAPRFile crash_file(crash_file_name, LL_APR_W); + LLAPRFile crash_file ; + crash_file.open(crash_file_name, LL_APR_W); if (crash_file.getFileHandle()) { LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL; @@ -3033,10 +3034,11 @@ bool LLAppViewer::anotherInstanceRunning() LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL; //Freeze case checks - if (LLAPRFile::isExist(marker_file, LL_APR_RB)) + if (LLAPRFile::isExist(marker_file, NULL, LL_APR_RB)) { // File exists, try opening with write permissions - LLAPRFile outfile(marker_file, LL_APR_WB); + LLAPRFile outfile ; + outfile.open(marker_file, LL_APR_WB); apr_file_t* fMarker = outfile.getFileHandle() ; if (!fMarker) { @@ -3075,25 +3077,25 @@ void LLAppViewer::initMarkerFile() std::string llerror_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LLERROR_MARKER_FILE_NAME); std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); - if (LLAPRFile::isExist(mMarkerFileName, LL_APR_RB) && !anotherInstanceRunning()) + if (LLAPRFile::isExist(mMarkerFileName, NULL, LL_APR_RB) && !anotherInstanceRunning()) { gLastExecEvent = LAST_EXEC_FROZE; LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL; } - if(LLAPRFile::isExist(logout_marker_file, LL_APR_RB)) + if(LLAPRFile::isExist(logout_marker_file, NULL, LL_APR_RB)) { gLastExecEvent = LAST_EXEC_LOGOUT_FROZE; LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; LLAPRFile::remove(logout_marker_file); } - if(LLAPRFile::isExist(llerror_marker_file, LL_APR_RB)) + if(LLAPRFile::isExist(llerror_marker_file, NULL, LL_APR_RB)) { if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; else gLastExecEvent = LAST_EXEC_LLERROR_CRASH; LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << gLastExecEvent << LL_ENDL; LLAPRFile::remove(llerror_marker_file); } - if(LLAPRFile::isExist(error_marker_file, LL_APR_RB)) + if(LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) { if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH; else gLastExecEvent = LAST_EXEC_OTHER_CRASH; @@ -3109,7 +3111,7 @@ void LLAppViewer::initMarkerFile() // Create the marker file for this execution & lock it apr_status_t s; - s = mMarkerFile.open(mMarkerFileName, LL_APR_W, LLAPRFile::long_lived); + s = mMarkerFile.open(mMarkerFileName, LL_APR_W, TRUE); if (s == APR_SUCCESS && mMarkerFile.getFileHandle()) { @@ -4325,7 +4327,8 @@ void LLAppViewer::sendLogoutRequest() gLogoutInProgress = TRUE; mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); - LLAPRFile outfile(mLogoutMarkerFileName, LL_APR_W); + LLAPRFile outfile ; + outfile.open(mLogoutMarkerFileName, LL_APR_W); mLogoutMarkerFile = outfile.getFileHandle() ; if (mLogoutMarkerFile) { @@ -4775,15 +4778,14 @@ void LLAppViewer::loadEventHostModule(S32 listen_port) } #endif // LL_WINDOWS - boost::shared_ptr eventhost_dso_memory_pool_ptr(new LLAPRPool); - LLAPRPool& eventhost_dso_memory_pool(*eventhost_dso_memory_pool_ptr); - apr_dso_handle_t* eventhost_dso_handle = NULL; + apr_dso_handle_t * eventhost_dso_handle = NULL; + apr_pool_t * eventhost_dso_memory_pool = NULL; //attempt to load the shared library - eventhost_dso_memory_pool.create(); + apr_pool_create(&eventhost_dso_memory_pool, NULL); apr_status_t rv = apr_dso_load(&eventhost_dso_handle, dso_path.c_str(), - eventhost_dso_memory_pool()); + eventhost_dso_memory_pool); llassert_always(! ll_apr_warn_status(rv, eventhost_dso_handle)); llassert_always(eventhost_dso_handle != NULL); @@ -4803,8 +4805,7 @@ void LLAppViewer::loadEventHostModule(S32 listen_port) llerrs << "problem loading eventhost plugin, status: " << status << llendl; } - // Store the handle and link it to the pool that was used to allocate it. - mPlugins[eventhost_dso_handle] = eventhost_dso_memory_pool_ptr; + mPlugins.insert(eventhost_dso_handle); } void LLAppViewer::launchUpdater() -- cgit v1.2.3 From b1fa752282408abb3f8f665453d256c2f6f21e15 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 14 Oct 2011 12:13:49 -0700 Subject: EXP-1368 FIX -- Crash on Exit in FUI viewer --- indra/newview/llappviewer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5d2b900510..20fa26915b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4293,10 +4293,7 @@ void LLAppViewer::idle() return; } - if (!quitRequested()) - { - gViewerWindow->updateUI(); - } + gViewerWindow->updateUI(); /////////////////////////////////////// // Agent and camera movement -- cgit v1.2.3