diff options
Diffstat (limited to 'indra/newview')
26 files changed, 551 insertions, 238 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4dd4c74ea3..e62e4be0f1 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -9,6 +9,7 @@ include(DBusGlib) include(DirectX) include(ELFIO) include(FMOD) +include(OPENAL) include(FindOpenGL) include(LLAudio) include(LLCharacter) @@ -1257,8 +1258,12 @@ if (WINDOWS) list(APPEND viewer_SOURCE_FILES ${viewer_INSTALLER_FILES}) endif (WINDOWS) +if (OPENAL) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_OPENAL") +endif (OPENAL) + if (FMOD) - set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS -DLL_FMOD) + set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD") if (NOT WINDOWS) set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp) @@ -1278,6 +1283,8 @@ if (FMOD) endif (NOT WINDOWS) endif (FMOD) +set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}") + list(APPEND viewer_SOURCE_FILES ${viewer_HEADER_FILES}) set_source_files_properties(${viewer_HEADER_FILES} diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 62bc827bb1..e6943869db 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2611,9 +2611,9 @@ <string>Rect</string> <key>Value</key> <array> - <integer>50</integer> + <integer>0</integer> <integer>220</integer> - <integer>450</integer> + <integer>700</integer> <integer>0</integer> </array> </map> @@ -2627,9 +2627,9 @@ <string>Rect</string> <key>Value</key> <array> - <integer>50</integer> - <integer>220</integer> - <integer>450</integer> + <integer>0</integer> + <integer>240</integer> + <integer>700</integer> <integer>0</integer> </array> </map> @@ -2819,9 +2819,9 @@ <string>Rect</string> <key>Value</key> <array> - <integer>50</integer> - <integer>450</integer> - <integer>300</integer> + <integer>0</integer> + <integer>646</integer> + <integer>275</integer> <integer>0</integer> </array> </map> @@ -2835,9 +2835,9 @@ <string>Rect</string> <key>Value</key> <array> - <integer>50</integer> + <integer>0</integer> <integer>150</integer> - <integer>650</integer> + <integer>600</integer> <integer>0</integer> </array> </map> @@ -4769,6 +4769,17 @@ <key>Value</key> <integer>410</integer> </map> + <key>MigrateCacheDirectory</key> + <map> + <key>Comment</key> + <string>Check for old version of disk cache to migrate to current location</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>MiniMapRotate</key> <map> <key>Comment</key> diff --git a/indra/newview/app_settings/settings_files.xml b/indra/newview/app_settings/settings_files.xml index 997bb0c33c..ec55745358 100644 --- a/indra/newview/app_settings/settings_files.xml +++ b/indra/newview/app_settings/settings_files.xml @@ -1,22 +1,91 @@ <llsd> <map> - <key>Files</key> + <key>Locations</key> + <map> + <!-- + The Locations LLSD block specifies the usage pattern of + the settings file types listed above. + Each location is represented by a LLSD containing the following values: + PathIndex = hard coded path indicies. + Files = map of files to load, from above 'Files' section. + Each file can have: + Requirement = level of necessity for loading. + 0 ( or Req. no key) = do not load + 1 = required, fail if not found + NameFromSetting = Use the given setting to specify the name. Not valid for + "Default" + --> + <key>Comment</key> + <string>List location from which to load files, and the rules about loading those files.</string> + <key>Persist</key> + <integer>0</integer> + <key>Type</key> + <string>LLSD</string> + <key>Value</key> + <map> + <key>Default</key> <map> - <key>Comment</key> - <string>List of settings files to load. Key is the identifier, value is the filename</string> - <key>Persist</key> - <integer>0</integer> - <key>Type</key> - <string>LLSD</string> - <key>Value</key> - <map> - <key>Global</key> - <string>settings.xml</string> - <key>PerAccount</key> - <string>settings_per_account.xml</string> - <key>CrashSettings</key> - <string>settings_crash_behavior.xml</string> - </map> - </map> + <key>PathIndex</key> + <integer>2</integer> + <key>Files</key> + <map> + <key>Global</key> + <map> + <key>Name</key> + <string>settings.xml</string> + <key>Requirement</key> + <integer>1</integer> + </map> + <key>PerAccount</key> + <map> + <key>Name</key> + <string>settings_per_account.xml</string> + <key>Requirement</key> + <integer>1</integer> + </map> + <key>CrashSettings</key> + <map> + <key>Name</key> + <string>settings_crash_behavior.xml</string> + <key>Requirement</key> + <integer>1</integer> + </map> + </map> + </map> + <key>User</key> + <map> + <key>PathIndex</key> + <integer>1</integer> + <key>Files</key> + <map> + <key>Global</key> + <map> + <key>Name</key> + <string>settings.xml</string> + <key>NameFromSetting</key> + <string>ClientSettingsFile</string> + </map> + <key>CrashSettings</key> + <map> + <key>Name</key> + <string>settings_crash_behavior.xml</string> + </map> + </map> + </map> + <key>Account</key> + <map> + <key>PathIndex</key> + <integer>3</integer> + <key>Files</key> + <map> + <key>PerAccount</key> + <map> + <key>Name</key> + <string>settings_per_account.xml</string> + </map> + </map> + </map> + </map> + </map> </map> </llsd> diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 495012aac2..0a68d6badc 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -371,9 +371,11 @@ Push $2 StrCmp $INSTFLAGS "" RM_ALL RM_CACHE RM_ALL: RMDir /r "$2\Application Data\SecondLife" - GoTo CONTINUE RM_CACHE: - RMDir /r "$2\Application Data\SecondLife\Cache" + # Local Settings directory is the cache, there is no "cache" subdir + RMDir /r "$2\Local Settings\Application Data\SecondLife" + # Vista version of the same + RMDir /r "$2\AppData\Local\SecondLife" Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml" CONTINUE: diff --git a/indra/newview/linux_tools/client-readme-voice.txt b/indra/newview/linux_tools/client-readme-voice.txt index 7754a3a734..23a42f484b 100644 --- a/indra/newview/linux_tools/client-readme-voice.txt +++ b/indra/newview/linux_tools/client-readme-voice.txt @@ -21,15 +21,13 @@ REQUIREMENTS Success with Linux Voice support has been reported on the following systems: -* Ubuntu 7.04 (Feisty) with USB Plantronics headset -* Ubuntu 7.04 (Feisty) with Intel HDA audio chipset * Ubuntu 6.06 (Dapper) with Intel ICH5/CMI9761A+ audio chipset * Ubuntu 6.06 (Dapper) with SigmaTel STAC2997 audio chipset -* Fedora Core 6 with (unknown) audio chipset - -Problems with Linux Voice support have been reported on the following -systems: * Ubuntu 6.06 (Dapper) with Creative EMU10K1 audio chipset +* Ubuntu 7.04 (Feisty) with USB Plantronics headset +* Ubuntu 7.04 (Feisty) with Intel HDA audio chipset +* Fedora Core 6 with (unknown) audio chipset +* Ubuntu 8.04 (Hardy) with (unknown) audio chipset KNOWN PROBLEMS -=-=-=-=-=-=-= diff --git a/indra/newview/linux_tools/client-readme.txt b/indra/newview/linux_tools/client-readme.txt index c4e193bd9b..543a7a1881 100644 --- a/indra/newview/linux_tools/client-readme.txt +++ b/indra/newview/linux_tools/client-readme.txt @@ -15,7 +15,7 @@ Life itself - please see <http://www.secondlife.com/whatis/>. 5.3. Blank window after minimizing it 5.4. Audio 5.5. 'Alt' key for camera controls doesn't work - 5.6. In-world movie playback + 5.6. In-world streaming movie/music playback 6. Advanced Troubleshooting 6.1. Audio 6.2. OpenGL @@ -173,11 +173,11 @@ SOLUTION:- Some window managers eat the Alt key for their own purposes; you example, the 'Windows' key!) which will allow the Alt key to function properly with mouse actions in Second Life and other applications. -PROBLEM 6:- In-world movie playback doesn't work for me. +PROBLEM 6:- In-world movie and/or music playback doesn't work for me. SOLUTION:- You need to have a working installation of GStreamer 0.10; this is usually an optional package for most versions of Linux. If you have - installed GStreamer 0.10 and you can play some movies but not others then - you need to install a wider selection of GStreamer plugins, either + installed GStreamer 0.10 and you can play some music/movies but not others + then you need to install a wider selection of GStreamer plugins, either from your vendor or an appropriate third party. @@ -187,11 +187,11 @@ SOLUTION:- You need to have a working installation of GStreamer 0.10; this The 'secondlife' script which launches Second Life contains some configuration options for advanced troubleshooters. -* AUDIO - Edit the 'secondlife' script and you will see three audio - options: LL_BAD_ESD, LL_BAD_OSS, LL_BAD_ALSA. Second Life tries to - use ESD, OSS, then ALSA audio drivers in this order; you may uncomment - the corresponding LL_BAD_* option to skip an audio driver which you - believe may be causing you trouble. +* AUDIO - Edit the 'secondlife' script and you will see these audio + options: LL_BAD_OPENAL_DRIVER, LL_BAD_FMOD_ESD, LL_BAD_FMOD_OSS, and + LL_BAD_FMOD_ALSA. Second Life tries to use OpenAL, ESD, OSS, then ALSA + audio drivers in this order; you may uncomment the corresponding LL_BAD_* + option to skip an audio driver which you believe may be causing you trouble. * OPENGL - For advanced troubleshooters, the LL_GL_BLACKLIST option lets you disable specific GL extensions, each of which is represented by a diff --git a/indra/newview/linux_tools/wrapper.sh b/indra/newview/linux_tools/wrapper.sh index 9d2e06b31e..d7b17edbc3 100755 --- a/indra/newview/linux_tools/wrapper.sh +++ b/indra/newview/linux_tools/wrapper.sh @@ -4,14 +4,17 @@ ## These options are for self-assisted troubleshooting during this beta ## testing phase; you should not usually need to touch them. -## - Avoids using the ESD audio driver. -#export LL_BAD_ESD=x - -## - Avoids using the OSS audio driver. -#export LL_BAD_OSS=x - -## - Avoids using the ALSA audio driver. -#export LL_BAD_ALSA=x +## - Avoids using any OpenAL audio driver. +#export LL_BAD_OPENAL_DRIVER=x +## - Avoids using any FMOD audio driver. +#export LL_BAD_FMOD_DRIVER=x + +## - Avoids using the FMOD ESD audio driver. +#export LL_BAD_FMOD_ESD=x +## - Avoids using the FMOD OSS audio driver. +#export LL_BAD_FMOD_OSS=x +## - Avoids using the FMOD ALSA audio driver. +#export LL_BAD_FMOD_ALSA=x ## - Avoids the optional OpenGL extensions which have proven most problematic ## on some hardware. Disabling this option may cause BETTER PERFORMANCE but diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 0fa680e753..ab2f06ef53 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -36,6 +36,7 @@ #include "llagent.h" +#include "llcamera.h" #include "llcoordframe.h" #include "indra_constants.h" #include "llmath.h" @@ -270,35 +271,42 @@ void LLAgentFriendObserver::changed(U32 mask) //----------------------------------------------------------------------------- // LLAgent() //----------------------------------------------------------------------------- -LLAgent::LLAgent() -: mDrawDistance( DEFAULT_FAR_PLANE ), +LLAgent::LLAgent() : + mDrawDistance( DEFAULT_FAR_PLANE ), - mDoubleTapRunTimer(), - mDoubleTapRunMode(DOUBLETAP_NONE), - - mbAlwaysRun(false), - mbRunning(false), - - mAccess(SIM_ACCESS_PG), mGroupPowers(0), + mHideGroupTitle(FALSE), mGroupID(), - //mGroupInsigniaID(), - mMapOriginX(0), - mMapOriginY(0), + + mMapOriginX(0.F), + mMapOriginY(0.F), mMapWidth(0), mMapHeight(0), + mLookAt(NULL), mPointAt(NULL), + + mHUDTargetZoom(1.f), + mHUDCurZoom(1.f), mInitialized(FALSE), mNumPendingQueries(0), + mActiveCacheQueries(NULL), mForceMouselook(FALSE), + + mDoubleTapRunTimer(), + mDoubleTapRunMode(DOUBLETAP_NONE), + + mbAlwaysRun(false), + mbRunning(false), + + mAccess(SIM_ACCESS_PG), mTeleportState( TELEPORT_NONE ), mRegionp(NULL), mAgentOriginGlobal(), mPositionGlobal(), - mDistanceTraveled(0), + mDistanceTraveled(0.F), mLastPositionGlobal(LLVector3d::zero), mAvatarObject(NULL), @@ -310,43 +318,68 @@ LLAgent::LLAgent() mLastCameraMode( CAMERA_MODE_THIRD_PERSON ), mViewsPushed(FALSE), + mCustomAnim(FALSE), mShowAvatar(TRUE), - mCameraAnimating( FALSE ), mAnimationCameraStartGlobal(), mAnimationFocusStartGlobal(), mAnimationTimer(), mAnimationDuration(0.33f), + mCameraFOVZoomFactor(0.f), mCameraCurrentFOVZoomFactor(0.f), mCameraFocusOffset(), + mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW), + mCameraOffsetDefault(), -// mCameraOffsetNorm(), mCameraCollidePlane(), + mCurrentCameraDistance(2.f), // meters, set in init() mTargetCameraDistance(2.f), mCameraZoomFraction(1.f), // deprecated mThirdPersonHeadOffset(0.f, 0.f, 1.f), mSitCameraEnabled(FALSE), - mHUDTargetZoom(1.f), - mHUDCurZoom(1.f), + mCameraSmoothingLastPositionGlobal(), + mCameraSmoothingLastPositionAgent(), + mCameraSmoothingStop(FALSE), + + mCameraUpVector(LLVector3::z_axis), // default is straight up + mFocusOnAvatar(TRUE), mFocusGlobal(), mFocusTargetGlobal(), mFocusObject(NULL), + mFocusObjectDist(0.f), mFocusObjectOffset(), mFocusDotRadius( 0.1f ), // meters mTrackFocusObject(TRUE), - mCameraSmoothingLastPositionGlobal(), - mCameraSmoothingLastPositionAgent(), - mCameraSmoothingStop(FALSE), + mUIOffset(0.f), mFrameAgent(), mCrouching(FALSE), mIsBusy(FALSE), - // movement keys below + mAtKey(0), // Either 1, 0, or -1... indicates that movement-key is pressed + mWalkKey(0), // like AtKey, but causes less forward thrust + mLeftKey(0), + mUpKey(0), + mYawKey(0.f), + mPitchKey(0), + + mOrbitLeftKey(0.f), + mOrbitRightKey(0.f), + mOrbitUpKey(0.f), + mOrbitDownKey(0.f), + mOrbitInKey(0.f), + mOrbitOutKey(0.f), + + mPanUpKey(0.f), + mPanDownKey(0.f), + mPanLeftKey(0.f), + mPanRightKey(0.f), + mPanInKey(0.f), + mPanOutKey(0.f), mControlFlags(0x00000000), mbFlagsDirty(FALSE), @@ -361,27 +394,29 @@ LLAgent::LLAgent() mAutoPilotUseRotation(FALSE), mAutoPilotTargetFacing(LLVector3::zero), mAutoPilotTargetDist(0.f), + mAutoPilotNoProgressFrameCount(0), + mAutoPilotRotationThreshold(0.f), mAutoPilotFinishedCallback(NULL), mAutoPilotCallbackData(NULL), - mEffectColor(0.f, 1.f, 1.f, 1.f), + mHaveHomePosition(FALSE), mHomeRegionHandle( 0 ), mNearChatRadius(CHAT_NORMAL_RADIUS / 2.f), - mGodLevel( GOD_NOT ), - + mAdminOverride(FALSE), + mGodLevel( GOD_NOT ), mNextFidgetTime(0.f), mCurrentFidget(0), mFirstLogin(FALSE), mGenderChosen(FALSE), + mAgentWearablesUpdateSerialNum(0), mWearablesLoaded(FALSE), mTextureCacheQueryID(0), mAppearanceSerialNum(0) { - U32 i; for (i = 0; i < TOTAL_CONTROLS; i++) { @@ -389,40 +424,13 @@ LLAgent::LLAgent() mControlsTakenPassedOnCount[i] = 0; } - // Initialize movement keys - mAtKey = 0; // Either 1, 0, or -1... indicates that movement-key is pressed - mWalkKey = 0; // like AtKey, but causes less forward thrust - mLeftKey = 0; - mUpKey = 0; - mYawKey = 0.f; - mPitchKey = 0; - - mOrbitLeftKey = 0.f; - mOrbitRightKey = 0.f; - mOrbitUpKey = 0.f; - mOrbitDownKey = 0.f; - mOrbitInKey = 0.f; - mOrbitOutKey = 0.f; - - mPanUpKey = 0.f; - mPanDownKey = 0.f; - mPanLeftKey = 0.f; - mPanRightKey = 0.f; - mPanInKey = 0.f; - mPanOutKey = 0.f; - mActiveCacheQueries = new S32[BAKED_TEXTURE_COUNT]; for (i = 0; i < (U32)BAKED_TEXTURE_COUNT; i++) { mActiveCacheQueries[i] = 0; } - //Ventrella - mCameraUpVector = LLVector3::z_axis;// default is straight up mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT ); - //end ventrella - - mCustomAnim = FALSE ; } // Requires gSavedSettings to be initialized. @@ -3255,7 +3263,7 @@ void LLAgent::updateCamera() } // smoothing - if (TRUE) + if (TRUE) { LLVector3d agent_pos = getPositionGlobal(); LLVector3d camera_pos_agent = camera_pos_global - agent_pos; diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index f6d983b3a3..e8537f2fba 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -795,10 +795,7 @@ private: LLVector3d mCameraSmoothingLastPositionAgent; BOOL mCameraSmoothingStop; - - //Ventrella LLVector3 mCameraUpVector; // camera's up direction in world coordinates (determines the 'roll' of the view) - //End Ventrella LLPointer<LLViewerObject> mSitCameraReferenceObject; // object to which camera is related when sitting diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0ee3b148d0..5699ac42e2 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -423,7 +423,7 @@ static void settings_modify() LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); LLVOAvatar::sUseImpostors = gSavedSettings.getBOOL("RenderUseImpostors"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); - LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //sqaure lod factor to get exponential range of [1,4] + LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] gDebugGL = gSavedSettings.getBOOL("RenderDebugGL"); gDebugPipeline = gSavedSettings.getBOOL("RenderDebugPipeline"); @@ -1166,16 +1166,26 @@ bool LLAppViewer::cleanup() llinfos << "Global stuff deleted" << llendflush; -#if !LL_RELEASE_FOR_DOWNLOAD if (gAudiop) { - gAudiop->shutdown(); +#if LL_RELEASE_FOR_DOWNLOAD + bool want_longname = false; + if (gAudiop->getDriverName(want_longname) == "FMOD") + { + // This hack exists because fmod likes to occasionally + // hang forever when shutting down, for no apparent + // reason. + llwarns << "Hack, skipping FMOD audio engine cleanup" << llendflush; + } + else +#endif // LL_RELEASE_FOR_DOWNLOAD + { + gAudiop->shutdown(); + } + + delete gAudiop; + gAudiop = NULL; } -#else - // This hack exists because fmod likes to occasionally hang forever - // when shutting down for no apparent reason. - llwarns << "Hack, skipping audio engine cleanup" << llendflush; -#endif // Note: this is where LLFeatureManager::getInstance()-> used to be deleted. @@ -1186,9 +1196,6 @@ bool LLAppViewer::cleanup() cleanupSavedSettings(); llinfos << "Settings patched up" << llendflush; - delete gAudiop; - gAudiop = NULL; - // delete some of the files left around in the cache. removeCacheFiles("*.wav"); removeCacheFiles("*.tmp"); @@ -1476,46 +1483,78 @@ bool LLAppViewer::initLogging() return true; } -bool LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_defaults) +bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, + bool set_defaults) { - for(LLSD::map_iterator itr = mSettingsFileList.beginMap(); itr != mSettingsFileList.endMap(); ++itr) + // Find and vet the location key. + if(!mSettingsLocationList.has(location_key)) { - std::string settings_name = (*itr).first; - std::string settings_file = mSettingsFileList[settings_name].asString(); + llerrs << "Requested unknown location: " << location_key << llendl; + return false; + } + + LLSD location = mSettingsLocationList.get(location_key); - std::string full_settings_path = gDirUtilp->getExpandedFilename(path_index, settings_file); + if(!location.has("PathIndex")) + { + llerrs << "Settings location is missing PathIndex value. Settings cannot be loaded." << llendl; + return false; + } + ELLPath path_index = (ELLPath)(location.get("PathIndex").asInteger()); + 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; + } - if(settings_name == sGlobalSettingsName - && path_index == LL_PATH_USER_SETTINGS) + // Iterate through the locations list of files. + LLSD files = location.get("Files"); + for(LLSD::map_iterator itr = files.beginMap(); itr != files.endMap(); ++itr) + { + std::string settings_group = (*itr).first; + llinfos << "Attempting to load settings for the group " << settings_group + << " - from location " << location_key << llendl; + + if(gSettings.find(settings_group) == gSettings.end()) { - // The non-persistent setting, ClientSettingsFile, specifies a - // custom name to use for the global settings file. - // Only apply this setting if this method is setting the 'Global' - // settings from the user_settings path. - std::string custom_path; - if(gSettings[sGlobalSettingsName]->controlExists("ClientSettingsFile")) - { - custom_path = - gSettings[sGlobalSettingsName]->getString("ClientSettingsFile"); - } - if(!custom_path.empty()) + llwarns << "No matching settings group for name " << settings_group << llendl; + continue; + } + + LLSD file = (*itr).second; + + std::string full_settings_path; + if(file.has("NameFromSetting")) + { + std::string custom_name_setting = file.get("NameFromSetting"); + // *NOTE: Regardless of the group currently being lodaed, + // this setting is always read from the Global settings. + if(gSettings[sGlobalSettingsName]->controlExists(custom_name_setting)) { - full_settings_path = custom_path; + std::string file_name = + gSettings[sGlobalSettingsName]->getString(custom_name_setting); + full_settings_path = file_name; } } - if(gSettings.find(settings_name) == gSettings.end()) + if(full_settings_path.empty()) { - llwarns << "Cannot load " << settings_file << " - No matching settings group for name " << settings_name << llendl; - continue; + std::string file_name = file.get("Name"); + full_settings_path = gDirUtilp->getExpandedFilename(path_index, file_name); } - if(!gSettings[settings_name]->loadFromFile(full_settings_path, set_defaults)) + + int requirement = 0; + if(file.has("Requirement")) { - // If attempting to load the default global settings (app_settings/settings.xml) - // fails, the app should error and quit. - if(path_index == LL_PATH_APP_SETTINGS && settings_name == sGlobalSettingsName) + requirement = file.get("Requirement").asInteger(); + } + + if(!gSettings[settings_group]->loadFromFile(full_settings_path, set_defaults)) + { + if(requirement == 1) { - llwarns << "Error: Cannot load default settings from: " << full_settings_path << llendl; + llwarns << "Error: Cannot load required settings file from: " + << full_settings_path << llendl; return false; } else @@ -1528,14 +1567,24 @@ bool LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_default llinfos << "Loaded settings file " << full_settings_path << llendl; } } + return true; } -std::string LLAppViewer::getSettingsFileName(const std::string& file) +std::string LLAppViewer::getSettingsFilename(const std::string& location_key, + const std::string& file) { - if(mSettingsFileList.has(file)) + if(mSettingsLocationList.has(location_key)) { - return mSettingsFileList[file].asString(); + LLSD location = mSettingsLocationList.get(location_key); + if(location.has("Files")) + { + LLSD files = location.get("Files"); + if(files.has(file) && files[file].has("Name")) + { + return files.get(file).get("Name").asString(); + } + } } return std::string(); } @@ -1556,8 +1605,8 @@ bool LLAppViewer::initConfiguration() llerrs << "Cannot load default configuration file " << settings_file_list << llendl; } - mSettingsFileList = settings_control.getLLSD("Files"); - + mSettingsLocationList = settings_control.getLLSD("Locations"); + // The settings and command line parsing have a fragile // order-of-operation: // - load defaults from app_settings @@ -1570,11 +1619,11 @@ bool LLAppViewer::initConfiguration() // - load defaults bool set_defaults = true; - if(!loadSettingsFromDirectory(LL_PATH_APP_SETTINGS, set_defaults)) + if(!loadSettingsFromDirectory("Default", set_defaults)) { std::ostringstream msg; msg << "Second Life could not load its default settings file. \n" - << "The installation may be corrupted. \n"; + << "The installation may be corrupted. \n"; OSMessageBox( msg.str(), @@ -1586,7 +1635,7 @@ bool LLAppViewer::initConfiguration() // - set procedural settings gSavedSettings.setString("ClientSettingsFile", - gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFileName("Global"))); + gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); gSavedSettings.setString("VersionChannelName", LL_CHANNEL); @@ -1700,7 +1749,7 @@ bool LLAppViewer::initConfiguration() } // - load overrides from user_settings - loadSettingsFromDirectory(LL_PATH_USER_SETTINGS); + loadSettingsFromDirectory("User"); #if LL_DYNAMIC_FONT_DISCOVERY // Linux does *dynamic* font discovery which is preferable to @@ -2622,6 +2671,75 @@ void LLAppViewer::abortQuit() mQuitRequested = false; } +void LLAppViewer::migrateCacheDirectory() +{ +#if LL_WINDOWS || LL_DARWIN + // NOTE: (Nyx) as of 1.21, cache for mac is moving to /library/caches/SecondLife from + // /library/application support/SecondLife/cache This should clear/delete the old dir. + + // As of 1.23 the Windows cache moved from + // C:\Documents and Settings\James\Application Support\SecondLife\cache + // to + // C:\Documents and Settings\James\Local Settings\Application Support\SecondLife + // + // The Windows Vista equivalent is from + // C:\Users\James\AppData\Roaming\SecondLife\cache + // to + // C:\Users\James\AppData\Local\SecondLife + // + // Note the absence of \cache on the second path. James. + + // Only do this once per fresh install of this version. + if (gSavedSettings.getBOOL("MigrateCacheDirectory")) + { + gSavedSettings.setBOOL("MigrateCacheDirectory", FALSE); + + std::string delimiter = gDirUtilp->getDirDelimiter(); + std::string old_cache_dir = gDirUtilp->getOSUserAppDir() + delimiter + "cache"; + std::string new_cache_dir = gDirUtilp->getCacheDir(true); + + if (gDirUtilp->fileExists(old_cache_dir)) + { + llinfos << "Migrating cache from " << old_cache_dir << " to " << new_cache_dir << llendl; + + // Migrate inventory cache to avoid pain to inventory database after mass update + S32 file_count = 0; + std::string file_name; + std::string mask = delimiter + "*.*"; + while (gDirUtilp->getNextFileInDir(old_cache_dir, mask, file_name, false)) + { + if (file_name == "." || file_name == "..") continue; + std::string source_path = old_cache_dir + delimiter + file_name; + std::string dest_path = new_cache_dir + delimiter + file_name; + if (!LLFile::rename(source_path, dest_path)) + { + file_count++; + } + } + llinfos << "Moved " << file_count << " files" << llendl; + + // Nuke the old cache + gDirUtilp->setCacheDir(old_cache_dir); + purgeCache(); + gDirUtilp->setCacheDir(new_cache_dir); + +#if LL_DARWIN + // Clean up Mac files not deleted by removing *.* + std::string ds_store = old_cache_dir + "/.DS_Store"; + if (gDirUtilp->fileExists(ds_store)) + { + LLFile::remove(ds_store); + } +#endif + if (LLFile::rmdir(old_cache_dir) != 0) + { + llwarns << "could not delete old cache directory " << old_cache_dir << llendl; + } + } + } +#endif // LL_WINDOWS || LL_DARWIN +} + bool LLAppViewer::initCache() { mPurgeCache = false; @@ -2643,37 +2761,8 @@ bool LLAppViewer::initCache() } } - // Delete old cache directory -#ifdef LL_DARWIN - if (LL_VERSION_MAJOR >= 1 && LL_VERSION_MINOR >= 21) - { - if (gLastRunVersion != gCurrentVersion) - { - // NOTE: (Nyx) as of 1.21, cache for mac is moving to /library/caches/SecondLife from - // /library/application support/SecondLife/cache This should clear/delete the old dir. - std::string cache_dir = gDirUtilp->getOSUserAppDir(); - std::string new_cache_dir = gDirUtilp->getOSCacheDir(); - cache_dir = cache_dir + "/cache"; - new_cache_dir = new_cache_dir + "/SecondLife"; - if (gDirUtilp->fileExists(cache_dir)) - { - gDirUtilp->setCacheDir(cache_dir); - purgeCache(); - gDirUtilp->setCacheDir(new_cache_dir); - - std::string ds_store = cache_dir + "/.DS_Store"; - if (gDirUtilp->fileExists(ds_store.c_str())) - { - LLFile::remove(ds_store.c_str()); - } - if (LLFile::remove(cache_dir.c_str()) != 0) - { - llwarns << "could not delete old cache directory" << llendl; - } - } - } - } -#endif + // We have moved the location of the cache directory over time. + migrateCacheDirectory(); // Setup and verify the cache location std::string cache_location = gSavedSettings.getString("CacheLocation"); diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index b1262c3e5e..e6856e9744 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -122,10 +122,14 @@ public: static const std::string sPerAccountSettingsName; static const std::string sCrashSettingsName; - // returns false if loading a *required* settings file fails. - bool loadSettingsFromDirectory(ELLPath path_index, bool set_defaults = false); + // Load settings from the location specified by loction_key. + // Key availale and rules for loading, are specified in + // 'app_settings/settings_files.xml' + bool loadSettingsFromDirectory(const std::string& location_key, + bool set_defaults = false); - std::string getSettingsFileName(const std::string& file); + std::string getSettingsFilename(const std::string& location_key, + const std::string& file); // For thread debugging. // llstartup needs to control init. @@ -160,6 +164,10 @@ private: bool initCache(); // Initialize local client cache. void purgeCache(); // Clear the local cache. + // We have switched locations of both Mac and Windows cache, make sure + // files migrate and old cache is cleared out. + void migrateCacheDirectory(); + void cleanupSavedSettings(); // Sets some config data to current or default values during cleanup. void removeCacheFiles(const std::string& filemask); // Deletes cached files the match the given wildcard. @@ -207,7 +215,7 @@ private: bool mQuitRequested; // User wants to quit, may have modified documents open. bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. S32 mYieldTime; - LLSD mSettingsFileList; + LLSD mSettingsLocationList; LLWatchdogTimeout* mMainloopTimeout; diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 9138ad2644..2844b888dc 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -114,6 +114,7 @@ LLChatBar::LLChatBar() LLChatBar::~LLChatBar() { + gGestureManager.removeObserver(mObserver); delete mObserver; mObserver = NULL; // LLView destructor cleans up children diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 9d3a108baa..a686353156 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -41,6 +41,7 @@ #include "llcurl.h" #include "llimagej2c.h" +#include "audioengine.h" #include "llviewertexteditor.h" #include "llviewercontrol.h" @@ -197,6 +198,11 @@ LLFloaterAbout::LLFloaterAbout() support.append( LLImageJ2C::getEngineInfo() ); support.append("\n"); + support.append("Audio Driver Version: "); + bool want_fullname = true; + support.append( gAudiop ? gAudiop->getDriverName(want_fullname) : "(none)" ); + support.append("\n"); + LLMediaManager *mgr = LLMediaManager::getInstance(); if (mgr) { diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 4a996a9c06..41c0792b89 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -876,10 +876,13 @@ void LLFloaterProperties::updateSaleInfo() { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); - // Force an update on the sale price. - U32 flags = new_item->getFlags(); - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE; - new_item->setFlags(flags); + // Force an update on the sale price at rez + if (item->getType() == LLAssetType::AT_OBJECT) + { + U32 flags = new_item->getFlags(); + flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE; + new_item->setFlags(flags); + } new_item->setSaleInfo(sale_info); if(mObjectID.isNull()) diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 9538efdc37..51b0470e07 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1644,9 +1644,7 @@ BOOL LLFloaterIMPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, accepted = true; if(drop) { - LLToolDragAndDrop::giveInventory(mOtherParticipantUUID, inv_item); - LLStringUtil::format_map_t args; - gIMMgr->addSystemMessage(mSessionUUID, "inventory_item_offered", args); + LLToolDragAndDrop::giveInventory(mOtherParticipantUUID, inv_item, mSessionUUID); } } } diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index aebed45081..f7f33cb66b 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -328,7 +328,7 @@ void LLPanelObject::getState( ) // *FIX: shouldn't we just keep the child? if (objectp) { - LLViewerObject* parentp = objectp->getSubParent(); + LLViewerObject* parentp = objectp->getRootEdit(); if (parentp) { diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 3dab6e62c6..fff5c1985b 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -357,17 +357,19 @@ void LLPanelPermissions::refresh() { edit_name_desc = TRUE; } + + childSetEnabled("Name:",true); + LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); + childSetEnabled("Description:",true); + LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); + if(is_one_object) { - childSetEnabled("Name:",true); - LLLineEditor* LineEditorObjectName = getChild<LLLineEditor>("Object Name"); if(keyboard_focus_view != LineEditorObjectName) { childSetText("Object Name",nodep->mName); } - childSetEnabled("Description:",true); - LLLineEditor* LineEditorObjectDesc = getChild<LLLineEditor>("Object Description"); if(LineEditorObjectDesc) { if(keyboard_focus_view != LineEditorObjectDesc) @@ -376,6 +378,11 @@ void LLPanelPermissions::refresh() } } } + else + { + childSetText("Object Name",LLStringUtil::null); + LineEditorObjectDesc->setText(LLStringUtil::null); + } if(edit_name_desc) { diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp index 7681514257..2ec63dbaa7 100644 --- a/indra/newview/llpanelvolume.cpp +++ b/indra/newview/llpanelvolume.cpp @@ -147,7 +147,7 @@ void LLPanelVolume::getState( ) // *FIX: shouldn't we just keep the child? if (objectp) { - LLViewerObject* parentp = objectp->getSubParent(); + LLViewerObject* parentp = objectp->getRootEdit(); if (parentp) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 8206699932..21af491408 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -45,6 +45,10 @@ # include "audioengine_fmod.h" #endif +#ifdef LL_OPENAL +#include "audioengine_openal.h" +#endif + #include "llares.h" #include "llcachename.h" #include "llviewercontrol.h" @@ -581,10 +585,28 @@ bool idle_startup() if (FALSE == gSavedSettings.getBOOL("NoAudio")) { -#ifdef LL_FMOD - gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); -#else gAudiop = NULL; + +#ifdef LL_OPENAL + if (!gAudiop +#if !LL_WINDOWS + && NULL == getenv("LL_BAD_OPENAL_DRIVER") +#endif // !LL_WINDOWS + ) + { + gAudiop = (LLAudioEngine *) new LLAudioEngine_OpenAL(); + } +#endif + +#ifdef LL_FMOD + if (!gAudiop +#if !LL_WINDOWS + && NULL == getenv("LL_BAD_FMOD_DRIVER") +#endif // !LL_WINDOWS + ) + { + gAudiop = (LLAudioEngine *) new LLAudioEngine_FMOD(); + } #endif if (gAudiop) @@ -597,11 +619,16 @@ bool idle_startup() void* window_handle = NULL; #endif bool init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle); - if(!init) + if(init) + { + gAudiop->setMuted(TRUE); + } + else { LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL; + delete gAudiop; + gAudiop = NULL; } - gAudiop->setMuted(TRUE); } } @@ -820,12 +847,12 @@ bool idle_startup() // Set PerAccountSettingsFile to the default value. gSavedSettings.setString("PerAccountSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, - LLAppViewer::instance()->getSettingsFileName("PerAccount") + LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount") ) ); // Overwrite default user settings with user settings - LLAppViewer::instance()->loadSettingsFromDirectory(LL_PATH_PER_SL_ACCOUNT); + LLAppViewer::instance()->loadSettingsFromDirectory("Account"); // Need to set the LastLogoff time here if we don't have one. LastLogoff is used for "Recent Items" calculation // and startup time is close enough if we don't have a real value. diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index fd6d3e77a4..25b58e1409 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -66,6 +66,7 @@ #include "llvolume.h" #include "llworld.h" #include "object_flags.h" +#include "llimview.h" // MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES @@ -1478,12 +1479,18 @@ struct LLGiveInventoryInfo { LLUUID mToAgentID; LLUUID mInventoryObjectID; - LLGiveInventoryInfo(const LLUUID& to_agent, const LLUUID& obj_id) : - mToAgentID(to_agent), mInventoryObjectID(obj_id) {} + LLUUID mIMSessionID; + LLGiveInventoryInfo(const LLUUID& to_agent, const LLUUID& obj_id, const LLUUID &im_session_id = LLUUID::null) : + mToAgentID(to_agent), + mInventoryObjectID(obj_id), + mIMSessionID(im_session_id) + {} }; void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, - LLInventoryItem* item) + LLInventoryItem* item, + const LLUUID& im_session_id) + { llinfos << "LLToolDragAndDrop::giveInventory()" << llendl; if(!isInventoryGiveAcceptable(item)) @@ -1493,17 +1500,18 @@ void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, if(item->getPermissions().allowCopyBy(gAgent.getID())) { // just give it away. - LLToolDragAndDrop::commitGiveInventoryItem(to_agent, item); + LLToolDragAndDrop::commitGiveInventoryItem(to_agent, item, im_session_id); } else { // ask if the agent is sure. LLGiveInventoryInfo* info = new LLGiveInventoryInfo(to_agent, - item->getUUID()); + item->getUUID(), + im_session_id); gViewerWindow->alertXml("CannotCopyWarning", - &LLToolDragAndDrop::handleCopyProtectedItem, - (void*)info); + &LLToolDragAndDrop::handleCopyProtectedItem, + (void*)info); } } @@ -1519,7 +1527,8 @@ void LLToolDragAndDrop::handleCopyProtectedItem(S32 option, void* data) if(item) { LLToolDragAndDrop::commitGiveInventoryItem(info->mToAgentID, - item); + item, + info->mIMSessionID); // delete it for now - it will be deleted on the server // quickly enough. gInventory.deleteObject(info->mInventoryObjectID); @@ -1539,7 +1548,8 @@ void LLToolDragAndDrop::handleCopyProtectedItem(S32 option, void* data) // static void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent, - LLInventoryItem* item) + LLInventoryItem* item, + const LLUUID &im_session_id) { if(!item) return; std::string name; @@ -1578,6 +1588,14 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent, gFloaterTools->dirty(); LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY); + + // If this item was given by drag-and-drop into an IM panel, log this action in the IM panel chat. + if (im_session_id != LLUUID::null) + { + LLStringUtil::format_map_t args; + gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args); + } + } void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index f9e1d75754..627ef86c38 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -211,7 +211,8 @@ protected: // give inventory item functionality static void handleCopyProtectedItem(S32 option, void* data); static void commitGiveInventoryItem(const LLUUID& to_agent, - LLInventoryItem* item); + LLInventoryItem* item, + const LLUUID &im_session_id = LLUUID::null); // give inventory category functionality static void handleCopyProtectedCategory(S32 option, void* data); @@ -251,7 +252,9 @@ public: ESource source, const LLUUID& src_id); - static void giveInventory(const LLUUID& to_agent, LLInventoryItem* item); + static void giveInventory(const LLUUID& to_agent, + LLInventoryItem* item, + const LLUUID &session_id = LLUUID::null); static void giveInventoryCategory(const LLUUID& to_agent, LLInventoryCategory* item); }; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 6bdc7e9656..7771024d17 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -178,8 +178,7 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) switch(mClickAction) { case CLICK_ACTION_TOUCH: - default: - // nothing + // touch behavior down below... break; case CLICK_ACTION_SIT: if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->mIsSitting)) // agent not already sitting @@ -195,18 +194,33 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // pay event goes to object actually clicked on mClickActionObject = object; mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE); + if (LLSelectMgr::getInstance()->selectGetAllValid()) + { + // call this right away, since we have all the info we need to continue the action + selectionPropertiesReceived(); + } return TRUE; } break; case CLICK_ACTION_BUY: mClickActionObject = parent; mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + if (LLSelectMgr::getInstance()->selectGetAllValid()) + { + // call this right away, since we have all the info we need to continue the action + selectionPropertiesReceived(); + } return TRUE; case CLICK_ACTION_OPEN: if (parent && parent->allowOpen()) { mClickActionObject = parent; mLeftClickSelection = LLToolSelect::handleObjectSelection(mPick, FALSE, TRUE, TRUE); + if (LLSelectMgr::getInstance()->selectGetAllValid()) + { + // call this right away, since we have all the info we need to continue the action + selectionPropertiesReceived(); + } } return TRUE; case CLICK_ACTION_PLAY: @@ -216,6 +230,9 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show) // mClickActionObject = object; handle_click_action_open_media(object); return TRUE; + default: + // nothing + break; } } diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 0d250d97f6..021591bd5b 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -238,10 +238,12 @@ void audio_update_wind(bool force_update) // don't use the setter setMaxWindGain() because we don't // want to screw up the fade-in on startup by setting actual source gain // outside the fade-in. - F32 ambient_volume = gSavedSettings.getF32("AudioLevelAmbient"); - gAudiop->mMaxWindGain = gSavedSettings.getBOOL("MuteAmbient") - ? 0.f - : ambient_volume * ambient_volume; + F32 master_volume = gSavedSettings.getBOOL("MuteAudio") ? 0.f : gSavedSettings.getF32("AudioLevelMaster"); + F32 ambient_volume = gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient"); + + F32 wind_volume = master_volume * ambient_volume; + gAudiop->mMaxWindGain = wind_volume; + last_camera_water_height = camera_water_height; gAudiop->updateWind(gRelativeWindVec, camera_water_height); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 645d68a13a..e8ce3e02ea 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5368,7 +5368,15 @@ class LLPromptShowURL : public view_listener_t std::string alert = param.substr(0, offset); std::string url = param.substr(offset+1); std::string* url_copy = new std::string(url); - gViewerWindow->alertXml(alert, callback_show_url, url_copy); + + if(gSavedSettings.getBOOL("UseExternalBrowser")) + { + gViewerWindow->alertXml(alert, callback_show_url, url_copy); + } + else + { + callback_show_url(0, url_copy); + } } else { @@ -5777,8 +5785,7 @@ class LLAttachmentEnableDrop : public view_listener_t { bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - BOOL can_build = gAgent.isGodlike() || (parcel && parcel->getAllowModify()); + BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); //Add an inventory observer to only allow dropping the newly attached item //once it exists in your inventory. Look at Jira 2422. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2aff4281ad..38e376b511 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1722,13 +1722,24 @@ void adjust_rect_top_right(const std::string& control, const LLRect& window) } } +// *TODO: Adjust based on XUI XML +const S32 TOOLBAR_HEIGHT = 64; + +void adjust_rect_bottom_left(const std::string& control, const LLRect& window) +{ + LLRect r = gSavedSettings.getRect(control); + if (r.mLeft == 0 && r.mBottom == 0) + { + r.setOriginAndSize(0, TOOLBAR_HEIGHT, r.getWidth(), r.getHeight()); + gSavedSettings.setRect(control, r); + } +} + void adjust_rect_bottom_center(const std::string& control, const LLRect& window) { LLRect r = gSavedSettings.getRect(control); if (r.mLeft == 0 && r.mBottom == 0) { - // *TODO: Adjust based on XUI XML - const S32 TOOLBAR_HEIGHT = 64; r.setOriginAndSize( window.getWidth()/2 - r.getWidth()/2, TOOLBAR_HEIGHT, @@ -1787,6 +1798,21 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) adjust_rect_top_left("FloaterBuildOptionsRect", window); + adjust_rect_bottom_left("FloaterActiveSpeakersRect", window); + + adjust_rect_bottom_left("FloaterBumpRect", window); + + adjust_rect_bottom_left("FloaterRegionInfo", window); + + adjust_rect_bottom_left("FloaterEnvRect", window); + + adjust_rect_bottom_left("FloaterAdvancedSkyRect", window); + + adjust_rect_bottom_left("FloaterAdvancedWaterRect", window); + + adjust_rect_bottom_left("FloaterDayCycleRect", window); + + // bottom-right r = gSavedSettings.getRect("FloaterInventoryRect"); if (r.mLeft == 0 && r.mBottom == 0) diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index ca601dea54..a7037e0199 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -186,7 +186,7 @@ class WindowsManifest(ViewerManifest): self.path("openjpeg.dll") self.end_prefix() - # Mozilla appears to force a dependency on these files so we need to ship it (CP) + # Mozilla appears to force a dependency on these files so we need to ship it (CP) - updated to vc8 versions (nyx) # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx if self.prefix(src=self.args['configuration'], dst=""): @@ -375,9 +375,17 @@ class WindowsManifest(ViewerManifest): "%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%DELETE_FILES%%":self.nsi_file_commands(False)}) + # We use the Unicode version of NSIS, available from + # http://www.scratchpaper.com/ NSIS_path = 'C:\\Program Files\\NSIS\\Unicode\\makensis.exe' self.run_command('"' + proper_windows_path(NSIS_path) + '" ' + self.dst_path_of(tempfile)) # self.remove(self.dst_path_of(tempfile)) + # If we're on a build machine, sign the code using our Authenticode certificate. JC + sign_py = 'C:\\buildscripts\\code-signing\\sign.py' + if os.path.exists(sign_py): + self.run_command(sign_py + ' ' + self.dst_path_of(installer_file)) + else: + print "Skipping code signing,", sign_py, "does not exist" self.created_path(self.dst_path_of(installer_file)) self.package_file = installer_file @@ -645,9 +653,9 @@ class Linux_i686Manifest(LinuxManifest): self.path("libSDL-1.2.so.0") self.path("libELFIO.so") self.path("libopenjpeg.so.2") - #self.path("libtcmalloc.so.0") - bugged - #self.path("libstacktrace.so.0") - probably bugged self.path("libllkdu.so", "../bin/libllkdu.so") # llkdu goes in bin for some reason + self.path("libalut.so") + self.path("libopenal.so", "libopenal.so.1") self.end_prefix("lib") # Vivox runtimes @@ -655,10 +663,8 @@ class Linux_i686Manifest(LinuxManifest): self.path("SLVoice") self.end_prefix() if self.prefix(src="vivox-runtime/i686-linux", dst="lib"): - self.path("libopenal.so.1") self.path("libortp.so") self.path("libvivoxsdk.so") - self.path("libalut.so") self.end_prefix("lib") class Linux_x86_64Manifest(LinuxManifest): |