diff options
Diffstat (limited to 'indra/newview')
545 files changed, 19227 insertions, 13610 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 0a2ae1ed52..efb16d1e42 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -66,6 +66,7 @@ include_directories( set(viewer_SOURCE_FILES llagent.cpp llagentaccess.cpp + llagentcamera.cpp llagentdata.cpp llagentlanguage.cpp llagentlistener.cpp @@ -73,6 +74,7 @@ set(viewer_SOURCE_FILES llagentpilot.cpp llagentui.cpp llagentwearables.cpp + llagentwearablesfetch.cpp llanimstatelabels.cpp llappearancemgr.cpp llappviewer.cpp @@ -143,7 +145,6 @@ set(viewer_SOURCE_FILES llfirstuse.cpp llflexibleobject.cpp llfloaterabout.cpp - llfloateractivespeakers.cpp llfloateranimpreview.cpp llfloaterauction.cpp llfloateravatarpicker.cpp @@ -252,6 +253,7 @@ set(viewer_SOURCE_FILES llinventoryfilter.cpp llinventoryfunctions.cpp llinventorymodel.cpp + llinventorymodelbackgroundfetch.cpp llinventoryobserver.cpp llinventorypanel.cpp lljoystickbutton.cpp @@ -301,6 +303,7 @@ set(viewer_SOURCE_FILES llpanelcontents.cpp llpaneleditwearable.cpp llpanelface.cpp + llpanelgenerictip.cpp llpanelgroup.cpp llpanelgroupgeneral.cpp llpanelgroupinvite.cpp @@ -316,7 +319,6 @@ set(viewer_SOURCE_FILES llpanellandmedia.cpp llpanellogin.cpp llpanelloginlistener.cpp - llpanellookinfo.cpp llpanelmaininventory.cpp llpanelmediasettingsgeneral.cpp llpanelmediasettingspermissions.cpp @@ -325,6 +327,7 @@ set(viewer_SOURCE_FILES llpanelnearbymedia.cpp llpanelobject.cpp llpanelobjectinventory.cpp + llpaneloutfitedit.cpp llpaneloutfitsinventory.cpp llpanelpeople.cpp llpanelpeoplemenus.cpp @@ -340,6 +343,7 @@ set(viewer_SOURCE_FILES llpanelprofile.cpp llpanelprofileview.cpp llpanelteleporthistory.cpp + llpaneltiptoast.cpp llpanelvolume.cpp llpanelvolumepulldown.cpp llparcelselection.cpp @@ -564,6 +568,7 @@ set(viewer_HEADER_FILES ViewerInstall.cmake llagent.h llagentaccess.h + llagentcamera.h llagentdata.h llagentlanguage.h llagentlistener.h @@ -571,6 +576,7 @@ set(viewer_HEADER_FILES llagentpilot.h llagentui.h llagentwearables.h + llagentwearablesfetch.h llanimstatelabels.h llappearance.h llappearancemgr.h @@ -644,7 +650,6 @@ set(viewer_HEADER_FILES llfirstuse.h llflexibleobject.h llfloaterabout.h - llfloateractivespeakers.h llfloateranimpreview.h llfloaterauction.h llfloateravatarpicker.h @@ -752,6 +757,7 @@ set(viewer_HEADER_FILES llinventoryfilter.h llinventoryfunctions.h llinventorymodel.h + llinventorymodelbackgroundfetch.h llinventoryobserver.h llinventorypanel.h lljoystickbutton.h @@ -797,6 +803,7 @@ set(viewer_HEADER_FILES llpanelcontents.h llpaneleditwearable.h llpanelface.h + llpanelgenerictip.h llpanelgroup.h llpanelgroupgeneral.h llpanelgroupinvite.h @@ -812,7 +819,6 @@ set(viewer_HEADER_FILES llpanellandmedia.h llpanellogin.h llpanelloginlistener.h - llpanellookinfo.h llpanelmaininventory.h llpanelmediasettingsgeneral.h llpanelmediasettingspermissions.h @@ -821,6 +827,7 @@ set(viewer_HEADER_FILES llpanelnearbymedia.h llpanelobject.h llpanelobjectinventory.h + llpaneloutfitedit.h llpaneloutfitsinventory.h llpanelpeople.h llpanelpeoplemenus.h @@ -836,6 +843,7 @@ set(viewer_HEADER_FILES llpanelprofile.h llpanelprofileview.h llpanelteleporthistory.h + llpaneltiptoast.h llpanelvolume.h llpanelvolumepulldown.h llparcelselection.h diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings index 879408d6e4..02c3dfc6e0 100644 --- a/indra/newview/English.lproj/InfoPlist.strings +++ b/indra/newview/English.lproj/InfoPlist.strings @@ -2,6 +2,6 @@ CFBundleName = "Second Life"; -CFBundleShortVersionString = "Second Life version 2.0.0.200030"; -CFBundleGetInfoString = "Second Life version 2.0.0.200030, Copyright 2004-2009 Linden Research, Inc."; +CFBundleShortVersionString = "Second Life version 2.0.0.203110"; +CFBundleGetInfoString = "Second Life version 2.0.0.203110, Copyright 2004-2009 Linden Research, Inc."; diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist index 38ebb22b84..4cb01a0f33 100644 --- a/indra/newview/Info-SecondLife.plist +++ b/indra/newview/Info-SecondLife.plist @@ -32,7 +32,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>2.0.0.200030</string> + <string>2.0.0.203110</string> <key>CSResourcesFileMapped</key> <true/> </dict> diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2a90cdb87c..4ca23e14a1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4,8 +4,8 @@ <key>AFKTimeout</key> <map> <key>Comment</key> - <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never). - Valid values are: 0, 120, 300, 600, 1800</string> + <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never). + Valid values are: 0, 120, 300, 600, 1800</string> <key>Persist</key> <integer>1</integer> <key>Type</key> @@ -2565,6 +2565,17 @@ <key>Value</key> <real>0.10000000149</real> </map> + <key>DragAndDropDistanceThreshold</key> + <map> + <key>Comment</key> + <string>Number of pixels that mouse should move before triggering drag and drop mode</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>3</integer> + </map> <key>DropShadowButton</key> <map> <key>Comment</key> @@ -5385,6 +5396,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>ParticipantListShowIcons</key> + <map> + <key>Comment</key> + <string>Show/hide people icons in participant list</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>PerAccountSettingsFile</key> <map> <key>Comment</key> @@ -8118,13 +8140,13 @@ <key>NearbyPeopleSortOrder</key> <map> <key>Comment</key> - <string>Specifies sort order for nearby people (0 = by name, 2 = by most recent)</string> + <string>Specifies sort order for nearby people (0 = by name, 3 = by distance, 4 = by most recent)</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>U32</string> <key>Value</key> - <integer>2</integer> + <integer>4</integer> </map> <key>RecentPeopleSortOrder</key> <map> @@ -8525,17 +8547,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowVoiceChannelPopup</key> - <map> - <key>Comment</key> - <string>Controls visibility of the current voice channel popup above the voice tab</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>ShowVoiceVisualizersInCalls</key> <map> <key>Comment</key> @@ -8547,17 +8558,6 @@ <key>Value</key> <integer>0</integer> </map> - <key>ShowVolumeSettingsPopup</key> - <map> - <key>Comment</key> - <string>Show individual volume slider for voice, sound effects, etc</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>0</integer> - </map> <key>SkinCurrent</key> <map> <key>Comment</key> @@ -8654,17 +8654,6 @@ <key>Value</key> <integer>1</integer> </map> - <key>SmallAvatarNames</key> - <map> - <key>Comment</key> - <string>Display avatar name text in smaller font</string> - <key>Persist</key> - <integer>1</integer> - <key>Type</key> - <string>Boolean</string> - <key>Value</key> - <integer>1</integer> - </map> <key>SnapEnabled</key> <map> <key>Comment</key> @@ -10647,6 +10636,28 @@ <key>Value</key> <real>50.0</real> </map> + <key>WellIconFlashCount</key> + <map> + <key>Comment</key> + <string>Number of flashes of IM Well and Notification Well icons after which flashing buttons stay lit up. Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>3</integer> + </map> + <key>WellIconFlashPeriod</key> + <map> + <key>Comment</key> + <string>Period at which IM Well and Notification Well icons flash (seconds). Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.25</real> + </map> <key>WindLightUseAtmosShaders</key> <map> <key>Comment</key> @@ -10933,5 +10944,55 @@ <key>Value</key> <integer>1</integer> </map> + + <!-- Settings below are for back compatibility only. + They are not used in current viewer anymore. But they can't be removed to avoid + influence on previous versions of the viewer in case of settings are not used or default value + should be changed. See also EXT-6661. --> + <!-- 1.23 settings --> + <key>ShowVoiceChannelPopup</key> + <map> + <key>Comment</key> + <string>Controls visibility of the current voice channel popup above the voice tab</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>ShowVolumeSettingsPopup</key> + <map> + <key>Comment</key> + <string>Show individual volume slider for voice, sound effects, etc</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> + <key>max_texture_dimension_X</key> + <map> + <key>Comment</key> + <string>Maximum texture width for user uploaded textures</string> + <key>Persist</key> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2048</integer> + </map> + <key>max_texture_dimension_Y</key> + <map> + <key>Comment</key> + <string>Maximum texture height for user uploaded textures</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>2048</integer> + </map> + <!-- End of back compatibility settings --> </map> </llsd> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 5c54146caa..8bcf680876 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -35,6 +35,7 @@ #include "pipeline.h" +#include "llagentcamera.h" #include "llagentlistener.h" #include "llagentwearables.h" #include "llagentui.h" @@ -43,7 +44,6 @@ #include "llcallingcard.h" #include "llchannelmanager.h" #include "llconsole.h" -//#include "llfirstuse.h" #include "llfloatercamera.h" #include "llfloatercustomize.h" #include "llfloaterreg.h" @@ -59,6 +59,7 @@ #include "llnearbychatbar.h" #include "llnotificationsutil.h" #include "llparcel.h" +#include "llrendersphere.h" #include "llsdutil.h" #include "llsidetray.h" #include "llsky.h" @@ -88,77 +89,18 @@ const BOOL ANIMATE = TRUE; const U8 AGENT_STATE_TYPING = 0x04; const U8 AGENT_STATE_EDITING = 0x10; -//drone wandering constants -const F32 MAX_WANDER_TIME = 20.f; // seconds -const F32 MAX_HEADING_HALF_ERROR = 0.2f; // radians -const F32 WANDER_MAX_SLEW_RATE = 2.f * DEG_TO_RAD; // radians / frame -const F32 WANDER_TARGET_MIN_DISTANCE = 10.f; // meters - // Autopilot constants -const F32 AUTOPILOT_HEADING_HALF_ERROR = 10.f * DEG_TO_RAD; // radians -const F32 AUTOPILOT_MAX_SLEW_RATE = 1.f * DEG_TO_RAD; // radians / frame -const F32 AUTOPILOT_STOP_DISTANCE = 2.f; // meters const F32 AUTOPILOT_HEIGHT_ADJUST_DISTANCE = 8.f; // meters const F32 AUTOPILOT_MIN_TARGET_HEIGHT_OFF_GROUND = 1.f; // meters const F32 AUTOPILOT_MAX_TIME_NO_PROGRESS = 1.5f; // seconds -// face editing constants -const LLVector3d FACE_EDIT_CAMERA_OFFSET(0.4f, -0.05f, 0.07f); -const LLVector3d FACE_EDIT_TARGET_OFFSET(0.f, 0.f, 0.05f); - -// Mousewheel camera zoom -const F32 MIN_ZOOM_FRACTION = 0.25f; -const F32 INITIAL_ZOOM_FRACTION = 1.f; -const F32 MAX_ZOOM_FRACTION = 8.f; -const F32 METERS_PER_WHEEL_CLICK = 1.f; - -const F32 MAX_TIME_DELTA = 1.f; - -const F32 CAMERA_ZOOM_HALF_LIFE = 0.07f; // seconds -const F32 FOV_ZOOM_HALF_LIFE = 0.07f; // seconds - -const F32 CAMERA_FOCUS_HALF_LIFE = 0.f;//0.02f; -const F32 CAMERA_LAG_HALF_LIFE = 0.25f; -const F32 MIN_CAMERA_LAG = 0.5f; -const F32 MAX_CAMERA_LAG = 5.f; - -const F32 CAMERA_COLLIDE_EPSILON = 0.1f; -const F32 MIN_CAMERA_DISTANCE = 0.1f; -const F32 AVATAR_ZOOM_MIN_X_FACTOR = 0.55f; -const F32 AVATAR_ZOOM_MIN_Y_FACTOR = 0.7f; -const F32 AVATAR_ZOOM_MIN_Z_FACTOR = 1.15f; - -const F32 MAX_CAMERA_DISTANCE_FROM_AGENT = 50.f; - -const F32 MAX_CAMERA_SMOOTH_DISTANCE = 50.0f; - -const F32 HEAD_BUFFER_SIZE = 0.3f; -const F32 CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP = 0.2f; - -const F32 LAND_MIN_ZOOM = 0.15f; -const F32 AVATAR_MIN_ZOOM = 0.5f; -const F32 OBJECT_MIN_ZOOM = 0.02f; - -const F32 APPEARANCE_MIN_ZOOM = 0.39f; -const F32 APPEARANCE_MAX_ZOOM = 8.f; +const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f; +const F64 CHAT_AGE_FAST_RATE = 3.0; // fidget constants const F32 MIN_FIDGET_TIME = 8.f; // seconds const F32 MAX_FIDGET_TIME = 20.f; // seconds -const S32 MAX_NUM_CHAT_POSITIONS = 10; -const F32 GROUND_TO_AIR_CAMERA_TRANSITION_TIME = 0.5f; -const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f; - -const F32 MAX_VELOCITY_AUTO_LAND_SQUARED = 4.f * 4.f; - -const F32 MAX_FOCUS_OFFSET = 20.f; - -const F32 OBJECT_EXTENTS_PADDING = 0.5f; - -const F32 MIN_RADIUS_ALPHA_SIZZLE = 0.5f; - -const F64 CHAT_AGE_FAST_RATE = 3.0; // The agent instance. LLAgent gAgent; @@ -193,11 +135,11 @@ bool handleSlowMotionAnimation(const LLSD& newvalue) { if (newvalue.asBoolean()) { - gAgent.getAvatarObject()->setAnimTimeFactor(0.2f); + gAgentAvatarp->setAnimTimeFactor(0.2f); } else { - gAgent.getAvatarObject()->setAnimTimeFactor(1.0f); + gAgentAvatarp->setAnimTimeFactor(1.0f); } return true; } @@ -218,20 +160,12 @@ bool handleSlowMotionAnimation(const LLSD& newvalue) // LLAgent() //----------------------------------------------------------------------------- LLAgent::LLAgent() : - mDrawDistance( DEFAULT_FAR_PLANE ), - mGroupPowers(0), mHideGroupTitle(FALSE), mGroupID(), - mLookAt(NULL), - mPointAt(NULL), - - mHUDTargetZoom(1.f), - mHUDCurZoom(1.f), mInitialized(FALSE), mListener(), - mForceMouselook(FALSE), mDoubleTapRunTimer(), mDoubleTapRunMode(DOUBLETAP_NONE), @@ -249,78 +183,17 @@ LLAgent::LLAgent() : mDistanceTraveled(0.F), mLastPositionGlobal(LLVector3d::zero), - mAvatarObject(NULL), - mRenderState(0), mTypingTimer(), - mCameraMode( CAMERA_MODE_THIRD_PERSON ), - mLastCameraMode( CAMERA_MODE_THIRD_PERSON ), mViewsPushed(FALSE), - mCameraPreset(CAMERA_PRESET_REAR_VIEW), - mCustomAnim(FALSE), mShowAvatar(TRUE), - mCameraAnimating( FALSE ), - mAnimationCameraStartGlobal(), - mAnimationFocusStartGlobal(), - mAnimationTimer(), - mAnimationDuration(0.33f), - - mCameraFOVZoomFactor(0.f), - mCameraCurrentFOVZoomFactor(0.f), - mCameraFocusOffset(), - mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW), - - mCameraCollidePlane(), - - mCurrentCameraDistance(2.f), // meters, set in init() - mTargetCameraDistance(2.f), - mCameraZoomFraction(1.f), // deprecated - mThirdPersonHeadOffset(0.f, 0.f, 1.f), - mSitCameraEnabled(FALSE), - 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), - mUIOffset(0.f), - mFrameAgent(), mIsBusy(FALSE), - 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.f), - - 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), mbFlagsNeedReset(FALSE), @@ -358,7 +231,6 @@ LLAgent::LLAgent() : mControlsTakenPassedOnCount[i] = 0; } - mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT ); mListener.reset(new LLAgentListener(*this)); } @@ -372,37 +244,10 @@ void LLAgent::init() gSavedSettings.declareBOOL("SlowMotionAnimation", FALSE, "Declared in code", FALSE); gSavedSettings.getControl("SlowMotionAnimation")->getSignal()->connect(boost::bind(&handleSlowMotionAnimation, _2)); - mDrawDistance = gSavedSettings.getF32("RenderFarClip"); - // *Note: this is where LLViewerCamera::getInstance() used to be constructed. - LLViewerCamera::getInstance()->setView(DEFAULT_FIELD_OF_VIEW); - // Leave at 0.1 meters until we have real near clip management - LLViewerCamera::getInstance()->setNear(0.1f); - LLViewerCamera::getInstance()->setFar(mDrawDistance); // if you want to change camera settings, do so in camera.h - LLViewerCamera::getInstance()->setAspect( gViewerWindow->getWorldViewAspectRatio() ); // default, overridden in LLViewerWindow::reshape - LLViewerCamera::getInstance()->setViewHeightInPixels(768); // default, overridden in LLViewerWindow::reshape - setFlying( gSavedSettings.getBOOL("FlyingAtExit") ); - mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild")); - - mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); - - mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3("CameraOffsetRearView"); - mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3("CameraOffsetFrontView"); - mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3("CameraOffsetGroupView"); - - mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3d("FocusOffsetRearView"); - mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3d("FocusOffsetFrontView"); - mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3d("FocusOffsetGroupView"); - - mCameraCollidePlane.clearVec(); - mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"); - mTargetCameraDistance = mCurrentCameraDistance; - mCameraZoomFraction = 1.f; - mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject"); - mEffectColor = LLUIColorTable::instance().getColor("EffectColor"); gSavedSettings.getControl("PreferredMaturity")->getValidateSignal()->connect(boost::bind(&LLAgent::validateMaturity, this, _2)); @@ -416,22 +261,7 @@ void LLAgent::init() //----------------------------------------------------------------------------- void LLAgent::cleanup() { - setSitCamera(LLUUID::null); - - mAvatarObject = NULL; - - if(mLookAt) - { - mLookAt->markDead() ; - mLookAt = NULL; - } - if(mPointAt) - { - mPointAt->markDead() ; - mPointAt = NULL; - } mRegionp = NULL; - setFocusObject(NULL); } //----------------------------------------------------------------------------- @@ -444,83 +274,6 @@ LLAgent::~LLAgent() // *Note: this is where LLViewerCamera::getInstance() used to be deleted. } -// Change camera back to third person, stop the autopilot, -// deselect stuff, etc. -//----------------------------------------------------------------------------- -// resetView() -//----------------------------------------------------------------------------- -void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) -{ - if (mAutoPilot) - { - stopAutoPilot(TRUE); - } - - if (!gNoRender) - { - LLSelectMgr::getInstance()->unhighlightAll(); - - // By popular request, keep land selection while walking around. JC - // LLViewerParcelMgr::getInstance()->deselectLand(); - - // force deselect when walking and attachment is selected - // this is so people don't wig out when their avatar moves without animating - if (LLSelectMgr::getInstance()->getSelection()->isAttachment()) - { - LLSelectMgr::getInstance()->deselectAll(); - } - - // Hide all popup menus - gMenuHolder->hideMenus(); - } - - if (change_camera && !gSavedSettings.getBOOL("FreezeTime")) - { - changeCameraToDefault(); - - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - handle_toggle_flycam(); - } - - // reset avatar mode from eventual residual motion - if (LLToolMgr::getInstance()->inBuildMode()) - { - LLViewerJoystick::getInstance()->moveAvatar(true); - } - - //Camera Tool is needed for Free Camera Control Mode - if (!LLFloaterCamera::inFreeCameraMode()) - { - LLFloaterReg::hideInstance("build"); - - // Switch back to basic toolset - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - } - - gViewerWindow->showCursor(); - } - - - if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) - { - if (!gViewerWindow->getLeftMouseDown() && cameraThirdPerson()) - { - // leaving mouse-steer mode - LLVector3 agent_at_axis = getAtAxis(); - agent_at_axis -= projected_vec(agent_at_axis, getReferenceUpVector()); - agent_at_axis.normalize(); - gAgent.resetAxes(lerp(getAtAxis(), agent_at_axis, LLCriticalDamp::getInterpolant(0.3f))); - } - - setFocusOnAvatar(TRUE, ANIMATE); - - mCameraFOVZoomFactor = 0.f; - } - - mHUDTargetZoom = 1.f; -} - // Handle any actions that need to be performed when the main app gains focus // (such as through alt-tab). //----------------------------------------------------------------------------- @@ -528,9 +281,9 @@ void LLAgent::resetView(BOOL reset_camera, BOOL change_camera) //----------------------------------------------------------------------------- void LLAgent::onAppFocusGained() { - if (CAMERA_MODE_MOUSELOOK == mCameraMode) + if (CAMERA_MODE_MOUSELOOK == gAgentCamera.getCameraMode()) { - changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); LLToolMgr::getInstance()->clearSavedTool(); } } @@ -538,32 +291,15 @@ void LLAgent::onAppFocusGained() void LLAgent::ageChat() { - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { // get amount of time since I last chatted - F64 elapsed_time = (F64)mAvatarObject->mChatTimer.getElapsedTimeF32(); + F64 elapsed_time = (F64)gAgentAvatarp->mChatTimer.getElapsedTimeF32(); // add in frame time * 3 (so it ages 4x) - mAvatarObject->mChatTimer.setAge(elapsed_time + (F64)gFrameDTClamped * (CHAT_AGE_FAST_RATE - 1.0)); + gAgentAvatarp->mChatTimer.setAge(elapsed_time + (F64)gFrameDTClamped * (CHAT_AGE_FAST_RATE - 1.0)); } } -// Allow camera to be moved somewhere other than behind avatar. -//----------------------------------------------------------------------------- -// unlockView() -//----------------------------------------------------------------------------- -void LLAgent::unlockView() -{ - if (getFocusOnAvatar()) - { - if (mAvatarObject.notNull()) - { - setFocusGlobal( LLVector3d::zero, mAvatarObject->mID ); - } - setFocusOnAvatar(FALSE, FALSE); // no animation - } -} - - //----------------------------------------------------------------------------- // moveAt() //----------------------------------------------------------------------------- @@ -572,7 +308,7 @@ void LLAgent::moveAt(S32 direction, bool reset) // age chat timer so it fades more quickly when you are intentionally moving ageChat(); - setKey(direction, mAtKey); + gAgentCamera.setAtKey(LLAgentCamera::directionToKey(direction)); if (direction > 0) { @@ -585,7 +321,7 @@ void LLAgent::moveAt(S32 direction, bool reset) if (reset) { - resetView(); + gAgentCamera.resetView(); } } @@ -597,7 +333,7 @@ void LLAgent::moveAtNudge(S32 direction) // age chat timer so it fades more quickly when you are intentionally moving ageChat(); - setKey(direction, mWalkKey); + gAgentCamera.setWalkKey(LLAgentCamera::directionToKey(direction)); if (direction > 0) { @@ -608,7 +344,7 @@ void LLAgent::moveAtNudge(S32 direction) setControlFlags(AGENT_CONTROL_NUDGE_AT_NEG); } - resetView(); + gAgentCamera.resetView(); } //----------------------------------------------------------------------------- @@ -619,7 +355,7 @@ void LLAgent::moveLeft(S32 direction) // age chat timer so it fades more quickly when you are intentionally moving ageChat(); - setKey(direction, mLeftKey); + gAgentCamera.setLeftKey(LLAgentCamera::directionToKey(direction)); if (direction > 0) { @@ -630,7 +366,7 @@ void LLAgent::moveLeft(S32 direction) setControlFlags(AGENT_CONTROL_LEFT_NEG | AGENT_CONTROL_FAST_LEFT); } - resetView(); + gAgentCamera.resetView(); } //----------------------------------------------------------------------------- @@ -641,7 +377,7 @@ void LLAgent::moveLeftNudge(S32 direction) // age chat timer so it fades more quickly when you are intentionally moving ageChat(); - setKey(direction, mLeftKey); + gAgentCamera.setLeftKey(LLAgentCamera::directionToKey(direction)); if (direction > 0) { @@ -652,7 +388,7 @@ void LLAgent::moveLeftNudge(S32 direction) setControlFlags(AGENT_CONTROL_NUDGE_LEFT_NEG); } - resetView(); + gAgentCamera.resetView(); } //----------------------------------------------------------------------------- @@ -663,7 +399,7 @@ void LLAgent::moveUp(S32 direction) // age chat timer so it fades more quickly when you are intentionally moving ageChat(); - setKey(direction, mUpKey); + gAgentCamera.setUpKey(LLAgentCamera::directionToKey(direction)); if (direction > 0) { @@ -674,7 +410,7 @@ void LLAgent::moveUp(S32 direction) setControlFlags(AGENT_CONTROL_UP_NEG | AGENT_CONTROL_FAST_UP); } - resetView(); + gAgentCamera.resetView(); } //----------------------------------------------------------------------------- @@ -682,7 +418,7 @@ void LLAgent::moveUp(S32 direction) //----------------------------------------------------------------------------- void LLAgent::moveYaw(F32 mag, bool reset_view) { - mYawKey = mag; + gAgentCamera.setYawKey(mag); if (mag > 0) { @@ -695,7 +431,7 @@ void LLAgent::moveYaw(F32 mag, bool reset_view) if (reset_view) { - resetView(); + gAgentCamera.resetView(); } } @@ -704,7 +440,7 @@ void LLAgent::moveYaw(F32 mag, bool reset_view) //----------------------------------------------------------------------------- void LLAgent::movePitch(F32 mag) { - mPitchKey = mag; + gAgentCamera.setPitchKey(mag); if (mag > 0) { @@ -747,20 +483,20 @@ BOOL LLAgent::getFlying() const //----------------------------------------------------------------------------- void LLAgent::setFlying(BOOL fly) { - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { // *HACK: Don't allow to start the flying mode if we got ANIM_AGENT_STANDUP signal // because in this case we won't get a signal to start avatar flying animation and // it will be walking with flying mode "ON" indication. However we allow to switch // the flying mode off if we get ANIM_AGENT_STANDUP signal. See process_avatar_animation(). // See EXT-2781. - if(fly && mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != mAvatarObject->mSignaledAnimations.end()) + if(fly && gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_STANDUP) != gAgentAvatarp->mSignaledAnimations.end()) { return; } // don't allow taking off while sitting - if (fly && mAvatarObject->isSitting()) + if (fly && gAgentAvatarp->isSitting()) { return; } @@ -806,16 +542,16 @@ void LLAgent::toggleFlying() BOOL fly = !gAgent.getFlying(); gAgent.setFlying( fly ); - gAgent.resetView(); + gAgentCamera.resetView(); } // static bool LLAgent::enableFlying() { BOOL sitting = FALSE; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - sitting = gAgent.getAvatarObject()->isSitting(); + sitting = gAgentAvatarp->isSitting(); } return !sitting; } @@ -985,9 +721,9 @@ void LLAgent::sendReliableMessage() //----------------------------------------------------------------------------- LLVector3 LLAgent::getVelocity() const { - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - return mAvatarObject->getVelocity(); + return gAgentAvatarp->getVelocity(); } else { @@ -1006,13 +742,13 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent) llerrs << "setPositionAgent is not a number" << llendl; } - if (mAvatarObject.notNull() && mAvatarObject->getParent()) + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) { LLVector3 pos_agent_sitting; LLVector3d pos_agent_d; - LLViewerObject *parent = (LLViewerObject*)mAvatarObject->getParent(); + LLViewerObject *parent = (LLViewerObject*)gAgentAvatarp->getParent(); - pos_agent_sitting = mAvatarObject->getPosition() * parent->getRotation() + parent->getPositionAgent(); + pos_agent_sitting = gAgentAvatarp->getPosition() * parent->getRotation() + parent->getPositionAgent(); pos_agent_d.setVec(pos_agent_sitting); mFrameAgent.setOrigin(pos_agent_sitting); @@ -1029,24 +765,13 @@ void LLAgent::setPositionAgent(const LLVector3 &pos_agent) } //----------------------------------------------------------------------------- -// slamLookAt() -//----------------------------------------------------------------------------- -void LLAgent::slamLookAt(const LLVector3 &look_at) -{ - LLVector3 look_at_norm = look_at; - look_at_norm.mV[VZ] = 0.f; - look_at_norm.normalize(); - resetAxes(look_at_norm); -} - -//----------------------------------------------------------------------------- // getPositionGlobal() //----------------------------------------------------------------------------- const LLVector3d &LLAgent::getPositionGlobal() const { - if (mAvatarObject.notNull() && !mAvatarObject->mDrawable.isNull()) + if (isAgentAvatarValid() && !gAgentAvatarp->mDrawable.isNull()) { - mPositionGlobal = getPosGlobalFromAgent(mAvatarObject->getRenderPosition()); + mPositionGlobal = getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition()); } else { @@ -1061,9 +786,9 @@ const LLVector3d &LLAgent::getPositionGlobal() const //----------------------------------------------------------------------------- const LLVector3 &LLAgent::getPositionAgent() { - if(mAvatarObject.notNull() && !mAvatarObject->mDrawable.isNull()) + if (isAgentAvatarValid() && !gAgentAvatarp->mDrawable.isNull()) { - mFrameAgent.setOrigin(mAvatarObject->getRenderPosition()); + mFrameAgent.setOrigin(gAgentAvatarp->getRenderPosition()); } return mFrameAgent.getOrigin(); @@ -1189,21 +914,21 @@ LLVector3 LLAgent::getReferenceUpVector() { // this vector is in the coordinate frame of the avatar's parent object, or the world if none LLVector3 up_vector = LLVector3::z_axis; - if (mAvatarObject.notNull() && - mAvatarObject->getParent() && - mAvatarObject->mDrawable.notNull()) + if (isAgentAvatarValid() && + gAgentAvatarp->getParent() && + gAgentAvatarp->mDrawable.notNull()) { - U32 camera_mode = mCameraAnimating ? mLastCameraMode : mCameraMode; + U32 camera_mode = gAgentCamera.getCameraAnimating() ? gAgentCamera.getLastCameraMode() : gAgentCamera.getCameraMode(); // and in third person... if (camera_mode == CAMERA_MODE_THIRD_PERSON) { // make the up vector point to the absolute +z axis - up_vector = up_vector * ~((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation(); + up_vector = up_vector * ~((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation(); } else if (camera_mode == CAMERA_MODE_MOUSELOOK) { // make the up vector point to the avatar's +z axis - up_vector = up_vector * mAvatarObject->mDrawable->getRotation(); + up_vector = up_vector * gAgentAvatarp->mDrawable->getRotation(); } } @@ -1239,7 +964,7 @@ F32 LLAgent::clampPitchToLimits(F32 angle) F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward ); - if (mAvatarObject.notNull() && mAvatarObject->isSitting()) + if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) { look_down_limit = 130.f * DEG_TO_RAD; } @@ -1292,736 +1017,11 @@ LLQuaternion LLAgent::getQuat() const return mFrameAgent.getQuaternion(); } - -//----------------------------------------------------------------------------- -// calcFocusOffset() -//----------------------------------------------------------------------------- -LLVector3 LLAgent::calcFocusOffset(LLViewerObject *object, LLVector3 original_focus_point, S32 x, S32 y) -{ - LLMatrix4 obj_matrix = object->getRenderMatrix(); - LLQuaternion obj_rot = object->getRenderRotation(); - LLVector3 obj_pos = object->getRenderPosition(); - - BOOL is_avatar = object->isAvatar(); - // if is avatar - don't do any funk heuristics to position the focal point - // see DEV-30589 - if (is_avatar) - { - return original_focus_point - obj_pos; - } - - - LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation - LLVector3 object_extents = object->getScale(); - // make sure they object extents are non-zero - object_extents.clamp(0.001f, F32_MAX); - - // obj_to_cam_ray is unit vector pointing from object center to camera, in the coordinate frame of the object - LLVector3 obj_to_cam_ray = obj_pos - LLViewerCamera::getInstance()->getOrigin(); - obj_to_cam_ray.rotVec(inv_obj_rot); - obj_to_cam_ray.normalize(); - - // obj_to_cam_ray_proportions are the (positive) ratios of - // the obj_to_cam_ray x,y,z components with the x,y,z object dimensions. - LLVector3 obj_to_cam_ray_proportions; - obj_to_cam_ray_proportions.mV[VX] = llabs(obj_to_cam_ray.mV[VX] / object_extents.mV[VX]); - obj_to_cam_ray_proportions.mV[VY] = llabs(obj_to_cam_ray.mV[VY] / object_extents.mV[VY]); - obj_to_cam_ray_proportions.mV[VZ] = llabs(obj_to_cam_ray.mV[VZ] / object_extents.mV[VZ]); - - // find the largest ratio stored in obj_to_cam_ray_proportions - // this corresponds to the object's local axial plane (XY, YZ, XZ) that is *most* facing the camera - LLVector3 longest_object_axis; - // is x-axis longest? - if (obj_to_cam_ray_proportions.mV[VX] > obj_to_cam_ray_proportions.mV[VY] - && obj_to_cam_ray_proportions.mV[VX] > obj_to_cam_ray_proportions.mV[VZ]) - { - // then grab it - longest_object_axis.setVec(obj_matrix.getFwdRow4()); - } - // is y-axis longest? - else if (obj_to_cam_ray_proportions.mV[VY] > obj_to_cam_ray_proportions.mV[VZ]) - { - // then grab it - longest_object_axis.setVec(obj_matrix.getLeftRow4()); - } - // otherwise, use z axis - else - { - longest_object_axis.setVec(obj_matrix.getUpRow4()); - } - - // Use this axis as the normal to project mouse click on to plane with that normal, at the object center. - // This generates a point behind the mouse cursor that is approximately in the middle of the object in - // terms of depth. - // We do this to allow the camera rotation tool to "tumble" the object by rotating the camera. - // If the focus point were the object surface under the mouse, camera rotation would introduce an undesirable - // eccentricity to the object orientation - LLVector3 focus_plane_normal(longest_object_axis); - focus_plane_normal.normalize(); - - LLVector3d focus_pt_global; - gViewerWindow->mousePointOnPlaneGlobal(focus_pt_global, x, y, gAgent.getPosGlobalFromAgent(obj_pos), focus_plane_normal); - LLVector3 focus_pt = gAgent.getPosAgentFromGlobal(focus_pt_global); - - // find vector from camera to focus point in object space - LLVector3 camera_to_focus_vec = focus_pt - LLViewerCamera::getInstance()->getOrigin(); - camera_to_focus_vec.rotVec(inv_obj_rot); - - // find vector from object origin to focus point in object coordinates - LLVector3 focus_offset_from_object_center = focus_pt - obj_pos; - // convert to object-local space - focus_offset_from_object_center.rotVec(inv_obj_rot); - - // We need to project the focus point back into the bounding box of the focused object. - // Do this by calculating the XYZ scale factors needed to get focus offset back in bounds along the camera_focus axis - LLVector3 clip_fraction; - - // for each axis... - for (U32 axis = VX; axis <= VZ; axis++) - { - //...calculate distance that focus offset sits outside of bounding box along that axis... - //NOTE: dist_out_of_bounds keeps the sign of focus_offset_from_object_center - F32 dist_out_of_bounds; - if (focus_offset_from_object_center.mV[axis] > 0.f) - { - dist_out_of_bounds = llmax(0.f, focus_offset_from_object_center.mV[axis] - (object_extents.mV[axis] * 0.5f)); - } - else - { - dist_out_of_bounds = llmin(0.f, focus_offset_from_object_center.mV[axis] + (object_extents.mV[axis] * 0.5f)); - } - - //...then calculate the scale factor needed to push camera_to_focus_vec back in bounds along current axis - if (llabs(camera_to_focus_vec.mV[axis]) < 0.0001f) - { - // don't divide by very small number - clip_fraction.mV[axis] = 0.f; - } - else - { - clip_fraction.mV[axis] = dist_out_of_bounds / camera_to_focus_vec.mV[axis]; - } - } - - LLVector3 abs_clip_fraction = clip_fraction; - abs_clip_fraction.abs(); - - // find axis of focus offset that is *most* outside the bounding box and use that to - // rescale focus offset to inside object extents - if (abs_clip_fraction.mV[VX] > abs_clip_fraction.mV[VY] - && abs_clip_fraction.mV[VX] > abs_clip_fraction.mV[VZ]) - { - focus_offset_from_object_center -= clip_fraction.mV[VX] * camera_to_focus_vec; - } - else if (abs_clip_fraction.mV[VY] > abs_clip_fraction.mV[VZ]) - { - focus_offset_from_object_center -= clip_fraction.mV[VY] * camera_to_focus_vec; - } - else - { - focus_offset_from_object_center -= clip_fraction.mV[VZ] * camera_to_focus_vec; - } - - // convert back to world space - focus_offset_from_object_center.rotVec(obj_rot); - - // now, based on distance of camera from object relative to object size - // push the focus point towards the near surface of the object when (relatively) close to the objcet - // or keep the focus point in the object middle when (relatively) far - // NOTE: leave focus point in middle of avatars, since the behavior you want when alt-zooming on avatars - // is almost always "tumble about middle" and not "spin around surface point" - if (!is_avatar) - { - LLVector3 obj_rel = original_focus_point - object->getRenderPosition(); - - //now that we have the object relative position, we should bias toward the center of the object - //based on the distance of the camera to the focus point vs. the distance of the camera to the focus - - F32 relDist = llabs(obj_rel * LLViewerCamera::getInstance()->getAtAxis()); - F32 viewDist = dist_vec(obj_pos + obj_rel, LLViewerCamera::getInstance()->getOrigin()); - - - LLBBox obj_bbox = object->getBoundingBoxAgent(); - F32 bias = 0.f; - - // virtual_camera_pos is the camera position we are simulating by backing the camera off - // and adjusting the FOV - LLVector3 virtual_camera_pos = gAgent.getPosAgentFromGlobal(mFocusTargetGlobal + (getCameraPositionGlobal() - mFocusTargetGlobal) / (1.f + mCameraFOVZoomFactor)); - - // if the camera is inside the object (large, hollow objects, for example) - // leave focus point all the way to destination depth, away from object center - if(!obj_bbox.containsPointAgent(virtual_camera_pos)) - { - // perform magic number biasing of focus point towards surface vs. planar center - bias = clamp_rescale(relDist/viewDist, 0.1f, 0.7f, 0.0f, 1.0f); - obj_rel = lerp(focus_offset_from_object_center, obj_rel, bias); - } - - focus_offset_from_object_center = obj_rel; - } - - return focus_offset_from_object_center; -} - -//----------------------------------------------------------------------------- -// calcCameraMinDistance() -//----------------------------------------------------------------------------- -BOOL LLAgent::calcCameraMinDistance(F32 &obj_min_distance) -{ - BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) - - if (!mFocusObject || mFocusObject->isDead()) - { - obj_min_distance = 0.f; - return TRUE; - } - - if (mFocusObject->mDrawable.isNull()) - { -#ifdef LL_RELEASE_FOR_DOWNLOAD - llwarns << "Focus object with no drawable!" << llendl; -#else - mFocusObject->dump(); - llerrs << "Focus object with no drawable!" << llendl; -#endif - obj_min_distance = 0.f; - return TRUE; - } - - LLQuaternion inv_object_rot = ~mFocusObject->getRenderRotation(); - LLVector3 target_offset_origin = mFocusObjectOffset; - LLVector3 camera_offset_target(getCameraPositionAgent() - getPosAgentFromGlobal(mFocusTargetGlobal)); - - // convert offsets into object local space - camera_offset_target.rotVec(inv_object_rot); - target_offset_origin.rotVec(inv_object_rot); - - // push around object extents based on target offset - LLVector3 object_extents = mFocusObject->getScale(); - if (mFocusObject->isAvatar()) - { - // fudge factors that lets you zoom in on avatars a bit more (which don't do FOV zoom) - object_extents.mV[VX] *= AVATAR_ZOOM_MIN_X_FACTOR; - object_extents.mV[VY] *= AVATAR_ZOOM_MIN_Y_FACTOR; - object_extents.mV[VZ] *= AVATAR_ZOOM_MIN_Z_FACTOR; - soft_limit = TRUE; - } - LLVector3 abs_target_offset = target_offset_origin; - abs_target_offset.abs(); - - LLVector3 target_offset_dir = target_offset_origin; - F32 object_radius = mFocusObject->getVObjRadius(); - - BOOL target_outside_object_extents = FALSE; - - for (U32 i = VX; i <= VZ; i++) - { - if (abs_target_offset.mV[i] * 2.f > object_extents.mV[i] + OBJECT_EXTENTS_PADDING) - { - target_outside_object_extents = TRUE; - } - if (camera_offset_target.mV[i] > 0.f) - { - object_extents.mV[i] -= target_offset_origin.mV[i] * 2.f; - } - else - { - object_extents.mV[i] += target_offset_origin.mV[i] * 2.f; - } - } - - // don't shrink the object extents so far that the object inverts - object_extents.clamp(0.001f, F32_MAX); - - // move into first octant - LLVector3 camera_offset_target_abs_norm = camera_offset_target; - camera_offset_target_abs_norm.abs(); - // make sure offset is non-zero - camera_offset_target_abs_norm.clamp(0.001f, F32_MAX); - camera_offset_target_abs_norm.normalize(); - - // find camera position relative to normalized object extents - LLVector3 camera_offset_target_scaled = camera_offset_target_abs_norm; - camera_offset_target_scaled.mV[VX] /= object_extents.mV[VX]; - camera_offset_target_scaled.mV[VY] /= object_extents.mV[VY]; - camera_offset_target_scaled.mV[VZ] /= object_extents.mV[VZ]; - - if (camera_offset_target_scaled.mV[VX] > camera_offset_target_scaled.mV[VY] && - camera_offset_target_scaled.mV[VX] > camera_offset_target_scaled.mV[VZ]) - { - if (camera_offset_target_abs_norm.mV[VX] < 0.001f) - { - obj_min_distance = object_extents.mV[VX] * 0.5f; - } - else - { - obj_min_distance = object_extents.mV[VX] * 0.5f / camera_offset_target_abs_norm.mV[VX]; - } - } - else if (camera_offset_target_scaled.mV[VY] > camera_offset_target_scaled.mV[VZ]) - { - if (camera_offset_target_abs_norm.mV[VY] < 0.001f) - { - obj_min_distance = object_extents.mV[VY] * 0.5f; - } - else - { - obj_min_distance = object_extents.mV[VY] * 0.5f / camera_offset_target_abs_norm.mV[VY]; - } - } - else - { - if (camera_offset_target_abs_norm.mV[VZ] < 0.001f) - { - obj_min_distance = object_extents.mV[VZ] * 0.5f; - } - else - { - obj_min_distance = object_extents.mV[VZ] * 0.5f / camera_offset_target_abs_norm.mV[VZ]; - } - } - - LLVector3 object_split_axis; - LLVector3 target_offset_scaled = target_offset_origin; - target_offset_scaled.abs(); - target_offset_scaled.normalize(); - target_offset_scaled.mV[VX] /= object_extents.mV[VX]; - target_offset_scaled.mV[VY] /= object_extents.mV[VY]; - target_offset_scaled.mV[VZ] /= object_extents.mV[VZ]; - - if (target_offset_scaled.mV[VX] > target_offset_scaled.mV[VY] && - target_offset_scaled.mV[VX] > target_offset_scaled.mV[VZ]) - { - object_split_axis = LLVector3::x_axis; - } - else if (target_offset_scaled.mV[VY] > target_offset_scaled.mV[VZ]) - { - object_split_axis = LLVector3::y_axis; - } - else - { - object_split_axis = LLVector3::z_axis; - } - - LLVector3 camera_offset_object(getCameraPositionAgent() - mFocusObject->getPositionAgent()); - - // length projected orthogonal to target offset - F32 camera_offset_dist = (camera_offset_object - target_offset_dir * (camera_offset_object * target_offset_dir)).magVec(); - - // calculate whether the target point would be "visible" if it were outside the bounding box - // on the opposite of the splitting plane defined by object_split_axis; - BOOL exterior_target_visible = FALSE; - if (camera_offset_dist > object_radius) - { - // target is visible from camera, so turn off fov zoom - exterior_target_visible = TRUE; - } - - F32 camera_offset_clip = camera_offset_object * object_split_axis; - F32 target_offset_clip = target_offset_dir * object_split_axis; - - // target has moved outside of object extents - // check to see if camera and target are on same side - if (target_outside_object_extents) - { - if (camera_offset_clip > 0.f && target_offset_clip > 0.f) - { - return FALSE; - } - else if (camera_offset_clip < 0.f && target_offset_clip < 0.f) - { - return FALSE; - } - } - - // clamp obj distance to diagonal of 10 by 10 cube - obj_min_distance = llmin(obj_min_distance, 10.f * F_SQRT3); - - obj_min_distance += LLViewerCamera::getInstance()->getNear() + (soft_limit ? 0.1f : 0.2f); - - return TRUE; -} - -F32 LLAgent::getCameraZoomFraction() -{ - // 0.f -> camera zoomed all the way out - // 1.f -> camera zoomed all the way in - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - // already [0,1] - return mHUDTargetZoom; - } - else if (mFocusOnAvatar && cameraThirdPerson()) - { - return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f); - } - else if (cameraCustomizeAvatar()) - { - F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); - return clamp_rescale(distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM, 1.f, 0.f ); - } - else - { - F32 min_zoom; - const F32 DIST_FUDGE = 16.f; // meters - F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, - LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, - MAX_CAMERA_DISTANCE_FROM_AGENT); - - F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); - if (mFocusObject.notNull()) - { - if (mFocusObject->isAvatar()) - { - min_zoom = AVATAR_MIN_ZOOM; - } - else - { - min_zoom = OBJECT_MIN_ZOOM; - } - } - else - { - min_zoom = LAND_MIN_ZOOM; - } - - return clamp_rescale(distance, min_zoom, max_zoom, 1.f, 0.f); - } -} - -void LLAgent::setCameraZoomFraction(F32 fraction) -{ - // 0.f -> camera zoomed all the way out - // 1.f -> camera zoomed all the way in - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - mHUDTargetZoom = fraction; - } - else if (mFocusOnAvatar && cameraThirdPerson()) - { - mCameraZoomFraction = rescale(fraction, 0.f, 1.f, MAX_ZOOM_FRACTION, MIN_ZOOM_FRACTION); - } - else if (cameraCustomizeAvatar()) - { - LLVector3d camera_offset_dir = mCameraFocusOffsetTarget; - camera_offset_dir.normalize(); - mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, APPEARANCE_MAX_ZOOM, APPEARANCE_MIN_ZOOM); - } - else - { - F32 min_zoom = LAND_MIN_ZOOM; - const F32 DIST_FUDGE = 16.f; // meters - F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, - LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, - MAX_CAMERA_DISTANCE_FROM_AGENT); - - if (mFocusObject.notNull()) - { - if (mFocusObject.notNull()) - { - if (mFocusObject->isAvatar()) - { - min_zoom = AVATAR_MIN_ZOOM; - } - else - { - min_zoom = OBJECT_MIN_ZOOM; - } - } - } - - LLVector3d camera_offset_dir = mCameraFocusOffsetTarget; - camera_offset_dir.normalize(); - mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom); - } - startCameraAnimation(); -} - - -//----------------------------------------------------------------------------- -// cameraOrbitAround() -//----------------------------------------------------------------------------- -void LLAgent::cameraOrbitAround(const F32 radians) -{ - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - // do nothing for hud selection - } - else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON || mCameraMode == CAMERA_MODE_FOLLOW)) - { - mFrameAgent.rotate(radians, getReferenceUpVector()); - } - else - { - mCameraFocusOffsetTarget.rotVec(radians, 0.f, 0.f, 1.f); - - cameraZoomIn(1.f); - } -} - - -//----------------------------------------------------------------------------- -// cameraOrbitOver() -//----------------------------------------------------------------------------- -void LLAgent::cameraOrbitOver(const F32 angle) -{ - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - // do nothing for hud selection - } - else if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON) - { - pitch(angle); - } - else - { - LLVector3 camera_offset_unit(mCameraFocusOffsetTarget); - camera_offset_unit.normalize(); - - F32 angle_from_up = acos( camera_offset_unit * getReferenceUpVector() ); - - LLVector3d left_axis; - left_axis.setVec(LLViewerCamera::getInstance()->getLeftAxis()); - F32 new_angle = llclamp(angle_from_up - angle, 1.f * DEG_TO_RAD, 179.f * DEG_TO_RAD); - mCameraFocusOffsetTarget.rotVec(angle_from_up - new_angle, left_axis); - - cameraZoomIn(1.f); - } -} - -//----------------------------------------------------------------------------- -// cameraZoomIn() -//----------------------------------------------------------------------------- -void LLAgent::cameraZoomIn(const F32 fraction) -{ - if (gDisconnected) - { - return; - } - - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - // just update hud zoom level - mHUDTargetZoom /= fraction; - return; - } - - - LLVector3d camera_offset(mCameraFocusOffsetTarget); - LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); - F32 min_zoom = LAND_MIN_ZOOM; - F32 current_distance = (F32)camera_offset_unit.normalize(); - F32 new_distance = current_distance * fraction; - - // Don't move through focus point - if (mFocusObject) - { - LLVector3 camera_offset_dir((F32)camera_offset_unit.mdV[VX], (F32)camera_offset_unit.mdV[VY], (F32)camera_offset_unit.mdV[VZ]); - - if (mFocusObject->isAvatar()) - { - calcCameraMinDistance(min_zoom); - } - else - { - min_zoom = OBJECT_MIN_ZOOM; - } - } - - new_distance = llmax(new_distance, min_zoom); - - // Don't zoom too far back - const F32 DIST_FUDGE = 16.f; // meters - F32 max_distance = llmin(mDrawDistance - DIST_FUDGE, - LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE ); - - if (new_distance > max_distance) - { - new_distance = max_distance; - - /* - // Unless camera is unlocked - if (!LLViewerCamera::sDisableCameraConstraints) - { - return; - } - */ - } - - if( cameraCustomizeAvatar() ) - { - new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); - } - - mCameraFocusOffsetTarget = new_distance * camera_offset_unit; -} - -//----------------------------------------------------------------------------- -// cameraOrbitIn() -//----------------------------------------------------------------------------- -void LLAgent::cameraOrbitIn(const F32 meters) -{ - if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON) - { - F32 camera_offset_dist = llmax(0.001f, getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale")); - - mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist; - - if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) - { - // No need to animate, camera is already there. - changeCameraToMouselook(FALSE); - } - - mCameraZoomFraction = llclamp(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION); - } - else - { - LLVector3d camera_offset(mCameraFocusOffsetTarget); - LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); - F32 current_distance = (F32)camera_offset_unit.normalize(); - F32 new_distance = current_distance - meters; - F32 min_zoom = LAND_MIN_ZOOM; - - // Don't move through focus point - if (mFocusObject.notNull()) - { - if (mFocusObject->isAvatar()) - { - min_zoom = AVATAR_MIN_ZOOM; - } - else - { - min_zoom = OBJECT_MIN_ZOOM; - } - } - - new_distance = llmax(new_distance, min_zoom); - - // Don't zoom too far back - const F32 DIST_FUDGE = 16.f; // meters - F32 max_distance = llmin(mDrawDistance - DIST_FUDGE, - LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE ); - - if (new_distance > max_distance) - { - // Unless camera is unlocked - if (!gSavedSettings.getBOOL("DisableCameraConstraints")) - { - return; - } - } - - if( CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode() ) - { - new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); - } - - // Compute new camera offset - mCameraFocusOffsetTarget = new_distance * camera_offset_unit; - cameraZoomIn(1.f); - } -} - - -//----------------------------------------------------------------------------- -// cameraPanIn() -//----------------------------------------------------------------------------- -void LLAgent::cameraPanIn(F32 meters) -{ - LLVector3d at_axis; - at_axis.setVec(LLViewerCamera::getInstance()->getAtAxis()); - - mFocusTargetGlobal += meters * at_axis; - mFocusGlobal = mFocusTargetGlobal; - // don't enforce zoom constraints as this is the only way for users to get past them easily - updateFocusOffset(); - // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind -Nyx - mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); -} - -//----------------------------------------------------------------------------- -// cameraPanLeft() -//----------------------------------------------------------------------------- -void LLAgent::cameraPanLeft(F32 meters) -{ - LLVector3d left_axis; - left_axis.setVec(LLViewerCamera::getInstance()->getLeftAxis()); - - mFocusTargetGlobal += meters * left_axis; - mFocusGlobal = mFocusTargetGlobal; - - // disable smoothing for camera pan, which causes some residents unhappiness - mCameraSmoothingStop = TRUE; - - cameraZoomIn(1.f); - updateFocusOffset(); - // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind - Nyx - mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); -} - -//----------------------------------------------------------------------------- -// cameraPanUp() -//----------------------------------------------------------------------------- -void LLAgent::cameraPanUp(F32 meters) -{ - LLVector3d up_axis; - up_axis.setVec(LLViewerCamera::getInstance()->getUpAxis()); - - mFocusTargetGlobal += meters * up_axis; - mFocusGlobal = mFocusTargetGlobal; - - // disable smoothing for camera pan, which causes some residents unhappiness - mCameraSmoothingStop = TRUE; - - cameraZoomIn(1.f); - updateFocusOffset(); - // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind -Nyx - mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); -} - -//----------------------------------------------------------------------------- -// setKey() -//----------------------------------------------------------------------------- -void LLAgent::setKey(const S32 direction, S32 &key) -{ - if (direction > 0) - { - key = 1; - } - else if (direction < 0) - { - key = -1; - } - else - { - key = 0; - } -} - - //----------------------------------------------------------------------------- // getControlFlags() //----------------------------------------------------------------------------- U32 LLAgent::getControlFlags() { -/* - // HACK -- avoids maintenance of control flags when camera mode is turned on or off, - // only worries about it when the flags are measured - if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - if ( !(mControlFlags & AGENT_CONTROL_MOUSELOOK) ) - { - mControlFlags |= AGENT_CONTROL_MOUSELOOK; - } - } -*/ return mControlFlags; } @@ -2117,10 +1117,9 @@ void LLAgent::clearAFK() // Gods can sometimes get into away state (via gestures) // without setting the appropriate control flag. JC - LLVOAvatar* av = mAvatarObject; if (mControlFlags & AGENT_CONTROL_AWAY - || (av - && (av->mSignaledAnimations.find(ANIM_AGENT_AWAY) != av->mSignaledAnimations.end()))) + || (isAgentAvatarValid() + && (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AWAY) != gAgentAvatarp->mSignaledAnimations.end()))) { sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP); clearControlFlags(AGENT_CONTROL_AWAY); @@ -2181,7 +1180,7 @@ BOOL LLAgent::getBusy() const //----------------------------------------------------------------------------- void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *), void *callback_data, F32 stop_distance, F32 rot_threshold) { - if (!gAgent.getAvatarObject()) + if (!isAgentAvatarValid()) { return; } @@ -2242,7 +1241,7 @@ void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::s LLViewerObject *obj; LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); - F64 target_height = llmax((F64)gAgent.getAvatarObject()->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); + F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); // clamp z value of target to minimum height above ground mAutoPilotTargetGlobal.mdV[VZ] = targetOnGround.mdV[VZ] + target_height; @@ -2344,12 +1343,9 @@ void LLAgent::autoPilot(F32 *delta_yaw) mAutoPilotTargetGlobal = object->getPositionGlobal(); } - if (mAvatarObject.isNull()) - { - return; - } + if (!isAgentAvatarValid()) return; - if (mAvatarObject->mInAir) + if (gAgentAvatarp->mInAir) { setFlying(TRUE); } @@ -2425,9 +1421,9 @@ void LLAgent::autoPilot(F32 *delta_yaw) // If we're flying, handle autopilot points above or below you. if (getFlying() && xy_distance < AUTOPILOT_HEIGHT_ADJUST_DISTANCE) { - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - F64 current_height = mAvatarObject->getPositionGlobal().mdV[VZ]; + F64 current_height = gAgentAvatarp->getPositionGlobal().mdV[VZ]; F32 delta_z = (F32)(mAutoPilotTargetGlobal.mdV[VZ] - current_height); F32 slope = delta_z / xy_distance; if (slope > 0.45f && delta_z > 6.f) @@ -2492,30 +1488,30 @@ void LLAgent::propagate(const F32 dt) LLFloaterMove *floater_move = LLFloaterReg::findTypedInstance<LLFloaterMove>("moveview"); if (floater_move) { - floater_move->mForwardButton ->setToggleState( mAtKey > 0 || mWalkKey > 0 ); - floater_move->mBackwardButton ->setToggleState( mAtKey < 0 || mWalkKey < 0 ); - floater_move->mTurnLeftButton ->setToggleState( mYawKey > 0.f ); - floater_move->mTurnRightButton ->setToggleState( mYawKey < 0.f ); - floater_move->mMoveUpButton ->setToggleState( mUpKey > 0 ); - floater_move->mMoveDownButton ->setToggleState( mUpKey < 0 ); + floater_move->mForwardButton ->setToggleState( gAgentCamera.getAtKey() > 0 || gAgentCamera.getWalkKey() > 0 ); + floater_move->mBackwardButton ->setToggleState( gAgentCamera.getAtKey() < 0 || gAgentCamera.getWalkKey() < 0 ); + floater_move->mTurnLeftButton ->setToggleState( gAgentCamera.getYawKey() > 0.f ); + floater_move->mTurnRightButton ->setToggleState( gAgentCamera.getYawKey() < 0.f ); + floater_move->mMoveUpButton ->setToggleState( gAgentCamera.getUpKey() > 0 ); + floater_move->mMoveDownButton ->setToggleState( gAgentCamera.getUpKey() < 0 ); } // handle rotation based on keyboard levels const F32 YAW_RATE = 90.f * DEG_TO_RAD; // radians per second - yaw(YAW_RATE * mYawKey * dt); + yaw(YAW_RATE * gAgentCamera.getYawKey() * dt); const F32 PITCH_RATE = 90.f * DEG_TO_RAD; // radians per second - pitch(PITCH_RATE * mPitchKey * dt); + pitch(PITCH_RATE * gAgentCamera.getPitchKey() * dt); // handle auto-land behavior - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - BOOL in_air = mAvatarObject->mInAir; + BOOL in_air = gAgentAvatarp->mInAir; LLVector3 land_vel = getVelocity(); land_vel.mV[VZ] = 0.f; if (!in_air - && mUpKey < 0 + && gAgentCamera.getUpKey() < 0 && land_vel.magVecSquared() < MAX_VELOCITY_AUTO_LAND_SQUARED && gSavedSettings.getBOOL("AutomaticFly")) { @@ -2524,13 +1520,7 @@ void LLAgent::propagate(const F32 dt) } } - // clear keys - mAtKey = 0; - mWalkKey = 0; - mLeftKey = 0; - mUpKey = 0; - mYawKey = 0.f; - mPitchKey = 0.f; + gAgentCamera.clearGeneralKeys(); } //----------------------------------------------------------------------------- @@ -2548,79 +1538,7 @@ void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32 // Check for water and land collision, set underwater flag // - updateLookAt(mouse_x, mouse_y); -} - -//----------------------------------------------------------------------------- -// updateLookAt() -//----------------------------------------------------------------------------- -void LLAgent::updateLookAt(const S32 mouse_x, const S32 mouse_y) -{ - static LLVector3 last_at_axis; - - - if (mAvatarObject.isNull()) - { - return; - } - - LLQuaternion av_inv_rot = ~mAvatarObject->mRoot.getWorldRotation(); - LLVector3 root_at = LLVector3::x_axis * mAvatarObject->mRoot.getWorldRotation(); - - if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) && - (root_at * last_at_axis > 0.95f )) - { - LLVector3 vel = mAvatarObject->getVelocity(); - if (vel.magVecSquared() > 4.f) - { - setLookAt(LOOKAT_TARGET_IDLE, mAvatarObject, vel * av_inv_rot); - } - else - { - // *FIX: rotate mframeagent by sit object's rotation? - LLQuaternion look_rotation = mAvatarObject->isSitting() ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion(); // use camera's current rotation - LLVector3 look_offset = LLVector3(2.f, 0.f, 0.f) * look_rotation * av_inv_rot; - setLookAt(LOOKAT_TARGET_IDLE, mAvatarObject, look_offset); - } - last_at_axis = root_at; - return; - } - - last_at_axis = root_at; - - if (CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode()) - { - setLookAt(LOOKAT_TARGET_NONE, mAvatarObject, LLVector3(-2.f, 0.f, 0.f)); - } - else - { - // Move head based on cursor position - ELookAtType lookAtType = LOOKAT_TARGET_NONE; - LLVector3 headLookAxis; - LLCoordFrame frameCamera = *((LLCoordFrame*)LLViewerCamera::getInstance()); - - if (cameraMouselook()) - { - lookAtType = LOOKAT_TARGET_MOUSELOOK; - } - else if (cameraThirdPerson()) - { - // range from -.5 to .5 - F32 x_from_center = - ((F32) mouse_x / (F32) gViewerWindow->getWindowWidthScaled() ) - 0.5f; - F32 y_from_center = - ((F32) mouse_y / (F32) gViewerWindow->getWindowHeightScaled() ) - 0.5f; - - frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); - frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); - lookAtType = LOOKAT_TARGET_FREELOOK; - } - - headLookAxis = frameCamera.getAtAxis(); - // RN: we use world-space offset for mouselook and freelook - //headLookAxis = headLookAxis * av_inv_rot; - setLookAt(lookAtType, mAvatarObject, headLookAxis); - } + gAgentCamera.updateLookAt(mouse_x, mouse_y); } // friends and operators @@ -2635,44 +1553,6 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent) return s; } - -// ------------------- Beginning of legacy LLCamera hack ---------------------- -// This section is included for legacy LLCamera support until -// it is no longer needed. Some legacy code must exist in -// non-legacy functions, and is labeled with "// legacy" comments. - -//----------------------------------------------------------------------------- -// setAvatarObject() -//----------------------------------------------------------------------------- -void LLAgent::setAvatarObject(LLVOAvatarSelf *avatar) -{ - mAvatarObject = avatar; - - if (!avatar) - { - llinfos << "Setting LLAgent::mAvatarObject to NULL" << llendl; - return; - } - - if (!mLookAt) - { - mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT); - } - if (!mPointAt) - { - mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT); - } - - if (!mLookAt.isNull()) - { - mLookAt->setSourceObject(avatar); - } - if (!mPointAt.isNull()) - { - mPointAt->setSourceObject(avatar); - } -} - // TRUE if your own avatar needs to be rendered. Usually only // in third person and build. //----------------------------------------------------------------------------- @@ -2680,7 +1560,7 @@ void LLAgent::setAvatarObject(LLVOAvatarSelf *avatar) //----------------------------------------------------------------------------- BOOL LLAgent::needsRenderAvatar() { - if (cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) + if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) { return FALSE; } @@ -2691,7 +1571,7 @@ BOOL LLAgent::needsRenderAvatar() // TRUE if we need to render your own avatar's head. BOOL LLAgent::needsRenderHead() { - return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !cameraMouselook()); + return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook()); } //----------------------------------------------------------------------------- @@ -2713,7 +1593,7 @@ void LLAgent::startTyping() LLViewerObject* chatter = gObjectList.findObject(mLastChatterID); if (chatter && chatter->isAvatar()) { - gAgent.setLookAt(LOOKAT_TARGET_RESPOND, chatter, LLVector3::zero); + gAgentCamera.setLookAt(LOOKAT_TARGET_RESPOND, chatter, LLVector3::zero); } } @@ -2792,14 +1672,14 @@ U8 LLAgent::getRenderState() //----------------------------------------------------------------------------- void LLAgent::endAnimationUpdateUI() { - if (mCameraMode == mLastCameraMode) + if (gAgentCamera.getCameraMode() == gAgentCamera.getLastCameraMode()) { // We're already done endAnimationUpdateUI for this transition. return; } // clean up UI from mode we're leaving - if ( mLastCameraMode == CAMERA_MODE_MOUSELOOK ) + if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_MOUSELOOK ) { // show mouse cursor gViewerWindow->showCursor(); @@ -2837,33 +1717,33 @@ void LLAgent::endAnimationUpdateUI() } - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); if( gMorphView ) { gMorphView->setVisible( FALSE ); } // Disable mouselook-specific animations - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - if( mAvatarObject->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) ) + if( gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_AIM_ANIMS, NUM_AGENT_GUN_AIM_ANIMS) ) { - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_RIFLE_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_RIFLE_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_AIM_RIFLE_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_HOLD_RIFLE_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_HANDGUN_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_HANDGUN_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_AIM_HANDGUN_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_HOLD_HANDGUN_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_BAZOOKA_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_BAZOOKA_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_AIM_BAZOOKA_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_AIM_BOW_L) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_AIM_BOW_L) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_AIM_BOW_L, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_HOLD_BOW_L, ANIM_REQUEST_START); @@ -2871,8 +1751,7 @@ void LLAgent::endAnimationUpdateUI() } } } - else - if( mLastCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR ) + else if (gAgentCamera.getLastCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { // make sure we ask to save changes @@ -2883,7 +1762,7 @@ void LLAgent::endAnimationUpdateUI() gMorphView->setVisible( FALSE ); } - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { if(mCustomAnim) { @@ -2894,13 +1773,13 @@ void LLAgent::endAnimationUpdateUI() } } - setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } //--------------------------------------------------------------------- // Set up UI for mode we're entering //--------------------------------------------------------------------- - if (mCameraMode == CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { // hide menus gMenuBarView->setVisible(FALSE); @@ -2915,7 +1794,7 @@ void LLAgent::endAnimationUpdateUI() LLPanelStandStopFlying::getInstance()->setVisible(FALSE); // clear out camera lag effect - mCameraLag.clearVec(); + gAgentCamera.clearCameraLag(); // JC - Added for always chat in third person option gFocusMgr.setKeyboardFocus(NULL); @@ -2943,49 +1822,49 @@ void LLAgent::endAnimationUpdateUI() gConsole->setVisible( TRUE ); - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { // Trigger mouselook-specific animations - if( mAvatarObject->isAnyAnimationSignaled(AGENT_GUN_HOLD_ANIMS, NUM_AGENT_GUN_HOLD_ANIMS) ) + if( gAgentAvatarp->isAnyAnimationSignaled(AGENT_GUN_HOLD_ANIMS, NUM_AGENT_GUN_HOLD_ANIMS) ) { - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_RIFLE_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_RIFLE_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_HOLD_RIFLE_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_AIM_RIFLE_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_HANDGUN_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_HANDGUN_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_HOLD_HANDGUN_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_AIM_HANDGUN_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_BAZOOKA_R) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_BAZOOKA_R) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_HOLD_BAZOOKA_R, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_AIM_BAZOOKA_R, ANIM_REQUEST_START); } - if (mAvatarObject->mSignaledAnimations.find(ANIM_AGENT_HOLD_BOW_L) != mAvatarObject->mSignaledAnimations.end()) + if (gAgentAvatarp->mSignaledAnimations.find(ANIM_AGENT_HOLD_BOW_L) != gAgentAvatarp->mSignaledAnimations.end()) { sendAnimationRequest(ANIM_AGENT_HOLD_BOW_L, ANIM_REQUEST_STOP); sendAnimationRequest(ANIM_AGENT_AIM_BOW_L, ANIM_REQUEST_START); } } - if (mAvatarObject->getParent()) + if (gAgentAvatarp->getParent()) { LLVector3 at_axis = LLViewerCamera::getInstance()->getAtAxis(); - LLViewerObject* root_object = (LLViewerObject*)mAvatarObject->getRoot(); + LLViewerObject* root_object = (LLViewerObject*)gAgentAvatarp->getRoot(); if (root_object->flagCameraDecoupled()) { resetAxes(at_axis); } else { - resetAxes(at_axis * ~((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation()); + resetAxes(at_axis * ~((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation()); } } } } - else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) + else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); @@ -2995,1588 +1874,22 @@ void LLAgent::endAnimationUpdateUI() } // freeze avatar - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - mPauseRequest = mAvatarObject->requestPause(); + mPauseRequest = gAgentAvatarp->requestPause(); } } - if (getAvatarObject()) + if (isAgentAvatarValid()) { - getAvatarObject()->updateAttachmentVisibility(mCameraMode); + gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); } gFloaterTools->dirty(); // Don't let this be called more than once if the camera // mode hasn't changed. --JC - mLastCameraMode = mCameraMode; - -} - - -//----------------------------------------------------------------------------- -// updateCamera() -//----------------------------------------------------------------------------- -void LLAgent::updateCamera() -{ - static LLFastTimer::DeclareTimer ftm("Camera"); - LLFastTimer t(ftm); - - //Ventrella - changed camera_skyward to the new global "mCameraUpVector" - mCameraUpVector = LLVector3::z_axis; - //LLVector3 camera_skyward(0.f, 0.f, 1.f); - //end Ventrella - - U32 camera_mode = mCameraAnimating ? mLastCameraMode : mCameraMode; - - validateFocusObject(); - - if (mAvatarObject.notNull() && - mAvatarObject->isSitting() && - camera_mode == CAMERA_MODE_MOUSELOOK) - { - //Ventrella - //changed camera_skyward to the new global "mCameraUpVector" - mCameraUpVector = mCameraUpVector * mAvatarObject->getRenderRotation(); - //end Ventrella - } - - if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams()) - { - changeCameraToFollow(); - } - - //Ventrella - //NOTE - this needs to be integrated into a general upVector system here within llAgent. - if ( camera_mode == CAMERA_MODE_FOLLOW && mFocusOnAvatar ) - { - mCameraUpVector = mFollowCam.getUpVector(); - } - //end Ventrella - - if (mSitCameraEnabled) - { - if (mSitCameraReferenceObject->isDead()) - { - setSitCamera(LLUUID::null); - } - } - - // Update UI with our camera inputs - LLFloaterCamera* camera_floater = LLFloaterReg::findTypedInstance<LLFloaterCamera>("camera"); - if (camera_floater) - { - camera_floater->mRotate->setToggleState( - mOrbitRightKey > 0.f, // left - mOrbitUpKey > 0.f, // top - mOrbitLeftKey > 0.f, // right - mOrbitDownKey > 0.f); // bottom - - camera_floater->mTrack->setToggleState( - mPanLeftKey > 0.f, // left - mPanUpKey > 0.f, // top - mPanRightKey > 0.f, // right - mPanDownKey > 0.f); // bottom - } - - // Handle camera movement based on keyboard. - const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second - const F32 ORBIT_AROUND_RATE = 90.f * DEG_TO_RAD; // radians per second - const F32 PAN_RATE = 5.f; // meters per second - - if( mOrbitUpKey || mOrbitDownKey ) - { - F32 input_rate = mOrbitUpKey - mOrbitDownKey; - cameraOrbitOver( input_rate * ORBIT_OVER_RATE / gFPSClamped ); - } - - if( mOrbitLeftKey || mOrbitRightKey) - { - F32 input_rate = mOrbitLeftKey - mOrbitRightKey; - cameraOrbitAround( input_rate * ORBIT_AROUND_RATE / gFPSClamped ); - } - - if( mOrbitInKey || mOrbitOutKey ) - { - F32 input_rate = mOrbitInKey - mOrbitOutKey; - - LLVector3d to_focus = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()) - calcFocusPositionTargetGlobal(); - F32 distance_to_focus = (F32)to_focus.magVec(); - // Move at distance (in meters) meters per second - cameraOrbitIn( input_rate * distance_to_focus / gFPSClamped ); - } - - if( mPanInKey || mPanOutKey ) - { - F32 input_rate = mPanInKey - mPanOutKey; - cameraPanIn( input_rate * PAN_RATE / gFPSClamped ); - } - - if( mPanRightKey || mPanLeftKey ) - { - F32 input_rate = mPanRightKey - mPanLeftKey; - cameraPanLeft( input_rate * -PAN_RATE / gFPSClamped ); - } - - if( mPanUpKey || mPanDownKey ) - { - F32 input_rate = mPanUpKey - mPanDownKey; - cameraPanUp( input_rate * PAN_RATE / gFPSClamped ); - } - - // Clear camera keyboard keys. - mOrbitLeftKey = 0.f; - mOrbitRightKey = 0.f; - mOrbitUpKey = 0.f; - mOrbitDownKey = 0.f; - mOrbitInKey = 0.f; - mOrbitOutKey = 0.f; - - mPanRightKey = 0.f; - mPanLeftKey = 0.f; - mPanUpKey = 0.f; - mPanDownKey = 0.f; - mPanInKey = 0.f; - mPanOutKey = 0.f; - - // lerp camera focus offset - mCameraFocusOffset = lerp(mCameraFocusOffset, mCameraFocusOffsetTarget, LLCriticalDamp::getInterpolant(CAMERA_FOCUS_HALF_LIFE)); - - //Ventrella - if ( mCameraMode == CAMERA_MODE_FOLLOW ) - { - if ( mAvatarObject.notNull() ) - { - //-------------------------------------------------------------------------------- - // this is where the avatar's position and rotation are given to followCam, and - // where it is updated. All three of its attributes are updated: (1) position, - // (2) focus, and (3) upvector. They can then be queried elsewhere in llAgent. - //-------------------------------------------------------------------------------- - // *TODO: use combined rotation of frameagent and sit object - LLQuaternion avatarRotationForFollowCam = mAvatarObject->isSitting() ? mAvatarObject->getRenderRotation() : mFrameAgent.getQuaternion(); - - LLFollowCamParams* current_cam = LLFollowCamMgr::getActiveFollowCamParams(); - if (current_cam) - { - mFollowCam.copyParams(*current_cam); - mFollowCam.setSubjectPositionAndRotation( mAvatarObject->getRenderPosition(), avatarRotationForFollowCam ); - mFollowCam.update(); - LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); - } - else - { - changeCameraToThirdPerson(TRUE); - } - } - } - // end Ventrella - - BOOL hit_limit; - LLVector3d camera_pos_global; - LLVector3d camera_target_global = calcCameraPositionTargetGlobal(&hit_limit); - mCameraVirtualPositionAgent = getPosAgentFromGlobal(camera_target_global); - LLVector3d focus_target_global = calcFocusPositionTargetGlobal(); - - // perform field of view correction - mCameraFOVZoomFactor = calcCameraFOVZoomFactor(); - camera_target_global = focus_target_global + (camera_target_global - focus_target_global) * (1.f + mCameraFOVZoomFactor); - - mShowAvatar = TRUE; // can see avatar by default - - // Adjust position for animation - if (mCameraAnimating) - { - F32 time = mAnimationTimer.getElapsedTimeF32(); - - // yet another instance of critically damped motion, hooray! - // F32 fraction_of_animation = 1.f - pow(2.f, -time / CAMERA_ZOOM_HALF_LIFE); - - // linear interpolation - F32 fraction_of_animation = time / mAnimationDuration; - - BOOL isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK; - BOOL wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK; - F32 fraction_animation_to_skip; - - if (mAnimationCameraStartGlobal == camera_target_global) - { - fraction_animation_to_skip = 0.f; - } - else - { - LLVector3d cam_delta = mAnimationCameraStartGlobal - camera_target_global; - fraction_animation_to_skip = HEAD_BUFFER_SIZE / (F32)cam_delta.magVec(); - } - F32 animation_start_fraction = (wasfirstPerson) ? fraction_animation_to_skip : 0.f; - F32 animation_finish_fraction = (isfirstPerson) ? (1.f - fraction_animation_to_skip) : 1.f; - - if (fraction_of_animation < animation_finish_fraction) - { - if (fraction_of_animation < animation_start_fraction || fraction_of_animation > animation_finish_fraction ) - { - mShowAvatar = FALSE; - } - - // ...adjust position for animation - F32 smooth_fraction_of_animation = llsmoothstep(0.0f, 1.0f, fraction_of_animation); - camera_pos_global = lerp(mAnimationCameraStartGlobal, camera_target_global, smooth_fraction_of_animation); - mFocusGlobal = lerp(mAnimationFocusStartGlobal, focus_target_global, smooth_fraction_of_animation); - } - else - { - // ...animation complete - mCameraAnimating = FALSE; - - camera_pos_global = camera_target_global; - mFocusGlobal = focus_target_global; - - endAnimationUpdateUI(); - mShowAvatar = TRUE; - } - - if (getAvatarObject() && mCameraMode != CAMERA_MODE_MOUSELOOK) - { - getAvatarObject()->updateAttachmentVisibility(mCameraMode); - } - } - else - { - camera_pos_global = camera_target_global; - mFocusGlobal = focus_target_global; - mShowAvatar = TRUE; - } - - // smoothing - if (TRUE) - { - LLVector3d agent_pos = getPositionGlobal(); - LLVector3d camera_pos_agent = camera_pos_global - agent_pos; - // Sitting on what you're manipulating can cause camera jitter with smoothing. - // This turns off smoothing while editing. -MG - mCameraSmoothingStop |= (BOOL)LLToolMgr::getInstance()->inBuildMode(); - - if (cameraThirdPerson() && !mCameraSmoothingStop) - { - const F32 SMOOTHING_HALF_LIFE = 0.02f; - - F32 smoothing = LLCriticalDamp::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE); - - if (!mFocusObject) // we differentiate on avatar mode - { - // for avatar-relative focus, we smooth in avatar space - - // the avatar moves too jerkily w/r/t global space to smooth there. - - LLVector3d delta = camera_pos_agent - mCameraSmoothingLastPositionAgent; - if (delta.magVec() < MAX_CAMERA_SMOOTH_DISTANCE) // only smooth over short distances please - { - camera_pos_agent = lerp(mCameraSmoothingLastPositionAgent, camera_pos_agent, smoothing); - camera_pos_global = camera_pos_agent + agent_pos; - } - } - else - { - LLVector3d delta = camera_pos_global - mCameraSmoothingLastPositionGlobal; - if (delta.magVec() < MAX_CAMERA_SMOOTH_DISTANCE) // only smooth over short distances please - { - camera_pos_global = lerp(mCameraSmoothingLastPositionGlobal, camera_pos_global, smoothing); - } - } - } - - mCameraSmoothingLastPositionGlobal = camera_pos_global; - mCameraSmoothingLastPositionAgent = camera_pos_agent; - mCameraSmoothingStop = FALSE; - } - - - mCameraCurrentFOVZoomFactor = lerp(mCameraCurrentFOVZoomFactor, mCameraFOVZoomFactor, LLCriticalDamp::getInterpolant(FOV_ZOOM_HALF_LIFE)); - -// llinfos << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << llendl; - - F32 ui_offset = 0.f; - if( CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode ) - { - ui_offset = calcCustomizeAvatarUIOffset( camera_pos_global ); - } - - - LLVector3 focus_agent = getPosAgentFromGlobal(mFocusGlobal); - - mCameraPositionAgent = getPosAgentFromGlobal(camera_pos_global); - - // Move the camera - - //Ventrella - LLViewerCamera::getInstance()->updateCameraLocation(mCameraPositionAgent, mCameraUpVector, focus_agent); - //LLViewerCamera::getInstance()->updateCameraLocation(mCameraPositionAgent, camera_skyward, focus_agent); - //end Ventrella - - //RN: translate UI offset after camera is oriented properly - LLViewerCamera::getInstance()->translate(LLViewerCamera::getInstance()->getLeftAxis() * ui_offset); - - // Change FOV - LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / (1.f + mCameraCurrentFOVZoomFactor)); - - // follow camera when in customize mode - if (cameraCustomizeAvatar()) - { - setLookAt(LOOKAT_TARGET_FOCUS, NULL, mCameraPositionAgent); - } - - // update the travel distance stat - // this isn't directly related to the camera - // but this seemed like the best place to do this - LLVector3d global_pos = getPositionGlobal(); - if (! mLastPositionGlobal.isExactlyZero()) - { - LLVector3d delta = global_pos - mLastPositionGlobal; - mDistanceTraveled += delta.magVec(); - } - mLastPositionGlobal = global_pos; - - if (LLVOAvatar::sVisibleInFirstPerson && mAvatarObject.notNull() && !mAvatarObject->isSitting() && cameraMouselook()) - { - LLVector3 head_pos = mAvatarObject->mHeadp->getWorldPosition() + - LLVector3(0.08f, 0.f, 0.05f) * mAvatarObject->mHeadp->getWorldRotation() + - LLVector3(0.1f, 0.f, 0.f) * mAvatarObject->mPelvisp->getWorldRotation(); - LLVector3 diff = mCameraPositionAgent - head_pos; - diff = diff * ~mAvatarObject->mRoot.getWorldRotation(); - - LLJoint* torso_joint = mAvatarObject->mTorsop; - LLJoint* chest_joint = mAvatarObject->mChestp; - LLVector3 torso_scale = torso_joint->getScale(); - LLVector3 chest_scale = chest_joint->getScale(); - - // shorten avatar skeleton to avoid foot interpenetration - if (!mAvatarObject->mInAir) - { - LLVector3 chest_offset = LLVector3(0.f, 0.f, chest_joint->getPosition().mV[VZ]) * torso_joint->getWorldRotation(); - F32 z_compensate = llclamp(-diff.mV[VZ], -0.2f, 1.f); - F32 scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / chest_offset.mV[VZ]), 0.5f, 1.2f); - torso_joint->setScale(LLVector3(1.f, 1.f, scale_factor)); - - LLJoint* neck_joint = mAvatarObject->mNeckp; - LLVector3 neck_offset = LLVector3(0.f, 0.f, neck_joint->getPosition().mV[VZ]) * chest_joint->getWorldRotation(); - scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / neck_offset.mV[VZ]), 0.5f, 1.2f); - chest_joint->setScale(LLVector3(1.f, 1.f, scale_factor)); - diff.mV[VZ] = 0.f; - } - - mAvatarObject->mPelvisp->setPosition(mAvatarObject->mPelvisp->getPosition() + diff); - - mAvatarObject->mRoot.updateWorldMatrixChildren(); - - for (LLVOAvatar::attachment_map_t::iterator iter = mAvatarObject->mAttachmentPoints.begin(); - iter != mAvatarObject->mAttachmentPoints.end(); ) - { - LLVOAvatar::attachment_map_t::iterator curiter = iter++; - LLViewerJointAttachment* attachment = curiter->second; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - LLViewerObject *attached_object = (*attachment_iter); - if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull()) - { - // clear any existing "early" movements of attachment - attached_object->mDrawable->clearState(LLDrawable::EARLY_MOVE); - gPipeline.updateMoveNormalAsync(attached_object->mDrawable); - attached_object->updateText(); - } - } - } - - torso_joint->setScale(torso_scale); - chest_joint->setScale(chest_scale); - } -} - -void LLAgent::updateFocusOffset() -{ - validateFocusObject(); - if (mFocusObject.notNull()) - { - LLVector3d obj_pos = getPosGlobalFromAgent(mFocusObject->getRenderPosition()); - mFocusObjectOffset.setVec(mFocusTargetGlobal - obj_pos); - } -} - -void LLAgent::validateFocusObject() -{ - if (mFocusObject.notNull() && - (mFocusObject->isDead())) - { - mFocusObjectOffset.clearVec(); - clearFocusObject(); - mCameraFOVZoomFactor = 0.f; - } -} - -//----------------------------------------------------------------------------- -// calcCustomizeAvatarUIOffset() -//----------------------------------------------------------------------------- -F32 LLAgent::calcCustomizeAvatarUIOffset( const LLVector3d& camera_pos_global ) -{ - F32 ui_offset = 0.f; - - if( gFloaterCustomize ) - { - const LLRect& rect = gFloaterCustomize->getRect(); - - // Move the camera so that the avatar isn't covered up by this floater. - F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); - F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians - F32 offset = tan(apparent_angle); - - if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) - { - // Move the avatar to the right (camera to the left) - ui_offset = offset; - } - else - { - // Move the avatar to the left (camera to the right) - ui_offset = -offset; - } - } - F32 range = (F32)dist_vec(camera_pos_global, gAgent.getFocusGlobal()); - mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); - return mUIOffset * range; -} - -//----------------------------------------------------------------------------- -// calcFocusPositionTargetGlobal() -//----------------------------------------------------------------------------- -LLVector3d LLAgent::calcFocusPositionTargetGlobal() -{ - if (mFocusObject.notNull() && mFocusObject->isDead()) - { - clearFocusObject(); - } - - // Ventrella - if ( mCameraMode == CAMERA_MODE_FOLLOW && mFocusOnAvatar ) - { - mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(mFollowCam.getSimulatedFocus()); - return mFocusTargetGlobal; - }// End Ventrella - else if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - LLVector3d at_axis(1.0, 0.0, 0.0); - LLQuaternion agent_rot = mFrameAgent.getQuaternion(); - if (mAvatarObject.notNull() && mAvatarObject->getParent()) - { - LLViewerObject* root_object = (LLViewerObject*)mAvatarObject->getRoot(); - if (!root_object->flagCameraDecoupled()) - { - agent_rot *= ((LLViewerObject*)(mAvatarObject->getParent()))->getRenderRotation(); - } - } - at_axis = at_axis * agent_rot; - mFocusTargetGlobal = calcCameraPositionTargetGlobal() + at_axis; - return mFocusTargetGlobal; - } - else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) - { - return mFocusTargetGlobal; - } - else if (!mFocusOnAvatar) - { - if (mFocusObject.notNull() && !mFocusObject->isDead() && mFocusObject->mDrawable.notNull()) - { - LLDrawable* drawablep = mFocusObject->mDrawable; - - if (mTrackFocusObject && - drawablep && - drawablep->isActive()) - { - if (!mFocusObject->isAvatar()) - { - if (mFocusObject->isSelected()) - { - gPipeline.updateMoveNormalAsync(drawablep); - } - else - { - if (drawablep->isState(LLDrawable::MOVE_UNDAMPED)) - { - gPipeline.updateMoveNormalAsync(drawablep); - } - else - { - gPipeline.updateMoveDampedAsync(drawablep); - } - } - } - } - // if not tracking object, update offset based on new object position - else - { - updateFocusOffset(); - } - LLVector3 focus_agent = mFocusObject->getRenderPosition() + mFocusObjectOffset; - mFocusTargetGlobal.setVec(getPosGlobalFromAgent(focus_agent)); - } - return mFocusTargetGlobal; - } - else if (mSitCameraEnabled && mAvatarObject.notNull() && mAvatarObject->isSitting() && mSitCameraReferenceObject.notNull()) - { - // sit camera - LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition(); - LLQuaternion object_rot = mSitCameraReferenceObject->getRenderRotation(); - - LLVector3 target_pos = object_pos + (mSitCameraFocus * object_rot); - return getPosGlobalFromAgent(target_pos); - } - else - { - return getPositionGlobal() + calcThirdPersonFocusOffset(); - } -} - -LLVector3d LLAgent::calcThirdPersonFocusOffset() -{ - // ...offset from avatar - LLVector3d focus_offset; - - LLQuaternion agent_rot = mFrameAgent.getQuaternion(); - if (!mAvatarObject.isNull() && mAvatarObject->getParent()) - { - agent_rot *= ((LLViewerObject*)(mAvatarObject->getParent()))->getRenderRotation(); - } - - focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot; - return focus_offset; -} - -void LLAgent::setupSitCamera() -{ - // agent frame entering this function is in world coordinates - if (mAvatarObject.notNull() && mAvatarObject->getParent()) - { - LLQuaternion parent_rot = ((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation(); - // slam agent coordinate frame to proper parent local version - LLVector3 at_axis = mFrameAgent.getAtAxis(); - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis * ~parent_rot); - } -} - -//----------------------------------------------------------------------------- -// getCameraPositionAgent() -//----------------------------------------------------------------------------- -const LLVector3 &LLAgent::getCameraPositionAgent() const -{ - return LLViewerCamera::getInstance()->getOrigin(); -} - -//----------------------------------------------------------------------------- -// getCameraPositionGlobal() -//----------------------------------------------------------------------------- -LLVector3d LLAgent::getCameraPositionGlobal() const -{ - return getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()); -} - -//----------------------------------------------------------------------------- -// calcCameraFOVZoomFactor() -//----------------------------------------------------------------------------- -F32 LLAgent::calcCameraFOVZoomFactor() -{ - LLVector3 camera_offset_dir; - camera_offset_dir.setVec(mCameraFocusOffset); - - if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - return 0.f; - } - else if (mFocusObject.notNull() && !mFocusObject->isAvatar() && !mFocusOnAvatar) - { - // don't FOV zoom on mostly transparent objects - LLVector3 focus_offset = mFocusObjectOffset; - F32 obj_min_dist = 0.f; - calcCameraMinDistance(obj_min_dist); - F32 current_distance = llmax(0.001f, camera_offset_dir.magVec()); - - mFocusObjectDist = obj_min_dist - current_distance; - - F32 new_fov_zoom = llclamp(mFocusObjectDist / current_distance, 0.f, 1000.f); - return new_fov_zoom; - } - else // focusing on land or avatar - { - // keep old field of view until user changes focus explicitly - return mCameraFOVZoomFactor; - //return 0.f; - } -} - -//----------------------------------------------------------------------------- -// calcCameraPositionTargetGlobal() -//----------------------------------------------------------------------------- -LLVector3d LLAgent::calcCameraPositionTargetGlobal(BOOL *hit_limit) -{ - // Compute base camera position and look-at points. - F32 camera_land_height; - LLVector3d frame_center_global = mAvatarObject.isNull() ? getPositionGlobal() - : getPosGlobalFromAgent(mAvatarObject->mRoot.getWorldPosition()); - - BOOL isConstrained = FALSE; - LLVector3d head_offset; - head_offset.setVec(mThirdPersonHeadOffset); - - LLVector3d camera_position_global; - - // Ventrella - if ( mCameraMode == CAMERA_MODE_FOLLOW && mFocusOnAvatar ) - { - camera_position_global = gAgent.getPosGlobalFromAgent(mFollowCam.getSimulatedPosition()); - }// End Ventrella - else if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - if (mAvatarObject.isNull() || mAvatarObject->mDrawable.isNull()) - { - llwarns << "Null avatar drawable!" << llendl; - return LLVector3d::zero; - } - head_offset.clearVec(); - if (mAvatarObject->isSitting() && mAvatarObject->getParent()) - { - mAvatarObject->updateHeadOffset(); - head_offset.mdV[VX] = mAvatarObject->mHeadOffset.mV[VX]; - head_offset.mdV[VY] = mAvatarObject->mHeadOffset.mV[VY]; - head_offset.mdV[VZ] = mAvatarObject->mHeadOffset.mV[VZ] + 0.1f; - const LLMatrix4& mat = ((LLViewerObject*) mAvatarObject->getParent())->getRenderMatrix(); - camera_position_global = getPosGlobalFromAgent - ((mAvatarObject->getPosition()+ - LLVector3(head_offset)*mAvatarObject->getRotation()) * mat); - } - else - { - head_offset.mdV[VZ] = mAvatarObject->mHeadOffset.mV[VZ]; - if (mAvatarObject->isSitting()) - { - head_offset.mdV[VZ] += 0.1; - } - camera_position_global = getPosGlobalFromAgent(mAvatarObject->getRenderPosition());//frame_center_global; - head_offset = head_offset * mAvatarObject->getRenderRotation(); - camera_position_global = camera_position_global + head_offset; - } - } - else if (mCameraMode == CAMERA_MODE_THIRD_PERSON && mFocusOnAvatar) - { - LLVector3 local_camera_offset; - F32 camera_distance = 0.f; - - if (mSitCameraEnabled - && mAvatarObject.notNull() - && mAvatarObject->isSitting() - && mSitCameraReferenceObject.notNull()) - { - // sit camera - LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition(); - LLQuaternion object_rot = mSitCameraReferenceObject->getRenderRotation(); - - LLVector3 target_pos = object_pos + (mSitCameraPos * object_rot); - - camera_position_global = getPosGlobalFromAgent(target_pos); - } - else - { - local_camera_offset = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale"); - - // are we sitting down? - if (mAvatarObject.notNull() && mAvatarObject->getParent()) - { - LLQuaternion parent_rot = ((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation(); - // slam agent coordinate frame to proper parent local version - LLVector3 at_axis = mFrameAgent.getAtAxis() * parent_rot; - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis * ~parent_rot); - - local_camera_offset = local_camera_offset * mFrameAgent.getQuaternion() * parent_rot; - } - else - { - local_camera_offset = mFrameAgent.rotateToAbsolute( local_camera_offset ); - } - - if (!mCameraCollidePlane.isExactlyZero() && (mAvatarObject.isNull() || !mAvatarObject->isSitting())) - { - LLVector3 plane_normal; - plane_normal.setVec(mCameraCollidePlane.mV); - - F32 offset_dot_norm = local_camera_offset * plane_normal; - if (llabs(offset_dot_norm) < 0.001f) - { - offset_dot_norm = 0.001f; - } - - camera_distance = local_camera_offset.normalize(); - - F32 pos_dot_norm = getPosAgentFromGlobal(frame_center_global + head_offset) * plane_normal; - - // if agent is outside the colliding half-plane - if (pos_dot_norm > mCameraCollidePlane.mV[VW]) - { - // check to see if camera is on the opposite side (inside) the half-plane - if (offset_dot_norm + pos_dot_norm < mCameraCollidePlane.mV[VW]) - { - // diminish offset by factor to push it back outside the half-plane - camera_distance *= (pos_dot_norm - mCameraCollidePlane.mV[VW] - CAMERA_COLLIDE_EPSILON) / -offset_dot_norm; - } - } - else - { - if (offset_dot_norm + pos_dot_norm > mCameraCollidePlane.mV[VW]) - { - camera_distance *= (mCameraCollidePlane.mV[VW] - pos_dot_norm - CAMERA_COLLIDE_EPSILON) / offset_dot_norm; - } - } - } - else - { - camera_distance = local_camera_offset.normalize(); - } - - mTargetCameraDistance = llmax(camera_distance, MIN_CAMERA_DISTANCE); - - if (mTargetCameraDistance != mCurrentCameraDistance) - { - F32 camera_lerp_amt = LLCriticalDamp::getInterpolant(CAMERA_ZOOM_HALF_LIFE); - - mCurrentCameraDistance = lerp(mCurrentCameraDistance, mTargetCameraDistance, camera_lerp_amt); - } - - // Make the camera distance current - local_camera_offset *= mCurrentCameraDistance; - - // set the global camera position - LLVector3d camera_offset; - - LLVector3 av_pos = mAvatarObject.isNull() ? LLVector3::zero : mAvatarObject->getRenderPosition(); - camera_offset.setVec( local_camera_offset ); - camera_position_global = frame_center_global + head_offset + camera_offset; - - if (mAvatarObject.notNull()) - { - LLVector3d camera_lag_d; - F32 lag_interp = LLCriticalDamp::getInterpolant(CAMERA_LAG_HALF_LIFE); - LLVector3 target_lag; - LLVector3 vel = getVelocity(); - - // lag by appropriate amount for flying - F32 time_in_air = mAvatarObject->mTimeInAir.getElapsedTimeF32(); - if(!mCameraAnimating && mAvatarObject->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME) - { - LLVector3 frame_at_axis = mFrameAgent.getAtAxis(); - frame_at_axis -= projected_vec(frame_at_axis, getReferenceUpVector()); - frame_at_axis.normalize(); - - //transition smoothly in air mode, to avoid camera pop - F32 u = (time_in_air - GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME) / GROUND_TO_AIR_CAMERA_TRANSITION_TIME; - u = llclamp(u, 0.f, 1.f); - - lag_interp *= u; - - if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == mAvatarObject->getID()) - { - // disable camera lag when using mouse-directed steering - target_lag.clearVec(); - } - else - { - target_lag = vel * gSavedSettings.getF32("DynamicCameraStrength") / 30.f; - } - - mCameraLag = lerp(mCameraLag, target_lag, lag_interp); - - F32 lag_dist = mCameraLag.magVec(); - if (lag_dist > MAX_CAMERA_LAG) - { - mCameraLag = mCameraLag * MAX_CAMERA_LAG / lag_dist; - } - - // clamp camera lag so that avatar is always in front - F32 dot = (mCameraLag - (frame_at_axis * (MIN_CAMERA_LAG * u))) * frame_at_axis; - if (dot < -(MIN_CAMERA_LAG * u)) - { - mCameraLag -= (dot + (MIN_CAMERA_LAG * u)) * frame_at_axis; - } - } - else - { - mCameraLag = lerp(mCameraLag, LLVector3::zero, LLCriticalDamp::getInterpolant(0.15f)); - } - - camera_lag_d.setVec(mCameraLag); - camera_position_global = camera_position_global - camera_lag_d; - } - } - } - else - { - LLVector3d focusPosGlobal = calcFocusPositionTargetGlobal(); - // camera gets pushed out later wrt mCameraFOVZoomFactor...this is "raw" value - camera_position_global = focusPosGlobal + mCameraFocusOffset; - } - - if (!gSavedSettings.getBOOL("DisableCameraConstraints") && !gAgent.isGodlike()) - { - LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal( - camera_position_global); - bool constrain = true; - if(regionp && regionp->canManageEstate()) - { - constrain = false; - } - if(constrain) - { - F32 max_dist = ( CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode ) ? - APPEARANCE_MAX_ZOOM : mDrawDistance; - - LLVector3d camera_offset = camera_position_global - - gAgent.getPositionGlobal(); - F32 camera_distance = (F32)camera_offset.magVec(); - - if(camera_distance > max_dist) - { - camera_position_global = gAgent.getPositionGlobal() + - (max_dist / camera_distance) * camera_offset; - isConstrained = TRUE; - } - } - -// JC - Could constrain camera based on parcel stuff here. -// LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global); -// -// if (regionp && !regionp->mParcelOverlay->isBuildCameraAllowed(regionp->getPosRegionFromGlobal(camera_position_global))) -// { -// camera_position_global = last_position_global; -// -// isConstrained = TRUE; -// } - } - - // Don't let camera go underground - F32 camera_min_off_ground = getCameraMinOffGround(); - - camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); - - if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground) - { - camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground; - isConstrained = TRUE; - } - - - if (hit_limit) - { - *hit_limit = isConstrained; - } - - return camera_position_global; -} - - -LLVector3 LLAgent::getCameraOffsetInitial() -{ - return mCameraOffsetInitial[mCameraPreset]; -} - - -//----------------------------------------------------------------------------- -// handleScrollWheel() -//----------------------------------------------------------------------------- -void LLAgent::handleScrollWheel(S32 clicks) -{ - if ( mCameraMode == CAMERA_MODE_FOLLOW && gAgent.getFocusOnAvatar()) - { - if ( ! mFollowCam.getPositionLocked() ) // not if the followCam position is locked in place - { - mFollowCam.zoom( clicks ); - if ( mFollowCam.isZoomedToMinimumDistance() ) - { - changeCameraToMouselook(FALSE); - } - } - } - else - { - LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - const F32 ROOT_ROOT_TWO = sqrt(F_SQRT2); - - // Block if camera is animating - if (mCameraAnimating) - { - return; - } - - if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) - { - F32 zoom_factor = (F32)pow(0.8, -clicks); - cameraZoomIn(zoom_factor); - } - else if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON) - { - F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec(); - - F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale")); - current_zoom_fraction *= 1.f - pow(ROOT_ROOT_TWO, clicks); - - cameraOrbitIn(current_zoom_fraction * camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale")); - } - else - { - F32 current_zoom_fraction = (F32)mCameraFocusOffsetTarget.magVec(); - cameraOrbitIn(current_zoom_fraction * (1.f - pow(ROOT_ROOT_TWO, clicks))); - } - } -} - - -//----------------------------------------------------------------------------- -// getCameraMinOffGround() -//----------------------------------------------------------------------------- -F32 LLAgent::getCameraMinOffGround() -{ - if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - return 0.f; - } - else - { - if (gSavedSettings.getBOOL("DisableCameraConstraints")) - { - return -1000.f; - } - else - { - return 0.5f; - } - } -} - - -//----------------------------------------------------------------------------- -// resetCamera() -//----------------------------------------------------------------------------- -void LLAgent::resetCamera() -{ - // Remove any pitch from the avatar - LLVector3 at = mFrameAgent.getAtAxis(); - at.mV[VZ] = 0.f; - at.normalize(); - gAgent.resetAxes(at); - // have to explicitly clear field of view zoom now - mCameraFOVZoomFactor = 0.f; - - updateCamera(); -} - -//----------------------------------------------------------------------------- -// changeCameraToMouselook() -//----------------------------------------------------------------------------- -void LLAgent::changeCameraToMouselook(BOOL animate) -{ - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - return; - } - - // visibility changes at end of animation - gViewerWindow->getWindow()->resetBusyCount(); - - // unpause avatar animation - mPauseRequest = NULL; - - LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); - - if (mAvatarObject.notNull()) - { - mAvatarObject->stopMotion( ANIM_AGENT_BODY_NOISE ); - mAvatarObject->stopMotion( ANIM_AGENT_BREATHE_ROT ); - } - - //gViewerWindow->stopGrab(); - LLSelectMgr::getInstance()->deselectAll(); - gViewerWindow->hideCursor(); - gViewerWindow->moveCursorToCenter(); - - if( mCameraMode != CAMERA_MODE_MOUSELOOK ) - { - gFocusMgr.setKeyboardFocus( NULL ); - - mLastCameraMode = mCameraMode; - mCameraMode = CAMERA_MODE_MOUSELOOK; - U32 old_flags = mControlFlags; - setControlFlags(AGENT_CONTROL_MOUSELOOK); - if (old_flags != mControlFlags) - { - mbFlagsDirty = TRUE; - } - - if (animate) - { - startCameraAnimation(); - } - else - { - mCameraAnimating = FALSE; - endAnimationUpdateUI(); - } - } -} - - -//----------------------------------------------------------------------------- -// changeCameraToDefault() -//----------------------------------------------------------------------------- -void LLAgent::changeCameraToDefault() -{ - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - return; - } - - if (LLFollowCamMgr::getActiveFollowCamParams()) - { - changeCameraToFollow(); - } - else - { - changeCameraToThirdPerson(); - } -} - - -// Ventrella -//----------------------------------------------------------------------------- -// changeCameraToFollow() -//----------------------------------------------------------------------------- -void LLAgent::changeCameraToFollow(BOOL animate) -{ - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - return; - } - - if( mCameraMode != CAMERA_MODE_FOLLOW ) - { - if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - animate = FALSE; - } - startCameraAnimation(); - - mLastCameraMode = mCameraMode; - mCameraMode = CAMERA_MODE_FOLLOW; - - // bang-in the current focus, position, and up vector of the follow cam - mFollowCam.reset( mCameraPositionAgent, LLViewerCamera::getInstance()->getPointOfInterest(), LLVector3::z_axis ); - - if (gBasicToolset) - { - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - } - - if (mAvatarObject.notNull()) - { - mAvatarObject->mPelvisp->setPosition(LLVector3::zero); - mAvatarObject->startMotion( ANIM_AGENT_BODY_NOISE ); - mAvatarObject->startMotion( ANIM_AGENT_BREATHE_ROT ); - } - - // unpause avatar animation - mPauseRequest = NULL; - - U32 old_flags = mControlFlags; - clearControlFlags(AGENT_CONTROL_MOUSELOOK); - if (old_flags != mControlFlags) - { - mbFlagsDirty = TRUE; - } - - if (animate) - { - startCameraAnimation(); - } - else - { - mCameraAnimating = FALSE; - endAnimationUpdateUI(); - } - } -} - -//----------------------------------------------------------------------------- -// changeCameraToThirdPerson() -//----------------------------------------------------------------------------- -void LLAgent::changeCameraToThirdPerson(BOOL animate) -{ - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - return; - } - - gViewerWindow->getWindow()->resetBusyCount(); - - mCameraZoomFraction = INITIAL_ZOOM_FRACTION; - - if (mAvatarObject.notNull()) - { - if (!mAvatarObject->isSitting()) - { - mAvatarObject->mPelvisp->setPosition(LLVector3::zero); - } - mAvatarObject->startMotion( ANIM_AGENT_BODY_NOISE ); - mAvatarObject->startMotion( ANIM_AGENT_BREATHE_ROT ); - } - - LLVector3 at_axis; - - // unpause avatar animation - mPauseRequest = NULL; - - if( mCameraMode != CAMERA_MODE_THIRD_PERSON ) - { - if (gBasicToolset) - { - LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); - } - - mCameraLag.clearVec(); - if (mCameraMode == CAMERA_MODE_MOUSELOOK) - { - mCurrentCameraDistance = MIN_CAMERA_DISTANCE; - mTargetCameraDistance = MIN_CAMERA_DISTANCE; - animate = FALSE; - } - mLastCameraMode = mCameraMode; - mCameraMode = CAMERA_MODE_THIRD_PERSON; - U32 old_flags = mControlFlags; - clearControlFlags(AGENT_CONTROL_MOUSELOOK); - if (old_flags != mControlFlags) - { - mbFlagsDirty = TRUE; - } - - } - - // Remove any pitch from the avatar - if (mAvatarObject.notNull() && mAvatarObject->getParent()) - { - LLQuaternion obj_rot = ((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation(); - at_axis = LLViewerCamera::getInstance()->getAtAxis(); - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis * ~obj_rot); - } - else - { - at_axis = mFrameAgent.getAtAxis(); - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis); - } - - - if (animate) - { - startCameraAnimation(); - } - else - { - mCameraAnimating = FALSE; - endAnimationUpdateUI(); - } -} - -//----------------------------------------------------------------------------- -// changeCameraToCustomizeAvatar() -//----------------------------------------------------------------------------- -void LLAgent::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate) -{ - if (LLViewerJoystick::getInstance()->getOverrideCamera()) - { - return; - } - - standUp(); // force stand up - gViewerWindow->getWindow()->resetBusyCount(); - - if (gFaceEditToolset) - { - LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); - } - - if (camera_animate) - { - startCameraAnimation(); - } - - // Remove any pitch from the avatar - //LLVector3 at = mFrameAgent.getAtAxis(); - //at.mV[VZ] = 0.f; - //at.normalize(); - //gAgent.resetAxes(at); - - if( mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR ) - { - mLastCameraMode = mCameraMode; - mCameraMode = CAMERA_MODE_CUSTOMIZE_AVATAR; - U32 old_flags = mControlFlags; - clearControlFlags(AGENT_CONTROL_MOUSELOOK); - if (old_flags != mControlFlags) - { - mbFlagsDirty = TRUE; - } - - gFocusMgr.setKeyboardFocus( NULL ); - gFocusMgr.setMouseCapture( NULL ); - - LLVOAvatarSelf::onCustomizeStart(); - } - - if (mAvatarObject.notNull()) - { - if(avatar_animate) - { - // Remove any pitch from the avatar - LLVector3 at = mFrameAgent.getAtAxis(); - at.mV[VZ] = 0.f; - at.normalize(); - gAgent.resetAxes(at); - - sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); - mCustomAnim = TRUE ; - mAvatarObject->startMotion(ANIM_AGENT_CUSTOMIZE); - LLMotion* turn_motion = mAvatarObject->findMotion(ANIM_AGENT_CUSTOMIZE); - - if (turn_motion) - { - mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP; - - } - else - { - mAnimationDuration = gSavedSettings.getF32("ZoomTime"); - } - } - - - - gAgent.setFocusGlobal(LLVector3d::zero); - } - else - { - mCameraAnimating = FALSE; - endAnimationUpdateUI(); - } - -} - - -void LLAgent::switchCameraPreset(ECameraPreset preset) -{ - //zoom is supposed to be reset for the front and group views - mCameraZoomFraction = 1.f; - - //focusing on avatar in that case means following him on movements - mFocusOnAvatar = TRUE; - - mCameraPreset = preset; - - gSavedSettings.setU32("CameraPreset", mCameraPreset); -} - - -// -// Focus point management -// - -//----------------------------------------------------------------------------- -// startCameraAnimation() -//----------------------------------------------------------------------------- -void LLAgent::startCameraAnimation() -{ - mAnimationCameraStartGlobal = getCameraPositionGlobal(); - mAnimationFocusStartGlobal = mFocusGlobal; - mAnimationTimer.reset(); - mCameraAnimating = TRUE; - mAnimationDuration = gSavedSettings.getF32("ZoomTime"); -} - -//----------------------------------------------------------------------------- -// stopCameraAnimation() -//----------------------------------------------------------------------------- -void LLAgent::stopCameraAnimation() -{ - mCameraAnimating = FALSE; -} - -void LLAgent::clearFocusObject() -{ - if (mFocusObject.notNull()) - { - startCameraAnimation(); - - setFocusObject(NULL); - mFocusObjectOffset.clearVec(); - } -} - -void LLAgent::setFocusObject(LLViewerObject* object) -{ - mFocusObject = object; -} - -// Focus on a point, but try to keep camera position stable. -//----------------------------------------------------------------------------- -// setFocusGlobal() -//----------------------------------------------------------------------------- -void LLAgent::setFocusGlobal(const LLPickInfo& pick) -{ - LLViewerObject* objectp = gObjectList.findObject(pick.mObjectID); - - if (objectp) - { - // focus on object plus designated offset - // which may or may not be same as pick.mPosGlobal - setFocusGlobal(objectp->getPositionGlobal() + LLVector3d(pick.mObjectOffset), pick.mObjectID); - } - else - { - // focus directly on point where user clicked - setFocusGlobal(pick.mPosGlobal, pick.mObjectID); - } -} - - -void LLAgent::setFocusGlobal(const LLVector3d& focus, const LLUUID &object_id) -{ - setFocusObject(gObjectList.findObject(object_id)); - LLVector3d old_focus = mFocusTargetGlobal; - LLViewerObject *focus_obj = mFocusObject; - - // if focus has changed - if (old_focus != focus) - { - if (focus.isExactlyZero()) - { - if (mAvatarObject.notNull()) - { - mFocusTargetGlobal = getPosGlobalFromAgent(mAvatarObject->mHeadp->getWorldPosition()); - } - else - { - mFocusTargetGlobal = getPositionGlobal(); - } - mCameraFocusOffsetTarget = getCameraPositionGlobal() - mFocusTargetGlobal; - mCameraFocusOffset = mCameraFocusOffsetTarget; - setLookAt(LOOKAT_TARGET_CLEAR); - } - else - { - mFocusTargetGlobal = focus; - if (!focus_obj) - { - mCameraFOVZoomFactor = 0.f; - } - - mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(mCameraVirtualPositionAgent) - mFocusTargetGlobal; - - startCameraAnimation(); - - if (focus_obj) - { - if (focus_obj->isAvatar()) - { - setLookAt(LOOKAT_TARGET_FOCUS, focus_obj); - } - else - { - setLookAt(LOOKAT_TARGET_FOCUS, focus_obj, (getPosAgentFromGlobal(focus) - focus_obj->getRenderPosition()) * ~focus_obj->getRenderRotation()); - } - } - else - { - setLookAt(LOOKAT_TARGET_FOCUS, NULL, getPosAgentFromGlobal(mFocusTargetGlobal)); - } - } - } - else // focus == mFocusTargetGlobal - { - if (focus.isExactlyZero()) - { - if (mAvatarObject.notNull()) - { - mFocusTargetGlobal = getPosGlobalFromAgent(mAvatarObject->mHeadp->getWorldPosition()); - } - else - { - mFocusTargetGlobal = getPositionGlobal(); - } - } - mCameraFocusOffsetTarget = (getCameraPositionGlobal() - mFocusTargetGlobal) / (1.f + mCameraFOVZoomFactor);; - mCameraFocusOffset = mCameraFocusOffsetTarget; - } - - if (mFocusObject.notNull()) - { - // for attachments, make offset relative to avatar, not the attachment - if (mFocusObject->isAttachment()) - { - while (mFocusObject.notNull() // DEV-29123 - can crash with a messed-up attachment - && !mFocusObject->isAvatar()) - { - mFocusObject = (LLViewerObject*) mFocusObject->getParent(); - } - setFocusObject((LLViewerObject*)mFocusObject); - } - updateFocusOffset(); - } -} - -// Used for avatar customization -//----------------------------------------------------------------------------- -// setCameraPosAndFocusGlobal() -//----------------------------------------------------------------------------- -void LLAgent::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, const LLVector3d& focus, const LLUUID &object_id) -{ - LLVector3d old_focus = mFocusTargetGlobal; - - F64 focus_delta_squared = (old_focus - focus).magVecSquared(); - const F64 ANIM_EPSILON_SQUARED = 0.0001; - if( focus_delta_squared > ANIM_EPSILON_SQUARED ) - { - startCameraAnimation(); - - if( CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode ) - { - // Compensate for the fact that the camera has already been offset to make room for LLFloaterCustomize. - mAnimationCameraStartGlobal -= LLVector3d(LLViewerCamera::getInstance()->getLeftAxis() * calcCustomizeAvatarUIOffset( mAnimationCameraStartGlobal )); - } - } - - //LLViewerCamera::getInstance()->setOrigin( gAgent.getPosAgentFromGlobal( camera_pos ) ); - setFocusObject(gObjectList.findObject(object_id)); - mFocusTargetGlobal = focus; - mCameraFocusOffsetTarget = camera_pos - focus; - mCameraFocusOffset = mCameraFocusOffsetTarget; - - if (mFocusObject) - { - if (mFocusObject->isAvatar()) - { - setLookAt(LOOKAT_TARGET_FOCUS, mFocusObject); - } - else - { - setLookAt(LOOKAT_TARGET_FOCUS, mFocusObject, (getPosAgentFromGlobal(focus) - mFocusObject->getRenderPosition()) * ~mFocusObject->getRenderRotation()); - } - } - else - { - setLookAt(LOOKAT_TARGET_FOCUS, NULL, getPosAgentFromGlobal(mFocusTargetGlobal)); - } - - if( mCameraAnimating ) - { - const F64 ANIM_METERS_PER_SECOND = 10.0; - const F64 MIN_ANIM_SECONDS = 0.5; - const F64 MAX_ANIM_SECONDS = 10.0; - F64 anim_duration = llmax( MIN_ANIM_SECONDS, sqrt(focus_delta_squared) / ANIM_METERS_PER_SECOND ); - anim_duration = llmin( anim_duration, MAX_ANIM_SECONDS ); - setAnimationDuration( (F32)anim_duration ); - } - - updateFocusOffset(); -} - -//----------------------------------------------------------------------------- -// setSitCamera() -//----------------------------------------------------------------------------- -void LLAgent::setSitCamera(const LLUUID &object_id, const LLVector3 &camera_pos, const LLVector3 &camera_focus) -{ - BOOL camera_enabled = !object_id.isNull(); - - if (camera_enabled) - { - LLViewerObject *reference_object = gObjectList.findObject(object_id); - if (reference_object) - { - //convert to root object relative? - mSitCameraPos = camera_pos; - mSitCameraFocus = camera_focus; - mSitCameraReferenceObject = reference_object; - mSitCameraEnabled = TRUE; - } - } - else - { - mSitCameraPos.clearVec(); - mSitCameraFocus.clearVec(); - mSitCameraReferenceObject = NULL; - mSitCameraEnabled = FALSE; - } -} - -//----------------------------------------------------------------------------- -// setFocusOnAvatar() -//----------------------------------------------------------------------------- -void LLAgent::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate) -{ - if (focus_on_avatar != mFocusOnAvatar) - { - if (animate) - { - startCameraAnimation(); - } - else - { - stopCameraAnimation(); - } - } - - //RN: when focused on the avatar, we're not "looking" at it - // looking implies intent while focusing on avatar means - // you're just walking around with a camera on you...eesh. - if (!mFocusOnAvatar && focus_on_avatar) - { - setFocusGlobal(LLVector3d::zero); - mCameraFOVZoomFactor = 0.f; - if (mCameraMode == CAMERA_MODE_THIRD_PERSON) - { - LLVector3 at_axis; - if (mAvatarObject.notNull() && mAvatarObject->getParent()) - { - LLQuaternion obj_rot = ((LLViewerObject*)mAvatarObject->getParent())->getRenderRotation(); - at_axis = LLViewerCamera::getInstance()->getAtAxis(); - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis * ~obj_rot); - } - else - { - at_axis = LLViewerCamera::getInstance()->getAtAxis(); - at_axis.mV[VZ] = 0.f; - at_axis.normalize(); - resetAxes(at_axis); - } - } - } - // unlocking camera from avatar - else if (mFocusOnAvatar && !focus_on_avatar) - { - // keep camera focus point consistent, even though it is now unlocked - setFocusGlobal(getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID()); - } - - mFocusOnAvatar = focus_on_avatar; + gAgentCamera.updateLastCamera(); } //----------------------------------------------------------------------------- @@ -4594,90 +1907,13 @@ void LLAgent::heardChat(const LLUUID& id) if (ll_rand(2) == 0) { LLViewerObject *chatter = gObjectList.findObject(mLastChatterID); - setLookAt(LOOKAT_TARGET_AUTO_LISTEN, chatter, LLVector3::zero); + gAgentCamera.setLookAt(LOOKAT_TARGET_AUTO_LISTEN, chatter, LLVector3::zero); } mLastChatterID = id; mChatTimer.reset(); } -//----------------------------------------------------------------------------- -// lookAtLastChat() -//----------------------------------------------------------------------------- -void LLAgent::lookAtLastChat() -{ - // Block if camera is animating or not in normal third person camera mode - if (mCameraAnimating || !cameraThirdPerson()) - { - return; - } - - LLViewerObject *chatter = gObjectList.findObject(mLastChatterID); - if (chatter) - { - LLVector3 delta_pos; - if (chatter->isAvatar()) - { - LLVOAvatar *chatter_av = (LLVOAvatar*)chatter; - if (mAvatarObject.notNull() && chatter_av->mHeadp) - { - delta_pos = chatter_av->mHeadp->getWorldPosition() - mAvatarObject->mHeadp->getWorldPosition(); - } - else - { - delta_pos = chatter->getPositionAgent() - getPositionAgent(); - } - delta_pos.normalize(); - - setControlFlags(AGENT_CONTROL_STOP); - - changeCameraToThirdPerson(); - - LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); - LLVector3 left = delta_pos % LLVector3::z_axis; - left.normalize(); - LLVector3 up = left % delta_pos; - up.normalize(); - new_camera_pos -= delta_pos * 0.4f; - new_camera_pos += left * 0.3f; - new_camera_pos += up * 0.2f; - if (chatter_av->mHeadp) - { - setFocusGlobal(getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), mLastChatterID); - mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()); - } - else - { - setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); - mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); - } - setFocusOnAvatar(FALSE, TRUE); - } - else - { - delta_pos = chatter->getRenderPosition() - getPositionAgent(); - delta_pos.normalize(); - - setControlFlags(AGENT_CONTROL_STOP); - - changeCameraToThirdPerson(); - - LLVector3 new_camera_pos = mAvatarObject->mHeadp->getWorldPosition(); - LLVector3 left = delta_pos % LLVector3::z_axis; - left.normalize(); - LLVector3 up = left % delta_pos; - up.normalize(); - new_camera_pos -= delta_pos * 0.4f; - new_camera_pos += left * 0.3f; - new_camera_pos += up * 0.2f; - - setFocusGlobal(chatter->getPositionGlobal(), mLastChatterID); - mCameraFocusOffsetTarget = getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); - setFocusOnAvatar(FALSE, TRUE); - } - } -} - const F32 SIT_POINT_EXTENTS = 0.2f; LLSD ll_sdmap_from_vector3(const LLVector3& vec) @@ -4722,10 +1958,10 @@ void LLAgent::setStartPosition( U32 location_id ) LLVector3 agent_pos = getPositionAgent(); - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { // the z height is at the agent's feet - agent_pos.mV[VZ] -= 0.5f * mAvatarObject->mBodySize.mV[VZ]; + agent_pos.mV[VZ] -= 0.5f * gAgentAvatarp->mBodySize.mV[VZ]; } agent_pos.mV[VX] = llclamp( agent_pos.mV[VX], INSET, REGION_WIDTH - INSET ); @@ -4832,7 +2068,7 @@ void LLAgent::onAnimStop(const LLUUID& id) setControlFlags(AGENT_CONTROL_FINISH_ANIM); // now trigger dusting self off animation - if (mAvatarObject.notNull() && !mAvatarObject->mBelowWater && rand() % 3 == 0) + if (isAgentAvatarValid() && !gAgentAvatarp->mBelowWater && rand() % 3 == 0) sendAnimationRequest( ANIM_AGENT_BRUSH, ANIM_REQUEST_START ); } else if (id == ANIM_AGENT_PRE_JUMP || id == ANIM_AGENT_LAND || id == ANIM_AGENT_MEDIUM_LAND) @@ -5031,9 +2267,9 @@ void LLAgent::buildFullnameAndTitle(std::string& name) const name.erase(0, name.length()); } - if (mAvatarObject.notNull()) + if (isAgentAvatarValid()) { - name += mAvatarObject->getFullname(); + name += gAgentAvatarp->getFullname(); } } @@ -5179,14 +2415,14 @@ BOOL LLAgent::canJoinGroups() const LLQuaternion LLAgent::getHeadRotation() { - if (mAvatarObject.isNull() || !mAvatarObject->mPelvisp || !mAvatarObject->mHeadp) + if (!isAgentAvatarValid() || !gAgentAvatarp->mPelvisp || !gAgentAvatarp->mHeadp) { return LLQuaternion::DEFAULT; } - if (!gAgent.cameraMouselook()) + if (!gAgentCamera.cameraMouselook()) { - return mAvatarObject->getRotation(); + return gAgentAvatarp->getRotation(); } // We must be in mouselook @@ -5195,9 +2431,9 @@ LLQuaternion LLAgent::getHeadRotation() LLVector3 left = up % look_dir; LLQuaternion rot(look_dir, left, up); - if (mAvatarObject->getParent()) + if (gAgentAvatarp->getParent()) { - rot = rot * ~mAvatarObject->getParent()->getRotation(); + rot = rot * ~gAgentAvatarp->getParent()->getRotation(); } return rot; @@ -5355,10 +2591,11 @@ void LLAgent::initOriginGlobal(const LLVector3d &origin_global) BOOL LLAgent::leftButtonGrabbed() const { - return (!cameraMouselook() && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) - || (cameraMouselook() && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) - || (!cameraMouselook() && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) - || (cameraMouselook() && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); + const BOOL camera_mouse_look = gAgentCamera.cameraMouselook(); + return (!camera_mouse_look && mControlsTakenCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) + || (camera_mouse_look && mControlsTakenCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0) + || (!camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_LBUTTON_DOWN_INDEX] > 0) + || (camera_mouse_look && mControlsTakenPassedOnCount[CONTROL_ML_LBUTTON_DOWN_INDEX] > 0); } BOOL LLAgent::rotateGrabbed() const @@ -5819,14 +3056,13 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * { gAgentQueryManager.mNumPendingQueries--; - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - if (!avatarp || avatarp->isDead()) + if (!isAgentAvatarValid() || gAgentAvatarp->isDead()) { llwarns << "No avatar for user in cached texture update!" << llendl; return; } - if (gAgent.cameraCustomizeAvatar()) + if (gAgentCamera.cameraCustomizeAvatar()) { // ignore baked textures when in customize mode return; @@ -5853,27 +3089,27 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void * if (texture_id.notNull()) { //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl; - avatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id); - //avatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); + gAgentAvatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id); + //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id ); gAgentQueryManager.mActiveCacheQueries[texture_index] = 0; num_results++; } else { // no cache of this bake. request upload. - avatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index); + gAgentAvatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index); } } } llinfos << "Received cached texture response for " << num_results << " textures." << llendl; - avatarp->updateMeshTextures(); + gAgentAvatarp->updateMeshTextures(); if (gAgentQueryManager.mNumPendingQueries == 0) { // RN: not sure why composites are disabled at this point - avatarp->setCompositeUpdatesEnabled(TRUE); + gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); gAgent.sendAgentSetAppearance(); } } @@ -5926,11 +3162,10 @@ BOOL LLAgent::getHomePosGlobal( LLVector3d* pos_global ) void LLAgent::clearVisualParams(void *data) { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { - avatarp->clearVisualParamWeights(); - avatarp->updateVisualParams(); + gAgentAvatarp->clearVisualParamWeights(); + gAgentAvatarp->updateVisualParams(); } } @@ -5954,16 +3189,15 @@ bool LLAgent::teleportCore(bool is_local) // sync with other viewers. Discuss in DEV-14145/VWR-6744 before reenabling. // Stop all animation before actual teleporting - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { - for ( LLVOAvatar::AnimIterator anim_it= avatarp->mPlayingAnimations.begin(); - anim_it != avatarp->mPlayingAnimations.end(); + for ( LLVOAvatar::AnimIterator anim_it= gAgentAvatarp->mPlayingAnimations.begin(); + anim_it != gAgentAvatarp->mPlayingAnimations.end(); ++anim_it) { - avatarp->stopMotion(anim_it->first); + gAgentAvatarp->stopMotion(anim_it->first); } - avatarp->processAnimationStateChanges(); + gAgentAvatarp->processAnimationStateChanges(); } #endif @@ -5971,9 +3205,9 @@ bool LLAgent::teleportCore(bool is_local) // yet if the teleport will succeed. Look in // process_teleport_location_reply - // close the map and find panels so we can see our destination + // close the map panel so we can see our destination. + // we don't close search floater, see EXT-5840. LLFloaterReg::hideInstance("world_map"); - LLFloaterReg::hideInstance("search"); // hide land floater too - it'll be out of date LLFloaterReg::hideInstance("about_land"); @@ -5983,7 +3217,7 @@ bool LLAgent::teleportCore(bool is_local) // Close all pie menus, deselect land, etc. // Don't change the camera until we know teleport succeeded. JC - resetView(FALSE); + gAgentCamera.resetView(FALSE); // local logic LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TELEPORT_COUNT); @@ -6156,13 +3390,11 @@ void LLAgent::stopCurrentAnimations() { // This function stops all current overriding animations on this // avatar, propagating this change back to the server. - - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { for ( LLVOAvatar::AnimIterator anim_it = - avatarp->mPlayingAnimations.begin(); - anim_it != avatarp->mPlayingAnimations.end(); + gAgentAvatarp->mPlayingAnimations.begin(); + anim_it != gAgentAvatarp->mPlayingAnimations.end(); anim_it++) { if (anim_it->first == @@ -6175,7 +3407,7 @@ void LLAgent::stopCurrentAnimations() else { // stop this animation locally - avatarp->stopMotion(anim_it->first, TRUE); + gAgentAvatarp->stopMotion(anim_it->first, TRUE); // ...and tell the server to tell everyone. sendAnimationRequest(anim_it->first, ANIM_REQUEST_STOP); } @@ -6282,15 +3514,15 @@ void LLAgent::requestLeaveGodMode() //----------------------------------------------------------------------------- void LLAgent::sendAgentSetAppearance() { - if (mAvatarObject.isNull()) return; + if (!isAgentAvatarValid()) return; - if (gAgentQueryManager.mNumPendingQueries > 0 && !gAgent.cameraCustomizeAvatar()) + if (gAgentQueryManager.mNumPendingQueries > 0 && !gAgentCamera.cameraCustomizeAvatar()) { return; } - llinfos << "TAT: Sent AgentSetAppearance: " << mAvatarObject->getBakedStatusForPrintout() << llendl; + llinfos << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl; //dumpAvatarTEs( "sendAgentSetAppearance()" ); LLMessageSystem* msg = gMessageSystem; @@ -6304,7 +3536,7 @@ void LLAgent::sendAgentSetAppearance() // NOTE -- when we start correcting all of the other Havok geometry // to compensate for the COLLISION_TOLERANCE ugliness we will have // to tweak this number again - const LLVector3 body_size = mAvatarObject->mBodySize; + const LLVector3 body_size = gAgentAvatarp->mBodySize; msg->addVector3Fast(_PREHASH_Size, body_size); // To guard against out of order packets @@ -6314,20 +3546,20 @@ void LLAgent::sendAgentSetAppearance() // is texture data current relative to wearables? // KLW - TAT this will probably need to check the local queue. - BOOL textures_current = mAvatarObject->areTexturesCurrent(); + BOOL textures_current = gAgentAvatarp->areTexturesCurrent(); for(U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++ ) { const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index); // if we're not wearing a skirt, we don't need the texture to be baked - if (texture_index == TEX_SKIRT_BAKED && !mAvatarObject->isWearingWearableType(WT_SKIRT)) + if (texture_index == TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT)) { continue; } // IMG_DEFAULT_AVATAR means not baked. 0 index should be ignored for baked textures - if (!mAvatarObject->isTextureDefined(texture_index, 0)) + if (!gAgentAvatarp->isTextureDefined(texture_index, 0)) { textures_current = FALSE; break; @@ -6365,7 +3597,7 @@ void LLAgent::sendAgentSetAppearance() msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index); } msg->nextBlockFast(_PREHASH_ObjectData); - mAvatarObject->sendAppearanceMessage( gMessageSystem ); + gAgentAvatarp->sendAppearanceMessage( gMessageSystem ); } else { @@ -6378,9 +3610,9 @@ void LLAgent::sendAgentSetAppearance() S32 transmitted_params = 0; - for (LLViewerVisualParam* param = (LLViewerVisualParam*)mAvatarObject->getFirstVisualParam(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*)gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*)mAvatarObject->getNextVisualParam()) + param = (LLViewerVisualParam*)gAgentAvatarp->getNextVisualParam()) { if (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE) { @@ -6502,7 +3734,39 @@ void LLAgent::dumpGroupInfo() //llinfos << "insig " << gAgent.mGroupInsigniaID << llendl; } +// Draw a representation of current autopilot target +void LLAgent::renderAutoPilotTarget() +{ + if (mAutoPilot) + { + F32 height_meters; + LLVector3d target_global; + + glMatrixMode(GL_MODELVIEW); + gGL.pushMatrix(); + + // not textured + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + + // lovely green + glColor4f(0.f, 1.f, 1.f, 1.f); + + target_global = mAutoPilotTargetGlobal; + + gGL.translatef((F32)(target_global.mdV[VX]), (F32)(target_global.mdV[VY]), (F32)(target_global.mdV[VZ])); + + height_meters = 1.f; + + glScalef(height_meters, height_meters, height_meters); + + gSphere.render(1500.f); + + gGL.popMatrix(); + } +} + /********************************************************************************/ + LLAgentQueryManager gAgentQueryManager; LLAgentQueryManager::LLAgentQueryManager() : diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h index f2df1992e7..a460077b7e 100644 --- a/indra/newview/llagent.h +++ b/indra/newview/llagent.h @@ -39,9 +39,6 @@ #include "llagentconstants.h" #include "llagentdata.h" // gAgentID, gAgentSessionID #include "llcharacter.h" // LLAnimPauseRequest -#include "llfollowcam.h" // Ventrella -#include "llhudeffectlookat.h" // EPointAtType -#include "llhudeffectpointat.h" // ELookAtType #include "llpointer.h" #include "lluicolor.h" #include "llvoavatardefines.h" @@ -51,7 +48,6 @@ extern const U8 AGENT_STATE_TYPING; // Typing indication extern const U8 AGENT_STATE_EDITING; // Set when agent has objects selected class LLChat; -class LLVOAvatarSelf; class LLViewerRegion; class LLMotion; class LLToolset; @@ -66,26 +62,6 @@ class LLAgentDropGroupViewerNode; //-------------------------------------------------------------------- // Types //-------------------------------------------------------------------- -enum ECameraMode -{ - CAMERA_MODE_THIRD_PERSON, - CAMERA_MODE_MOUSELOOK, - CAMERA_MODE_CUSTOMIZE_AVATAR, - CAMERA_MODE_FOLLOW -}; - -/** Camera Presets for CAMERA_MODE_THIRD_PERSON */ -enum ECameraPreset -{ - /** Default preset, what the Third Person Mode actually was */ - CAMERA_PRESET_REAR_VIEW, - - /** "Looking at the Avatar from the front" */ - CAMERA_PRESET_FRONT_VIEW, - - /** "Above and to the left, over the shoulder, pulled back a little on the zoom" */ - CAMERA_PRESET_GROUP_VIEW -}; enum EAnimRequest { @@ -129,7 +105,6 @@ public: virtual ~LLAgent(); void init(); void cleanup(); - void setAvatarObject(LLVOAvatarSelf *avatar); //-------------------------------------------------------------------- // Login @@ -139,11 +114,12 @@ public: void setFirstLogin(BOOL b) { mFirstLogin = b; } // Return TRUE if the database reported this login as the first for this particular user. BOOL isFirstLogin() const { return mFirstLogin; } + BOOL isInitialized() const { return mInitialized; } public: - BOOL mInitialized; - BOOL mFirstLogin; std::string mMOTD; // Message of the day private: + BOOL mInitialized; + BOOL mFirstLogin; boost::shared_ptr<LLAgentListener> mListener; //-------------------------------------------------------------------- @@ -192,20 +168,6 @@ private: /******************************************************************************** ** ** - ** GENERAL ACCESSORS - **/ - -public: - LLVOAvatarSelf* getAvatarObject() const { return mAvatarObject; } -private: - LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator - -/** General Accessors - ** ** - *******************************************************************************/ - -/******************************************************************************** - ** ** ** POSITION **/ @@ -236,7 +198,7 @@ public: // Coordinate System //-------------------------------------------------------------------- public: - LLCoordFrame getFrameAgent() const { return mFrameAgent; } + const LLCoordFrame& getFrameAgent() const { return mFrameAgent; } void initOriginGlobal(const LLVector3d &origin_global); // Only to be used in ONE place void resetAxes(); void resetAxes(const LLVector3 &look_at); // Makes reasonable left and up @@ -279,6 +241,10 @@ private: public: S32 getRegionsVisited() const; F64 getDistanceTraveled() const; + void setDistanceTraveled(F64 dist) { mDistanceTraveled = dist; } + + const LLVector3d &getLastPositionGlobal() const { return mLastPositionGlobal; } + void setLastPositionGlobal(const LLVector3d &pos) { mLastPositionGlobal = pos; } private: std::set<U64> mRegionsVisited; // Stat - what distinct regions has the avatar been to? F64 mDistanceTraveled; // Stat - how far has the avatar moved? @@ -321,7 +287,6 @@ public: //-------------------------------------------------------------------- public: void heardChat(const LLUUID& id); - void lookAtLastChat(); F32 getTypingTime() { return mTypingTimer.getElapsedTimeF32(); } LLUUID getLastChatter() const { return mLastChatterID; } F32 getNearChatRadius() { return mNearChatRadius; } @@ -430,6 +395,8 @@ public: // Send message to simulator to force grabbed controls to be // released, in case of a poorly written script. void forceReleaseControls(); + void setFlagsDirty() { mbFlagsDirty = TRUE; } + private: S32 mControlsTakenCount[TOTAL_CONTROLS]; S32 mControlsTakenPassedOnCount[TOTAL_CONTROLS]; @@ -447,9 +414,11 @@ public: void sendAnimationRequests(LLDynamicArray<LLUUID> &anim_ids, EAnimRequest request); void sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request); void endAnimationUpdateUI(); + void unpauseAnimation() { mPauseRequest = NULL; } + BOOL getCustomAnim() const { return mCustomAnim; } + void setCustomAnim(BOOL anim) { mCustomAnim = anim; } + private: - LLFrameTimer mAnimationTimer; // Seconds that transition animation has been active - F32 mAnimationDuration; // In seconds BOOL mCustomAnim; // Current animation is ANIM_AGENT_CUSTOMIZE ? LLAnimPauseRequest mPauseRequest; BOOL mViewsPushed; // Keep track of whether or not we have pushed views @@ -462,19 +431,6 @@ private: ** ** ** MOVEMENT **/ - - //-------------------------------------------------------------------- - // Keys - //-------------------------------------------------------------------- -public: - void setKey(const S32 direction, S32 &key); // Sets key to +1 for +direction, -1 for -direction -private: - S32 mAtKey; // Either 1, 0, or -1. Indicates that movement key is pressed - S32 mWalkKey; // Like AtKey, but causes less forward thrust - S32 mLeftKey; - S32 mUpKey; - F32 mYawKey; - F32 mPitchKey; //-------------------------------------------------------------------- // Movement from user input @@ -492,42 +448,6 @@ public: void movePitch(F32 mag); //-------------------------------------------------------------------- - // Orbit - //-------------------------------------------------------------------- -public: - void setOrbitLeftKey(F32 mag) { mOrbitLeftKey = mag; } - void setOrbitRightKey(F32 mag) { mOrbitRightKey = mag; } - void setOrbitUpKey(F32 mag) { mOrbitUpKey = mag; } - void setOrbitDownKey(F32 mag) { mOrbitDownKey = mag; } - void setOrbitInKey(F32 mag) { mOrbitInKey = mag; } - void setOrbitOutKey(F32 mag) { mOrbitOutKey = mag; } -private: - F32 mOrbitLeftKey; - F32 mOrbitRightKey; - F32 mOrbitUpKey; - F32 mOrbitDownKey; - F32 mOrbitInKey; - F32 mOrbitOutKey; - - //-------------------------------------------------------------------- - // Pan - //-------------------------------------------------------------------- -public: - void setPanLeftKey(F32 mag) { mPanLeftKey = mag; } - void setPanRightKey(F32 mag) { mPanRightKey = mag; } - void setPanUpKey(F32 mag) { mPanUpKey = mag; } - void setPanDownKey(F32 mag) { mPanDownKey = mag; } - void setPanInKey(F32 mag) { mPanInKey = mag; } - void setPanOutKey(F32 mag) { mPanOutKey = mag; } -private: - F32 mPanUpKey; - F32 mPanDownKey; - F32 mPanLeftKey; - F32 mPanRightKey; - F32 mPanInKey; - F32 mPanOutKey; - - //-------------------------------------------------------------------- // Move the avatar's frame //-------------------------------------------------------------------- public: @@ -640,232 +560,6 @@ private: /******************************************************************************** ** ** - ** CAMERA - **/ - - //-------------------------------------------------------------------- - // Mode - //-------------------------------------------------------------------- -public: - void changeCameraToDefault(); - void changeCameraToMouselook(BOOL animate = TRUE); - void changeCameraToThirdPerson(BOOL animate = TRUE); - void changeCameraToCustomizeAvatar(BOOL avatar_animate = TRUE, BOOL camera_animate = TRUE); // Trigger transition animation - void changeCameraToFollow(BOOL animate = TRUE); // Ventrella - BOOL cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); } - BOOL cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); } - BOOL cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); } - BOOL cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); } - ECameraMode getCameraMode() const { return mCameraMode; } - void updateCamera(); // Call once per frame to update camera location/orientation - void resetCamera(); // Slam camera into its default position -private: - ECameraMode mCameraMode; // Target mode after transition animation is done - ECameraMode mLastCameraMode; - - //-------------------------------------------------------------------- - // Preset - //-------------------------------------------------------------------- -public: - void switchCameraPreset(ECameraPreset preset); - -private: - - /** Determines default camera offset depending on the current camera preset */ - LLVector3 getCameraOffsetInitial(); - - /** Camera preset in Third Person Mode */ - ECameraPreset mCameraPreset; - - /** Initial camera offsets */ - std::map<ECameraPreset, LLVector3> mCameraOffsetInitial; - - /** Initial focus offsets */ - std::map<ECameraPreset, LLVector3d> mFocusOffsetInitial; - - - //-------------------------------------------------------------------- - // Position - //-------------------------------------------------------------------- -public: - LLVector3d getCameraPositionGlobal() const; - const LLVector3 &getCameraPositionAgent() const; - LLVector3d calcCameraPositionTargetGlobal(BOOL *hit_limit = NULL); // Calculate the camera position target - F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters - void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; } - BOOL calcCameraMinDistance(F32 &obj_min_distance); - F32 calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_global); - F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); } -private: - F32 mCurrentCameraDistance; // Current camera offset from avatar - F32 mTargetCameraDistance; // Target camera offset from avatar - F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object - F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom - F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect - LLVector4 mCameraCollidePlane; // Colliding plane for camera - F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom - LLVector3 mCameraPositionAgent; // Camera position in agent coordinates - LLVector3 mCameraVirtualPositionAgent; // Camera virtual position (target) before performing FOV zoom - LLVector3d mCameraSmoothingLastPositionGlobal; - LLVector3d mCameraSmoothingLastPositionAgent; - BOOL mCameraSmoothingStop; - LLVector3 mCameraLag; // Third person camera lag - LLVector3 mCameraUpVector; // Camera's up direction in world coordinates (determines the 'roll' of the view) - - //-------------------------------------------------------------------- - // Follow - //-------------------------------------------------------------------- -public: - void setUsingFollowCam(bool using_follow_cam); -private: - LLFollowCam mFollowCam; // Ventrella - - //-------------------------------------------------------------------- - // Sit - //-------------------------------------------------------------------- -public: - void setupSitCamera(); - BOOL sitCameraEnabled() { return mSitCameraEnabled; } - void setSitCamera(const LLUUID &object_id, - const LLVector3 &camera_pos = LLVector3::zero, const LLVector3 &camera_focus = LLVector3::zero); -private: - LLPointer<LLViewerObject> mSitCameraReferenceObject; // Object to which camera is related when sitting - BOOL mSitCameraEnabled; // Use provided camera information when sitting? - LLVector3 mSitCameraPos; // Root relative camera pos when sitting - LLVector3 mSitCameraFocus; // Root relative camera target when sitting - - //-------------------------------------------------------------------- - // Animation - //-------------------------------------------------------------------- -public: - void setCameraAnimating(BOOL b) { mCameraAnimating = b; } - BOOL getCameraAnimating() { return mCameraAnimating; } - void setAnimationDuration(F32 seconds) { mAnimationDuration = seconds; } - void startCameraAnimation(); - void stopCameraAnimation(); -private: - BOOL mCameraAnimating; // Camera is transitioning from one mode to another - LLVector3d mAnimationCameraStartGlobal; // Camera start position, global coords - LLVector3d mAnimationFocusStartGlobal; // Camera focus point, global coords - - //-------------------------------------------------------------------- - // Focus - //-------------------------------------------------------------------- -public: - LLVector3d calcFocusPositionTargetGlobal(); - LLVector3 calcFocusOffset(LLViewerObject *object, LLVector3 pos_agent, S32 x, S32 y); - BOOL getFocusOnAvatar() const { return mFocusOnAvatar; } - LLPointer<LLViewerObject>& getFocusObject() { return mFocusObject; } - F32 getFocusObjectDist() const { return mFocusObjectDist; } - void updateFocusOffset(); - void validateFocusObject(); - void setFocusGlobal(const LLPickInfo& pick); - void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null); - void setFocusOnAvatar(BOOL focus, BOOL animate); - void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id); - void clearFocusObject(); - void setFocusObject(LLViewerObject* object); - void setObjectTracking(BOOL track) { mTrackFocusObject = track; } - const LLVector3d &getFocusGlobal() const { return mFocusGlobal; } - const LLVector3d &getFocusTargetGlobal() const { return mFocusTargetGlobal; } -private: - LLVector3d mCameraFocusOffset; // Offset from focus point in build mode - LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset - BOOL mFocusOnAvatar; - LLVector3d mFocusGlobal; - LLVector3d mFocusTargetGlobal; - LLPointer<LLViewerObject> mFocusObject; - F32 mFocusObjectDist; - LLVector3 mFocusObjectOffset; - F32 mFocusDotRadius; // Meters - BOOL mTrackFocusObject; - F32 mUIOffset; - - //-------------------------------------------------------------------- - // Lookat / Pointat - //-------------------------------------------------------------------- -public: - void updateLookAt(const S32 mouse_x, const S32 mouse_y); - BOOL setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); - ELookAtType getLookAtType(); - void slamLookAt(const LLVector3 &look_at); // Set the physics data - BOOL setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); - EPointAtType getPointAtType(); -public: - LLPointer<LLHUDEffectLookAt> mLookAt; - LLPointer<LLHUDEffectPointAt> mPointAt; - - //-------------------------------------------------------------------- - // Third person - //-------------------------------------------------------------------- -public: - LLVector3d calcThirdPersonFocusOffset(); - void setThirdPersonHeadOffset(LLVector3 offset) { mThirdPersonHeadOffset = offset; } -private: - LLVector3 mThirdPersonHeadOffset; // Head offset for third person camera position - - //-------------------------------------------------------------------- - // Orbit - //-------------------------------------------------------------------- -public: - void cameraOrbitAround(const F32 radians); // Rotate camera CCW radians about build focus point - void cameraOrbitOver(const F32 radians); // Rotate camera forward radians over build focus point - void cameraOrbitIn(const F32 meters); // Move camera in toward build focus point - - //-------------------------------------------------------------------- - // Zoom - //-------------------------------------------------------------------- -public: - void handleScrollWheel(S32 clicks); // Mousewheel driven zoom - void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance - F32 getCameraZoomFraction(); // Get camera zoom as fraction of minimum and maximum zoom - void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom - F32 calcCameraFOVZoomFactor(); - - //-------------------------------------------------------------------- - // Pan - //-------------------------------------------------------------------- -public: - void cameraPanIn(const F32 meters); - void cameraPanLeft(const F32 meters); - void cameraPanUp(const F32 meters); - - //-------------------------------------------------------------------- - // View - //-------------------------------------------------------------------- -public: - // Called whenever the agent moves. Puts camera back in default position, deselects items, etc. - void resetView(BOOL reset_camera = TRUE, BOOL change_camera = FALSE); - // Called on camera movement. Unlocks camera from the default position behind the avatar. - void unlockView(); - - //-------------------------------------------------------------------- - // Mouselook - //-------------------------------------------------------------------- -public: - BOOL getForceMouselook() const { return mForceMouselook; } - void setForceMouselook(BOOL mouselook) { mForceMouselook = mouselook; } -private: - BOOL mForceMouselook; - - //-------------------------------------------------------------------- - // HUD - //-------------------------------------------------------------------- -public: - const LLColor4 &getEffectColor(); - void setEffectColor(const LLColor4 &color); -public: - F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing) - F32 mHUDCurZoom; // Current animated zoom level for HUD objects -private: - LLUIColor mEffectColor; - -/** Camera - ** ** - *******************************************************************************/ - -/******************************************************************************** - ** ** ** ACCESS **/ @@ -938,8 +632,9 @@ public: LLQuaternion getHeadRotation(); BOOL needsRenderAvatar(); // TRUE when camera mode is such that your own avatar should draw BOOL needsRenderHead(); -public: - F32 mDrawDistance; + void setShowAvatar(BOOL show) { mShowAvatar = show; } + BOOL getShowAvatar() const { return mShowAvatar; } + private: BOOL mShowAvatar; // Should we render the avatar? U32 mAppearanceSerialNum; @@ -954,6 +649,15 @@ public: private: U8 mRenderState; // Current behavior state of agent + //-------------------------------------------------------------------- + // HUD + //-------------------------------------------------------------------- +public: + const LLColor4 &getEffectColor(); + void setEffectColor(const LLColor4 &color); +private: + LLUIColor mEffectColor; + /** Rendering ** ** *******************************************************************************/ diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp new file mode 100644 index 0000000000..9638d0e94f --- /dev/null +++ b/indra/newview/llagentcamera.cpp @@ -0,0 +1,2869 @@ +/** + * @file llagentcamera.cpp + * @brief LLAgent class implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llagentcamera.h" + +#include "pipeline.h" + +#include "llagent.h" +#include "llanimationstates.h" +#include "llfloatercamera.h" +#include "llfloatercustomize.h" +#include "llfloaterreg.h" +#include "llhudmanager.h" +#include "lljoystickbutton.h" +#include "llselectmgr.h" +#include "llsmoothstep.h" +#include "lltoolmgr.h" +#include "llviewercamera.h" +#include "llviewercontrol.h" +#include "llviewerjoystick.h" +#include "llviewerobjectlist.h" +#include "llviewerregion.h" +#include "llviewerwindow.h" +#include "llvoavatarself.h" +#include "llwindow.h" +#include "llworld.h" + +using namespace LLVOAvatarDefines; + +extern LLMenuBarGL* gMenuBarView; + +// Mousewheel camera zoom +const F32 MIN_ZOOM_FRACTION = 0.25f; +const F32 INITIAL_ZOOM_FRACTION = 1.f; +const F32 MAX_ZOOM_FRACTION = 8.f; + +const F32 CAMERA_ZOOM_HALF_LIFE = 0.07f; // seconds +const F32 FOV_ZOOM_HALF_LIFE = 0.07f; // seconds + +const F32 CAMERA_FOCUS_HALF_LIFE = 0.f;//0.02f; +const F32 CAMERA_LAG_HALF_LIFE = 0.25f; +const F32 MIN_CAMERA_LAG = 0.5f; +const F32 MAX_CAMERA_LAG = 5.f; + +const F32 CAMERA_COLLIDE_EPSILON = 0.1f; +const F32 MIN_CAMERA_DISTANCE = 0.1f; + +const F32 AVATAR_ZOOM_MIN_X_FACTOR = 0.55f; +const F32 AVATAR_ZOOM_MIN_Y_FACTOR = 0.7f; +const F32 AVATAR_ZOOM_MIN_Z_FACTOR = 1.15f; + +const F32 MAX_CAMERA_DISTANCE_FROM_AGENT = 50.f; + +const F32 MAX_CAMERA_SMOOTH_DISTANCE = 50.0f; + +const F32 HEAD_BUFFER_SIZE = 0.3f; + +const F32 CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP = 0.2f; + +const F32 LAND_MIN_ZOOM = 0.15f; + +const F32 AVATAR_MIN_ZOOM = 0.5f; +const F32 OBJECT_MIN_ZOOM = 0.02f; + +const F32 APPEARANCE_MIN_ZOOM = 0.39f; +const F32 APPEARANCE_MAX_ZOOM = 8.f; + +const F32 GROUND_TO_AIR_CAMERA_TRANSITION_TIME = 0.5f; +const F32 GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME = 0.5f; + +const F32 OBJECT_EXTENTS_PADDING = 0.5f; + +// The agent instance. +LLAgentCamera gAgentCamera; + +//----------------------------------------------------------------------------- +// LLAgentCamera() +//----------------------------------------------------------------------------- +LLAgentCamera::LLAgentCamera() : + mInitialized(false), + + mDrawDistance( DEFAULT_FAR_PLANE ), + + mLookAt(NULL), + mPointAt(NULL), + + mHUDTargetZoom(1.f), + mHUDCurZoom(1.f), + + mForceMouselook(FALSE), + + mCameraMode( CAMERA_MODE_THIRD_PERSON ), + mLastCameraMode( CAMERA_MODE_THIRD_PERSON ), + + mCameraPreset(CAMERA_PRESET_REAR_VIEW), + + mCameraAnimating( FALSE ), + mAnimationCameraStartGlobal(), + mAnimationFocusStartGlobal(), + mAnimationTimer(), + mAnimationDuration(0.33f), + + mCameraFOVZoomFactor(0.f), + mCameraCurrentFOVZoomFactor(0.f), + mCameraFocusOffset(), + mCameraFOVDefault(DEFAULT_FIELD_OF_VIEW), + + mCameraCollidePlane(), + + mCurrentCameraDistance(2.f), // meters, set in init() + mTargetCameraDistance(2.f), + mCameraZoomFraction(1.f), // deprecated + mThirdPersonHeadOffset(0.f, 0.f, 1.f), + mSitCameraEnabled(FALSE), + 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), + mUIOffset(0.f), + + 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.f), + + 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) +{ + mFollowCam.setMaxCameraDistantFromSubject( MAX_CAMERA_DISTANCE_FROM_AGENT ); + + clearGeneralKeys(); + clearOrbitKeys(); + clearPanKeys(); +} + +// Requires gSavedSettings to be initialized. +//----------------------------------------------------------------------------- +// init() +//----------------------------------------------------------------------------- +void LLAgentCamera::init() +{ + // *Note: this is where LLViewerCamera::getInstance() used to be constructed. + + mDrawDistance = gSavedSettings.getF32("RenderFarClip"); + + LLViewerCamera::getInstance()->setView(DEFAULT_FIELD_OF_VIEW); + // Leave at 0.1 meters until we have real near clip management + LLViewerCamera::getInstance()->setNear(0.1f); + LLViewerCamera::getInstance()->setFar(mDrawDistance); // if you want to change camera settings, do so in camera.h + LLViewerCamera::getInstance()->setAspect( gViewerWindow->getWorldViewAspectRatio() ); // default, overridden in LLViewerWindow::reshape + LLViewerCamera::getInstance()->setViewHeightInPixels(768); // default, overridden in LLViewerWindow::reshape + + mCameraFocusOffsetTarget = LLVector4(gSavedSettings.getVector3("CameraOffsetBuild")); + + mCameraPreset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + + mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3("CameraOffsetRearView"); + mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3("CameraOffsetFrontView"); + mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3("CameraOffsetGroupView"); + + mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getVector3d("FocusOffsetRearView"); + mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getVector3d("FocusOffsetFrontView"); + mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getVector3d("FocusOffsetGroupView"); + + mCameraCollidePlane.clearVec(); + mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale"); + mTargetCameraDistance = mCurrentCameraDistance; + mCameraZoomFraction = 1.f; + mTrackFocusObject = gSavedSettings.getBOOL("TrackFocusObject"); + + mInitialized = true; +} + +//----------------------------------------------------------------------------- +// cleanup() +//----------------------------------------------------------------------------- +void LLAgentCamera::cleanup() +{ + setSitCamera(LLUUID::null); + + if(mLookAt) + { + mLookAt->markDead() ; + mLookAt = NULL; + } + if(mPointAt) + { + mPointAt->markDead() ; + mPointAt = NULL; + } + setFocusObject(NULL); +} + +void LLAgentCamera::setAvatarObject(LLVOAvatarSelf* avatar) +{ + if (!mLookAt) + { + mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT); + } + if (!mPointAt) + { + mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT); + } + + if (!mLookAt.isNull()) + { + mLookAt->setSourceObject(avatar); + } + if (!mPointAt.isNull()) + { + mPointAt->setSourceObject(avatar); + } +} + +//----------------------------------------------------------------------------- +// LLAgent() +//----------------------------------------------------------------------------- +LLAgentCamera::~LLAgentCamera() +{ + cleanup(); + + // *Note: this is where LLViewerCamera::getInstance() used to be deleted. +} + +// Change camera back to third person, stop the autopilot, +// deselect stuff, etc. +//----------------------------------------------------------------------------- +// resetView() +//----------------------------------------------------------------------------- +void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera) +{ + if (gAgent.getAutoPilot()) + { + gAgent.stopAutoPilot(TRUE); + } + + if (!gNoRender) + { + LLSelectMgr::getInstance()->unhighlightAll(); + + // By popular request, keep land selection while walking around. JC + // LLViewerParcelMgr::getInstance()->deselectLand(); + + // force deselect when walking and attachment is selected + // this is so people don't wig out when their avatar moves without animating + if (LLSelectMgr::getInstance()->getSelection()->isAttachment()) + { + LLSelectMgr::getInstance()->deselectAll(); + } + + // Hide all popup menus + gMenuHolder->hideMenus(); + } + + if (change_camera && !gSavedSettings.getBOOL("FreezeTime")) + { + changeCameraToDefault(); + + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + handle_toggle_flycam(); + } + + // reset avatar mode from eventual residual motion + if (LLToolMgr::getInstance()->inBuildMode()) + { + LLViewerJoystick::getInstance()->moveAvatar(true); + } + + //Camera Tool is needed for Free Camera Control Mode + if (!LLFloaterCamera::inFreeCameraMode()) + { + LLFloaterReg::hideInstance("build"); + + // Switch back to basic toolset + LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + } + + gViewerWindow->showCursor(); + } + + + if (reset_camera && !gSavedSettings.getBOOL("FreezeTime")) + { + if (!gViewerWindow->getLeftMouseDown() && cameraThirdPerson()) + { + // leaving mouse-steer mode + LLVector3 agent_at_axis = gAgent.getAtAxis(); + agent_at_axis -= projected_vec(agent_at_axis, gAgent.getReferenceUpVector()); + agent_at_axis.normalize(); + gAgent.resetAxes(lerp(gAgent.getAtAxis(), agent_at_axis, LLCriticalDamp::getInterpolant(0.3f))); + } + + setFocusOnAvatar(TRUE, ANIMATE); + + mCameraFOVZoomFactor = 0.f; + } + + mHUDTargetZoom = 1.f; +} + +// Allow camera to be moved somewhere other than behind avatar. +//----------------------------------------------------------------------------- +// unlockView() +//----------------------------------------------------------------------------- +void LLAgentCamera::unlockView() +{ + if (getFocusOnAvatar()) + { + if (isAgentAvatarValid()) + { + setFocusGlobal(LLVector3d::zero, gAgentAvatarp->mID); + } + setFocusOnAvatar(FALSE, FALSE); // no animation + } +} + +//----------------------------------------------------------------------------- +// slamLookAt() +//----------------------------------------------------------------------------- +void LLAgentCamera::slamLookAt(const LLVector3 &look_at) +{ + LLVector3 look_at_norm = look_at; + look_at_norm.mV[VZ] = 0.f; + look_at_norm.normalize(); + gAgent.resetAxes(look_at_norm); +} + +//----------------------------------------------------------------------------- +// calcFocusOffset() +//----------------------------------------------------------------------------- +LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 original_focus_point, S32 x, S32 y) +{ + LLMatrix4 obj_matrix = object->getRenderMatrix(); + LLQuaternion obj_rot = object->getRenderRotation(); + LLVector3 obj_pos = object->getRenderPosition(); + + BOOL is_avatar = object->isAvatar(); + // if is avatar - don't do any funk heuristics to position the focal point + // see DEV-30589 + if (is_avatar) + { + return original_focus_point - obj_pos; + } + + + LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation + LLVector3 object_extents = object->getScale(); + // make sure they object extents are non-zero + object_extents.clamp(0.001f, F32_MAX); + + // obj_to_cam_ray is unit vector pointing from object center to camera, in the coordinate frame of the object + LLVector3 obj_to_cam_ray = obj_pos - LLViewerCamera::getInstance()->getOrigin(); + obj_to_cam_ray.rotVec(inv_obj_rot); + obj_to_cam_ray.normalize(); + + // obj_to_cam_ray_proportions are the (positive) ratios of + // the obj_to_cam_ray x,y,z components with the x,y,z object dimensions. + LLVector3 obj_to_cam_ray_proportions; + obj_to_cam_ray_proportions.mV[VX] = llabs(obj_to_cam_ray.mV[VX] / object_extents.mV[VX]); + obj_to_cam_ray_proportions.mV[VY] = llabs(obj_to_cam_ray.mV[VY] / object_extents.mV[VY]); + obj_to_cam_ray_proportions.mV[VZ] = llabs(obj_to_cam_ray.mV[VZ] / object_extents.mV[VZ]); + + // find the largest ratio stored in obj_to_cam_ray_proportions + // this corresponds to the object's local axial plane (XY, YZ, XZ) that is *most* facing the camera + LLVector3 longest_object_axis; + // is x-axis longest? + if (obj_to_cam_ray_proportions.mV[VX] > obj_to_cam_ray_proportions.mV[VY] + && obj_to_cam_ray_proportions.mV[VX] > obj_to_cam_ray_proportions.mV[VZ]) + { + // then grab it + longest_object_axis.setVec(obj_matrix.getFwdRow4()); + } + // is y-axis longest? + else if (obj_to_cam_ray_proportions.mV[VY] > obj_to_cam_ray_proportions.mV[VZ]) + { + // then grab it + longest_object_axis.setVec(obj_matrix.getLeftRow4()); + } + // otherwise, use z axis + else + { + longest_object_axis.setVec(obj_matrix.getUpRow4()); + } + + // Use this axis as the normal to project mouse click on to plane with that normal, at the object center. + // This generates a point behind the mouse cursor that is approximately in the middle of the object in + // terms of depth. + // We do this to allow the camera rotation tool to "tumble" the object by rotating the camera. + // If the focus point were the object surface under the mouse, camera rotation would introduce an undesirable + // eccentricity to the object orientation + LLVector3 focus_plane_normal(longest_object_axis); + focus_plane_normal.normalize(); + + LLVector3d focus_pt_global; + gViewerWindow->mousePointOnPlaneGlobal(focus_pt_global, x, y, gAgent.getPosGlobalFromAgent(obj_pos), focus_plane_normal); + LLVector3 focus_pt = gAgent.getPosAgentFromGlobal(focus_pt_global); + + // find vector from camera to focus point in object space + LLVector3 camera_to_focus_vec = focus_pt - LLViewerCamera::getInstance()->getOrigin(); + camera_to_focus_vec.rotVec(inv_obj_rot); + + // find vector from object origin to focus point in object coordinates + LLVector3 focus_offset_from_object_center = focus_pt - obj_pos; + // convert to object-local space + focus_offset_from_object_center.rotVec(inv_obj_rot); + + // We need to project the focus point back into the bounding box of the focused object. + // Do this by calculating the XYZ scale factors needed to get focus offset back in bounds along the camera_focus axis + LLVector3 clip_fraction; + + // for each axis... + for (U32 axis = VX; axis <= VZ; axis++) + { + //...calculate distance that focus offset sits outside of bounding box along that axis... + //NOTE: dist_out_of_bounds keeps the sign of focus_offset_from_object_center + F32 dist_out_of_bounds; + if (focus_offset_from_object_center.mV[axis] > 0.f) + { + dist_out_of_bounds = llmax(0.f, focus_offset_from_object_center.mV[axis] - (object_extents.mV[axis] * 0.5f)); + } + else + { + dist_out_of_bounds = llmin(0.f, focus_offset_from_object_center.mV[axis] + (object_extents.mV[axis] * 0.5f)); + } + + //...then calculate the scale factor needed to push camera_to_focus_vec back in bounds along current axis + if (llabs(camera_to_focus_vec.mV[axis]) < 0.0001f) + { + // don't divide by very small number + clip_fraction.mV[axis] = 0.f; + } + else + { + clip_fraction.mV[axis] = dist_out_of_bounds / camera_to_focus_vec.mV[axis]; + } + } + + LLVector3 abs_clip_fraction = clip_fraction; + abs_clip_fraction.abs(); + + // find axis of focus offset that is *most* outside the bounding box and use that to + // rescale focus offset to inside object extents + if (abs_clip_fraction.mV[VX] > abs_clip_fraction.mV[VY] + && abs_clip_fraction.mV[VX] > abs_clip_fraction.mV[VZ]) + { + focus_offset_from_object_center -= clip_fraction.mV[VX] * camera_to_focus_vec; + } + else if (abs_clip_fraction.mV[VY] > abs_clip_fraction.mV[VZ]) + { + focus_offset_from_object_center -= clip_fraction.mV[VY] * camera_to_focus_vec; + } + else + { + focus_offset_from_object_center -= clip_fraction.mV[VZ] * camera_to_focus_vec; + } + + // convert back to world space + focus_offset_from_object_center.rotVec(obj_rot); + + // now, based on distance of camera from object relative to object size + // push the focus point towards the near surface of the object when (relatively) close to the objcet + // or keep the focus point in the object middle when (relatively) far + // NOTE: leave focus point in middle of avatars, since the behavior you want when alt-zooming on avatars + // is almost always "tumble about middle" and not "spin around surface point" + if (!is_avatar) + { + LLVector3 obj_rel = original_focus_point - object->getRenderPosition(); + + //now that we have the object relative position, we should bias toward the center of the object + //based on the distance of the camera to the focus point vs. the distance of the camera to the focus + + F32 relDist = llabs(obj_rel * LLViewerCamera::getInstance()->getAtAxis()); + F32 viewDist = dist_vec(obj_pos + obj_rel, LLViewerCamera::getInstance()->getOrigin()); + + + LLBBox obj_bbox = object->getBoundingBoxAgent(); + F32 bias = 0.f; + + // virtual_camera_pos is the camera position we are simulating by backing the camera off + // and adjusting the FOV + LLVector3 virtual_camera_pos = gAgent.getPosAgentFromGlobal(mFocusTargetGlobal + (getCameraPositionGlobal() - mFocusTargetGlobal) / (1.f + mCameraFOVZoomFactor)); + + // if the camera is inside the object (large, hollow objects, for example) + // leave focus point all the way to destination depth, away from object center + if(!obj_bbox.containsPointAgent(virtual_camera_pos)) + { + // perform magic number biasing of focus point towards surface vs. planar center + bias = clamp_rescale(relDist/viewDist, 0.1f, 0.7f, 0.0f, 1.0f); + obj_rel = lerp(focus_offset_from_object_center, obj_rel, bias); + } + + focus_offset_from_object_center = obj_rel; + } + + return focus_offset_from_object_center; +} + +//----------------------------------------------------------------------------- +// calcCameraMinDistance() +//----------------------------------------------------------------------------- +BOOL LLAgentCamera::calcCameraMinDistance(F32 &obj_min_distance) +{ + BOOL soft_limit = FALSE; // is the bounding box to be treated literally (volumes) or as an approximation (avatars) + + if (!mFocusObject || mFocusObject->isDead()) + { + obj_min_distance = 0.f; + return TRUE; + } + + if (mFocusObject->mDrawable.isNull()) + { +#ifdef LL_RELEASE_FOR_DOWNLOAD + llwarns << "Focus object with no drawable!" << llendl; +#else + mFocusObject->dump(); + llerrs << "Focus object with no drawable!" << llendl; +#endif + obj_min_distance = 0.f; + return TRUE; + } + + LLQuaternion inv_object_rot = ~mFocusObject->getRenderRotation(); + LLVector3 target_offset_origin = mFocusObjectOffset; + LLVector3 camera_offset_target(getCameraPositionAgent() - gAgent.getPosAgentFromGlobal(mFocusTargetGlobal)); + + // convert offsets into object local space + camera_offset_target.rotVec(inv_object_rot); + target_offset_origin.rotVec(inv_object_rot); + + // push around object extents based on target offset + LLVector3 object_extents = mFocusObject->getScale(); + if (mFocusObject->isAvatar()) + { + // fudge factors that lets you zoom in on avatars a bit more (which don't do FOV zoom) + object_extents.mV[VX] *= AVATAR_ZOOM_MIN_X_FACTOR; + object_extents.mV[VY] *= AVATAR_ZOOM_MIN_Y_FACTOR; + object_extents.mV[VZ] *= AVATAR_ZOOM_MIN_Z_FACTOR; + soft_limit = TRUE; + } + LLVector3 abs_target_offset = target_offset_origin; + abs_target_offset.abs(); + + LLVector3 target_offset_dir = target_offset_origin; + F32 object_radius = mFocusObject->getVObjRadius(); + + BOOL target_outside_object_extents = FALSE; + + for (U32 i = VX; i <= VZ; i++) + { + if (abs_target_offset.mV[i] * 2.f > object_extents.mV[i] + OBJECT_EXTENTS_PADDING) + { + target_outside_object_extents = TRUE; + } + if (camera_offset_target.mV[i] > 0.f) + { + object_extents.mV[i] -= target_offset_origin.mV[i] * 2.f; + } + else + { + object_extents.mV[i] += target_offset_origin.mV[i] * 2.f; + } + } + + // don't shrink the object extents so far that the object inverts + object_extents.clamp(0.001f, F32_MAX); + + // move into first octant + LLVector3 camera_offset_target_abs_norm = camera_offset_target; + camera_offset_target_abs_norm.abs(); + // make sure offset is non-zero + camera_offset_target_abs_norm.clamp(0.001f, F32_MAX); + camera_offset_target_abs_norm.normalize(); + + // find camera position relative to normalized object extents + LLVector3 camera_offset_target_scaled = camera_offset_target_abs_norm; + camera_offset_target_scaled.mV[VX] /= object_extents.mV[VX]; + camera_offset_target_scaled.mV[VY] /= object_extents.mV[VY]; + camera_offset_target_scaled.mV[VZ] /= object_extents.mV[VZ]; + + if (camera_offset_target_scaled.mV[VX] > camera_offset_target_scaled.mV[VY] && + camera_offset_target_scaled.mV[VX] > camera_offset_target_scaled.mV[VZ]) + { + if (camera_offset_target_abs_norm.mV[VX] < 0.001f) + { + obj_min_distance = object_extents.mV[VX] * 0.5f; + } + else + { + obj_min_distance = object_extents.mV[VX] * 0.5f / camera_offset_target_abs_norm.mV[VX]; + } + } + else if (camera_offset_target_scaled.mV[VY] > camera_offset_target_scaled.mV[VZ]) + { + if (camera_offset_target_abs_norm.mV[VY] < 0.001f) + { + obj_min_distance = object_extents.mV[VY] * 0.5f; + } + else + { + obj_min_distance = object_extents.mV[VY] * 0.5f / camera_offset_target_abs_norm.mV[VY]; + } + } + else + { + if (camera_offset_target_abs_norm.mV[VZ] < 0.001f) + { + obj_min_distance = object_extents.mV[VZ] * 0.5f; + } + else + { + obj_min_distance = object_extents.mV[VZ] * 0.5f / camera_offset_target_abs_norm.mV[VZ]; + } + } + + LLVector3 object_split_axis; + LLVector3 target_offset_scaled = target_offset_origin; + target_offset_scaled.abs(); + target_offset_scaled.normalize(); + target_offset_scaled.mV[VX] /= object_extents.mV[VX]; + target_offset_scaled.mV[VY] /= object_extents.mV[VY]; + target_offset_scaled.mV[VZ] /= object_extents.mV[VZ]; + + if (target_offset_scaled.mV[VX] > target_offset_scaled.mV[VY] && + target_offset_scaled.mV[VX] > target_offset_scaled.mV[VZ]) + { + object_split_axis = LLVector3::x_axis; + } + else if (target_offset_scaled.mV[VY] > target_offset_scaled.mV[VZ]) + { + object_split_axis = LLVector3::y_axis; + } + else + { + object_split_axis = LLVector3::z_axis; + } + + LLVector3 camera_offset_object(getCameraPositionAgent() - mFocusObject->getPositionAgent()); + + // length projected orthogonal to target offset + F32 camera_offset_dist = (camera_offset_object - target_offset_dir * (camera_offset_object * target_offset_dir)).magVec(); + + // calculate whether the target point would be "visible" if it were outside the bounding box + // on the opposite of the splitting plane defined by object_split_axis; + BOOL exterior_target_visible = FALSE; + if (camera_offset_dist > object_radius) + { + // target is visible from camera, so turn off fov zoom + exterior_target_visible = TRUE; + } + + F32 camera_offset_clip = camera_offset_object * object_split_axis; + F32 target_offset_clip = target_offset_dir * object_split_axis; + + // target has moved outside of object extents + // check to see if camera and target are on same side + if (target_outside_object_extents) + { + if (camera_offset_clip > 0.f && target_offset_clip > 0.f) + { + return FALSE; + } + else if (camera_offset_clip < 0.f && target_offset_clip < 0.f) + { + return FALSE; + } + } + + // clamp obj distance to diagonal of 10 by 10 cube + obj_min_distance = llmin(obj_min_distance, 10.f * F_SQRT3); + + obj_min_distance += LLViewerCamera::getInstance()->getNear() + (soft_limit ? 0.1f : 0.2f); + + return TRUE; +} + +F32 LLAgentCamera::getCameraZoomFraction() +{ + // 0.f -> camera zoomed all the way out + // 1.f -> camera zoomed all the way in + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + // already [0,1] + return mHUDTargetZoom; + } + else if (mFocusOnAvatar && cameraThirdPerson()) + { + return clamp_rescale(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION, 1.f, 0.f); + } + else if (cameraCustomizeAvatar()) + { + F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); + return clamp_rescale(distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM, 1.f, 0.f ); + } + else + { + F32 min_zoom; + const F32 DIST_FUDGE = 16.f; // meters + F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, + LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, + MAX_CAMERA_DISTANCE_FROM_AGENT); + + F32 distance = (F32)mCameraFocusOffsetTarget.magVec(); + if (mFocusObject.notNull()) + { + if (mFocusObject->isAvatar()) + { + min_zoom = AVATAR_MIN_ZOOM; + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } + } + else + { + min_zoom = LAND_MIN_ZOOM; + } + + return clamp_rescale(distance, min_zoom, max_zoom, 1.f, 0.f); + } +} + +void LLAgentCamera::setCameraZoomFraction(F32 fraction) +{ + // 0.f -> camera zoomed all the way out + // 1.f -> camera zoomed all the way in + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + mHUDTargetZoom = fraction; + } + else if (mFocusOnAvatar && cameraThirdPerson()) + { + mCameraZoomFraction = rescale(fraction, 0.f, 1.f, MAX_ZOOM_FRACTION, MIN_ZOOM_FRACTION); + } + else if (cameraCustomizeAvatar()) + { + LLVector3d camera_offset_dir = mCameraFocusOffsetTarget; + camera_offset_dir.normalize(); + mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, APPEARANCE_MAX_ZOOM, APPEARANCE_MIN_ZOOM); + } + else + { + F32 min_zoom = LAND_MIN_ZOOM; + const F32 DIST_FUDGE = 16.f; // meters + F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, + LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, + MAX_CAMERA_DISTANCE_FROM_AGENT); + + if (mFocusObject.notNull()) + { + if (mFocusObject.notNull()) + { + if (mFocusObject->isAvatar()) + { + min_zoom = AVATAR_MIN_ZOOM; + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } + } + } + + LLVector3d camera_offset_dir = mCameraFocusOffsetTarget; + camera_offset_dir.normalize(); + mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom); + } + startCameraAnimation(); +} + + +//----------------------------------------------------------------------------- +// cameraOrbitAround() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraOrbitAround(const F32 radians) +{ + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + // do nothing for hud selection + } + else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON || mCameraMode == CAMERA_MODE_FOLLOW)) + { + gAgent.yaw(radians); + } + else + { + mCameraFocusOffsetTarget.rotVec(radians, 0.f, 0.f, 1.f); + + cameraZoomIn(1.f); + } +} + + +//----------------------------------------------------------------------------- +// cameraOrbitOver() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraOrbitOver(const F32 angle) +{ + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + // do nothing for hud selection + } + else if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON) + { + gAgent.pitch(angle); + } + else + { + LLVector3 camera_offset_unit(mCameraFocusOffsetTarget); + camera_offset_unit.normalize(); + + F32 angle_from_up = acos( camera_offset_unit * gAgent.getReferenceUpVector() ); + + LLVector3d left_axis; + left_axis.setVec(LLViewerCamera::getInstance()->getLeftAxis()); + F32 new_angle = llclamp(angle_from_up - angle, 1.f * DEG_TO_RAD, 179.f * DEG_TO_RAD); + mCameraFocusOffsetTarget.rotVec(angle_from_up - new_angle, left_axis); + + cameraZoomIn(1.f); + } +} + +//----------------------------------------------------------------------------- +// cameraZoomIn() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraZoomIn(const F32 fraction) +{ + if (gDisconnected) + { + return; + } + + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + // just update hud zoom level + mHUDTargetZoom /= fraction; + return; + } + + + LLVector3d camera_offset(mCameraFocusOffsetTarget); + LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); + F32 min_zoom = LAND_MIN_ZOOM; + F32 current_distance = (F32)camera_offset_unit.normalize(); + F32 new_distance = current_distance * fraction; + + // Don't move through focus point + if (mFocusObject) + { + LLVector3 camera_offset_dir((F32)camera_offset_unit.mdV[VX], (F32)camera_offset_unit.mdV[VY], (F32)camera_offset_unit.mdV[VZ]); + + if (mFocusObject->isAvatar()) + { + calcCameraMinDistance(min_zoom); + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } + } + + new_distance = llmax(new_distance, min_zoom); + + // Don't zoom too far back + const F32 DIST_FUDGE = 16.f; // meters + F32 max_distance = llmin(mDrawDistance - DIST_FUDGE, + LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE ); + + if (new_distance > max_distance) + { + new_distance = max_distance; + + /* + // Unless camera is unlocked + if (!LLViewerCamera::sDisableCameraConstraints) + { + return; + } + */ + } + + if( cameraCustomizeAvatar() ) + { + new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); + } + + mCameraFocusOffsetTarget = new_distance * camera_offset_unit; +} + +//----------------------------------------------------------------------------- +// cameraOrbitIn() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraOrbitIn(const F32 meters) +{ + if (mFocusOnAvatar && mCameraMode == CAMERA_MODE_THIRD_PERSON) + { + F32 camera_offset_dist = llmax(0.001f, getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale")); + + mCameraZoomFraction = (mTargetCameraDistance - meters) / camera_offset_dist; + + if (!gSavedSettings.getBOOL("FreezeTime") && mCameraZoomFraction < MIN_ZOOM_FRACTION && meters > 0.f) + { + // No need to animate, camera is already there. + changeCameraToMouselook(FALSE); + } + + mCameraZoomFraction = llclamp(mCameraZoomFraction, MIN_ZOOM_FRACTION, MAX_ZOOM_FRACTION); + } + else + { + LLVector3d camera_offset(mCameraFocusOffsetTarget); + LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); + F32 current_distance = (F32)camera_offset_unit.normalize(); + F32 new_distance = current_distance - meters; + F32 min_zoom = LAND_MIN_ZOOM; + + // Don't move through focus point + if (mFocusObject.notNull()) + { + if (mFocusObject->isAvatar()) + { + min_zoom = AVATAR_MIN_ZOOM; + } + else + { + min_zoom = OBJECT_MIN_ZOOM; + } + } + + new_distance = llmax(new_distance, min_zoom); + + // Don't zoom too far back + const F32 DIST_FUDGE = 16.f; // meters + F32 max_distance = llmin(mDrawDistance - DIST_FUDGE, + LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE ); + + if (new_distance > max_distance) + { + // Unless camera is unlocked + if (!gSavedSettings.getBOOL("DisableCameraConstraints")) + { + return; + } + } + + if( CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode() ) + { + new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM ); + } + + // Compute new camera offset + mCameraFocusOffsetTarget = new_distance * camera_offset_unit; + cameraZoomIn(1.f); + } +} + + +//----------------------------------------------------------------------------- +// cameraPanIn() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraPanIn(F32 meters) +{ + LLVector3d at_axis; + at_axis.setVec(LLViewerCamera::getInstance()->getAtAxis()); + + mFocusTargetGlobal += meters * at_axis; + mFocusGlobal = mFocusTargetGlobal; + // don't enforce zoom constraints as this is the only way for users to get past them easily + updateFocusOffset(); + // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind -Nyx + mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); +} + +//----------------------------------------------------------------------------- +// cameraPanLeft() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraPanLeft(F32 meters) +{ + LLVector3d left_axis; + left_axis.setVec(LLViewerCamera::getInstance()->getLeftAxis()); + + mFocusTargetGlobal += meters * left_axis; + mFocusGlobal = mFocusTargetGlobal; + + // disable smoothing for camera pan, which causes some residents unhappiness + mCameraSmoothingStop = true; + + cameraZoomIn(1.f); + updateFocusOffset(); + // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind - Nyx + mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); +} + +//----------------------------------------------------------------------------- +// cameraPanUp() +//----------------------------------------------------------------------------- +void LLAgentCamera::cameraPanUp(F32 meters) +{ + LLVector3d up_axis; + up_axis.setVec(LLViewerCamera::getInstance()->getUpAxis()); + + mFocusTargetGlobal += meters * up_axis; + mFocusGlobal = mFocusTargetGlobal; + + // disable smoothing for camera pan, which causes some residents unhappiness + mCameraSmoothingStop = true; + + cameraZoomIn(1.f); + updateFocusOffset(); + // NOTE: panning movements expect the camera to move exactly with the focus target, not animated behind -Nyx + mCameraSmoothingLastPositionGlobal = calcCameraPositionTargetGlobal(); +} + +//----------------------------------------------------------------------------- +// updateLookAt() +//----------------------------------------------------------------------------- +void LLAgentCamera::updateLookAt(const S32 mouse_x, const S32 mouse_y) +{ + static LLVector3 last_at_axis; + + if (!isAgentAvatarValid()) return; + + LLQuaternion av_inv_rot = ~gAgentAvatarp->mRoot.getWorldRotation(); + LLVector3 root_at = LLVector3::x_axis * gAgentAvatarp->mRoot.getWorldRotation(); + + if ((gViewerWindow->getMouseVelocityStat()->getCurrent() < 0.01f) && + (root_at * last_at_axis > 0.95f)) + { + LLVector3 vel = gAgentAvatarp->getVelocity(); + if (vel.magVecSquared() > 4.f) + { + setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, vel * av_inv_rot); + } + else + { + // *FIX: rotate mframeagent by sit object's rotation? + LLQuaternion look_rotation = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); // use camera's current rotation + LLVector3 look_offset = LLVector3(2.f, 0.f, 0.f) * look_rotation * av_inv_rot; + setLookAt(LOOKAT_TARGET_IDLE, gAgentAvatarp, look_offset); + } + last_at_axis = root_at; + return; + } + + last_at_axis = root_at; + + if (CAMERA_MODE_CUSTOMIZE_AVATAR == getCameraMode()) + { + setLookAt(LOOKAT_TARGET_NONE, gAgentAvatarp, LLVector3(-2.f, 0.f, 0.f)); + } + else + { + // Move head based on cursor position + ELookAtType lookAtType = LOOKAT_TARGET_NONE; + LLVector3 headLookAxis; + LLCoordFrame frameCamera = *((LLCoordFrame*)LLViewerCamera::getInstance()); + + if (cameraMouselook()) + { + lookAtType = LOOKAT_TARGET_MOUSELOOK; + } + else if (cameraThirdPerson()) + { + // range from -.5 to .5 + F32 x_from_center = + ((F32) mouse_x / (F32) gViewerWindow->getWorldViewWidthScaled() ) - 0.5f; + F32 y_from_center = + ((F32) mouse_y / (F32) gViewerWindow->getWorldViewHeightScaled() ) - 0.5f; + + frameCamera.yaw( - x_from_center * gSavedSettings.getF32("YawFromMousePosition") * DEG_TO_RAD); + frameCamera.pitch( - y_from_center * gSavedSettings.getF32("PitchFromMousePosition") * DEG_TO_RAD); + lookAtType = LOOKAT_TARGET_FREELOOK; + } + + headLookAxis = frameCamera.getAtAxis(); + // RN: we use world-space offset for mouselook and freelook + //headLookAxis = headLookAxis * av_inv_rot; + setLookAt(lookAtType, gAgentAvatarp, headLookAxis); + } +} + +//----------------------------------------------------------------------------- +// updateCamera() +//----------------------------------------------------------------------------- +void LLAgentCamera::updateCamera() +{ + static LLFastTimer::DeclareTimer ftm("Camera"); + LLFastTimer t(ftm); + + //Ventrella - changed camera_skyward to the new global "mCameraUpVector" + mCameraUpVector = LLVector3::z_axis; + //LLVector3 camera_skyward(0.f, 0.f, 1.f); + //end Ventrella + + U32 camera_mode = mCameraAnimating ? mLastCameraMode : mCameraMode; + + validateFocusObject(); + + if (isAgentAvatarValid() && + gAgentAvatarp->isSitting() && + camera_mode == CAMERA_MODE_MOUSELOOK) + { + //Ventrella + //changed camera_skyward to the new global "mCameraUpVector" + mCameraUpVector = mCameraUpVector * gAgentAvatarp->getRenderRotation(); + //end Ventrella + } + + if (cameraThirdPerson() && mFocusOnAvatar && LLFollowCamMgr::getActiveFollowCamParams()) + { + changeCameraToFollow(); + } + + //Ventrella + //NOTE - this needs to be integrated into a general upVector system here within llAgent. + if ( camera_mode == CAMERA_MODE_FOLLOW && mFocusOnAvatar ) + { + mCameraUpVector = mFollowCam.getUpVector(); + } + //end Ventrella + + if (mSitCameraEnabled) + { + if (mSitCameraReferenceObject->isDead()) + { + setSitCamera(LLUUID::null); + } + } + + // Update UI with our camera inputs + LLFloaterCamera* camera_floater = LLFloaterReg::findTypedInstance<LLFloaterCamera>("camera"); + if (camera_floater) + { + camera_floater->mRotate->setToggleState(gAgentCamera.getOrbitRightKey() > 0.f, // left + gAgentCamera.getOrbitUpKey() > 0.f, // top + gAgentCamera.getOrbitLeftKey() > 0.f, // right + gAgentCamera.getOrbitDownKey() > 0.f); // bottom + + camera_floater->mTrack->setToggleState(gAgentCamera.getPanLeftKey() > 0.f, // left + gAgentCamera.getPanUpKey() > 0.f, // top + gAgentCamera.getPanRightKey() > 0.f, // right + gAgentCamera.getPanDownKey() > 0.f); // bottom + } + + // Handle camera movement based on keyboard. + const F32 ORBIT_OVER_RATE = 90.f * DEG_TO_RAD; // radians per second + const F32 ORBIT_AROUND_RATE = 90.f * DEG_TO_RAD; // radians per second + const F32 PAN_RATE = 5.f; // meters per second + + if (gAgentCamera.getOrbitUpKey() || gAgentCamera.getOrbitDownKey()) + { + F32 input_rate = gAgentCamera.getOrbitUpKey() - gAgentCamera.getOrbitDownKey(); + cameraOrbitOver( input_rate * ORBIT_OVER_RATE / gFPSClamped ); + } + + if (gAgentCamera.getOrbitLeftKey() || gAgentCamera.getOrbitRightKey()) + { + F32 input_rate = gAgentCamera.getOrbitLeftKey() - gAgentCamera.getOrbitRightKey(); + cameraOrbitAround(input_rate * ORBIT_AROUND_RATE / gFPSClamped); + } + + if (gAgentCamera.getOrbitInKey() || gAgentCamera.getOrbitOutKey()) + { + F32 input_rate = gAgentCamera.getOrbitInKey() - gAgentCamera.getOrbitOutKey(); + + LLVector3d to_focus = gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()) - calcFocusPositionTargetGlobal(); + F32 distance_to_focus = (F32)to_focus.magVec(); + // Move at distance (in meters) meters per second + cameraOrbitIn( input_rate * distance_to_focus / gFPSClamped ); + } + + if (gAgentCamera.getPanInKey() || gAgentCamera.getPanOutKey()) + { + F32 input_rate = gAgentCamera.getPanInKey() - gAgentCamera.getPanOutKey(); + cameraPanIn(input_rate * PAN_RATE / gFPSClamped); + } + + if (gAgentCamera.getPanRightKey() || gAgentCamera.getPanLeftKey()) + { + F32 input_rate = gAgentCamera.getPanRightKey() - gAgentCamera.getPanLeftKey(); + cameraPanLeft(input_rate * -PAN_RATE / gFPSClamped ); + } + + if (gAgentCamera.getPanUpKey() || gAgentCamera.getPanDownKey()) + { + F32 input_rate = gAgentCamera.getPanUpKey() - gAgentCamera.getPanDownKey(); + cameraPanUp(input_rate * PAN_RATE / gFPSClamped ); + } + + // Clear camera keyboard keys. + gAgentCamera.clearOrbitKeys(); + gAgentCamera.clearPanKeys(); + + // lerp camera focus offset + mCameraFocusOffset = lerp(mCameraFocusOffset, mCameraFocusOffsetTarget, LLCriticalDamp::getInterpolant(CAMERA_FOCUS_HALF_LIFE)); + + //Ventrella + if ( mCameraMode == CAMERA_MODE_FOLLOW ) + { + if (isAgentAvatarValid()) + { + //-------------------------------------------------------------------------------- + // this is where the avatar's position and rotation are given to followCam, and + // where it is updated. All three of its attributes are updated: (1) position, + // (2) focus, and (3) upvector. They can then be queried elsewhere in llAgent. + //-------------------------------------------------------------------------------- + // *TODO: use combined rotation of frameagent and sit object + LLQuaternion avatarRotationForFollowCam = gAgentAvatarp->isSitting() ? gAgentAvatarp->getRenderRotation() : gAgent.getFrameAgent().getQuaternion(); + + LLFollowCamParams* current_cam = LLFollowCamMgr::getActiveFollowCamParams(); + if (current_cam) + { + mFollowCam.copyParams(*current_cam); + mFollowCam.setSubjectPositionAndRotation( gAgentAvatarp->getRenderPosition(), avatarRotationForFollowCam ); + mFollowCam.update(); + LLViewerJoystick::getInstance()->setCameraNeedsUpdate(true); + } + else + { + changeCameraToThirdPerson(TRUE); + } + } + } + // end Ventrella + + BOOL hit_limit; + LLVector3d camera_pos_global; + LLVector3d camera_target_global = calcCameraPositionTargetGlobal(&hit_limit); + mCameraVirtualPositionAgent = gAgent.getPosAgentFromGlobal(camera_target_global); + LLVector3d focus_target_global = calcFocusPositionTargetGlobal(); + + // perform field of view correction + mCameraFOVZoomFactor = calcCameraFOVZoomFactor(); + camera_target_global = focus_target_global + (camera_target_global - focus_target_global) * (1.f + mCameraFOVZoomFactor); + + gAgent.setShowAvatar(TRUE); // can see avatar by default + + // Adjust position for animation + if (mCameraAnimating) + { + F32 time = mAnimationTimer.getElapsedTimeF32(); + + // yet another instance of critically damped motion, hooray! + // F32 fraction_of_animation = 1.f - pow(2.f, -time / CAMERA_ZOOM_HALF_LIFE); + + // linear interpolation + F32 fraction_of_animation = time / mAnimationDuration; + + BOOL isfirstPerson = mCameraMode == CAMERA_MODE_MOUSELOOK; + BOOL wasfirstPerson = mLastCameraMode == CAMERA_MODE_MOUSELOOK; + F32 fraction_animation_to_skip; + + if (mAnimationCameraStartGlobal == camera_target_global) + { + fraction_animation_to_skip = 0.f; + } + else + { + LLVector3d cam_delta = mAnimationCameraStartGlobal - camera_target_global; + fraction_animation_to_skip = HEAD_BUFFER_SIZE / (F32)cam_delta.magVec(); + } + F32 animation_start_fraction = (wasfirstPerson) ? fraction_animation_to_skip : 0.f; + F32 animation_finish_fraction = (isfirstPerson) ? (1.f - fraction_animation_to_skip) : 1.f; + + if (fraction_of_animation < animation_finish_fraction) + { + if (fraction_of_animation < animation_start_fraction || fraction_of_animation > animation_finish_fraction ) + { + gAgent.setShowAvatar(FALSE); + } + + // ...adjust position for animation + F32 smooth_fraction_of_animation = llsmoothstep(0.0f, 1.0f, fraction_of_animation); + camera_pos_global = lerp(mAnimationCameraStartGlobal, camera_target_global, smooth_fraction_of_animation); + mFocusGlobal = lerp(mAnimationFocusStartGlobal, focus_target_global, smooth_fraction_of_animation); + } + else + { + // ...animation complete + mCameraAnimating = FALSE; + + camera_pos_global = camera_target_global; + mFocusGlobal = focus_target_global; + + gAgent.endAnimationUpdateUI(); + gAgent.setShowAvatar(TRUE); + } + + if (isAgentAvatarValid() && (mCameraMode != CAMERA_MODE_MOUSELOOK)) + { + gAgentAvatarp->updateAttachmentVisibility(mCameraMode); + } + } + else + { + camera_pos_global = camera_target_global; + mFocusGlobal = focus_target_global; + gAgent.setShowAvatar(TRUE); + } + + // smoothing + if (TRUE) + { + LLVector3d agent_pos = gAgent.getPositionGlobal(); + LLVector3d camera_pos_agent = camera_pos_global - agent_pos; + // Sitting on what you're manipulating can cause camera jitter with smoothing. + // This turns off smoothing while editing. -MG + bool in_build_mode = LLToolMgr::getInstance()->inBuildMode(); + mCameraSmoothingStop = mCameraSmoothingStop || in_build_mode; + + if (cameraThirdPerson() && !mCameraSmoothingStop) + { + const F32 SMOOTHING_HALF_LIFE = 0.02f; + + F32 smoothing = LLCriticalDamp::getInterpolant(gSavedSettings.getF32("CameraPositionSmoothing") * SMOOTHING_HALF_LIFE, FALSE); + + if (!mFocusObject) // we differentiate on avatar mode + { + // for avatar-relative focus, we smooth in avatar space - + // the avatar moves too jerkily w/r/t global space to smooth there. + + LLVector3d delta = camera_pos_agent - mCameraSmoothingLastPositionAgent; + if (delta.magVec() < MAX_CAMERA_SMOOTH_DISTANCE) // only smooth over short distances please + { + camera_pos_agent = lerp(mCameraSmoothingLastPositionAgent, camera_pos_agent, smoothing); + camera_pos_global = camera_pos_agent + agent_pos; + } + } + else + { + LLVector3d delta = camera_pos_global - mCameraSmoothingLastPositionGlobal; + if (delta.magVec() < MAX_CAMERA_SMOOTH_DISTANCE) // only smooth over short distances please + { + camera_pos_global = lerp(mCameraSmoothingLastPositionGlobal, camera_pos_global, smoothing); + } + } + } + + mCameraSmoothingLastPositionGlobal = camera_pos_global; + mCameraSmoothingLastPositionAgent = camera_pos_agent; + mCameraSmoothingStop = false; + } + + + mCameraCurrentFOVZoomFactor = lerp(mCameraCurrentFOVZoomFactor, mCameraFOVZoomFactor, LLCriticalDamp::getInterpolant(FOV_ZOOM_HALF_LIFE)); + +// llinfos << "Current FOV Zoom: " << mCameraCurrentFOVZoomFactor << " Target FOV Zoom: " << mCameraFOVZoomFactor << " Object penetration: " << mFocusObjectDist << llendl; + + F32 ui_offset = 0.f; + if( CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode ) + { + ui_offset = calcCustomizeAvatarUIOffset( camera_pos_global ); + } + + + LLVector3 focus_agent = gAgent.getPosAgentFromGlobal(mFocusGlobal); + + mCameraPositionAgent = gAgent.getPosAgentFromGlobal(camera_pos_global); + + // Move the camera + + //Ventrella + LLViewerCamera::getInstance()->updateCameraLocation(mCameraPositionAgent, mCameraUpVector, focus_agent); + //LLViewerCamera::getInstance()->updateCameraLocation(mCameraPositionAgent, camera_skyward, focus_agent); + //end Ventrella + + //RN: translate UI offset after camera is oriented properly + LLViewerCamera::getInstance()->translate(LLViewerCamera::getInstance()->getLeftAxis() * ui_offset); + + // Change FOV + LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / (1.f + mCameraCurrentFOVZoomFactor)); + + // follow camera when in customize mode + if (cameraCustomizeAvatar()) + { + setLookAt(LOOKAT_TARGET_FOCUS, NULL, mCameraPositionAgent); + } + + // update the travel distance stat + // this isn't directly related to the camera + // but this seemed like the best place to do this + LLVector3d global_pos = gAgent.getPositionGlobal(); + if (!gAgent.getLastPositionGlobal().isExactlyZero()) + { + LLVector3d delta = global_pos - gAgent.getLastPositionGlobal(); + gAgent.setDistanceTraveled(gAgent.getDistanceTraveled() + delta.magVec()); + } + gAgent.setLastPositionGlobal(global_pos); + + if (LLVOAvatar::sVisibleInFirstPerson && isAgentAvatarValid() && !gAgentAvatarp->isSitting() && cameraMouselook()) + { + LLVector3 head_pos = gAgentAvatarp->mHeadp->getWorldPosition() + + LLVector3(0.08f, 0.f, 0.05f) * gAgentAvatarp->mHeadp->getWorldRotation() + + LLVector3(0.1f, 0.f, 0.f) * gAgentAvatarp->mPelvisp->getWorldRotation(); + LLVector3 diff = mCameraPositionAgent - head_pos; + diff = diff * ~gAgentAvatarp->mRoot.getWorldRotation(); + + LLJoint* torso_joint = gAgentAvatarp->mTorsop; + LLJoint* chest_joint = gAgentAvatarp->mChestp; + LLVector3 torso_scale = torso_joint->getScale(); + LLVector3 chest_scale = chest_joint->getScale(); + + // shorten avatar skeleton to avoid foot interpenetration + if (!gAgentAvatarp->mInAir) + { + LLVector3 chest_offset = LLVector3(0.f, 0.f, chest_joint->getPosition().mV[VZ]) * torso_joint->getWorldRotation(); + F32 z_compensate = llclamp(-diff.mV[VZ], -0.2f, 1.f); + F32 scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / chest_offset.mV[VZ]), 0.5f, 1.2f); + torso_joint->setScale(LLVector3(1.f, 1.f, scale_factor)); + + LLJoint* neck_joint = gAgentAvatarp->mNeckp; + LLVector3 neck_offset = LLVector3(0.f, 0.f, neck_joint->getPosition().mV[VZ]) * chest_joint->getWorldRotation(); + scale_factor = llclamp(1.f - ((z_compensate * 0.5f) / neck_offset.mV[VZ]), 0.5f, 1.2f); + chest_joint->setScale(LLVector3(1.f, 1.f, scale_factor)); + diff.mV[VZ] = 0.f; + } + + gAgentAvatarp->mPelvisp->setPosition(gAgentAvatarp->mPelvisp->getPosition() + diff); + + gAgentAvatarp->mRoot.updateWorldMatrixChildren(); + + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) + { + LLVOAvatar::attachment_map_t::iterator curiter = iter++; + LLViewerJointAttachment* attachment = curiter->second; + for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); + attachment_iter != attachment->mAttachedObjects.end(); + ++attachment_iter) + { + LLViewerObject *attached_object = (*attachment_iter); + if (attached_object && !attached_object->isDead() && attached_object->mDrawable.notNull()) + { + // clear any existing "early" movements of attachment + attached_object->mDrawable->clearState(LLDrawable::EARLY_MOVE); + gPipeline.updateMoveNormalAsync(attached_object->mDrawable); + attached_object->updateText(); + } + } + } + + torso_joint->setScale(torso_scale); + chest_joint->setScale(chest_scale); + } +} + +void LLAgentCamera::updateLastCamera() +{ + mLastCameraMode = mCameraMode; +} + +void LLAgentCamera::updateFocusOffset() +{ + validateFocusObject(); + if (mFocusObject.notNull()) + { + LLVector3d obj_pos = gAgent.getPosGlobalFromAgent(mFocusObject->getRenderPosition()); + mFocusObjectOffset.setVec(mFocusTargetGlobal - obj_pos); + } +} + +void LLAgentCamera::validateFocusObject() +{ + if (mFocusObject.notNull() && + mFocusObject->isDead()) + { + mFocusObjectOffset.clearVec(); + clearFocusObject(); + mCameraFOVZoomFactor = 0.f; + } +} + +//----------------------------------------------------------------------------- +// calcCustomizeAvatarUIOffset() +//----------------------------------------------------------------------------- +F32 LLAgentCamera::calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_global) +{ + F32 ui_offset = 0.f; + + if (gFloaterCustomize) + { + const LLRect& rect = gFloaterCustomize->getRect(); + + // Move the camera so that the avatar isn't covered up by this floater. + F32 fraction_of_fov = 0.5f - (0.5f * (1.f - llmin(1.f, ((F32)rect.getWidth() / (F32)gViewerWindow->getWindowWidthScaled())))); + F32 apparent_angle = fraction_of_fov * LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect(); // radians + F32 offset = tan(apparent_angle); + + if( rect.mLeft < (gViewerWindow->getWindowWidthScaled() - rect.mRight) ) + { + // Move the avatar to the right (camera to the left) + ui_offset = offset; + } + else + { + // Move the avatar to the left (camera to the right) + ui_offset = -offset; + } + } + F32 range = (F32)dist_vec(camera_pos_global, getFocusGlobal()); + mUIOffset = lerp(mUIOffset, ui_offset, LLCriticalDamp::getInterpolant(0.05f)); + return mUIOffset * range; +} + +//----------------------------------------------------------------------------- +// calcFocusPositionTargetGlobal() +//----------------------------------------------------------------------------- +LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal() +{ + if (mFocusObject.notNull() && mFocusObject->isDead()) + { + clearFocusObject(); + } + + // Ventrella + if (mCameraMode == CAMERA_MODE_FOLLOW && mFocusOnAvatar) + { + mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(mFollowCam.getSimulatedFocus()); + return mFocusTargetGlobal; + }// End Ventrella + else if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + LLVector3d at_axis(1.0, 0.0, 0.0); + LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion(); + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + LLViewerObject* root_object = (LLViewerObject*)gAgentAvatarp->getRoot(); + if (!root_object->flagCameraDecoupled()) + { + agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation(); + } + } + at_axis = at_axis * agent_rot; + mFocusTargetGlobal = calcCameraPositionTargetGlobal() + at_axis; + return mFocusTargetGlobal; + } + else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR) + { + return mFocusTargetGlobal; + } + else if (!mFocusOnAvatar) + { + if (mFocusObject.notNull() && !mFocusObject->isDead() && mFocusObject->mDrawable.notNull()) + { + LLDrawable* drawablep = mFocusObject->mDrawable; + + if (mTrackFocusObject && + drawablep && + drawablep->isActive()) + { + if (!mFocusObject->isAvatar()) + { + if (mFocusObject->isSelected()) + { + gPipeline.updateMoveNormalAsync(drawablep); + } + else + { + if (drawablep->isState(LLDrawable::MOVE_UNDAMPED)) + { + gPipeline.updateMoveNormalAsync(drawablep); + } + else + { + gPipeline.updateMoveDampedAsync(drawablep); + } + } + } + } + // if not tracking object, update offset based on new object position + else + { + updateFocusOffset(); + } + LLVector3 focus_agent = mFocusObject->getRenderPosition() + mFocusObjectOffset; + mFocusTargetGlobal.setVec(gAgent.getPosGlobalFromAgent(focus_agent)); + } + return mFocusTargetGlobal; + } + else if (mSitCameraEnabled && isAgentAvatarValid() && gAgentAvatarp->isSitting() && mSitCameraReferenceObject.notNull()) + { + // sit camera + LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition(); + LLQuaternion object_rot = mSitCameraReferenceObject->getRenderRotation(); + + LLVector3 target_pos = object_pos + (mSitCameraFocus * object_rot); + return gAgent.getPosGlobalFromAgent(target_pos); + } + else + { + return gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(); + } +} + +LLVector3d LLAgentCamera::calcThirdPersonFocusOffset() +{ + // ...offset from avatar + LLVector3d focus_offset; + LLQuaternion agent_rot = gAgent.getFrameAgent().getQuaternion(); + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + agent_rot *= ((LLViewerObject*)(gAgentAvatarp->getParent()))->getRenderRotation(); + } + + focus_offset = mFocusOffsetInitial[mCameraPreset] * agent_rot; + return focus_offset; +} + +void LLAgentCamera::setupSitCamera() +{ + // agent frame entering this function is in world coordinates + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + LLQuaternion parent_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation(); + // slam agent coordinate frame to proper parent local version + LLVector3 at_axis = gAgent.getFrameAgent().getAtAxis(); + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis * ~parent_rot); + } +} + +//----------------------------------------------------------------------------- +// getCameraPositionAgent() +//----------------------------------------------------------------------------- +const LLVector3 &LLAgentCamera::getCameraPositionAgent() const +{ + return LLViewerCamera::getInstance()->getOrigin(); +} + +//----------------------------------------------------------------------------- +// getCameraPositionGlobal() +//----------------------------------------------------------------------------- +LLVector3d LLAgentCamera::getCameraPositionGlobal() const +{ + return gAgent.getPosGlobalFromAgent(LLViewerCamera::getInstance()->getOrigin()); +} + +//----------------------------------------------------------------------------- +// calcCameraFOVZoomFactor() +//----------------------------------------------------------------------------- +F32 LLAgentCamera::calcCameraFOVZoomFactor() +{ + LLVector3 camera_offset_dir; + camera_offset_dir.setVec(mCameraFocusOffset); + + if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + return 0.f; + } + else if (mFocusObject.notNull() && !mFocusObject->isAvatar() && !mFocusOnAvatar) + { + // don't FOV zoom on mostly transparent objects + LLVector3 focus_offset = mFocusObjectOffset; + F32 obj_min_dist = 0.f; + calcCameraMinDistance(obj_min_dist); + F32 current_distance = llmax(0.001f, camera_offset_dir.magVec()); + + mFocusObjectDist = obj_min_dist - current_distance; + + F32 new_fov_zoom = llclamp(mFocusObjectDist / current_distance, 0.f, 1000.f); + return new_fov_zoom; + } + else // focusing on land or avatar + { + // keep old field of view until user changes focus explicitly + return mCameraFOVZoomFactor; + //return 0.f; + } +} + +//----------------------------------------------------------------------------- +// calcCameraPositionTargetGlobal() +//----------------------------------------------------------------------------- +LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit) +{ + // Compute base camera position and look-at points. + F32 camera_land_height; + LLVector3d frame_center_global = !isAgentAvatarValid() ? + gAgent.getPositionGlobal() : + gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition()); + + BOOL isConstrained = FALSE; + LLVector3d head_offset; + head_offset.setVec(mThirdPersonHeadOffset); + + LLVector3d camera_position_global; + + // Ventrella + if (mCameraMode == CAMERA_MODE_FOLLOW && mFocusOnAvatar) + { + camera_position_global = gAgent.getPosGlobalFromAgent(mFollowCam.getSimulatedPosition()); + }// End Ventrella + else if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + if (!isAgentAvatarValid() || gAgentAvatarp->mDrawable.isNull()) + { + llwarns << "Null avatar drawable!" << llendl; + return LLVector3d::zero; + } + head_offset.clearVec(); + if (gAgentAvatarp->isSitting() && gAgentAvatarp->getParent()) + { + gAgentAvatarp->updateHeadOffset(); + head_offset.mdV[VX] = gAgentAvatarp->mHeadOffset.mV[VX]; + head_offset.mdV[VY] = gAgentAvatarp->mHeadOffset.mV[VY]; + head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ] + 0.1f; + const LLMatrix4& mat = ((LLViewerObject*) gAgentAvatarp->getParent())->getRenderMatrix(); + camera_position_global = gAgent.getPosGlobalFromAgent + ((gAgentAvatarp->getPosition()+ + LLVector3(head_offset)*gAgentAvatarp->getRotation()) * mat); + } + else + { + head_offset.mdV[VZ] = gAgentAvatarp->mHeadOffset.mV[VZ]; + if (gAgentAvatarp->isSitting()) + { + head_offset.mdV[VZ] += 0.1; + } + camera_position_global = gAgent.getPosGlobalFromAgent(gAgentAvatarp->getRenderPosition());//frame_center_global; + head_offset = head_offset * gAgentAvatarp->getRenderRotation(); + camera_position_global = camera_position_global + head_offset; + } + } + else if (mCameraMode == CAMERA_MODE_THIRD_PERSON && mFocusOnAvatar) + { + LLVector3 local_camera_offset; + F32 camera_distance = 0.f; + + if (mSitCameraEnabled + && isAgentAvatarValid() + && gAgentAvatarp->isSitting() + && mSitCameraReferenceObject.notNull()) + { + // sit camera + LLVector3 object_pos = mSitCameraReferenceObject->getRenderPosition(); + LLQuaternion object_rot = mSitCameraReferenceObject->getRenderRotation(); + + LLVector3 target_pos = object_pos + (mSitCameraPos * object_rot); + + camera_position_global = gAgent.getPosGlobalFromAgent(target_pos); + } + else + { + local_camera_offset = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale"); + + // are we sitting down? + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + LLQuaternion parent_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation(); + // slam agent coordinate frame to proper parent local version + LLVector3 at_axis = gAgent.getFrameAgent().getAtAxis() * parent_rot; + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis * ~parent_rot); + + local_camera_offset = local_camera_offset * gAgent.getFrameAgent().getQuaternion() * parent_rot; + } + else + { + local_camera_offset = gAgent.getFrameAgent().rotateToAbsolute( local_camera_offset ); + } + + if (!mCameraCollidePlane.isExactlyZero() && (!isAgentAvatarValid() || !gAgentAvatarp->isSitting())) + { + LLVector3 plane_normal; + plane_normal.setVec(mCameraCollidePlane.mV); + + F32 offset_dot_norm = local_camera_offset * plane_normal; + if (llabs(offset_dot_norm) < 0.001f) + { + offset_dot_norm = 0.001f; + } + + camera_distance = local_camera_offset.normalize(); + + F32 pos_dot_norm = gAgent.getPosAgentFromGlobal(frame_center_global + head_offset) * plane_normal; + + // if agent is outside the colliding half-plane + if (pos_dot_norm > mCameraCollidePlane.mV[VW]) + { + // check to see if camera is on the opposite side (inside) the half-plane + if (offset_dot_norm + pos_dot_norm < mCameraCollidePlane.mV[VW]) + { + // diminish offset by factor to push it back outside the half-plane + camera_distance *= (pos_dot_norm - mCameraCollidePlane.mV[VW] - CAMERA_COLLIDE_EPSILON) / -offset_dot_norm; + } + } + else + { + if (offset_dot_norm + pos_dot_norm > mCameraCollidePlane.mV[VW]) + { + camera_distance *= (mCameraCollidePlane.mV[VW] - pos_dot_norm - CAMERA_COLLIDE_EPSILON) / offset_dot_norm; + } + } + } + else + { + camera_distance = local_camera_offset.normalize(); + } + + mTargetCameraDistance = llmax(camera_distance, MIN_CAMERA_DISTANCE); + + if (mTargetCameraDistance != mCurrentCameraDistance) + { + F32 camera_lerp_amt = LLCriticalDamp::getInterpolant(CAMERA_ZOOM_HALF_LIFE); + + mCurrentCameraDistance = lerp(mCurrentCameraDistance, mTargetCameraDistance, camera_lerp_amt); + } + + // Make the camera distance current + local_camera_offset *= mCurrentCameraDistance; + + // set the global camera position + LLVector3d camera_offset; + + LLVector3 av_pos = !isAgentAvatarValid() ? LLVector3::zero : gAgentAvatarp->getRenderPosition(); + camera_offset.setVec( local_camera_offset ); + camera_position_global = frame_center_global + head_offset + camera_offset; + + if (isAgentAvatarValid()) + { + LLVector3d camera_lag_d; + F32 lag_interp = LLCriticalDamp::getInterpolant(CAMERA_LAG_HALF_LIFE); + LLVector3 target_lag; + LLVector3 vel = gAgent.getVelocity(); + + // lag by appropriate amount for flying + F32 time_in_air = gAgentAvatarp->mTimeInAir.getElapsedTimeF32(); + if(!mCameraAnimating && gAgentAvatarp->mInAir && time_in_air > GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME) + { + LLVector3 frame_at_axis = gAgent.getFrameAgent().getAtAxis(); + frame_at_axis -= projected_vec(frame_at_axis, gAgent.getReferenceUpVector()); + frame_at_axis.normalize(); + + //transition smoothly in air mode, to avoid camera pop + F32 u = (time_in_air - GROUND_TO_AIR_CAMERA_TRANSITION_START_TIME) / GROUND_TO_AIR_CAMERA_TRANSITION_TIME; + u = llclamp(u, 0.f, 1.f); + + lag_interp *= u; + + if (gViewerWindow->getLeftMouseDown() && gViewerWindow->getLastPick().mObjectID == gAgentAvatarp->getID()) + { + // disable camera lag when using mouse-directed steering + target_lag.clearVec(); + } + else + { + target_lag = vel * gSavedSettings.getF32("DynamicCameraStrength") / 30.f; + } + + mCameraLag = lerp(mCameraLag, target_lag, lag_interp); + + F32 lag_dist = mCameraLag.magVec(); + if (lag_dist > MAX_CAMERA_LAG) + { + mCameraLag = mCameraLag * MAX_CAMERA_LAG / lag_dist; + } + + // clamp camera lag so that avatar is always in front + F32 dot = (mCameraLag - (frame_at_axis * (MIN_CAMERA_LAG * u))) * frame_at_axis; + if (dot < -(MIN_CAMERA_LAG * u)) + { + mCameraLag -= (dot + (MIN_CAMERA_LAG * u)) * frame_at_axis; + } + } + else + { + mCameraLag = lerp(mCameraLag, LLVector3::zero, LLCriticalDamp::getInterpolant(0.15f)); + } + + camera_lag_d.setVec(mCameraLag); + camera_position_global = camera_position_global - camera_lag_d; + } + } + } + else + { + LLVector3d focusPosGlobal = calcFocusPositionTargetGlobal(); + // camera gets pushed out later wrt mCameraFOVZoomFactor...this is "raw" value + camera_position_global = focusPosGlobal + mCameraFocusOffset; + } + + if (!gSavedSettings.getBOOL("DisableCameraConstraints") && !gAgent.isGodlike()) + { + LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global); + bool constrain = true; + if(regionp && regionp->canManageEstate()) + { + constrain = false; + } + if(constrain) + { + F32 max_dist = (CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode) ? APPEARANCE_MAX_ZOOM : mDrawDistance; + + LLVector3d camera_offset = camera_position_global - gAgent.getPositionGlobal(); + F32 camera_distance = (F32)camera_offset.magVec(); + + if(camera_distance > max_dist) + { + camera_position_global = gAgent.getPositionGlobal() + (max_dist/camera_distance)*camera_offset; + isConstrained = TRUE; + } + } + +// JC - Could constrain camera based on parcel stuff here. +// LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(camera_position_global); +// +// if (regionp && !regionp->mParcelOverlay->isBuildCameraAllowed(regionp->getPosRegionFromGlobal(camera_position_global))) +// { +// camera_position_global = last_position_global; +// +// isConstrained = TRUE; +// } + } + + // Don't let camera go underground + F32 camera_min_off_ground = getCameraMinOffGround(); + + camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global); + + if (camera_position_global.mdV[VZ] < camera_land_height + camera_min_off_ground) + { + camera_position_global.mdV[VZ] = camera_land_height + camera_min_off_ground; + isConstrained = TRUE; + } + + + if (hit_limit) + { + *hit_limit = isConstrained; + } + + return camera_position_global; +} + + +LLVector3 LLAgentCamera::getCameraOffsetInitial() +{ + return mCameraOffsetInitial[mCameraPreset]; +} + + +//----------------------------------------------------------------------------- +// handleScrollWheel() +//----------------------------------------------------------------------------- +void LLAgentCamera::handleScrollWheel(S32 clicks) +{ + if (mCameraMode == CAMERA_MODE_FOLLOW && getFocusOnAvatar()) + { + if (!mFollowCam.getPositionLocked()) // not if the followCam position is locked in place + { + mFollowCam.zoom(clicks); + if (mFollowCam.isZoomedToMinimumDistance()) + { + changeCameraToMouselook(FALSE); + } + } + } + else + { + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + const F32 ROOT_ROOT_TWO = sqrt(F_SQRT2); + + // Block if camera is animating + if (mCameraAnimating) + { + return; + } + + if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) + { + F32 zoom_factor = (F32)pow(0.8, -clicks); + cameraZoomIn(zoom_factor); + } + else if (mFocusOnAvatar && (mCameraMode == CAMERA_MODE_THIRD_PERSON)) + { + F32 camera_offset_initial_mag = getCameraOffsetInitial().magVec(); + + F32 current_zoom_fraction = mTargetCameraDistance / (camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale")); + current_zoom_fraction *= 1.f - pow(ROOT_ROOT_TWO, clicks); + + cameraOrbitIn(current_zoom_fraction * camera_offset_initial_mag * gSavedSettings.getF32("CameraOffsetScale")); + } + else + { + F32 current_zoom_fraction = (F32)mCameraFocusOffsetTarget.magVec(); + cameraOrbitIn(current_zoom_fraction * (1.f - pow(ROOT_ROOT_TWO, clicks))); + } + } +} + + +//----------------------------------------------------------------------------- +// getCameraMinOffGround() +//----------------------------------------------------------------------------- +F32 LLAgentCamera::getCameraMinOffGround() +{ + if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + return 0.f; + } + else + { + if (gSavedSettings.getBOOL("DisableCameraConstraints")) + { + return -1000.f; + } + else + { + return 0.5f; + } + } +} + + +//----------------------------------------------------------------------------- +// resetCamera() +//----------------------------------------------------------------------------- +void LLAgentCamera::resetCamera() +{ + // Remove any pitch from the avatar + LLVector3 at = gAgent.getFrameAgent().getAtAxis(); + at.mV[VZ] = 0.f; + at.normalize(); + gAgent.resetAxes(at); + // have to explicitly clear field of view zoom now + mCameraFOVZoomFactor = 0.f; + + updateCamera(); +} + +//----------------------------------------------------------------------------- +// changeCameraToMouselook() +//----------------------------------------------------------------------------- +void LLAgentCamera::changeCameraToMouselook(BOOL animate) +{ + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + return; + } + + // visibility changes at end of animation + gViewerWindow->getWindow()->resetBusyCount(); + + // unpause avatar animation + gAgent.unpauseAnimation(); + + LLToolMgr::getInstance()->setCurrentToolset(gMouselookToolset); + + if (isAgentAvatarValid()) + { + gAgentAvatarp->stopMotion(ANIM_AGENT_BODY_NOISE); + gAgentAvatarp->stopMotion(ANIM_AGENT_BREATHE_ROT); + } + + //gViewerWindow->stopGrab(); + LLSelectMgr::getInstance()->deselectAll(); + gViewerWindow->hideCursor(); + gViewerWindow->moveCursorToCenter(); + + if (mCameraMode != CAMERA_MODE_MOUSELOOK) + { + gFocusMgr.setKeyboardFocus(NULL); + + updateLastCamera(); + mCameraMode = CAMERA_MODE_MOUSELOOK; + const U32 old_flags = gAgent.getControlFlags(); + gAgent.setControlFlags(AGENT_CONTROL_MOUSELOOK); + if (old_flags != gAgent.getControlFlags()) + { + gAgent.setFlagsDirty(); + } + + if (animate) + { + startCameraAnimation(); + } + else + { + mCameraAnimating = FALSE; + gAgent.endAnimationUpdateUI(); + } + } +} + + +//----------------------------------------------------------------------------- +// changeCameraToDefault() +//----------------------------------------------------------------------------- +void LLAgentCamera::changeCameraToDefault() +{ + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + return; + } + + if (LLFollowCamMgr::getActiveFollowCamParams()) + { + changeCameraToFollow(); + } + else + { + changeCameraToThirdPerson(); + } +} + + +// Ventrella +//----------------------------------------------------------------------------- +// changeCameraToFollow() +//----------------------------------------------------------------------------- +void LLAgentCamera::changeCameraToFollow(BOOL animate) +{ + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + return; + } + + if(mCameraMode != CAMERA_MODE_FOLLOW) + { + if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + animate = FALSE; + } + startCameraAnimation(); + + updateLastCamera(); + mCameraMode = CAMERA_MODE_FOLLOW; + + // bang-in the current focus, position, and up vector of the follow cam + mFollowCam.reset(mCameraPositionAgent, LLViewerCamera::getInstance()->getPointOfInterest(), LLVector3::z_axis); + + if (gBasicToolset) + { + LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + } + + if (isAgentAvatarValid()) + { + gAgentAvatarp->mPelvisp->setPosition(LLVector3::zero); + gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE ); + gAgentAvatarp->startMotion( ANIM_AGENT_BREATHE_ROT ); + } + + // unpause avatar animation + gAgent.unpauseAnimation(); + + const U32 old_flags = gAgent.getControlFlags(); + gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK); + if (old_flags != gAgent.getControlFlags()) + { + gAgent.setFlagsDirty(); + } + + if (animate) + { + startCameraAnimation(); + } + else + { + mCameraAnimating = FALSE; + gAgent.endAnimationUpdateUI(); + } + } +} + +//----------------------------------------------------------------------------- +// changeCameraToThirdPerson() +//----------------------------------------------------------------------------- +void LLAgentCamera::changeCameraToThirdPerson(BOOL animate) +{ + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + return; + } + + gViewerWindow->getWindow()->resetBusyCount(); + + mCameraZoomFraction = INITIAL_ZOOM_FRACTION; + + if (isAgentAvatarValid()) + { + if (!gAgentAvatarp->isSitting()) + { + gAgentAvatarp->mPelvisp->setPosition(LLVector3::zero); + } + gAgentAvatarp->startMotion(ANIM_AGENT_BODY_NOISE); + gAgentAvatarp->startMotion(ANIM_AGENT_BREATHE_ROT); + } + + LLVector3 at_axis; + + // unpause avatar animation + gAgent.unpauseAnimation(); + + if (mCameraMode != CAMERA_MODE_THIRD_PERSON) + { + if (gBasicToolset) + { + LLToolMgr::getInstance()->setCurrentToolset(gBasicToolset); + } + + mCameraLag.clearVec(); + if (mCameraMode == CAMERA_MODE_MOUSELOOK) + { + mCurrentCameraDistance = MIN_CAMERA_DISTANCE; + mTargetCameraDistance = MIN_CAMERA_DISTANCE; + animate = FALSE; + } + updateLastCamera(); + mCameraMode = CAMERA_MODE_THIRD_PERSON; + const U32 old_flags = gAgent.getControlFlags(); + gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK); + if (old_flags != gAgent.getControlFlags()) + { + gAgent.setFlagsDirty(); + } + + } + + // Remove any pitch from the avatar + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation(); + at_axis = LLViewerCamera::getInstance()->getAtAxis(); + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis * ~obj_rot); + } + else + { + at_axis = gAgent.getFrameAgent().getAtAxis(); + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis); + } + + + if (animate) + { + startCameraAnimation(); + } + else + { + mCameraAnimating = FALSE; + gAgent.endAnimationUpdateUI(); + } +} + +//----------------------------------------------------------------------------- +// changeCameraToCustomizeAvatar() +//----------------------------------------------------------------------------- +void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL camera_animate) +{ + if (LLViewerJoystick::getInstance()->getOverrideCamera()) + { + return; + } + + gAgent.standUp(); // force stand up + gViewerWindow->getWindow()->resetBusyCount(); + + if (gFaceEditToolset) + { + LLToolMgr::getInstance()->setCurrentToolset(gFaceEditToolset); + } + + if (camera_animate) + { + startCameraAnimation(); + } + + // Remove any pitch from the avatar + //LLVector3 at = gAgent.getFrameAgent().getAtAxis(); + //at.mV[VZ] = 0.f; + //at.normalize(); + //gAgent.resetAxes(at); + + if (mCameraMode != CAMERA_MODE_CUSTOMIZE_AVATAR) + { + updateLastCamera(); + mCameraMode = CAMERA_MODE_CUSTOMIZE_AVATAR; + const U32 old_flags = gAgent.getControlFlags(); + gAgent.clearControlFlags(AGENT_CONTROL_MOUSELOOK); + if (old_flags != gAgent.getControlFlags()) + { + gAgent.setFlagsDirty(); + } + + gFocusMgr.setKeyboardFocus( NULL ); + gFocusMgr.setMouseCapture( NULL ); + + LLVOAvatarSelf::onCustomizeStart(); + } + + if (isAgentAvatarValid()) + { + if(avatar_animate) + { + // Remove any pitch from the avatar + LLVector3 at = gAgent.getFrameAgent().getAtAxis(); + at.mV[VZ] = 0.f; + at.normalize(); + gAgent.resetAxes(at); + + gAgent.sendAnimationRequest(ANIM_AGENT_CUSTOMIZE, ANIM_REQUEST_START); + gAgent.setCustomAnim(TRUE); + gAgentAvatarp->startMotion(ANIM_AGENT_CUSTOMIZE); + LLMotion* turn_motion = gAgentAvatarp->findMotion(ANIM_AGENT_CUSTOMIZE); + + if (turn_motion) + { + mAnimationDuration = turn_motion->getDuration() + CUSTOMIZE_AVATAR_CAMERA_ANIM_SLOP; + + } + else + { + mAnimationDuration = gSavedSettings.getF32("ZoomTime"); + } + } + setFocusGlobal(LLVector3d::zero); + } + else + { + mCameraAnimating = FALSE; + gAgent.endAnimationUpdateUI(); + } +} + + +void LLAgentCamera::switchCameraPreset(ECameraPreset preset) +{ + //zoom is supposed to be reset for the front and group views + mCameraZoomFraction = 1.f; + + //focusing on avatar in that case means following him on movements + mFocusOnAvatar = TRUE; + + mCameraPreset = preset; + + gSavedSettings.setU32("CameraPreset", mCameraPreset); +} + + +// +// Focus point management +// + +//----------------------------------------------------------------------------- +// startCameraAnimation() +//----------------------------------------------------------------------------- +void LLAgentCamera::startCameraAnimation() +{ + mAnimationCameraStartGlobal = getCameraPositionGlobal(); + mAnimationFocusStartGlobal = mFocusGlobal; + mAnimationTimer.reset(); + mCameraAnimating = TRUE; + mAnimationDuration = gSavedSettings.getF32("ZoomTime"); +} + +//----------------------------------------------------------------------------- +// stopCameraAnimation() +//----------------------------------------------------------------------------- +void LLAgentCamera::stopCameraAnimation() +{ + mCameraAnimating = FALSE; +} + +void LLAgentCamera::clearFocusObject() +{ + if (mFocusObject.notNull()) + { + startCameraAnimation(); + + setFocusObject(NULL); + mFocusObjectOffset.clearVec(); + } +} + +void LLAgentCamera::setFocusObject(LLViewerObject* object) +{ + mFocusObject = object; +} + +// Focus on a point, but try to keep camera position stable. +//----------------------------------------------------------------------------- +// setFocusGlobal() +//----------------------------------------------------------------------------- +void LLAgentCamera::setFocusGlobal(const LLPickInfo& pick) +{ + LLViewerObject* objectp = gObjectList.findObject(pick.mObjectID); + + if (objectp) + { + // focus on object plus designated offset + // which may or may not be same as pick.mPosGlobal + setFocusGlobal(objectp->getPositionGlobal() + LLVector3d(pick.mObjectOffset), pick.mObjectID); + } + else + { + // focus directly on point where user clicked + setFocusGlobal(pick.mPosGlobal, pick.mObjectID); + } +} + + +void LLAgentCamera::setFocusGlobal(const LLVector3d& focus, const LLUUID &object_id) +{ + setFocusObject(gObjectList.findObject(object_id)); + LLVector3d old_focus = mFocusTargetGlobal; + LLViewerObject *focus_obj = mFocusObject; + + // if focus has changed + if (old_focus != focus) + { + if (focus.isExactlyZero()) + { + if (isAgentAvatarValid()) + { + mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition()); + } + else + { + mFocusTargetGlobal = gAgent.getPositionGlobal(); + } + mCameraFocusOffsetTarget = getCameraPositionGlobal() - mFocusTargetGlobal; + mCameraFocusOffset = mCameraFocusOffsetTarget; + setLookAt(LOOKAT_TARGET_CLEAR); + } + else + { + mFocusTargetGlobal = focus; + if (!focus_obj) + { + mCameraFOVZoomFactor = 0.f; + } + + mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(mCameraVirtualPositionAgent) - mFocusTargetGlobal; + + startCameraAnimation(); + + if (focus_obj) + { + if (focus_obj->isAvatar()) + { + setLookAt(LOOKAT_TARGET_FOCUS, focus_obj); + } + else + { + setLookAt(LOOKAT_TARGET_FOCUS, focus_obj, (gAgent.getPosAgentFromGlobal(focus) - focus_obj->getRenderPosition()) * ~focus_obj->getRenderRotation()); + } + } + else + { + setLookAt(LOOKAT_TARGET_FOCUS, NULL, gAgent.getPosAgentFromGlobal(mFocusTargetGlobal)); + } + } + } + else // focus == mFocusTargetGlobal + { + if (focus.isExactlyZero()) + { + if (isAgentAvatarValid()) + { + mFocusTargetGlobal = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mHeadp->getWorldPosition()); + } + else + { + mFocusTargetGlobal = gAgent.getPositionGlobal(); + } + } + mCameraFocusOffsetTarget = (getCameraPositionGlobal() - mFocusTargetGlobal) / (1.f + mCameraFOVZoomFactor);; + mCameraFocusOffset = mCameraFocusOffsetTarget; + } + + if (mFocusObject.notNull()) + { + // for attachments, make offset relative to avatar, not the attachment + if (mFocusObject->isAttachment()) + { + while (mFocusObject.notNull() && !mFocusObject->isAvatar()) + { + mFocusObject = (LLViewerObject*) mFocusObject->getParent(); + } + setFocusObject((LLViewerObject*)mFocusObject); + } + updateFocusOffset(); + } +} + +// Used for avatar customization +//----------------------------------------------------------------------------- +// setCameraPosAndFocusGlobal() +//----------------------------------------------------------------------------- +void LLAgentCamera::setCameraPosAndFocusGlobal(const LLVector3d& camera_pos, const LLVector3d& focus, const LLUUID &object_id) +{ + LLVector3d old_focus = mFocusTargetGlobal; + + F64 focus_delta_squared = (old_focus - focus).magVecSquared(); + const F64 ANIM_EPSILON_SQUARED = 0.0001; + if (focus_delta_squared > ANIM_EPSILON_SQUARED) + { + startCameraAnimation(); + + if (CAMERA_MODE_CUSTOMIZE_AVATAR == mCameraMode) + { + // Compensate for the fact that the camera has already been offset to make room for LLFloaterCustomize. + mAnimationCameraStartGlobal -= LLVector3d(LLViewerCamera::getInstance()->getLeftAxis() * calcCustomizeAvatarUIOffset( mAnimationCameraStartGlobal )); + } + } + + //LLViewerCamera::getInstance()->setOrigin( gAgent.getPosAgentFromGlobal( camera_pos ) ); + setFocusObject(gObjectList.findObject(object_id)); + mFocusTargetGlobal = focus; + mCameraFocusOffsetTarget = camera_pos - focus; + mCameraFocusOffset = mCameraFocusOffsetTarget; + + if (mFocusObject) + { + if (mFocusObject->isAvatar()) + { + setLookAt(LOOKAT_TARGET_FOCUS, mFocusObject); + } + else + { + setLookAt(LOOKAT_TARGET_FOCUS, mFocusObject, (gAgent.getPosAgentFromGlobal(focus) - mFocusObject->getRenderPosition()) * ~mFocusObject->getRenderRotation()); + } + } + else + { + setLookAt(LOOKAT_TARGET_FOCUS, NULL, gAgent.getPosAgentFromGlobal(mFocusTargetGlobal)); + } + + if (mCameraAnimating) + { + const F64 ANIM_METERS_PER_SECOND = 10.0; + const F64 MIN_ANIM_SECONDS = 0.5; + const F64 MAX_ANIM_SECONDS = 10.0; + F64 anim_duration = llmax( MIN_ANIM_SECONDS, sqrt(focus_delta_squared) / ANIM_METERS_PER_SECOND ); + anim_duration = llmin( anim_duration, MAX_ANIM_SECONDS ); + setAnimationDuration( (F32)anim_duration ); + } + + updateFocusOffset(); +} + +//----------------------------------------------------------------------------- +// setSitCamera() +//----------------------------------------------------------------------------- +void LLAgentCamera::setSitCamera(const LLUUID &object_id, const LLVector3 &camera_pos, const LLVector3 &camera_focus) +{ + BOOL camera_enabled = !object_id.isNull(); + + if (camera_enabled) + { + LLViewerObject *reference_object = gObjectList.findObject(object_id); + if (reference_object) + { + //convert to root object relative? + mSitCameraPos = camera_pos; + mSitCameraFocus = camera_focus; + mSitCameraReferenceObject = reference_object; + mSitCameraEnabled = TRUE; + } + } + else + { + mSitCameraPos.clearVec(); + mSitCameraFocus.clearVec(); + mSitCameraReferenceObject = NULL; + mSitCameraEnabled = FALSE; + } +} + +//----------------------------------------------------------------------------- +// setFocusOnAvatar() +//----------------------------------------------------------------------------- +void LLAgentCamera::setFocusOnAvatar(BOOL focus_on_avatar, BOOL animate) +{ + if (focus_on_avatar != mFocusOnAvatar) + { + if (animate) + { + startCameraAnimation(); + } + else + { + stopCameraAnimation(); + } + } + + //RN: when focused on the avatar, we're not "looking" at it + // looking implies intent while focusing on avatar means + // you're just walking around with a camera on you...eesh. + if (!mFocusOnAvatar && focus_on_avatar) + { + setFocusGlobal(LLVector3d::zero); + mCameraFOVZoomFactor = 0.f; + if (mCameraMode == CAMERA_MODE_THIRD_PERSON) + { + LLVector3 at_axis; + if (isAgentAvatarValid() && gAgentAvatarp->getParent()) + { + LLQuaternion obj_rot = ((LLViewerObject*)gAgentAvatarp->getParent())->getRenderRotation(); + at_axis = LLViewerCamera::getInstance()->getAtAxis(); + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis * ~obj_rot); + } + else + { + at_axis = LLViewerCamera::getInstance()->getAtAxis(); + at_axis.mV[VZ] = 0.f; + at_axis.normalize(); + gAgent.resetAxes(at_axis); + } + } + } + // unlocking camera from avatar + else if (mFocusOnAvatar && !focus_on_avatar) + { + // keep camera focus point consistent, even though it is now unlocked + setFocusGlobal(gAgent.getPositionGlobal() + calcThirdPersonFocusOffset(), gAgent.getID()); + } + + mFocusOnAvatar = focus_on_avatar; +} + + +BOOL LLAgentCamera::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) +{ + if(object && object->isAttachment()) + { + LLViewerObject* parent = object; + while(parent) + { + if (parent == gAgentAvatarp) + { + // looking at an attachment on ourselves, which we don't want to do + object = gAgentAvatarp; + position.clearVec(); + } + parent = (LLViewerObject*)parent->getParent(); + } + } + if(!mLookAt || mLookAt->isDead()) + { + mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT); + mLookAt->setSourceObject(gAgentAvatarp); + } + + return mLookAt->setLookAt(target_type, object, position); +} + +//----------------------------------------------------------------------------- +// lookAtLastChat() +//----------------------------------------------------------------------------- +void LLAgentCamera::lookAtLastChat() +{ + // Block if camera is animating or not in normal third person camera mode + if (mCameraAnimating || !cameraThirdPerson()) + { + return; + } + + LLViewerObject *chatter = gObjectList.findObject(gAgent.getLastChatter()); + if (!chatter) + { + return; + } + + LLVector3 delta_pos; + if (chatter->isAvatar()) + { + LLVOAvatar *chatter_av = (LLVOAvatar*)chatter; + if (isAgentAvatarValid() && chatter_av->mHeadp) + { + delta_pos = chatter_av->mHeadp->getWorldPosition() - gAgentAvatarp->mHeadp->getWorldPosition(); + } + else + { + delta_pos = chatter->getPositionAgent() - gAgent.getPositionAgent(); + } + delta_pos.normalize(); + + gAgent.setControlFlags(AGENT_CONTROL_STOP); + + changeCameraToThirdPerson(); + + LLVector3 new_camera_pos = gAgentAvatarp->mHeadp->getWorldPosition(); + LLVector3 left = delta_pos % LLVector3::z_axis; + left.normalize(); + LLVector3 up = left % delta_pos; + up.normalize(); + new_camera_pos -= delta_pos * 0.4f; + new_camera_pos += left * 0.3f; + new_camera_pos += up * 0.2f; + if (chatter_av->mHeadp) + { + setFocusGlobal(gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()), gAgent.getLastChatter()); + mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - gAgent.getPosGlobalFromAgent(chatter_av->mHeadp->getWorldPosition()); + } + else + { + setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter()); + mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); + } + setFocusOnAvatar(FALSE, TRUE); + } + else + { + delta_pos = chatter->getRenderPosition() - gAgent.getPositionAgent(); + delta_pos.normalize(); + + gAgent.setControlFlags(AGENT_CONTROL_STOP); + + changeCameraToThirdPerson(); + + LLVector3 new_camera_pos = gAgentAvatarp->mHeadp->getWorldPosition(); + LLVector3 left = delta_pos % LLVector3::z_axis; + left.normalize(); + LLVector3 up = left % delta_pos; + up.normalize(); + new_camera_pos -= delta_pos * 0.4f; + new_camera_pos += left * 0.3f; + new_camera_pos += up * 0.2f; + + setFocusGlobal(chatter->getPositionGlobal(), gAgent.getLastChatter()); + mCameraFocusOffsetTarget = gAgent.getPosGlobalFromAgent(new_camera_pos) - chatter->getPositionGlobal(); + setFocusOnAvatar(FALSE, TRUE); + } +} + +BOOL LLAgentCamera::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) +{ + // disallow pointing at attachments and avatars + if (object && (object->isAttachment() || object->isAvatar())) + { + return FALSE; + } + if (!mPointAt || mPointAt->isDead()) + { + mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT); + mPointAt->setSourceObject(gAgentAvatarp); + } + return mPointAt->setPointAt(target_type, object, position); +} + +ELookAtType LLAgentCamera::getLookAtType() +{ + if (mLookAt) + { + return mLookAt->getLookAtType(); + } + return LOOKAT_TARGET_NONE; +} + +EPointAtType LLAgentCamera::getPointAtType() +{ + if (mPointAt) + { + return mPointAt->getPointAtType(); + } + return POINTAT_TARGET_NONE; +} + +void LLAgentCamera::clearGeneralKeys() +{ + mAtKey = 0; + mWalkKey = 0; + mLeftKey = 0; + mUpKey = 0; + mYawKey = 0.f; + mPitchKey = 0.f; +} + +void LLAgentCamera::clearOrbitKeys() +{ + mOrbitLeftKey = 0.f; + mOrbitRightKey = 0.f; + mOrbitUpKey = 0.f; + mOrbitDownKey = 0.f; + mOrbitInKey = 0.f; + mOrbitOutKey = 0.f; +} + +void LLAgentCamera::clearPanKeys() +{ + mPanRightKey = 0.f; + mPanLeftKey = 0.f; + mPanUpKey = 0.f; + mPanDownKey = 0.f; + mPanInKey = 0.f; + mPanOutKey = 0.f; +} + +// static +S32 LLAgentCamera::directionToKey(S32 direction) +{ + if (direction > 0) return 1; + if (direction < 0) return -1; + return 0; +} + + +// EOF + diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h new file mode 100644 index 0000000000..5cbb1de6f4 --- /dev/null +++ b/indra/newview/llagentcamera.h @@ -0,0 +1,400 @@ +/** + * @file llagent.h + * @brief LLAgent class header file + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLAGENTCAMERA_H +#define LL_LLAGENTCAMERA_H + +#include "llfollowcam.h" // Ventrella +#include "llhudeffectlookat.h" // EPointAtType +#include "llhudeffectpointat.h" // ELookAtType + +class LLPickInfo; +class LLVOAvatarSelf; + +//-------------------------------------------------------------------- +// Types +//-------------------------------------------------------------------- +enum ECameraMode +{ + CAMERA_MODE_THIRD_PERSON, + CAMERA_MODE_MOUSELOOK, + CAMERA_MODE_CUSTOMIZE_AVATAR, + CAMERA_MODE_FOLLOW +}; + +/** Camera Presets for CAMERA_MODE_THIRD_PERSON */ +enum ECameraPreset +{ + /** Default preset, what the Third Person Mode actually was */ + CAMERA_PRESET_REAR_VIEW, + + /** "Looking at the Avatar from the front" */ + CAMERA_PRESET_FRONT_VIEW, + + /** "Above and to the left, over the shoulder, pulled back a little on the zoom" */ + CAMERA_PRESET_GROUP_VIEW +}; + +//------------------------------------------------------------------------ +// LLAgentCamera +//------------------------------------------------------------------------ +class LLAgentCamera +{ + LOG_CLASS(LLAgentCamera); + +public: + //-------------------------------------------------------------------- + // Constructors / Destructors + //-------------------------------------------------------------------- +public: + LLAgentCamera(); + virtual ~LLAgentCamera(); + void init(); + void cleanup(); + void setAvatarObject(LLVOAvatarSelf* avatar); +private: + bool mInitialized; + + + //-------------------------------------------------------------------- + // Mode + //-------------------------------------------------------------------- +public: + void changeCameraToDefault(); + void changeCameraToMouselook(BOOL animate = TRUE); + void changeCameraToThirdPerson(BOOL animate = TRUE); + void changeCameraToCustomizeAvatar(BOOL avatar_animate = TRUE, BOOL camera_animate = TRUE); // Trigger transition animation + void changeCameraToFollow(BOOL animate = TRUE); // Ventrella + BOOL cameraThirdPerson() const { return (mCameraMode == CAMERA_MODE_THIRD_PERSON && mLastCameraMode == CAMERA_MODE_THIRD_PERSON); } + BOOL cameraMouselook() const { return (mCameraMode == CAMERA_MODE_MOUSELOOK && mLastCameraMode == CAMERA_MODE_MOUSELOOK); } + BOOL cameraCustomizeAvatar() const { return (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR /*&& !mCameraAnimating*/); } + BOOL cameraFollow() const { return (mCameraMode == CAMERA_MODE_FOLLOW && mLastCameraMode == CAMERA_MODE_FOLLOW); } + ECameraMode getCameraMode() const { return mCameraMode; } + ECameraMode getLastCameraMode() const { return mLastCameraMode; } + void updateCamera(); // Call once per frame to update camera location/orientation + void resetCamera(); // Slam camera into its default position + void updateLastCamera(); // Set last camera to current camera + +private: + ECameraMode mCameraMode; // Target mode after transition animation is done + ECameraMode mLastCameraMode; + + //-------------------------------------------------------------------- + // Preset + //-------------------------------------------------------------------- +public: + void switchCameraPreset(ECameraPreset preset); +private: + /** Determines default camera offset depending on the current camera preset */ + LLVector3 getCameraOffsetInitial(); + + /** Camera preset in Third Person Mode */ + ECameraPreset mCameraPreset; + + /** Initial camera offsets */ + std::map<ECameraPreset, LLVector3> mCameraOffsetInitial; + + /** Initial focus offsets */ + std::map<ECameraPreset, LLVector3d> mFocusOffsetInitial; + + //-------------------------------------------------------------------- + // Position + //-------------------------------------------------------------------- +public: + LLVector3d getCameraPositionGlobal() const; + const LLVector3 &getCameraPositionAgent() const; + LLVector3d calcCameraPositionTargetGlobal(BOOL *hit_limit = NULL); // Calculate the camera position target + F32 getCameraMinOffGround(); // Minimum height off ground for this mode, meters + void setCameraCollidePlane(const LLVector4 &plane) { mCameraCollidePlane = plane; } + BOOL calcCameraMinDistance(F32 &obj_min_distance); + F32 calcCustomizeAvatarUIOffset(const LLVector3d& camera_pos_global); + F32 getCurrentCameraBuildOffset() { return (F32)mCameraFocusOffset.length(); } + void clearCameraLag() { mCameraLag.clearVec(); } +private: + F32 mCurrentCameraDistance; // Current camera offset from avatar + F32 mTargetCameraDistance; // Target camera offset from avatar + F32 mCameraFOVZoomFactor; // Amount of fov zoom applied to camera when zeroing in on an object + F32 mCameraCurrentFOVZoomFactor; // Interpolated fov zoom + F32 mCameraFOVDefault; // Default field of view that is basis for FOV zoom effect + LLVector4 mCameraCollidePlane; // Colliding plane for camera + F32 mCameraZoomFraction; // Mousewheel driven fraction of zoom + LLVector3 mCameraPositionAgent; // Camera position in agent coordinates + LLVector3 mCameraVirtualPositionAgent; // Camera virtual position (target) before performing FOV zoom + LLVector3d mCameraSmoothingLastPositionGlobal; + LLVector3d mCameraSmoothingLastPositionAgent; + bool mCameraSmoothingStop; + LLVector3 mCameraLag; // Third person camera lag + LLVector3 mCameraUpVector; // Camera's up direction in world coordinates (determines the 'roll' of the view) + + //-------------------------------------------------------------------- + // Follow + //-------------------------------------------------------------------- +public: + void setUsingFollowCam(bool using_follow_cam); +private: + LLFollowCam mFollowCam; // Ventrella + + //-------------------------------------------------------------------- + // Sit + //-------------------------------------------------------------------- +public: + void setupSitCamera(); + BOOL sitCameraEnabled() { return mSitCameraEnabled; } + void setSitCamera(const LLUUID &object_id, + const LLVector3 &camera_pos = LLVector3::zero, const LLVector3 &camera_focus = LLVector3::zero); +private: + LLPointer<LLViewerObject> mSitCameraReferenceObject; // Object to which camera is related when sitting + BOOL mSitCameraEnabled; // Use provided camera information when sitting? + LLVector3 mSitCameraPos; // Root relative camera pos when sitting + LLVector3 mSitCameraFocus; // Root relative camera target when sitting + + //-------------------------------------------------------------------- + // Animation + //-------------------------------------------------------------------- +public: + void setCameraAnimating(BOOL b) { mCameraAnimating = b; } + BOOL getCameraAnimating() { return mCameraAnimating; } + void setAnimationDuration(F32 seconds) { mAnimationDuration = seconds; } + void startCameraAnimation(); + void stopCameraAnimation(); +private: + LLFrameTimer mAnimationTimer; // Seconds that transition animation has been active + F32 mAnimationDuration; // In seconds + BOOL mCameraAnimating; // Camera is transitioning from one mode to another + LLVector3d mAnimationCameraStartGlobal; // Camera start position, global coords + LLVector3d mAnimationFocusStartGlobal; // Camera focus point, global coords + + //-------------------------------------------------------------------- + // Focus + //-------------------------------------------------------------------- +public: + LLVector3d calcFocusPositionTargetGlobal(); + LLVector3 calcFocusOffset(LLViewerObject *object, LLVector3 pos_agent, S32 x, S32 y); + BOOL getFocusOnAvatar() const { return mFocusOnAvatar; } + LLPointer<LLViewerObject>& getFocusObject() { return mFocusObject; } + F32 getFocusObjectDist() const { return mFocusObjectDist; } + void updateFocusOffset(); + void validateFocusObject(); + void setFocusGlobal(const LLPickInfo& pick); + void setFocusGlobal(const LLVector3d &focus, const LLUUID &object_id = LLUUID::null); + void setFocusOnAvatar(BOOL focus, BOOL animate); + void setCameraPosAndFocusGlobal(const LLVector3d& pos, const LLVector3d& focus, const LLUUID &object_id); + void clearFocusObject(); + void setFocusObject(LLViewerObject* object); + void setObjectTracking(BOOL track) { mTrackFocusObject = track; } + const LLVector3d &getFocusGlobal() const { return mFocusGlobal; } + const LLVector3d &getFocusTargetGlobal() const { return mFocusTargetGlobal; } +private: + LLVector3d mCameraFocusOffset; // Offset from focus point in build mode + LLVector3d mCameraFocusOffsetTarget; // Target towards which we are lerping the camera's focus offset + BOOL mFocusOnAvatar; + LLVector3d mFocusGlobal; + LLVector3d mFocusTargetGlobal; + LLPointer<LLViewerObject> mFocusObject; + F32 mFocusObjectDist; + LLVector3 mFocusObjectOffset; + F32 mFocusDotRadius; // Meters + BOOL mTrackFocusObject; + F32 mUIOffset; + + //-------------------------------------------------------------------- + // Lookat / Pointat + //-------------------------------------------------------------------- +public: + void updateLookAt(const S32 mouse_x, const S32 mouse_y); + BOOL setLookAt(ELookAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); + ELookAtType getLookAtType(); + void lookAtLastChat(); + void slamLookAt(const LLVector3 &look_at); // Set the physics data + BOOL setPointAt(EPointAtType target_type, LLViewerObject *object = NULL, LLVector3 position = LLVector3::zero); + EPointAtType getPointAtType(); +public: + LLPointer<LLHUDEffectLookAt> mLookAt; + LLPointer<LLHUDEffectPointAt> mPointAt; + + //-------------------------------------------------------------------- + // Third person + //-------------------------------------------------------------------- +public: + LLVector3d calcThirdPersonFocusOffset(); + void setThirdPersonHeadOffset(LLVector3 offset) { mThirdPersonHeadOffset = offset; } +private: + LLVector3 mThirdPersonHeadOffset; // Head offset for third person camera position + + //-------------------------------------------------------------------- + // Orbit + //-------------------------------------------------------------------- +public: + void cameraOrbitAround(const F32 radians); // Rotate camera CCW radians about build focus point + void cameraOrbitOver(const F32 radians); // Rotate camera forward radians over build focus point + void cameraOrbitIn(const F32 meters); // Move camera in toward build focus point + + //-------------------------------------------------------------------- + // Zoom + //-------------------------------------------------------------------- +public: + void handleScrollWheel(S32 clicks); // Mousewheel driven zoom + void cameraZoomIn(const F32 factor); // Zoom in by fraction of current distance + F32 getCameraZoomFraction(); // Get camera zoom as fraction of minimum and maximum zoom + void setCameraZoomFraction(F32 fraction); // Set camera zoom as fraction of minimum and maximum zoom + F32 calcCameraFOVZoomFactor(); + + //-------------------------------------------------------------------- + // Pan + //-------------------------------------------------------------------- +public: + void cameraPanIn(const F32 meters); + void cameraPanLeft(const F32 meters); + void cameraPanUp(const F32 meters); + + //-------------------------------------------------------------------- + // View + //-------------------------------------------------------------------- +public: + // Called whenever the agent moves. Puts camera back in default position, deselects items, etc. + void resetView(BOOL reset_camera = TRUE, BOOL change_camera = FALSE); + // Called on camera movement. Unlocks camera from the default position behind the avatar. + void unlockView(); +public: + F32 mDrawDistance; + + //-------------------------------------------------------------------- + // Mouselook + //-------------------------------------------------------------------- +public: + BOOL getForceMouselook() const { return mForceMouselook; } + void setForceMouselook(BOOL mouselook) { mForceMouselook = mouselook; } +private: + BOOL mForceMouselook; + + //-------------------------------------------------------------------- + // HUD + //-------------------------------------------------------------------- +public: + F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing) + F32 mHUDCurZoom; // Current animated zoom level for HUD objects + + +/******************************************************************************** + ** ** + ** KEYS + **/ + +public: + S32 getAtKey() const { return mAtKey; } + S32 getWalkKey() const { return mWalkKey; } + S32 getLeftKey() const { return mLeftKey; } + S32 getUpKey() const { return mUpKey; } + F32 getYawKey() const { return mYawKey; } + F32 getPitchKey() const { return mPitchKey; } + + void setAtKey(S32 mag) { mAtKey = mag; } + void setWalkKey(S32 mag) { mWalkKey = mag; } + void setLeftKey(S32 mag) { mLeftKey = mag; } + void setUpKey(S32 mag) { mUpKey = mag; } + void setYawKey(F32 mag) { mYawKey = mag; } + void setPitchKey(F32 mag) { mPitchKey = mag; } + + void clearGeneralKeys(); + static S32 directionToKey(S32 direction); // Changes direction to -1/0/1 + +private: + S32 mAtKey; // Either 1, 0, or -1. Indicates that movement key is pressed + S32 mWalkKey; // Like AtKey, but causes less forward thrust + S32 mLeftKey; + S32 mUpKey; + F32 mYawKey; + F32 mPitchKey; + + //-------------------------------------------------------------------- + // Orbit + //-------------------------------------------------------------------- +public: + F32 getOrbitLeftKey() const { return mOrbitLeftKey; } + F32 getOrbitRightKey() const { return mOrbitRightKey; } + F32 getOrbitUpKey() const { return mOrbitUpKey; } + F32 getOrbitDownKey() const { return mOrbitDownKey; } + F32 getOrbitInKey() const { return mOrbitInKey; } + F32 getOrbitOutKey() const { return mOrbitOutKey; } + + void setOrbitLeftKey(F32 mag) { mOrbitLeftKey = mag; } + void setOrbitRightKey(F32 mag) { mOrbitRightKey = mag; } + void setOrbitUpKey(F32 mag) { mOrbitUpKey = mag; } + void setOrbitDownKey(F32 mag) { mOrbitDownKey = mag; } + void setOrbitInKey(F32 mag) { mOrbitInKey = mag; } + void setOrbitOutKey(F32 mag) { mOrbitOutKey = mag; } + + void clearOrbitKeys(); +private: + F32 mOrbitLeftKey; + F32 mOrbitRightKey; + F32 mOrbitUpKey; + F32 mOrbitDownKey; + F32 mOrbitInKey; + F32 mOrbitOutKey; + + //-------------------------------------------------------------------- + // Pan + //-------------------------------------------------------------------- +public: + F32 getPanLeftKey() const { return mPanLeftKey; } + F32 getPanRightKey() const { return mPanRightKey; } + F32 getPanUpKey() const { return mPanUpKey; } + F32 getPanDownKey() const { return mPanDownKey; } + F32 getPanInKey() const { return mPanInKey; } + F32 getPanOutKey() const { return mPanOutKey; } + + void setPanLeftKey(F32 mag) { mPanLeftKey = mag; } + void setPanRightKey(F32 mag) { mPanRightKey = mag; } + void setPanUpKey(F32 mag) { mPanUpKey = mag; } + void setPanDownKey(F32 mag) { mPanDownKey = mag; } + void setPanInKey(F32 mag) { mPanInKey = mag; } + void setPanOutKey(F32 mag) { mPanOutKey = mag; } + + void clearPanKeys(); +private: + F32 mPanUpKey; + F32 mPanDownKey; + F32 mPanLeftKey; + F32 mPanRightKey; + F32 mPanInKey; + F32 mPanOutKey; + +/** Keys + ** ** + *******************************************************************************/ + +}; + +extern LLAgentCamera gAgentCamera; + +#endif diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 72ab9235cf..c4597ad6f8 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -49,12 +49,10 @@ void LLAgentUI::buildName(std::string& name) { name.clear(); - - LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject(); - if (avatar_object) + if (isAgentAvatarValid()) { - LLNameValue *first_nv = avatar_object->getNVPair("FirstName"); - LLNameValue *last_nv = avatar_object->getNVPair("LastName"); + LLNameValue *first_nv = gAgentAvatarp->getNVPair("FirstName"); + LLNameValue *last_nv = gAgentAvatarp->getNVPair("LastName"); if (first_nv && last_nv) { name = first_nv->printData() + " " + last_nv->printData(); @@ -73,7 +71,8 @@ void LLAgentUI::buildName(std::string& name) //static void LLAgentUI::buildFullname(std::string& name) { - if (gAgent.getAvatarObject()) name = gAgent.getAvatarObject()->getFullname(); + if (isAgentAvatarValid()) + name = gAgentAvatarp->getFullname(); } //static diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index ebadd8a165..7f248eee30 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -31,104 +31,33 @@ */ #include "llviewerprecompiledheaders.h" - -#include "llagent.h" #include "llagentwearables.h" +#include "llaccordionctrltab.h" +#include "llagent.h" +#include "llagentcamera.h" +#include "llagentwearablesfetch.h" +#include "llappearancemgr.h" #include "llcallbacklist.h" #include "llfloatercustomize.h" +#include "llfolderview.h" +#include "llgesturemgr.h" #include "llinventorybridge.h" +#include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" +#include "llmd5.h" #include "llnotificationsutil.h" +#include "llpaneloutfitsinventory.h" +#include "llsidetray.h" +#include "lltexlayer.h" #include "llviewerregion.h" #include "llvoavatarself.h" #include "llwearable.h" #include "llwearablelist.h" -#include "llgesturemgr.h" -#include "llappearancemgr.h" -#include "lltexlayer.h" -#include "llsidetray.h" -#include "llpaneloutfitsinventory.h" -#include "llfolderview.h" -#include "llaccordionctrltab.h" #include <boost/scoped_ptr.hpp> -#define USE_CURRENT_OUTFIT_FOLDER - -//-------------------------------------------------------------------- -// Classes for fetching initial wearables data -//-------------------------------------------------------------------- -// Outfit folder fetching callback structure. -class LLInitialWearablesFetch : public LLInventoryFetchDescendentsObserver -{ -public: - LLInitialWearablesFetch() {} - ~LLInitialWearablesFetch(); - virtual void done(); - - struct InitialWearableData - { - EWearableType mType; - LLUUID mItemID; - LLUUID mAssetID; - InitialWearableData(EWearableType type, LLUUID& itemID, LLUUID& assetID) : - mType(type), - mItemID(itemID), - mAssetID(assetID) - {} - }; - - typedef std::vector<InitialWearableData> initial_wearable_data_vec_t; - initial_wearable_data_vec_t mCOFInitialWearables; // Wearables from the Current Outfit Folder - initial_wearable_data_vec_t mAgentInitialWearables; // Wearables from the old agent wearables msg - -protected: - void processWearablesMessage(); - void processContents(); -}; - -class LLLibraryOutfitsFetch : public LLInventoryFetchDescendentsObserver -{ -public: - enum ELibraryOutfitFetchStep { - LOFS_FOLDER = 0, - LOFS_OUTFITS, - LOFS_LIBRARY, - LOFS_IMPORTED, - LOFS_CONTENTS - }; - LLLibraryOutfitsFetch() : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false) - { - mMyOutfitsID = LLUUID::null; - mClothingID = LLUUID::null; - mLibraryClothingID = LLUUID::null; - mImportedClothingID = LLUUID::null; - mImportedClothingName = "Imported Library Clothing"; - } - ~LLLibraryOutfitsFetch() {} - virtual void done(); - void doneIdle(); - LLUUID mMyOutfitsID; - void importedFolderFetch(); -protected: - void folderDone(void); - void outfitsDone(void); - void libraryDone(void); - void importedFolderDone(void); - void contentsDone(void); - enum ELibraryOutfitFetchStep mCurrFetchStep; - typedef std::vector<LLUUID> clothing_folder_vec_t; - clothing_folder_vec_t mLibraryClothingFolders; - clothing_folder_vec_t mImportedClothingFolders; - bool mOutfitsPopulated; - LLUUID mClothingID; - LLUUID mLibraryClothingID; - LLUUID mImportedClothingID; - std::string mImportedClothingName; -}; - LLAgentWearables gAgentWearables; BOOL LLAgentWearables::mInitialWearablesUpdateReceived = FALSE; @@ -218,8 +147,7 @@ struct LLAgentDumper }; LLAgentWearables::LLAgentWearables() : - mWearablesLoaded(FALSE), - mAvatarObject(NULL) + mWearablesLoaded(FALSE) { } @@ -230,12 +158,10 @@ LLAgentWearables::~LLAgentWearables() void LLAgentWearables::cleanup() { - mAvatarObject = NULL; } void LLAgentWearables::setAvatarObject(LLVOAvatarSelf *avatar) { - mAvatarObject = avatar; if (avatar) { sendAgentWearablesRequest(); @@ -293,7 +219,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i } if (mTodo & CALL_RECOVERDONE) { - LLAppearanceManager::instance().addCOFItemLink(inv_item,false); + LLAppearanceMgr::instance().addCOFItemLink(inv_item,false); gAgentWearables.recoverMissingWearableDone(); } /* @@ -301,7 +227,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i */ if (mTodo & CALL_CREATESTANDARDDONE) { - LLAppearanceManager::instance().addCOFItemLink(inv_item,false); + LLAppearanceMgr::instance().addCOFItemLink(inv_item,false); gAgentWearables.createStandardWearablesDone(mType, mIndex); } if (mTodo & CALL_MAKENEWOUTFITDONE) @@ -310,7 +236,7 @@ void LLAgentWearables::addWearableToAgentInventoryCallback::fire(const LLUUID& i } if (mTodo & CALL_WEARITEM) { - LLAppearanceManager::instance().addCOFItemLink(inv_item, true); + LLAppearanceMgr::instance().addCOFItemLink(inv_item, true); } } @@ -487,7 +413,7 @@ void LLAgentWearables::saveWearable(const EWearableType type, const U32 index, B return; } - gAgent.getAvatarObject()->wearableUpdated( type, TRUE ); + gAgentAvatarp->wearableUpdated( type, TRUE ); if (send_update) { @@ -686,13 +612,13 @@ const LLWearable* LLAgentWearables::getWearableFromItemID(const LLUUID& item_id) return NULL; } -const LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) const +LLWearable* LLAgentWearables::getWearableFromAssetID(const LLUUID& asset_id) { for (S32 i=0; i < WT_COUNT; i++) { for (U32 j=0; j < getWearableCount((EWearableType)i); j++) { - const LLWearable * curr_wearable = getWearable((EWearableType)i, j); + LLWearable * curr_wearable = getWearable((EWearableType)i, j); if (curr_wearable && (curr_wearable->getAssetID() == asset_id)) { return curr_wearable; @@ -785,7 +711,7 @@ U32 LLAgentWearables::pushWearable(const EWearableType type, LLWearable *wearabl void LLAgentWearables::wearableUpdated(LLWearable *wearable) { - mAvatarObject->wearableUpdated(wearable->getType(), TRUE); + gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); wearable->refreshName(); wearable->setLabelUpdated(); @@ -829,7 +755,7 @@ void LLAgentWearables::popWearable(const EWearableType type, U32 index) if (wearable) { mWearableDatas[type].erase(mWearableDatas[type].begin() + index); - mAvatarObject->wearableUpdated(wearable->getType(), TRUE); + gAgentAvatarp->wearableUpdated(wearable->getType(), TRUE); wearable->setLabelUpdated(); } } @@ -961,8 +887,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs LLUUID agent_id; gMessageSystem->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id); - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (avatar && (agent_id == avatar->getID())) + if (isAgentAvatarValid() && (agent_id == gAgentAvatarp->getID())) { gMessageSystem->getU32Fast(_PREHASH_AgentData, _PREHASH_SerialNum, gAgentQueryManager.mUpdateSerialNum); @@ -980,8 +905,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the UUID of the current outfit folder (will be created if it doesn't exist) const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); - - LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(); + LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id); //lldebugs << "processAgentInitialWearablesUpdate()" << llendl; // Add wearables @@ -1019,8 +943,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Store initial wearables data until we know whether we have the current outfit folder or need to use the data. LLInitialWearablesFetch::InitialWearableData wearable_data(type, item_id, asset_id); // MULTI-WEARABLE: update - outfit->mAgentInitialWearables.push_back(wearable_data); - + outfit->add(wearable_data); } lldebugs << " " << LLWearableDictionary::getTypeLabel(type) << llendl; @@ -1028,10 +951,8 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs // Get the complete information on the items in the inventory and set up an observer // that will trigger when the complete information is fetched. - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(current_outfit_id); - outfit->fetchDescendents(folders); - if(outfit->isEverythingComplete()) + outfit->startFetch(); + if(outfit->isFinished()) { // everything is already here - call done. outfit->done(); @@ -1046,64 +967,6 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs } } -// A single wearable that the avatar was wearing on start-up has arrived from the database. -// static -void LLAgentWearables::onInitialWearableAssetArrived(LLWearable* wearable, void* userdata) -{ - boost::scoped_ptr<LLInitialWearablesFetch::InitialWearableData> wear_data((LLInitialWearablesFetch::InitialWearableData*)userdata); - const EWearableType type = wear_data->mType; - U32 index = 0; - - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (!avatar) - { - return; - } - - if (wearable) - { - llassert(type == wearable->getType()); - wearable->setItemID(wear_data->mItemID); - index = gAgentWearables.pushWearable(type, wearable); - gAgentWearables.mItemsAwaitingWearableUpdate.erase(wear_data->mItemID); - - // disable composites if initial textures are baked - avatar->setupComposites(); - - avatar->setCompositeUpdatesEnabled(TRUE); - gInventory.addChangedMask(LLInventoryObserver::LABEL, wearable->getItemID()); - } - else - { - // Somehow the asset doesn't exist in the database. - gAgentWearables.recoverMissingWearable(type,index); - } - - - gInventory.notifyObservers(); - - // Have all the wearables that the avatar was wearing at log-in arrived? - // MULTI-WEARABLE: update when multiple wearables can arrive per type. - - gAgentWearables.updateWearablesLoaded(); - if (gAgentWearables.areWearablesLoaded()) - { - - // Can't query cache until all wearables have arrived, so calling this earlier is a no-op. - gAgentWearables.queryWearableCache(); - - // Make sure that the server's idea of the avatar's wearables actually match the wearables. - gAgent.sendAgentSetAppearance(); - - // Check to see if there are any baked textures that we hadn't uploaded before we logged off last time. - // If there are any, schedule them to be uploaded as soon as the layer textures they depend on arrive. - if (gAgent.cameraCustomizeAvatar()) - { - avatar->requestLayerSetUploads(); - } - } -} - // Normally, all wearables referred to "AgentWearablesUpdate" will correspond to actual assets in the // database. If for some reason, we can't load one of those assets, we can try to reconstruct it so that // the user isn't left without a shape, for example. (We can do that only after the inventory has loaded.) @@ -1179,7 +1042,7 @@ public: { llinfos << "All items created" << llendl; LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; - LLAppearanceManager::instance().linkAll(LLAppearanceManager::instance().getCOF(), + LLAppearanceMgr::instance().linkAll(LLAppearanceMgr::instance().getCOF(), mItemsToLink, link_waiter); } @@ -1239,12 +1102,9 @@ void LLAgentWearables::createStandardWearables(BOOL female) llwarns << "Creating Standard " << (female ? "female" : "male") << " Wearables" << llendl; - if (mAvatarObject.isNull()) - { - return; - } + if (!isAgentAvatarValid()) return; - mAvatarObject->setSex(female ? SEX_FEMALE : SEX_MALE); + gAgentAvatarp->setSex(female ? SEX_FEMALE : SEX_MALE); const BOOL create[WT_COUNT] = { @@ -1291,10 +1151,9 @@ void LLAgentWearables::createStandardWearables(BOOL female) void LLAgentWearables::createStandardWearablesDone(S32 type, U32 index) { llinfos << "type " << type << " index " << index << llendl; - if (mAvatarObject) - { - mAvatarObject->updateVisualParams(); - } + + if (!isAgentAvatarValid()) return; + gAgentAvatarp->updateVisualParams(); } void LLAgentWearables::createStandardWearablesAllDone() @@ -1309,7 +1168,7 @@ void LLAgentWearables::createStandardWearablesAllDone() updateServer(); // Treat this as the first texture entry message, if none received yet - mAvatarObject->onFirstTEMessageReceived(); + gAgentAvatarp->onFirstTEMessageReceived(); } // MULTI-WEARABLE: Properly handle multiwearables later. @@ -1331,10 +1190,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, const LLDynamicArray<S32>& attachments_to_include, BOOL rename_clothing) { - if (mAvatarObject.isNull()) - { - return; - } + if (!isAgentAvatarValid()) return; // First, make a folder in the Clothes directory. LLUUID folder_id = gInventory.createNewCategory( @@ -1432,7 +1288,7 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name, for (S32 i = 0; i < attachments_to_include.count(); i++) { S32 attachment_pt = attachments_to_include[i]; - LLViewerJointAttachment* attachment = get_if_there(mAvatarObject->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL); + LLViewerJointAttachment* attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachment_pt, (LLViewerJointAttachment*)NULL); if (!attachment) continue; for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); attachment_iter != attachment->mAttachedObjects.end(); @@ -1493,8 +1349,8 @@ public: tab_outfits->changeOpenClose(tab_outfits->getDisplayChildren()); } - LLAppearanceManager::instance().updateIsDirty(); - LLAppearanceManager::instance().updatePanelOutfitName(""); + LLAppearanceMgr::instance().updateIsDirty(); + LLAppearanceMgr::instance().updatePanelOutfitName(""); } virtual void fire(const LLUUID&) @@ -1507,10 +1363,7 @@ private: LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) { - if (mAvatarObject.isNull()) - { - return LLUUID::null; - } + if (!isAgentAvatarValid()) return LLUUID::null; // First, make a folder in the My Outfits directory. const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); @@ -1520,8 +1373,8 @@ LLUUID LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name) new_folder_name); LLPointer<LLInventoryCallback> cb = new LLShowCreatedOutfit(folder_id); - LLAppearanceManager::instance().shallowCopyCategoryContents(LLAppearanceManager::instance().getCOF(),folder_id, cb); - LLAppearanceManager::instance().createBaseOutfitLink(folder_id, cb); + LLAppearanceMgr::instance().shallowCopyCategoryContents(LLAppearanceMgr::instance().getCOF(),folder_id, cb); + LLAppearanceMgr::instance().createBaseOutfitLink(folder_id, cb); return folder_id; } @@ -1588,6 +1441,7 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a { LLSD payload; payload["wearable_type"] = (S32)type; + payload["wearable_index"] = (S32)index; // Bring up view-modal dialog: Save changes? Yes, No, Cancel LLNotificationsUtil::add("WearableSave", LLSD(), payload, &LLAgentWearables::onRemoveWearableDialog); return; @@ -1601,22 +1455,21 @@ void LLAgentWearables::removeWearable(const EWearableType type, bool do_remove_a } -// MULTI_WEARABLE: assuming one wearable per type. -// MULTI_WEARABLE: hardwiring 0th elt for now - notification needs to change. // static bool LLAgentWearables::onRemoveWearableDialog(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); EWearableType type = (EWearableType)notification["payload"]["wearable_type"].asInteger(); + S32 index = (S32)notification["payload"]["wearable_index"].asInteger(); switch(option) { case 0: // "Save" - gAgentWearables.saveWearable(type, 0); - gAgentWearables.removeWearableFinal(type, false, 0); + gAgentWearables.saveWearable(type, index); + gAgentWearables.removeWearableFinal(type, false, index); break; case 1: // "Don't Save" - gAgentWearables.removeWearableFinal(type, false, 0); + gAgentWearables.removeWearableFinal(type, false, index); break; case 2: // "Cancel" @@ -1668,30 +1521,25 @@ void LLAgentWearables::removeWearableFinal(const EWearableType type, bool do_rem } // Assumes existing wearables are not dirty. -// MULTI_WEARABLE: assumes one wearable per type. void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& items, const LLDynamicArray< LLWearable* >& wearables, BOOL remove) { llinfos << "setWearableOutfit() start" << llendl; - BOOL wearables_to_remove[WT_COUNT]; - wearables_to_remove[WT_SHAPE] = FALSE; - wearables_to_remove[WT_SKIN] = FALSE; - wearables_to_remove[WT_HAIR] = FALSE; - wearables_to_remove[WT_EYES] = FALSE; - wearables_to_remove[WT_SHIRT] = remove; - wearables_to_remove[WT_PANTS] = remove; - wearables_to_remove[WT_SHOES] = remove; - wearables_to_remove[WT_SOCKS] = remove; - wearables_to_remove[WT_JACKET] = remove; - wearables_to_remove[WT_GLOVES] = remove; - wearables_to_remove[WT_UNDERSHIRT] = (!gAgent.isTeen()) & remove; - wearables_to_remove[WT_UNDERPANTS] = (!gAgent.isTeen()) & remove; - wearables_to_remove[WT_SKIRT] = remove; - wearables_to_remove[WT_ALPHA] = remove; - wearables_to_remove[WT_TATTOO] = remove; - + // TODO: Removed check for ensuring that teens don't remove undershirt and underwear. Handle later + if (remove) + { + // note: shirt is the first non-body part wearable item. Update if wearable order changes. + // This loop should remove all clothing, but not any body parts + for (S32 type = 0; type < (S32)WT_COUNT; type++) + { + if (LLWearableDictionary::getAssetType((EWearableType)type) == LLAssetType::AT_CLOTHING) + { + removeWearable((EWearableType)type, true, 0); + } + } + } S32 count = wearables.count(); llassert(items.count() == count); @@ -1706,82 +1554,31 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it if (new_wearable) { const EWearableType type = new_wearable->getType(); - wearables_to_remove[type] = FALSE; + + new_wearable->setName(new_item->getName()); + new_wearable->setItemID(new_item->getUUID()); - // MULTI_WEARABLE: using 0th - LLWearable* old_wearable = getWearable(type, 0); - if (old_wearable) + if (LLWearableDictionary::getAssetType(type) == LLAssetType::AT_BODYPART) { - // Special case where you're putting on a wearable that has the same assetID - // as the previous (e.g. wear a shirt then wear a copy of that shirt) since in this - // case old_wearable == new_wearable. - if (old_wearable == new_wearable) - { - old_wearable->setLabelUpdated(); - new_wearable->setName(new_item->getName()); - new_wearable->setItemID(new_item->getUUID()); - } - - const LLUUID& old_item_id = getWearableItemID(type, 0); - if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && - (old_item_id == new_item->getUUID())) - { - lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; - continue; - } - - // Assumes existing wearables are not dirty. - if (old_wearable->isDirty()) - { - llassert(0); - continue; - } + // exactly one wearable per body part + setWearable(type,0,new_wearable); } - - new_wearable->setItemID(new_item->getUUID()); - setWearable(type,0,new_wearable); - } - } - - std::vector<LLWearable*> wearables_being_removed; - - for (i = 0; i < WT_COUNT; i++) - { - if (wearables_to_remove[i]) - { - // MULTI_WEARABLE: assuming 0th - LLWearable* wearable = getWearable((EWearableType)i, 0); - const LLUUID &item_id = getWearableItemID((EWearableType)i,0); - gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - if (wearable) + else { - wearables_being_removed.push_back(wearable); + pushWearable(type,new_wearable); } - removeWearable((EWearableType)i,true,0); + wearableUpdated(new_wearable); + checkWearableAgainstInventory(new_wearable); } } gInventory.notifyObservers(); - - std::vector<LLWearable*>::iterator wearable_iter; - - for (wearable_iter = wearables_being_removed.begin(); - wearable_iter != wearables_being_removed.end(); - ++wearable_iter) - { - LLWearable* wearablep = *wearable_iter; - if (wearablep) - { - wearablep->removeFromAvatar(TRUE); - } - } - - if (mAvatarObject) + if (isAgentAvatarValid()) { - mAvatarObject->setCompositeUpdatesEnabled(TRUE); - mAvatarObject->updateVisualParams(); - mAvatarObject->invalidateAll(); + gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->invalidateAll(); } // Start rendering & update the server @@ -1840,6 +1637,7 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); LLInventoryItem* new_item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); + U32 index = gAgentWearables.getWearableIndex(wearable); if (!new_item) { delete wearable; @@ -1849,8 +1647,7 @@ bool LLAgentWearables::onSetWearableDialog(const LLSD& notification, const LLSD& switch(option) { case 0: // "Save" -// MULTI_WEARABLE: assuming 0th - gAgentWearables.saveWearable(wearable->getType(),0); + gAgentWearables.saveWearable(wearable->getType(),index); gAgentWearables.setWearableFinal(new_item, wearable); break; @@ -1940,30 +1737,35 @@ void LLAgentWearables::queryWearableCache() for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++) { const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index); - LLUUID hash; + LLMD5 hash; + bool hash_computed = false; for (U8 i=0; i < baked_dict->mWearables.size(); i++) { const EWearableType baked_type = baked_dict->mWearables[i]; - // MULTI_WEARABLE: not order-dependent const U32 num_wearables = getWearableCount(baked_type); for (U32 index = 0; index < num_wearables; ++index) { const LLWearable* wearable = getWearable(baked_type,index); if (wearable) { - hash ^= wearable->getAssetID(); + LLUUID asset_id = wearable->getAssetID(); + hash.update((const unsigned char*)asset_id.mData, UUID_BYTES); + hash_computed = true; } } } - if (hash.notNull()) + hash.finalize(); + if (hash_computed) { - hash ^= baked_dict->mWearablesHashID; + LLUUID hash_id; + hash.raw_digest(hash_id.mData); + hash_id ^= baked_dict->mWearablesHashID; num_queries++; // *NOTE: make sure at least one request gets packed //llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl; gMessageSystem->nextBlockFast(_PREHASH_WearableData); - gMessageSystem->addUUIDFast(_PREHASH_ID, hash); + gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id); gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)baked_index); } @@ -1976,16 +1778,24 @@ void LLAgentWearables::queryWearableCache() gAgentQueryManager.mWearablesCacheQueryID++; } -// MULTI_WEARABLE: need a way to specify by wearable rather than by type. // User has picked "remove from avatar" from a menu. // static -void LLAgentWearables::userRemoveWearable(EWearableType& type) +void LLAgentWearables::userRemoveWearable(const EWearableType &type, const U32 &index) { - if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR)) //&& + if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) { - // MULTI_WEARABLE: fixed to 0th for now. - gAgentWearables.removeWearable(type,false,0); + gAgentWearables.removeWearable(type,false,index); + } +} + +//static +void LLAgentWearables::userRemoveWearablesOfType(const EWearableType &type) +{ + if (!(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES)) //&& + //!((!gAgent.isTeen()) && (type==WT_UNDERPANTS || type==WT_UNDERSHIRT))) + { + gAgentWearables.removeWearable(type,true,0); } } @@ -2031,12 +1841,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // already wearing and in request set -> leave alone. // not wearing and in request set -> put on. - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (!avatarp) - { - llwarns << "No avatar found." << llendl; - return; - } + if (!isAgentAvatarValid()) return; std::set<LLUUID> requested_item_ids; std::set<LLUUID> current_item_ids; @@ -2045,8 +1850,8 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj // Build up list of objects to be removed and items currently attached. llvo_vec_t objects_to_remove; - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end();) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end();) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -2102,12 +1907,7 @@ void LLAgentWearables::userUpdateAttachments(LLInventoryModel::item_array_t& obj void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remove) { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (!avatarp) - { - llwarns << "No avatar found." << llendl; - return; - } + if (!isAgentAvatarValid()) return; if (objects_to_remove.empty()) return; @@ -2130,17 +1930,12 @@ void LLAgentWearables::userRemoveMultipleAttachments(llvo_vec_t& objects_to_remo void LLAgentWearables::userRemoveAllAttachments() { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (!avatarp) - { - llwarns << "No avatar found." << llendl; - return; - } + if (!isAgentAvatarValid()) return; llvo_vec_t objects_to_remove; - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end();) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end();) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -2263,488 +2058,16 @@ void LLAgentWearables::populateMyOutfitsFolder(void) { llinfos << "starting outfit population" << llendl; - LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); + const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); + LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id); + outfits->mMyOutfitsID = my_outfits_id; // Get the complete information on the items in the inventory and // setup an observer that will wait for that to happen. - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); - - folders.push_back(outfits->mMyOutfitsID); gInventory.addObserver(outfits); - outfits->fetchDescendents(folders); - if (outfits->isEverythingComplete()) + outfits->startFetch(); + if (outfits->isFinished()) { outfits->done(); } } - -void LLLibraryOutfitsFetch::done() -{ - // Delay this until idle() routine, since it's a heavy operation and - // we also can't have it run within notifyObservers. - doOnIdle(boost::bind(&LLLibraryOutfitsFetch::doneIdle,this)); - gInventory.removeObserver(this); // Prevent doOnIdle from being added twice. -} - -void LLLibraryOutfitsFetch::doneIdle() -{ - gInventory.addObserver(this); // Add this back in since it was taken out during ::done() - - switch (mCurrFetchStep) - { - case LOFS_FOLDER: - folderDone(); - mCurrFetchStep = LOFS_OUTFITS; - break; - case LOFS_OUTFITS: - outfitsDone(); - mCurrFetchStep = LOFS_LIBRARY; - break; - case LOFS_LIBRARY: - libraryDone(); - mCurrFetchStep = LOFS_IMPORTED; - break; - case LOFS_IMPORTED: - importedFolderDone(); - mCurrFetchStep = LOFS_CONTENTS; - break; - case LOFS_CONTENTS: - contentsDone(); - break; - default: - llwarns << "Got invalid state for outfit fetch: " << mCurrFetchStep << llendl; - mOutfitsPopulated = TRUE; - break; - } - - // We're completely done. Cleanup. - if (mOutfitsPopulated) - { - gInventory.removeObserver(this); - delete this; - return; - } -} - -void LLLibraryOutfitsFetch::folderDone(void) -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH); - // Early out if we already have items in My Outfits. - if (cat_array.count() > 0 || wearable_array.count() > 0) - { - mOutfitsPopulated = true; - return; - } - - mClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - mLibraryClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true); - - // If Library->Clothing->Initial Outfits exists, use that. - LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); - gInventory.collectDescendentsIf(mLibraryClothingID, - cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH, - matchFolderFunctor); - if (cat_array.count() > 0) - { - const LLViewerInventoryCategory *cat = cat_array.get(0); - mLibraryClothingID = cat->getUUID(); - } - - mCompleteFolders.clear(); - - // Get the complete information on the items in the inventory. - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(mClothingID); - folders.push_back(mLibraryClothingID); - fetchDescendents(folders); - if (isEverythingComplete()) - { - done(); - } -} - -void LLLibraryOutfitsFetch::outfitsDone(void) -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - - // Collect the contents of the Library's Clothing folder - gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH); - - llassert(cat_array.count() > 0); - for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); - iter != cat_array.end(); - ++iter) - { - const LLViewerInventoryCategory *cat = iter->get(); - - // Get the names and id's of every outfit in the library, skip "Ruth" - // because it's a low quality legacy outfit - if (cat->getName() != "Ruth") - { - // Get the name of every outfit in the library - folders.push_back(cat->getUUID()); - mLibraryClothingFolders.push_back(cat->getUUID()); - } - } - cat_array.clear(); - wearable_array.clear(); - - // Check if you already have an "Imported Library Clothing" folder - LLNameCategoryCollector matchFolderFunctor(mImportedClothingName); - gInventory.collectDescendentsIf(mClothingID, - cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH, - matchFolderFunctor); - if (cat_array.size() > 0) - { - const LLViewerInventoryCategory *cat = cat_array.get(0); - mImportedClothingID = cat->getUUID(); - } - - mCompleteFolders.clear(); - - fetchDescendents(folders); - if (isEverythingComplete()) - { - done(); - } -} - -class LLLibraryOutfitsCopyDone: public LLInventoryCallback -{ -public: - LLLibraryOutfitsCopyDone(LLLibraryOutfitsFetch * fetcher): - mFireCount(0), mLibraryOutfitsFetcher(fetcher) - { - } - - virtual ~LLLibraryOutfitsCopyDone() - { - if (!LLApp::isExiting() && mLibraryOutfitsFetcher) - { - gInventory.addObserver(mLibraryOutfitsFetcher); - mLibraryOutfitsFetcher->done(); - } - } - - /* virtual */ void fire(const LLUUID& inv_item) - { - mFireCount++; - } -private: - U32 mFireCount; - LLLibraryOutfitsFetch * mLibraryOutfitsFetcher; -}; - -// Copy the clothing folders from the library into the imported clothing folder -void LLLibraryOutfitsFetch::libraryDone(void) -{ - if (mImportedClothingID != LLUUID::null) - { - // Skip straight to fetching the contents of the imported folder - importedFolderFetch(); - return; - } - - // Remove observer; next autopopulation step will be triggered externally by LLLibraryOutfitsCopyDone. - gInventory.removeObserver(this); - - LLPointer<LLInventoryCallback> copy_waiter = new LLLibraryOutfitsCopyDone(this); - mImportedClothingID = gInventory.createNewCategory(mClothingID, - LLFolderType::FT_NONE, - mImportedClothingName); - // Copy each folder from library into clothing unless it already exists. - for (clothing_folder_vec_t::const_iterator iter = mLibraryClothingFolders.begin(); - iter != mLibraryClothingFolders.end(); - ++iter) - { - const LLUUID& src_folder_id = (*iter); // Library clothing folder ID - const LLViewerInventoryCategory *cat = gInventory.getCategory(src_folder_id); - if (!cat) - { - llwarns << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << llendl; - continue; - } - - if (!LLAppearanceManager::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id)) - { - llinfos << "Skipping non-outfit folder name:" << cat->getName() << llendl; - continue; - } - - // Don't copy the category if it already exists. - LLNameCategoryCollector matchFolderFunctor(cat->getName()); - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - gInventory.collectDescendentsIf(mImportedClothingID, - cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH, - matchFolderFunctor); - if (cat_array.size() > 0) - { - continue; - } - - LLUUID dst_folder_id = gInventory.createNewCategory(mImportedClothingID, - LLFolderType::FT_NONE, - cat->getName()); - LLAppearanceManager::getInstance()->shallowCopyCategoryContents(src_folder_id, dst_folder_id, copy_waiter); - } -} - -void LLLibraryOutfitsFetch::importedFolderFetch(void) -{ - // Fetch the contents of the Imported Clothing Folder - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(mImportedClothingID); - - mCompleteFolders.clear(); - - fetchDescendents(folders); - if (isEverythingComplete()) - { - done(); - } -} - -void LLLibraryOutfitsFetch::importedFolderDone(void) -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - - // Collect the contents of the Imported Clothing folder - gInventory.collectDescendents(mImportedClothingID, cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH); - - for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); - iter != cat_array.end(); - ++iter) - { - const LLViewerInventoryCategory *cat = iter->get(); - - // Get the name of every imported outfit - folders.push_back(cat->getUUID()); - mImportedClothingFolders.push_back(cat->getUUID()); - } - - mCompleteFolders.clear(); - fetchDescendents(folders); - if (isEverythingComplete()) - { - done(); - } -} - -void LLLibraryOutfitsFetch::contentsDone(void) -{ - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - - for (clothing_folder_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin(); - folder_iter != mImportedClothingFolders.end(); - ++folder_iter) - { - const LLUUID &folder_id = (*folder_iter); - const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id); - if (!cat) - { - llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl; - continue; - } - - // First, make a folder in the My Outfits directory. - LLUUID new_outfit_folder_id = gInventory.createNewCategory(mMyOutfitsID, LLFolderType::FT_OUTFIT, cat->getName()); - - cat_array.clear(); - wearable_array.clear(); - // Collect the contents of each imported clothing folder, so we can create new outfit links for it - gInventory.collectDescendents(folder_id, cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH); - - for (LLInventoryModel::item_array_t::const_iterator wearable_iter = wearable_array.begin(); - wearable_iter != wearable_array.end(); - ++wearable_iter) - { - const LLViewerInventoryItem *item = wearable_iter->get(); - link_inventory_item(gAgent.getID(), - item->getLinkedUUID(), - new_outfit_folder_id, - item->getName(), - LLAssetType::AT_LINK, - NULL); - } - } - - mOutfitsPopulated = true; -} - -//-------------------------------------------------------------------- -// InitialWearablesFetch -// -// This grabs contents from the COF and processes them. -// The processing is handled in idle(), i.e. outside of done(), -// to avoid gInventory.notifyObservers recursion. -//-------------------------------------------------------------------- - -LLInitialWearablesFetch::~LLInitialWearablesFetch() -{ -} - -// virtual -void LLInitialWearablesFetch::done() -{ - // Delay processing the actual results of this so it's not handled within - // gInventory.notifyObservers. The results will be handled in the next - // idle tick instead. - gInventory.removeObserver(this); - doOnIdle(boost::bind(&LLInitialWearablesFetch::processContents,this)); -} - -void LLInitialWearablesFetch::processContents() -{ - // Fetch the wearable items from the Current Outfit Folder - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t wearable_array; - LLFindWearables is_wearable; - gInventory.collectDescendentsIf(mCompleteFolders.front(), cat_array, wearable_array, - LLInventoryModel::EXCLUDE_TRASH, is_wearable); - - LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); - if (wearable_array.count() > 0) - { - LLAppearanceManager::instance().updateAppearanceFromCOF(); - } - else - { - // if we're constructing the COF from the wearables message, we don't have a proper outfit link - LLAppearanceManager::instance().setOutfitDirty(true); - processWearablesMessage(); - } - delete this; -} - -class LLFetchAndLinkObserver: public LLInventoryFetchObserver -{ -public: - LLFetchAndLinkObserver(LLInventoryFetchObserver::item_ref_t& ids): - m_ids(ids), - LLInventoryFetchObserver(true) // retry for missing items - { - } - ~LLFetchAndLinkObserver() - { - } - virtual void done() - { - gInventory.removeObserver(this); - - // Link to all fetched items in COF. - LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; - for (LLInventoryFetchObserver::item_ref_t::iterator it = m_ids.begin(); - it != m_ids.end(); - ++it) - { - LLUUID id = *it; - LLViewerInventoryItem *item = gInventory.getItem(*it); - if (!item) - { - llwarns << "fetch failed!" << llendl; - continue; - } - - link_inventory_item(gAgent.getID(), - item->getLinkedUUID(), - LLAppearanceManager::instance().getCOF(), - item->getName(), - LLAssetType::AT_LINK, - link_waiter); - } - } -private: - LLInventoryFetchObserver::item_ref_t m_ids; -}; - -void LLInitialWearablesFetch::processWearablesMessage() -{ - if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead. - { - const LLUUID current_outfit_id = LLAppearanceManager::instance().getCOF(); - LLInventoryFetchObserver::item_ref_t ids; - for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) - { - // Populate the current outfit folder with links to the wearables passed in the message - InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback. - - if (wearable_data->mAssetID.notNull()) - { -#ifdef USE_CURRENT_OUTFIT_FOLDER - ids.push_back(wearable_data->mItemID); -#endif -#if 0 -// // Fetch the wearables -// LLWearableList::instance().getAsset(wearable_data->mAssetID, -// LLStringUtil::null, -// LLWearableDictionary::getAssetType(wearable_data->mType), -// LLAgentWearables::onInitialWearableAssetArrived, (void*)(wearable_data)); -#endif - } - else - { - llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID " - << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl; - delete wearable_data; - } - } - - // Add all current attachments to the requested items as well. - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar ) - { - for (LLVOAvatar::attachment_map_t::const_iterator iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); ++iter) - { - LLViewerJointAttachment* attachment = iter->second; - if (!attachment) continue; - for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); - attachment_iter != attachment->mAttachedObjects.end(); - ++attachment_iter) - { - LLViewerObject* attached_object = (*attachment_iter); - if (!attached_object) continue; - const LLUUID& item_id = attached_object->getItemID(); - if (item_id.isNull()) continue; - ids.push_back(item_id); - } - } - } - - // Need to fetch the inventory items for ids, then create links to them after they arrive. - LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids); - fetcher->fetchItems(ids); - // If no items to be fetched, done will never be triggered. - // TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition. - if (fetcher->isEverythingComplete()) - { - fetcher->done(); - } - else - { - gInventory.addObserver(fetcher); - } - } - else - { - LL_WARNS("Wearables") << "No current outfit folder items found and no initial wearables fallback message received." << LL_ENDL; - } -} - - diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h index 858540a5f5..b76367324c 100644 --- a/indra/newview/llagentwearables.h +++ b/indra/newview/llagentwearables.h @@ -89,7 +89,7 @@ public: const LLUUID getWearableItemID(EWearableType type, U32 index /*= 0*/) const; const LLUUID getWearableAssetID(EWearableType type, U32 index /*= 0*/) const; const LLWearable* getWearableFromItemID(const LLUUID& item_id) const; - const LLWearable* getWearableFromAssetID(const LLUUID& asset_id) const; + LLWearable* getWearableFromAssetID(const LLUUID& asset_id); LLInventoryItem* getWearableInventoryItem(EWearableType type, U32 index /*= 0*/); // MULTI-WEARABLE: assuming one per type. static BOOL selfHasWearable(EWearableType type); @@ -174,7 +174,7 @@ public: // Should only be called if we *know* we've never done so before, since users may // not want the Library outfits to stay in their quick outfit selector and can delete them. - void populateMyOutfitsFolder(void); + void populateMyOutfitsFolder(); private: void makeNewOutfitDone(S32 type, U32 index); @@ -193,8 +193,8 @@ public: // Static UI hooks //-------------------------------------------------------------------- public: - // MULTI-WEARABLE: assuming one wearable per type. Need upstream changes. - static void userRemoveWearable(EWearableType& type); + static void userRemoveWearable(const EWearableType &type, const U32 &index); + static void userRemoveWearablesOfType(const EWearableType &type); static void userRemoveAllClothes(); typedef std::vector<LLViewerObject*> llvo_vec_t; @@ -218,7 +218,6 @@ private: static BOOL mInitialWearablesUpdateReceived; BOOL mWearablesLoaded; std::set<LLUUID> mItemsAwaitingWearableUpdate; - LLPointer<LLVOAvatarSelf> mAvatarObject; // NULL until avatar object sent down from simulator //-------------------------------------------------------------------------------- // Support classes diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp new file mode 100644 index 0000000000..08d8ccfd23 --- /dev/null +++ b/indra/newview/llagentwearablesfetch.cpp @@ -0,0 +1,517 @@ +/** + * @file llagentwearablesfetch.cpp + * @brief LLAgentWearblesFetch class implementation + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llagentwearablesfetch.h" + +#include "llagent.h" +#include "llagentwearables.h" +#include "llappearancemgr.h" +#include "llinventoryfunctions.h" +#include "llvoavatarself.h" + +LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) : + LLInventoryFetchDescendentsObserver(cof_id) +{ +} + +LLInitialWearablesFetch::~LLInitialWearablesFetch() +{ +} + +// virtual +void LLInitialWearablesFetch::done() +{ + // Delay processing the actual results of this so it's not handled within + // gInventory.notifyObservers. The results will be handled in the next + // idle tick instead. + gInventory.removeObserver(this); + doOnIdleOneTime(boost::bind(&LLInitialWearablesFetch::processContents,this)); +} + +void LLInitialWearablesFetch::add(InitialWearableData &data) + +{ + mAgentInitialWearables.push_back(data); +} + +void LLInitialWearablesFetch::processContents() +{ + // Fetch the wearable items from the Current Outfit Folder + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + LLFindWearables is_wearable; + gInventory.collectDescendentsIf(mComplete.front(), cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH, is_wearable); + + LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); + if (wearable_array.count() > 0) + { + LLAppearanceMgr::instance().updateAppearanceFromCOF(); + } + else + { + // if we're constructing the COF from the wearables message, we don't have a proper outfit link + LLAppearanceMgr::instance().setOutfitDirty(true); + processWearablesMessage(); + } + delete this; +} + +class LLFetchAndLinkObserver: public LLInventoryFetchItemsObserver +{ +public: + LLFetchAndLinkObserver(uuid_vec_t& ids): + LLInventoryFetchItemsObserver(ids) + { + } + ~LLFetchAndLinkObserver() + { + } + virtual void done() + { + gInventory.removeObserver(this); + + // Link to all fetched items in COF. + LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy; + for (uuid_vec_t::iterator it = mIDs.begin(); + it != mIDs.end(); + ++it) + { + LLUUID id = *it; + LLViewerInventoryItem *item = gInventory.getItem(*it); + if (!item) + { + llwarns << "fetch failed!" << llendl; + continue; + } + + link_inventory_item(gAgent.getID(), + item->getLinkedUUID(), + LLAppearanceMgr::instance().getCOF(), + item->getName(), + LLAssetType::AT_LINK, + link_waiter); + } + } +}; + +void LLInitialWearablesFetch::processWearablesMessage() +{ + if (!mAgentInitialWearables.empty()) // We have an empty current outfit folder, use the message data instead. + { + const LLUUID current_outfit_id = LLAppearanceMgr::instance().getCOF(); + uuid_vec_t ids; + for (U8 i = 0; i < mAgentInitialWearables.size(); ++i) + { + // Populate the current outfit folder with links to the wearables passed in the message + InitialWearableData *wearable_data = new InitialWearableData(mAgentInitialWearables[i]); // This will be deleted in the callback. + + if (wearable_data->mAssetID.notNull()) + { + ids.push_back(wearable_data->mItemID); + } + else + { + llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID " + << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl; + delete wearable_data; + } + } + + // Add all current attachments to the requested items as well. + if (isAgentAvatarValid()) + { + for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter) + { + LLViewerJointAttachment* attachment = iter->second; + if (!attachment) continue; + for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin(); + attachment_iter != attachment->mAttachedObjects.end(); + ++attachment_iter) + { + LLViewerObject* attached_object = (*attachment_iter); + if (!attached_object) continue; + const LLUUID& item_id = attached_object->getItemID(); + if (item_id.isNull()) continue; + ids.push_back(item_id); + } + } + } + + // Need to fetch the inventory items for ids, then create links to them after they arrive. + LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids); + fetcher->startFetch(); + // If no items to be fetched, done will never be triggered. + // TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition. + if (fetcher->isFinished()) + { + fetcher->done(); + } + else + { + gInventory.addObserver(fetcher); + } + } + else + { + LL_WARNS("Wearables") << "No current outfit folder items found and no initial wearables fallback message received." << LL_ENDL; + } +} + +LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) : + LLInventoryFetchDescendentsObserver(my_outfits_id), + mCurrFetchStep(LOFS_FOLDER), + mOutfitsPopulated(false) +{ + mMyOutfitsID = LLUUID::null; + mClothingID = LLUUID::null; + mLibraryClothingID = LLUUID::null; + mImportedClothingID = LLUUID::null; + mImportedClothingName = "Imported Library Clothing"; +} + +LLLibraryOutfitsFetch::~LLLibraryOutfitsFetch() +{ +} + +void LLLibraryOutfitsFetch::done() +{ + // Delay this until idle() routine, since it's a heavy operation and + // we also can't have it run within notifyObservers. + doOnIdleOneTime(boost::bind(&LLLibraryOutfitsFetch::doneIdle,this)); + gInventory.removeObserver(this); // Prevent doOnIdleOneTime from being added twice. +} + +void LLLibraryOutfitsFetch::doneIdle() +{ + gInventory.addObserver(this); // Add this back in since it was taken out during ::done() + + switch (mCurrFetchStep) + { + case LOFS_FOLDER: + folderDone(); + mCurrFetchStep = LOFS_OUTFITS; + break; + case LOFS_OUTFITS: + outfitsDone(); + mCurrFetchStep = LOFS_LIBRARY; + break; + case LOFS_LIBRARY: + libraryDone(); + mCurrFetchStep = LOFS_IMPORTED; + break; + case LOFS_IMPORTED: + importedFolderDone(); + mCurrFetchStep = LOFS_CONTENTS; + break; + case LOFS_CONTENTS: + contentsDone(); + break; + default: + llwarns << "Got invalid state for outfit fetch: " << mCurrFetchStep << llendl; + mOutfitsPopulated = TRUE; + break; + } + + // We're completely done. Cleanup. + if (mOutfitsPopulated) + { + gInventory.removeObserver(this); + delete this; + return; + } +} + +void LLLibraryOutfitsFetch::folderDone() +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + gInventory.collectDescendents(mMyOutfitsID, cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH); + // Early out if we already have items in My Outfits. + if (cat_array.count() > 0 || wearable_array.count() > 0) + { + mOutfitsPopulated = true; + return; + } + + mClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); + mLibraryClothingID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING, false, true); + + // If Library->Clothing->Initial Outfits exists, use that. + LLNameCategoryCollector matchFolderFunctor("Initial Outfits"); + gInventory.collectDescendentsIf(mLibraryClothingID, + cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH, + matchFolderFunctor); + if (cat_array.count() > 0) + { + const LLViewerInventoryCategory *cat = cat_array.get(0); + mLibraryClothingID = cat->getUUID(); + } + + mComplete.clear(); + + // Get the complete information on the items in the inventory. + uuid_vec_t folders; + folders.push_back(mClothingID); + folders.push_back(mLibraryClothingID); + setFetchIDs(folders); + startFetch(); + if (isFinished()) + { + done(); + } +} + +void LLLibraryOutfitsFetch::outfitsDone() +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + uuid_vec_t folders; + + // Collect the contents of the Library's Clothing folder + gInventory.collectDescendents(mLibraryClothingID, cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH); + + llassert(cat_array.count() > 0); + for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); + iter != cat_array.end(); + ++iter) + { + const LLViewerInventoryCategory *cat = iter->get(); + + // Get the names and id's of every outfit in the library, skip "Ruth" + // because it's a low quality legacy outfit + if (cat->getName() != "Ruth") + { + // Get the name of every outfit in the library + folders.push_back(cat->getUUID()); + mLibraryClothingFolders.push_back(cat->getUUID()); + } + } + cat_array.clear(); + wearable_array.clear(); + + // Check if you already have an "Imported Library Clothing" folder + LLNameCategoryCollector matchFolderFunctor(mImportedClothingName); + gInventory.collectDescendentsIf(mClothingID, + cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH, + matchFolderFunctor); + if (cat_array.size() > 0) + { + const LLViewerInventoryCategory *cat = cat_array.get(0); + mImportedClothingID = cat->getUUID(); + } + + mComplete.clear(); + setFetchIDs(folders); + startFetch(); + if (isFinished()) + { + done(); + } +} + +class LLLibraryOutfitsCopyDone: public LLInventoryCallback +{ +public: + LLLibraryOutfitsCopyDone(LLLibraryOutfitsFetch * fetcher): + mFireCount(0), mLibraryOutfitsFetcher(fetcher) + { + } + + virtual ~LLLibraryOutfitsCopyDone() + { + if (!LLApp::isExiting() && mLibraryOutfitsFetcher) + { + gInventory.addObserver(mLibraryOutfitsFetcher); + mLibraryOutfitsFetcher->done(); + } + } + + /* virtual */ void fire(const LLUUID& inv_item) + { + mFireCount++; + } +private: + U32 mFireCount; + LLLibraryOutfitsFetch * mLibraryOutfitsFetcher; +}; + +// Copy the clothing folders from the library into the imported clothing folder +void LLLibraryOutfitsFetch::libraryDone() +{ + if (mImportedClothingID != LLUUID::null) + { + // Skip straight to fetching the contents of the imported folder + importedFolderFetch(); + return; + } + + // Remove observer; next autopopulation step will be triggered externally by LLLibraryOutfitsCopyDone. + gInventory.removeObserver(this); + + LLPointer<LLInventoryCallback> copy_waiter = new LLLibraryOutfitsCopyDone(this); + mImportedClothingID = gInventory.createNewCategory(mClothingID, + LLFolderType::FT_NONE, + mImportedClothingName); + // Copy each folder from library into clothing unless it already exists. + for (uuid_vec_t::const_iterator iter = mLibraryClothingFolders.begin(); + iter != mLibraryClothingFolders.end(); + ++iter) + { + const LLUUID& src_folder_id = (*iter); // Library clothing folder ID + const LLViewerInventoryCategory *cat = gInventory.getCategory(src_folder_id); + if (!cat) + { + llwarns << "Library folder import for uuid:" << src_folder_id << " failed to find folder." << llendl; + continue; + } + + if (!LLAppearanceMgr::getInstance()->getCanMakeFolderIntoOutfit(src_folder_id)) + { + llinfos << "Skipping non-outfit folder name:" << cat->getName() << llendl; + continue; + } + + // Don't copy the category if it already exists. + LLNameCategoryCollector matchFolderFunctor(cat->getName()); + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + gInventory.collectDescendentsIf(mImportedClothingID, + cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH, + matchFolderFunctor); + if (cat_array.size() > 0) + { + continue; + } + + LLUUID dst_folder_id = gInventory.createNewCategory(mImportedClothingID, + LLFolderType::FT_NONE, + cat->getName()); + LLAppearanceMgr::getInstance()->shallowCopyCategoryContents(src_folder_id, dst_folder_id, copy_waiter); + } +} + +void LLLibraryOutfitsFetch::importedFolderFetch() +{ + // Fetch the contents of the Imported Clothing Folder + uuid_vec_t folders; + folders.push_back(mImportedClothingID); + + mComplete.clear(); + setFetchIDs(folders); + startFetch(); + if (isFinished()) + { + done(); + } +} + +void LLLibraryOutfitsFetch::importedFolderDone() +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + uuid_vec_t folders; + + // Collect the contents of the Imported Clothing folder + gInventory.collectDescendents(mImportedClothingID, cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH); + + for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); + iter != cat_array.end(); + ++iter) + { + const LLViewerInventoryCategory *cat = iter->get(); + + // Get the name of every imported outfit + folders.push_back(cat->getUUID()); + mImportedClothingFolders.push_back(cat->getUUID()); + } + + mComplete.clear(); + setFetchIDs(folders); + startFetch(); + if (isFinished()) + { + done(); + } +} + +void LLLibraryOutfitsFetch::contentsDone() +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t wearable_array; + + for (uuid_vec_t::const_iterator folder_iter = mImportedClothingFolders.begin(); + folder_iter != mImportedClothingFolders.end(); + ++folder_iter) + { + const LLUUID &folder_id = (*folder_iter); + const LLViewerInventoryCategory *cat = gInventory.getCategory(folder_id); + if (!cat) + { + llwarns << "Library folder import for uuid:" << folder_id << " failed to find folder." << llendl; + continue; + } + + // First, make a folder in the My Outfits directory. + LLUUID new_outfit_folder_id = gInventory.createNewCategory(mMyOutfitsID, LLFolderType::FT_OUTFIT, cat->getName()); + + cat_array.clear(); + wearable_array.clear(); + // Collect the contents of each imported clothing folder, so we can create new outfit links for it + gInventory.collectDescendents(folder_id, cat_array, wearable_array, + LLInventoryModel::EXCLUDE_TRASH); + + for (LLInventoryModel::item_array_t::const_iterator wearable_iter = wearable_array.begin(); + wearable_iter != wearable_array.end(); + ++wearable_iter) + { + const LLViewerInventoryItem *item = wearable_iter->get(); + link_inventory_item(gAgent.getID(), + item->getLinkedUUID(), + new_outfit_folder_id, + item->getName(), + LLAssetType::AT_LINK, + NULL); + } + } + + mOutfitsPopulated = true; +} + diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h new file mode 100644 index 0000000000..6695727d46 --- /dev/null +++ b/indra/newview/llagentwearablesfetch.h @@ -0,0 +1,118 @@ +/** + * @file llagentwearablesinitialfetch.h + * @brief LLAgentWearablesInitialFetch class header file + * + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLAGENTWEARABLESINITIALFETCH_H +#define LL_LLAGENTWEARABLESINITIALFETCH_H + +#include "llinventoryobserver.h" +#include "llwearabledictionary.h" +#include "lluuid.h" + +//-------------------------------------------------------------------- +// InitialWearablesFetch +// +// This grabs contents from the COF and processes them. +// The processing is handled in idle(), i.e. outside of done(), +// to avoid gInventory.notifyObservers recursion. +//-------------------------------------------------------------------- +class LLInitialWearablesFetch : public LLInventoryFetchDescendentsObserver +{ +public: + LLInitialWearablesFetch(const LLUUID& cof_id); + ~LLInitialWearablesFetch(); + virtual void done(); + + struct InitialWearableData + { + EWearableType mType; + LLUUID mItemID; + LLUUID mAssetID; + InitialWearableData(EWearableType type, LLUUID& itemID, LLUUID& assetID) : + mType(type), + mItemID(itemID), + mAssetID(assetID) + {} + }; + + void add(InitialWearableData &data); + +protected: + void processWearablesMessage(); + void processContents(); + +private: + typedef std::vector<InitialWearableData> initial_wearable_data_vec_t; + initial_wearable_data_vec_t mAgentInitialWearables; // Wearables from the old agent wearables msg +}; + +//-------------------------------------------------------------------- +// InitialWearablesFetch +// +// This grabs outfits from the Library and copies those over to the user's +// outfits folder, typically during first-ever login. +//-------------------------------------------------------------------- +class LLLibraryOutfitsFetch : public LLInventoryFetchDescendentsObserver +{ +public: + enum ELibraryOutfitFetchStep + { + LOFS_FOLDER = 0, + LOFS_OUTFITS, + LOFS_LIBRARY, + LOFS_IMPORTED, + LOFS_CONTENTS + }; + + LLLibraryOutfitsFetch(const LLUUID& my_outfits_id); + ~LLLibraryOutfitsFetch(); + + virtual void done(); + void doneIdle(); + LLUUID mMyOutfitsID; + void importedFolderFetch(); +protected: + void folderDone(); + void outfitsDone(); + void libraryDone(); + void importedFolderDone(); + void contentsDone(); + enum ELibraryOutfitFetchStep mCurrFetchStep; + uuid_vec_t mLibraryClothingFolders; + uuid_vec_t mImportedClothingFolders; + bool mOutfitsPopulated; + LLUUID mClothingID; + LLUUID mLibraryClothingID; + LLUUID mImportedClothingID; + std::string mImportedClothingName; +}; + +#endif // LL_AGENTWEARABLESINITIALFETCH_H diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index b3dfb8f141..4d18ff57fe 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -39,16 +39,19 @@ #include "llfloatercustomize.h" #include "llgesturemgr.h" #include "llinventorybridge.h" +#include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llnotificationsutil.h" +#include "llselectmgr.h" #include "llsidepanelappearance.h" #include "llsidetray.h" +#include "llviewerobjectlist.h" #include "llvoavatar.h" #include "llvoavatarself.h" #include "llviewerregion.h" #include "llwearablelist.h" -LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name) +LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name) { LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; @@ -73,23 +76,6 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& } } -// support for secondlife:///app/appearance SLapps -class LLAppearanceHandler : public LLCommandHandler -{ -public: - // requests will be throttled from a non-trusted browser - LLAppearanceHandler() : LLCommandHandler("appearance", UNTRUSTED_THROTTLE) {} - - bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) - { - // support secondlife:///app/appearance/show, but for now we just - // make all secondlife:///app/appearance SLapps behave this way - LLSideTray::getInstance()->showPanel("sidepanel_appearance", LLSD()); - return true; - } -}; -LLAppearanceHandler gAppearanceHandler; - class LLWearInventoryCategoryCallback : public LLInventoryCallback { public: @@ -119,7 +105,7 @@ protected: // If the inventory callback manager goes away, we're shutting down, no longer want the callback. if( LLInventoryCallbackManager::is_instantiated() ) { - LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); + LLAppearanceMgr::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); } else { @@ -132,175 +118,6 @@ private: bool mAppend; }; -class LLOutfitObserver : public LLInventoryFetchObserver -{ -public: - LLOutfitObserver(const LLUUID& cat_id, bool copy_items, bool append) : - mCatID(cat_id), - mCopyItems(copy_items), - mAppend(append) - {} - ~LLOutfitObserver() {} - virtual void done(); - void doWearCategory(); - -protected: - LLUUID mCatID; - bool mCopyItems; - bool mAppend; -}; - -void LLOutfitObserver::done() -{ - llinfos << "done 2nd stage fetch" << llendl; - gInventory.removeObserver(this); - doOnIdle(boost::bind(&LLOutfitObserver::doWearCategory,this)); -} - -void LLOutfitObserver::doWearCategory() -{ - llinfos << "starting" << llendl; - - // We now have an outfit ready to be copied to agent inventory. Do - // it, and wear that outfit normally. - if(mCopyItems) - { - LLInventoryCategory* cat = gInventory.getCategory(mCatID); - std::string name; - if(!cat) - { - // should never happen. - name = "New Outfit"; - } - else - { - name = cat->getName(); - } - LLViewerInventoryItem* item = NULL; - item_ref_t::iterator it = mComplete.begin(); - item_ref_t::iterator end = mComplete.end(); - LLUUID pid; - for(; it < end; ++it) - { - item = (LLViewerInventoryItem*)gInventory.getItem(*it); - if(item) - { - if(LLInventoryType::IT_GESTURE == item->getInventoryType()) - { - pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); - } - else - { - pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); - } - break; - } - } - if(pid.isNull()) - { - pid = gInventory.getRootFolderID(); - } - - LLUUID cat_id = gInventory.createNewCategory( - pid, - LLFolderType::FT_NONE, - name); - mCatID = cat_id; - LLPointer<LLInventoryCallback> cb = new LLWearInventoryCategoryCallback(mCatID, mAppend); - it = mComplete.begin(); - for(; it < end; ++it) - { - item = (LLViewerInventoryItem*)gInventory.getItem(*it); - if(item) - { - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - cat_id, - std::string(), - cb); - } - } - // BAP fixes a lag in display of created dir. - gInventory.notifyObservers(); - } - else - { - // Wear the inventory category. - LLAppearanceManager::instance().wearInventoryCategoryOnAvatar(gInventory.getCategory(mCatID), mAppend); - } - delete this; -} - -class LLOutfitFetch : public LLInventoryFetchDescendentsObserver -{ -public: - LLOutfitFetch(bool copy_items, bool append) : mCopyItems(copy_items), mAppend(append) {} - ~LLOutfitFetch() {} - virtual void done(); -protected: - bool mCopyItems; - bool mAppend; -}; - -void LLOutfitFetch::done() -{ - // What we do here is get the complete information on the items in - // the library, and set up an observer that will wait for that to - // happen. - llinfos << "done first stage fetch" << llendl; - - LLInventoryModel::cat_array_t cat_array; - LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(mCompleteFolders.front(), - cat_array, - item_array, - LLInventoryModel::EXCLUDE_TRASH); - S32 count = item_array.count(); - if(!count) - { - llwarns << "Nothing fetched in category " << mCompleteFolders.front() - << llendl; - //dec_busy_count(); - gInventory.removeObserver(this); - delete this; - return; - } - - LLOutfitObserver* outfit_observer = new LLOutfitObserver(mCompleteFolders.front(), mCopyItems, mAppend); - LLInventoryFetchObserver::item_ref_t ids; - for(S32 i = 0; i < count; ++i) - { - ids.push_back(item_array.get(i)->getUUID()); - } - - // clean up, and remove this as an observer since the call to the - // outfit could notify observers and throw us into an infinite - // loop. - //dec_busy_count(); - gInventory.removeObserver(this); - - // increment busy count and either tell the inventory to check & - // call done, or add this object to the inventory for observation. - //inc_busy_count(); - - // do the fetch - outfit_observer->fetchItems(ids); - if(outfit_observer->isEverythingComplete()) - { - // everything is already here - call done. - outfit_observer->done(); - } - else - { - // it's all on it's way - add an observer, and the inventory - // will call done for us when everything is here. - gInventory.addObserver(outfit_observer); - } - delete this; -} - LLUpdateAppearanceOnDestroy::LLUpdateAppearanceOnDestroy(): mFireCount(0) { @@ -312,7 +129,7 @@ LLUpdateAppearanceOnDestroy::~LLUpdateAppearanceOnDestroy() if (!LLApp::isExiting()) { - LLAppearanceManager::instance().updateAppearanceFromCOF(); + LLAppearanceMgr::instance().updateAppearanceFromCOF(); } } @@ -368,6 +185,7 @@ public: void recoverMissingWearable(EWearableType type); void clearCOFLinksForMissingWearables(); + void onWearableAssetFetch(LLWearable *wearable); void onAllComplete(); typedef std::list<LLFoundData> found_list_t; @@ -450,12 +268,12 @@ void LLWearableHoldingPattern::onAllComplete() { llinfos << "Activating " << mGestItems.count() << " gestures" << llendl; - LLGestureManager::instance().activateGestures(mGestItems); + LLGestureMgr::instance().activateGestures(mGestItems); // Update the inventory item labels to reflect the fact // they are active. LLViewerInventoryCategory* catp = - gInventory.getCategory(LLAppearanceManager::instance().getCOF()); + gInventory.getCategory(LLAppearanceMgr::instance().getCOF()); if (catp) { @@ -466,11 +284,10 @@ void LLWearableHoldingPattern::onAllComplete() // Update wearables. llinfos << "Updating agent wearables with " << mResolved << " wearable items " << llendl; - LLAppearanceManager::instance().updateAgentWearables(this, false); + LLAppearanceMgr::instance().updateAgentWearables(this, false); // Update attachments to match those requested. - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( avatar ) + if (isAgentAvatarValid()) { llinfos << "Updating " << mObjItems.count() << " attachments" << llendl; LLAgentWearables::userUpdateAttachments(mObjItems); @@ -581,7 +398,7 @@ public: { link_inventory_item( gAgent.getID(), item_id, - LLAppearanceManager::instance().getCOF(), + LLAppearanceMgr::instance().getCOF(), itemp->getName(), LLAssetType::AT_LINK, cb); @@ -632,7 +449,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables() { // Wearable link that was never resolved; remove links to it from COF llinfos << "removing link for unresolved item " << data.mItemID.asString() << llendl; - LLAppearanceManager::instance().removeCOFItemLinks(data.mItemID,false); + LLAppearanceMgr::instance().removeCOFItemLinks(data.mItemID,false); } } } @@ -657,11 +474,10 @@ bool LLWearableHoldingPattern::pollMissingWearables() return done; } -static void onWearableAssetFetch(LLWearable* wearable, void* data) +void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) { - LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data; - holder->mResolved += 1; // just counting callbacks, not successes. - llinfos << "onWearableAssetFetch, resolved count " << holder->mResolved << " of requested " << holder->mFoundList.size() << llendl; + mResolved += 1; // just counting callbacks, not successes. + llinfos << "onWearableAssetFetch, resolved count " << mResolved << " of requested " << mFoundList.size() << llendl; if (wearable) { llinfos << "wearable found, type " << wearable->getType() << " asset " << wearable->getAssetID() << llendl; @@ -671,7 +487,7 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) llwarns << "no wearable found" << llendl; } - if (holder->mFired) + if (mFired) { llwarns << "called after holder fired" << llendl; return; @@ -682,8 +498,8 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) return; } - for (LLWearableHoldingPattern::found_list_t::iterator iter = holder->mFoundList.begin(); - iter != holder->mFoundList.end(); ++iter) + for (LLWearableHoldingPattern::found_list_t::iterator iter = mFoundList.begin(); + iter != mFoundList.end(); ++iter) { LLFoundData& data = *iter; if(wearable->getAssetID() == data.mAssetID) @@ -696,6 +512,12 @@ static void onWearableAssetFetch(LLWearable* wearable, void* data) } } +static void onWearableAssetFetch(LLWearable* wearable, void* data) +{ + LLWearableHoldingPattern* holder = (LLWearableHoldingPattern*)data; + holder->onWearableAssetFetch(wearable); +} + static void removeDuplicateItems(LLInventoryModel::item_array_t& items) { @@ -724,13 +546,13 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items) items = new_items; } -const LLUUID LLAppearanceManager::getCOF() const +const LLUUID LLAppearanceMgr::getCOF() const { return gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); } -const LLViewerInventoryItem* LLAppearanceManager::getBaseOutfitLink() +const LLViewerInventoryItem* LLAppearanceMgr::getBaseOutfitLink() { const LLUUID& current_outfit_cat = getCOF(); LLInventoryModel::cat_array_t cat_array; @@ -758,7 +580,7 @@ const LLViewerInventoryItem* LLAppearanceManager::getBaseOutfitLink() return NULL; } -bool LLAppearanceManager::getBaseOutfitName(std::string& name) +bool LLAppearanceMgr::getBaseOutfitName(std::string& name) { const LLViewerInventoryItem* outfit_link = getBaseOutfitLink(); if(outfit_link) @@ -773,16 +595,65 @@ bool LLAppearanceManager::getBaseOutfitName(std::string& name) return false; } +const LLUUID LLAppearanceMgr::getBaseOutfitUUID() +{ + const LLViewerInventoryItem* outfit_link = getBaseOutfitLink(); + if (!outfit_link || !outfit_link->getIsLinkType()) return LLUUID::null; + + const LLViewerInventoryCategory* outfit_cat = outfit_link->getLinkedCategory(); + if (!outfit_cat) return LLUUID::null; + + if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT) + { + llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl; + return LLUUID::null; + } + + return outfit_cat->getUUID(); +} + +bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_update) +{ + if (item_id_to_wear.isNull()) return false; + + //only the item from a user's inventory is allowed + if (!gInventory.isObjectDescendentOf(item_id_to_wear, gInventory.getRootFolderID())) return false; + + LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); + if (!item_to_wear) return false; + + switch (item_to_wear->getType()) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + // Don't wear anything until initial wearables are loaded, can + // destroy clothing items. + if (!gAgentWearables.areWearablesLoaded()) + { + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); + return false; + } + addCOFItemLink(item_to_wear, do_update); + break; + case LLAssetType::AT_OBJECT: + rez_attachment(item_to_wear, NULL); + break; + default: return false;; + } + + return true; +} + // Update appearance from outfit folder. -void LLAppearanceManager::changeOutfit(bool proceed, const LLUUID& category, bool append) +void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool append) { if (!proceed) return; - LLAppearanceManager::instance().updateCOF(category,append); + LLAppearanceMgr::instance().updateCOF(category,append); } // Create a copy of src_id + contents as a subfolder of dst_id. -void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, +void LLAppearanceMgr::shallowCopyCategory(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb) { LLInventoryCategory *src_cat = gInventory.getCategory(src_id); @@ -805,7 +676,7 @@ void LLAppearanceManager::shallowCopyCategory(const LLUUID& src_id, const LLUUID } // Copy contents of src_id to dst_id. -void LLAppearanceManager::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, +void LLAppearanceMgr::shallowCopyCategoryContents(const LLUUID& src_id, const LLUUID& dst_id, LLPointer<LLInventoryCallback> cb) { LLInventoryModel::cat_array_t* cats; @@ -861,7 +732,7 @@ void LLAppearanceManager::shallowCopyCategoryContents(const LLUUID& src_id, cons } } -BOOL LLAppearanceManager::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) +BOOL LLAppearanceMgr::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) { // These are the wearable items that are required for considering this // folder as containing a complete outfit. @@ -893,7 +764,7 @@ BOOL LLAppearanceManager::getCanMakeFolderIntoOutfit(const LLUUID& folder_id) } -void LLAppearanceManager::purgeBaseOutfitLink(const LLUUID& category) +void LLAppearanceMgr::purgeBaseOutfitLink(const LLUUID& category) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; @@ -915,7 +786,7 @@ void LLAppearanceManager::purgeBaseOutfitLink(const LLUUID& category) } } -void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit_links) +void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_links) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; @@ -935,7 +806,7 @@ void LLAppearanceManager::purgeCategory(const LLUUID& category, bool keep_outfit // Keep the last N wearables of each type. For viewer 2.0, N is 1 for // both body parts and clothing items. -void LLAppearanceManager::filterWearableItems( +void LLAppearanceMgr::filterWearableItems( LLInventoryModel::item_array_t& items, S32 max_per_type) { // Divvy items into arrays by wearable type. @@ -971,7 +842,7 @@ void LLAppearanceManager::filterWearableItems( } // Create links to all listed items. -void LLAppearanceManager::linkAll(const LLUUID& category, +void LLAppearanceMgr::linkAll(const LLUUID& category, LLInventoryModel::item_array_t& items, LLPointer<LLInventoryCallback> cb) { @@ -987,7 +858,7 @@ void LLAppearanceManager::linkAll(const LLUUID& category, } } -void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) +void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append) { LLViewerInventoryCategory *pcat = gInventory.getCategory(category); llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl; @@ -1002,9 +873,9 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) for(S32 i = 0; i < gest_items.count(); ++i) { LLViewerInventoryItem *gest_item = gest_items.get(i); - if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) ) + if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) ) { - LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); + LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() ); } } } @@ -1027,7 +898,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) getDescendentsOfAssetType(category, wear_items, LLAssetType::AT_CLOTHING, false); // Reduce wearables to max of one per type. removeDuplicateItems(wear_items); - filterWearableItems(wear_items, 1); + filterWearableItems(wear_items, 5); // - Attachments: include COF contents only if appending. LLInventoryModel::item_array_t obj_items; @@ -1065,7 +936,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) llinfos << "waiting for LLUpdateAppearanceOnDestroy" << llendl; } -void LLAppearanceManager::updatePanelOutfitName(const std::string& name) +void LLAppearanceMgr::updatePanelOutfitName(const std::string& name) { LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); @@ -1075,7 +946,7 @@ void LLAppearanceManager::updatePanelOutfitName(const std::string& name) } } -void LLAppearanceManager::createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter) +void LLAppearanceMgr::createBaseOutfitLink(const LLUUID& category, LLPointer<LLInventoryCallback> link_waiter) { const LLUUID cof = getCOF(); LLViewerInventoryCategory* catp = gInventory.getCategory(category); @@ -1093,7 +964,7 @@ void LLAppearanceManager::createBaseOutfitLink(const LLUUID& category, LLPointer updatePanelOutfitName(new_outfit_name); } -void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append) +void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, bool append) { lldebugs << "updateAgentWearables()" << llendl; LLInventoryItem::item_array_t items; @@ -1117,7 +988,6 @@ void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, items.put(item); wearables.put(wearable); } - break; } } } @@ -1146,7 +1016,7 @@ static void remove_non_link_items(LLInventoryModel::item_array_t &items) items = pruned_items; } -void LLAppearanceManager::updateAppearanceFromCOF() +void LLAppearanceMgr::updateAppearanceFromCOF() { // update dirty flag to see if the state of the COF matches // the saved outfit stored as a folder link @@ -1160,7 +1030,7 @@ void LLAppearanceManager::updateAppearanceFromCOF() LLUUID current_outfit_id = getCOF(); // Find all the wearables that are in the COF's subtree. - lldebugs << "LLAppearanceManager::updateFromCOF()" << llendl; + lldebugs << "LLAppearanceMgr::updateFromCOF()" << llendl; LLInventoryModel::item_array_t wear_items; LLInventoryModel::item_array_t obj_items; LLInventoryModel::item_array_t gest_items; @@ -1186,9 +1056,6 @@ void LLAppearanceManager::updateAppearanceFromCOF() // callback will be called (and this object deleted) // before the final getNextData(). - // BAP future cleanup - no point having found_container when - // mFoundList already has all the info. - LLDynamicArray<LLFoundData> found_container; for(S32 i = 0; i < wear_items.count(); ++i) { LLViewerInventoryItem *item = wear_items.get(i); @@ -1214,7 +1081,6 @@ void LLAppearanceManager::updateAppearanceFromCOF() #endif holder->mFoundList.push_front(found); - found_container.put(found); } else { @@ -1229,9 +1095,10 @@ void LLAppearanceManager::updateAppearanceFromCOF() } } - for(S32 i = 0; i < found_container.count(); ++i) + for (LLWearableHoldingPattern::found_list_t::iterator it = holder->mFoundList.begin(); + it != holder->mFoundList.end(); ++it) { - LLFoundData& found = found_container.get(i); + LLFoundData& found = *it; llinfos << "waiting for onWearableAssetFetch callback, asset " << found.mAssetID.asString() << llendl; @@ -1248,10 +1115,9 @@ void LLAppearanceManager::updateAppearanceFromCOF() { doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollFetchCompletion,holder)); } - } -void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category, +void LLAppearanceMgr::getDescendentsOfAssetType(const LLUUID& category, LLInventoryModel::item_array_t& items, LLAssetType::EType type, bool follow_folder_links) @@ -1266,7 +1132,7 @@ void LLAppearanceManager::getDescendentsOfAssetType(const LLUUID& category, follow_folder_links); } -void LLAppearanceManager::getUserDescendents(const LLUUID& category, +void LLAppearanceMgr::getUserDescendents(const LLUUID& category, LLInventoryModel::item_array_t& wear_items, LLInventoryModel::item_array_t& obj_items, LLInventoryModel::item_array_t& gest_items, @@ -1301,36 +1167,97 @@ void LLAppearanceManager::getUserDescendents(const LLUUID& category, follow_folder_links); } -void LLAppearanceManager::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append) +void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append) { if(!category) return; llinfos << "wearInventoryCategory( " << category->getName() << " )" << llendl; - // What we do here is get the complete information on the items in - // the inventory, and set up an observer that will wait for that to - // happen. - LLOutfitFetch* outfit_fetcher = new LLOutfitFetch(copy, append); - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(category->getUUID()); - outfit_fetcher->fetchDescendents(folders); - //inc_busy_count(); - if(outfit_fetcher->isEverythingComplete()) + callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal, + &LLAppearanceMgr::instance(), + category->getUUID(), copy, append)); +} + +void LLAppearanceMgr::wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append) +{ + llinfos << "starting" << llendl; + + // We now have an outfit ready to be copied to agent inventory. Do + // it, and wear that outfit normally. + LLInventoryCategory* cat = gInventory.getCategory(cat_id); + if(copy_items) { - // everything is already here - call done. - outfit_fetcher->done(); + LLInventoryModel::cat_array_t* cats; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat_id, cats, items); + std::string name; + if(!cat) + { + // should never happen. + name = "New Outfit"; + } + else + { + name = cat->getName(); + } + LLViewerInventoryItem* item = NULL; + LLInventoryModel::item_array_t::const_iterator it = items->begin(); + LLInventoryModel::item_array_t::const_iterator end = items->end(); + LLUUID pid; + for(; it < end; ++it) + { + item = *it; + if(item) + { + if(LLInventoryType::IT_GESTURE == item->getInventoryType()) + { + pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); + } + else + { + pid = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING); + } + break; + } + } + if(pid.isNull()) + { + pid = gInventory.getRootFolderID(); + } + + LLUUID new_cat_id = gInventory.createNewCategory( + pid, + LLFolderType::FT_NONE, + name); + LLPointer<LLInventoryCallback> cb = new LLWearInventoryCategoryCallback(new_cat_id, append); + it = items->begin(); + for(; it < end; ++it) + { + item = *it; + if(item) + { + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + new_cat_id, + std::string(), + cb); + } + } + // BAP fixes a lag in display of created dir. + gInventory.notifyObservers(); } else { - // it's all on it's way - add an observer, and the inventory - // will call done for us when everything is here. - gInventory.addObserver(outfit_fetcher); + // Wear the inventory category. + LLAppearanceMgr::instance().wearInventoryCategoryOnAvatar(cat, append); } } // *NOTE: hack to get from avatar inventory to avatar -void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* category, bool append ) +void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* category, bool append ) { // Avoid unintentionally overwriting old wearables. We have to do // this up front to avoid having to deal with the case of multiple @@ -1342,17 +1269,17 @@ void LLAppearanceManager::wearInventoryCategoryOnAvatar( LLInventoryCategory* ca if( gFloaterCustomize ) { - gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceManager::changeOutfit, - &LLAppearanceManager::instance(), + gFloaterCustomize->askToSaveIfDirty(boost::bind(&LLAppearanceMgr::changeOutfit, + &LLAppearanceMgr::instance(), _1, category->getUUID(), append)); } else { - LLAppearanceManager::changeOutfit(TRUE, category->getUUID(), append); + LLAppearanceMgr::changeOutfit(TRUE, category->getUUID(), append); } } -void LLAppearanceManager::wearOutfitByName(const std::string& name) +void LLAppearanceMgr::wearOutfitByName(const std::string& name) { llinfos << "Wearing category " << name << llendl; //inc_busy_count(); @@ -1388,7 +1315,7 @@ void LLAppearanceManager::wearOutfitByName(const std::string& name) if(cat) { - LLAppearanceManager::wearInventoryCategory(cat, copy_items, false); + LLAppearanceMgr::wearInventoryCategory(cat, copy_items, false); } else { @@ -1424,7 +1351,7 @@ public: if (item) { gInventory.removeObserver(this); - LLAppearanceManager::instance().addCOFItemLink(item,mDoUpdate); + LLAppearanceMgr::instance().addCOFItemLink(item,mDoUpdate); delete this; } } @@ -1435,7 +1362,9 @@ private: }; -void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update ) +// BAP - note that this runs asynchronously if the item is not already loaded from inventory. +// Dangerous if caller assumes link will exist after calling the function. +void LLAppearanceMgr::addCOFItemLink(const LLUUID &item_id, bool do_update ) { const LLInventoryItem *item = gInventory.getItem(item_id); if (!item) @@ -1449,7 +1378,7 @@ void LLAppearanceManager::addCOFItemLink(const LLUUID &item_id, bool do_update ) } } -void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_update ) +void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update ) { const LLViewerInventoryItem *vitem = dynamic_cast<const LLViewerInventoryItem*>(item); if (!vitem) @@ -1462,7 +1391,7 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(LLAppearanceManager::getCOF(), + gInventory.collectDescendents(LLAppearanceMgr::getCOF(), cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); @@ -1490,7 +1419,7 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up { if (do_update) { - LLAppearanceManager::updateAppearanceFromCOF(); + LLAppearanceMgr::updateAppearanceFromCOF(); } return; } @@ -1507,7 +1436,8 @@ void LLAppearanceManager::addCOFItemLink(const LLInventoryItem *item, bool do_up return; } -void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_update ) +// BAP remove ensemble code for 2.1? +void LLAppearanceMgr::addEnsembleLink( LLInventoryCategory* cat, bool do_update ) { #if SUPPORT_ENSEMBLES // BAP add check for already in COF. @@ -1521,13 +1451,13 @@ void LLAppearanceManager::addEnsembleLink( LLInventoryCategory* cat, bool do_upd #endif } -void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_update) +void LLAppearanceMgr::removeCOFItemLinks(const LLUUID& item_id, bool do_update) { gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(LLAppearanceManager::getCOF(), + gInventory.collectDescendents(LLAppearanceMgr::getCOF(), cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); @@ -1541,11 +1471,11 @@ void LLAppearanceManager::removeCOFItemLinks(const LLUUID& item_id, bool do_upda } if (do_update) { - LLAppearanceManager::updateAppearanceFromCOF(); + LLAppearanceMgr::updateAppearanceFromCOF(); } } -void LLAppearanceManager::updateIsDirty() +void LLAppearanceMgr::updateIsDirty() { LLUUID cof = getCOF(); LLUUID base_outfit; @@ -1614,7 +1544,7 @@ void LLAppearanceManager::updateIsDirty() } } -void LLAppearanceManager::onFirstFullyVisible() +void LLAppearanceMgr::autopopulateOutfits() { // If this is the very first time the user has logged into viewer2+ (from a legacy viewer, or new account) // then auto-populate outfits from the library into the My Outfits folder. @@ -1631,9 +1561,70 @@ void LLAppearanceManager::onFirstFullyVisible() check_populate_my_outfits = false; } +// Handler for anything that's deferred until avatar de-clouds. +void LLAppearanceMgr::onFirstFullyVisible() +{ + autopopulateOutfits(); +} + +bool LLAppearanceMgr::updateBaseOutfit() +{ + const LLUUID base_outfit_id = getBaseOutfitUUID(); + if (base_outfit_id.isNull()) return false; + + // in a Base Outfit we do not remove items, only links + purgeCategory(base_outfit_id, false); + + //COF contains only links so we copy to the Base Outfit only links + shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL); + + return true; +} + +void LLAppearanceMgr::wearBaseOutfit() +{ + const LLUUID& base_outfit_id = getBaseOutfitUUID(); + if (base_outfit_id.isNull()) return; + + updateCOF(base_outfit_id); +} + +void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) +{ + LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove); + if (!item_to_remove) return; + + switch (item_to_remove->getType()) + { + case LLAssetType::AT_CLOTHING: + if (get_is_item_worn(id_to_remove)) + { + //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future + LLWearableBridge::removeItemFromAvatar(item_to_remove); + } + break; + case LLAssetType::AT_OBJECT: + gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_to_remove->getLinkedUUID()); + gMessageSystem->sendReliable( gAgent.getRegion()->getHost()); + + { + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject(item_to_remove->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + }; + } + default: break; + } +} + //#define DUMP_CAT_VERBOSE -void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg) +void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) { LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; @@ -1654,7 +1645,7 @@ void LLAppearanceManager::dumpCat(const LLUUID& cat_id, const std::string& msg) llinfos << msg << " count " << items.count() << llendl; } -void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& items, +void LLAppearanceMgr::dumpItemArray(const LLInventoryModel::item_array_t& items, const std::string& msg) { llinfos << msg << llendl; @@ -1666,22 +1657,23 @@ void LLAppearanceManager::dumpItemArray(const LLInventoryModel::item_array_t& it llinfos << llendl; } -LLAppearanceManager::LLAppearanceManager(): +LLAppearanceMgr::LLAppearanceMgr(): mAttachmentInvLinkEnabled(false), mOutfitIsDirty(false) { } -LLAppearanceManager::~LLAppearanceManager() +LLAppearanceMgr::~LLAppearanceMgr() { } -void LLAppearanceManager::setAttachmentInvLinkEnable(bool val) +void LLAppearanceMgr::setAttachmentInvLinkEnable(bool val) { llinfos << "setAttachmentInvLinkEnable => " << (int) val << llendl; mAttachmentInvLinkEnabled = val; } +// BAP TODO - mRegisteredAttachments is currently maintained but not used for anything. Consider yanking. void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) { llinfos << msg << llendl; @@ -1699,15 +1691,14 @@ void dumpAttachmentSet(const std::set<LLUUID>& atts, const std::string& msg) llinfos << llendl; } -void LLAppearanceManager::registerAttachment(const LLUUID& item_id) +void LLAppearanceMgr::registerAttachment(const LLUUID& item_id) { mRegisteredAttachments.insert(item_id); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - //dumpAttachmentSet(mRegisteredAttachments,"after register:"); if (mAttachmentInvLinkEnabled) { - LLAppearanceManager::addCOFItemLink(item_id, false); // Add COF link for item. + LLAppearanceMgr::addCOFItemLink(item_id, false); // Add COF link for item. } else { @@ -1715,17 +1706,14 @@ void LLAppearanceManager::registerAttachment(const LLUUID& item_id) } } -void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id) +void LLAppearanceMgr::unregisterAttachment(const LLUUID& item_id) { mRegisteredAttachments.erase(item_id); gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); - //dumpAttachmentSet(mRegisteredAttachments,"after unregister:"); - if (mAttachmentInvLinkEnabled) { - //LLAppearanceManager::dumpCat(LLAppearanceManager::getCOF(),"Removing attachment link:"); - LLAppearanceManager::removeCOFItemLinks(item_id, false); + LLAppearanceMgr::removeCOFItemLinks(item_id, false); } else { @@ -1733,7 +1721,7 @@ void LLAppearanceManager::unregisterAttachment(const LLUUID& item_id) } } -void LLAppearanceManager::linkRegisteredAttachments() +void LLAppearanceMgr::linkRegisteredAttachments() { for (std::set<LLUUID>::iterator it = mRegisteredAttachments.begin(); it != mRegisteredAttachments.end(); @@ -1745,12 +1733,12 @@ void LLAppearanceManager::linkRegisteredAttachments() mRegisteredAttachments.clear(); } -BOOL LLAppearanceManager::getIsInCOF(const LLUUID& obj_id) const +BOOL LLAppearanceMgr::getIsInCOF(const LLUUID& obj_id) const { return gInventory.isObjectDescendentOf(obj_id, getCOF()); } -BOOL LLAppearanceManager::getIsProtectedCOFItem(const LLUUID& obj_id) const +BOOL LLAppearanceMgr::getIsProtectedCOFItem(const LLUUID& obj_id) const { if (!getIsInCOF(obj_id)) return FALSE; diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 9d6cd34ad7..7e35919892 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -43,9 +43,9 @@ class LLWearable; class LLWearableHoldingPattern; class LLInventoryCallback; -class LLAppearanceManager: public LLSingleton<LLAppearanceManager> +class LLAppearanceMgr: public LLSingleton<LLAppearanceMgr> { - friend class LLSingleton<LLAppearanceManager>; + friend class LLSingleton<LLAppearanceMgr>; public: void updateAppearanceFromCOF(); @@ -53,6 +53,7 @@ public: void updateCOF(const LLUUID& category, bool append = false); void wearInventoryCategory(LLInventoryCategory* category, bool copy, bool append); void wearInventoryCategoryOnAvatar(LLInventoryCategory* category, bool append); + void wearCategoryFinal(LLUUID& cat_id, bool copy_items, bool append); void wearOutfitByName(const std::string& name); void changeOutfit(bool proceed, const LLUUID& category, bool append); @@ -74,6 +75,12 @@ public: const LLViewerInventoryItem *getBaseOutfitLink(); bool getBaseOutfitName(std::string &name); + // find the UUID of the currently worn outfit (Base Outfit) + const LLUUID getBaseOutfitUUID(); + + // Wear/attach an item (from a user's inventory) on the agent + bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); + // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); @@ -118,10 +125,22 @@ public: // Called when self avatar is first fully visible. void onFirstFullyVisible(); + + // Create initial outfits from library. + void autopopulateOutfits(); + void wearBaseOutfit(); + + // Overrides the base outfit with the content from COF + // @return false if there is no base outfit + bool updateBaseOutfit(); + + //Remove clothing or detach an object from the agent (a bodypart cannot be removed) + void removeItemFromAvatar(const LLUUID& item_id); + protected: - LLAppearanceManager(); - ~LLAppearanceManager(); + LLAppearanceMgr(); + ~LLAppearanceMgr(); private: @@ -173,17 +192,17 @@ LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& // Shim class and template function to allow arbitrary boost::bind // expressions to be run as one-time idle callbacks. template <typename T> -class OnIdleCallback +class OnIdleCallbackOneTime { public: - OnIdleCallback(T callable): + OnIdleCallbackOneTime(T callable): mCallable(callable) { } static void onIdle(void *data) { gIdleCallbacks.deleteFunction(onIdle, data); - OnIdleCallback<T>* self = reinterpret_cast<OnIdleCallback<T>*>(data); + OnIdleCallbackOneTime<T>* self = reinterpret_cast<OnIdleCallbackOneTime<T>*>(data); self->call(); delete self; } @@ -196,14 +215,15 @@ private: }; template <typename T> -void doOnIdle(T callable) +void doOnIdleOneTime(T callable) { - OnIdleCallback<T>* cb_functor = new OnIdleCallback<T>(callable); - gIdleCallbacks.addFunction(&OnIdleCallback<T>::onIdle,cb_functor); + OnIdleCallbackOneTime<T>* cb_functor = new OnIdleCallbackOneTime<T>(callable); + gIdleCallbacks.addFunction(&OnIdleCallbackOneTime<T>::onIdle,cb_functor); } // Shim class and template function to allow arbitrary boost::bind // expressions to be run as recurring idle callbacks. +// Callable should return true when done, false to continue getting called. template <typename T> class OnIdleCallbackRepeating { @@ -212,7 +232,7 @@ public: mCallable(callable) { } - // Will keep getting called until the callable returns false. + // Will keep getting called until the callable returns true. static void onIdle(void *data) { OnIdleCallbackRepeating<T>* self = reinterpret_cast<OnIdleCallbackRepeating<T>*>(data); @@ -239,10 +259,12 @@ void doOnIdleRepeating(T callable) } template <class T> -class CallAfterCategoryFetchStage2: public LLInventoryFetchObserver +class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver { public: - CallAfterCategoryFetchStage2(T callable): + CallAfterCategoryFetchStage2(const uuid_vec_t& ids, + T callable) : + LLInventoryFetchItemsObserver(ids), mCallable(callable) { } @@ -252,7 +274,7 @@ public: virtual void done() { gInventory.removeObserver(this); - doOnIdle(mCallable); + doOnIdleOneTime(mCallable); delete this; } protected: @@ -263,7 +285,8 @@ template <class T> class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver { public: - CallAfterCategoryFetchStage1(T callable): + CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) : + LLInventoryFetchDescendentsObserver(cat_id), mCallable(callable) { } @@ -277,14 +300,14 @@ public: // happen. LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(mCompleteFolders.front(), + gInventory.collectDescendents(mComplete.front(), cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); S32 count = item_array.count(); if(!count) { - llwarns << "Nothing fetched in category " << mCompleteFolders.front() + llwarns << "Nothing fetched in category " << mComplete.front() << llendl; //dec_busy_count(); gInventory.removeObserver(this); @@ -292,8 +315,7 @@ public: return; } - CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { ids.push_back(item_array.get(i)->getUUID()); @@ -302,8 +324,9 @@ public: gInventory.removeObserver(this); // do the fetch - stage2->fetchItems(ids); - if(stage2->isEverythingComplete()) + CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable); + stage2->startFetch(); + if(stage2->isFinished()) { // everything is already here - call done. stage2->done(); @@ -323,11 +346,9 @@ protected: template <class T> void callAfterCategoryFetch(const LLUUID& cat_id, T callable) { - CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable); - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(cat_id); - stage1->fetchDescendents(folders); - if (stage1->isEverythingComplete()) + CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable); + stage1->startFetch(); + if (stage1->isFinished()) { stage1->done(); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f19a33301a..2f9bbb1407 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -44,6 +44,7 @@ #include "llviewertexturelist.h" #include "llgroupmgr.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llwindow.h" #include "llviewerstats.h" @@ -78,6 +79,7 @@ #include "lllocationhistory.h" #include "llfasttimerview.h" #include "llvoicechannel.h" +#include "llvoavatarself.h" #include "llsidetray.h" @@ -355,7 +357,7 @@ void request_initial_instant_messages() if (!requested && gMessageSystem && LLMuteList::getInstance()->isLoaded() - && gAgent.getAvatarObject()) + && isAgentAvatarValid()) { // Auto-accepted inventory items may require the avatar object // to build a correct name. Likewise, inventory offers from @@ -860,7 +862,7 @@ bool LLAppViewer::init() minSpecs += "\n"; unsupported = true; } - if(gSysCPU.getMhz() < minCPU) + if(gSysCPU.getMHz() < minCPU) { minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); minSpecs += "\n"; @@ -1166,8 +1168,8 @@ bool LLAppViewer::mainLoop() if(!total_work_pending) //pause texture fetching threads if nothing to process. { - LLAppViewer::getTextureCache()->pause(); - LLAppViewer::getImageDecodeThread()->pause(); + LLAppViewer::getTextureCache()->pause(); + LLAppViewer::getImageDecodeThread()->pause(); LLAppViewer::getTextureFetch()->pause(); } if(!total_io_pending) //pause file threads if nothing to process. @@ -1525,6 +1527,8 @@ bool LLAppViewer::cleanup() LLLocationHistory::getInstance()->save(); LLAvatarIconIDCache::getInstance()->save(); + + LLViewerMedia::saveCookieFile(); llinfos << "Shutting down Threads" << llendflush; @@ -1645,7 +1649,7 @@ bool LLAppViewer::cleanup() // HACK: Attempt to wait until the screen res. switch is complete. ms_sleep(1000); - LLWeb::loadURLExternal( gLaunchFileOnQuit ); + LLWeb::loadURLExternal( gLaunchFileOnQuit, false ); llinfos << "File launched." << llendflush; } @@ -2494,9 +2498,9 @@ void LLAppViewer::cleanupSavedSettings() gSavedSettings.setF32("MapScale", LLWorldMapView::sMapScale ); // Some things are cached in LLAgent. - if (gAgent.mInitialized) + if (gAgent.isInitialized()) { - gSavedSettings.setF32("RenderFarClip", gAgent.mDrawDistance); + gSavedSettings.setF32("RenderFarClip", gAgentCamera.mDrawDistance); } } @@ -2520,7 +2524,7 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["CPUInfo"]["CPUString"] = gSysCPU.getCPUString(); gDebugInfo["CPUInfo"]["CPUFamily"] = gSysCPU.getFamily(); - gDebugInfo["CPUInfo"]["CPUMhz"] = gSysCPU.getMhz(); + gDebugInfo["CPUInfo"]["CPUMhz"] = (S32)gSysCPU.getMHz(); gDebugInfo["CPUInfo"]["CPUAltivec"] = gSysCPU.hasAltivec(); gDebugInfo["CPUInfo"]["CPUSSE"] = gSysCPU.hasSSE(); gDebugInfo["CPUInfo"]["CPUSSE2"] = gSysCPU.hasSSE2(); @@ -2533,7 +2537,7 @@ void LLAppViewer::writeSystemInfo() // which may have been the intended grid. This can b gDebugInfo["GridName"] = LLViewerLogin::getInstance()->getGridLabel(); - // *FIX:Mani - move this ddown in llappviewerwin32 + // *FIX:Mani - move this down in llappviewerwin32 #ifdef LL_WINDOWS DWORD thread_id = GetCurrentThreadId(); gDebugInfo["MainloopThreadID"] = (S32)thread_id; @@ -3044,29 +3048,29 @@ bool LLAppViewer::initCache() if(!read_only) { - // Purge cache if user requested it - if (gSavedSettings.getBOOL("PurgeCacheOnStartup") || - gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) - { - gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); + // Purge cache if user requested it + if (gSavedSettings.getBOOL("PurgeCacheOnStartup") || + gSavedSettings.getBOOL("PurgeCacheOnNextStartup")) + { + gSavedSettings.setBOOL("PurgeCacheOnNextStartup", false); mPurgeCache = true; - } + } - // 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"); - std::string new_cache_location = gSavedSettings.getString("NewCacheLocation"); - if (new_cache_location != cache_location) - { - gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); - purgeCache(); // purge old cache - gSavedSettings.setString("CacheLocation", new_cache_location); - gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location)); - } - } + // 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"); + std::string new_cache_location = gSavedSettings.getString("NewCacheLocation"); + if (new_cache_location != cache_location) + { + gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")); + purgeCache(); // purge old cache + gSavedSettings.setString("CacheLocation", new_cache_location); + gSavedSettings.setString("CacheLocationTopFolder", gDirUtilp->getBaseFileName(new_cache_location)); + } + } + if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation"))) { LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL; @@ -3083,7 +3087,7 @@ bool LLAppViewer::initCache() LLSplashScreen::update(LLTrans::getString("StartupInitializingTextureCache")); // Init the texture cache - // Allocate 80% of the cache size for textures + // Allocate 80% of the cache size for textures const S32 MB = 1024*1024; S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB; const S64 MAX_CACHE_SIZE = 1024*MB; @@ -3238,6 +3242,13 @@ bool LLAppViewer::initCache() else { LLVFile::initClass(); + + //llinfos << "Static VFS listing" << llendl; + //gStaticVFS->listFiles(); + + //llinfos << "regular VFS listing" << llendl; + //gVFS->listFiles(); + return true; } } @@ -3350,10 +3361,10 @@ void LLAppViewer::saveFinalSnapshot() { if (!mSavedFinalSnapshot && !gNoRender) { - gSavedSettings.setVector3d("FocusPosOnLogout", gAgent.calcFocusPositionTargetGlobal()); - gSavedSettings.setVector3d("CameraPosOnLogout", gAgent.calcCameraPositionTargetGlobal()); + gSavedSettings.setVector3d("FocusPosOnLogout", gAgentCamera.calcFocusPositionTargetGlobal()); + gSavedSettings.setVector3d("CameraPosOnLogout", gAgentCamera.calcCameraPositionTargetGlobal()); gViewerWindow->setCursor(UI_CURSOR_WAIT); - gAgent.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch + gAgentCamera.changeCameraToThirdPerson( FALSE ); // don't animate, need immediate switch gSavedSettings.setBOOL("ShowParcelOwners", FALSE); idle(); @@ -3635,7 +3646,7 @@ void LLAppViewer::idle() // Handle pending gesture processing static LLFastTimer::DeclareTimer ftm("Agent Position"); LLFastTimer t(ftm); - LLGestureManager::instance().update(); + LLGestureMgr::instance().update(); gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY); } @@ -3763,7 +3774,7 @@ void LLAppViewer::idle() LLViewerJoystick::getInstance()->moveObjects(); } - gAgent.updateCamera(); + gAgentCamera.updateCamera(); } // update media focus @@ -4097,7 +4108,7 @@ void LLAppViewer::disconnectViewer() LLFloaterInventory::cleanup(); gAgentWearables.cleanup(); - + gAgentCamera.cleanup(); // Also writes cached agent settings to gSavedSettings gAgent.cleanup(); diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 63d9ed19ad..60a6d2f072 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -469,7 +469,7 @@ bool LLAppViewerWin32::initHardwareTest() if (OSBTN_NO== button) { LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL; - LLWeb::loadURLExternal(DIRECTX_9_URL); + LLWeb::loadURLExternal(DIRECTX_9_URL, false); return false; } gWarningSettings.setBOOL("AboutDirectX9", FALSE); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 8441796219..2f90d652e4 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -39,6 +39,7 @@ #include "llcompilequeue.h" #include "llfloaterbuycurrency.h" #include "llfilepicker.h" +#include "llinventorydefines.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llpermissionsflags.h" @@ -202,13 +203,19 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content) LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type) -: LLAssetUploadResponder(post_data, vfile_id, asset_type) + LLAssetType::EType asset_type, + boost::function<void(const LLUUID& uuid)> callback) +: LLAssetUploadResponder(post_data, vfile_id, asset_type), + mCallback(callback) { } -LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, LLAssetType::EType asset_type) -: LLAssetUploadResponder(post_data, file_name, asset_type) +LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(const LLSD& post_data, + const std::string& file_name, + LLAssetType::EType asset_type, + boost::function<void(const LLUUID& uuid)> callback) +: LLAssetUploadResponder(post_data, file_name, asset_type), + mCallback(callback) { } @@ -282,10 +289,16 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) mPostData["name"].asString(), mPostData["description"].asString(), LLSaleInfo::DEFAULT, - LLInventoryItem::II_FLAGS_NONE, + LLInventoryItemFlags::II_FLAGS_NONE, creation_date_now); gInventory.updateItem(item); gInventory.notifyObservers(); + + if (mCallback) + { + // call the callback with the new Asset UUID + mCallback(item->getAssetUUID()); + } // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. @@ -333,13 +346,11 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) U32 group_perms = mPostData.has("group_mask") ? mPostData.get("group_mask" ).asInteger() : PERM_NONE; U32 next_owner_perms = mPostData.has("next_owner_mask") ? mPostData.get("next_owner_mask").asInteger() : PERM_NONE; std::string display_name = LLStringUtil::null; - LLAssetStorage::LLStoreAssetCallback callback = NULL; - void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, - 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, next_owner_perms, group_perms, everyone_perms, display_name, - callback, expected_upload_cost, userdata); + NULL, expected_upload_cost); } } @@ -477,10 +488,10 @@ void LLUpdateAgentInventoryResponder::uploadComplete(const LLSD& content) { // If this gesture is active, then we need to update the in-memory // active map with the new pointer. - if (LLGestureManager::instance().isGestureActive(item_id)) + if (LLGestureMgr::instance().isGestureActive(item_id)) { LLUUID asset_id = new_item->getAssetUUID(); - LLGestureManager::instance().replaceGesture(item_id, asset_id); + LLGestureMgr::instance().replaceGesture(item_id, asset_id); gInventory.notifyObservers(); } diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index e656351305..ade9c96758 100644 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -33,6 +33,7 @@ #ifndef LL_LLASSETUPLOADRESPONDER_H #define LL_LLASSETUPLOADRESPONDER_H +#include "llassetstorage.h" #include "llhttpclient.h" // Abstract class for supporting asset upload @@ -66,10 +67,15 @@ class LLNewAgentInventoryResponder : public LLAssetUploadResponder public: LLNewAgentInventoryResponder(const LLSD& post_data, const LLUUID& vfile_id, - LLAssetType::EType asset_type); - LLNewAgentInventoryResponder(const LLSD& post_data, const std::string& file_name, - LLAssetType::EType asset_type); + LLAssetType::EType asset_type, + boost::function<void(const LLUUID& uuid)> callback = NULL); + LLNewAgentInventoryResponder(const LLSD& post_data, + const std::string& file_name, + LLAssetType::EType asset_type, + boost::function<void(const LLUUID& uuid)> callback = NULL); virtual void uploadComplete(const LLSD& content); + + boost::function<void(const LLUUID& uuid)> mCallback; }; class LLBakedUploadData; diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp index 5e71e64b2f..50363ea2e7 100644 --- a/indra/newview/llaudiosourcevo.cpp +++ b/indra/newview/llaudiosourcevo.cpp @@ -35,7 +35,7 @@ #include "llaudiosourcevo.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llmutelist.h" #include "llviewerparcelmgr.h" @@ -148,7 +148,7 @@ void LLAudioSourceVO::update() updateGain(); if (mObjectp->isHUDAttachment()) { - mPositionGlobal = gAgent.getCameraPositionGlobal(); + mPositionGlobal = gAgentCamera.getCameraPositionGlobal(); } else { diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index e6666c7f83..764d54a987 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -35,6 +35,8 @@ #include "llavataractions.h" +#include "boost/lambda/lambda.hpp" // for lambda::constant + #include "llsd.h" #include "lldarray.h" #include "llnotifications.h" @@ -46,6 +48,7 @@ #include "llappviewer.h" // for gLastVersionChannel #include "llcachename.h" #include "llcallingcard.h" // for LLAvatarTracker +#include "llfloateravatarpicker.h" // for LLFloaterAvatarPicker #include "llfloatergroupinvite.h" #include "llfloatergroups.h" #include "llfloaterreg.h" @@ -54,6 +57,7 @@ #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llimview.h" // for gIMMgr #include "llmutelist.h" +#include "llnotificationsutil.h" // for LLNotificationsUtil #include "llrecentpeople.h" #include "llsidetray.h" #include "lltrans.h" @@ -113,13 +117,13 @@ void LLAvatarActions::removeFriendDialog(const LLUUID& id) if (id.isNull()) return; - std::vector<LLUUID> ids; + uuid_vec_t ids; ids.push_back(id); removeFriendsDialog(ids); } // static -void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids) +void LLAvatarActions::removeFriendsDialog(const uuid_vec_t& ids) { if(ids.size() == 0) return; @@ -144,7 +148,7 @@ void LLAvatarActions::removeFriendsDialog(const std::vector<LLUUID>& ids) } LLSD payload; - for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { payload["ids"].append(*it); } @@ -161,13 +165,21 @@ void LLAvatarActions::offerTeleport(const LLUUID& invitee) if (invitee.isNull()) return; + //waiting until Name Cache gets updated with corresponding avatar name + std::string just_to_request_name; + if (!gCacheName->getFullName(invitee, just_to_request_name)) + { + gCacheName->get(invitee, FALSE, boost::bind((void (*)(const LLUUID&)) &LLAvatarActions::offerTeleport, invitee)); + return; + } + LLDynamicArray<LLUUID> ids; ids.push_back(invitee); offerTeleport(ids); } // static -void LLAvatarActions::offerTeleport(const std::vector<LLUUID>& ids) +void LLAvatarActions::offerTeleport(const uuid_vec_t& ids) { if (ids.size() == 0) return; @@ -228,7 +240,7 @@ void LLAvatarActions::startCall(const LLUUID& id) } // static -void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) +void LLAvatarActions::startAdhocCall(const uuid_vec_t& ids) { if (ids.size() == 0) { @@ -237,7 +249,7 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) // convert vector into LLDynamicArray for addSession LLDynamicArray<LLUUID> id_array; - for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { id_array.push_back(*it); } @@ -278,11 +290,11 @@ bool LLAvatarActions::canCall() } // static -void LLAvatarActions::startConference(const std::vector<LLUUID>& ids) +void LLAvatarActions::startConference(const uuid_vec_t& ids) { // *HACK: Copy into dynamic array LLDynamicArray<LLUUID> id_array; - for (std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it) { id_array.push_back(*it); } @@ -417,6 +429,16 @@ void LLAvatarActions::share(const LLUUID& id) } } +//static +void LLAvatarActions::shareWithAvatars() +{ + LLFloaterAvatarPicker* picker = + LLFloaterAvatarPicker::show(NULL, FALSE, TRUE); + picker->setOkBtnEnableCb(boost::lambda::constant(false)); + + LLNotificationsUtil::add("ShareNotification"); +} + // static void LLAvatarActions::toggleBlock(const LLUUID& id) { @@ -434,6 +456,20 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) LLMuteList::getInstance()->add(mute); } } +// static +bool LLAvatarActions::canOfferTeleport(const LLUUID& id) +{ + // First use LLAvatarTracker::isBuddy() + // If LLAvatarTracker::instance().isBuddyOnline function only is used + // then for avatars that are online and not a friend it will return false. + // But we should give an ability to offer a teleport for such avatars. + if(LLAvatarTracker::instance().isBuddy(id)) + { + return LLAvatarTracker::instance().isBuddyOnline(id); + } + + return true; +} void LLAvatarActions::inviteToGroup(const LLUUID& id) { @@ -499,7 +535,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response, // static void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id) { - std::vector<LLUUID> agent_ids; + uuid_vec_t agent_ids; agent_ids.push_back(id); LLFloaterGroupInvite::showForGroup(group_id, &agent_ids); diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index a7f3acad4f..d106a83eea 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -60,13 +60,13 @@ public: * Show a friend removal dialog. */ static void removeFriendDialog(const LLUUID& id); - static void removeFriendsDialog(const std::vector<LLUUID>& ids); + static void removeFriendsDialog(const uuid_vec_t& ids); /** * Show teleport offer dialog. */ static void offerTeleport(const LLUUID& invitee); - static void offerTeleport(const std::vector<LLUUID>& ids); + static void offerTeleport(const uuid_vec_t& ids); /** * Start instant messaging session. @@ -86,12 +86,12 @@ public: /** * Start an ad-hoc conference voice call with multiple users */ - static void startAdhocCall(const std::vector<LLUUID>& ids); + static void startAdhocCall(const uuid_vec_t& ids); /** * Start conference chat with the given avatars. */ - static void startConference(const std::vector<LLUUID>& ids); + static void startConference(const uuid_vec_t& ids); /** * Show avatar profile. @@ -114,6 +114,11 @@ public: static void share(const LLUUID& id); /** + * Share items with the picked avatars. + */ + static void shareWithAvatars(); + + /** * Block/unblock the avatar. */ static void toggleBlock(const LLUUID& id); @@ -171,6 +176,12 @@ public: */ static void csr(const LLUUID& id, std::string name); + /** + * Checks whether can offer teleport to the avatar + * Can't offer only for offline friends + */ + static bool canOfferTeleport(const LLUUID& id); + private: static bool callbackAddFriend(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 45c540b3a3..8ba47b5198 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -32,13 +32,19 @@ #include "llviewerprecompiledheaders.h" +// common +#include "lltrans.h" + #include "llavatarlist.h" #include "llagentdata.h" // for comparator // newview +#include "llavatariconctrl.h" #include "llcallingcard.h" // for LLAvatarTracker #include "llcachename.h" #include "llrecentpeople.h" +#include "lltextutil.h" +#include "lluuid.h" #include "llvoiceclient.h" #include "llviewercontrol.h" // for gSavedSettings @@ -53,7 +59,7 @@ static const unsigned ADD_LIMIT = 50; bool LLAvatarList::contains(const LLUUID& id) { - const uuid_vector_t& ids = getIDs(); + const uuid_vec_t& ids = getIDs(); return std::find(ids.begin(), ids.end(), id) != ids.end(); } @@ -107,7 +113,7 @@ LLAvatarList::Params::Params() } LLAvatarList::LLAvatarList(const Params& p) -: LLFlatListView(p) +: LLFlatListViewEx(p) , mIgnoreOnlineStatus(p.ignore_online_status) , mShowLastInteractionTime(p.show_last_interaction_time) , mContextMenu(NULL) @@ -148,7 +154,7 @@ void LLAvatarList::draw() // *NOTE dzaporozhan // Call refresh() after draw() to avoid flickering of avatar list items. - LLFlatListView::draw(); + LLFlatListViewEx::draw(); if (mDirty) refresh(); @@ -165,7 +171,7 @@ void LLAvatarList::clear() { getIDs().clear(); setDirty(true); - LLFlatListView::clear(); + LLFlatListViewEx::clear(); } void LLAvatarList::setNameFilter(const std::string& filter) @@ -173,6 +179,10 @@ void LLAvatarList::setNameFilter(const std::string& filter) if (mNameFilter != filter) { mNameFilter = filter; + + // update message for empty state here instead of refresh() to avoid blinking when switch + // between tabs. + updateNoItemsMessage(!mNameFilter.empty()); setDirty(); } } @@ -192,6 +202,18 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/) } } +void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name) +{ + LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL; + LLAvalineListItem* item = new LLAvalineListItem; + item->setAvatarId(item_id, session_id, true, false); + item->setName(item_name); + + addItem(item, item_id); + mIDs.push_back(item_id); + sort(); +} + ////////////////////////////////////////////////////////////////////////// // PROTECTED SECTION ////////////////////////////////////////////////////////////////////////// @@ -204,17 +226,17 @@ void LLAvatarList::refresh() bool have_filter = !mNameFilter.empty(); // Save selection. - std::vector<LLUUID> selected_ids; + uuid_vec_t selected_ids; getSelectedUUIDs(selected_ids); LLUUID current_id = getSelectedUUID(); // Determine what to add and what to remove. - std::vector<LLUUID> added, removed; + uuid_vec_t added, removed; LLAvatarList::computeDifference(getIDs(), added, removed); // Handle added items. unsigned nadded = 0; - for (std::vector<LLUUID>::const_iterator it=added.begin(); it != added.end(); it++) + for (uuid_vec_t::const_iterator it=added.begin(); it != added.end(); it++) { std::string name; const LLUUID& buddy_id = *it; @@ -236,7 +258,7 @@ void LLAvatarList::refresh() } // Handle removed items. - for (std::vector<LLUUID>::const_iterator it=removed.begin(); it != removed.end(); it++) + for (uuid_vec_t::const_iterator it=removed.begin(); it != removed.end(); it++) { removeItemByUUID(*it); modified = true; @@ -303,9 +325,9 @@ void LLAvatarList::refresh() bool LLAvatarList::filterHasMatches() { - uuid_vector_t values = getIDs(); + uuid_vec_t values = getIDs(); - for (uuid_vector_t::const_iterator it=values.begin(); it != values.end(); it++) + for (uuid_vec_t::const_iterator it=values.begin(); it != values.end(); it++) { std::string name; const LLUUID& buddy_id = *it; @@ -334,6 +356,17 @@ boost::signals2::connection LLAvatarList::setItemDoubleClickCallback(const mouse return mItemDoubleClickSignal.connect(cb); } +//virtual +S32 LLAvatarList::notifyParent(const LLSD& info) +{ + if (info.has("sort") && &NAME_COMPARATOR == mItemComparator) + { + sort(); + return 1; + } + return LLFlatListViewEx::notifyParent(info); +} + void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos) { LLAvatarListItem* item = new LLAvatarListItem(); @@ -358,7 +391,7 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask); if ( mContextMenu ) { - std::vector<LLUUID> selected_uuids; + uuid_vec_t selected_uuids; getSelectedUUIDs(selected_uuids); mContextMenu->show(this, selected_uuids, x, y); } @@ -366,12 +399,12 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask) } void LLAvatarList::computeDifference( - const std::vector<LLUUID>& vnew_unsorted, - std::vector<LLUUID>& vadded, - std::vector<LLUUID>& vremoved) + const uuid_vec_t& vnew_unsorted, + uuid_vec_t& vadded, + uuid_vec_t& vremoved) { - std::vector<LLUUID> vcur; - std::vector<LLUUID> vnew = vnew_unsorted; + uuid_vec_t vcur; + uuid_vec_t vnew = vnew_unsorted; // Convert LLSDs to LLUUIDs. { @@ -385,7 +418,7 @@ void LLAvatarList::computeDifference( std::sort(vcur.begin(), vcur.end()); std::sort(vnew.begin(), vnew.end()); - std::vector<LLUUID>::iterator it; + uuid_vec_t::iterator it; size_t maxsize = llmax(vcur.size(), vnew.size()); vadded.resize(maxsize); vremoved.resize(maxsize); @@ -459,3 +492,61 @@ bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_ } return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2); } + +/************************************************************************/ +/* class LLAvalineListItem */ +/************************************************************************/ +LLAvalineListItem::LLAvalineListItem(bool hide_number/* = true*/) : LLAvatarListItem(false) +, mIsHideNumber(hide_number) +{ + // should not use buildPanel from the base class to ensure LLAvalineListItem::postBuild is called. + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml"); +} + +BOOL LLAvalineListItem::postBuild() +{ + BOOL rv = LLAvatarListItem::postBuild(); + + if (rv) + { + setOnline(true); + showLastInteractionTime(false); + setShowProfileBtn(false); + setShowInfoBtn(false); + mAvatarIcon->setValue("Avaline_Icon"); + mAvatarIcon->setToolTip(std::string("")); + } + return rv; +} + +// to work correctly this method should be called AFTER setAvatarId for avaline callers with hidden phone number +void LLAvalineListItem::setName(const std::string& name) +{ + if (mIsHideNumber) + { + static U32 order = 0; + typedef std::map<LLUUID, U32> avaline_callers_nums_t; + static avaline_callers_nums_t mAvalineCallersNums; + + llassert(getAvatarId() != LLUUID::null); + + const LLUUID &uuid = getAvatarId(); + + if (mAvalineCallersNums.find(uuid) == mAvalineCallersNums.end()) + { + mAvalineCallersNums[uuid] = ++order; + LL_DEBUGS("Avaline") << "Set name for new avaline caller: " << uuid << ", order: " << order << LL_ENDL; + } + LLStringUtil::format_map_t args; + args["[ORDER]"] = llformat("%u", mAvalineCallersNums[uuid]); + std::string hidden_name = LLTrans::getString("AvalineCaller", args); + + LL_DEBUGS("Avaline") << "Avaline caller: " << uuid << ", name: " << hidden_name << LL_ENDL; + LLAvatarListItem::setName(hidden_name); + } + else + { + const std::string& formatted_phone = LLTextUtil::formatPhoneNumber(name); + LLAvatarListItem::setName(formatted_phone); + } +} diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 00c72f1f9d..ff090f3a34 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -49,13 +49,11 @@ class LLTimer; * @see setDirty() * @see setNameFilter() */ -class LLAvatarList : public LLFlatListView +class LLAvatarList : public LLFlatListViewEx { LOG_CLASS(LLAvatarList); public: - typedef std::vector<LLUUID> uuid_vector_t; - - struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> + struct Params : public LLInitParam::Block<Params, LLFlatListViewEx::Params> { Optional<bool> ignore_online_status, // show all items as online show_last_interaction_time, // show most recent interaction time. *HACK: move this to a derived class @@ -74,7 +72,7 @@ public: void setNameFilter(const std::string& filter); void setDirty(bool val = true, bool force_refresh = false); - uuid_vector_t& getIDs() { return mIDs; } + uuid_vec_t& getIDs() { return mIDs; } bool contains(const LLUUID& id); void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; } @@ -96,14 +94,18 @@ public: boost::signals2::connection setItemDoubleClickCallback(const mouse_signal_t::slot_type& cb); + virtual S32 notifyParent(const LLSD& info); + + void addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name); + protected: void refresh(); void addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos = ADD_BOTTOM); void computeDifference( - const std::vector<LLUUID>& vnew, - std::vector<LLUUID>& vadded, - std::vector<LLUUID>& vremoved); + const uuid_vec_t& vnew, + uuid_vec_t& vadded, + uuid_vec_t& vremoved); void updateLastInteractionTimes(); void onItemDoucleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask); @@ -120,7 +122,7 @@ private: LLTimer* mLITUpdateTimer; // last interaction time update timer std::string mIconParamName; std::string mNameFilter; - uuid_vector_t mIDs; + uuid_vec_t mIDs; LLUUID mSessionID; LLAvatarListItem::ContextMenu* mContextMenu; @@ -175,4 +177,27 @@ protected: virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; }; +/** + * Represents Avaline caller in Avatar list in Voice Control Panel and group chats. + */ +class LLAvalineListItem : public LLAvatarListItem +{ +public: + + /** + * Constructor + * + * @param hide_number - flag indicating if number should be hidden. + * In this case It will be shown as "Avaline Caller 1", "Avaline Caller 1", etc. + */ + LLAvalineListItem(bool hide_number = true); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void setName(const std::string& name); + +private: + bool mIsHideNumber; +}; + #endif // LL_LLAVATARLIST_H diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 9645e75e60..2a51eeacfc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -119,8 +119,9 @@ S32 LLAvatarListItem::notifyParent(const LLSD& info) if (info.has("visibility_changed")) { updateChildren(); + return 1; } - return 0; + return LLPanel::notifyParent(info); } void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask) @@ -211,21 +212,25 @@ void LLAvatarListItem::setState(EItemState item_style) mAvatarIcon->setColor(item_icon_color_map[item_style]); } -void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes) +void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes/* = false*/, bool is_resident/* = true*/) { if (mAvatarId.notNull()) LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this); mAvatarId = id; - mAvatarIcon->setValue(id); mSpeakingIndicator->setSpeakerId(id, session_id); // We'll be notified on avatar online status changes if (!ignore_status_changes && mAvatarId.notNull()) LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this); - // Set avatar name. - gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3)); + if (is_resident) + { + mAvatarIcon->setValue(id); + + // Set avatar name. + gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3)); + } } void LLAvatarListItem::showLastInteractionTime(bool show) @@ -334,6 +339,9 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str { std::string name = first_name + " " + last_name; setName(name); + + //requesting the list to resort + notifyParent(LLSD().with("sort", LLSD())); } // Convert given number of seconds to a string like "23 minutes", "15 hours" or "3 years", diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index cecb64add7..3ba2c7a3e3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -70,7 +70,7 @@ public: class ContextMenu { public: - virtual void show(LLView* spawning_view, const std::vector<LLUUID>& selected_uuids, S32 x, S32 y) = 0; + virtual void show(LLView* spawning_view, const uuid_vec_t& selected_uuids, S32 x, S32 y) = 0; }; /** @@ -100,7 +100,7 @@ public: void setName(const std::string& name); void setHighlight(const std::string& highlight); void setState(EItemState item_style); - void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false); + void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false, bool is_resident = true); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly void setShowProfileBtn(bool show); diff --git a/indra/newview/llavatarpropertiesprocessor.cpp b/indra/newview/llavatarpropertiesprocessor.cpp index 33e5046f50..c7e788f345 100644 --- a/indra/newview/llavatarpropertiesprocessor.cpp +++ b/indra/newview/llavatarpropertiesprocessor.cpp @@ -37,6 +37,7 @@ // Viewer includes #include "llagent.h" #include "llagentpicksinfo.h" +#include "lldateutil.h" #include "llviewergenericmessage.h" // Linden library includes @@ -246,6 +247,7 @@ std::string LLAvatarPropertiesProcessor::paymentInfo(const LLAvatarData* avatar_ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg, void**) { LLAvatarData avatar_data; + std::string birth_date; msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AgentID, avatar_data.agent_id); msg->getUUIDFast( _PREHASH_AgentData, _PREHASH_AvatarID, avatar_data.avatar_id); @@ -254,11 +256,12 @@ void LLAvatarPropertiesProcessor::processAvatarPropertiesReply(LLMessageSystem* msg->getUUIDFast( _PREHASH_PropertiesData, _PREHASH_PartnerID, avatar_data.partner_id); msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_AboutText, avatar_data.about_text); msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_FLAboutText, avatar_data.fl_about_text); - msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_BornOn, avatar_data.born_on); + msg->getStringFast( _PREHASH_PropertiesData, _PREHASH_BornOn, birth_date); msg->getString( _PREHASH_PropertiesData, _PREHASH_ProfileURL, avatar_data.profile_url); msg->getU32Fast( _PREHASH_PropertiesData, _PREHASH_Flags, avatar_data.flags); + LLDateUtil::dateFromPDTString(avatar_data.born_on, birth_date); avatar_data.caption_index = 0; S32 charter_member_size = 0; diff --git a/indra/newview/llavatarpropertiesprocessor.h b/indra/newview/llavatarpropertiesprocessor.h index 716c1b8065..b9e8bfd0ab 100644 --- a/indra/newview/llavatarpropertiesprocessor.h +++ b/indra/newview/llavatarpropertiesprocessor.h @@ -67,7 +67,7 @@ struct LLAvatarData LLUUID partner_id; std::string about_text; std::string fl_about_text; - std::string born_on; + LLDate born_on; std::string profile_url; U8 caption_index; std::string caption_text; diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index b88be53d79..4ebccbe731 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -35,7 +35,7 @@ #define LLBOTTOMTRAY_CPP #include "llbottomtray.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llchiclet.h" #include "llfloaterreg.h" #include "llflyoutbutton.h" @@ -125,7 +125,7 @@ public: void onFocusLost() { - if (gAgent.cameraMouselook()) + if (gAgentCamera.cameraMouselook()) { LLBottomTray::getInstance()->setVisible(FALSE); } @@ -160,10 +160,6 @@ LLBottomTray::LLBottomTray(const LLSD&) LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); - mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); - - mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1)); - LLUICtrl::CommitCallbackRegistry::defaultRegistrar().add("CameraPresets.ChangeView", boost::bind(&LLFloaterCamera::onClickCameraPresets, _2)); //this is to fix a crash that occurs because LLBottomTray is a singleton @@ -171,8 +167,6 @@ LLBottomTray::LLBottomTray(const LLSD&) //destroyed LLBottomTray requires some subsystems that are long gone //LLUI::getRootView()->addChild(this); - initStateProcessedObjectMap(); - // Necessary for focus movement among child controls setFocusRoot(TRUE); @@ -191,24 +185,6 @@ LLBottomTray::~LLBottomTray() } } -void LLBottomTray::onChicletClick(LLUICtrl* ctrl) -{ - LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl); - if (chiclet) - { - // Until you can type into an IM Window and have a conversation, - // still show the old communicate window - //LLFloaterReg::showInstance("communicate", chiclet->getSessionId()); - - // Show after comm window so it is frontmost (and hence will not - // auto-hide) - -// this logic has been moved to LLIMChiclet::handleMouseDown -// LLIMFloater::show(chiclet->getSessionId()); -// chiclet->setCounter(0); - } -} - // *TODO Vadim: why void* ? void* LLBottomTray::createNearbyChatBar(void* userdata) { @@ -371,6 +347,23 @@ void LLBottomTray::setVisible(BOOL visible) gFloaterView->setSnapOffsetBottom(0); } +S32 LLBottomTray::notifyParent(const LLSD& info) +{ + if(info.has("well_empty")) // implementation of EXT-3397 + { + const std::string chiclet_name = info["well_name"]; + + // only "im_well" or "notification_well" names are expected. + // They are set in panel_bottomtray.xml in <chiclet_im_well> & <chiclet_notification> + llassert("im_well" == chiclet_name || "notification_well" == chiclet_name); + + BOOL should_be_visible = !info["well_empty"]; + showWellButton("im_well" == chiclet_name ? RS_IM_WELL : RS_NOTIFICATION_WELL, should_be_visible); + return 1; + } + return LLPanel::notifyParent(info); +} + void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask) { // We should show BottomTrayContextMenu in last turn @@ -487,6 +480,14 @@ BOOL LLBottomTray::postBuild() mNearbyChatBar->getChatBox()->setContextMenu(NULL); + mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); + + initStateProcessedObjectMap(); + + // update wells visibility: + showWellButton(RS_IM_WELL, !LLIMWellWindow::getInstance()->isWindowEmpty()); + showWellButton(RS_NOTIFICATION_WELL, !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + return TRUE; } @@ -855,6 +856,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* available_width) { lldebugs << "Trying to show object type: " << shown_object_type << llendl; + llassert(mStateProcessedObjectMap[shown_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; if (NULL == panel) @@ -886,6 +888,7 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width) { lldebugs << "Trying to hide object type: " << processed_object_type << llendl; + llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; if (NULL == panel) @@ -963,6 +966,7 @@ void LLBottomTray::processShrinkButtons(S32* required_width, S32* buttons_freed_ void LLBottomTray::processShrinkButton(EResizeState processed_object_type, S32* required_width) { + llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; if (NULL == panel) { @@ -1046,6 +1050,7 @@ void LLBottomTray::processExtendButtons(S32* available_width) void LLBottomTray::processExtendButton(EResizeState processed_object_type, S32* available_width) { + llassert(mStateProcessedObjectMap[processed_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; if (NULL == panel) { @@ -1126,6 +1131,7 @@ void LLBottomTray::initStateProcessedObjectMap() void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) { + llassert(mStateProcessedObjectMap[shown_object_type] != NULL); LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; if (NULL == panel) { @@ -1264,4 +1270,29 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible return is_set; } +void LLBottomTray::showWellButton(EResizeState object_type, bool visible) +{ + llassert( ((RS_NOTIFICATION_WELL | RS_IM_WELL) & object_type) == object_type ); + + const std::string panel_name = RS_IM_WELL == object_type ? "im_well_panel" : "notification_well_panel"; + + LLView * panel = getChild<LLView>(panel_name); + + // if necessary visibility is set nothing to do here + if (panel->getVisible() == (BOOL)visible) return; + + S32 panel_width = panel->getRect().getWidth(); + panel->setVisible(visible); + + if (visible) + { + // method assumes that input param is a negative value + processWidthDecreased(-panel_width); + } + else + { + processWidthIncreased(panel_width); + } +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 18c14e5e19..8395b484cf 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -83,6 +83,8 @@ public: virtual void setVisible(BOOL visible); + /*virtual*/ S32 notifyParent(const LLSD& info); + // Implements LLVoiceClientStatusObserver::onChange() to enable the speak // button when voice is available /*virtual*/ void onChange(EStatusType status, const std::string &channelURI, bool proximal); @@ -116,6 +118,8 @@ private: , RS_BUTTON_MOVEMENT = 0x0010 , RS_BUTTON_GESTURES = 0x0020 , RS_BUTTON_SPEAK = 0x0040 + , RS_IM_WELL = 0x0080 + , RS_NOTIFICATION_WELL = 0x0100 /** * Specifies buttons which can be hidden when bottom tray is shrunk. @@ -184,6 +188,15 @@ private: */ bool setVisibleAndFitWidths(EResizeState object_type, bool visible); + /** + * Shows/hides panel with specified well button (IM or Notification) + * + * @param[in] object_type - type of well button to be processed. + * Must be one of RS_IM_WELL or RS_NOTIFICATION_WELL. + * @param[in] visible - flag specified whether button should be shown or hidden. + */ + void showWellButton(EResizeState object_type, bool visible); + MASK mResizeState; typedef std::map<EResizeState, LLPanel*> state_object_map_t; @@ -199,8 +212,6 @@ protected: LLBottomTray(const LLSD& key = LLSD()); - void onChicletClick(LLUICtrl* ctrl); - static void* createNearbyChatBar(void* userdata); void updateContextMenu(S32 x, S32 y, MASK mask); diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index c8552de66a..5a96613870 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -54,7 +54,7 @@ #include "llvoicechannel.h" #include "llviewerparcelmgr.h" -static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids); +static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids); void reshape_floater(LLCallFloater* floater, S32 delta_height); class LLNonAvatarCaller : public LLAvatarListItem @@ -131,11 +131,9 @@ LLCallFloater::~LLCallFloater() mAvatarListRefreshConnection.disconnect(); mVoiceChannelStateChangeConnection.disconnect(); - // Don't use LLVoiceClient::getInstance() here - // singleton MAY have already been destroyed. - if(gVoiceClient) + if(LLVoiceClient::instanceExists()) { - gVoiceClient->removeObserver(this); + LLVoiceClient::instance().removeObserver(this); } LLTransientFloaterMgr::getInstance()->removeControlView(this); } @@ -191,7 +189,7 @@ void LLCallFloater::draw() // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) // onChange(); - bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); + bool is_moderator_muted = LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID); if (mIsModeratorMutedVoice != is_moderator_muted) { @@ -213,9 +211,9 @@ void LLCallFloater::onChange() updateParticipantsVoiceState(); // Add newly joined participants. - std::vector<LLUUID> speakers_uuids; + uuid_vec_t speakers_uuids; get_voice_participants_uuids(speakers_uuids); - for (std::vector<LLUUID>::const_iterator it = speakers_uuids.begin(); it != speakers_uuids.end(); it++) + for (uuid_vec_t::const_iterator it = speakers_uuids.begin(); it != speakers_uuids.end(); it++) { mParticipants->addAvatarIDExceptAgent(*it); } @@ -230,7 +228,7 @@ void LLCallFloater::leaveCall() LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); if (voice_channel) { - voice_channel->deactivate(); + gIMMgr->endCall(voice_channel->getSessionID()); } } @@ -336,7 +334,7 @@ void LLCallFloater::refreshParticipantList() if (!non_avatar_caller) { - mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT); + mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS); @@ -469,10 +467,10 @@ void LLCallFloater::updateAgentModeratorState() mAgentPanel->childSetValue("user_text", name); } -static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids) +static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) { // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList(); + LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList(); if (voice_map) { for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); @@ -494,7 +492,7 @@ void LLCallFloater::initParticipantsVoiceState() it_end = items.end(); - std::vector<LLUUID> speakers_uuids; + uuid_vec_t speakers_uuids; get_voice_participants_uuids(speakers_uuids); for(; it != it_end; ++it) @@ -505,7 +503,7 @@ void LLCallFloater::initParticipantsVoiceState() LLUUID speaker_id = item->getAvatarId(); - std::vector<LLUUID>::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id); + uuid_vec_t::const_iterator speaker_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), speaker_id); // If an avatarID assigned to a panel is found in a speakers list // obtained from VoiceClient we assign the JOINED status to the owner @@ -534,10 +532,10 @@ void LLCallFloater::initParticipantsVoiceState() void LLCallFloater::updateParticipantsVoiceState() { - std::vector<LLUUID> speakers_list; + uuid_vec_t speakers_list; // Get a list of participants from VoiceClient - std::vector<LLUUID> speakers_uuids; + uuid_vec_t speakers_uuids; get_voice_participants_uuids(speakers_uuids); // Updating the status for each participant already in list. @@ -555,7 +553,7 @@ void LLCallFloater::updateParticipantsVoiceState() const LLUUID participant_id = item->getAvatarId(); bool found = false; - std::vector<LLUUID>::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); + uuid_vec_t::iterator speakers_iter = std::find(speakers_uuids.begin(), speakers_uuids.end(), participant_id); lldebugs << "processing speaker: " << item->getAvatarName() << ", " << item->getAvatarId() << llendl; @@ -603,10 +601,13 @@ void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item) } } break; - case STATE_INVITED: case STATE_LEFT: // nothing to do. These states should not be changed. break; + case STATE_INVITED: + // If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap + // If it goes online it will be rendered as JOINED via LAvatarListItem. + // Lets update its visual representation. See EXT-6660 case STATE_UNKNOWN: // If an avatarID is not found in a speakers list from VoiceClient and // a panel with this ID has an UNKNOWN status this means that this person @@ -665,8 +666,8 @@ void LLCallFloater::setVoiceRemoveTimer(const LLUUID& voice_speaker_id) bool LLCallFloater::removeVoiceLeftParticipant(const LLUUID& voice_speaker_id) { - LLAvatarList::uuid_vector_t& speaker_uuids = mAvatarList->getIDs(); - LLAvatarList::uuid_vector_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); + uuid_vec_t& speaker_uuids = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(speaker_uuids.begin(), speaker_uuids.end(), voice_speaker_id); if(pos != speaker_uuids.end()) { speaker_uuids.erase(pos); @@ -695,7 +696,7 @@ bool LLCallFloater::validateSpeaker(const LLUUID& speaker_id) case VC_LOCAL_CHAT: { // A nearby chat speaker is considered valid it it's known to LLVoiceClient (i.e. has enabled voice). - std::vector<LLUUID> speakers; + uuid_vec_t speakers; get_voice_participants_uuids(speakers); is_valid = std::find(speakers.begin(), speakers.end(), speaker_id) != speakers.end(); } @@ -727,7 +728,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { // check is voice operational and if it doesn't work hide VCP (EXT-4397) - if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking()) { updateState(new_state); } diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index b32a955038..67d5d21b2a 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -107,7 +107,7 @@ LLChatBar::LLChatBar() LLChatBar::~LLChatBar() { - LLGestureManager::instance().removeObserver(mObserver); + LLGestureMgr::instance().removeObserver(mObserver); delete mObserver; mObserver = NULL; // LLView destructor cleans up children @@ -209,8 +209,8 @@ void LLChatBar::refreshGestures() // collect list of unique gestures std::map <std::string, BOOL> unique; - LLGestureManager::item_map_t::const_iterator it; - const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); + LLGestureMgr::item_map_t::const_iterator it; + const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { LLMultiGesture* gesture = (*it).second; @@ -296,7 +296,7 @@ void LLChatBar::setGestureCombo(LLComboBox* combo) // now register observer since we have a place to put the results mObserver = new LLChatBarGestureObserver(this); - LLGestureManager::instance().addObserver(mObserver); + LLGestureMgr::instance().addObserver(mObserver); // refresh list from current active gestures refreshGestures(); @@ -377,7 +377,7 @@ void LLChatBar::sendChat( EChatType type ) if (0 == channel) { // discard returned "found" boolean - LLGestureManager::instance().triggerAndReviseString(utf8text, &utf8_revised_text); + LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text); } else { @@ -516,7 +516,7 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata ) std::string utf8_trigger = wstring_to_utf8str(raw_text); std::string utf8_out_str(utf8_trigger); - if (LLGestureManager::instance().matchPrefix(utf8_trigger, &utf8_out_str)) + if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str)) { if (self->mInputEditor) { @@ -653,7 +653,7 @@ void LLChatBar::onCommitGesture(LLUICtrl* ctrl) // substitution and logging. std::string text(trigger); std::string revised_text; - LLGestureManager::instance().triggerAndReviseString(text, &revised_text); + LLGestureMgr::instance().triggerAndReviseString(text, &revised_text); revised_text = utf8str_trim(revised_text); if (!revised_text.empty()) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index f5faeca126..68c31d87fa 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -93,7 +93,7 @@ public: payload["object_id"] = object_id; payload["owner_id"] = query_map["owner"]; payload["name"] = query_map["name"]; - payload["slurl"] = query_map["slurl"]; + payload["slurl"] = LLWeb::escapeURL(query_map["slurl"]); payload["group_owned"] = query_map["groupowned"]; LLFloaterReg::showInstance("inspect_remote_object", payload); return true; @@ -447,7 +447,6 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) : LLUICtrl(p), mMessageHeaderFilename(p.message_header), mMessageSeparatorFilename(p.message_separator), - mMessagePlaintextSeparatorFilename(p.message_plaintext_separator), mLeftTextPad(p.left_text_pad), mRightTextPad(p.right_text_pad), mLeftWidgetPad(p.left_widget_pad), @@ -535,12 +534,6 @@ LLView* LLChatHistory::getSeparator() return separator; } -LLView* LLChatHistory::getPlaintextSeparator() -{ - LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessagePlaintextSeparatorFilename, NULL, LLPanel::child_registry_t::instance()); - return separator; -} - LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style_params) { LLChatHistoryHeader* header = LLChatHistoryHeader::createInstance(mMessageHeaderFilename); @@ -639,17 +632,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (use_plain_text_chat_history) { - // append plaintext separator - LLView* separator = getPlaintextSeparator(); - LLInlineViewSegment::Params p; - p.force_newline = true; - p.left_pad = mLeftWidgetPad; - p.right_pad = mRightWidgetPad; - p.view = separator; - //mEditor->appendWidget(p, "\n", false); // TODO: this is absolute minimal fix for EXT-3818 because it's late for 2.0 - mEditor->appendWidget(p, "", false); // This should be properly fixed in 2.1 - - mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params); + LLStyle::Params timestamp_style(style_params); + if (!message_from_log) + { + LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor"); + timestamp_style.color(timestamp_color); + timestamp_style.readonly_color(timestamp_color); + } + mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, timestamp_style); if (utf8str_trim(chat.mFromName).size() != 0) { @@ -752,7 +742,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (notification != NULL) { LLIMToastNotifyPanel* notify_box = new LLIMToastNotifyPanel( - notification); + notification, chat.mSessionID); //we can't set follows in xml since it broke toasts behavior notify_box->setFollowsLeft(); notify_box->setFollowsRight(); diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index dfe5ea98e6..950b32861b 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -47,8 +47,6 @@ class LLChatHistory : public LLUICtrl Optional<std::string> message_header; //Message separator filename Optional<std::string> message_separator; - //Message plaintext separator filename - Optional<std::string> message_plaintext_separator; //Text left padding from the scroll rect Optional<S32> left_text_pad; //Text right padding from the scroll rect @@ -71,7 +69,6 @@ class LLChatHistory : public LLUICtrl Params() : message_header("message_header"), message_separator("message_separator"), - message_plaintext_separator("message_plaintext_separator"), left_text_pad("left_text_pad"), right_text_pad("right_text_pad"), left_widget_pad("left_widget_pad"), @@ -100,11 +97,6 @@ class LLChatHistory : public LLUICtrl */ LLView* getSeparator(); /** - * Builds a message plaintext separator. - * @return pointer to LLView separator object. - */ - LLView* getPlaintextSeparator(); - /** * Builds a message header. * @return pointer to LLView header object. */ @@ -141,7 +133,6 @@ class LLChatHistory : public LLUICtrl std::string mMessageHeaderFilename; std::string mMessageSeparatorFilename; - std::string mMessagePlaintextSeparatorFilename; S32 mLeftTextPad; S32 mRightTextPad; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 81edb55f93..aef36b677c 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -324,6 +324,8 @@ void LLNearbyChatToastPanel::draw() icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT); if(mSourceType == CHAT_SOURCE_AGENT) icon->setValue(mFromID); + else if(mSourceType == CHAT_SOURCE_SYSTEM) + icon->setValue(LLSD("SL_Logo")); else icon->setValue(LLSD("OBJECT_Icon")); } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 1f92686a43..9c4aa7b964 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -131,8 +131,6 @@ LLSysWellChiclet::Params::Params() : button("button") , unread_notifications("unread_notifications") , max_displayed_count("max_displayed_count", 99) -, flash_to_lit_count("flash_to_lit_count", 3) -, flash_period("flash_period", 0.5F) { button.name("button"); button.tab_stop(FALSE); @@ -152,7 +150,13 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p) mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); - mFlashToLitTimer = new FlashToLitTimer(p.flash_to_lit_count, p.flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); + // use settings from settings.xml to be able change them via Debug settings. See EXT-5973. + // Due to Timer is implemented as derived class from EventTimer it is impossible to change period + // in runtime. So, both settings are made as required restart. + static S32 flash_to_lit_count = gSavedSettings.getS32("WellIconFlashCount"); + static F32 flash_period = gSavedSettings.getF32("WellIconFlashPeriod"); + + mFlashToLitTimer = new FlashToLitTimer(flash_to_lit_count, flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); } LLSysWellChiclet::~LLSysWellChiclet() @@ -229,6 +233,11 @@ void LLSysWellChiclet::setNewMessagesState(bool new_messages) void LLSysWellChiclet::updateWidget(bool is_window_empty) { mButton->setEnabled(!is_window_empty); + + LLSD params; + params["well_empty"] = is_window_empty; + params["well_name"] = getName(); + notifyParent(params); } // virtual BOOL LLSysWellChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) @@ -456,6 +465,7 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) , mSpeakerCtrl(NULL) , mCounterCtrl(NULL) , mChicletButton(NULL) +, mPopupMenu(NULL) { enableCounterControl(p.enable_counter); } @@ -639,6 +649,37 @@ LLIMChiclet::EType LLIMChiclet::getIMSessionType(const LLUUID& session_id) return type; } +BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + if(!mPopupMenu) + { + createPopupMenu(); + } + + if (mPopupMenu) + { + updateMenuItems(); + mPopupMenu->arrangeAndClear(); + LLMenuGL::showPopup(this, mPopupMenu, x, y); + } + + return TRUE; +} + +bool LLIMChiclet::canCreateMenu() +{ + if(mPopupMenu) + { + llwarns << "Menu already exists" << llendl; + return false; + } + if(getSessionId().isNull()) + { + return false; + } + return true; +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -656,7 +697,6 @@ LLIMP2PChiclet::Params::Params() LLIMP2PChiclet::LLIMP2PChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -711,34 +751,10 @@ void LLIMP2PChiclet::updateMenuItems() mPopupMenu->getChild<LLUICtrl>("Add Friend")->setEnabled(!is_friend); } -BOOL LLIMP2PChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - updateMenuItems(); - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - void LLIMP2PChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - if(getSessionId().isNull()) - { + if(!canCreateMenu()) return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLIMP2PChiclet::onMenuItemClicked, this, _2)); @@ -788,7 +804,6 @@ LLAdHocChiclet::Params::Params() LLAdHocChiclet::LLAdHocChiclet(const Params& p) : LLIMChiclet(p) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -858,15 +873,8 @@ void LLAdHocChiclet::switchToCurrentSpeaker() void LLAdHocChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - if(getSessionId().isNull()) - { + if(!canCreateMenu()) return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLAdHocChiclet::onMenuItemClicked, this, _2)); @@ -886,22 +894,6 @@ void LLAdHocChiclet::onMenuItemClicked(const LLSD& user_data) } } -BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -920,7 +912,6 @@ LLIMGroupChiclet::LLIMGroupChiclet(const Params& p) : LLIMChiclet(p) , LLGroupMgrObserver(LLUUID::null) , mChicletIconCtrl(NULL) -, mPopupMenu(NULL) { LLButton::Params button_params = p.chiclet_button; mChicletButton = LLUICtrlFactory::create<LLButton>(button_params); @@ -1033,34 +1024,10 @@ void LLIMGroupChiclet::updateMenuItems() mPopupMenu->getChild<LLUICtrl>("Chat")->setEnabled(!open_window_exists); } -BOOL LLIMGroupChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -{ - if(!mPopupMenu) - { - createPopupMenu(); - } - - if (mPopupMenu) - { - updateMenuItems(); - mPopupMenu->arrangeAndClear(); - LLMenuGL::showPopup(this, mPopupMenu, x, y); - } - - return TRUE; -} - void LLIMGroupChiclet::createPopupMenu() { - if(mPopupMenu) - { - llwarns << "Menu already exists" << llendl; - return; - } - if(getSessionId().isNull()) - { + if(!canCreateMenu()) return; - } LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("IMChicletMenu.Action", boost::bind(&LLIMGroupChiclet::onMenuItemClicked, this, _2)); @@ -1908,6 +1875,28 @@ void LLScriptChiclet::onMouseDown() LLScriptFloaterManager::getInstance()->toggleScriptFloater(getSessionId()); } +void LLScriptChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + + if("end" == action) + { + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); + } +} + +void LLScriptChiclet::createPopupMenu() +{ + if(!canCreateMenu()) + return; + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("ScriptChiclet.Action", boost::bind(&LLScriptChiclet::onMenuItemClicked, this, _2)); + + mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> + ("menu_script_chiclet.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +} + ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// @@ -1969,4 +1958,26 @@ void LLInvOfferChiclet::onMouseDown() LLScriptFloaterManager::instance().toggleScriptFloater(getSessionId()); } +void LLInvOfferChiclet::onMenuItemClicked(const LLSD& user_data) +{ + std::string action = user_data.asString(); + + if("end" == action) + { + LLScriptFloaterManager::instance().onRemoveNotification(getSessionId()); + } +} + +void LLInvOfferChiclet::createPopupMenu() +{ + if(!canCreateMenu()) + return; + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + registrar.add("InvOfferChiclet.Action", boost::bind(&LLInvOfferChiclet::onMenuItemClicked, this, _2)); + + mPopupMenu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL> + ("menu_inv_offer_chiclet.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); +} + // EOF diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index ba17c5970e..489c66be71 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -428,12 +428,31 @@ public: virtual void setToggleState(bool toggle); + /** + * Displays popup menu. + */ + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + protected: LLIMChiclet(const LLIMChiclet::Params& p); protected: + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu() = 0; + + /** + * Enables/disables menus. + */ + virtual void updateMenuItems() {}; + + bool canCreateMenu(); + + LLMenuGL* mPopupMenu; + bool mShowSpeaker; bool mCounterEnabled; /* initial width of chiclet, should not include counter or speaker width */ @@ -519,11 +538,6 @@ protected: */ virtual void onMenuItemClicked(const LLSD& user_data); - /** - * Displays popup menu. - */ - /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - /** * Enables/disables menus based on relationship with other participant. * Enables/disables "show session" menu item depending on visible IM floater existence. @@ -533,7 +547,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -598,11 +611,6 @@ protected: virtual void onMenuItemClicked(const LLSD& user_data); /** - * Displays popup menu. - */ - virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - - /** * Finds a current speaker and resets the SpeakerControl with speaker's ID */ /*virtual*/ void switchToCurrentSpeaker(); @@ -610,7 +618,6 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -647,6 +654,16 @@ protected: LLScriptChiclet(const Params&); friend class LLUICtrlFactory; + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu(); + + /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + private: LLIconCtrl* mChicletIconCtrl; @@ -685,6 +702,16 @@ protected: LLInvOfferChiclet(const Params&); friend class LLUICtrlFactory; + /** + * Creates chiclet popup menu. + */ + virtual void createPopupMenu(); + + /** + * Processes clicks on chiclet popup menu. + */ + virtual void onMenuItemClicked(const LLSD& user_data); + private: LLChicletInvOfferIconCtrl* mChicletIconCtrl; }; @@ -767,15 +794,9 @@ protected: */ virtual void updateMenuItems(); - /** - * Displays popup menu. - */ - /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - private: LLChicletGroupIconCtrl* mChicletIconCtrl; - LLMenuGL* mPopupMenu; }; /** @@ -800,16 +821,6 @@ public: */ Optional<S32> max_displayed_count; - /** - * How many time chiclet should flash before set "Lit" state. Default value is 3. - */ - Optional<S32> flash_to_lit_count; - - /** - * Period of flashing while setting "Lit" state, in seconds. Default value is 0.5. - */ - Optional<F32> flash_period; - Params(); }; diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index a96981a108..feb8c540ef 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -114,7 +114,7 @@ BOOL LLFloaterScriptQueue::postBuild() // worked on. // NOT static, virtual! void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32, void* q_id) { @@ -305,7 +305,7 @@ LLFloaterCompileQueue::~LLFloaterCompileQueue() } void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object, - InventoryObjectList* inv) + LLInventoryObject::object_list_t* inv) { // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. @@ -313,8 +313,8 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object, typedef std::multimap<LLUUID, LLPointer<LLInventoryItem> > uuid_item_map; uuid_item_map asset_item_map; - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) { if((*it)->getType() == LLAssetType::AT_LSL_TEXT) @@ -625,14 +625,14 @@ LLFloaterResetQueue::~LLFloaterResetQueue() } void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv) + LLInventoryObject::object_list_t* inv) { // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray<const char*> names; - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) { if((*it)->getType() == LLAssetType::AT_LSL_TEXT) @@ -677,14 +677,14 @@ LLFloaterRunQueue::~LLFloaterRunQueue() } void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv) + LLInventoryObject::object_list_t* inv) { // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray<const char*> names; - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) { if((*it)->getType() == LLAssetType::AT_LSL_TEXT) @@ -732,14 +732,14 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue() } void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv) + LLInventoryObject::object_list_t* inv) { // find all of the lsl, leaving off duplicates. We'll remove // all matching asset uuids on compilation success. LLDynamicArray<const char*> names; - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) { if((*it)->getType() == LLAssetType::AT_LSL_TEXT) diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 2d061f5d8a..4fde2572af 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -76,13 +76,13 @@ protected: // This is the callback method for the viewer object currently // being worked on. /*virtual*/ void inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* queue); // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv) = 0; + LLInventoryObject::object_list_t* inv) = 0; static void onCloseBtn(void* user_data); @@ -145,7 +145,7 @@ protected: // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv); + LLInventoryObject::object_list_t* inv); // This is the callback for when each script arrives static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id, @@ -192,7 +192,7 @@ protected: // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv); + LLInventoryObject::object_list_t* inv); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -210,7 +210,7 @@ protected: // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv); + LLInventoryObject::object_list_t* inv); }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -228,7 +228,7 @@ protected: // This is called by inventoryChanged virtual void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv); + LLInventoryObject::object_list_t* inv); }; #endif // LL_LLCOMPILEQUEUE_H diff --git a/indra/newview/lldateutil.cpp b/indra/newview/lldateutil.cpp index abb2fdeb9a..3e71ecdfba 100644 --- a/indra/newview/lldateutil.cpp +++ b/indra/newview/lldateutil.cpp @@ -59,19 +59,22 @@ static S32 days_from_month(S32 year, S32 month) } } -std::string LLDateUtil::ageFromDate(const std::string& date_string, - const LLDate& now) +bool LLDateUtil::dateFromPDTString(LLDate& date, const std::string& str) +{ + S32 month, day, year; + S32 matched = sscanf(str.c_str(), "%d/%d/%d", &month, &day, &year); + if (matched != 3) return false; + date.fromYMDHMS(year, month, day); + F64 secs_since_epoch = date.secondsSinceEpoch(); + // Correct for the fact that specified date is in Pacific time, == UTC - 8 + secs_since_epoch += 8.0 * 60.0 * 60.0; + date.secondsSinceEpoch(secs_since_epoch); + return true; +} + +std::string LLDateUtil::ageFromDate(const LLDate& born_date, const LLDate& now) { S32 born_month, born_day, born_year; - S32 matched = sscanf(date_string.c_str(), "%d/%d/%d", &born_month, &born_day, &born_year); - if (matched != 3) return "???"; - LLDate born_date; - born_date.fromYMDHMS(born_year, born_month, born_day); - F64 born_date_secs_since_epoch = born_date.secondsSinceEpoch(); - // Correct for the fact that account creation dates are in Pacific time, - // == UTC - 8 - born_date_secs_since_epoch += 8.0 * 60.0 * 60.0; - born_date.secondsSinceEpoch(born_date_secs_since_epoch); // explode out to month/day/year again born_date.split(&born_year, &born_month, &born_day); @@ -155,6 +158,16 @@ std::string LLDateUtil::ageFromDate(const std::string& date_string, return LLTrans::getString("TodayOld"); } +std::string LLDateUtil::ageFromDate(const std::string& date_string, const LLDate& now) +{ + LLDate born_date; + + if (!dateFromPDTString(born_date, date_string)) + return "???"; + + return ageFromDate(born_date, now); +} + std::string LLDateUtil::ageFromDate(const std::string& date_string) { return ageFromDate(date_string, LLDate::now()); diff --git a/indra/newview/lldateutil.h b/indra/newview/lldateutil.h index 041be07f12..a0df21022e 100644 --- a/indra/newview/lldateutil.h +++ b/indra/newview/lldateutil.h @@ -36,6 +36,29 @@ class LLDate; namespace LLDateUtil { + /** + * Convert a date provided by the server into seconds since the Epoch. + * + * @param[out] date Number of seconds since 01/01/1970 UTC. + * @param[in] str Date string (MM/DD/YYYY) in PDT time zone. + * + * @return true on success, false on parse error + */ + bool dateFromPDTString(LLDate& date, const std::string& str); + + /** + * Get human-readable avatar age. + * + * Used for avatar inspectors and profiles. + * + * @param born_date Date an avatar was born on. + * @param now Current date. + * + * @return human-readable localized string like "1 year, 2 months", + * or "???" on error. + */ + std::string ageFromDate(const LLDate& born_date, const LLDate& now); + // Convert a date provided by the server (MM/DD/YYYY) into a localized, // human-readable age (1 year, 2 months) using translation strings. // Pass LLDate::now() for now. diff --git a/indra/newview/lldriverparam.cpp b/indra/newview/lldriverparam.cpp index 830e975e8a..ebd767d654 100644 --- a/indra/newview/lldriverparam.cpp +++ b/indra/newview/lldriverparam.cpp @@ -118,13 +118,12 @@ void LLDriverParamInfo::toStream(std::ostream &out) out << std::endl; - LLVOAvatarSelf *avatar = gAgent.getAvatarObject(); - if(avatar) + if(isAgentAvatarValid()) { for (entry_info_list_t::iterator iter = mDrivenInfoList.begin(); iter != mDrivenInfoList.end(); iter++) { LLDrivenEntryInfo driven = *iter; - LLViewerVisualParam *param = (LLViewerVisualParam*)avatar->getVisualParam(driven.mDrivenID); + LLViewerVisualParam *param = (LLViewerVisualParam*)gAgentAvatarp->getVisualParam(driven.mDrivenID); if (param) { param->getInfo()->toStream(out); @@ -146,7 +145,7 @@ void LLDriverParamInfo::toStream(std::ostream &out) } else { - llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << avatar << " for driver parameter " << getID() << llendl; + llwarns << "could not get parameter " << driven.mDrivenID << " from avatar " << gAgentAvatarp << " for driver parameter " << getID() << llendl; } out << std::endl; } @@ -626,13 +625,13 @@ F32 LLDriverParam::getDrivenWeight(const LLDrivenEntry* driven, F32 input_weight void LLDriverParam::setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake) { - LLVOAvatarSelf *avatar_self = gAgent.getAvatarObject(); - if(mWearablep && + if(isAgentAvatarValid() && + mWearablep && driven->mParam->getCrossWearable() && mWearablep->isOnTop()) { // call setWeight through LLVOAvatarSelf so other wearables can be updated with the correct values - avatar_self->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake ); + gAgentAvatarp->setVisualParamWeight( (LLVisualParam*)driven->mParam, driven_weight, upload_bake ); } else { diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 362010d65a..149ba2478d 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -112,13 +112,12 @@ private: }; LLExpandableTextBox::LLTextBoxEx::Params::Params() -: more_label("more_label") { } LLExpandableTextBox::LLTextBoxEx::LLTextBoxEx(const Params& p) : LLTextEditor(p), - mExpanderLabel(p.more_label), + mExpanderLabel(p.label), mExpanderVisible(false) { setIsChrome(TRUE); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 9d4a8aef76..5872592fae 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -54,7 +54,6 @@ protected: public: struct Params : public LLInitParam::Block<Params, LLTextEditor::Params> { - Mandatory<std::string> more_label; Params(); }; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 959395ff82..4c1e3461a5 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -31,7 +31,6 @@ */ #include "llviewerprecompiledheaders.h" - #include "llfavoritesbar.h" #include "llfloaterreg.h" @@ -47,6 +46,7 @@ #include "llclipboard.h" #include "llinventoryclipboard.h" #include "llinventorybridge.h" +#include "llinventoryfunctions.h" #include "llfloaterworldmap.h" #include "lllandmarkactions.h" #include "llnotificationsutil.h" diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp index fbb90c69f3..50b08f782a 100644 --- a/indra/newview/llfeaturemanager.cpp +++ b/indra/newview/llfeaturemanager.cpp @@ -621,9 +621,9 @@ void LLFeatureManager::applyBaseMasks() #if LL_SOLARIS && defined(__sparc) // even low MHz SPARCs are fast #error The 800 is hinky. Would something like a LL_MIN_MHZ make more sense here? - if (gSysCPU.getMhz() < 800) + if (gSysCPU.getMHz() < 800) #else - if (gSysCPU.getMhz() < 1100) + if (gSysCPU.getMHz() < 1100) #endif { maskFeatures("CPUSlow"); diff --git a/indra/newview/llfloateranimpreview.cpp b/indra/newview/llfloateranimpreview.cpp index 72dc182461..043f753e01 100644 --- a/indra/newview/llfloateranimpreview.cpp +++ b/indra/newview/llfloateranimpreview.cpp @@ -568,7 +568,7 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data) { LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); - if(!avatarp->isMotionActive(previewp->mMotionID)) + if (!avatarp->isMotionActive(previewp->mMotionID)) { previewp->resetMotion(); previewp->mPauseRequest = NULL; @@ -593,7 +593,7 @@ void LLFloaterAnimPreview::onBtnPause(void* user_data) { LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); - if(avatarp->isMotionActive(previewp->mMotionID)) + if (avatarp->isMotionActive(previewp->mMotionID)) { if (!avatarp->areAnimationsPaused()) { @@ -1001,19 +1001,18 @@ void LLFloaterAnimPreview::onBtnOK(void* userdata) { std::string name = floaterp->childGetValue("name_form").asString(); std::string desc = floaterp->childGetValue("description_form").asString(); - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - void *userdata = NULL; upload_new_resource(floaterp->mTransactionID, // tid LLAssetType::AT_ANIMATION, name, desc, - 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms(), + LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), name, - callback, expected_upload_cost, userdata); + NULL, + expected_upload_cost); } else { diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 698ccec9c1..679ab4c713 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -46,6 +46,7 @@ #include "llagent.h" #include "llcombobox.h" +#include "llmimetypes.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llsavedsettingsglue.h" @@ -351,7 +352,7 @@ void LLFloaterAuction::doResetParcel() body["music_url"] = empty; body["media_url"] = empty; body["media_desc"] = empty; - body["media_type"] = std::string("none/none"); + body["media_type"] = LLMIMETypes::getDefaultMimeType(); body["media_width"] = (S32) 0; body["media_height"] = (S32) 0; body["auto_scale"] = (S32) 0; diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 8b5d334c86..d1e99fbd61 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -38,6 +38,8 @@ #include "llcallingcard.h" #include "llfocusmgr.h" #include "llfloaterreg.h" +#include "llimview.h" // for gIMMgr +#include "lltooldraganddrop.h" // for LLToolDragAndDrop #include "llviewercontrol.h" #include "llworld.h" @@ -157,7 +159,7 @@ void LLFloaterAvatarPicker::onBtnFind() find(); } -static void getSelectedAvatarData(const LLScrollListCtrl* from, std::vector<std::string>& avatar_names, std::vector<LLUUID>& avatar_ids) +static void getSelectedAvatarData(const LLScrollListCtrl* from, std::vector<std::string>& avatar_names, uuid_vec_t& avatar_ids) { std::vector<LLScrollListItem*> items = from->getAllSelected(); for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != items.end(); ++iter) @@ -203,7 +205,7 @@ void LLFloaterAvatarPicker::onBtnSelect() if(list) { std::vector<std::string> avatar_names; - std::vector<LLUUID> avatar_ids; + uuid_vec_t avatar_ids; getSelectedAvatarData(list, avatar_names, avatar_ids); mSelectionCallback(avatar_names, avatar_ids); } @@ -247,7 +249,7 @@ void LLFloaterAvatarPicker::populateNearMe() LLScrollListCtrl* near_me_scroller = getChild<LLScrollListCtrl>("NearMe"); near_me_scroller->deleteAllItems(); - std::vector<LLUUID> avatar_ids; + uuid_vec_t avatar_ids; LLWorld::getInstance()->getAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), gSavedSettings.getF32("NearMeRange")); for(U32 i=0; i<avatar_ids.size(); i++) { @@ -370,6 +372,68 @@ void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) getChild<LLScrollListCtrl>("Friends")->setAllowMultipleSelection(allow_multiple); } +LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList() +{ + std::string acvtive_panel_name; + LLScrollListCtrl* list = NULL; + LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs"); + if(active_panel) + { + acvtive_panel_name = active_panel->getName(); + } + if(acvtive_panel_name == "SearchPanel") + { + list = getChild<LLScrollListCtrl>("SearchResults"); + } + else if(acvtive_panel_name == "NearMePanel") + { + list = getChild<LLScrollListCtrl>("NearMe"); + } + else if (acvtive_panel_name == "FriendsPanel") + { + list = getChild<LLScrollListCtrl>("Friends"); + } + return list; +} + +BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, EDragAndDropType cargo_type, + void *cargo_data, EAcceptance *accept, + std::string& tooltip_msg) +{ + LLScrollListCtrl* list = getActiveList(); + if(list) + { + LLRect rc_list; + LLRect rc_point(x,y,x,y); + if (localRectToOtherView(rc_point, &rc_list, list)) + { + // Keep selected only one item + list->deselectAllItems(TRUE); + list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask); + LLScrollListItem* selection = list->getFirstSelected(); + if (selection) + { + LLUUID session_id = LLUUID::null; + LLUUID dest_agent_id = selection->getUUID(); + std::string avatar_name = selection->getColumn(0)->getValue().asString(); + if (dest_agent_id.notNull() && dest_agent_id != gAgentID) + { + if (drop) + { + // Start up IM before give the item + session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id); + } + return LLToolDragAndDrop::handleGiveDragAndDrop(dest_agent_id, session_id, drop, + cargo_type, cargo_data, accept); + } + } + } + } + *accept = ACCEPT_NO; + return TRUE; +} + // static void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**) { @@ -499,7 +563,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled() if(list) { - std::vector<LLUUID> avatar_ids; + uuid_vec_t avatar_ids; std::vector<std::string> avatar_names; getSelectedAvatarData(list, avatar_names, avatar_ids); return mOkButtonValidateSignal(avatar_ids); diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index e35466cec8..e69b814f9f 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -37,14 +37,16 @@ #include <vector> +class LLScrollListCtrl; + class LLFloaterAvatarPicker : public LLFloater { public: - typedef boost::signals2::signal<bool(const std::vector<LLUUID>&), boost_boolean_combiner> validate_signal_t; + typedef boost::signals2::signal<bool(const uuid_vec_t&), boost_boolean_combiner> validate_signal_t; typedef validate_signal_t::slot_type validate_callback_t; // The callback function will be called with an avatar name and UUID. - typedef boost::function<void (const std::vector<std::string>&, const std::vector<LLUUID>&)> select_callback_t; + typedef boost::function<void (const std::vector<std::string>&, const uuid_vec_t&)> select_callback_t; // Call this to select an avatar. static LLFloaterAvatarPicker* show(select_callback_t callback, BOOL allow_multiple = FALSE, @@ -59,6 +61,11 @@ public: static void processAvatarPickerReply(class LLMessageSystem* msg, void**); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, EDragAndDropType cargo_type, + void *cargo_data, EAcceptance *accept, + std::string& tooltip_msg); + private: void editKeystroke(class LLLineEditor* caller, void* user_data); @@ -77,6 +84,7 @@ private: void find(); void setAllowMultiple(BOOL allow_multiple); + LLScrollListCtrl* getActiveList(); virtual void draw(); virtual BOOL handleKeyHere(KEY key, MASK mask); diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 8c7899af3e..deef85cc6c 100644 --- a/indra/newview/llfloateravatartextures.cpp +++ b/indra/newview/llfloateravatartextures.cpp @@ -31,15 +31,14 @@ */ #include "llviewerprecompiledheaders.h" - #include "llfloateravatartextures.h" +#include "llagent.h" +#include "llagentwearables.h" #include "lltexturectrl.h" - #include "lluictrlfactory.h" #include "llviewerobjectlist.h" -#include "llvoavatar.h" -#include "llagentwearables.h" +#include "llvoavatarself.h" using namespace LLVOAvatarDefines; @@ -75,7 +74,6 @@ void LLFloaterAvatarTextures::draw() LLFloater::draw(); } -#if !LL_RELEASE_FOR_DOWNLOAD static void update_texture_ctrl(LLVOAvatar* avatarp, LLTextureCtrl* ctrl, ETextureIndex te) @@ -84,14 +82,17 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture(te); if (tex_entry->mIsLocalTexture) { - const EWearableType wearable_type = tex_entry->mWearableType; - LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); - if (wearable) + if (avatarp->isSelf()) { - LLLocalTextureObject *lto = wearable->getLocalTextureObject(te); - if (lto) + const EWearableType wearable_type = tex_entry->mWearableType; + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); + if (wearable) { - id = lto->getID(); + LLLocalTextureObject *lto = wearable->getLocalTextureObject(te); + if (lto) + { + id = lto->getID(); + } } } } @@ -103,12 +104,12 @@ static void update_texture_ctrl(LLVOAvatar* avatarp, if (id == IMG_DEFAULT_AVATAR) { ctrl->setImageAssetID(LLUUID::null); - ctrl->setToolTip(std::string("IMG_DEFAULT_AVATAR")); + ctrl->setToolTip(tex_entry->mName + " : " + std::string("IMG_DEFAULT_AVATAR")); } else { ctrl->setImageAssetID(id); - ctrl->setToolTip(id.asString()); + ctrl->setToolTip(tex_entry->mName + " : " + id.asString()); } } @@ -132,72 +133,74 @@ static LLVOAvatar* find_avatar(const LLUUID& id) void LLFloaterAvatarTextures::refresh() { - LLVOAvatar *avatarp = find_avatar(mID); - if (avatarp) + if (gAgent.isGodlike()) { - std::string fullname; - if (gCacheName->getFullName(avatarp->getID(), fullname)) + LLVOAvatar *avatarp = find_avatar(mID); + if (avatarp) { - setTitle(mTitle + ": " + fullname); + std::string fullname; + if (gCacheName->getFullName(avatarp->getID(), fullname)) + { + setTitle(mTitle + ": " + fullname); + } + for (U32 i=0; i < TEX_NUM_INDICES; i++) + { + update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i)); + } } - for (U32 i=0; i < TEX_NUM_INDICES; i++) + else { - update_texture_ctrl(avatarp, mTextures[i], ETextureIndex(i)); + setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")"); } } - else - { - setTitle(mTitle + ": " + getString("InvalidAvatar") + " (" + mID.asString() + ")"); - } } -#else - -void LLFloaterAvatarTextures::refresh() -{ -} - -#endif - // static void LLFloaterAvatarTextures::onClickDump(void* data) { -#if !LL_RELEASE_FOR_DOWNLOAD - LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data; - LLVOAvatar* avatarp = find_avatar(self->mID); - if (!avatarp) return; - - for (S32 i = 0; i < avatarp->getNumTEs(); i++) + if (gAgent.isGodlike()) { - const LLTextureEntry* te = avatarp->getTE(i); - if (!te) continue; - - if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i)) + LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data; + LLVOAvatar* avatarp = find_avatar(self->mID); + if (!avatarp) return; + for (S32 i = 0; i < avatarp->getNumTEs(); i++) { - LLUUID id = IMG_DEFAULT_AVATAR; - EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); - LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); - if (wearable) + const LLTextureEntry* te = avatarp->getTE(i); + if (!te) continue; + + const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)(i)); + if (!tex_entry) + continue; + + if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i)) { - LLLocalTextureObject *lto = wearable->getLocalTextureObject(i); - if (lto) + LLUUID id = IMG_DEFAULT_AVATAR; + EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i); + if (avatarp->isSelf()) { - id = lto->getID(); + LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0); + if (wearable) + { + LLLocalTextureObject *lto = wearable->getLocalTextureObject(i); + if (lto) + { + id = lto->getID(); + } + } + } + if (id != IMG_DEFAULT_AVATAR) + { + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl; + } + else + { + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << llendl; } - } - if (id != IMG_DEFAULT_AVATAR) - { - llinfos << "Avatar TE " << i << " id " << id << llendl; } else { - llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl; + llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl; } } - else - { - llinfos << "Avatar TE " << i << " id " << te->getID() << llendl; - } } -#endif } diff --git a/indra/newview/llfloaterbeacons.cpp b/indra/newview/llfloaterbeacons.cpp index 13a7888f60..975c888a2b 100644 --- a/indra/newview/llfloaterbeacons.cpp +++ b/indra/newview/llfloaterbeacons.cpp @@ -71,7 +71,7 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLCheckBoxCtrl *check = (LLCheckBoxCtrl *)ctrl; std::string name = check->getName(); - if( name == "touch_only") + if(name == "touch_only") { LLPipeline::toggleRenderScriptedTouchBeacons(NULL); // Don't allow both to be ON at the same time. Toggle the other one off if both now on. @@ -81,7 +81,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderScriptedBeacons(FALSE); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(FALSE)); + getChild<LLCheckBoxCtrl>("scripted")->setValue(FALSE); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("touch_only")->setValue(TRUE); } } else if(name == "scripted") @@ -94,7 +96,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderScriptedTouchBeacons(FALSE); getChild<LLCheckBoxCtrl>("touch_only")->setControlValue(LLSD(FALSE)); + getChild<LLCheckBoxCtrl>("touch_only")->setValue(FALSE); getChild<LLCheckBoxCtrl>("scripted")->setControlValue(LLSD(TRUE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("scripted")->setValue(TRUE); } } else if(name == "physical") LLPipeline::setRenderPhysicalBeacons(check->get()); @@ -110,7 +114,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderBeacons(TRUE); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(TRUE)); + getChild<LLCheckBoxCtrl>("beacons")->setValue(TRUE); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("highlights")->setValue(FALSE); } } else if(name == "beacons") @@ -123,7 +129,9 @@ void LLFloaterBeacons::onClickUICheck(LLUICtrl *ctrl) { LLPipeline::setRenderHighlights(TRUE); getChild<LLCheckBoxCtrl>("highlights")->setControlValue(LLSD(TRUE)); + getChild<LLCheckBoxCtrl>("highlights")->setValue(TRUE); getChild<LLCheckBoxCtrl>("beacons")->setControlValue(LLSD(FALSE)); // just to be sure it's in sync with llpipeline + getChild<LLCheckBoxCtrl>("beacons")->setValue(FALSE); } } } diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index b2f700069f..766fc0723c 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -37,6 +37,7 @@ #include "llfloaterperms.h" // for utilities #include "llagent.h" #include "llchat.h" +#include "llinventorydefines.h" #include "llviewerwindow.h" #include "llviewerobject.h" #include "llviewerobjectlist.h" @@ -116,7 +117,7 @@ void LLFloaterBulkPermission::doApply() // worked on. // NOT static, virtual! void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32, void* q_id) { @@ -250,12 +251,12 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check) } -void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, InventoryObjectList* inv) +void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv) { LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output"); - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it) { LLAssetType::EType asstype = (*it)->getType(); diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index bffcff7059..80dc88fbb1 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -63,13 +63,13 @@ private: // This is the callback method for the viewer object currently // being worked on. /*virtual*/ void inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* queue); // This is called by inventoryChanged void handleInventory(LLViewerObject* viewer_obj, - InventoryObjectList* inv); + LLInventoryObject::object_list_t* inv); void updateInventory(LLViewerObject* object, diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 589f570d96..44c82f1941 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -44,6 +44,7 @@ #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" #include "llfloaterinventory.h" // for get_item_icon +#include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llnotificationsutil.h" #include "llselectmgr.h" @@ -195,7 +196,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) } void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* data) { @@ -220,8 +221,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, return; } - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it ) { LLInventoryObject* obj = (LLInventoryObject*)(*it); @@ -246,8 +247,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj, // Compute icon for this item BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED - || inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) + if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED + || inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) { item_is_multi = TRUE; } diff --git a/indra/newview/llfloaterbuy.h b/indra/newview/llfloaterbuy.h index ab38e082dc..411c8fb00e 100644 --- a/indra/newview/llfloaterbuy.h +++ b/indra/newview/llfloaterbuy.h @@ -65,7 +65,7 @@ protected: void requestObjectInventories(); /*virtual*/ void inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* data); diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 0daef27af2..1d989ad0fd 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -44,6 +44,7 @@ #include "llagent.h" // for agent id #include "llcheckboxctrl.h" +#include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" @@ -142,7 +143,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* data) { @@ -176,8 +177,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, LLInventoryType::EType inv_type; S32 wearable_count = 0; - InventoryObjectList::const_iterator it = inv->begin(); - InventoryObjectList::const_iterator end = inv->end(); + LLInventoryObject::object_list_t::const_iterator it = inv->begin(); + LLInventoryObject::object_list_t::const_iterator end = inv->end(); for ( ; it != end; ++it ) { @@ -215,7 +216,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj, LLSD row; BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED ) + if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED ) { item_is_multi = TRUE; } diff --git a/indra/newview/llfloaterbuycontents.h b/indra/newview/llfloaterbuycontents.h index 8045a46c9f..ab161adfea 100644 --- a/indra/newview/llfloaterbuycontents.h +++ b/indra/newview/llfloaterbuycontents.h @@ -59,7 +59,7 @@ public: protected: void requestObjectInventories(); /*virtual*/ void inventoryChanged(LLViewerObject* obj, - InventoryObjectList* inv, + LLInventoryObject::object_list_t* inv, S32 serial_num, void* data); diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index d0188352c7..d84ebef1dd 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -38,11 +38,11 @@ #include "llfloaterreg.h" // Viewer includes +#include "llagentcamera.h" #include "lljoystickbutton.h" #include "llviewercontrol.h" #include "llviewercamera.h" #include "llbottomtray.h" -#include "llagent.h" #include "lltoolmgr.h" #include "lltoolfocus.h" #include "llslider.h" @@ -104,7 +104,7 @@ BOOL LLPanelCameraZoom::postBuild() void LLPanelCameraZoom::draw() { - mSlider->setValue(gAgent.getCameraZoomFraction()); + mSlider->setValue(gAgentCamera.getCameraZoomFraction()); LLPanel::draw(); } @@ -131,7 +131,7 @@ void LLPanelCameraZoom::onZoomMinusHeldDown() void LLPanelCameraZoom::onSliderValueChanged() { F32 zoom_level = mSlider->getValueF32(); - gAgent.setCameraZoomFraction(zoom_level); + gAgentCamera.setCameraZoomFraction(zoom_level); } void activate_camera_tool() @@ -146,7 +146,7 @@ void activate_camera_tool() /*static*/ bool LLFloaterCamera::inFreeCameraMode() { LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance(); - if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && gAgent.getCameraMode() != CAMERA_MODE_MOUSELOOK) + if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { return true; } @@ -265,7 +265,7 @@ ECameraControlMode LLFloaterCamera::determineMode() return CAMERA_CTRL_MODE_FREE_CAMERA; } - if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { return CAMERA_CTRL_MODE_AVATAR_VIEW; } @@ -421,7 +421,7 @@ void LLFloaterCamera::updateCameraPresetButtons() childSetValue("rear_view", preset == CAMERA_PRESET_REAR_VIEW); childSetValue("group_view", preset == CAMERA_PRESET_GROUP_VIEW); childSetValue("front_view", preset == CAMERA_PRESET_FRONT_VIEW); - childSetValue("mouselook_view", gAgent.cameraMouselook()); + childSetValue("mouselook_view", gAgentCamera.cameraMouselook()); } void LLFloaterCamera::onClickCameraPresets(const LLSD& param) @@ -430,19 +430,19 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) if ("rear_view" == name) { - gAgent.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); } else if ("group_view" == name) { - gAgent.switchCameraPreset(CAMERA_PRESET_GROUP_VIEW); + gAgentCamera.switchCameraPreset(CAMERA_PRESET_GROUP_VIEW); } else if ("front_view" == name) { - gAgent.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW); + gAgentCamera.switchCameraPreset(CAMERA_PRESET_FRONT_VIEW); } else if ("mouselook_view" == name) { - gAgent.changeCameraToMouselook(); + gAgentCamera.changeCameraToMouselook(); } LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); diff --git a/indra/newview/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index 97ebab3425..560cc29080 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -113,7 +113,6 @@ BOOL LLFloaterEvent::postBuild() mTBDuration = getChild<LLTextBox>("event_duration"); mTBDesc = getChild<LLExpandableTextBox>("event_desc"); - mTBDesc->setEnabled(FALSE); mTBRunBy = getChild<LLTextBox>("event_runby"); mTBLocation = getChild<LLTextBox>("event_location"); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 9c1ac2631d..eff7131145 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -36,6 +36,7 @@ #include "llinventory.h" #include "llinventorybridge.h" +#include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llinventoryclipboard.h" @@ -106,7 +107,7 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key) : LLFloater(key) { mObserver = new LLFloaterGestureObserver(this); - LLGestureManager::instance().addObserver(mObserver); + LLGestureMgr::instance().addObserver(mObserver); mCommitCallbackRegistrar.add("Gesture.Action.ToogleActiveState", boost::bind(&LLFloaterGesture::onActivateBtnClick, this)); mCommitCallbackRegistrar.add("Gesture.Action.ShowPreview", boost::bind(&LLFloaterGesture::onClickEdit, this)); @@ -125,7 +126,7 @@ void LLFloaterGesture::done() // we load only gesture folder without childred. LLInventoryModel::cat_array_t* categories; LLInventoryModel::item_array_t* items; - LLInventoryFetchDescendentsObserver::folder_ref_t unloaded_folders; + uuid_vec_t unloaded_folders; LL_DEBUGS("Gesture")<< "Get subdirs of Gesture Folder...." << LL_ENDL; gInventory.getDirectDescendentsOf(mGestureFolderID, categories, items); if (categories->empty()) @@ -147,7 +148,8 @@ void LLFloaterGesture::done() if (!unloaded_folders.empty()) { LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL; - fetchDescendents(unloaded_folders); + setFetchIDs(unloaded_folders); + startFetch(); } else { @@ -165,7 +167,7 @@ void LLFloaterGesture::done() // virtual LLFloaterGesture::~LLFloaterGesture() { - LLGestureManager::instance().removeObserver(mObserver); + LLGestureMgr::instance().removeObserver(mObserver); delete mObserver; mObserver = NULL; gInventory.removeObserver(this); @@ -197,11 +199,12 @@ BOOL LLFloaterGesture::postBuild() setDefaultBtn("play_btn"); mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false); - folder_ref_t folders; + uuid_vec_t folders; folders.push_back(mGestureFolderID); //perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details. gInventory.addObserver(this); - fetchDescendents(folders); + setFetchIDs(folders); + startFetch(); if (mGestureList) { @@ -246,13 +249,13 @@ void LLFloaterGesture::refreshAll() void LLFloaterGesture::buildGestureList() { S32 scroll_pos = mGestureList->getScrollPos(); - std::vector<LLUUID> selected_items; + uuid_vec_t selected_items; getSelectedIds(selected_items); LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL; mGestureList->deleteAllItems(); - LLGestureManager::item_map_t::const_iterator it; - const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); + LLGestureMgr::item_map_t::const_iterator it; + const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { addGesture(it->first,it->second, mGestureList); @@ -278,7 +281,7 @@ void LLFloaterGesture::buildGestureList() // attempt to preserve scroll position through re-builds // since we do re-build whenever something gets dirty - for(std::vector<LLUUID>::iterator it = selected_items.begin(); it != selected_items.end(); it++) + for(uuid_vec_t::iterator it = selected_items.begin(); it != selected_items.end(); it++) { mGestureList->selectByID(*it); } @@ -354,10 +357,10 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur element["columns"][0]["value"] = ""; element["columns"][0]["font"]["name"] = "SANSSERIF"; element["columns"][0]["font"]["style"] = font_style; - element["columns"][0]["column"] = "trigger"; - element["columns"][0]["value"] = "---"; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; + element["columns"][1]["column"] = "shortcut"; + element["columns"][1]["value"] = "---"; + element["columns"][1]["font"]["name"] = "SANSSERIF"; + element["columns"][1]["font"]["style"] = font_style; element["columns"][2]["column"] = "key"; element["columns"][2]["value"] = "~~~"; element["columns"][2]["font"]["name"] = "SANSSERIF"; @@ -371,13 +374,13 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM); if(sl_item) { - LLFontGL::StyleFlags style = LLGestureManager::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL; + LLFontGL::StyleFlags style = LLGestureMgr::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL; // *TODO find out why ["font"]["style"] does not affect font style ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(style); } } -void LLFloaterGesture::getSelectedIds(std::vector<LLUUID>& ids) +void LLFloaterGesture::getSelectedIds(uuid_vec_t& ids) { std::vector<LLScrollListItem*> items = mGestureList->getAllSelected(); for(std::vector<LLScrollListItem*>::const_iterator it = items.begin(); it != items.end(); it++) @@ -421,17 +424,17 @@ void LLFloaterGesture::onClickPlay() if(item_id.isNull()) return; LL_DEBUGS("Gesture")<<" Trying to play gesture id: "<< item_id <<LL_ENDL; - if(!LLGestureManager::instance().isGestureActive(item_id)) + if(!LLGestureMgr::instance().isGestureActive(item_id)) { // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList. BOOL inform_server = TRUE; BOOL deactivate_similar = FALSE; - LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); + LLGestureMgr::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); LLViewerInventoryItem *item = gInventory.getItem(item_id); llassert(item); if (item) { - LLGestureManager::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar); + LLGestureMgr::instance().activateGestureWithAsset(item_id, item->getAssetUUID(), inform_server, deactivate_similar); LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; } } @@ -451,13 +454,13 @@ void LLFloaterGesture::onClickNew() void LLFloaterGesture::onActivateBtnClick() { - std::vector<LLUUID> ids; + uuid_vec_t ids; getSelectedIds(ids); if(ids.empty()) return; - LLGestureManager* gm = LLGestureManager::getInstance(); - std::vector<LLUUID>::const_iterator it = ids.begin(); + LLGestureMgr* gm = LLGestureMgr::getInstance(); + uuid_vec_t::const_iterator it = ids.begin(); BOOL first_gesture_state = gm->isGestureActive(*it); BOOL is_mixed = FALSE; while( ++it != ids.end() ) @@ -468,7 +471,7 @@ void LLFloaterGesture::onActivateBtnClick() break; } } - for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++) + for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++) { if(is_mixed) { @@ -494,11 +497,11 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command) // since we select this comman inventory item had already arrived . if("copy_gesture" == command_name) { - std::vector<LLUUID> ids; + uuid_vec_t ids; getSelectedIds(ids); // make sure that clopboard is empty LLInventoryClipboard::instance().reset(); - for(std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++) + for(uuid_vec_t::iterator it = ids.begin(); it != ids.end(); it++) { LLInventoryItem* item = gInventory.getItem(*it); if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE) @@ -558,7 +561,7 @@ void LLFloaterGesture::onCommitList() const LLUUID& item_id = mGestureList->getCurrentID(); mSelectedID = item_id; - if (LLGestureManager::instance().isGesturePlaying(item_id)) + if (LLGestureMgr::instance().isGesturePlaying(item_id)) { childSetVisible("play_btn", false); childSetVisible("stop_btn", true); @@ -572,14 +575,14 @@ void LLFloaterGesture::onCommitList() void LLFloaterGesture::onDeleteSelected() { - std::vector<LLUUID> ids; + uuid_vec_t ids; getSelectedIds(ids); if(ids.empty()) return; const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - LLGestureManager* gm = LLGestureManager::getInstance(); - for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++) + LLGestureMgr* gm = LLGestureMgr::getInstance(); + for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++) { const LLUUID& selected_item = *it; LLInventoryItem* inv_item = gInventory.getItem(selected_item); @@ -610,10 +613,10 @@ void LLFloaterGesture::onDeleteSelected() void LLFloaterGesture::addToCurrentOutFit() { - std::vector<LLUUID> ids; + uuid_vec_t ids; getSelectedIds(ids); - LLAppearanceManager* am = LLAppearanceManager::getInstance(); - for(std::vector<LLUUID>::const_iterator it = ids.begin(); it != ids.end(); it++) + LLAppearanceMgr* am = LLAppearanceMgr::getInstance(); + for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); it++) { am->addCOFItemLink(*it); } @@ -623,12 +626,12 @@ void LLFloaterGesture::playGesture(LLUUID item_id) { LL_DEBUGS("Gesture")<<"Playing gesture "<< item_id<<LL_ENDL; - if (LLGestureManager::instance().isGesturePlaying(item_id)) + if (LLGestureMgr::instance().isGesturePlaying(item_id)) { - LLGestureManager::instance().stopGesture(item_id); + LLGestureMgr::instance().stopGesture(item_id); } else { - LLGestureManager::instance().playGesture(item_id); + LLGestureMgr::instance().playGesture(item_id); } } diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 629d77b949..1676542c77 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -85,7 +85,7 @@ private: * Therefore we have to copy these items to avoid viewer crash. * @see LLFloaterGesture::onActivateBtnClick */ - void getSelectedIds(std::vector<LLUUID>& ids); + void getSelectedIds(uuid_vec_t& ids); bool isActionEnabled(const LLSD& command); /** * @brief Activation rules: diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index eb56f387cd..bd07cfdfbf 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -828,7 +828,6 @@ const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f; LLPanelGridTools::LLPanelGridTools() : LLPanel() { - mCommitCallbackRegistrar.add("GridTools.KickAll", boost::bind(&LLPanelGridTools::onClickKickAll, this)); mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this)); } @@ -846,46 +845,6 @@ void LLPanelGridTools::refresh() { } -void LLPanelGridTools::onClickKickAll() -{ - LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick); -} - - -bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response) -{ - if (LLNotificationsUtil::getSelectedOption(notification, response) == 0) - { - LLSD payload; - payload["kick_message"] = response["message"].asString(); - LLNotificationsUtil::add("ConfirmKick", LLSD(), payload, LLPanelGridTools::finishKick); - } - return false; -} - - -// static -bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response) -{ - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - - - if (option == 0) - { - LLMessageSystem* msg = gMessageSystem; - - msg->newMessageFast(_PREHASH_GodKickUser); - msg->nextBlockFast(_PREHASH_UserInfo); - msg->addUUIDFast(_PREHASH_GodID, gAgent.getID()); - msg->addUUIDFast(_PREHASH_GodSessionID, gAgent.getSessionID()); - msg->addUUIDFast(_PREHASH_AgentID, LL_UUID_ALL_AGENTS ); - msg->addU32("KickFlags", KICK_FLAGS_DEFAULT ); - msg->addStringFast(_PREHASH_Reason, notification["payload"]["kick_message"].asString()); - gAgent.sendReliableMessage(); - } - return false; -} - void LLPanelGridTools::onClickFlushMapVisibilityCaches() { LLNotificationsUtil::add("FlushMapVisibilityCaches", LLSD(), LLSD(), flushMapVisibilityCachesConfirm); @@ -963,6 +922,7 @@ LLPanelObjectTools::~LLPanelObjectTools() BOOL LLPanelObjectTools::postBuild() { + refresh(); return TRUE; } @@ -1191,7 +1151,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data) panelp->childSetValue("target_avatar_name", name); } -void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelObjectTools::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (ids.empty() || names.empty()) return; mTargetAvatar = ids[0]; diff --git a/indra/newview/llfloatergodtools.h b/indra/newview/llfloatergodtools.h index ef5ce02749..aee9db78a3 100644 --- a/indra/newview/llfloatergodtools.h +++ b/indra/newview/llfloatergodtools.h @@ -198,9 +198,6 @@ public: void refresh(); - void onClickKickAll(); - static bool confirmKick(const LLSD& notification, const LLSD& response); - static bool finishKick(const LLSD& notification, const LLSD& response); static void onDragSunPhase(LLUICtrl *ctrl, void *userdata); void onClickFlushMapVisibilityCaches(); static bool flushMapVisibilityCachesConfirm(const LLSD& notification, const LLSD& response); @@ -234,7 +231,7 @@ public: void onChangeAnything(); void onApplyChanges(); void onClickSet(); - void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids); void onClickDeletePublicOwnedBy(); void onClickDeleteAllScriptedOwnedBy(); void onClickDeleteAllOwnedBy(); diff --git a/indra/newview/llfloatergroupinvite.cpp b/indra/newview/llfloatergroupinvite.cpp index bf484c6343..5d1864b4c8 100644 --- a/indra/newview/llfloatergroupinvite.cpp +++ b/indra/newview/llfloatergroupinvite.cpp @@ -112,7 +112,7 @@ LLFloaterGroupInvite::~LLFloaterGroupInvite() } // static -void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, std::vector<LLUUID> *agent_ids) +void LLFloaterGroupInvite::showForGroup(const LLUUID& group_id, uuid_vec_t *agent_ids) { const LLFloater::Params& floater_params = LLFloater::getDefaultParams(); S32 floater_header_size = floater_params.header_height; diff --git a/indra/newview/llfloatergroupinvite.h b/indra/newview/llfloatergroupinvite.h index b3f5d75ac1..68943724df 100644 --- a/indra/newview/llfloatergroupinvite.h +++ b/indra/newview/llfloatergroupinvite.h @@ -43,7 +43,7 @@ class LLFloaterGroupInvite public: virtual ~LLFloaterGroupInvite(); - static void showForGroup(const LLUUID &group_id, std::vector<LLUUID> *agent_ids = NULL); + static void showForGroup(const LLUUID &group_id, uuid_vec_t *agent_ids = NULL); protected: LLFloaterGroupInvite(const LLUUID& group_id = LLUUID::null); diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index ef9da30552..8a20712ea8 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -59,13 +59,18 @@ #include "llviewertexturelist.h" #include "llstring.h" +#include "llendianswizzle.h" + +#include "llviewercontrol.h" +#include "lltrans.h" +#include "llimagedimensionsinfo.h" + const S32 PREVIEW_BORDER_WIDTH = 2; const S32 PREVIEW_RESIZE_HANDLE_SIZE = S32(RESIZE_HANDLE_WIDTH * OO_SQRT2) + PREVIEW_BORDER_WIDTH; const S32 PREVIEW_HPAD = PREVIEW_RESIZE_HANDLE_SIZE; const S32 PREF_BUTTON_HEIGHT = 16 + 7 + 16; const S32 PREVIEW_TEXTURE_HEIGHT = 300; - //----------------------------------------------------------------------------- // LLFloaterImagePreview() //----------------------------------------------------------------------------- @@ -124,6 +129,11 @@ BOOL LLFloaterImagePreview::postBuild() childShow("bad_image_text"); childDisable("clothing_type_combo"); childDisable("ok_btn"); + + if(!mImageLoadError.empty()) + { + childSetValue("bad_image_text",mImageLoadError.c_str()); + } } getChild<LLUICtrl>("ok_btn")->setCommitCallback(boost::bind(&LLFloaterNameDesc::onBtnOK, this)); @@ -341,6 +351,27 @@ bool LLFloaterImagePreview::loadImage(const std::string& src_filename) codec = IMG_CODEC_PNG; } + LLImageDimensionsInfo image_info; + if(!image_info.load(src_filename,codec)) + { + mImageLoadError = image_info.getLastError(); + return false; + } + + S32 max_width = gSavedSettings.getS32("max_texture_dimension_X"); + S32 max_heigh = gSavedSettings.getS32("max_texture_dimension_Y"); + + if(image_info.getWidth() > max_width|| image_info.getHeight() > max_heigh) + { + LLStringUtil::format_map_t args; + args["WIDTH"] = llformat("%d", max_width); + args["HEIGHT"] = llformat("%d", max_heigh); + + mImageLoadError = LLTrans::getString("texture_load_dimensions_error", args); + return false; + } + + LLPointer<LLImageRaw> raw_image = new LLImageRaw; switch (codec) diff --git a/indra/newview/llfloaterimagepreview.h b/indra/newview/llfloaterimagepreview.h index 466bd1d0ec..3a7e1ff7d8 100644 --- a/indra/newview/llfloaterimagepreview.h +++ b/indra/newview/llfloaterimagepreview.h @@ -143,7 +143,8 @@ protected: LLRect mPreviewRect; LLRectf mPreviewImageRect; LLPointer<LLViewerTexture> mImagep ; - + + std::string mImageLoadError; }; #endif // LL_LLFLOATERIMAGEPREVIEW_H diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 6842d3dc74..4bffd41d29 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -34,7 +34,7 @@ #include "llfloaterinventory.h" -#include "llagent.h" +#include "llagentcamera.h" //#include "llfirstuse.h" #include "llfloaterreg.h" #include "llinventorymodel.h" @@ -79,7 +79,7 @@ LLFloaterInventory* LLFloaterInventory::showAgentInventory() instance_num = (instance_num + 1) % S32_MAX; LLFloaterInventory* iv = NULL; - if (!gAgent.cameraMouselook()) + if (!gAgentCamera.cameraMouselook()) { iv = LLFloaterReg::showTypedInstance<LLFloaterInventory>("inventory", LLSD(instance_num)); } diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp index 85186cee6b..100cbdb217 100644 --- a/indra/newview/llfloaterlagmeter.cpp +++ b/indra/newview/llfloaterlagmeter.cpp @@ -206,7 +206,7 @@ void LLFloaterLagMeter::determineNetwork() // *FIXME: We can't blame a large ping time on anything in // particular if the frame rate is low, because a low frame - // rate is a sure recipe for crappy ping times right now until + // rate is a sure recipe for bad ping times right now until // the network handlers are de-synched from the rendering. F32 client_frame_time_ms = 1000.0f * LLViewerStats::getInstance()->mFPSStat.getMeanDuration(); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 65003d9b5c..2ff483cd34 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -91,6 +91,7 @@ static std::string MATURITY = "[MATURITY]"; // constants used in callbacks below - syntactic sugar. static const BOOL BUY_GROUP_LAND = TRUE; static const BOOL BUY_PERSONAL_LAND = FALSE; +LLPointer<LLParcelSelection> LLPanelLandGeneral::sSelectionForBuyPass = NULL; // Statics LLParcelSelectionObserver* LLFloaterLand::sObserver = NULL; @@ -975,6 +976,8 @@ void LLPanelLandGeneral::onClickBuyPass(void* data) args["PARCEL_NAME"] = parcel_name; args["TIME"] = time; + // creating pointer on selection to avoid deselection of parcel until we are done with buying pass (EXT-6464) + sSelectionForBuyPass = LLViewerParcelMgr::getInstance()->getParcelSelection(); LLNotificationsUtil::add("LandBuyPass", args, LLSD(), cbBuyPass); } @@ -1006,6 +1009,8 @@ bool LLPanelLandGeneral::cbBuyPass(const LLSD& notification, const LLSD& respons // User clicked OK LLViewerParcelMgr::getInstance()->buyPass(); } + // we are done with buying pass, additional selection is no longer needed + sSelectionForBuyPass = NULL; return false; } @@ -1612,7 +1617,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo item_params.columns.add().value(object_count_str).font(FONT).column("count"); item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date"); - self->mOwnerList->addRow(item_params); + self->mOwnerList->addNameItemRow(item_params); lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") << ") owns " << object_count << " objects." << llendl; @@ -2774,7 +2779,7 @@ void LLPanelLandAccess::onClickAddAccess() gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLPanelLandAccess::callbackAvatarCBAccess, this, _1,_2)) ); } -void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelLandAccess::callbackAvatarCBAccess(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (!names.empty() && !ids.empty()) { @@ -2819,7 +2824,7 @@ void LLPanelLandAccess::onClickAddBanned() } // static -void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelLandAccess::callbackAvatarCBBanned(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (!names.empty() && !ids.empty()) { diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index a4785e8f5b..0a743e5215 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -167,7 +167,7 @@ public: static void onClickSet(void* data); static void onClickClear(void* data); static void onClickShow(void* data); - static void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data); + static void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data); static void finalizeAvatarPick(void* data); static void callbackHighlightTransferable(S32 option, void* userdata); static void onClickStartAuction(void*); @@ -234,6 +234,11 @@ protected: LLSafeHandle<LLParcelSelection>& mParcel; + // This pointer is needed to avoid parcel deselection until buying pass is completed or canceled. + // Deselection happened because of zero references to parcel selection, which took place when + // "Buy Pass" was called from popup menu(EXT-6464) + static LLPointer<LLParcelSelection> sSelectionForBuyPass; + static LLHandle<LLFloater> sBuyPassDialogHandle; }; @@ -374,8 +379,8 @@ public: void onClickAddAccess(); void onClickAddBanned(); - void callbackAvatarCBBanned(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); - void callbackAvatarCBAccess(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackAvatarCBBanned(const std::vector<std::string>& names, const uuid_vec_t& ids); + void callbackAvatarCBAccess(const std::vector<std::string>& names, const uuid_vec_t& ids); protected: LLNameListCtrl* mListAccess; diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index 051ab585e2..5677899dd9 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -41,7 +41,7 @@ #include "llglheaders.h" // Viewer includes -#include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llnetmap.h" #include "lltracker.h" @@ -196,7 +196,7 @@ void LLFloaterMap::draw() setDirectionPos( mTextBoxSouthEast, rotation + F_PI + F_PI_BY_TWO + F_PI_BY_TWO / 2); // Note: we can't just gAgent.check cameraMouselook() because the transition states are wrong. - if( gAgent.cameraMouselook()) + if(gAgentCamera.cameraMouselook()) { setMouseOpaque(FALSE); getDragHandle()->setMouseOpaque(FALSE); @@ -215,6 +215,20 @@ void LLFloaterMap::draw() LLFloater::draw(); } +// virtual +void LLFloaterMap::onFocusReceived() +{ + setBackgroundOpaque(true); + LLPanel::onFocusReceived(); +} + +// virtual +void LLFloaterMap::onFocusLost() +{ + setBackgroundOpaque(false); + LLPanel::onFocusLost(); +} + void LLFloaterMap::reshape(S32 width, S32 height, BOOL called_from_parent) { LLFloater::reshape(width, height, called_from_parent); diff --git a/indra/newview/llfloatermap.h b/indra/newview/llfloatermap.h index 6c9138c6a7..9ff2f03180 100644 --- a/indra/newview/llfloatermap.h +++ b/indra/newview/llfloatermap.h @@ -53,6 +53,8 @@ public: /*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void draw(); + /*virtual*/ void onFocusLost(); + /*virtual*/ void onFocusReceived(); private: void handleZoom(const LLSD& userdata); diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 159ce41b79..5c343ecb22 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -169,16 +169,14 @@ void LLFloaterNameDesc::onBtnOK( ) { childDisable("ok_btn"); // don't allow inadvertent extra uploads - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). - void *nruserdata = NULL; std::string display_name = LLStringUtil::null; upload_new_resource(mFilenameAndPath, // file childGetValue("name_form").asString(), childGetValue("description_form").asString(), - 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), - display_name, callback, expected_upload_cost, nruserdata); + display_name, NULL, expected_upload_cost); closeFloater(false); } diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index ec50ed596c..71bfae316a 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -121,12 +121,12 @@ void LLFloaterOpenObject::refresh() { // this folder is coming from an object, as there is only one folder in an object, the root, // we need to collect the entire contents and handle them as a group - InventoryObjectList inventory_objects; + LLInventoryObject::object_list_t inventory_objects; object->getInventoryContents(inventory_objects); if (!inventory_objects.empty()) { - for (InventoryObjectList::iterator it = inventory_objects.begin(); + for (LLInventoryObject::object_list_t::iterator it = inventory_objects.begin(); it != inventory_objects.end(); ++it) { diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1491484ba9..e2c5ad6d02 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -107,6 +107,8 @@ #include "llpluginclassmedia.h" #include "llteleporthistorystorage.h" +#include "lllogininstance.h" // to check if logged in yet + const F32 MAX_USER_FAR_CLIP = 512.f; const F32 MIN_USER_FAR_CLIP = 64.f; @@ -182,7 +184,6 @@ void LLVoiceSetKeyDialog::onCancel(void* user_data) // if creating/destroying these is too slow, we'll need to create // a static member and update all our static callbacks -void handleNameTagOptionChanged(const LLSD& newvalue); bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response); //bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater); @@ -218,15 +219,6 @@ bool callback_clear_browser_cache(const LLSD& notification, const LLSD& response return false; } -void handleNameTagOptionChanged(const LLSD& newvalue) -{ - S32 name_tag_option = S32(newvalue); - if(name_tag_option==2) - { - gSavedSettings.setBOOL("SmallAvatarNames", TRUE); - } -} - /*bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFloaterPreference* floater) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -319,8 +311,6 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this)); sSkin = gSavedSettings.getString("SkinCurrent"); - - gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); } BOOL LLFloaterPreference::postBuild() @@ -336,8 +326,6 @@ BOOL LLFloaterPreference::postBuild() LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); - S32 show_avatar_nametag_options = gSavedSettings.getS32("AvatarNameTagMode"); - handleNameTagOptionChanged(LLSD(show_avatar_nametag_options)); std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); childSetText("cache_location", cache_location); @@ -872,6 +860,8 @@ void LLFloaterPreference::refreshEnabledState() ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders); // now turn off any features that are unavailable disableUnavailableSettings(); + + childSetEnabled ("block_list", LLLoginInstance::getInstance()->authSuccess()); } void LLFloaterPreference::disableUnavailableSettings() diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 5c0593ad29..30b654de24 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -38,12 +38,12 @@ #include "llcachename.h" #include "lldbstrings.h" #include "llfloaterreg.h" -#include "llinventory.h" #include "llagent.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llavataractions.h" +#include "llinventorydefines.h" #include "llinventoryobserver.h" #include "llinventorymodel.h" #include "lllineeditor.h" @@ -237,7 +237,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) // do not enable the UI for incomplete items. LLViewerInventoryItem* i = (LLViewerInventoryItem*)item; - BOOL is_complete = i->isComplete(); + BOOL is_complete = i->isFinished(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType()); const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); @@ -380,9 +380,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = item->getFlags(); - slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; - overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; - overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; + overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } std::string perm_string; @@ -683,7 +683,7 @@ void LLFloaterProperties::onCommitPermissions() CheckNextOwnerTransfer->get(), PERM_TRANSFER); } if(perm != item->getPermissions() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->setPermissions(perm); @@ -693,7 +693,7 @@ void LLFloaterProperties::onCommitPermissions() if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; } // If everyone permissions have changed (and this is an object) // then set the overwrite everyone permissions flag so they @@ -701,7 +701,7 @@ void LLFloaterProperties::onCommitPermissions() if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; } // If group permissions have changed (and this is an object) // then set the overwrite group permissions flag so they @@ -709,7 +709,7 @@ void LLFloaterProperties::onCommitPermissions() if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } new_item->setFlags(flags); if(mObjectID.isNull()) @@ -813,7 +813,7 @@ void LLFloaterProperties::updateSaleInfo() sale_info.setSaleType(LLSaleInfo::FS_NOT); } if(sale_info != item->getSaleInfo() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); @@ -821,7 +821,7 @@ void LLFloaterProperties::updateSaleInfo() if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = new_item->getFlags(); - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE; new_item->setFlags(flags); } diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index d54736e942..3758cbe74f 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -610,7 +610,7 @@ void LLPanelRegionGeneralInfo::onClickKick() parent_floater->addDependentFloater(child_floater); } -void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelRegionGeneralInfo::onKickCommit(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (names.empty() || ids.empty()) return; if(ids[0].notNull()) @@ -848,7 +848,7 @@ void LLPanelRegionDebugInfo::onClickChooseAvatar() } -void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelRegionDebugInfo::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (ids.empty() || names.empty()) return; mTargetAvatar = ids[0]; @@ -1531,7 +1531,7 @@ void LLPanelEstateInfo::onClickKickUser() parent_floater->addDependentFloater(child_floater); } -void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelEstateInfo::onKickUserCommit(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (names.empty() || ids.empty()) return; @@ -1616,7 +1616,6 @@ bool LLPanelEstateInfo::isLindenEstate() return (estate_id <= ESTATE_LAST_LINDEN); } -typedef std::vector<LLUUID> AgentOrGroupIDsVector; struct LLEstateAccessChangeInfo { LLEstateAccessChangeInfo(const LLSD& sd) @@ -1637,7 +1636,7 @@ struct LLEstateAccessChangeInfo LLSD sd; sd["name"] = mDialogName; sd["operation"] = (S32)mOperationFlag; - for (AgentOrGroupIDsVector::const_iterator it = mAgentOrGroupIDs.begin(); + for (uuid_vec_t::const_iterator it = mAgentOrGroupIDs.begin(); it != mAgentOrGroupIDs.end(); ++it) { @@ -1648,7 +1647,7 @@ struct LLEstateAccessChangeInfo U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc. std::string mDialogName; - AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change + uuid_vec_t mAgentOrGroupIDs; // List of agent IDs to apply to this change }; // Special case callback for groups, since it has different callback format than names @@ -1716,7 +1715,7 @@ bool LLPanelEstateInfo::accessAddCore2(const LLSD& notification, const LLSD& res } // static -void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data) +void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data) { LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data; if (!change_info) return; diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index 8d315bdb78..482ebb3303 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -168,7 +168,7 @@ public: protected: virtual BOOL sendUpdate(); void onClickKick(); - void onKickCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void onKickCommit(const std::vector<std::string>& names, const uuid_vec_t& ids); static void onClickKickAll(void* userdata); bool onKickAllCommit(const LLSD& notification, const LLSD& response); static void onClickMessage(void* userdata); @@ -193,7 +193,7 @@ protected: virtual BOOL sendUpdate(); void onClickChooseAvatar(); - void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids); static void onClickReturn(void *); bool callbackReturn(const LLSD& notification, const LLSD& response); static void onClickTopColliders(void*); @@ -284,7 +284,7 @@ public: // Core methods for all above add/remove button clicks static void accessAddCore(U32 operation_flag, const std::string& dialog_name); static bool accessAddCore2(const LLSD& notification, const LLSD& response); - static void accessAddCore3(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data); + static void accessAddCore3(const std::vector<std::string>& names, const uuid_vec_t& ids, void* data); static void accessRemoveCore(U32 operation_flag, const std::string& dialog_name, const std::string& list_ctrl_name); static bool accessRemoveCore2(const LLSD& notification, const LLSD& response); @@ -296,7 +296,7 @@ public: // Send the actual EstateOwnerRequest "estateaccessdelta" message static void sendEstateAccessDelta(U32 flags, const LLUUID& agent_id); - void onKickUserCommit(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void onKickUserCommit(const std::vector<std::string>& names, const uuid_vec_t& ids); static void onClickMessageEstate(void* data); bool onMessageCommit(const LLSD& notification, const LLSD& response); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 42a7eeff26..b42b34835d 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -308,7 +308,7 @@ void LLFloaterReporter::onClickSelectAbuser() gFloaterView->getParentFloater(this)->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterReporter::callbackAvatarID, this, _1, _2), FALSE, TRUE )); } -void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (ids.empty() || names.empty()) return; diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index 7c6473f975..23784b7650 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -123,7 +123,7 @@ private: void setPosBox(const LLVector3d &pos); void enableControls(BOOL own_avatar); void getObjectInfo(const LLUUID& object_id); - void callbackAvatarID(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids); void setFromAvatar(const LLUUID& avatar_id, const std::string& avatar_name = LLStringUtil::null); private: diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp index eeea71cc4c..d6732a9d5c 100644 --- a/indra/newview/llfloaterscriptdebug.cpp +++ b/indra/newview/llfloaterscriptdebug.cpp @@ -104,6 +104,10 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: LLViewerObject* objectp = gObjectList.findObject(source_id); std::string floater_label; + // Handle /me messages. + std::string prefix = utf8mesg.substr(0, 4); + std::string message = (prefix == "/me " || prefix == "/me'") ? user_name + utf8mesg.substr(3) : utf8mesg; + if (objectp) { objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI)); @@ -121,14 +125,14 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std: LLFloaterScriptDebugOutput* floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", LLUUID::null); if (floaterp) { - floaterp->addLine(utf8mesg, user_name, color); + floaterp->addLine(message, user_name, color); } // add to specific script instance floater floaterp = LLFloaterReg::getTypedInstance<LLFloaterScriptDebugOutput>("script_debug_output", source_id); if (floaterp) { - floaterp->addLine(utf8mesg, floater_label, color); + floaterp->addLine(message, floater_label, color); } } diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index daba3d8460..4792d761d8 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -644,7 +644,7 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) std::string msg_parcels = LLTrans::getString("ScriptLimitsParcelsOwned", args_parcels); childSetValue("parcels_listed", LLSD(msg_parcels)); - std::vector<LLUUID> names_requested; + uuid_vec_t names_requested; // This makes the assumption that all objects will have the same set // of attributes, ie they will all have, or none will have locations diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index eae6121e79..980b456497 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -96,7 +96,7 @@ private: static void doShowObjects(void *userdata); static bool callbackHighlightTransferable(const LLSD& notification, const LLSD& response); - void callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids); public: virtual BOOL postBuild(); @@ -391,7 +391,7 @@ void LLFloaterSellLandUI::doSelectAgent() addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, this, _1, _2), FALSE, TRUE)); } -void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const uuid_vec_t& ids) { LLParcel* parcel = mParcelSelection->getParcel(); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index a0031f0193..e994a18d9b 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -38,28 +38,34 @@ // Viewer includes #include "llagent.h" -#include "llcallbacklist.h" -#include "llcriticaldamp.h" -#include "llui.h" -#include "llfocusmgr.h" +#include "llagentcamera.h" +#include "llagentui.h" +#include "llavatarpropertiesprocessor.h" +#include "llbottomtray.h" #include "llbutton.h" +#include "llcallbacklist.h" +#include "llcheckboxctrl.h" #include "llcombobox.h" +#include "llcriticaldamp.h" #include "lleconomy.h" +#include "llfloaterpostcard.h" +#include "llfocusmgr.h" +#include "lllandmarkactions.h" +#include "llradiogroup.h" #include "llsliderctrl.h" +#include "llslurl.h" #include "llspinctrl.h" -#include "llviewercontrol.h" +#include "lltoolfocus.h" +#include "lltoolmgr.h" +#include "llui.h" #include "lluictrlfactory.h" -#include "llviewerstats.h" #include "llviewercamera.h" -#include "llviewerwindow.h" +#include "llviewercontrol.h" #include "llviewermenufile.h" // upload_new_resource() -#include "llfloaterpostcard.h" -#include "llcheckboxctrl.h" -#include "llradiogroup.h" -#include "lltoolfocus.h" -#include "lltoolmgr.h" +#include "llviewerstats.h" +#include "llviewerwindow.h" +#include "llweb.h" #include "llworld.h" -#include "llagentui.h" // Linden library includes #include "llfontgl.h" @@ -113,6 +119,7 @@ public: enum ESnapshotType { SNAPSHOT_POSTCARD, + SNAPSHOT_WEB, SNAPSHOT_TEXTURE, SNAPSHOT_LOCAL }; @@ -161,8 +168,11 @@ public: void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); LLFloaterPostcard* savePostcard(); - void saveTexture(); + void confirmSavingTexture(bool set_as_profile_pic = false); + bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic); + void saveTexture(bool set_as_profile_pic = false); BOOL saveLocal(); + void saveWeb(std::string url); BOOL setThumbnailImageSize() ; void generateThumbnailImage(BOOL force_update = FALSE) ; @@ -171,6 +181,9 @@ public: // Returns TRUE when snapshot generated, FALSE otherwise. static BOOL onIdle( void* snapshot_preview ); + + // callback for region name resolve + void regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z); private: LLColor4 mColor; @@ -292,7 +305,7 @@ F32 LLSnapshotLivePreview::getAspect() F32 image_aspect_ratio = ((F32)mWidth[mCurImageIndex]) / ((F32)mHeight[mCurImageIndex]); F32 window_aspect_ratio = ((F32)getRect().getWidth()) / ((F32)getRect().getHeight()); - if (!mKeepAspectRatio)//gSavedSettings.getBOOL("KeepAspectForSnapshot")) + if (!mKeepAspectRatio) { return image_aspect_ratio; } @@ -625,20 +638,20 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() F32 window_aspect_ratio = ((F32)window_width) / ((F32)window_height); // UI size for thumbnail - S32 max_width = LLFloaterSnapshot::getUIWinWidth() - 20; - S32 max_height = 90; + LLFloater* floater = LLFloaterReg::getInstance("snapshot"); + mThumbnailWidth = floater->getChild<LLView>("thumbnail_placeholder")->getRect().getWidth(); + mThumbnailHeight = floater->getChild<LLView>("thumbnail_placeholder")->getRect().getHeight(); + - if (window_aspect_ratio > (F32)max_width / max_height) + if (window_aspect_ratio > (F32)mThumbnailWidth / mThumbnailHeight) { // image too wide, shrink to width - mThumbnailWidth = max_width; - mThumbnailHeight = llround((F32)max_width / window_aspect_ratio); + mThumbnailHeight = llround((F32)mThumbnailWidth / window_aspect_ratio); } else { // image too tall, shrink to height - mThumbnailHeight = max_height; - mThumbnailWidth = llround((F32)max_height * window_aspect_ratio); + mThumbnailWidth = llround((F32)mThumbnailHeight * window_aspect_ratio); } if(mThumbnailWidth > window_width || mThumbnailHeight > window_height) @@ -824,10 +837,21 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) { // delete any existing image previewp->mFormattedImage = NULL; + // now create the new one of the appropriate format. - // note: postcards hardcoded to use jpeg always. - LLFloaterSnapshot::ESnapshotFormat format = previewp->getSnapshotType() == SNAPSHOT_POSTCARD - ? LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG : previewp->getSnapshotFormat(); + // note: postcards and web hardcoded to use jpeg always. + LLFloaterSnapshot::ESnapshotFormat format; + + if (previewp->getSnapshotType() == SNAPSHOT_POSTCARD || + previewp->getSnapshotType() == SNAPSHOT_WEB) + { + format = LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG; + } + else + { + format = previewp->getSnapshotFormat(); + } + switch(format) { case LLFloaterSnapshot::SNAPSHOT_FORMAT_PNG: @@ -892,7 +916,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->mSnapshotUpToDate = TRUE; previewp->generateThumbnailImage(TRUE) ; - previewp->mPosTakenGlobal = gAgent.getCameraPositionGlobal(); + previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame } } @@ -954,13 +978,41 @@ LLFloaterPostcard* LLSnapshotLivePreview::savePostcard() return floater; } -void LLSnapshotLivePreview::saveTexture() +// Callback for asset upload +void profile_pic_upload_callback(const LLUUID& uuid) +{ + LLFloaterSnapshot* floater = LLFloaterReg::getTypedInstance<LLFloaterSnapshot>("snapshot"); + floater->setAsProfilePic(uuid); +} + +void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic) +{ + LLSD args; + args["AMOUNT"] = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); + LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), + boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic)); +} + +bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + saveTexture(set_as_profile_pic); + } + + return false; +} + + +void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic) { // gen a new uuid for this asset LLTransactionID tid; tid.generate(); LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - + LLPointer<LLImageJ2C> formatted = new LLImageJ2C; LLPointer<LLImageRaw> scaled = new LLImageRaw(mPreviewImage->getData(), mPreviewImage->getWidth(), @@ -971,26 +1023,30 @@ void LLSnapshotLivePreview::saveTexture() if (formatted->encode(scaled, 0.0f)) { + boost::function<void(const LLUUID& uuid)> callback = NULL; + + if (set_as_profile_pic) + { + callback = profile_pic_upload_callback; + } + LLVFile::writeFile(formatted->getData(), formatted->getDataSize(), gVFS, new_asset_id, LLAssetType::AT_TEXTURE); std::string pos_string; LLAgentUI::buildLocationString(pos_string, LLAgentUI::LOCATION_FORMAT_FULL); std::string who_took_it; LLAgentUI::buildFullname(who_took_it); - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - void *userdata = NULL; upload_new_resource(tid, // tid LLAssetType::AT_TEXTURE, "Snapshot : " + pos_string, "Taken by " + who_took_it + " at " + pos_string, - 0, LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload PERM_NONE, // that ignores the user's premissions preferences and continues to PERM_NONE, // always use these fairly permissive hard-coded initial perms. - MG "Snapshot : " + pos_string, - callback, expected_upload_cost, userdata); + callback, expected_upload_cost); gViewerWindow->playSnapshotAnimAndSound(); } else @@ -1020,6 +1076,81 @@ BOOL LLSnapshotLivePreview::saveLocal() return success; } + +class LLSendWebResponder : public LLHTTPClient::Responder +{ +public: + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + LLNotificationsUtil::add("ShareToWebFailed"); + } + + virtual void result(const LLSD& content) + { + std::string response_url = content["response_url"].asString(); + + if (!response_url.empty()) + { + LLWeb::loadURLExternal(response_url); + } + else + { + LLNotificationsUtil::add("ShareToWebFailed"); + } + } + +}; + +void LLSnapshotLivePreview::saveWeb(std::string url) +{ + if (url.empty()) + { + llwarns << "No share to web url" << llendl; + return; + } + + LLImageJPEG* jpg = dynamic_cast<LLImageJPEG*>(mFormattedImage.get()); + if(!jpg) + { + llwarns << "Formatted image not a JPEG" << llendl; + return; + } + +/* figure out if there's a better way to serialize */ + LLSD body; + std::vector<U8> binary_image; + U8* data = jpg->getData(); + for (int i = 0; i < jpg->getDataSize(); i++) + { + binary_image.push_back(data[i]); + } + + body["image"] = binary_image; + + body["description"] = getChild<LLLineEditor>("description")->getText(); + + std::string name; + LLAgentUI::buildFullname(name); + + body["avatar_name"] = name; + + LLLandmarkActions::getRegionNameAndCoordsFromPosGlobal(gAgentCamera.getCameraPositionGlobal(), + boost::bind(&LLSnapshotLivePreview::regionNameCallback, this, url, body, _1, _2, _3, _4)); + + gViewerWindow->playSnapshotAnimAndSound(); +} + + +void LLSnapshotLivePreview::regionNameCallback(std::string url, LLSD body, const std::string& name, S32 x, S32 y, S32 z) +{ + body["slurl"] = LLSLURL::buildSLURL(name, x, y, z); + + LLHTTPClient::post(url, body, + new LLSendWebResponder()); +} + ///---------------------------------------------------------------------------- /// Class LLFloaterSnapshot::Impl ///---------------------------------------------------------------------------- @@ -1039,9 +1170,6 @@ public: mAvatarPauseHandles.clear(); } - static void onClickDiscard(void* data); - static void onClickKeep(void* data); - static void onCommitSave(LLUICtrl* ctrl, void* data); static void onClickNewSnapshot(void* data); static void onClickAutoSnap(LLUICtrl *ctrl, void* data); //static void onClickAdvanceSnap(LLUICtrl *ctrl, void* data); @@ -1056,9 +1184,11 @@ public: static void updateResolution(LLUICtrl* ctrl, void* data, BOOL do_update = TRUE); static void onCommitFreezeFrame(LLUICtrl* ctrl, void* data); static void onCommitLayerTypes(LLUICtrl* ctrl, void*data); - static void onCommitSnapshotType(LLUICtrl* ctrl, void* data); static void onCommitSnapshotFormat(LLUICtrl* ctrl, void* data); static void onCommitCustomResolution(LLUICtrl *ctrl, void* data); + static void onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type); + static void onCommitProfilePic(LLFloaterSnapshot* view); + static void onToggleAdvanced(LLUICtrl *ctrl, void* data); static void resetSnapshotSizeOnUI(LLFloaterSnapshot *view, S32 width, S32 height) ; static BOOL checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value); @@ -1066,10 +1196,8 @@ public: static void setResolution(LLFloaterSnapshot* floater, const std::string& comboname); static void updateControls(LLFloaterSnapshot* floater); static void updateLayout(LLFloaterSnapshot* floater); - static void updateResolutionTextEntry(LLFloaterSnapshot* floater); private: - static LLSnapshotLivePreview::ESnapshotType getTypeIndex(LLFloaterSnapshot* floater); static ESnapshotFormat getFormatIndex(LLFloaterSnapshot* floater); static LLViewerWindow::ESnapshotType getLayerType(LLFloaterSnapshot* floater); static void comboSetCustom(LLFloaterSnapshot *floater, const std::string& comboname); @@ -1092,22 +1220,6 @@ LLSnapshotLivePreview* LLFloaterSnapshot::Impl::getPreviewView(LLFloaterSnapshot } // static -LLSnapshotLivePreview::ESnapshotType LLFloaterSnapshot::Impl::getTypeIndex(LLFloaterSnapshot* floater) -{ - LLSnapshotLivePreview::ESnapshotType index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; - LLSD value = floater->childGetValue("snapshot_type_radio"); - const std::string id = value.asString(); - if (id == "postcard") - index = LLSnapshotLivePreview::SNAPSHOT_POSTCARD; - else if (id == "texture") - index = LLSnapshotLivePreview::SNAPSHOT_TEXTURE; - else if (id == "local") - index = LLSnapshotLivePreview::SNAPSHOT_LOCAL; - return index; -} - - -// static LLFloaterSnapshot::ESnapshotFormat LLFloaterSnapshot::Impl::getFormatIndex(LLFloaterSnapshot* floater) { ESnapshotFormat index = SNAPSHOT_FORMAT_PNG; @@ -1155,20 +1267,12 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) { LLSnapshotLivePreview* previewp = getPreviewView(floaterp); - S32 delta_height = gSavedSettings.getBOOL("AdvanceSnapshot") ? 0 : floaterp->getUIWinHeightShort() - floaterp->getUIWinHeightLong() ; - if(!gSavedSettings.getBOOL("AdvanceSnapshot")) //set to original window resolution { previewp->mKeepAspectRatio = TRUE; - floaterp->getChild<LLComboBox>("postcard_size_combo")->setCurrentByIndex(0); - gSavedSettings.setS32("SnapshotPostcardLastResolution", 0); - - floaterp->getChild<LLComboBox>("texture_size_combo")->setCurrentByIndex(0); - gSavedSettings.setS32("SnapshotTextureLastResolution", 0); - - floaterp->getChild<LLComboBox>("local_size_combo")->setCurrentByIndex(0); - gSavedSettings.setS32("SnapshotLocalLastResolution", 0); + floaterp->getChild<LLComboBox>("snapshot_size_combo")->setCurrentByIndex(0); + gSavedSettings.setS32("SnapshotLastResolution", 0); LLSnapshotLivePreview* previewp = getPreviewView(floaterp); previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); @@ -1181,9 +1285,6 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // stop all mouse events at fullscreen preview layer floaterp->getParent()->setMouseOpaque(TRUE); - // shrink to smaller layout - floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height); - // can see and interact with fullscreen preview now if (previewp) { @@ -1212,7 +1313,6 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) else // turning off freeze frame mode { floaterp->getParent()->setMouseOpaque(FALSE); - floaterp->reshape(floaterp->getRect().getWidth(), floaterp->getUIWinHeightLong() + delta_height); if (previewp) { previewp->setVisible(FALSE); @@ -1241,127 +1341,27 @@ void LLFloaterSnapshot::Impl::updateLayout(LLFloaterSnapshot* floaterp) // static void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) { - LLRadioGroup* snapshot_type_radio = floater->getChild<LLRadioGroup>("snapshot_type_radio"); - snapshot_type_radio->setSelectedIndex(gSavedSettings.getS32("LastSnapshotType")); - LLSnapshotLivePreview::ESnapshotType shot_type = getTypeIndex(floater); - ESnapshotFormat shot_format = (ESnapshotFormat)gSavedSettings.getS32("SnapshotFormat"); //getFormatIndex(floater); LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); - LLViewerWindow::ESnapshotType layer_type = getLayerType(floater); - - floater->childSetVisible("postcard_size_combo", FALSE); - floater->childSetVisible("texture_size_combo", FALSE); - floater->childSetVisible("local_size_combo", FALSE); - - floater->getChild<LLComboBox>("postcard_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotPostcardLastResolution")); - floater->getChild<LLComboBox>("texture_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotTextureLastResolution")); - floater->getChild<LLComboBox>("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution")); - floater->getChild<LLComboBox>("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat")); - - floater->childSetVisible("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE); - floater->childSetVisible("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD); - floater->childSetVisible("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); - floater->childSetEnabled("keep_aspect_check", shot_type != LLSnapshotLivePreview::SNAPSHOT_TEXTURE && !floater->impl.mAspectRatioCheckOff); - floater->childSetEnabled("layer_types", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); - - BOOL is_advance = gSavedSettings.getBOOL("AdvanceSnapshot"); - BOOL is_local = shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL; - BOOL show_slider = - shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD - || (is_local && shot_format == LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); - - floater->childSetVisible("more_btn", !is_advance); // the only item hidden in advanced mode - floater->childSetVisible("less_btn", is_advance); - floater->childSetVisible("type_label2", is_advance); - floater->childSetVisible("format_label", is_advance && is_local); - floater->childSetVisible("local_format_combo", is_advance && is_local); - floater->childSetVisible("layer_types", is_advance); - floater->childSetVisible("layer_type_label", is_advance); - floater->childSetVisible("snapshot_width", is_advance); - floater->childSetVisible("snapshot_height", is_advance); - floater->childSetVisible("keep_aspect_check", is_advance); - floater->childSetVisible("ui_check", is_advance); - floater->childSetVisible("hud_check", is_advance); - floater->childSetVisible("keep_open_check", is_advance); - floater->childSetVisible("freeze_frame_check", is_advance); - floater->childSetVisible("auto_snapshot_check", is_advance); - floater->childSetVisible("image_quality_slider", is_advance && show_slider); - LLSnapshotLivePreview* previewp = getPreviewView(floater); - BOOL got_bytes = previewp && previewp->getDataSize() > 0; - BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); - - floater->childSetEnabled("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD && got_snap && previewp->getDataSize() <= MAX_POSTCARD_DATASIZE); - floater->childSetEnabled("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE && got_snap); - floater->childSetEnabled("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL && got_snap); - - LLLocale locale(LLLocale::USER_LOCALE); - std::string bytes_string; - if (got_snap) - { - LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); - } - S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - floater->childSetLabelArg("texture", "[AMOUNT]", llformat("%d",upload_cost)); - floater->childSetLabelArg("upload_btn", "[AMOUNT]", llformat("%d",upload_cost)); - floater->childSetTextArg("file_size_label", "[SIZE]", got_snap ? bytes_string : floater->getString("unknown")); - floater->childSetColor("file_size_label", - shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD - && got_bytes - && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); - - switch(shot_type) - { - case LLSnapshotLivePreview::SNAPSHOT_POSTCARD: - layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; - floater->childSetValue("layer_types", "colors"); - if(is_advance) - { - setResolution(floater, "postcard_size_combo"); - } - break; - case LLSnapshotLivePreview::SNAPSHOT_TEXTURE: - layer_type = LLViewerWindow::SNAPSHOT_TYPE_COLOR; - floater->childSetValue("layer_types", "colors"); - if(is_advance) - { - setResolution(floater, "texture_size_combo"); - } - break; - case LLSnapshotLivePreview::SNAPSHOT_LOCAL: - if(is_advance) - { - setResolution(floater, "local_size_combo"); - } - break; - default: - break; + if (NULL == previewp) + { + return; } - updateResolutionTextEntry(floater); + // Disable buttons until Snapshot is ready. EXT-6534 + BOOL got_snap = previewp->getSnapshotUpToDate(); - if (previewp) - { - previewp->setSnapshotType(shot_type); - previewp->setSnapshotFormat(shot_format); - previewp->setSnapshotBufferType(layer_type); - } -} + // process Main buttons + floater->childSetEnabled("share", got_snap); + floater->childSetEnabled("save", got_snap); + floater->childSetEnabled("set_profile_pic", got_snap); -// static -void LLFloaterSnapshot::Impl::updateResolutionTextEntry(LLFloaterSnapshot* floater) -{ - LLSpinCtrl* width_spinner = floater->getChild<LLSpinCtrl>("snapshot_width"); - LLSpinCtrl* height_spinner = floater->getChild<LLSpinCtrl>("snapshot_height"); + // process Share actions buttons + floater->childSetEnabled("share_to_web", got_snap); + floater->childSetEnabled("share_to_email", got_snap); - if(getTypeIndex(floater) == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) - { - width_spinner->setAllowEdit(FALSE); - height_spinner->setAllowEdit(FALSE); - } - else - { - width_spinner->setAllowEdit(TRUE); - height_spinner->setAllowEdit(TRUE); - } + // process Save actions buttons + floater->childSetEnabled("save_to_inventory", got_snap); + floater->childSetEnabled("save_to_computer", got_snap); } // static @@ -1375,70 +1375,6 @@ void LLFloaterSnapshot::Impl::checkAutoSnapshot(LLSnapshotLivePreview* previewp, } // static -void LLFloaterSnapshot::Impl::onClickDiscard(void* data) -{ - LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; - - if (view) - { - view->closeFloater(); - } -} - - -// static -void LLFloaterSnapshot::Impl::onCommitSave(LLUICtrl* ctrl, void* data) -{ - if (ctrl->getValue().asString() == "save as") - { - gViewerWindow->resetSnapshotLoc(); - } - onClickKeep(data); -} - -// static -void LLFloaterSnapshot::Impl::onClickKeep(void* data) -{ - LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; - LLSnapshotLivePreview* previewp = getPreviewView(view); - - if (previewp) - { - if (previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) - { - LLFloaterPostcard* floater = previewp->savePostcard(); - // if still in snapshot mode, put postcard floater in snapshot floaterview - // and link it to snapshot floater - if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep")) - { - gFloaterView->removeChild(floater); - gSnapshotFloaterView->addChild(floater); - view->addDependentFloater(floater, FALSE); - } - } - else if (previewp->getSnapshotType() == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) - { - previewp->saveTexture(); - } - else - { - previewp->saveLocal(); - } - - if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) - { - view->closeFloater(); - } - else - { - checkAutoSnapshot(previewp); - } - - updateControls(view); - } -} - -// static void LLFloaterSnapshot::Impl::onClickNewSnapshot(void* data) { LLSnapshotLivePreview* previewp = getPreviewView((LLFloaterSnapshot *)data); @@ -1674,10 +1610,8 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, BOOL } // save off all selected resolution values - gSavedSettings.setS32("SnapshotPostcardLastResolution", view->getChild<LLComboBox>("postcard_size_combo")->getCurrentIndex()); - gSavedSettings.setS32("SnapshotTextureLastResolution", view->getChild<LLComboBox>("texture_size_combo")->getCurrentIndex()); - gSavedSettings.setS32("SnapshotLocalLastResolution", view->getChild<LLComboBox>("local_size_combo")->getCurrentIndex()); - + gSavedSettings.setS32("SnapshotLastResolution", view->getChild<LLComboBox>("snapshot_size_combo")->getCurrentIndex()); + std::string sdstring = combobox->getSelectedValue(); LLSD sdres; std::stringstream sstream(sdstring); @@ -1757,17 +1691,130 @@ void LLFloaterSnapshot::Impl::onCommitLayerTypes(LLUICtrl* ctrl, void*data) } //static -void LLFloaterSnapshot::Impl::onCommitSnapshotType(LLUICtrl* ctrl, void* data) +void LLFloaterSnapshot::Impl::onToggleAdvanced(LLUICtrl* ctrl, void* data) { - LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; - if (view) + LLFloaterSnapshot *view = (LLFloaterSnapshot *)data; + + LLPanel* advanced_panel = view->getChild<LLPanel>("snapshot_advanced"); + + if (advanced_panel->getVisible()) { - gSavedSettings.setS32("LastSnapshotType", getTypeIndex(view)); - getPreviewView(view)->updateSnapshot(TRUE); - updateControls(view); + advanced_panel->setVisible(false); + + // shrink floater back to original size + view->reshape(view->getRect().getWidth() - advanced_panel->getRect().getWidth(), view->getRect().getHeight()); + + view->getChild<LLButton>("hide_advanced")->setVisible(false); + view->getChild<LLButton>("show_advanced")->setVisible(true); + } + else + { + advanced_panel->setVisible(true); + // stretch the floater so it can accommodate the advanced panel + view->reshape(view->getRect().getWidth() + advanced_panel->getRect().getWidth(), view->getRect().getHeight()); + + view->getChild<LLButton>("hide_advanced")->setVisible(true); + view->getChild<LLButton>("show_advanced")->setVisible(false); } } +// This object represents a pending request for avatar properties information +class LLAvatarDataRequest : public LLAvatarPropertiesObserver +{ +public: + LLAvatarDataRequest(const LLUUID& avatar_id, const LLUUID& image_id, LLFloaterSnapshot* floater) + : mAvatarID(avatar_id), + mImageID(image_id), + mSnapshotFloater(floater) + + { + } + + ~LLAvatarDataRequest() + { + // remove ourselves as an observer + LLAvatarPropertiesProcessor::getInstance()-> + removeObserver(mAvatarID, this); + } + + void processProperties(void* data, EAvatarProcessorType type) + { + // route the data to the inspector + if (data + && type == APT_PROPERTIES) + { + + LLAvatarData* avatar_data = static_cast<LLAvatarData*>(data); + + LLAvatarData new_data(*avatar_data); + new_data.image_id = mImageID; + + LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesUpdate(&new_data); + + delete this; + } + } + + // Store avatar ID so we can un-register the observer on destruction + LLUUID mAvatarID; + LLUUID mImageID; + LLFloaterSnapshot* mSnapshotFloater; +}; + +void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view) +{ + //first save to harddrive + LLSnapshotLivePreview* previewp = getPreviewView(view); + + if(previewp) + { + previewp->confirmSavingTexture(true); + } +} + +void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapshotLivePreview::ESnapshotType type) +{ + LLSnapshotLivePreview* previewp = getPreviewView(view); + + if (previewp) + { + previewp->setSnapshotType(type); + + if (type == LLSnapshotLivePreview::SNAPSHOT_WEB) + { + previewp->saveWeb(view->getString("share_to_web_url")); + } + else if (type == LLSnapshotLivePreview::SNAPSHOT_LOCAL) + { + previewp->saveLocal(); + } + else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) + { + previewp->confirmSavingTexture(); + } + else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) + { + LLFloaterPostcard* floater = previewp->savePostcard(); + // if still in snapshot mode, put postcard floater in snapshot floaterview + // and link it to snapshot floater + if (floater && !gSavedSettings.getBOOL("CloseSnapshotOnKeep")) + { + gFloaterView->removeChild(floater); + gSnapshotFloaterView->addChild(floater); + view->addDependentFloater(floater, FALSE); + } + } + + if (gSavedSettings.getBOOL("CloseSnapshotOnKeep")) + { + view->closeFloater(); + } + else + { + checkAutoSnapshot(previewp); + } + } +} //static void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data) @@ -1781,8 +1828,6 @@ void LLFloaterSnapshot::Impl::onCommitSnapshotFormat(LLUICtrl* ctrl, void* data) } } - - // Sets the named size combo to "custom" mode. // static void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const std::string& comboname) @@ -1791,24 +1836,11 @@ void LLFloaterSnapshot::Impl::comboSetCustom(LLFloaterSnapshot* floater, const s combo->setCurrentByIndex(combo->getItemCount() - 1); // "custom" is always the last index - if(comboname == "postcard_size_combo") - { - gSavedSettings.setS32("SnapshotPostcardLastResolution", combo->getCurrentIndex()); - } - else if(comboname == "texture_size_combo") - { - gSavedSettings.setS32("SnapshotTextureLastResolution", combo->getCurrentIndex()); - } - else if(comboname == "local_size_combo") - { - gSavedSettings.setS32("SnapshotLocalLastResolution", combo->getCurrentIndex()); - } + gSavedSettings.setS32("SnapshotLastResolution", combo->getCurrentIndex()); checkAspectRatio(floater, -1); // -1 means custom } - - //static BOOL LLFloaterSnapshot::Impl::checkImageSize(LLSnapshotLivePreview* previewp, S32& width, S32& height, BOOL isWidthChanged, S32 max_value) { @@ -1949,9 +1981,7 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat previewp->setSize(w,h); checkAutoSnapshot(previewp, FALSE); previewp->updateSnapshot(FALSE, TRUE); - comboSetCustom(view, "postcard_size_combo"); - comboSetCustom(view, "texture_size_combo"); - comboSetCustom(view, "local_size_combo"); + comboSetCustom(view, "snapshot_size_combo"); } } @@ -1968,7 +1998,7 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat // Default constructor LLFloaterSnapshot::LLFloaterSnapshot(const LLSD& key) - : LLFloater(key), + : LLTransientDockableFloater(NULL, true, key), impl (*(new Impl)) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_snapshot.xml", FALSE); @@ -1993,7 +2023,20 @@ LLFloaterSnapshot::~LLFloaterSnapshot() BOOL LLFloaterSnapshot::postBuild() { - childSetCommitCallback("snapshot_type_radio", Impl::onCommitSnapshotType, this); + + getChild<LLButton>("share")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SHARE)); + getChild<LLButton>("save")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_SAVE)); + getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterSnapshot::updateButtons, this, SNAPSHOT_MAIN)); + + getChild<LLButton>("share_to_web")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_WEB)); + getChild<LLButton>("share_to_email")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_POSTCARD)); + getChild<LLButton>("save_to_inventory")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_TEXTURE)); + getChild<LLButton>("save_to_computer")->setCommitCallback(boost::bind(&Impl::onCommitSnapshot, this, LLSnapshotLivePreview::SNAPSHOT_LOCAL)); + getChild<LLButton>("set_profile_pic")->setCommitCallback(boost::bind(&Impl::onCommitProfilePic, this)); + + childSetCommitCallback("show_advanced", Impl::onToggleAdvanced, this); + childSetCommitCallback("hide_advanced", Impl::onToggleAdvanced, this); + childSetCommitCallback("local_format_combo", Impl::onCommitSnapshotFormat, this); childSetAction("new_snapshot_btn", Impl::onClickNewSnapshot, this); @@ -2001,11 +2044,6 @@ BOOL LLFloaterSnapshot::postBuild() childSetAction("more_btn", Impl::onClickMore, this); childSetAction("less_btn", Impl::onClickLess, this); - childSetAction("upload_btn", Impl::onClickKeep, this); - childSetAction("send_btn", Impl::onClickKeep, this); - childSetCommitCallback("save_btn", Impl::onCommitSave, this); - childSetAction("discard_btn", Impl::onClickDiscard, this); - childSetCommitCallback("image_quality_slider", Impl::onCommitQuality, this); childSetValue("image_quality_slider", gSavedSettings.getS32("SnapshotQuality")); @@ -2026,7 +2064,6 @@ BOOL LLFloaterSnapshot::postBuild() childSetCommitCallback("layer_types", Impl::onCommitLayerTypes, this); childSetValue("layer_types", "colors"); - childSetEnabled("layer_types", FALSE); childSetValue("snapshot_width", gSavedSettings.getS32(lastSnapshotWidthName())); childSetValue("snapshot_height", gSavedSettings.getS32(lastSnapshotHeightName())); @@ -2037,9 +2074,7 @@ BOOL LLFloaterSnapshot::postBuild() childSetValue("auto_snapshot_check", gSavedSettings.getBOOL("AutoSnapshot")); childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this); - childSetCommitCallback("postcard_size_combo", Impl::onCommitResolution, this); - childSetCommitCallback("texture_size_combo", Impl::onCommitResolution, this); - childSetCommitCallback("local_size_combo", Impl::onCommitResolution, this); + childSetCommitCallback("snapshot_size_combo", Impl::onCommitResolution, this); // create preview window LLRect full_screen_rect = getRootView()->getRect(); @@ -2060,8 +2095,14 @@ BOOL LLFloaterSnapshot::postBuild() impl.mPreviewHandle = previewp->getHandle(); impl.updateControls(this); impl.updateLayout(this); + + //save off the refresh button's rectangle so we can apply offsets with thumbnail resize + mRefreshBtnRect = getChild<LLButton>("new_snapshot_btn")->getRect(); + + // make sure we share/hide the general buttons + updateButtons(SNAPSHOT_MAIN); - return TRUE; + return LLDockableFloater::postBuild(); } void LLFloaterSnapshot::draw() @@ -2074,15 +2115,19 @@ void LLFloaterSnapshot::draw() return; } - LLFloater::draw(); + LLDockableFloater::draw(); + + LLButton* refresh_btn = getChild<LLButton>("new_snapshot_btn"); + // revert the refresh button to original intended position + LLRect refresh_rect = mRefreshBtnRect; if (previewp) { if(previewp->getThumbnailImage()) { - LLRect thumbnail_rect = getChild<LLUICtrl>("thumbnail_placeholder")->getRect(); + LLRect thumbnail_rect = getChild<LLView>("thumbnail_placeholder")->getRect(); - S32 offset_x = (getRect().getWidth() - previewp->getThumbnailWidth()) / 2 ; + S32 offset_x = (thumbnail_rect.getWidth() - previewp->getThumbnailWidth()) / 2 + thumbnail_rect.mLeft; S32 offset_y = thumbnail_rect.mBottom + (thumbnail_rect.getHeight() - previewp->getThumbnailHeight()) / 2 ; glMatrixMode(GL_MODELVIEW); @@ -2091,8 +2136,14 @@ void LLFloaterSnapshot::draw() previewp->getThumbnailImage(), LLColor4::white); previewp->drawPreviewRect(offset_x, offset_y) ; + + refresh_rect.translate(offset_x - thumbnail_rect.mLeft, offset_y - thumbnail_rect.mBottom); } } + + refresh_btn->setRect(refresh_rect); + drawChild(refresh_btn); + } void LLFloaterSnapshot::onOpen(const LLSD& key) @@ -2106,6 +2157,12 @@ void LLFloaterSnapshot::onOpen(const LLSD& key) gSnapshotFloaterView->setEnabled(TRUE); gSnapshotFloaterView->setVisible(TRUE); gSnapshotFloaterView->adjustToFitScreen(this, FALSE); + + LLButton *snapshots = LLBottomTray::getInstance()->getChild<LLButton>("snapshots"); + + setDockControl(new LLDockControl( + snapshots, this, + getDockTongue(), LLDockControl::TOP)); } void LLFloaterSnapshot::onClose(bool app_quitting) @@ -2133,6 +2190,33 @@ void LLFloaterSnapshot::update() } } +bool LLFloaterSnapshot::updateButtons(ESnapshotMode mode) +{ + childSetVisible("share", mode == SNAPSHOT_MAIN); + childSetVisible("save", mode == SNAPSHOT_MAIN); + childSetVisible("set_profile_pic", mode == SNAPSHOT_MAIN); + + childSetVisible("share_to_web", mode == SNAPSHOT_SHARE); + childSetVisible("share_to_email", mode == SNAPSHOT_SHARE); + + childSetVisible("save_to_inventory", mode == SNAPSHOT_SAVE); + childSetVisible("save_to_computer", mode == SNAPSHOT_SAVE); + + childSetVisible("cancel", mode != SNAPSHOT_MAIN); + + return true; +} + +void LLFloaterSnapshot::setAsProfilePic(const LLUUID& image_id) +{ + LLAvatarDataRequest* avatar_data_request = new LLAvatarDataRequest(gAgent.getID(), image_id, this); + + LLAvatarPropertiesProcessor* processor = + LLAvatarPropertiesProcessor::getInstance(); + + processor->addObserver(gAgent.getID(), avatar_data_request); + processor->sendAvatarPropertiesRequest(gAgent.getID()); +} ///---------------------------------------------------------------------------- /// Class LLSnapshotFloaterView diff --git a/indra/newview/llfloatersnapshot.h b/indra/newview/llfloatersnapshot.h index 1333497bd2..931d355748 100644 --- a/indra/newview/llfloatersnapshot.h +++ b/indra/newview/llfloatersnapshot.h @@ -34,9 +34,10 @@ #define LL_LLFLOATERSNAPSHOT_H #include "llfloater.h" +#include "lltransientdockablefloater.h" -class LLFloaterSnapshot : public LLFloater +class LLFloaterSnapshot : public LLTransientDockableFloater { public: typedef enum e_snapshot_format @@ -46,6 +47,13 @@ public: SNAPSHOT_FORMAT_BMP } ESnapshotFormat; + enum ESnapshotMode + { + SNAPSHOT_SHARE, + SNAPSHOT_SAVE, + SNAPSHOT_MAIN + }; + LLFloaterSnapshot(const LLSD& key); virtual ~LLFloaterSnapshot(); @@ -56,6 +64,10 @@ public: static void update(); + void setAsProfilePic(const LLUUID& image_id); + + bool updateButtons(ESnapshotMode mode); + static S32 getUIWinHeightLong() {return sUIWinHeightLong ;} static S32 getUIWinHeightShort() {return sUIWinHeightShort ;} static S32 getUIWinWidth() {return sUIWinWidth ;} @@ -67,6 +79,8 @@ private: static S32 sUIWinHeightLong ; static S32 sUIWinHeightShort ; static S32 sUIWinWidth ; + + LLRect mRefreshBtnRect; }; class LLSnapshotFloaterView : public LLFloaterView diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7c42a581ff..d8d7057c4e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -38,7 +38,7 @@ #include "llcoord.h" //#include "llgl.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" @@ -533,7 +533,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) } // multiply by correction factor because volume sliders go [0, 0.5] - childSetValue( "slider zoom", gAgent.getCameraZoomFraction() * 0.5f); + childSetValue( "slider zoom", gAgentCamera.getCameraZoomFraction() * 0.5f); // Move buttons BOOL move_visible = (tool == LLToolGrab::getInstance()); @@ -766,7 +766,7 @@ void LLFloaterTools::onClose(bool app_quitting) // Different from handle_reset_view in that it doesn't actually // move the camera if EditCameraMovement is not set. - gAgent.resetView(gSavedSettings.getBOOL("EditCameraMovement")); + gAgentCamera.resetView(gSavedSettings.getBOOL("EditCameraMovement")); // exit component selection mode LLSelectMgr::getInstance()->promoteSelectionToRoot(); @@ -847,7 +847,7 @@ void commit_slider_zoom(LLUICtrl *ctrl) { // renormalize value, since max "volume" level is 0.5 for some reason F32 zoom_level = (F32)ctrl->getValue().asReal() * 2.f; // / 0.5f; - gAgent.setCameraZoomFraction(zoom_level); + gAgentCamera.setCameraZoomFraction(zoom_level); } void click_popup_rotate_left(void*) diff --git a/indra/newview/llfloatertopobjects.cpp b/indra/newview/llfloatertopobjects.cpp index 8ab050beaa..84ea353dab 100644 --- a/indra/newview/llfloatertopobjects.cpp +++ b/indra/newview/llfloatertopobjects.cpp @@ -315,7 +315,7 @@ void LLFloaterTopObjects::doToObjects(int action, bool all) LLCtrlListInterface *list = childGetListInterface("objects_list"); if (!list || list->getItemCount() == 0) return; - std::vector<LLUUID>::iterator id_itor; + uuid_vec_t::iterator id_itor; bool start_message = true; diff --git a/indra/newview/llfloatertopobjects.h b/indra/newview/llfloatertopobjects.h index ee3c5d3cce..8fb89a3cc5 100644 --- a/indra/newview/llfloatertopobjects.h +++ b/indra/newview/llfloatertopobjects.h @@ -89,7 +89,7 @@ private: std::string mMethod; LLSD mObjectListData; - std::vector<LLUUID> mObjectListIDs; + uuid_vec_t mObjectListIDs; U32 mCurrentMode; U32 mFlags; diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp index 91d0f0e370..002d417e4c 100644 --- a/indra/newview/llfloaterurlentry.cpp +++ b/indra/newview/llfloaterurlentry.cpp @@ -40,6 +40,7 @@ #include "llpanelface.h" #include "llcombobox.h" +#include "llmimetypes.h" #include "llnotificationsutil.h" #include "llurlhistory.h" #include "lluictrlfactory.h" @@ -71,14 +72,14 @@ public: virtual void error( U32 status, const std::string& reason ) { - completeAny(status, "none/none"); + completeAny(status, LLMIMETypes::getDefaultMimeType()); } void completeAny(U32 status, const std::string& mime_type) { // Set empty type to none/none. Empty string is reserved for legacy parcels // which have no mime type set. - std::string resolved_mime_type = ! mime_type.empty() ? mime_type : "none/none"; + std::string resolved_mime_type = ! mime_type.empty() ? mime_type : LLMIMETypes::getDefaultMimeType(); LLFloaterURLEntry* floater_url_entry = (LLFloaterURLEntry*)mParent.get(); if ( floater_url_entry ) floater_url_entry->headerFetchComplete( status, resolved_mime_type ); diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 67c0b530eb..b3223ad494 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -41,6 +41,7 @@ #include "llfloaterworldmap.h" #include "llagent.h" +#include "llagentcamera.h" #include "llbutton.h" #include "llcallingcard.h" #include "llcombobox.h" @@ -50,7 +51,9 @@ //#include "llfirstuse.h" #include "llfloaterreg.h" // getTypedInstance() #include "llfocusmgr.h" +#include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" #include "lllandmarklist.h" #include "lllineeditor.h" @@ -122,7 +125,7 @@ public: } // support the secondlife:///app/worldmap/{LOCATION}/{COORDS} SLapp - const std::string region_name = params[0].asString(); + const std::string region_name = LLURI::unescape(params[0].asString()); S32 x = (params.size() > 1) ? params[1].asInteger() : 128; S32 y = (params.size() > 2) ? params[2].asInteger() : 128; S32 z = (params.size() > 3) ? params[3].asInteger() : 0; @@ -321,7 +324,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) // Start speculative download of landmarks const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); - gInventory.startBackgroundFetch(landmark_folder_id); + LLInventoryModelBackgroundFetch::instance().start(landmark_folder_id); childSetFocus("location", TRUE); gFocusMgr.triggerFocusFlash(); @@ -1220,12 +1223,12 @@ void LLFloaterWorldMap::centerOnTarget(BOOL animate) { // We've got the position finally, so we're no longer busy. JC // getWindow()->decBusyCount(); - pos_global = LLTracker::getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal(); + pos_global = LLTracker::getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal(); } } else if(LLWorldMap::getInstance()->isTracking()) { - pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal() - gAgent.getCameraPositionGlobal();; + pos_global = LLWorldMap::getInstance()->getTrackedPositionGlobal() - gAgentCamera.getCameraPositionGlobal();; } else { diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index f74d912842..c492bfcef1 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -39,6 +39,7 @@ #include "llinventoryclipboard.h" // *TODO: remove this once hack below gone. #include "llinventoryfilter.h" #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llfoldertype.h" #include "llfloaterinventory.h"// hacked in for the bonus context menu items. @@ -275,11 +276,6 @@ LLFolderView::~LLFolderView( void ) mRenamer = NULL; mStatusTextBox = NULL; - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } - mAutoOpenItems.removeAllNodes(); gIdleCallbacks.deleteFunction(idle, this); @@ -865,7 +861,7 @@ BOOL LLFolderView::getSelectionList(std::set<LLUUID> &selection) const BOOL LLFolderView::startDrag(LLToolDragAndDrop::ESource source) { std::vector<EDragAndDropType> types; - std::vector<LLUUID> cargo_ids; + uuid_vec_t cargo_ids; selected_items_t::iterator item_it; BOOL can_drag = TRUE; if (!mSelectedItems.empty()) @@ -943,7 +939,7 @@ void LLFolderView::draw() } else { - if (gInventory.backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) + if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() || mCompletedFilterGeneration < mFilter->getMinRequiredGeneration()) { mStatusText = LLTrans::getString("Searching"); //font->renderUTF8(mStatusText, 0, 2, 1, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, FALSE ); @@ -979,7 +975,6 @@ void LLFolderView::finishRenamingItem( void ) if( mRenameItem ) { setSelectionFromRoot( mRenameItem, TRUE ); - mRenameItem = NULL; } // List is re-sorted alphabeticly, so scroll to make sure the selected item is visible. @@ -1421,8 +1416,8 @@ void LLFolderView::startRenamingSelectedItem( void ) mRenamer->setVisible( TRUE ); // set focus will fail unless item is visible mRenamer->setFocus( TRUE ); - mRenamer->setTopLostCallback(boost::bind(onRenamerLost, _1)); - mRenamer->setFocusLostCallback(boost::bind(onRenamerLost, _1)); + mRenamer->setTopLostCallback(boost::bind(&LLFolderView::onRenamerLost, this, _1)); + mRenamer->setFocusLostCallback(boost::bind(&LLFolderView::onRenamerLost, this, _1)); gViewerWindow->addPopup(mRenamer); } } @@ -2103,8 +2098,7 @@ bool LLFolderView::doToSelected(LLInventoryModel* model, const LLSD& userdata) if(!folder_item) continue; LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener(); if(!bridge) continue; - - bridge->performAction(this, model, action); + bridge->performAction(model, action); } LLFloater::setFloaterHost(NULL); @@ -2392,9 +2386,9 @@ S32 LLFolderView::notify(const LLSD& info) /// Local function definitions ///---------------------------------------------------------------------------- -//static void LLFolderView::onRenamerLost( LLFocusableElement* renamer) { + mRenameItem = NULL; LLUICtrl* uictrl = dynamic_cast<LLUICtrl*>(renamer); if (uictrl) { diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 42390dfd17..874723bb1a 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -279,7 +279,7 @@ protected: LLScrollContainer* mScrollContainer; // NULL if this is not a child of a scroll container. void commitRename( const LLSD& data ); - static void onRenamerLost( LLFocusableElement* renamer); + void onRenamerLost( LLFocusableElement* renamer); void finishRenamingItem( void ); void closeRenamer( void ); diff --git a/indra/newview/llfoldervieweventlistener.h b/indra/newview/llfoldervieweventlistener.h index 12e100caf4..a2ef8c1d12 100644 --- a/indra/newview/llfoldervieweventlistener.h +++ b/indra/newview/llfoldervieweventlistener.h @@ -88,7 +88,7 @@ public: virtual BOOL isUpToDate() const = 0; virtual BOOL hasChildren() const = 0; virtual LLInventoryType::EType getInventoryType() const = 0; - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) = 0; + virtual void performAction(LLInventoryModel* model, std::string action) = 0; // This method should be called when a drag begins. returns TRUE // if the drag can begin, otherwise FALSE. diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index bb4c75d3ac..3208218302 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -38,6 +38,7 @@ #include "llfoldervieweventlistener.h" #include "llinventorybridge.h" // for LLItemBridge in LLInventorySort::operator() #include "llinventoryfilter.h" +#include "llinventorymodelbackgroundfetch.h" #include "llpanel.h" #include "llviewercontrol.h" // gSavedSettings #include "llviewerwindow.h" // Argh, only for setCursor() @@ -436,11 +437,8 @@ S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) S32 LLFolderViewItem::getItemHeight() { - if (mHidden) return 0; + if (getHidden()) return 0; - //S32 icon_height = mIcon->getHeight(); - //S32 label_height = llround(getLabelFontForStyle(mLabelStyle)->getLineHeight()); - //return llmax( icon_height, label_height ) + ICON_PAD; return mItemHeight; } @@ -823,32 +821,38 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, return handled; } - void LLFolderViewItem::draw() { - if (mHidden) return; + if (getHidden()) + { + return; + } static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); static LLUIColor sHighlightBgColor = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", DEFAULT_WHITE); static LLUIColor sHighlightFgColor = LLUIColorTable::instance().getColor("MenuItemHighlightFgColor", DEFAULT_WHITE); - static LLUIColor sFocusOutlineColor = - LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); + static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE); static LLUIColor sFilterBGColor = LLUIColorTable::instance().getColor("FilterBackgroundColor", DEFAULT_WHITE); static LLUIColor sFilterTextColor = LLUIColorTable::instance().getColor("FilterTextColor", DEFAULT_WHITE); - static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemSuffixColor", DEFAULT_WHITE); + static LLUIColor sSuffixColor = LLUIColorTable::instance().getColor("InventoryItemColor", DEFAULT_WHITE); + static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); const Params& default_params = LLUICtrlFactory::getDefaultParams<LLFolderViewItem>(); const S32 TOP_PAD = default_params.item_top_pad; + const S32 FOCUS_LEFT = 1; + const LLFontGL* font = getLabelFontForStyle(mLabelStyle); - bool possibly_has_children = false; - bool up_to_date = mListener && mListener->isUpToDate(); - if((up_to_date && hasVisibleChildren() ) || // we fetched our children and some of them have passed the filter... - (!up_to_date && mListener && mListener->hasChildren())) // ...or we know we have children but haven't fetched them (doesn't obey filter) - { - possibly_has_children = true; - } - if(/*mControlLabel[0] != '\0' && */possibly_has_children) + const BOOL in_inventory = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getRootFolderID()); + const BOOL in_library = getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(), gInventory.getLibraryRootFolderID()); + + //--------------------------------------------------------------------------------// + // Draw open folder arrow + // + const bool up_to_date = mListener && mListener->isUpToDate(); + const bool possibly_has_children = ((up_to_date && hasVisibleChildren()) || // we fetched our children and some of them have passed the filter... + (!up_to_date && mListener && mListener->hasChildren())); // ...or we know we have children but haven't fetched them (doesn't obey filter) + if (possibly_has_children) { LLUIImage* arrow_image = default_params.folder_arrow_image; gl_draw_scaled_rotated_image( @@ -856,22 +860,16 @@ void LLFolderViewItem::draw() ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); } - // See also LLFolderView::updateRenamerPosition() - F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); - - LLFontGL* font = getLabelFontForStyle(mLabelStyle); - // If we have keyboard focus, draw selection filled - BOOL show_context = getRoot()->getShowSelectionContext(); - BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus()); - const S32 FOCUS_LEFT = 1; - S32 focus_top = getRect().getHeight(); - S32 focus_bottom = getRect().getHeight() - mItemHeight; - bool folder_open = (getRect().getHeight() > mItemHeight + 4); - - // always render "current" item, only render other selected items if - // mShowSingleSelection is FALSE - if( mIsSelected ) + //--------------------------------------------------------------------------------// + // Draw highlight for selected items + // + const BOOL show_context = getRoot()->getShowSelectionContext(); + const BOOL filled = show_context || (getRoot()->getParentPanel()->hasFocus()); // If we have keyboard focus, draw selection filled + const S32 focus_top = getRect().getHeight(); + const S32 focus_bottom = getRect().getHeight() - mItemHeight; + const bool folder_open = (getRect().getHeight() > mItemHeight + 4); + if (mIsSelected) // always render "current" item. Only render other selected items if mShowSingleSelection is FALSE { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLColor4 bg_color = sHighlightBgColor; @@ -890,152 +888,167 @@ void LLFolderViewItem::draw() bg_color.mV[VALPHA] = clamp_rescale(fade_time, 0.f, 0.4f, 0.f, bg_color.mV[VALPHA]); } } - - gl_rect_2d( - FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - bg_color, filled); + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + bg_color, filled); if (mIsCurSelection) { - gl_rect_2d( - FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - sFocusOutlineColor, FALSE); + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + sFocusOutlineColor, FALSE); } if (folder_open) { - gl_rect_2d( - FOCUS_LEFT, - focus_bottom + 1, // overlap with bottom edge of above rect - getRect().getWidth() - 2, - 0, - sFocusOutlineColor, FALSE); + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect + getRect().getWidth() - 2, + 0, + sFocusOutlineColor, FALSE); if (show_context) { - gl_rect_2d( - FOCUS_LEFT, - focus_bottom + 1, - getRect().getWidth() - 2, - 0, - sHighlightBgColor, TRUE); + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, + getRect().getWidth() - 2, + 0, + sHighlightBgColor, TRUE); } } } + + //--------------------------------------------------------------------------------// + // Draw DragNDrop highlight + // if (mDragAndDropTarget) { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gl_rect_2d( - FOCUS_LEFT, - focus_top, - getRect().getWidth() - 2, - focus_bottom, - sHighlightBgColor, FALSE); + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + sHighlightBgColor, FALSE); if (folder_open) { - gl_rect_2d( - FOCUS_LEFT, - focus_bottom + 1, // overlap with bottom edge of above rect - getRect().getWidth() - 2, - 0, - sHighlightBgColor, FALSE); + gl_rect_2d(FOCUS_LEFT, + focus_bottom + 1, // overlap with bottom edge of above rect + getRect().getWidth() - 2, + 0, + sHighlightBgColor, FALSE); } mDragAndDropTarget = FALSE; } - S32 icon_x = mIndentation + ARROW_SIZE + TEXT_PAD; - // First case is used for open folders - if (!mIconOpen.isNull() && (llabs(mControlLabelRotation) > 80)) + + //--------------------------------------------------------------------------------// + // Draw open icon + // + const S32 icon_x = mIndentation + ARROW_SIZE + TEXT_PAD; + if (!mIconOpen.isNull() && (llabs(mControlLabelRotation) > 80)) // For open folders { mIconOpen->draw(icon_x, getRect().getHeight() - mIconOpen->getHeight() - TOP_PAD + 1); } - else if(mIcon) + else if (mIcon) { mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1); } - if (!mLabel.empty()) - { - // highlight filtered text - BOOL debug_filters = getRoot()->getDebugFilters(); - LLColor4 color = ( (mIsSelected && filled) ? sHighlightFgColor : sFgColor ); - F32 right_x; - F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; - if (debug_filters) - { - if (!getFiltered() && !possibly_has_children) - { - color.mV[VALPHA] *= 0.5f; - } - - LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? LLColor4(0.5f, 0.8f, 0.5f, 1.f) : LLColor4(0.8f, 0.5f, 0.5f, 1.f); - LLFontGL::getFontMonospace()->renderUTF8( - mStatusText, 0, text_left, y, filter_color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); - text_left = right_x; - } + //--------------------------------------------------------------------------------// + // Exit if no label to draw + // + if (mLabel.empty()) + { + return; + } + LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor; + if (in_library) color = sLibraryColor; - font->renderUTF8( mLabel, 0, text_left, y, color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + F32 right_x = 0; + F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; + F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); -// LLViewerInventoryCategory *item = 0; -// if (getListener()) -// item = gInventory.getCategory(getListener()->getUUID()); - bool root_is_loading = false; - if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getRootFolderID())) - { - // Descendent of my inventory. - root_is_loading = gInventory.myInventoryFetchInProgress(); - } - if (getListener() && gInventory.isObjectDescendentOf(getListener()->getUUID(),gInventory.getLibraryRootFolderID())) - { - // Descendent of library - root_is_loading = gInventory.libraryFetchInProgress(); - } - - if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) - || (LLInventoryModel::backgroundFetchActive() && root_is_loading && mShowLoadStatus) ) + //--------------------------------------------------------------------------------// + // Highlight filtered text + // + if (getRoot()->getDebugFilters()) + { + if (!getFiltered() && !possibly_has_children) { - std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; - font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); + color.mV[VALPHA] *= 0.5f; } + LLColor4 filter_color = mLastFilterGeneration >= getRoot()->getFilter()->getCurrentGeneration() ? + LLColor4(0.5f, 0.8f, 0.5f, 1.f) : + LLColor4(0.8f, 0.5f, 0.5f, 1.f); + LLFontGL::getFontMonospace()->renderUTF8(mStatusText, 0, text_left, y, filter_color, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE ); + text_left = right_x; + } + //--------------------------------------------------------------------------------// + // Draw the actual label text + // + font->renderUTF8(mLabel, 0, text_left, y, color, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); - if (!mLabelSuffix.empty()) - { - font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, S32_MAX, &right_x, FALSE ); - } + //--------------------------------------------------------------------------------// + // Draw "Loading..." text + // + bool root_is_loading = false; + if (in_inventory) + { + root_is_loading = LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress(); + } + if (in_library) + { + root_is_loading = LLInventoryModelBackgroundFetch::instance().libraryFetchInProgress(); + } + if ((mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) || + (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && root_is_loading && (mShowLoadStatus || mHidden))) + { + std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; + font->renderUTF8(load_string, 0, right_x, y, sSearchStatusColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE); + } - if (mStringMatchOffset != std::string::npos) + //--------------------------------------------------------------------------------// + // Draw label suffix + // + if (!mLabelSuffix.empty()) + { + font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE ); + } + + //--------------------------------------------------------------------------------// + // Highlight string match + // + if (mStringMatchOffset != std::string::npos) + { + // don't draw backgrounds for zero-length strings + S32 filter_string_length = getRoot()->getFilterSubString().size(); + if (filter_string_length > 0) { - // don't draw backgrounds for zero-length strings - S32 filter_string_length = getRoot()->getFilterSubString().size(); - if (filter_string_length > 0) - { - std::string combined_string = mLabel + mLabelSuffix; - S32 left = llround(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1; - S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; - S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); - S32 top = getRect().getHeight() - TOP_PAD; + std::string combined_string = mLabel + mLabelSuffix; + S32 left = llround(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1; + S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2; + S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD); + S32 top = getRect().getHeight() - TOP_PAD; - LLUIImage* box_image = default_params.selection_image; - LLRect box_rect(left, top, right, bottom); - box_image->draw(box_rect, sFilterBGColor); - F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); - F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; - font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, yy, - sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - filter_string_length, S32_MAX, &right_x, FALSE ); - } + LLUIImage* box_image = default_params.selection_image; + LLRect box_rect(left, top, right, bottom); + box_image->draw(box_rect, sFilterBGColor); + F32 match_string_left = text_left + font->getWidthF32(combined_string, 0, mStringMatchOffset); + F32 yy = (F32)getRect().getHeight() - font->getLineHeight() - (F32)TEXT_PAD - (F32)TOP_PAD; + font->renderUTF8( combined_string, mStringMatchOffset, match_string_left, yy, + sFilterTextColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + filter_string_length, S32_MAX, &right_x, FALSE ); } } } @@ -1046,20 +1059,21 @@ void LLFolderViewItem::draw() ///---------------------------------------------------------------------------- LLFolderViewFolder::LLFolderViewFolder( const LLFolderViewItem::Params& p ): -LLFolderViewItem( p ), // 0 = no create time -mIsOpen(FALSE), -mExpanderHighlighted(FALSE), -mCurHeight(0.f), -mTargetHeight(0.f), -mAutoOpenCountdown(0.f), -mSubtreeCreationDate(0), -mAmTrash(LLFolderViewFolder::UNKNOWN), -mLastArrangeGeneration( -1 ), -mLastCalculatedWidth(0), -mCompletedFilterGeneration(-1), -mMostFilteredDescendantGeneration(-1), -mNeedsSort(false) -{} + LLFolderViewItem( p ), // 0 = no create time + mIsOpen(FALSE), + mExpanderHighlighted(FALSE), + mCurHeight(0.f), + mTargetHeight(0.f), + mAutoOpenCountdown(0.f), + mSubtreeCreationDate(0), + mAmTrash(LLFolderViewFolder::UNKNOWN), + mLastArrangeGeneration( -1 ), + mLastCalculatedWidth(0), + mCompletedFilterGeneration(-1), + mMostFilteredDescendantGeneration(-1), + mNeedsSort(false) +{ +} // Destroys the object LLFolderViewFolder::~LLFolderViewFolder( void ) @@ -1317,7 +1331,7 @@ void LLFolderViewFolder::filter( LLInventoryFilter& filter) // when applying a filter, matching folders get their contents downloaded first if (filter.isNotDefault() && getFiltered(filter.getMinRequiredGeneration()) && (mListener && !gInventory.isCategoryComplete(mListener->getUUID()))) { - gInventory.startBackgroundFetch(mListener->getUUID()); + LLInventoryModelBackgroundFetch::instance().start(mListener->getUUID()); } // now query children diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 18f81fe506..7f28e09933 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llinventory.h" +#include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "lltrans.h" @@ -110,8 +111,11 @@ class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver public: typedef boost::function<void()> callback_t; - LLInitialFriendCardsFetch(callback_t cb) - : mCheckFolderCallback(cb) {} + LLInitialFriendCardsFetch(const LLUUID& folder_id, + callback_t cb) : + LLInventoryFetchDescendentsObserver(folder_id), + mCheckFolderCallback(cb) + {} /* virtual */ void done(); @@ -322,7 +326,7 @@ void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBud if (NULL == items) continue; - std::vector<LLUUID> buddyUUIDs; + uuid_vec_t buddyUUIDs; for (itBuddy = items->begin(); itBuddy != items->end(); ++itBuddy) { buddyUUIDs.push_back((*itBuddy)->getCreatorUUID()); @@ -407,13 +411,9 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb) { // This instance will be deleted in LLInitialFriendCardsFetch::done(). - LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb); - - LLInventoryFetchDescendentsObserver::folder_ref_t folders; - folders.push_back(folder_id); - - fetch->fetchDescendents(folders); - if(fetch->isEverythingComplete()) + LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folder_id, cb); + fetch->startFetch(); + if(fetch->isFinished()) { // everything is already here - call done. fetch->done(); diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index 1cda52c1d7..638a1eca84 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -49,7 +49,7 @@ class LLFriendCardsManager friend class CreateFriendCardCallback; public: - typedef std::map<LLUUID, std::vector<LLUUID> > folderid_buddies_map_t; + typedef std::map<LLUUID, uuid_vec_t > folderid_buddies_map_t; // LLFriendObserver implementation void changed(U32 mask) diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 0ba7bdf613..0996d09e25 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -67,19 +67,18 @@ static const LLUUID& get_linked_uuid(const LLUUID& item_id); // Lightweight constructor. // init() does the heavy lifting. -LLGestureManager::LLGestureManager() +LLGestureMgr::LLGestureMgr() : mValid(FALSE), mPlaying(), mActive(), mLoadingCount(0) { - mRetryIfMissing = true; gInventory.addObserver(this); } // We own the data for gestures, so clean them up. -LLGestureManager::~LLGestureManager() +LLGestureMgr::~LLGestureMgr() { item_map_t::iterator it; for (it = mActive.begin(); it != mActive.end(); ++it) @@ -93,14 +92,14 @@ LLGestureManager::~LLGestureManager() } -void LLGestureManager::init() +void LLGestureMgr::init() { // TODO } -void LLGestureManager::changed(U32 mask) +void LLGestureMgr::changed(U32 mask) { - LLInventoryFetchObserver::changed(mask); + LLInventoryFetchItemsObserver::changed(mask); if (mask & LLInventoryObserver::GESTURE) { @@ -136,7 +135,7 @@ void LLGestureManager::changed(U32 mask) // Use this version when you have the item_id but not the asset_id, // and you KNOW the inventory is loaded. -void LLGestureManager::activateGesture(const LLUUID& item_id) +void LLGestureMgr::activateGesture(const LLUUID& item_id) { LLViewerInventoryItem* item = gInventory.getItem(item_id); if (!item) return; @@ -152,7 +151,7 @@ void LLGestureManager::activateGesture(const LLUUID& item_id) } -void LLGestureManager::activateGestures(LLViewerInventoryItem::item_array_t& items) +void LLGestureMgr::activateGestures(LLViewerInventoryItem::item_array_t& items) { // Load up the assets S32 count = 0; @@ -248,7 +247,7 @@ struct LLLoadInfo /** * It will load a gesture from remote storage */ -void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, +void LLGestureMgr::activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, BOOL inform_server, BOOL deactivate_similar) @@ -257,7 +256,7 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, if( !gAssetStorage ) { - llwarns << "LLGestureManager::activateGestureWithAsset without valid gAssetStorage" << llendl; + llwarns << "LLGestureMgr::activateGestureWithAsset without valid gAssetStorage" << llendl; return; } // If gesture is already active, nothing to do. @@ -299,7 +298,7 @@ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, } -void LLGestureManager::deactivateGesture(const LLUUID& item_id) +void LLGestureMgr::deactivateGesture(const LLUUID& item_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); item_map_t::iterator it = mActive.find(base_item_id); @@ -338,16 +337,16 @@ void LLGestureManager::deactivateGesture(const LLUUID& item_id) gAgent.sendReliableMessage(); - LLAppearanceManager::instance().removeCOFItemLinks(base_item_id, false); + LLAppearanceMgr::instance().removeCOFItemLinks(base_item_id, false); notifyObservers(); } -void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id) +void LLGestureMgr::deactivateSimilarGestures(LLMultiGesture* in, const LLUUID& in_item_id) { const LLUUID& base_in_item_id = get_linked_uuid(in_item_id); - std::vector<LLUUID> gest_item_ids; + uuid_vec_t gest_item_ids; // Deactivate all gestures that match item_map_t::iterator it; @@ -386,7 +385,7 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI // Inform database of the change LLMessageSystem* msg = gMessageSystem; BOOL start_message = TRUE; - std::vector<LLUUID>::const_iterator vit = gest_item_ids.begin(); + uuid_vec_t::const_iterator vit = gest_item_ids.begin(); while (vit != gest_item_ids.end()) { if (start_message) @@ -431,7 +430,7 @@ void LLGestureManager::deactivateSimilarGestures(LLMultiGesture* in, const LLUUI } -BOOL LLGestureManager::isGestureActive(const LLUUID& item_id) +BOOL LLGestureMgr::isGestureActive(const LLUUID& item_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); item_map_t::iterator it = mActive.find(base_item_id); @@ -439,7 +438,7 @@ BOOL LLGestureManager::isGestureActive(const LLUUID& item_id) } -BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id) +BOOL LLGestureMgr::isGesturePlaying(const LLUUID& item_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); @@ -452,7 +451,7 @@ BOOL LLGestureManager::isGesturePlaying(const LLUUID& item_id) return gesture->mPlaying; } -BOOL LLGestureManager::isGesturePlaying(LLMultiGesture* gesture) +BOOL LLGestureMgr::isGesturePlaying(LLMultiGesture* gesture) { if(!gesture) { @@ -462,7 +461,7 @@ BOOL LLGestureManager::isGesturePlaying(LLMultiGesture* gesture) return gesture->mPlaying; } -void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id) +void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_gesture, const LLUUID& asset_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); @@ -504,11 +503,11 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, LLMultiGesture* new notifyObservers(); } -void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id) +void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); - item_map_t::iterator it = LLGestureManager::instance().mActive.find(base_item_id); + item_map_t::iterator it = LLGestureMgr::instance().mActive.find(base_item_id); if (it == mActive.end()) { llwarns << "replaceGesture for inactive gesture " << base_item_id << llendl; @@ -517,10 +516,10 @@ void LLGestureManager::replaceGesture(const LLUUID& item_id, const LLUUID& new_a // mActive owns this gesture pointer, so clean up memory. LLMultiGesture* gesture = (*it).second; - LLGestureManager::instance().replaceGesture(base_item_id, gesture, new_asset_id); + LLGestureMgr::instance().replaceGesture(base_item_id, gesture, new_asset_id); } -void LLGestureManager::playGesture(LLMultiGesture* gesture) +void LLGestureMgr::playGesture(LLMultiGesture* gesture) { if (!gesture) return; @@ -539,7 +538,7 @@ void LLGestureManager::playGesture(LLMultiGesture* gesture) // Convenience function that looks up the item_id for you. -void LLGestureManager::playGesture(const LLUUID& item_id) +void LLGestureMgr::playGesture(const LLUUID& item_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); @@ -556,7 +555,7 @@ void LLGestureManager::playGesture(const LLUUID& item_id) // Iterates through space delimited tokens in string, triggering any gestures found. // Generates a revised string that has the found tokens replaced by their replacement strings // and (as a minor side effect) has multiple spaces in a row replaced by single spaces. -BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::string* revised_string) +BOOL LLGestureMgr::triggerAndReviseString(const std::string &utf8str, std::string* revised_string) { std::string tokenized = utf8str; @@ -649,7 +648,7 @@ BOOL LLGestureManager::triggerAndReviseString(const std::string &utf8str, std::s } -BOOL LLGestureManager::triggerGesture(KEY key, MASK mask) +BOOL LLGestureMgr::triggerGesture(KEY key, MASK mask) { std::vector <LLMultiGesture *> matching; item_map_t::iterator it; @@ -683,7 +682,7 @@ BOOL LLGestureManager::triggerGesture(KEY key, MASK mask) } -S32 LLGestureManager::getPlayingCount() const +S32 LLGestureMgr::getPlayingCount() const { return mPlaying.size(); } @@ -697,7 +696,7 @@ struct IsGesturePlaying : public std::unary_function<LLMultiGesture*, bool> } }; -void LLGestureManager::update() +void LLGestureMgr::update() { S32 i; for (i = 0; i < (S32)mPlaying.size(); ++i) @@ -740,14 +739,13 @@ void LLGestureManager::update() // Run all steps until you're either done or hit a wait. -void LLGestureManager::stepGesture(LLMultiGesture* gesture) +void LLGestureMgr::stepGesture(LLMultiGesture* gesture) { if (!gesture) { return; } - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (!avatar) return; + if (!isAgentAvatarValid()) return; // Of the ones that started playing, have any stopped? @@ -758,8 +756,8 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture) { // look in signaled animations (simulator's view of what is // currently playing. - LLVOAvatar::AnimIterator play_it = avatar->mSignaledAnimations.find(*gest_it); - if (play_it != avatar->mSignaledAnimations.end()) + LLVOAvatar::AnimIterator play_it = gAgentAvatarp->mSignaledAnimations.find(*gest_it); + if (play_it != gAgentAvatarp->mSignaledAnimations.end()) { ++gest_it; } @@ -777,8 +775,8 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture) gest_it != gesture->mRequestedAnimIDs.end(); ) { - LLVOAvatar::AnimIterator play_it = avatar->mSignaledAnimations.find(*gest_it); - if (play_it != avatar->mSignaledAnimations.end()) + LLVOAvatar::AnimIterator play_it = gAgentAvatarp->mSignaledAnimations.find(*gest_it); + if (play_it != gAgentAvatarp->mSignaledAnimations.end()) { // Hooray, this animation has started playing! // Copy into playing. @@ -888,7 +886,7 @@ void LLGestureManager::stepGesture(LLMultiGesture* gesture) } -void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) +void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step) { switch(step->getType()) { @@ -975,7 +973,7 @@ void LLGestureManager::runStep(LLMultiGesture* gesture, LLGestureStep* step) // static -void LLGestureManager::onLoadComplete(LLVFS *vfs, +void LLGestureMgr::onLoadComplete(LLVFS *vfs, const LLUUID& asset_uuid, LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status) @@ -988,7 +986,7 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, delete info; info = NULL; - LLGestureManager& self = LLGestureManager::instance(); + LLGestureMgr& self = LLGestureMgr::instance(); self.mLoadingCount--; if (0 == status) @@ -1032,9 +1030,8 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, else { // Watch this item and set gesture name when item exists in inventory - item_ref_t ids; - ids.push_back(item_id); - self.fetchItems(ids); + self.setFetchID(item_id); + self.startFetch(); } self.mActive[item_id] = gesture; @@ -1094,12 +1091,12 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, llwarns << "Problem loading gesture: " << status << llendl; - LLGestureManager::instance().mActive.erase(item_id); + LLGestureMgr::instance().mActive.erase(item_id); } } -void LLGestureManager::stopGesture(LLMultiGesture* gesture) +void LLGestureMgr::stopGesture(LLMultiGesture* gesture) { if (!gesture) return; @@ -1139,7 +1136,7 @@ void LLGestureManager::stopGesture(LLMultiGesture* gesture) } -void LLGestureManager::stopGesture(const LLUUID& item_id) +void LLGestureMgr::stopGesture(const LLUUID& item_id) { const LLUUID& base_item_id = get_linked_uuid(item_id); @@ -1153,12 +1150,12 @@ void LLGestureManager::stopGesture(const LLUUID& item_id) } -void LLGestureManager::addObserver(LLGestureManagerObserver* observer) +void LLGestureMgr::addObserver(LLGestureManagerObserver* observer) { mObservers.push_back(observer); } -void LLGestureManager::removeObserver(LLGestureManagerObserver* observer) +void LLGestureMgr::removeObserver(LLGestureManagerObserver* observer) { std::vector<LLGestureManagerObserver*>::iterator it; it = std::find(mObservers.begin(), mObservers.end(), observer); @@ -1171,9 +1168,9 @@ void LLGestureManager::removeObserver(LLGestureManagerObserver* observer) // Call this method when it's time to update everyone on a new state. // Copy the list because an observer could respond by removing itself // from the list. -void LLGestureManager::notifyObservers() +void LLGestureMgr::notifyObservers() { - lldebugs << "LLGestureManager::notifyObservers" << llendl; + lldebugs << "LLGestureMgr::notifyObservers" << llendl; std::vector<LLGestureManagerObserver*> observers = mObservers; @@ -1185,7 +1182,7 @@ void LLGestureManager::notifyObservers() } } -BOOL LLGestureManager::matchPrefix(const std::string& in_str, std::string* out_str) +BOOL LLGestureMgr::matchPrefix(const std::string& in_str, std::string* out_str) { S32 in_len = in_str.length(); @@ -1216,7 +1213,7 @@ BOOL LLGestureManager::matchPrefix(const std::string& in_str, std::string* out_s } -void LLGestureManager::getItemIDs(std::vector<LLUUID>* ids) +void LLGestureMgr::getItemIDs(uuid_vec_t* ids) { item_map_t::const_iterator it; for (it = mActive.begin(); it != mActive.end(); ++it) @@ -1225,7 +1222,7 @@ void LLGestureManager::getItemIDs(std::vector<LLUUID>* ids) } } -void LLGestureManager::done() +void LLGestureMgr::done() { bool notify = false; for(item_map_t::iterator it = mActive.begin(); it != mActive.end(); ++it) diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index 3dd184ddc7..5f2c3e2d61 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -54,7 +54,7 @@ public: virtual void changed() = 0; }; -class LLGestureManager : public LLSingleton<LLGestureManager>, public LLInventoryFetchObserver +class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchItemsObserver { public: @@ -63,8 +63,8 @@ public: typedef std::map<LLUUID, LLMultiGesture*> item_map_t; typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t; - LLGestureManager(); - ~LLGestureManager(); + LLGestureMgr(); + ~LLGestureMgr(); void init(); @@ -146,7 +146,7 @@ public: BOOL matchPrefix(const std::string& in_str, std::string* out_str); // Copy item ids into the vector - void getItemIDs(std::vector<LLUUID>* ids); + void getItemIDs(uuid_vec_t* ids); protected: // Handle the processing of a single gesture diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 8569e208eb..2aba0b5c09 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -71,99 +71,6 @@ // Height of the yellow selection highlight posts for land const F32 PARCEL_POST_HEIGHT = 0.666f; -BOOL LLAgent::setLookAt(ELookAtType target_type, LLViewerObject *object, LLVector3 position) -{ - if(object && object->isAttachment()) - { - LLViewerObject* parent = object; - while(parent) - { - if (parent == mAvatarObject) - { - // looking at an attachment on ourselves, which we don't want to do - object = mAvatarObject; - position.clearVec(); - } - parent = (LLViewerObject*)parent->getParent(); - } - } - if(!mLookAt || mLookAt->isDead()) - { - mLookAt = (LLHUDEffectLookAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_LOOKAT); - mLookAt->setSourceObject(mAvatarObject); - } - - return mLookAt->setLookAt(target_type, object, position); -} - -BOOL LLAgent::setPointAt(EPointAtType target_type, LLViewerObject *object, LLVector3 position) -{ - // disallow pointing at attachments and avatars - if (object && (object->isAttachment() || object->isAvatar())) - { - return FALSE; - } - - if(!mPointAt || mPointAt->isDead()) - { - mPointAt = (LLHUDEffectPointAt *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_POINTAT); - mPointAt->setSourceObject(mAvatarObject); - } - - return mPointAt->setPointAt(target_type, object, position); -} - -ELookAtType LLAgent::getLookAtType() -{ - if (mLookAt) - { - return mLookAt->getLookAtType(); - } - - return LOOKAT_TARGET_NONE; -} - -EPointAtType LLAgent::getPointAtType() -{ - if (mPointAt) - { - return mPointAt->getPointAtType(); - } - - return POINTAT_TARGET_NONE; -} - -// Draw a representation of current autopilot target -void LLAgent::renderAutoPilotTarget() -{ - if (mAutoPilot) - { - F32 height_meters; - LLVector3d target_global; - - glMatrixMode(GL_MODELVIEW); - gGL.pushMatrix(); - - // not textured - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - - // lovely green - glColor4f(0.f, 1.f, 1.f, 1.f); - - target_global = mAutoPilotTargetGlobal; - - gGL.translatef((F32)(target_global.mdV[VX]), (F32)(target_global.mdV[VY]), (F32)(target_global.mdV[VZ])); - - height_meters = 1.f; - - glScalef(height_meters, height_meters, height_meters); - - gSphere.render(1500.f); - - gGL.popMatrix(); - } -} - // Returns true if you got at least one object void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) { diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 00e2365ffd..438159b2e6 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -75,12 +75,13 @@ public: return false; } - //*TODO by what to replace showing groups floater? if (tokens[0].asString() == "list") { if (tokens[1].asString() == "show") { - //LLFloaterReg::showInstance("contacts", "groups"); + LLSD params; + params["people_panel_tab_name"] = "groups_panel"; + LLSideTray::getInstance()->showPanel("panel_people", params); return true; } return false; @@ -105,7 +106,7 @@ public: { if (group_id.isNull()) return true; - LLGroupActions::show(group_id); + LLGroupActions::inspect(group_id); return true; } return false; @@ -246,6 +247,12 @@ static bool isGroupUIVisible() return panel->isInVisibleChain(); } +// static +void LLGroupActions::inspect(const LLUUID& group_id) +{ + LLFloaterReg::showInstance("inspect_group", LLSD().with("group_id", group_id)); +} + // static void LLGroupActions::show(const LLUUID& group_id) { diff --git a/indra/newview/llgroupactions.h b/indra/newview/llgroupactions.h index e99df86cd9..55cae4db0b 100644 --- a/indra/newview/llgroupactions.h +++ b/indra/newview/llgroupactions.h @@ -66,6 +66,11 @@ public: static void show(const LLUUID& group_id); /** + * Show group inspector floater. + */ + static void inspect(const LLUUID& group_id); + + /** * Refresh group information panel. */ static void refresh(const LLUUID& group_id); diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 8a056f836f..f21b6e1085 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -71,18 +71,10 @@ public: static const LLGroupComparator GROUP_COMPARATOR; -LLGroupList::Params::Params() -: no_groups_msg("no_groups_msg") -, no_filtered_groups_msg("no_filtered_groups_msg") -{ - -} LLGroupList::LLGroupList(const Params& p) -: LLFlatListView(p) +: LLFlatListViewEx(p) , mDirty(true) // to force initial update - , mNoFilteredGroupsMsg(p.no_filtered_groups_msg) - , mNoGroupsMsg(p.no_groups_msg) { // Listen for agent group changes. gAgent.addListener(this, "new group"); @@ -160,16 +152,7 @@ void LLGroupList::refresh() bool have_filter = !mNameFilter.empty(); // set no items message depend on filter state & total count of groups - if (have_filter) - { - // groups were filtered - setNoItemsCommentText(mNoFilteredGroupsMsg); - } - else if (0 == count) - { - // user is not a member of any group - setNoItemsCommentText(mNoGroupsMsg); - } + updateNoItemsMessage(have_filter); clear(); diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 0e9da25c58..16f3fc05a3 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -47,23 +47,10 @@ * * @see setNameFilter() */ -class LLGroupList: public LLFlatListView, public LLOldEvents::LLSimpleListener +class LLGroupList: public LLFlatListViewEx, public LLOldEvents::LLSimpleListener { LOG_CLASS(LLGroupList); public: - struct Params : public LLInitParam::Block<Params, LLFlatListView::Params> - { - /** - * Contains a message for empty list when user is not a member of any group - */ - Optional<std::string> no_groups_msg; - - /** - * Contains a message for empty list when all groups don't match passed filter - */ - Optional<std::string> no_filtered_groups_msg; - Params(); - }; LLGroupList(const Params& p); virtual ~LLGroupList(); @@ -75,11 +62,6 @@ public: void toggleIcons(); bool getIconsVisible() const { return mShowIcons; } - // *WORKAROUND: two methods to overload appropriate Params due to localization issue: - // no_groups_msg & no_filtered_groups_msg attributes are not defined as translatable in VLT. See EXT-5931 - void setNoGroupsMsg(const std::string& msg) { mNoGroupsMsg = msg; } - void setNoFilteredGroupsMsg(const std::string& msg) { mNoFilteredGroupsMsg = msg; } - private: void setDirty(bool val = true) { mDirty = val; } void refresh(); @@ -94,8 +76,6 @@ private: bool mShowIcons; bool mDirty; std::string mNameFilter; - std::string mNoFilteredGroupsMsg; - std::string mNoGroupsMsg; }; class LLButton; diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 7f93a357de..996553ccf7 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -160,7 +160,7 @@ LLGroupRoleData::~LLGroupRoleData() { } -S32 LLGroupRoleData::getMembersInRole(std::vector<LLUUID> members, +S32 LLGroupRoleData::getMembersInRole(uuid_vec_t members, BOOL needs_sort) { if (mRoleID.isNull()) @@ -184,8 +184,8 @@ S32 LLGroupRoleData::getMembersInRole(std::vector<LLUUID> members, // Return the number of members in the intersection. S32 max_size = llmin( members.size(), mMemberIDs.size() ); - std::vector<LLUUID> in_role( max_size ); - std::vector<LLUUID>::iterator in_role_end; + uuid_vec_t in_role( max_size ); + uuid_vec_t::iterator in_role_end; in_role_end = std::set_intersection(mMemberIDs.begin(), mMemberIDs.end(), members.begin(), members.end(), in_role.begin()); @@ -200,7 +200,7 @@ void LLGroupRoleData::addMember(const LLUUID& member) bool LLGroupRoleData::removeMember(const LLUUID& member) { - std::vector<LLUUID>::iterator it = std::find(mMemberIDs.begin(),mMemberIDs.end(),member); + uuid_vec_t::iterator it = std::find(mMemberIDs.begin(),mMemberIDs.end(),member); if (it != mMemberIDs.end()) { @@ -1736,7 +1736,7 @@ void LLGroupMgr::sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID, //static void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, - std::vector<LLUUID>& member_ids) + uuid_vec_t& member_ids) { bool start_message = true; LLMessageSystem* msg = gMessageSystem; @@ -1746,7 +1746,7 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, LLGroupMgrGroupData* group_datap = LLGroupMgr::getInstance()->getGroupData(group_id); if (!group_datap) return; - for (std::vector<LLUUID>::iterator it = member_ids.begin(); + for (uuid_vec_t::iterator it = member_ids.begin(); it != member_ids.end(); ++it) { LLUUID& ejected_member_id = (*it); diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 2c86de8b97..82df631b8c 100644 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -139,8 +139,8 @@ public: const LLUUID& getID() const { return mRoleID; } - const std::vector<LLUUID>& getRoleMembers() const { return mMemberIDs; } - S32 getMembersInRole(std::vector<LLUUID> members, BOOL needs_sort = TRUE); + const uuid_vec_t& getRoleMembers() const { return mMemberIDs; } + S32 getMembersInRole(uuid_vec_t members, BOOL needs_sort = TRUE); S32 getTotalMembersInRole() { return mMemberIDs.size(); } LLRoleData getRoleData() const { return mRoleData; } @@ -150,10 +150,10 @@ public: bool removeMember(const LLUUID& member); void clearMembers(); - const std::vector<LLUUID>::const_iterator getMembersBegin() const + const uuid_vec_t::const_iterator getMembersBegin() const { return mMemberIDs.begin(); } - const std::vector<LLUUID>::const_iterator getMembersEnd() const + const uuid_vec_t::const_iterator getMembersEnd() const { return mMemberIDs.end(); } @@ -164,7 +164,7 @@ protected: LLUUID mRoleID; LLRoleData mRoleData; - std::vector<LLUUID> mMemberIDs; + uuid_vec_t mMemberIDs; S32 mMemberCount; private: @@ -340,7 +340,7 @@ public: static void sendGroupMemberJoin(const LLUUID& group_id); static void sendGroupMemberInvites(const LLUUID& group_id, std::map<LLUUID,LLUUID>& role_member_pairs); static void sendGroupMemberEjects(const LLUUID& group_id, - std::vector<LLUUID>& member_ids); + uuid_vec_t& member_ids); void cancelGroupRoleChanges(const LLUUID& group_id); diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp index 07b81ef134..3be0fcbc5f 100644 --- a/indra/newview/llhudeffectlookat.cpp +++ b/indra/newview/llhudeffectlookat.cpp @@ -38,6 +38,7 @@ #include "message.h" #include "llagent.h" +#include "llagentcamera.h" #include "llvoavatar.h" #include "lldrawable.h" #include "llviewerobjectlist.h" @@ -316,7 +317,7 @@ void LLHUDEffectLookAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) LLUUID dataId; mesgsys->getUUIDFast(_PREHASH_Effect, _PREHASH_ID, dataId, blocknum); - if (!gAgent.mLookAt.isNull() && dataId == gAgent.mLookAt->getID()) + if (!gAgentCamera.mLookAt.isNull() && dataId == gAgentCamera.mLookAt->getID()) { return; } @@ -637,7 +638,7 @@ bool LLHUDEffectLookAt::calcTargetPosition() // mouselook and freelook target offsets are absolute target_rot = LLQuaternion::DEFAULT; } - else if (looking_at_self && gAgent.cameraCustomizeAvatar()) + else if (looking_at_self && gAgentCamera.cameraCustomizeAvatar()) { // *NOTE: We have to do this because animation // overrides do not set lookat behavior. diff --git a/indra/newview/llhudeffectpointat.cpp b/indra/newview/llhudeffectpointat.cpp index a13ee8572f..01dfb50b10 100644 --- a/indra/newview/llhudeffectpointat.cpp +++ b/indra/newview/llhudeffectpointat.cpp @@ -38,6 +38,7 @@ #include "llrender.h" #include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "llviewerobjectlist.h" #include "llvoavatar.h" @@ -152,7 +153,7 @@ void LLHUDEffectPointAt::unpackData(LLMessageSystem *mesgsys, S32 blocknum) mesgsys->getUUIDFast(_PREHASH_Effect, _PREHASH_ID, dataId, blocknum); // ignore messages from ourselves - if (!gAgent.mPointAt.isNull() && dataId == gAgent.mPointAt->getID()) + if (!gAgentCamera.mPointAt.isNull() && dataId == gAgentCamera.mPointAt->getID()) { return; } diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp index dc55aba0db..2b73ed1dcd 100644 --- a/indra/newview/llhudobject.cpp +++ b/indra/newview/llhudobject.cpp @@ -43,6 +43,7 @@ #include "llhudeffectbeam.h" #include "llhudeffecttrail.h" #include "llhudeffectlookat.h" +#include "llhudeffectpointat.h" #include "llvoicevisualizer.h" diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index 325c9c260c..5b653638f2 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -78,7 +78,7 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, LLVector3 up_axis; if (orthographic) { - right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewWidthRaw(), 0.f); + right_axis.setVec(0.f, -1.f / gViewerWindow->getWorldViewHeightRaw(), 0.f); up_axis.setVec(0.f, 0.f, 1.f / gViewerWindow->getWorldViewHeightRaw()); } else diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 91f4f57e54..19dbc564d1 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -44,6 +44,7 @@ #include "llchiclet.h" #include "llfloaterreg.h" #include "llimfloatercontainer.h" // to replace separate IM Floaters with multifloater container +#include "llinventoryfunctions.h" #include "lllayoutstack.h" #include "lllineeditor.h" #include "lllogchat.h" @@ -498,8 +499,8 @@ void LLIMFloater::setVisible(BOOL visible) { //only if floater was construced and initialized from xml updateMessages(); - //prevent steal focus when IM opened in multitab mode - if (!isChatMultiTab()) + //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781) + if (!isChatMultiTab() || hasFocus()) { mInputEditor->setFocus(TRUE); } @@ -922,7 +923,7 @@ BOOL LLIMFloater::dropCallingCard(LLInventoryItem* item, BOOL drop) { if(drop) { - std::vector<LLUUID> ids; + uuid_vec_t ids; ids.push_back(item->getCreatorUUID()); inviteToSession(ids); } @@ -955,7 +956,7 @@ BOOL LLIMFloater::dropCategory(LLInventoryCategory* category, BOOL drop) } else if(drop) { - std::vector<LLUUID> ids; + uuid_vec_t ids; ids.reserve(count); for(S32 i = 0; i < count; ++i) { @@ -992,7 +993,7 @@ private: LLUUID mSessionID; }; -BOOL LLIMFloater::inviteToSession(const std::vector<LLUUID>& ids) +BOOL LLIMFloater::inviteToSession(const uuid_vec_t& ids) { LLViewerRegion* region = gAgent.getRegion(); if (!region) diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 2f034d02b8..763dd5655b 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -129,7 +129,7 @@ private: BOOL dropCategory(LLInventoryCategory* category, BOOL drop); BOOL isInviteAllowed() const; - BOOL inviteToSession(const std::vector<LLUUID>& agent_ids); + BOOL inviteToSession(const uuid_vec_t& agent_ids); static void onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ); static void onInputEditorFocusLost(LLFocusableElement* caller, void* userdata); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4780e985ca..909878207c 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -36,6 +36,7 @@ #include "llfloaterreg.h" #include "llfontgl.h" +#include "llgl.h" #include "llrect.h" #include "llerror.h" #include "llbutton.h" @@ -80,6 +81,9 @@ const static std::string ADHOC_NAME_SUFFIX(" Conference"); const static std::string NEARBY_P2P_BY_OTHER("nearby_P2P_by_other"); const static std::string NEARBY_P2P_BY_AGENT("nearby_P2P_by_agent"); +/** Timeout of outgoing session initialization (in seconds) */ +const static U32 SESSION_INITIALIZATION_TIMEOUT = 30; + std::string LLCallDialogManager::sPreviousSessionlName = ""; LLIMModel::LLIMSession::SType LLCallDialogManager::sPreviousSessionType = LLIMModel::LLIMSession::P2P_SESSION; std::string LLCallDialogManager::sCurrentSessionlName = ""; @@ -91,6 +95,19 @@ const LLUUID LLOutgoingCallDialog::OCD_KEY = LLUUID("7CF78E11-0CFE-498D-ADB9-141 // LLIMMgr* gIMMgr = NULL; + +BOOL LLSessionTimeoutTimer::tick() +{ + if (mSessionId.isNull()) return TRUE; + + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionId); + if (session && !session->mSessionInitialized) + { + gIMMgr->showSessionStartError("session_initialization_timed_out_error", mSessionId); + } + return TRUE; +} + void toast_callback(const LLSD& msg){ // do not show toast in busy mode or it goes from agent if (gAgent.getBusy() || gAgent.getID() == msg["from_id"]) @@ -146,7 +163,7 @@ LLIMModel::LLIMModel() addNewMsgCallback(toast_callback); } -LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice) +LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) : mSessionID(session_id), mName(name), mType(type), @@ -214,6 +231,11 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& //so we're already initialized mSessionInitialized = true; } + else + { + //tick returns TRUE - timer will be deleted after the tick + new LLSessionTimeoutTimer(mSessionID, SESSION_INITIALIZATION_TIMEOUT); + } if (IM_NOTHING_SPECIAL == type) { @@ -275,7 +297,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - message = other_avatar_name + " " + joined_call; + message = LLTrans::getString("answered_call"); LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; @@ -423,7 +445,7 @@ LLIMModel::LLIMSession* LLIMModel::findIMSession(const LLUUID& session_id) const } //*TODO consider switching to using std::set instead of std::list for holding LLUUIDs across the whole code -LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector<LLUUID>& ids) +LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) { S32 num = ids.size(); if (!num) return NULL; @@ -440,7 +462,7 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const std::vector<LLUUID>& std::list<LLUUID> tmp_list(session->mInitialTargetIDs.begin(), session->mInitialTargetIDs.end()); - std::vector<LLUUID>::const_iterator iter = ids.begin(); + uuid_vec_t::const_iterator iter = ids.begin(); while (iter != ids.end()) { tmp_list.remove(*iter); @@ -571,7 +593,7 @@ void LLIMModel::testMessages() //session name should not be empty bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, - const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice) + const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice) { if (name.empty()) { @@ -596,7 +618,7 @@ bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, co bool LLIMModel::newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice) { - std::vector<LLUUID> no_ids; + uuid_vec_t no_ids; return newSession(session_id, name, type, other_participant_id, no_ids, voice); } @@ -1002,7 +1024,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, } else { - for(std::vector<LLUUID>::iterator it = session->mInitialTargetIDs.begin(); + for(uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); it!=session->mInitialTargetIDs.end();++it) { const LLUUID id = *it; @@ -1134,7 +1156,7 @@ private: bool LLIMModel::sendStartSession( const LLUUID& temp_session_id, const LLUUID& other_participant_id, - const std::vector<LLUUID>& ids, + const uuid_vec_t& ids, EInstantMessage dialog) { if ( dialog == IM_SESSION_GROUP_START ) @@ -1544,6 +1566,11 @@ LLCallDialog::LLCallDialog(const LLSD& payload) setDocked(true); } +LLCallDialog::~LLCallDialog() +{ + LLUI::removePopup(this); +} + void LLCallDialog::getAllowedRect(LLRect& rect) { rect = gViewerWindow->getWorldViewRectScaled(); @@ -1597,7 +1624,7 @@ void LLCallDialog::onOpen(const LLSD& key) LLDockableFloater::onOpen(key); // it should be over the all floaters. EXT-5116 - gFloaterView->bringToFront(this, FALSE); + LLUI::addPopup(this); } void LLCallDialog::setIcon(const LLSD& session_id, const LLSD& participant_id) @@ -1692,7 +1719,6 @@ void LLOutgoingCallDialog::show(const LLSD& key) channel_name = LLTextUtil::formatPhoneNumber(channel_name); } childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); - childSetTextArg("nearby_P2P_by_other", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) @@ -2718,6 +2744,12 @@ bool LLIMMgr::endCall(const LLUUID& session_id) if (!voice_channel) return false; voice_channel->deactivate(); + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (im_session) + { + // need to update speakers' state + im_session->mSpeakers->update(FALSE); + } return true; } @@ -3057,7 +3089,7 @@ public: return; } - if(!LLVoiceClient::voiceEnabled()) + if(!LLVoiceClient::voiceEnabled() || !LLVoiceClient::getInstance()->voiceWorking()) { // Don't display voice invites unless the user has voice enabled. return; diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index f1693d0e17..ffa8a16797 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -34,6 +34,7 @@ #define LL_LLIMVIEW_H #include "lldockablefloater.h" +#include "lleventtimer.h" #include "llinstantmessage.h" #include "lllogchat.h" @@ -45,7 +46,24 @@ class LLFriendObserver; class LLCallDialogManager; class LLIMSpeakerMgr; +/** + * Timeout Timer for outgoing Ad-Hoc/Group IM sessions which being initialized by the server + */ +class LLSessionTimeoutTimer : public LLEventTimer +{ +public: + LLSessionTimeoutTimer(const LLUUID& session_id, F32 period) : LLEventTimer(period), mSessionId(session_id) {} + virtual ~LLSessionTimeoutTimer() {}; + /* virtual */ BOOL tick(); + +private: + LLUUID mSessionId; +}; + +/** + * Model (MVC) for IM Sessions + */ class LLIMModel : public LLSingleton<LLIMModel> { public: @@ -61,7 +79,7 @@ public: } SType; LLIMSession(const LLUUID& session_id, const std::string& name, - const EInstantMessage& type, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, bool voice); + const EInstantMessage& type, const LLUUID& other_participant_id, const uuid_vec_t& ids, bool voice); virtual ~LLIMSession(); void sessionInitReplyReceived(const LLUUID& new_session_id); @@ -93,7 +111,7 @@ public: EInstantMessage mType; SType mSessionType; LLUUID mOtherParticipantID; - std::vector<LLUUID> mInitialTargetIDs; + uuid_vec_t mInitialTargetIDs; std::string mHistoryFileName; // connection to voice channel state change signal @@ -152,7 +170,7 @@ public: * Find an Ad-Hoc IM Session with specified participants * @return first found Ad-Hoc session or NULL if the session does not exist */ - LLIMSession* findAdHocIMSession(const std::vector<LLUUID>& ids); + LLIMSession* findAdHocIMSession(const uuid_vec_t& ids); /** * Rebind session data to a new session id. @@ -167,7 +185,7 @@ public: * @param name session name should not be empty, will return false if empty */ bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, - const std::vector<LLUUID>& ids, bool voice = false); + const uuid_vec_t& ids, bool voice = false); bool newSession(const LLUUID& session_id, const std::string& name, const EInstantMessage& type, const LLUUID& other_participant_id, bool voice = false); @@ -255,7 +273,7 @@ public: static void sendLeaveSession(const LLUUID& session_id, const LLUUID& other_participant_id); static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, - const std::vector<LLUUID>& ids, EInstantMessage dialog); + const uuid_vec_t& ids, EInstantMessage dialog); static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing); static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); @@ -477,7 +495,7 @@ class LLCallDialog : public LLDockableFloater { public: LLCallDialog(const LLSD& payload); - ~LLCallDialog() {} + ~LLCallDialog(); virtual BOOL postBuild(); diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 35cb9b3468..e48bb77bda 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -58,6 +58,7 @@ #include "llfloaterreg.h" #include "llmenubutton.h" #include "lltooltip.h" // positionViewNearMouse() +#include "lltrans.h" #include "lluictrl.h" #include "llavatariconctrl.h" @@ -137,6 +138,7 @@ private: void onVolumeChange(const LLSD& data); bool enableMute(); bool enableUnmute(); + bool enableTeleportOffer(); // Is used to determine if "Add friend" option should be enabled in gear menu bool isNotFriend(); @@ -235,6 +237,7 @@ LLInspectAvatar::LLInspectAvatar(const LLSD& sd) boost::bind(&LLInspectAvatar::onVisibleZoomIn, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.Enable", boost::bind(&LLInspectAvatar::isNotFriend, this)); mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableCall", boost::bind(&LLAvatarActions::canCall)); + mEnableCallbackRegistrar.add("InspectAvatar.Gear.EnableTeleportOffer", boost::bind(&LLInspectAvatar::enableTeleportOffer, this)); mEnableCallbackRegistrar.add("InspectAvatar.EnableMute", boost::bind(&LLInspectAvatar::enableMute, this)); mEnableCallbackRegistrar.add("InspectAvatar.EnableUnmute", boost::bind(&LLInspectAvatar::enableUnmute, this)); @@ -378,7 +381,11 @@ void LLInspectAvatar::requestUpdate() void LLInspectAvatar::processAvatarData(LLAvatarData* data) { LLStringUtil::format_map_t args; - args["[BORN_ON]"] = data->born_on; + { + std::string birth_date = LLTrans::getString("AvatarBirthDateFormat"); + LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) data->born_on.secondsSinceEpoch())); + args["[BORN_ON]"] = birth_date; + } args["[AGE]"] = LLDateUtil::ageFromDate(data->born_on, LLDate::now()); args["[SL_PROFILE]"] = data->about_text; args["[RW_PROFILE"] = data->fl_about_text; @@ -764,6 +771,11 @@ bool LLInspectAvatar::enableUnmute() } } +bool LLInspectAvatar::enableTeleportOffer() +{ + return LLAvatarActions::canOfferTeleport(mAvatarID); +} + ////////////////////////////////////////////////////////////////////////////// // LLInspectAvatarUtil ////////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6fedd9ac4d..b85bf0d518 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -31,12 +31,13 @@ */ #include "llviewerprecompiledheaders.h" +#include "llinventorybridge.h" + // external projects #include "lltransfersourceasset.h" -#include "llinventorybridge.h" - #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llavataractions.h" @@ -49,8 +50,10 @@ #include "llimfloater.h" #include "llimview.h" #include "llinventoryclipboard.h" +#include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llnotifications.h" #include "llnotificationsutil.h" @@ -68,6 +71,18 @@ #include "llwearablelist.h" #include "llpaneloutfitsinventory.h" +typedef std::pair<LLUUID, LLUUID> two_uuids_t; +typedef std::list<two_uuids_t> two_uuids_list_t; + +struct LLMoveInv +{ + LLUUID mObjectID; + LLUUID mCategoryID; + two_uuids_list_t mMoveList; + void (*mCallback)(S32, void*); + void* mUserData; +}; + using namespace LLOldEvents; // Helpers @@ -91,6 +106,7 @@ void remove_inventory_category_from_avatar(LLInventoryCategory* category); void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_id); bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response); +void teleport_via_landmark(const LLUUID& asset_id); std::string ICON_NAME[ICON_NAME_COUNT] = { @@ -135,8 +151,12 @@ std::string ICON_NAME[ICON_NAME_COUNT] = // | LLInvFVBridge | // +=================================================+ -LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : -mUUID(uuid), mInvType(LLInventoryType::IT_NONE) +LLInvFVBridge::LLInvFVBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + mUUID(uuid), + mRoot(root), + mInvType(LLInventoryType::IT_NONE) { mInventoryPanel = inventory->getHandle(); } @@ -192,7 +212,7 @@ BOOL LLInvFVBridge::isItemRemovable() const } // Disable delete from COF folder; have users explicitly choose "detach/take off". - if (LLAppearanceManager::instance().getIsProtectedCOFItem(mUUID)) + if (LLAppearanceMgr::instance().getIsProtectedCOFItem(mUUID)) { return FALSE; } @@ -235,7 +255,7 @@ void LLInvFVBridge::showProperties() // Disable old properties floater; this is replaced by the sidepanel. /* - LLFloaterReg::showInstance("properties", mUUID); + LLFloaterReg::showInstance("properties", mUUID); */ } @@ -259,7 +279,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc { if(LLAssetType::AT_GESTURE == item->getType()) { - LLGestureManager::instance().deactivateGesture(item->getUUID()); + LLGestureMgr::instance().deactivateGesture(item->getUUID()); } } } @@ -275,7 +295,7 @@ void LLInvFVBridge::removeBatch(LLDynamicArray<LLFolderViewEventListener*>& batc { if(LLAssetType::AT_GESTURE == descendent_items[j]->getType()) { - LLGestureManager::instance().deactivateGesture(descendent_items[j]->getUUID()); + LLGestureMgr::instance().deactivateGesture(descendent_items[j]->getUUID()); } } } @@ -296,7 +316,7 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* LLMessageSystem* msg = gMessageSystem; const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); LLViewerInventoryItem* item = NULL; - std::vector<LLUUID> move_ids; + uuid_vec_t move_ids; LLInventoryModel::update_map_t update; bool start_new_message = true; S32 count = batch.count(); @@ -397,8 +417,8 @@ void LLInvFVBridge::removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener* } // move everything. - std::vector<LLUUID>::iterator it = move_ids.begin(); - std::vector<LLUUID>::iterator end = move_ids.end(); + uuid_vec_t::iterator it = move_ids.begin(); + uuid_vec_t::iterator end = move_ids.end(); for(; it != end; ++it) { gInventory.moveObject((*it), trash_id); @@ -483,8 +503,8 @@ BOOL LLInvFVBridge::isClipboardPasteableAsLink() const } void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries) + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries) { const LLView::child_list_t *list = menu.getChildList(); @@ -592,7 +612,7 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, LLViewerInventoryItem* inv_item = gInventory.getItem(mUUID); if (inv_item) { - is_asset_knowable = is_asset_id_knowable(inv_item->getType()); + is_asset_knowable = LLAssetType::lookupIsAssetIDKnowable(inv_item->getType()); } if ( !is_asset_knowable // disable menu item for Inventory items with unknown asset. EXT-5308 || (! ( isItemPermissive() || gAgent.isGodlike() ) ) @@ -652,6 +672,11 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -728,7 +753,7 @@ BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const if (*type == DAD_CATEGORY) { - gInventory.startBackgroundFetch(obj->getUUID()); + LLInventoryModelBackgroundFetch::instance().start(obj->getUUID()); } rv = TRUE; @@ -801,7 +826,7 @@ BOOL LLInvFVBridge::isAgentInventory() const BOOL LLInvFVBridge::isCOFFolder() const { - return LLAppearanceManager::instance().getIsInCOF(mUUID); + return LLAppearanceMgr::instance().getIsInCOF(mUUID); } BOOL LLInvFVBridge::isItemPermissive() const @@ -858,21 +883,11 @@ void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model, model->notifyObservers(); } - -const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type) -{ - const std::string rv= LLInventoryType::lookup(inv_type); - if(rv.empty()) - { - return std::string("<invalid>"); - } - return rv; -} - LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid, U32 flags) { @@ -882,104 +897,104 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, case LLAssetType::AT_TEXTURE: if(!(inv_type == LLInventoryType::IT_TEXTURE || inv_type == LLInventoryType::IT_SNAPSHOT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLTextureBridge(inventory, uuid, inv_type); + new_listener = new LLTextureBridge(inventory, root, uuid, inv_type); break; case LLAssetType::AT_SOUND: if(!(inv_type == LLInventoryType::IT_SOUND)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLSoundBridge(inventory, uuid); + new_listener = new LLSoundBridge(inventory, root, uuid); break; case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLLandmarkBridge(inventory, uuid, flags); + new_listener = new LLLandmarkBridge(inventory, root, uuid, flags); break; case LLAssetType::AT_CALLINGCARD: if(!(inv_type == LLInventoryType::IT_CALLINGCARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLCallingCardBridge(inventory, uuid); + new_listener = new LLCallingCardBridge(inventory, root, uuid); break; case LLAssetType::AT_SCRIPT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLScriptBridge(inventory, uuid); + new_listener = new LLScriptBridge(inventory, root, uuid); break; case LLAssetType::AT_OBJECT: if(!(inv_type == LLInventoryType::IT_OBJECT || inv_type == LLInventoryType::IT_ATTACHMENT)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLObjectBridge(inventory, uuid, inv_type, flags); + new_listener = new LLObjectBridge(inventory, root, uuid, inv_type, flags); break; case LLAssetType::AT_NOTECARD: if(!(inv_type == LLInventoryType::IT_NOTECARD)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLNotecardBridge(inventory, uuid); + new_listener = new LLNotecardBridge(inventory, root, uuid); break; case LLAssetType::AT_ANIMATION: if(!(inv_type == LLInventoryType::IT_ANIMATION)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLAnimationBridge(inventory, uuid); + new_listener = new LLAnimationBridge(inventory, root, uuid); break; case LLAssetType::AT_GESTURE: if(!(inv_type == LLInventoryType::IT_GESTURE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLGestureBridge(inventory, uuid); + new_listener = new LLGestureBridge(inventory, root, uuid); break; case LLAssetType::AT_LSL_TEXT: if(!(inv_type == LLInventoryType::IT_LSL)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLLSLTextBridge(inventory, uuid); + new_listener = new LLLSLTextBridge(inventory, root, uuid); break; case LLAssetType::AT_CLOTHING: case LLAssetType::AT_BODYPART: if(!(inv_type == LLInventoryType::IT_WEARABLE)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLWearableBridge(inventory, uuid, asset_type, inv_type, (EWearableType)flags); + new_listener = new LLWearableBridge(inventory, root, uuid, asset_type, inv_type, (EWearableType)flags); break; case LLAssetType::AT_CATEGORY: if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) { // Create a link folder handler instead. - new_listener = new LLLinkFolderBridge(inventory, uuid); + new_listener = new LLLinkFolderBridge(inventory, root, uuid); break; } - new_listener = new LLFolderBridge(inventory, uuid); + new_listener = new LLFolderBridge(inventory, root, uuid); break; case LLAssetType::AT_LINK: case LLAssetType::AT_LINK_FOLDER: // Only should happen for broken links. - new_listener = new LLLinkItemBridge(inventory, uuid); + new_listener = new LLLinkItemBridge(inventory, root, uuid); break; default: llinfos << "Unhandled asset type (llassetstorage.h): " @@ -1021,6 +1036,38 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const return outfit_panel->isTabPanel(my_panel); } +bool LLInvFVBridge::canShare() +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return false; + } + + LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + bool allowed = false; + allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); + if (allowed && + !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + { + allowed = false; + } + if (allowed && + !item->getPermissions().allowCopyBy(gAgent.getID())) + { + allowed = false; + } + return allowed; + } + + LLViewerInventoryCategory* cat = model->getCategory(mUUID); + + // All categories can be given. + return cat != NULL; +} + // +=================================================+ // | InventoryFVBridgeBuilder | // +=================================================+ @@ -1028,26 +1075,28 @@ LLInvFVBridge* LLInventoryFVBridgeBuilder::createBridge(LLAssetType::EType asset LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid, U32 flags /* = 0x00 */) const { return LLInvFVBridge::createBridge(asset_type, - actual_asset_type, - inv_type, - inventory, - uuid, - flags); + actual_asset_type, + inv_type, + inventory, + root, + uuid, + flags); } // +=================================================+ // | LLItemBridge | // +=================================================+ -void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLItemBridge::performAction(LLInventoryModel* model, std::string action) { if ("goto" == action) { - gotoItem(folder); + gotoItem(); } if ("open" == action) @@ -1098,7 +1147,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - LLFolderViewItem* folder_view_itemp = folder->getItemByID(itemp->getParentUUID()); + LLFolderViewItem* folder_view_itemp = mRoot->getItemByID(itemp->getParentUUID()); if (!folder_view_itemp) return; folder_view_itemp->getListener()->pasteFromClipboard(); @@ -1110,7 +1159,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, LLInventoryItem* itemp = model->getItem(mUUID); if (!itemp) return; - LLFolderViewItem* folder_view_itemp = folder->getItemByID(itemp->getParentUUID()); + LLFolderViewItem* folder_view_itemp = mRoot->getItemByID(itemp->getParentUUID()); if (!folder_view_itemp) return; folder_view_itemp->getListener()->pasteLinkFromClipboard(); @@ -1121,7 +1170,7 @@ void LLItemBridge::performAction(LLFolderView* folder, LLInventoryModel* model, void LLItemBridge::selectItem() { LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem()); - if(item && !item->isComplete()) + if(item && !item->isFinished()) { item->fetchFromServer(); } @@ -1179,7 +1228,7 @@ void LLItemBridge::restoreToWorld() } } -void LLItemBridge::gotoItem(LLFolderView *folder) +void LLItemBridge::gotoItem() { LLInventoryObject *obj = getInventoryObject(); if (obj && obj->getIsLinkType()) @@ -1505,14 +1554,10 @@ BOOL LLFolderBridge::isItemRemovable() const return FALSE; } - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( !avatar ) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; LLInventoryCategory* category = model->getCategory(mUUID); - if( !category ) + if(!category) { return FALSE; } @@ -1660,8 +1705,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryModel* model = getInventoryModel(); if(!model) return FALSE; - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if(!avatar) return FALSE; + if (!isAgentAvatarValid()) return FALSE; // cannot drag categories into library if(!isAgentInventory()) @@ -1685,7 +1729,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, // Is the destination the trash? const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); BOOL move_is_into_trash = (mUUID == trash_id) - || model->isObjectDescendentOf(mUUID, trash_id); + || model->isObjectDescendentOf(mUUID, trash_id); BOOL is_movable = (!LLFolderType::lookupIsProtectedType(inv_cat->getPreferredType())); const LLUUID current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); @@ -1733,12 +1777,11 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } - - accept = is_movable - && (mUUID != cat_id) // Can't move a folder into itself - && (mUUID != inv_cat->getParentUUID()) // Avoid moves that would change nothing - && !(model->isObjectDescendentOf(mUUID, cat_id)); // Avoid circularity - if(accept && drop) + accept = is_movable + && (mUUID != cat_id) // Can't move a folder into itself + && (mUUID != inv_cat->getParentUUID()) // Avoid moves that would change nothing + && !(model->isObjectDescendentOf(mUUID, cat_id)); // Avoid circularity + if (accept && drop) { // Look for any gestures and deactivate them if (move_is_into_trash) @@ -1747,9 +1790,9 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { LLInventoryItem* item = descendent_items[i]; if (item->getType() == LLAssetType::AT_GESTURE - && LLGestureManager::instance().isGestureActive(item->getUUID())) + && LLGestureMgr::instance().isGestureActive(item->getUUID())) { - LLGestureManager::instance().deactivateGesture(item->getUUID()); + LLGestureMgr::instance().deactivateGesture(item->getUUID()); } } } @@ -1762,7 +1805,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, { // traverse category and add all contents to currently worn. BOOL append = true; - LLAppearanceManager::instance().wearInventoryCategory(inv_cat, false, append); + LLAppearanceMgr::instance().wearInventoryCategory(inv_cat, false, append); } else { @@ -1770,28 +1813,28 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; gInventory.collectDescendents(inv_cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH); - LLAppearanceManager::instance().linkAll(mUUID,items,NULL); + LLAppearanceMgr::instance().linkAll(mUUID,items,NULL); } } else { #if SUPPORT_ENSEMBLES - // BAP - should skip if dup. - if (move_is_into_current_outfit) - { - LLAppearanceManager::instance().addEnsembleLink(inv_cat); - } - else - { - LLPointer<LLInventoryCallback> cb = NULL; - link_inventory_item( - gAgent.getID(), - inv_cat->getUUID(), - mUUID, - inv_cat->getName(), - LLAssetType::AT_LINK_FOLDER, - cb); - } + // BAP - should skip if dup. + if (move_is_into_current_outfit) + { + LLAppearanceMgr::instance().addEnsembleLink(inv_cat); + } + else + { + LLPointer<LLInventoryCallback> cb = NULL; + link_inventory_item( + gAgent.getID(), + inv_cat->getUUID(), + mUUID, + inv_cat->getName(), + LLAssetType::AT_LINK_FOLDER, + cb); + } #endif } } @@ -1808,7 +1851,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, } } } - else if(LLToolDragAndDrop::SOURCE_WORLD == source) + else if (LLToolDragAndDrop::SOURCE_WORLD == source) { // content category has same ID as object itself LLUUID object_id = inv_cat->getUUID(); @@ -1853,7 +1896,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, // this folder is coming from an object, as there is only one folder in an object, the root, // we need to collect the entire contents and handle them as a group - InventoryObjectList inventory_objects; + LLInventoryObject::object_list_t inventory_objects; object->getInventoryContents(inventory_objects); if (inventory_objects.empty()) @@ -1867,8 +1910,8 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, // coming from a task. Need to figure out if the person can // move/copy this item. - InventoryObjectList::iterator it = inventory_objects.begin(); - InventoryObjectList::iterator end = inventory_objects.end(); + LLInventoryObject::object_list_t::iterator it = inventory_objects.begin(); + LLInventoryObject::object_list_t::iterator end = inventory_objects.end(); for ( ; it != end; ++it) { // coming from a task. Need to figure out if the person can @@ -1898,7 +1941,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if(drop && accept) { it = inventory_objects.begin(); - InventoryObjectList::iterator first_it = inventory_objects.begin(); + LLInventoryObject::object_list_t::iterator first_it = inventory_objects.begin(); LLMoveInv* move_inv = new LLMoveInv; move_inv->mObjectID = object_id; move_inv->mCategoryID = category_id; @@ -1926,61 +1969,21 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, return accept; } -bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - // Valid COF items are: - // - links to wearables (body parts or clothing) - // - links to attachments - // - links to gestures - // - links to ensemble folders - LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); - if (linked_item) - { - LLAssetType::EType type = linked_item->getType(); - return (type == LLAssetType::AT_CLOTHING || - type == LLAssetType::AT_BODYPART || - type == LLAssetType::AT_GESTURE || - type == LLAssetType::AT_OBJECT); - } - else - { - LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); - // BAP remove AT_NONE support after ensembles are fully working? - return (linked_category && - ((linked_category->getPreferredType() == LLFolderType::FT_NONE) || - (LLFolderType::lookupIsEnsembleType(linked_category->getPreferredType())))); - } -} - - -bool LLFindWearables::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - if(item) - { - if((item->getType() == LLAssetType::AT_CLOTHING) - || (item->getType() == LLAssetType::AT_BODYPART)) - { - return TRUE; - } - } - return FALSE; -} - - - //Used by LLFolderBridge as callback for directory recursion. -class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver +class LLRightClickInventoryFetchObserver : public LLInventoryFetchItemsObserver { public: - LLRightClickInventoryFetchObserver() : + LLRightClickInventoryFetchObserver(const uuid_vec_t& ids) : + LLInventoryFetchItemsObserver(ids), mCopyItems(false) { }; - LLRightClickInventoryFetchObserver(const LLUUID& cat_id, bool copy_items) : + LLRightClickInventoryFetchObserver(const uuid_vec_t& ids, + const LLUUID& cat_id, + bool copy_items) : + LLInventoryFetchItemsObserver(ids), mCatID(cat_id), mCopyItems(copy_items) - { }; + { }; virtual void done() { // we've downloaded all the items, so repaint the dialog @@ -2001,7 +2004,11 @@ protected: class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver { public: - LLRightClickInventoryFetchDescendentsObserver(bool copy_items) : mCopyItems(copy_items) {} + LLRightClickInventoryFetchDescendentsObserver(const uuid_vec_t& ids, + bool copy_items) : + LLInventoryFetchDescendentsObserver(ids), + mCopyItems(copy_items) + {} ~LLRightClickInventoryFetchDescendentsObserver() {} virtual void done(); protected: @@ -2012,7 +2019,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done() { // Avoid passing a NULL-ref as mCompleteFolders.front() down to // gInventory.collectDescendents() - if( mCompleteFolders.empty() ) + if( mComplete.empty() ) { llwarns << "LLRightClickInventoryFetchDescendentsObserver::done with empty mCompleteFolders" << llendl; dec_busy_count(); @@ -2026,7 +2033,7 @@ void LLRightClickInventoryFetchDescendentsObserver::done() // happen. LLInventoryModel::cat_array_t cat_array; LLInventoryModel::item_array_t item_array; - gInventory.collectDescendents(mCompleteFolders.front(), + gInventory.collectDescendents(mComplete.front(), cat_array, item_array, LLInventoryModel::EXCLUDE_TRASH); @@ -2044,14 +2051,14 @@ void LLRightClickInventoryFetchDescendentsObserver::done() } #endif - LLRightClickInventoryFetchObserver* outfit; - outfit = new LLRightClickInventoryFetchObserver(mCompleteFolders.front(), mCopyItems); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { ids.push_back(item_array.get(i)->getUUID()); } + LLRightClickInventoryFetchObserver* outfit = new LLRightClickInventoryFetchObserver(ids, mComplete.front(), mCopyItems); + // clean up, and remove this as an observer since the call to the // outfit could notify observers and throw us into an infinite // loop. @@ -2064,19 +2071,19 @@ void LLRightClickInventoryFetchDescendentsObserver::done() inc_busy_count(); // do the fetch - outfit->fetchItems(ids); + outfit->startFetch(); outfit->done(); //Not interested in waiting and this will be right 99% of the time. //Uncomment the following code for laggy Inventory UI. -/* if(outfit->isEverythingComplete()) +/* if(outfit->isFinished()) { - // everything is already here - call done. - outfit->done(); + // everything is already here - call done. + outfit->done(); } else { - // it's all on it's way - add an observer, and the inventory - // will call done for us when everything is here. - gInventory.addObserver(outfit); + // it's all on it's way - add an observer, and the inventory + // will call done for us when everything is here. + gInventory.addObserver(outfit); }*/ } @@ -2090,7 +2097,8 @@ void LLRightClickInventoryFetchDescendentsObserver::done() class LLInventoryCopyAndWearObserver : public LLInventoryObserver { public: - LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) :mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} + LLInventoryCopyAndWearObserver(const LLUUID& cat_id, int count) : + mCatID(cat_id), mContentsCount(count), mFolderAdded(FALSE) {} virtual ~LLInventoryCopyAndWearObserver() {} virtual void changed(U32 mask); @@ -2129,7 +2137,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) if (NULL == category) { llwarns << "gInventory.getCategory(" << mCatID - << ") was NULL" << llendl; + << ") was NULL" << llendl; } else { @@ -2137,7 +2145,7 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) mContentsCount) { gInventory.removeObserver(this); - LLAppearanceManager::instance().wearInventoryCategory(category, FALSE, TRUE); + LLAppearanceMgr::instance().wearInventoryCategory(category, FALSE, TRUE); delete this; } } @@ -2148,11 +2156,11 @@ void LLInventoryCopyAndWearObserver::changed(U32 mask) -void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) { if ("open" == action) { - LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(folder->getItemByID(mUUID)); + LLFolderViewFolder *f = dynamic_cast<LLFolderViewFolder *>(mRoot->getItemByID(mUUID)); if (f) { f->setOpen(TRUE); @@ -2187,7 +2195,7 @@ void LLFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model if(!model) return; LLViewerInventoryCategory* cat = getCategory(); if(!cat) return; - LLAppearanceManager::instance().addEnsembleLink(cat,true); + LLAppearanceMgr::instance().addEnsembleLink(cat,true); return; } #endif @@ -2417,9 +2425,9 @@ bool LLFolderBridge::removeItemResponse(const LLSD& notification, const LLSD& re const LLViewerInventoryItem* item = (*iter); const LLUUID& item_id = item->getUUID(); if (item->getType() == LLAssetType::AT_GESTURE - && LLGestureManager::instance().isGestureActive(item_id)) + && LLGestureMgr::instance().isGestureActive(item_id)) { - LLGestureManager::instance().deactivateGesture(item_id); + LLGestureMgr::instance().deactivateGesture(item_id); } } @@ -2505,16 +2513,16 @@ void LLFolderBridge::pasteLinkFromClipboard() } else #endif - if (LLInventoryItem *item = model->getItem(object_id)) - { - link_inventory_item( - gAgent.getID(), - item->getLinkedUUID(), - parent_id, - item->getName(), - LLAssetType::AT_LINK, - LLPointer<LLInventoryCallback>(NULL)); - } + if (LLInventoryItem *item = model->getItem(object_id)) + { + link_inventory_item( + gAgent.getID(), + item->getLinkedUUID(), + parent_id, + item->getName(), + LLAssetType::AT_LINK, + LLPointer<LLInventoryCallback>(NULL)); + } } } } @@ -2539,7 +2547,7 @@ void LLFolderBridge::folderOptionsMenu() const bool is_system_folder = LLFolderType::lookupIsProtectedType(type); // BAP change once we're no longer treating regular categories as ensembles. const bool is_ensemble = (type == LLFolderType::FT_NONE || - LLFolderType::lookupIsEnsembleType(type)); + LLFolderType::lookupIsEnsembleType(type)); // calling card related functionality for folders. @@ -2669,10 +2677,17 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) const LLUUID lost_and_found_id = model->findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); if (lost_and_found_id == mUUID) - { + { // This is the lost+found folder. - mItems.push_back(std::string("Empty Lost And Found")); - } + mItems.push_back(std::string("Empty Lost And Found")); + + mDisabledItems.push_back(std::string("New Folder")); + mDisabledItems.push_back(std::string("New Script")); + mDisabledItems.push_back(std::string("New Note")); + mDisabledItems.push_back(std::string("New Gesture")); + mDisabledItems.push_back(std::string("New Clothes")); + mDisabledItems.push_back(std::string("New Body Parts")); + } if(trash_id == mUUID) { @@ -2722,7 +2737,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) addDeleteContextMenuOptions(mItems, mDisabledItems); // EXT-4030: disallow deletion of currently worn outfit - const LLViewerInventoryItem *base_outfit_link = LLAppearanceManager::instance().getBaseOutfitLink(); + const LLViewerInventoryItem *base_outfit_link = LLAppearanceMgr::instance().getBaseOutfitLink(); if (base_outfit_link && (cat == base_outfit_link->getLinkedCategory())) { mDisabledItems.push_back(std::string("Delete")); @@ -2752,17 +2767,18 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) mMenu = &menu; sSelf = this; - LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(FALSE); - LLInventoryFetchDescendentsObserver::folder_ref_t folders; + + uuid_vec_t folders; LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID); if (category) { folders.push_back(category->getUUID()); } - fetch->fetchDescendents(folders); + LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE); + fetch->startFetch(); inc_busy_count(); - if(fetch->isEverythingComplete()) + if(fetch->isFinished()) { // everything is already here - call done. fetch->done(); @@ -2785,7 +2801,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { mDisabledItems.push_back(std::string("Delete System Folder")); } - + + mItems.push_back(std::string("Share")); + if (!canShare()) + { + mDisabledItems.push_back(std::string("Share")); + } + hide_context_entries(menu, mItems, mDisabledItems); } @@ -2957,10 +2979,10 @@ void LLFolderBridge::createWearable(const LLUUID &parent_id, EWearableType type) LLAssetType::EType asset_type = wearable->getAssetType(); LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE; create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent_id, wearable->getTransactionID(), wearable->getName(), - wearable->getDescription(), asset_type, inv_type, wearable->getType(), - wearable->getPermissions().getMaskNextOwner(), - LLPointer<LLInventoryCallback>(NULL)); + parent_id, wearable->getTransactionID(), wearable->getName(), + wearable->getDescription(), asset_type, inv_type, wearable->getType(), + wearable->getPermissions().getMaskNextOwner(), + LLPointer<LLInventoryCallback>(NULL)); } void LLFolderBridge::modifyOutfit(BOOL append) @@ -2970,7 +2992,7 @@ void LLFolderBridge::modifyOutfit(BOOL append) LLViewerInventoryCategory* cat = getCategory(); if(!cat) return; - LLAppearanceManager::instance().wearInventoryCategory( cat, FALSE, append ); + LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append ); } // helper stuff @@ -2984,7 +3006,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response { if (cat_and_wear && cat_and_wear->mWear) { - InventoryObjectList inventory_objects; + LLInventoryObject::object_list_t inventory_objects; object->getInventoryContents(inventory_objects); int contents_count = inventory_objects.size()-1; //subtract one for containing folder @@ -2994,8 +3016,8 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response two_uuids_list_t::iterator move_it; for (move_it = move_inv->mMoveList.begin(); - move_it != move_inv->mMoveList.end(); - ++move_it) + move_it != move_inv->mMoveList.end(); + ++move_it) { object->moveInventory(move_it->first, move_it->second); } @@ -3025,8 +3047,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, return FALSE; } - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if(!avatar) return FALSE; + if (!isAgentAvatarValid()) return FALSE; LLToolDragAndDrop::ESource source = LLToolDragAndDrop::getInstance()->getSource(); BOOL accept = FALSE; @@ -3036,11 +3057,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, BOOL is_movable = TRUE; switch( inv_item->getActualType() ) { - case LLAssetType::AT_CATEGORY: - is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType()); - break; - default: - break; + case LLAssetType::AT_CATEGORY: + is_movable = !LLFolderType::lookupIsProtectedType(((LLInventoryCategory*)inv_item)->getPreferredType()); + break; + default: + break; } const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH); @@ -3048,7 +3069,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, const LLUUID current_outfit_id = model->findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); const BOOL move_is_into_current_outfit = (mUUID == current_outfit_id); const BOOL move_is_into_outfit = (getCategory() && getCategory()->getPreferredType()==LLFolderType::FT_OUTFIT); - const BOOL move_is_outof_current_outfit = LLAppearanceManager::instance().getIsInCOF(inv_item->getUUID()); + const BOOL move_is_outof_current_outfit = LLAppearanceMgr::instance().getIsInCOF(inv_item->getUUID()); // Can't explicitly drag things out of the COF. if (move_is_outof_current_outfit) @@ -3080,9 +3101,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if(accept && drop) { if (inv_item->getType() == LLAssetType::AT_GESTURE - && LLGestureManager::instance().isGestureActive(inv_item->getUUID()) && move_is_into_trash) + && LLGestureMgr::instance().isGestureActive(inv_item->getUUID()) && move_is_into_trash) { - LLGestureManager::instance().deactivateGesture(inv_item->getUUID()); + LLGestureMgr::instance().deactivateGesture(inv_item->getUUID()); } // If an item is being dragged between windows, unselect // everything in the active window so that we don't follow @@ -3135,7 +3156,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, // BAP - should skip if dup. if (move_is_into_current_outfit) { - LLAppearanceManager::instance().addCOFItemLink(inv_item); + LLAppearanceMgr::instance().addCOFItemLink(inv_item); } else { @@ -3205,6 +3226,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else { + // store dad inventory item to select added one later. See EXT-4347 + set_dad_inventory_item(inv_item, mUUID); + LLNotification::Params params("MoveInventoryFromObject"); params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv)); LLNotifications::instance().forceResponse(params, 0); @@ -3218,13 +3242,13 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if(drop) { copy_inventory_from_notecard(LLToolDragAndDrop::getInstance()->getObjectID(), - LLToolDragAndDrop::getInstance()->getSourceID(), inv_item); + LLToolDragAndDrop::getInstance()->getSourceID(), inv_item); } } else if(LLToolDragAndDrop::SOURCE_LIBRARY == source) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item; - if(item && item->isComplete()) + if(item && item->isFinished()) { accept = TRUE; if(drop) @@ -3301,6 +3325,12 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -3317,7 +3347,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } // virtual -void LLTextureBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLTextureBridge::performAction(LLInventoryModel* model, std::string action) { if ("save_as" == action) { @@ -3328,7 +3358,7 @@ void LLTextureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode preview_texture->openToSave(); } } - else LLItemBridge::performAction(folder, model, action); + else LLItemBridge::performAction(model, action); } // +=================================================+ @@ -3353,14 +3383,14 @@ void LLSoundBridge::openItem() // only open the preview dialog through the contextual right-click menu // double-click just plays the sound - LLViewerInventoryItem* item = getItem(); - if(item) - { - openSoundPreview((void*)this); - //send_uuid_sound_trigger(item->getAssetUUID(), 1.0); - } -*/ +LLViewerInventoryItem* item = getItem(); +if(item) +{ +openSoundPreview((void*)this); +//send_uuid_sound_trigger(item->getAssetUUID(), 1.0); } +*/ + } void LLSoundBridge::previewItem() { @@ -3389,6 +3419,11 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Sound Open")); items.push_back(std::string("Properties")); @@ -3405,11 +3440,14 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // | LLLandmarkBridge | // +=================================================+ -LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, const LLUUID& uuid, U32 flags/* = 0x00*/) : -LLItemBridge(inventory, uuid) +LLLandmarkBridge::LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags/* = 0x00*/) : + LLItemBridge(inventory, root, uuid) { mVisited = FALSE; - if (flags & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) + if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED) { mVisited = TRUE; } @@ -3432,6 +3470,11 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Landmark Open")); items.push_back(std::string("Properties")); @@ -3467,7 +3510,7 @@ void teleport_via_landmark(const LLUUID& asset_id) } // virtual -void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLLandmarkBridge::performAction(LLInventoryModel* model, std::string action) { if ("teleport" == action) { @@ -3491,7 +3534,7 @@ void LLLandmarkBridge::performAction(LLFolderView* folder, LLInventoryModel* mod } else { - LLItemBridge::performAction(folder, model, action); + LLItemBridge::performAction(model, action); } } @@ -3518,35 +3561,33 @@ void LLLandmarkBridge::openItem() { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } -/* - LLViewerInventoryItem* item = getItem(); - if( item ) - { - // Opening (double-clicking) a landmark immediately teleports, - // but warns you the first time. - // open_landmark(item); - LLSD payload; - payload["asset_id"] = item->getAssetUUID(); - LLNotificationsUtil::add("TeleportFromLandmark", LLSD(), payload); - } -*/ } // +=================================================+ // | LLCallingCardObserver | // +=================================================+ -void LLCallingCardObserver::changed(U32 mask) +class LLCallingCardObserver : public LLFriendObserver { - mBridgep->refreshFolderViewItem(); -} +public: + LLCallingCardObserver(LLCallingCardBridge* bridge) : mBridgep(bridge) {} + virtual ~LLCallingCardObserver() { mBridgep = NULL; } + virtual void changed(U32 mask) + { + mBridgep->refreshFolderViewItem(); + } +protected: + LLCallingCardBridge* mBridgep; +}; // +=================================================+ // | LLCallingCardBridge | // +=================================================+ -LLCallingCardBridge::LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) : - LLItemBridge(inventory, uuid) +LLCallingCardBridge::LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid ) : + LLItemBridge(inventory, root, uuid) { mObserver = new LLCallingCardObserver(this); LLAvatarTracker::instance().addObserver(mObserver); @@ -3569,7 +3610,7 @@ void LLCallingCardBridge::refreshFolderViewItem() } // virtual -void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string action) { if ("begin_im" == action) { @@ -3595,7 +3636,7 @@ void LLCallingCardBridge::performAction(LLFolderView* folder, LLInventoryModel* LLAvatarActions::offerTeleport(item->getCreatorUUID()); } } - else LLItemBridge::performAction(folder, model, action); + else LLItemBridge::performAction(model, action); } LLUIImagePtr LLCallingCardBridge::getIcon() const @@ -3631,11 +3672,11 @@ void LLCallingCardBridge::openItem() LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } /* - LLViewerInventoryItem* item = getItem(); - if(item && !item->getCreatorUUID().isNull()) - { - LLAvatarActions::showProfile(item->getCreatorUUID()); - } + LLViewerInventoryItem* item = getItem(); + if(item && !item->getCreatorUUID().isNull()) + { + LLAvatarActions::showProfile(item->getCreatorUUID()); + } */ } @@ -3651,6 +3692,11 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -3658,8 +3704,8 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) LLInventoryItem* item = getItem(); BOOL good_card = (item - && (LLUUID::null != item->getCreatorUUID()) - && (item->getCreatorUUID() != gAgent.getID())); + && (LLUUID::null != item->getCreatorUUID()) + && (item->getCreatorUUID() != gAgent.getID())); BOOL user_online = FALSE; if (item) { @@ -3694,16 +3740,16 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, // check the type switch(cargo_type) { - case DAD_TEXTURE: - case DAD_SOUND: - case DAD_LANDMARK: - case DAD_SCRIPT: - case DAD_CLOTHING: - case DAD_OBJECT: - case DAD_NOTECARD: - case DAD_BODYPART: - case DAD_ANIMATION: - case DAD_GESTURE: + case DAD_TEXTURE: + case DAD_SOUND: + case DAD_LANDMARK: + case DAD_SCRIPT: + case DAD_CLOTHING: + case DAD_OBJECT: + case DAD_NOTECARD: + case DAD_BODYPART: + case DAD_ANIMATION: + case DAD_GESTURE: { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; const LLPermissions& perm = inv_item->getPermissions(); @@ -3726,7 +3772,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, } break; } - case DAD_CATEGORY: + case DAD_CATEGORY: { LLInventoryCategory* inv_cat = (LLInventoryCategory*)cargo_data; if( gInventory.getCategory( inv_cat->getUUID() ) ) @@ -3748,8 +3794,8 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, } break; } - default: - break; + default: + break; } } return rv; @@ -3774,11 +3820,11 @@ void LLNotecardBridge::openItem() } /* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); - } + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); + } */ } @@ -3794,7 +3840,7 @@ LLUIImagePtr LLGestureBridge::getIcon() const LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const { - if( LLGestureManager::instance().isGestureActive(mUUID) ) + if( LLGestureMgr::instance().isGestureActive(mUUID) ) { return LLFontGL::BOLD; } @@ -3806,7 +3852,7 @@ LLFontGL::StyleFlags LLGestureBridge::getLabelStyle() const std::string LLGestureBridge::getLabelSuffix() const { - if( LLGestureManager::instance().isGestureActive(mUUID) ) + if( LLGestureMgr::instance().isGestureActive(mUUID) ) { LLStringUtil::format_map_t args; args["[GESLABEL]"] = LLItemBridge::getLabelSuffix(); @@ -3819,11 +3865,11 @@ std::string LLGestureBridge::getLabelSuffix() const } // virtual -void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLGestureBridge::performAction(LLInventoryModel* model, std::string action) { if (isAddAction(action)) { - LLGestureManager::instance().activateGesture(mUUID); + LLGestureMgr::instance().activateGesture(mUUID); LLViewerInventoryItem* item = gInventory.getItem(mUUID); if (!item) return; @@ -3835,7 +3881,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode } else if (isRemoveAction(action)) { - LLGestureManager::instance().deactivateGesture(mUUID); + LLGestureMgr::instance().deactivateGesture(mUUID); LLViewerInventoryItem* item = gInventory.getItem(mUUID); if (!item) return; @@ -3847,17 +3893,17 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode } else if("play" == action) { - if(!LLGestureManager::instance().isGestureActive(mUUID)) + if(!LLGestureMgr::instance().isGestureActive(mUUID)) { // we need to inform server about gesture activating to be consistent with LLPreviewGesture and LLGestureComboList. BOOL inform_server = TRUE; BOOL deactivate_similar = FALSE; - LLGestureManager::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID)); + LLGestureMgr::instance().setGestureLoadedCallback(mUUID, boost::bind(&LLGestureBridge::playGesture, mUUID)); LLViewerInventoryItem* item = gInventory.getItem(mUUID); llassert(item); if (item) { - LLGestureManager::instance().activateGestureWithAsset(mUUID, item->getAssetUUID(), inform_server, deactivate_similar); + LLGestureMgr::instance().activateGestureWithAsset(mUUID, item->getAssetUUID(), inform_server, deactivate_similar); } } else @@ -3865,7 +3911,7 @@ void LLGestureBridge::performAction(LLFolderView* folder, LLInventoryModel* mode playGesture(mUUID); } } - else LLItemBridge::performAction(folder, model, action); + else LLItemBridge::performAction(model, action); } void LLGestureBridge::openItem() @@ -3877,12 +3923,12 @@ void LLGestureBridge::openItem() LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } /* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); - } + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); + preview->setFocus(TRUE); + } */ } @@ -3899,7 +3945,7 @@ BOOL LLGestureBridge::removeItem() // This will also force close the preview window, if it exists. // This may actually delete *this, if mUUID is in the COF. - LLGestureManager::instance().deactivateGesture(item_id); + LLGestureMgr::instance().deactivateGesture(item_id); // If deactivateGesture deleted *this, then return out immediately. if (!model->getObject(item_id)) @@ -3921,6 +3967,11 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (!is_sidepanel) @@ -3932,7 +3983,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); items.push_back(std::string("Gesture Separator")); - if (LLGestureManager::instance().isGestureActive(getUUID())) + if (LLGestureMgr::instance().isGestureActive(getUUID())) { items.push_back(std::string("Deactivate")); } @@ -3947,13 +3998,13 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // static void LLGestureBridge::playGesture(const LLUUID& item_id) { - if (LLGestureManager::instance().isGesturePlaying(item_id)) + if (LLGestureMgr::instance().isGesturePlaying(item_id)) { - LLGestureManager::instance().stopGesture(item_id); + LLGestureMgr::instance().stopGesture(item_id); } else { - LLGestureManager::instance().playGesture(item_id); + LLGestureMgr::instance().playGesture(item_id); } } @@ -3979,6 +4030,11 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Animation Open")); items.push_back(std::string("Properties")); @@ -3994,7 +4050,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } // virtual -void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLAnimationBridge::performAction(LLInventoryModel* model, std::string action) { if ((action == "playworld") || (action == "playlocal")) { @@ -4013,7 +4069,7 @@ void LLAnimationBridge::performAction(LLFolderView* folder, LLInventoryModel* mo } else { - LLItemBridge::performAction(folder, model, action); + LLItemBridge::performAction(model, action); } } @@ -4026,11 +4082,11 @@ void LLAnimationBridge::openItem() LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } /* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); - } + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); + } */ } @@ -4041,12 +4097,17 @@ void LLAnimationBridge::openItem() // static LLUUID LLObjectBridge::sContextMenuItemID; -LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags) : -LLItemBridge(inventory, uuid), mInvType(type) +LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags) : + LLItemBridge(inventory, root, uuid), + mInvType(type) { mAttachPt = (flags & 0xff); // low bye of inventory flags - mIsMultiObject = ( flags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; + mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE; } LLUIImagePtr LLObjectBridge::getIcon() const @@ -4066,7 +4127,7 @@ LLInventoryObject* LLObjectBridge::getObject() const } // virtual -void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLObjectBridge::performAction(LLInventoryModel* model, std::string action) { if (isAddAction(action)) { @@ -4077,7 +4138,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model { rez_attachment(item, NULL); } - else if(item && item->isComplete()) + else if(item && item->isFinished()) { // must be in library. copy it to our inventory and put it on. LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0); @@ -4110,7 +4171,7 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model } } } - else LLItemBridge::performAction(folder, model, action); + else LLItemBridge::performAction(model, action); } void LLObjectBridge::openItem() @@ -4128,7 +4189,7 @@ void LLObjectBridge::openItem() // Disable old properties floater; this is replaced by the sidepanel. /* - LLFloaterReg::showInstance("properties", mUUID); + LLFloaterReg::showInstance("properties", mUUID); */ } @@ -4154,8 +4215,7 @@ std::string LLObjectBridge::getLabelSuffix() const { if (get_is_item_worn(mUUID)) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - std::string attachment_point_name = avatar->getAttachedPointName(mUUID); + std::string attachment_point_name = gAgentAvatarp->getAttachedPointName(mUUID); // e.g. "(worn on ...)" / "(attached to ...)" LLStringUtil::format_map_t args; @@ -4174,10 +4234,10 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach payload["item_id"] = item->getLinkedUUID(); // Wear the base object in case this is a link. S32 attach_pt = 0; - if (gAgent.getAvatarObject() && attachment) + if (isAgentAvatarValid() && attachment) { - for (LLVOAvatar::attachment_map_t::iterator iter = gAgent.getAvatarObject()->mAttachmentPoints.begin(); - iter != gAgent.getAvatarObject()->mAttachmentPoints.end(); ++iter) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter) { if (iter->second == attachment) { @@ -4203,9 +4263,7 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach bool confirm_replace_attachment_rez(const LLSD& notification, const LLSD& response) { - LLVOAvatar *avatarp = gAgent.getAvatarObject(); - - if (!avatarp->canAttachMoreObjects()) + if (!gAgentAvatarp->canAttachMoreObjects()) { LLSD args; args["MAX_ATTACHMENTS"] = llformat("%d", MAX_AGENT_ATTACHMENTS); @@ -4253,6 +4311,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (!is_sidepanel) @@ -4267,11 +4330,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) LLInventoryItem *item = getItem(); if(item) { - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - if( !avatarp ) - { - return; - } + if (!isAgentAvatarValid()) return; if( get_is_item_worn( mUUID ) ) { @@ -4287,7 +4346,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) // commented out for DEV-32347 //items.push_back(std::string("Restore to Last Position")); - if (!avatarp->canAttachMoreObjects()) + if (!gAgentAvatarp->canAttachMoreObjects()) { disabled_items.push_back(std::string("Object Wear")); disabled_items.push_back(std::string("Attach To")); @@ -4295,15 +4354,14 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } LLMenuGL* attach_menu = menu.findChildMenuByName("Attach To", TRUE); LLMenuGL* attach_hud_menu = menu.findChildMenuByName("Attach To HUD", TRUE); - LLVOAvatar *avatarp = gAgent.getAvatarObject(); if (attach_menu && (attach_menu->getChildCount() == 0) && attach_hud_menu && (attach_hud_menu->getChildCount() == 0) - && avatarp) + && isAgentAvatarValid()) { - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -4353,11 +4411,10 @@ BOOL LLObjectBridge::renameItem(const std::string& new_name) model->notifyObservers(); - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar ) + if (isAgentAvatarValid()) { - LLViewerObject* obj = avatar->getWornAttachment( item->getUUID() ); - if( obj ) + LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() ); + if(obj) { LLSelectMgr::getInstance()->deselectAll(); LLSelectMgr::getInstance()->addAsIndividual( obj, SELECT_ALL_TES, FALSE ); @@ -4388,19 +4445,25 @@ void LLLSLTextBridge::openItem() { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } - /* - LLViewerInventoryItem* item = getItem(); - if (item) - { - LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES); - } - */ } // +=================================================+ // | LLWearableBridge | // +=================================================+ +LLWearableBridge::LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + EWearableType wearable_type) : + LLItemBridge(inventory, root, uuid), + mAssetType( asset_type ), + mInvType(inv_type), + mWearableType(wearable_type) +{ +} + // *NOTE: hack to get from avatar inventory to avatar void wear_inventory_item_on_avatar( LLInventoryItem* item ) { @@ -4409,7 +4472,7 @@ void wear_inventory_item_on_avatar( LLInventoryItem* item ) lldebugs << "wear_inventory_item_on_avatar( " << item->getName() << " )" << llendl; - LLAppearanceManager::instance().addCOFItemLink(item); + LLAppearanceMgr::instance().addCOFItemLink(item); } } @@ -4421,10 +4484,10 @@ void wear_add_inventory_item_on_avatar( LLInventoryItem* item ) << " )" << llendl; LLWearableList::instance().getAsset(item->getAssetUUID(), - item->getName(), - item->getType(), - LLWearableBridge::onWearAddOnAvatarArrived, - new LLUUID(item->getUUID())); + item->getName(), + item->getType(), + LLWearableBridge::onWearAddOnAvatarArrived, + new LLUUID(item->getUUID())); } } @@ -4546,7 +4609,7 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, LLUUID category_ LLViewerInventoryItem *gest_item = gest_item_array.get(i); if (get_is_item_worn(gest_item->getUUID())) { - LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); + LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() ); gInventory.updateItem( gest_item ); gInventory.notifyObservers(); } @@ -4584,7 +4647,7 @@ LLUIImagePtr LLWearableBridge::getIcon() const } // virtual -void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLWearableBridge::performAction(LLInventoryModel* model, std::string action) { if (isAddAction(action)) { @@ -4604,7 +4667,7 @@ void LLWearableBridge::performAction(LLFolderView* folder, LLInventoryModel* mod removeFromAvatar(); return; } - else LLItemBridge::performAction(folder, model, action); + else LLItemBridge::performAction(model, action); } void LLWearableBridge::openItem() @@ -4615,42 +4678,6 @@ void LLWearableBridge::openItem() { LLInvFVBridgeAction::doAction(item->getType(),mUUID,getInventoryModel()); } - /* - if( isItemInTrash() ) - { - LLNotificationsUtil::add("CannotWearTrash"); - } - else if(isAgentInventory()) - { - if( !get_is_item_worn( mUUID ) ) - { - wearOnAvatar(); - } - } - else - { - // must be in the inventory library. copy it to our inventory - // and put it on right away. - LLViewerInventoryItem* item = getItem(); - if(item && item->isComplete()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else if(item) - { - // *TODO: We should fetch the item details, and then do - // the operation above. - LLNotificationsUtil::add("CannotWearInfoNotComplete"); - } - } - */ } void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -4678,6 +4705,11 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) can_open = FALSE; } + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (can_open && !is_sidepanel) @@ -4749,7 +4781,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data) if(!self->isAgentInventory()) { LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem(); - if(!item || !item->isComplete()) return FALSE; + if(!item || !item->isFinished()) return FALSE; } return (!get_is_item_worn(self->mUUID)); } @@ -4906,10 +4938,10 @@ void LLWearableBridge::editOnAvatar() if (gFloaterCustomize) gFloaterCustomize->setCurrentWearableType( wearable->getType() ); - if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() ) + if( CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() ) { // Start Avatar Customization - gAgent.changeCameraToCustomizeAvatar(); + gAgentCamera.changeCameraToCustomizeAvatar(); } } } @@ -4960,34 +4992,21 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES ) ) //&& //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) { - // MULTI_WEARABLE: FIXME HACK - always remove all bool do_remove_all = false; - gAgentWearables.removeWearable( type, do_remove_all, 0 ); + U32 index = gAgentWearables.getWearableIndex(wearable); + gAgentWearables.removeWearable( type, do_remove_all, index ); } } } // Find and remove this item from the COF. - // FIXME 2.1 - call removeCOFItemLinks in llappearancemgr instead. - LLInventoryModel::item_array_t items = gInventory.collectLinkedItems(item_id, LLAppearanceManager::instance().getCOF()); - if (items.size() != 1) - { - llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl; - } - for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); - iter != items.end(); - ++iter) - { - const LLViewerInventoryItem *linked_item = (*iter); - const LLUUID &item_id = linked_item->getUUID(); - gInventory.purgeObject(item_id); - } + LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); gInventory.notifyObservers(); delete on_remove_struct; } -/* static */ +// static void LLWearableBridge::removeAllClothesFromAvatar() { // Remove COF links. @@ -5007,20 +5026,7 @@ void LLWearableBridge::removeAllClothesFromAvatar() continue; // Find and remove this item from the COF. - LLInventoryModel::item_array_t items = gInventory.collectLinkedItems( - item_id, LLAppearanceManager::instance().getCOF()); - if (items.size() != 1) - { - llwarns << "Found " << items.size() << " COF links to " << item_id.asString() << ", expected 1" << llendl; - } - for (LLInventoryModel::item_array_t::const_iterator iter = items.begin(); - iter != items.end(); - ++iter) - { - const LLViewerInventoryItem *linked_item = (*iter); - const LLUUID &item_id = linked_item->getUUID(); - gInventory.purgeObject(item_id); - } + LLAppearanceMgr::instance().removeCOFItemLinks(item_id,false); } gInventory.notifyObservers(); @@ -5028,7 +5034,7 @@ void LLWearableBridge::removeAllClothesFromAvatar() LLAgentWearables::userRemoveAllClothes(); } -/* static */ +// static void LLWearableBridge::removeItemFromAvatar(LLViewerInventoryItem *item) { if (item) @@ -5050,61 +5056,124 @@ void LLWearableBridge::removeFromAvatar() } } -LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, - const LLUUID& uuid,LLInventoryModel* model) +// +=================================================+ +// | LLLinkItemBridge | +// +=================================================+ +// For broken item links +std::string LLLinkItemBridge::sPrefix("Link: "); +LLUIImagePtr LLLinkItemBridge::getIcon() const { - LLInvFVBridgeAction* action = NULL; - switch(asset_type) + if (LLViewerInventoryItem *item = getItem()) { - case LLAssetType::AT_TEXTURE: - action = new LLTextureBridgeAction(uuid,model); - break; - - case LLAssetType::AT_SOUND: - action = new LLSoundBridgeAction(uuid,model); - break; - - case LLAssetType::AT_LANDMARK: - action = new LLLandmarkBridgeAction(uuid,model); - break; - - case LLAssetType::AT_CALLINGCARD: - action = new LLCallingCardBridgeAction(uuid,model); - break; - - case LLAssetType::AT_OBJECT: - action = new LLObjectBridgeAction(uuid,model); - break; - - case LLAssetType::AT_NOTECARD: - action = new LLNotecardBridgeAction(uuid,model); - break; - - case LLAssetType::AT_ANIMATION: - action = new LLAnimationBridgeAction(uuid,model); - break; - - case LLAssetType::AT_GESTURE: - action = new LLGestureBridgeAction(uuid,model); - break; + U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags + bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - case LLAssetType::AT_LSL_TEXT: - action = new LLLSLTextBridgeAction(uuid,model); - break; + return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); + } + return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); +} +void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + // *TODO: Translate + lldebugs << "LLLink::buildContextMenu()" << llendl; + menuentry_vec_t items; + menuentry_vec_t disabled_items; - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_BODYPART: - action = new LLWearableBridgeAction(uuid,model); + items.push_back(std::string("Find Original")); + disabled_items.push_back(std::string("Find Original")); + + if(isItemInTrash()) + { + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Properties")); + addDeleteContextMenuOptions(items, disabled_items); + } + hide_context_entries(menu, items, disabled_items); +} - break; +// +=================================================+ +// | LLLinkBridge | +// +=================================================+ +// For broken folder links. +std::string LLLinkFolderBridge::sPrefix("Link: "); +LLUIImagePtr LLLinkFolderBridge::getIcon() const +{ + LLFolderType::EType preferred_type = LLFolderType::FT_NONE; + if (LLViewerInventoryItem *item = getItem()) + { + if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) + { + preferred_type = cat->getPreferredType(); + } + } + return LLFolderBridge::getIcon(preferred_type); +} +void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + // *TODO: Translate + lldebugs << "LLLink::buildContextMenu()" << llendl; + menuentry_vec_t items; + menuentry_vec_t disabled_items; - default: - break; + if (isItemInTrash()) + { + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Find Original")); + addDeleteContextMenuOptions(items, disabled_items); + } + hide_context_entries(menu, items, disabled_items); +} +void LLLinkFolderBridge::performAction(LLInventoryModel* model, std::string action) +{ + if ("goto" == action) + { + gotoItem(); + return; + } + LLItemBridge::performAction(model,action); +} +void LLLinkFolderBridge::gotoItem() +{ + const LLUUID &cat_uuid = getFolderID(); + if (!cat_uuid.isNull()) + { + if (LLFolderViewItem *base_folder = mRoot->getItemByID(cat_uuid)) + { + if (LLInventoryModel* model = getInventoryModel()) + { + model->fetchDescendentsOf(cat_uuid); + } + base_folder->setOpen(TRUE); + mRoot->setSelectionFromRoot(base_folder,TRUE); + mRoot->scrollToShowSelection(); + } } - return action; } +const LLUUID &LLLinkFolderBridge::getFolderID() const +{ + if (LLViewerInventoryItem *link_item = getItem()) + { + if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory()) + { + const LLUUID& cat_uuid = cat->getUUID(); + return cat_uuid; + } + } + return LLUUID::null; +} + +/******************************************************************************** + ** + ** BRIDGE ACTIONS + **/ -//static +// static void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type, const LLUUID& uuid,LLInventoryModel* model) { @@ -5116,7 +5185,7 @@ void LLInvFVBridgeAction::doAction(LLAssetType::EType asset_type, } } -//static +// static void LLInvFVBridgeAction::doAction(const LLUUID& uuid, LLInventoryModel* model) { llassert(model); @@ -5136,129 +5205,231 @@ void LLInvFVBridgeAction::doAction(const LLUUID& uuid, LLInventoryModel* model) LLViewerInventoryItem* LLInvFVBridgeAction::getItem() const { - if(mModel) + if (mModel) return (LLViewerInventoryItem*)mModel->getItem(mUUID); return NULL; } -//virtual -void LLTextureBridgeAction::doIt() +class LLTextureBridgeAction: public LLInvFVBridgeAction { - if (getItem()) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); + if (getItem()) + { + LLFloaterReg::showInstance("preview_texture", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLTextureBridgeAction(){} +protected: + LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -//virtual -void LLSoundBridgeAction::doIt() +class LLSoundBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if(item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_sound", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLSoundBridgeAction(){} +protected: + LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -//virtual -void LLLandmarkBridgeAction::doIt() +class LLLandmarkBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if( item ) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - // Opening (double-clicking) a landmark immediately teleports, - // but warns you the first time. - LLSD payload; - payload["asset_id"] = item->getAssetUUID(); - - LLSD args; - args["LOCATION"] = item->getName(); - - LLNotificationsUtil::add("TeleportFromLandmark", args, payload); + LLViewerInventoryItem* item = getItem(); + if (item) + { + // Opening (double-clicking) a landmark immediately teleports, + // but warns you the first time. + LLSD payload; + payload["asset_id"] = item->getAssetUUID(); + + LLSD args; + args["LOCATION"] = item->getName(); + + LLNotificationsUtil::add("TeleportFromLandmark", args, payload); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLLandmarkBridgeAction(){} +protected: + LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -//virtual -void LLCallingCardBridgeAction::doIt() +class LLCallingCardBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if(item && item->getCreatorUUID().notNull()) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLAvatarActions::showProfile(item->getCreatorUUID()); + LLViewerInventoryItem* item = getItem(); + if (item && item->getCreatorUUID().notNull()) + { + LLAvatarActions::showProfile(item->getCreatorUUID()); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLCallingCardBridgeAction(){} +protected: + LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} - LLInvFVBridgeAction::doIt(); -} +}; -//virtual -void -LLNotecardBridgeAction::doIt() +class LLNotecardBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_notecard", LLSD(item->getUUID()), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLNotecardBridgeAction(){} +protected: + LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -//virtual -void LLGestureBridgeAction::doIt() +class LLGestureBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); - preview->setFocus(TRUE); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLPreviewGesture* preview = LLPreviewGesture::show(mUUID, LLUUID::null); + preview->setFocus(TRUE); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLGestureBridgeAction(){} +protected: + LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - -//virtual -void LLAnimationBridgeAction::doIt() +class LLAnimationBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_anim", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLAnimationBridgeAction(){} +protected: + LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - - -//virtual -void LLObjectBridgeAction::doIt() +class LLObjectBridgeAction: public LLInvFVBridgeAction { - /* - LLFloaterReg::showInstance("properties", mUUID); - */ - LLInvFVBridgeAction::doIt(); -} - + friend class LLInvFVBridgeAction; +public: + virtual void doIt() + { + /* + LLFloaterReg::showInstance("properties", mUUID); + */ + LLInvFVBridgeAction::doIt(); + } + virtual ~LLObjectBridgeAction(){} +protected: + LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; -//virtual -void LLLSLTextBridgeAction::doIt() +class LLLSLTextBridgeAction: public LLInvFVBridgeAction { - LLViewerInventoryItem* item = getItem(); - if (item) + friend class LLInvFVBridgeAction; +public: + virtual void doIt() { - LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLFloaterReg::showInstance("preview_script", LLSD(mUUID), TAKE_FOCUS_YES); + } + LLInvFVBridgeAction::doIt(); } + virtual ~LLLSLTextBridgeAction(){} +protected: + LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} +}; - LLInvFVBridgeAction::doIt(); -} - +class LLWearableBridgeAction: public LLInvFVBridgeAction +{ + friend class LLInvFVBridgeAction; +public: + virtual void doIt() + { + if(isItemInTrash()) + { + LLNotificationsUtil::add("CannotWearTrash"); + } + else if(isAgentInventory()) + { + if(!get_is_item_worn(mUUID)) + { + wearOnAvatar(); + } + } + else + { + // must be in the inventory library. copy it to our inventory + // and put it on right away. + LLViewerInventoryItem* item = getItem(); + if(item && item->isFinished()) + { + LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); + copy_inventory_item( + gAgent.getID(), + item->getPermissions().getOwner(), + item->getUUID(), + LLUUID::null, + std::string(), + cb); + } + else if(item) + { + // *TODO: We should fetch the item details, and then do + // the operation above. + LLNotificationsUtil::add("CannotWearInfoNotComplete"); + } + } + LLInvFVBridgeAction::doIt(); + } + virtual ~LLWearableBridgeAction(){} +protected: + LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model) : LLInvFVBridgeAction(id,model) {} + BOOL isItemInTrash() const; + // return true if the item is in agent inventory. if false, it + // must be lost or in the inventory library. + BOOL isAgentInventory() const; + void wearOnAvatar(); +}; BOOL LLWearableBridgeAction::isItemInTrash() const { @@ -5305,167 +5476,50 @@ void LLWearableBridgeAction::wearOnAvatar() } } -//virtual -void LLWearableBridgeAction::doIt() -{ - if(isItemInTrash()) - { - LLNotificationsUtil::add("CannotWearTrash"); - } - else if(isAgentInventory()) - { - if(!get_is_item_worn(mUUID)) - { - wearOnAvatar(); - } - } - else - { - // must be in the inventory library. copy it to our inventory - // and put it on right away. - LLViewerInventoryItem* item = getItem(); - if(item && item->isComplete()) - { - LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback(); - copy_inventory_item( - gAgent.getID(), - item->getPermissions().getOwner(), - item->getUUID(), - LLUUID::null, - std::string(), - cb); - } - else if(item) - { - // *TODO: We should fetch the item details, and then do - // the operation above. - LLNotificationsUtil::add("CannotWearInfoNotComplete"); - } - } - - LLInvFVBridgeAction::doIt(); -} - -// +=================================================+ -// | LLLinkItemBridge | -// +=================================================+ -// For broken links - -std::string LLLinkItemBridge::sPrefix("Link: "); - - -LLUIImagePtr LLLinkItemBridge::getIcon() const -{ - if (LLViewerInventoryItem *item = getItem()) - { - U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags - bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags(); - - return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi); - } - return get_item_icon(LLAssetType::AT_LINK, LLInventoryType::IT_NONE, 0, FALSE); -} - -void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; - menuentry_vec_t items; - menuentry_vec_t disabled_items; - - items.push_back(std::string("Find Original")); - disabled_items.push_back(std::string("Find Original")); - - if(isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else - { - items.push_back(std::string("Properties")); - addDeleteContextMenuOptions(items, disabled_items); - } - hide_context_entries(menu, items, disabled_items); -} - - -// +=================================================+ -// | LLLinkBridge | -// +=================================================+ -// For broken links. - -std::string LLLinkFolderBridge::sPrefix("Link: "); - - -LLUIImagePtr LLLinkFolderBridge::getIcon() const -{ - LLFolderType::EType preferred_type = LLFolderType::FT_NONE; - if (LLViewerInventoryItem *item = getItem()) - { - if (const LLViewerInventoryCategory* cat = item->getLinkedCategory()) - { - preferred_type = cat->getPreferredType(); - } - } - return LLFolderBridge::getIcon(preferred_type); -} - -void LLLinkFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - // *TODO: Translate - lldebugs << "LLLink::buildContextMenu()" << llendl; - menuentry_vec_t items; - menuentry_vec_t disabled_items; - - if (isItemInTrash()) - { - addTrashContextMenuOptions(items, disabled_items); - } - else - { - items.push_back(std::string("Find Original")); - addDeleteContextMenuOptions(items, disabled_items); - } - hide_context_entries(menu, items, disabled_items); -} - -void LLLinkFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) -{ - if ("goto" == action) - { - gotoItem(folder); - return; - } - LLItemBridge::performAction(folder,model,action); -} - -void LLLinkFolderBridge::gotoItem(LLFolderView *folder) +LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, + const LLUUID& uuid, + LLInventoryModel* model) { - const LLUUID &cat_uuid = getFolderID(); - if (!cat_uuid.isNull()) + LLInvFVBridgeAction* action = NULL; + switch(asset_type) { - if (LLFolderViewItem *base_folder = folder->getItemByID(cat_uuid)) - { - if (LLInventoryModel* model = getInventoryModel()) - { - model->fetchDescendentsOf(cat_uuid); - } - base_folder->setOpen(TRUE); - folder->setSelectionFromRoot(base_folder,TRUE); - folder->scrollToShowSelection(); - } + case LLAssetType::AT_TEXTURE: + action = new LLTextureBridgeAction(uuid,model); + break; + case LLAssetType::AT_SOUND: + action = new LLSoundBridgeAction(uuid,model); + break; + case LLAssetType::AT_LANDMARK: + action = new LLLandmarkBridgeAction(uuid,model); + break; + case LLAssetType::AT_CALLINGCARD: + action = new LLCallingCardBridgeAction(uuid,model); + break; + case LLAssetType::AT_OBJECT: + action = new LLObjectBridgeAction(uuid,model); + break; + case LLAssetType::AT_NOTECARD: + action = new LLNotecardBridgeAction(uuid,model); + break; + case LLAssetType::AT_ANIMATION: + action = new LLAnimationBridgeAction(uuid,model); + break; + case LLAssetType::AT_GESTURE: + action = new LLGestureBridgeAction(uuid,model); + break; + case LLAssetType::AT_LSL_TEXT: + action = new LLLSLTextBridgeAction(uuid,model); + break; + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + action = new LLWearableBridgeAction(uuid,model); + break; + default: + break; } + return action; } -const LLUUID &LLLinkFolderBridge::getFolderID() const -{ - if (LLViewerInventoryItem *link_item = getItem()) - { - if (const LLViewerInventoryCategory *cat = link_item->getLinkedCategory()) - { - const LLUUID& cat_uuid = cat->getUUID(); - return cat_uuid; - } - } - return LLUUID::null; -} +/** Bridge Actions + ** + ********************************************************************************/ diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 32504091cb..f378d219f6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -44,78 +44,13 @@ class LLInventoryPanel; class LLInventoryModel; class LLMenuGL; - -enum EInventoryIcon -{ - TEXTURE_ICON_NAME, - SOUND_ICON_NAME, - CALLINGCARD_ONLINE_ICON_NAME, - CALLINGCARD_OFFLINE_ICON_NAME, - LANDMARK_ICON_NAME, - LANDMARK_VISITED_ICON_NAME, - SCRIPT_ICON_NAME, - CLOTHING_ICON_NAME, - OBJECT_ICON_NAME, - OBJECT_MULTI_ICON_NAME, - NOTECARD_ICON_NAME, - BODYPART_ICON_NAME, - SNAPSHOT_ICON_NAME, - - BODYPART_SHAPE_ICON_NAME, - BODYPART_SKIN_ICON_NAME, - BODYPART_HAIR_ICON_NAME, - BODYPART_EYES_ICON_NAME, - CLOTHING_SHIRT_ICON_NAME, - CLOTHING_PANTS_ICON_NAME, - CLOTHING_SHOES_ICON_NAME, - CLOTHING_SOCKS_ICON_NAME, - CLOTHING_JACKET_ICON_NAME, - CLOTHING_GLOVES_ICON_NAME, - CLOTHING_UNDERSHIRT_ICON_NAME, - CLOTHING_UNDERPANTS_ICON_NAME, - CLOTHING_SKIRT_ICON_NAME, - CLOTHING_ALPHA_ICON_NAME, - CLOTHING_TATTOO_ICON_NAME, - - ANIMATION_ICON_NAME, - GESTURE_ICON_NAME, - - LINKITEM_ICON_NAME, - LINKFOLDER_ICON_NAME, - - ICON_NAME_COUNT -}; - -extern std::string ICON_NAME[ICON_NAME_COUNT]; - -typedef std::pair<LLUUID, LLUUID> two_uuids_t; -typedef std::list<two_uuids_t> two_uuids_list_t; -typedef std::pair<LLUUID, two_uuids_list_t> uuid_move_list_t; - -struct LLMoveInv -{ - LLUUID mObjectID; - LLUUID mCategoryID; - two_uuids_list_t mMoveList; - void (*mCallback)(S32, void*); - void* mUserData; -}; - -struct LLAttachmentRezAction -{ - LLUUID mItemID; - S32 mAttachPt; -}; +class LLCallingCardObserver; +class LLViewerJointAttachment; typedef std::vector<std::string> menuentry_vec_t; -const std::string safe_inv_type_lookup(LLInventoryType::EType inv_type); -void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries); - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridge (& its derived classes) +// Class LLInvFVBridge // // Short for Inventory-Folder-View-Bridge. This is an // implementation class to be able to view inventory items. @@ -134,6 +69,7 @@ public: LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00); virtual ~LLInvFVBridge() {} @@ -175,7 +111,7 @@ public: virtual void pasteFromClipboard() {} virtual void pasteLinkFromClipboard() {} void getClipboardEntries(bool show_asset_id, menuentry_vec_t &items, - menuentry_vec_t &disabled_items, U32 flags); + menuentry_vec_t &disabled_items, U32 flags); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL startDrag(EDragAndDropType* type, LLUUID* id) const; virtual BOOL dragOrDrop(MASK mask, BOOL drop, @@ -189,6 +125,8 @@ public: // Allow context menus to be customized for side panel. bool isInOutfitsSidePanel() const; + bool canShare(); + //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. //-------------------------------------------------------------------- @@ -199,7 +137,7 @@ protected: menuentry_vec_t &disabled_items); protected: - LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid); + LLInvFVBridge(LLInventoryPanel* inventory, LLFolderView* root, const LLUUID& uuid); LLInventoryObject* getInventoryObject() const; LLInventoryModel* getInventoryModel() const; @@ -221,40 +159,88 @@ protected: void removeBatchNoCheck(LLDynamicArray<LLFolderViewEventListener*>& batch); protected: LLHandle<LLPanel> mInventoryPanel; + LLFolderView* mRoot; const LLUUID mUUID; // item id LLInventoryType::EType mInvType; void purgeItem(LLInventoryModel *model, const LLUUID &uuid); }; -/** - * This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. - * It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. - */ +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInvFVBridge +// +// This class intended to build Folder View Bridge via LLInvFVBridge::createBridge. +// It can be overridden with another way of creation necessary Inventory-Folder-View-Bridge. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryFVBridgeBuilder { public: - virtual ~LLInventoryFVBridgeBuilder(){} + virtual ~LLInventoryFVBridgeBuilder() {} virtual LLInvFVBridge* createBridge(LLAssetType::EType asset_type, LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid, U32 flags = 0x00) const; }; +// Used by LLItemBridge::getIcon +enum EInventoryIcon +{ + TEXTURE_ICON_NAME, + SOUND_ICON_NAME, + CALLINGCARD_ONLINE_ICON_NAME, + CALLINGCARD_OFFLINE_ICON_NAME, + LANDMARK_ICON_NAME, + LANDMARK_VISITED_ICON_NAME, + SCRIPT_ICON_NAME, + CLOTHING_ICON_NAME, + OBJECT_ICON_NAME, + OBJECT_MULTI_ICON_NAME, + NOTECARD_ICON_NAME, + BODYPART_ICON_NAME, + SNAPSHOT_ICON_NAME, + + BODYPART_SHAPE_ICON_NAME, + BODYPART_SKIN_ICON_NAME, + BODYPART_HAIR_ICON_NAME, + BODYPART_EYES_ICON_NAME, + CLOTHING_SHIRT_ICON_NAME, + CLOTHING_PANTS_ICON_NAME, + CLOTHING_SHOES_ICON_NAME, + CLOTHING_SOCKS_ICON_NAME, + CLOTHING_JACKET_ICON_NAME, + CLOTHING_GLOVES_ICON_NAME, + CLOTHING_UNDERSHIRT_ICON_NAME, + CLOTHING_UNDERPANTS_ICON_NAME, + CLOTHING_SKIRT_ICON_NAME, + CLOTHING_ALPHA_ICON_NAME, + CLOTHING_TATTOO_ICON_NAME, + + ANIMATION_ICON_NAME, + GESTURE_ICON_NAME, + + LINKITEM_ICON_NAME, + LINKFOLDER_ICON_NAME, + + ICON_NAME_COUNT +}; +extern std::string ICON_NAME[ICON_NAME_COUNT]; class LLItemBridge : public LLInvFVBridge { public: - LLItemBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLInvFVBridge(inventory, uuid) {} + LLItemBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid) {} - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void selectItem(); virtual void restoreItem(); virtual void restoreToWorld(); - virtual void gotoItem(LLFolderView *folder); + virtual void gotoItem(); virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const; virtual std::string getLabelSuffix() const; @@ -283,7 +269,6 @@ protected: mutable std::string mDisplayName; }; - class LLFolderBridge : public LLInvFVBridge { friend class LLInvFVBridge; @@ -292,7 +277,7 @@ public: BOOL drop); BOOL dragCategoryIntoFolder(LLInventoryCategory* inv_category, BOOL drop); - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void closeItem(); virtual BOOL isItemRenameable() const; @@ -332,9 +317,10 @@ public: LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) - : LLInvFVBridge(inventory, uuid), - + LLFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLInvFVBridge(inventory, root, uuid), mCallingCards(FALSE), mWearables(FALSE), mMenu(NULL) {} @@ -383,11 +369,12 @@ public: LLUIImagePtr getIcon() const; protected: - LLScriptBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) : - LLItemBridge(inventory, uuid) {} + LLScriptBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid ) : + LLItemBridge(inventory, root, uuid) {} }; - class LLTextureBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -395,11 +382,16 @@ public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); protected: - LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type) : - LLItemBridge(inventory, uuid), mInvType(type) {} + LLTextureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type) : + LLItemBridge(inventory, root, uuid), + mInvType(type) + {} bool canSaveTexture(void); LLInventoryType::EType mInvType; }; @@ -415,39 +407,30 @@ public: static void openSoundPreview(void*); protected: - LLSoundBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} + LLSoundBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} }; class LLLandmarkBridge : public LLItemBridge { friend class LLInvFVBridge; public: - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLUIImagePtr getIcon() const; virtual void openItem(); protected: - LLLandmarkBridge(LLInventoryPanel* inventory, const LLUUID& uuid, U32 flags = 0x00); - + LLLandmarkBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00); protected: BOOL mVisited; }; -class LLCallingCardBridge; - -class LLCallingCardObserver : public LLFriendObserver -{ -public: - LLCallingCardObserver(LLCallingCardBridge* bridge) : mBridgep(bridge) {} - virtual ~LLCallingCardObserver() { mBridgep = NULL; } - virtual void changed(U32 mask); - -protected: - LLCallingCardBridge* mBridgep; -}; - class LLCallingCardBridge : public LLItemBridge { friend class LLInvFVBridge; @@ -455,20 +438,18 @@ public: virtual std::string getLabelSuffix() const; //virtual const std::string& getDisplayName() const; virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - //virtual void renameItem(const std::string& new_name); - //virtual BOOL removeItem(); virtual BOOL dragOrDrop(MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data); void refreshFolderViewItem(); - protected: - LLCallingCardBridge( LLInventoryPanel* inventory, const LLUUID& uuid ); + LLCallingCardBridge(LLInventoryPanel* inventory, + LLFolderView* folder, + const LLUUID& uuid ); ~LLCallingCardBridge(); - protected: LLCallingCardObserver* mObserver; }; @@ -480,10 +461,11 @@ class LLNotecardBridge : public LLItemBridge public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - protected: - LLNotecardBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} + LLNotecardBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} }; class LLGestureBridge : public LLItemBridge @@ -497,7 +479,7 @@ public: virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual BOOL removeItem(); @@ -506,33 +488,35 @@ public: static void playGesture(const LLUUID& item_id); protected: - LLGestureBridge(LLInventoryPanel* inventory, const LLUUID& uuid) - : LLItemBridge(inventory, uuid) {} + LLGestureBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) + : LLItemBridge(inventory, root, uuid) {} }; - class LLAnimationBridge : public LLItemBridge { friend class LLInvFVBridge; public: - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual LLUIImagePtr getIcon() const; virtual void openItem(); protected: - LLAnimationBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} + LLAnimationBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} }; - class LLObjectBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual LLFontGL::StyleFlags getLabelStyle() const; virtual std::string getLabelSuffix() const; @@ -540,10 +524,12 @@ public: virtual BOOL renameItem(const std::string& new_name); LLInventoryObject* getObject() const; - protected: - LLObjectBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type, U32 flags); - + LLObjectBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLInventoryType::EType type, + U32 flags); protected: static LLUUID sContextMenuItemID; // Only valid while the context menu is open. LLInventoryType::EType mInvType; @@ -551,26 +537,25 @@ protected: BOOL mIsMultiObject; }; - class LLLSLTextBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - protected: - LLLSLTextBridge( LLInventoryPanel* inventory, const LLUUID& uuid ) : - LLItemBridge(inventory, uuid) {} + LLLSLTextBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid ) : + LLItemBridge(inventory, root, uuid) {} }; - class LLWearableBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual LLUIImagePtr getIcon() const; - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void openItem(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual std::string getLabelSuffix() const; @@ -596,13 +581,12 @@ public: void removeFromAvatar(); protected: - LLWearableBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLAssetType::EType asset_type, LLInventoryType::EType inv_type, EWearableType wearable_type) : - LLItemBridge(inventory, uuid), - mAssetType( asset_type ), - mInvType(inv_type), - mWearableType(wearable_type) - {} - + LLWearableBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLAssetType::EType asset_type, + LLInventoryType::EType inv_type, + EWearableType wearable_type); protected: LLAssetType::EType mAssetType; LLInventoryType::EType mInvType; @@ -614,41 +598,38 @@ class LLLinkItemBridge : public LLItemBridge friend class LLInvFVBridge; public: virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - protected: - LLLinkItemBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} - + LLLinkItemBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} protected: static std::string sPrefix; }; - class LLLinkFolderBridge : public LLItemBridge { friend class LLInvFVBridge; public: virtual const std::string& getPrefix() { return sPrefix; } - virtual LLUIImagePtr getIcon() const; virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); - virtual void gotoItem(LLFolderView *folder); - + virtual void performAction(LLInventoryModel* model, std::string action); + virtual void gotoItem(); protected: - LLLinkFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLItemBridge(inventory, uuid) {} + LLLinkFolderBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLItemBridge(inventory, root, uuid) {} const LLUUID &getFolderID() const; - protected: static std::string sPrefix; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInvFVBridgeAction (& its derived classes) +// Class LLInvFVBridgeAction // // This is an implementation class to be able to // perform action to view inventory items. @@ -658,159 +639,30 @@ class LLInvFVBridgeAction { public: // This method is a convenience function which creates the correct - // type of bridge action based on some basic information + // type of bridge action based on some basic information. static LLInvFVBridgeAction* createAction(LLAssetType::EType asset_type, - const LLUUID& uuid,LLInventoryModel* model); - + const LLUUID& uuid, + LLInventoryModel* model); static void doAction(LLAssetType::EType asset_type, const LLUUID& uuid, LLInventoryModel* model); static void doAction(const LLUUID& uuid, LLInventoryModel* model); - virtual void doIt() { }; - virtual ~LLInvFVBridgeAction(){}//need this because of warning on OSX + virtual void doIt() {}; + virtual ~LLInvFVBridgeAction() {} // need this because of warning on OSX protected: - LLInvFVBridgeAction(const LLUUID& id,LLInventoryModel* model):mUUID(id),mModel(model){} - + LLInvFVBridgeAction(const LLUUID& id, LLInventoryModel* model) : + mUUID(id), mModel(model) {} LLViewerInventoryItem* getItem() const; protected: - const LLUUID& mUUID; // item id + const LLUUID& mUUID; // item id LLInventoryModel* mModel; - }; - -class LLTextureBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLTextureBridgeAction(){} -protected: - LLTextureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLSoundBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLSoundBridgeAction(){} -protected: - LLSoundBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLLandmarkBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLLandmarkBridgeAction(){} -protected: - LLLandmarkBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLCallingCardBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLCallingCardBridgeAction(){} -protected: - LLCallingCardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLNotecardBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLNotecardBridgeAction(){} -protected: - LLNotecardBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLGestureBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLGestureBridgeAction(){} -protected: - LLGestureBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLAnimationBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLAnimationBridgeAction(){} -protected: - LLAnimationBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLObjectBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLObjectBridgeAction(){} -protected: - LLObjectBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLLSLTextBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLLSLTextBridgeAction(){} -protected: - LLLSLTextBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - - -class LLWearableBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt(); - virtual ~LLWearableBridgeAction(){} -protected: - LLWearableBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - - - BOOL isItemInTrash() const; - // return true if the item is in agent inventory. if false, it - // must be lost or in the inventory library. - BOOL isAgentInventory() const; - - void wearOnAvatar(); - -}; - void wear_inventory_item_on_avatar(LLInventoryItem* item); -class LLViewerJointAttachment; -void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attachment); +void rez_attachment(LLViewerInventoryItem* item, + LLViewerJointAttachment* attachment); // Move items from an in-world object's "Contents" folder to a specified // folder in agent inventory. @@ -820,13 +672,9 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, void (*callback)(S32, void*) = NULL, void* user_data = NULL); - - -void teleport_via_landmark(const LLUUID& asset_id); - // Utility function to hide all entries except those in the list void hide_context_entries(LLMenuGL& menu, - const menuentry_vec_t &entries_to_show, - const menuentry_vec_t &disabled_entries); + const menuentry_vec_t &entries_to_show, + const menuentry_vec_t &disabled_entries); #endif // LL_LLINVENTORYBRIDGE_H diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index cd20d64ca8..1a488175ac 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -37,7 +37,8 @@ // viewer includes #include "llfoldervieweventlistener.h" #include "llfolderviewitem.h" -#include "llinventorymodel.h" // gInventory.backgroundFetchActive() +#include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llviewercontrol.h" #include "llfolderview.h" @@ -713,7 +714,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (!gInventory.backgroundFetchActive() + if (!LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && filtered_by_type && !filtered_by_all_types) { diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 3553137f53..8487588404 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -41,6 +41,7 @@ #include "llagentwearables.h" #include "llcallingcard.h" #include "llfloaterreg.h" +#include "llinventorydefines.h" #include "llsdserialize.h" #include "llfiltereditor.h" #include "llspinctrl.h" @@ -86,6 +87,217 @@ BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; + +///---------------------------------------------------------------------------- +/// LLInventoryCollectFunctor implementations +///---------------------------------------------------------------------------- + +// static +bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) +{ + if (!item) + return false; + + bool allowed = false; + + switch(item->getType()) + { + case LLAssetType::AT_CALLINGCARD: + // not allowed + break; + + case LLAssetType::AT_OBJECT: + if (isAgentAvatarValid() && !gAgentAvatarp->isWearingAttachment(item->getUUID())) + { + allowed = true; + } + break; + + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_CLOTHING: + if(!gAgentWearables.isWearingItem(item->getUUID())) + { + allowed = true; + } + break; + default: + allowed = true; + break; + } + + return allowed; +} + +bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(mType == LLAssetType::AT_CATEGORY) + { + if(cat) return TRUE; + } + if(item) + { + if(item->getType() == mType) return TRUE; + } + return FALSE; +} + +bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(mType == LLAssetType::AT_CATEGORY) + { + if(cat) return FALSE; + } + if(item) + { + if(item->getType() == mType) return FALSE; + else return TRUE; + } + return TRUE; +} + +bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(mType == LLAssetType::AT_CATEGORY) + { + if(cat) + { + return TRUE; + } + } + if(item) + { + if(item->getType() == mType) + { + LLPermissions perm = item->getPermissions(); + if ((perm.getMaskBase() & mPerm) == mPerm) + { + return TRUE; + } + } + } + return FALSE; +} + +bool LLBuddyCollector::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + if(item) + { + if((LLAssetType::AT_CALLINGCARD == item->getType()) + && (!item->getCreatorUUID().isNull()) + && (item->getCreatorUUID() != gAgent.getID())) + { + return true; + } + } + return false; +} + + +bool LLUniqueBuddyCollector::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + if(item) + { + if((LLAssetType::AT_CALLINGCARD == item->getType()) + && (item->getCreatorUUID().notNull()) + && (item->getCreatorUUID() != gAgent.getID())) + { + mSeen.insert(item->getCreatorUUID()); + return true; + } + } + return false; +} + + +bool LLParticularBuddyCollector::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + if(item) + { + if((LLAssetType::AT_CALLINGCARD == item->getType()) + && (item->getCreatorUUID() == mBuddyID)) + { + return TRUE; + } + } + return FALSE; +} + + +bool LLNameCategoryCollector::operator()( + LLInventoryCategory* cat, LLInventoryItem* item) +{ + if(cat) + { + if (!LLStringUtil::compareInsensitive(mName, cat->getName())) + { + return true; + } + } + return false; +} + +bool LLFindCOFValidItems::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + // Valid COF items are: + // - links to wearables (body parts or clothing) + // - links to attachments + // - links to gestures + // - links to ensemble folders + LLViewerInventoryItem *linked_item = ((LLViewerInventoryItem*)item)->getLinkedItem(); + if (linked_item) + { + LLAssetType::EType type = linked_item->getType(); + return (type == LLAssetType::AT_CLOTHING || + type == LLAssetType::AT_BODYPART || + type == LLAssetType::AT_GESTURE || + type == LLAssetType::AT_OBJECT); + } + else + { + LLViewerInventoryCategory *linked_category = ((LLViewerInventoryItem*)item)->getLinkedCategory(); + // BAP remove AT_NONE support after ensembles are fully working? + return (linked_category && + ((linked_category->getPreferredType() == LLFolderType::FT_NONE) || + (LLFolderType::lookupIsEnsembleType(linked_category->getPreferredType())))); + } +} + +bool LLFindWearables::operator()(LLInventoryCategory* cat, + LLInventoryItem* item) +{ + if(item) + { + if((item->getType() == LLAssetType::AT_CLOTHING) + || (item->getType() == LLAssetType::AT_BODYPART)) + { + return TRUE; + } + } + return FALSE; +} + +///---------------------------------------------------------------------------- +/// LLAssetIDMatches +///---------------------------------------------------------------------------- +bool LLAssetIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + return (item && item->getAssetUUID() == mAssetID); +} + +///---------------------------------------------------------------------------- +/// LLLinkedItemIDMatches +///---------------------------------------------------------------------------- +bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + return (item && + (item->getIsLinkType()) && + (item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID. +} + void LLSaveFolderState::setApply(BOOL apply) { mApply = apply; @@ -197,7 +409,7 @@ void LLOpenFoldersWithSelection::doFolder(LLFolderViewFolder* folder) static void assign_clothing_bodypart_icon(EInventoryIcon &idx, U32 attachment_point) { - const EWearableType wearable_type = EWearableType(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point); + const EWearableType wearable_type = EWearableType(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point); switch(wearable_type) { case WT_SHAPE: @@ -352,8 +564,7 @@ BOOL get_is_item_worn(const LLUUID& id) { case LLAssetType::AT_OBJECT: { - const LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if(my_avatar && my_avatar->isWearingAttachment(item->getLinkedUUID())) + if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getLinkedUUID())) return TRUE; break; } @@ -363,7 +574,7 @@ BOOL get_is_item_worn(const LLUUID& id) return TRUE; break; case LLAssetType::AT_GESTURE: - if (LLGestureManager::instance().isGestureActive(item->getLinkedUUID())) + if (LLGestureMgr::instance().isGestureActive(item->getLinkedUUID())) return TRUE; break; default: diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 968db84819..e3cd988e39 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -38,14 +38,212 @@ #include "llfolderview.h" #include "llfolderviewitem.h" +/******************************************************************************** + ** ** + ** INVENTORY COLLECTOR FUNCTIONS + **/ + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryCollectFunctor +// +// Base class for LLInventoryModel::collectDescendentsIf() method +// which accepts an instance of one of these objects to use as the +// function to determine if it should be added. Derive from this class +// and override the () operator to return TRUE if you want to collect +// the category or item passed in. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryCollectFunctor +{ +public: + virtual ~LLInventoryCollectFunctor(){}; + virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; + + static bool itemTransferCommonlyAllowed(LLInventoryItem* item); +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLAssetIDMatches +// +// This functor finds inventory items pointing to the specified asset +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLViewerInventoryItem; + +class LLAssetIDMatches : public LLInventoryCollectFunctor +{ +public: + LLAssetIDMatches(const LLUUID& asset_id) : mAssetID(asset_id) {} + virtual ~LLAssetIDMatches() {} + bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + +protected: + LLUUID mAssetID; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLLinkedItemIDMatches +// +// This functor finds inventory items linked to the specific inventory id. +// Assumes the inventory id is itself not a linked item. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLLinkedItemIDMatches : public LLInventoryCollectFunctor +{ +public: + LLLinkedItemIDMatches(const LLUUID& item_id) : mBaseItemID(item_id) {} + virtual ~LLLinkedItemIDMatches() {} + bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); + +protected: + LLUUID mBaseItemID; +}; + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLIsType // -// This is a collection of miscellaneous functions and classes -// that don't fit cleanly into any other class header. Eventually, -// we should figure out where to put these functions so that we can -// get rid of this generic file. +// Implementation of a LLInventoryCollectFunctor which returns TRUE if +// the type is the type passed in during construction. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLIsType : public LLInventoryCollectFunctor +{ +public: + LLIsType(LLAssetType::EType type) : mType(type) {} + virtual ~LLIsType() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + LLAssetType::EType mType; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLIsNotType // +// Implementation of a LLInventoryCollectFunctor which returns FALSE if the +// type is the type passed in during construction, otherwise false. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLIsNotType : public LLInventoryCollectFunctor +{ +public: + LLIsNotType(LLAssetType::EType type) : mType(type) {} + virtual ~LLIsNotType() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + LLAssetType::EType mType; +}; + +class LLIsTypeWithPermissions : public LLInventoryCollectFunctor +{ +public: + LLIsTypeWithPermissions(LLAssetType::EType type, const PermissionBit perms, const LLUUID &agent_id, const LLUUID &group_id) + : mType(type), mPerm(perms), mAgentID(agent_id), mGroupID(group_id) {} + virtual ~LLIsTypeWithPermissions() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + LLAssetType::EType mType; + PermissionBit mPerm; + LLUUID mAgentID; + LLUUID mGroupID; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLBuddyCollector +// +// Simple class that collects calling cards that are not null, and not +// the agent. Duplicates are possible. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLBuddyCollector : public LLInventoryCollectFunctor +{ +public: + LLBuddyCollector() {} + virtual ~LLBuddyCollector() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLUniqueBuddyCollector +// +// Simple class that collects calling cards that are not null, and not +// the agent. Duplicates are discarded. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLUniqueBuddyCollector : public LLInventoryCollectFunctor +{ +public: + LLUniqueBuddyCollector() {} + virtual ~LLUniqueBuddyCollector() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); + +protected: + std::set<LLUUID> mSeen; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLParticularBuddyCollector +// +// Simple class that collects calling cards that match a particular uuid +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLParticularBuddyCollector : public LLInventoryCollectFunctor +{ +public: + LLParticularBuddyCollector(const LLUUID& id) : mBuddyID(id) {} + virtual ~LLParticularBuddyCollector() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + LLUUID mBuddyID; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLNameCategoryCollector +// +// Collects categories based on case-insensitive match of prefix +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLNameCategoryCollector : public LLInventoryCollectFunctor +{ +public: + LLNameCategoryCollector(const std::string& name) : mName(name) {} + virtual ~LLNameCategoryCollector() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +protected: + std::string mName; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindCOFValidItems +// +// Collects items that can be legitimately linked to in the COF. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindCOFValidItems : public LLInventoryCollectFunctor +{ +public: + LLFindCOFValidItems() {} + virtual ~LLFindCOFValidItems() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); + +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLFindWearables +// +// Collects wearables based on item type. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLFindWearables : public LLInventoryCollectFunctor +{ +public: + LLFindWearables() {} + virtual ~LLFindWearables() {} + virtual bool operator()(LLInventoryCategory* cat, + LLInventoryItem* item); +}; + +/** Inventory Collector Functions + ** ** + *******************************************************************************/ class LLInventoryState { @@ -64,7 +262,7 @@ public: virtual void doItem(LLFolderViewItem* item); BOOL wasItemSelected() { return mItemSelected; } protected: - BOOL mItemSelected; + BOOL mItemSelected; }; class LLOpenFilteredFolders : public LLFolderViewFunctor diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 83a466a243..6452ae82f8 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -57,32 +57,16 @@ #include "process.h" #endif -BOOL LLInventoryModel::sBackgroundFetchActive = FALSE; -BOOL LLInventoryModel::sAllFoldersFetched = FALSE; -BOOL LLInventoryModel::sMyInventoryFetchStarted = FALSE; -BOOL LLInventoryModel::sLibraryFetchStarted = FALSE; -S32 LLInventoryModel::sNumFetchRetries = 0; -F32 LLInventoryModel::sMinTimeBetweenFetches = 0.3f; -F32 LLInventoryModel::sMaxTimeBetweenFetches = 10.f; -BOOL LLInventoryModel::sTimelyFetchPending = FALSE; -LLFrameTimer LLInventoryModel::sFetchTimer; -S16 LLInventoryModel::sBulkFetchCount = 0; -BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE; - // Increment this if the inventory contents change in a non-backwards-compatible way. // For viewer 2, the addition of link items makes a pre-viewer-2 cache incorrect. const S32 LLInventoryModel::sCurrentInvCacheVersion = 2; - -// RN: for some reason, using std::queue in the header file confuses the compiler which things it's an xmlrpc_queue -static std::deque<LLUUID> sFetchQueue; +BOOL LLInventoryModel::sFirstTimeInViewer2 = TRUE; ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- //BOOL decompress_file(const char* src_filename, const char* dst_filename); -const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; -const S32 MAX_FETCH_RETRIES = 10; const char CACHE_FORMAT_STRING[] = "%s.inv"; struct InventoryIDPtrLess @@ -1342,545 +1326,9 @@ bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) //{ // known_descendents += items->count(); //} - return cat->fetchDescendents(); -} - -//Initialize statics. -bool LLInventoryModel::isBulkFetchProcessingComplete() -{ - return sFetchQueue.empty() && sBulkFetchCount<=0; -} - -class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder -{ - public: - LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; - //LLInventoryModelFetchDescendentsResponder() {}; - void result(const LLSD& content); - void error(U32 status, const std::string& reason); - public: - typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; - protected: - LLSD mRequestSD; -}; - -//If we get back a normal response, handle it here -void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) -{ - if (content.has("folders")) - { - - for(LLSD::array_const_iterator folder_it = content["folders"].beginArray(); - folder_it != content["folders"].endArray(); - ++folder_it) - { - LLSD folder_sd = *folder_it; - - - //LLUUID agent_id = folder_sd["agent_id"]; - - //if(agent_id != gAgent.getID()) //This should never happen. - //{ - // llwarns << "Got a UpdateInventoryItem for the wrong agent." - // << llendl; - // break; - //} - - LLUUID parent_id = folder_sd["folder_id"]; - LLUUID owner_id = folder_sd["owner_id"]; - S32 version = (S32)folder_sd["version"].asInteger(); - S32 descendents = (S32)folder_sd["descendents"].asInteger(); - LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id); - - if (parent_id.isNull()) - { - LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; - for(LLSD::array_const_iterator item_it = folder_sd["items"].beginArray(); - item_it != folder_sd["items"].endArray(); - ++item_it) - { - const LLUUID lost_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - if (lost_uuid.notNull()) - { - LLSD item = *item_it; - titem->unpackMessage(item); - - LLInventoryModel::update_list_t update; - LLInventoryModel::LLCategoryUpdate new_folder(lost_uuid, 1); - update.push_back(new_folder); - gInventory.accountForUpdate(update); - - titem->setParent(lost_uuid); - titem->updateParentOnServer(FALSE); - gInventory.updateItem(titem); - gInventory.notifyObservers("fetchDescendents"); - - } - } - } - - LLViewerInventoryCategory* pcat = gInventory.getCategory(parent_id); - if (!pcat) - { - continue; - } - - for(LLSD::array_const_iterator category_it = folder_sd["categories"].beginArray(); - category_it != folder_sd["categories"].endArray(); - ++category_it) - { - LLSD category = *category_it; - tcategory->fromLLSD(category); - - if (LLInventoryModel::sMyInventoryFetchStarted || - LLInventoryModel::sLibraryFetchStarted) - { - sFetchQueue.push_back(tcategory->getUUID()); - } - else if ( !gInventory.isCategoryComplete(tcategory->getUUID()) ) - { - gInventory.updateCategory(tcategory); - } - - } - LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; - for(LLSD::array_const_iterator item_it = folder_sd["items"].beginArray(); - item_it != folder_sd["items"].endArray(); - ++item_it) - { - LLSD item = *item_it; - titem->unpackMessage(item); - - gInventory.updateItem(titem); - } - - // set version and descendentcount according to message. - LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id); - if(cat) - { - cat->setVersion(version); - cat->setDescendentCount(descendents); - cat->determineFolderType(); - } - - } - } - - if (content.has("bad_folders")) - { - for(LLSD::array_const_iterator folder_it = content["bad_folders"].beginArray(); - folder_it != content["bad_folders"].endArray(); - ++folder_it) - { - LLSD folder_sd = *folder_it; - - //These folders failed on the dataserver. We probably don't want to retry them. - llinfos << "Folder " << folder_sd["folder_id"].asString() - << "Error: " << folder_sd["error"].asString() << llendl; - } - } - - LLInventoryModel::incrBulkFetch(-1); - - if (LLInventoryModel::isBulkFetchProcessingComplete()) - { - llinfos << "Inventory fetch completed" << llendl; - LLInventoryModel::setAllFoldersFetched(); - } - - gInventory.notifyObservers("fetchDescendents"); -} - -//If we get back an error (not found, etc...), handle it here -void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) -{ - llinfos << "LLInventoryModelFetchDescendentsResponder::error " - << status << ": " << reason << llendl; - - LLInventoryModel::incrBulkFetch(-1); - - if (status==499) //timed out. Let's be awesome! - { - for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); - folder_it != mRequestSD["folders"].endArray(); - ++folder_it) - { - LLSD folder_sd = *folder_it; - LLUUID folder_id = folder_sd["folder_id"]; - sFetchQueue.push_front(folder_id); - } - } - else - { - if (LLInventoryModel::isBulkFetchProcessingComplete()) - { - LLInventoryModel::setAllFoldersFetched(); - } - } - gInventory.notifyObservers("fetchDescendents"); -} - -//static Bundle up a bunch of requests to send all at once. -void LLInventoryModel::bulkFetch(std::string url) -{ - //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. - //If there are items in sFetchQueue, we want to check the time since the last bulkFetch was - //sent. If it exceeds our retry time, go ahead and fire off another batch. - //Stopbackgroundfetch will be run from the Responder instead of here. - - S16 max_concurrent_fetches=8; - F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. - if (sMinTimeBetweenFetches < new_min_time) sMinTimeBetweenFetches=new_min_time; //HACK! See above. - - if(gDisconnected - || sBulkFetchCount > max_concurrent_fetches - || sFetchTimer.getElapsedTimeF32() < sMinTimeBetweenFetches) - { - return; // just bail if we are disconnected. - } - - U32 folder_count=0; - U32 max_batch_size=5; - - U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1; - - LLSD body; - LLSD body_lib; - while( !(sFetchQueue.empty() ) && (folder_count < max_batch_size) ) - { - if (sFetchQueue.front().isNull()) //DEV-17797 - { - LLSD folder_sd; - folder_sd["folder_id"] = LLUUID::null.asString(); - folder_sd["owner_id"] = gAgent.getID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - body["folders"].append(folder_sd); - folder_count++; - } - else - { - - - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); - - if (cat) - { - if ( LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - LLSD folder_sd; - folder_sd["folder_id"] = cat->getUUID(); - folder_sd["owner_id"] = cat->getOwnerID(); - folder_sd["sort_order"] = (LLSD::Integer)sort_order; - folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; - folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; - - if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) - body_lib["folders"].append(folder_sd); - else - body["folders"].append(folder_sd); - folder_count++; - } - if (sMyInventoryFetchStarted || - sLibraryFetchStarted) - { //Already have this folder but append child folders to list. - // add all children to queue - parent_cat_map_t::iterator cat_it = gInventory.mParentChildCategoryTree.find(cat->getUUID()); - if (cat_it != gInventory.mParentChildCategoryTree.end()) - { - cat_array_t* child_categories = cat_it->second; - - for (S32 child_num = 0; child_num < child_categories->count(); child_num++) - { - sFetchQueue.push_back(child_categories->get(child_num)->getUUID()); - } - } - - } - } - } - sFetchQueue.pop_front(); - } - - if (folder_count > 0) - { - sBulkFetchCount++; - if (body["folders"].size()) - { - LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); - } - if (body_lib["folders"].size()) - { - std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); - LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); - } - sFetchTimer.reset(); - } - else if (isBulkFetchProcessingComplete()) - { - setAllFoldersFetched(); - } -} - -bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) -{ - for (std::deque<LLUUID>::iterator it = sFetchQueue.begin(); - it != sFetchQueue.end(); ++it) - { - const LLUUID& fetch_id = *it; - if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) - return false; - } - return true; -} - -/* static */ -bool LLInventoryModel::libraryFetchStarted() -{ - return sLibraryFetchStarted; -} - -/* static */ -bool LLInventoryModel::libraryFetchCompleted() -{ - return libraryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getLibraryRootFolderID()); -} - -/* static */ -bool LLInventoryModel::libraryFetchInProgress() -{ - return libraryFetchStarted() && !libraryFetchCompleted(); -} - -/* static */ -bool LLInventoryModel::myInventoryFetchStarted() -{ - return sMyInventoryFetchStarted; + return cat->fetch(); } -/* static */ -bool LLInventoryModel::myInventoryFetchCompleted() -{ - return myInventoryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getRootFolderID()); -} - -/* static */ -bool LLInventoryModel::myInventoryFetchInProgress() -{ - return myInventoryFetchStarted() && !myInventoryFetchCompleted(); -} - -// static -bool LLInventoryModel::isEverythingFetched() -{ - return sAllFoldersFetched; -} - -//static -BOOL LLInventoryModel::backgroundFetchActive() -{ - return sBackgroundFetchActive; -} - -void LLInventoryModel::startBackgroundFetch(const LLUUID& cat_id) -{ - if (!sAllFoldersFetched) - { - sBackgroundFetchActive = TRUE; - if (cat_id.isNull()) - { - if (!sMyInventoryFetchStarted) - { - sMyInventoryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getRootFolderID()); - gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); - } - if (!sLibraryFetchStarted) - { - sLibraryFetchStarted = TRUE; - sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); - gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); - } - } - else - { - // specific folder requests go to front of queue - if (sFetchQueue.empty() || sFetchQueue.front() != cat_id) - { - sFetchQueue.push_front(cat_id); - gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); - } - if (cat_id == gInventory.getLibraryRootFolderID()) - { - sLibraryFetchStarted = TRUE; - } - if (cat_id == gInventory.getRootFolderID()) - { - sMyInventoryFetchStarted = TRUE; - } - } - } -} - -//static -void LLInventoryModel::findLostItems() -{ - sBackgroundFetchActive = TRUE; - sFetchQueue.push_back(LLUUID::null); - gIdleCallbacks.addFunction(&LLInventoryModel::backgroundFetch, NULL); -} - -//static -void LLInventoryModel::stopBackgroundFetch() -{ - if (sBackgroundFetchActive) - { - sBackgroundFetchActive = FALSE; - gIdleCallbacks.deleteFunction(&LLInventoryModel::backgroundFetch, NULL); - sBulkFetchCount=0; - sMinTimeBetweenFetches=0.0f; - } -} - -// static -void LLInventoryModel::setAllFoldersFetched() -{ - if (sMyInventoryFetchStarted && - sLibraryFetchStarted) - { - sAllFoldersFetched = TRUE; - } - stopBackgroundFetch(); -} - -//static -void LLInventoryModel::backgroundFetch(void*) -{ - if (sBackgroundFetchActive && gAgent.getRegion()) - { - //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. - std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); - if (!url.empty()) - { - bulkFetch(url); - return; - } - - //DEPRECATED OLD CODE FOLLOWS. - // no more categories to fetch, stop fetch process - if (sFetchQueue.empty()) - { - llinfos << "Inventory fetch completed" << llendl; - - setAllFoldersFetched(); - return; - } - - F32 fast_fetch_time = lerp(sMinTimeBetweenFetches, sMaxTimeBetweenFetches, 0.1f); - F32 slow_fetch_time = lerp(sMinTimeBetweenFetches, sMaxTimeBetweenFetches, 0.5f); - if (sTimelyFetchPending && sFetchTimer.getElapsedTimeF32() > slow_fetch_time) - { - // double timeouts on failure - sMinTimeBetweenFetches = llmin(sMinTimeBetweenFetches * 2.f, 10.f); - sMaxTimeBetweenFetches = llmin(sMaxTimeBetweenFetches * 2.f, 120.f); - llinfos << "Inventory fetch times grown to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << llendl; - // fetch is no longer considered "timely" although we will wait for full time-out - sTimelyFetchPending = FALSE; - } - - while(1) - { - if (sFetchQueue.empty()) - { - break; - } - - if(gDisconnected) - { - // just bail if we are disconnected. - break; - } - - LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); - - // category has been deleted, remove from queue. - if (!cat) - { - sFetchQueue.pop_front(); - continue; - } - - if (sFetchTimer.getElapsedTimeF32() > sMinTimeBetweenFetches && - LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) - { - // category exists but has no children yet, fetch the descendants - // for now, just request every time and rely on retry timer to throttle - if (cat->fetchDescendents()) - { - sFetchTimer.reset(); - sTimelyFetchPending = TRUE; - } - else - { - // The catagory also tracks if it has expired and here it says it hasn't - // yet. Get out of here because nothing is going to happen until we - // update the timers. - break; - } - } - // do I have all my children? - else if (gInventory.isCategoryComplete(sFetchQueue.front())) - { - // finished with this category, remove from queue - sFetchQueue.pop_front(); - - // add all children to queue - parent_cat_map_t::iterator cat_it = gInventory.mParentChildCategoryTree.find(cat->getUUID()); - if (cat_it != gInventory.mParentChildCategoryTree.end()) - { - cat_array_t* child_categories = cat_it->second; - - for (S32 child_num = 0; child_num < child_categories->count(); child_num++) - { - sFetchQueue.push_back(child_categories->get(child_num)->getUUID()); - } - } - - // we received a response in less than the fast time - if (sTimelyFetchPending && sFetchTimer.getElapsedTimeF32() < fast_fetch_time) - { - // shrink timeouts based on success - sMinTimeBetweenFetches = llmax(sMinTimeBetweenFetches * 0.8f, 0.3f); - sMaxTimeBetweenFetches = llmax(sMaxTimeBetweenFetches * 0.8f, 10.f); - //llinfos << "Inventory fetch times shrunk to (" << sMinTimeBetweenFetches << ", " << sMaxTimeBetweenFetches << ")" << llendl; - } - - sTimelyFetchPending = FALSE; - continue; - } - else if (sFetchTimer.getElapsedTimeF32() > sMaxTimeBetweenFetches) - { - // received first packet, but our num descendants does not match db's num descendants - // so try again later - LLUUID fetch_id = sFetchQueue.front(); - sFetchQueue.pop_front(); - - if (sNumFetchRetries++ < MAX_FETCH_RETRIES) - { - // push on back of queue - sFetchQueue.push_back(fetch_id); - } - sTimelyFetchPending = FALSE; - sFetchTimer.reset(); - break; - } - - // not enough time has elapsed to do a new fetch - break; - } - } -} void LLInventoryModel::cache( const LLUUID& parent_folder_id, @@ -2595,7 +2043,7 @@ void LLInventoryModel::buildParentChildMap() } count = items.count(); lost = 0; - std::vector<LLUUID> lost_item_ids; + uuid_vec_t lost_item_ids; for(i = 0; i < count; ++i) { LLPointer<LLViewerInventoryItem> item; @@ -2634,7 +2082,7 @@ void LLInventoryModel::buildParentChildMap() LLMessageSystem* msg = gMessageSystem; BOOL start_new_message = TRUE; const LLUUID lnf = findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); - for(std::vector<LLUUID>::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it) + for(uuid_vec_t::iterator it = lost_item_ids.begin() ; it < lost_item_ids.end(); ++it) { if(start_new_message) { @@ -3094,7 +2542,7 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**) return; } S32 count = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); - std::vector<LLUUID> item_ids; + uuid_vec_t item_ids; update_map_t update; for(S32 i = 0; i < count; ++i) { @@ -3110,7 +2558,7 @@ void LLInventoryModel::processRemoveInventoryItem(LLMessageSystem* msg, void**) } } gInventory.accountForUpdate(update); - for(std::vector<LLUUID>::iterator it = item_ids.begin(); it != item_ids.end(); ++it) + for(uuid_vec_t::iterator it = item_ids.begin(); it != item_ids.end(); ++it) { gInventory.deleteObject(*it); } @@ -3190,7 +2638,7 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg, << llendl; return; } - std::vector<LLUUID> folder_ids; + uuid_vec_t folder_ids; update_map_t update; S32 count = msg->getNumberOfBlocksFast(_PREHASH_FolderData); for(S32 i = 0; i < count; ++i) @@ -3204,7 +2652,7 @@ void LLInventoryModel::processRemoveInventoryFolder(LLMessageSystem* msg, } } gInventory.accountForUpdate(update); - for(std::vector<LLUUID>::iterator it = folder_ids.begin(); it != folder_ids.end(); ++it) + for(uuid_vec_t::iterator it = folder_ids.begin(); it != folder_ids.end(); ++it) { gInventory.deleteObject(*it); } @@ -3317,7 +2765,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) count = msg->getNumberOfBlocksFast(_PREHASH_ItemData); - std::vector<LLUUID> wearable_ids; + uuid_vec_t wearable_ids; item_array_t items; std::list<InventoryCallbackInfo> cblist; for(i = 0; i < count; ++i) @@ -3764,207 +3212,6 @@ void LLInventoryModel::dumpInventory() const } ///---------------------------------------------------------------------------- -/// LLInventoryCollectFunctor implementations -///---------------------------------------------------------------------------- - -// static -bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* item) -{ - if (!item) - return false; - - bool allowed = false; - LLVOAvatarSelf* my_avatar = NULL; - - switch(item->getType()) - { - case LLAssetType::AT_CALLINGCARD: - // not allowed - break; - - case LLAssetType::AT_OBJECT: - my_avatar = gAgent.getAvatarObject(); - if(my_avatar && !my_avatar->isWearingAttachment(item->getUUID())) - { - allowed = true; - } - break; - - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_CLOTHING: - if(!gAgentWearables.isWearingItem(item->getUUID())) - { - allowed = true; - } - break; - - default: - allowed = true; - break; - } - - return allowed; -} - -bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) return TRUE; - } - if(item) - { - if(item->getType() == mType) return TRUE; - } - return FALSE; -} - -bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) return FALSE; - } - if(item) - { - if(item->getType() == mType) return FALSE; - else return TRUE; - } - return TRUE; -} - -bool LLIsTypeWithPermissions::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(mType == LLAssetType::AT_CATEGORY) - { - if(cat) - { - return TRUE; - } - } - if(item) - { - if(item->getType() == mType) - { - LLPermissions perm = item->getPermissions(); - if ((perm.getMaskBase() & mPerm) == mPerm) - { - return TRUE; - } - } - } - return FALSE; -} - - -//bool LLIsClone::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -//{ -// if(cat) return FALSE; -// if(item) -// { -// if(mItemMap->getType() == LLAssetType::AT_CALLINGCARD) -// { -// if((item->getType() == LLAssetType::AT_CALLINGCARD) -// && !(item->getCreatorUUID().isNull()) -// && (item->getCreatorUUID() == mItemMap->getCreatorUUID())) -// { -// return TRUE; -// } -// } -// else -// { -// if((item->getType() == mItemMap->getType()) -// && !(item->getAssetUUID().isNull()) -// && (item->getAssetUUID() == mItemMap->getAssetUUID()) -// && (item->getName() == mItemMap->getName())) -// { -// return TRUE; -// } -// } -// } -// return FALSE; -//} - -bool LLBuddyCollector::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - if(item) - { - if((LLAssetType::AT_CALLINGCARD == item->getType()) - && (!item->getCreatorUUID().isNull()) - && (item->getCreatorUUID() != gAgent.getID())) - { - return true; - } - } - return false; -} - - -bool LLUniqueBuddyCollector::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - if(item) - { - if((LLAssetType::AT_CALLINGCARD == item->getType()) - && (item->getCreatorUUID().notNull()) - && (item->getCreatorUUID() != gAgent.getID())) - { - mSeen.insert(item->getCreatorUUID()); - return true; - } - } - return false; -} - - -bool LLParticularBuddyCollector::operator()(LLInventoryCategory* cat, - LLInventoryItem* item) -{ - if(item) - { - if((LLAssetType::AT_CALLINGCARD == item->getType()) - && (item->getCreatorUUID() == mBuddyID)) - { - return TRUE; - } - } - return FALSE; -} - - -bool LLNameCategoryCollector::operator()( - LLInventoryCategory* cat, LLInventoryItem* item) -{ - if(cat) - { - if (!LLStringUtil::compareInsensitive(mName, cat->getName())) - { - return true; - } - } - return false; -} - -///---------------------------------------------------------------------------- -/// LLAssetIDMatches -///---------------------------------------------------------------------------- -bool LLAssetIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return (item && item->getAssetUUID() == mAssetID); -} - -///---------------------------------------------------------------------------- -/// LLLinkedItemIDMatches -///---------------------------------------------------------------------------- -bool LLLinkedItemIDMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item) -{ - return (item && - (item->getIsLinkType()) && - (item->getLinkedUUID() == mBaseItemID)); // A linked item's assetID will be the compared-to item's itemID. -} - -///---------------------------------------------------------------------------- /// Local function definitions ///---------------------------------------------------------------------------- diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index 2a2b48ce3c..b7c1b57397 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -81,7 +81,6 @@ public: CHILDREN_MAYBE }; - // These are used a lot... typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t; typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t; typedef std::set<LLUUID> changed_items_t; @@ -368,8 +367,6 @@ public: // Utility Functions void removeItem(const LLUUID& item_id); - static void findLostItems(); - // Data about the agent's root folder and root library folder // are stored here, rather than in LLAgent where it used to be, because // gInventory is a singleton and represents the agent's inventory. @@ -501,12 +498,6 @@ private: LLUUID mLibraryRootFolderID; LLUUID mLibraryOwnerID; - static BOOL sTimelyFetchPending; - static S32 sNumFetchRetries; - static LLFrameTimer sFetchTimer; - static F32 sMinTimeBetweenFetches; - static F32 sMaxTimeBetweenFetches; - // Expected inventory cache version const static S32 sCurrentInvCacheVersion; @@ -532,41 +523,6 @@ public: // *NOTE: DEBUG functionality void dumpInventory() const; - - //////////////////////////////////////////////////////////////////////////////// - // Bulk fetch -public: - // Start and stop background breadth-first fetching of inventory contents. - // This gets triggered when performing a filter-search - void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); - static BOOL backgroundFetchActive(); - static bool isEverythingFetched(); - static void backgroundFetch(void*); // background fetch idle function - static void incrBulkFetch(S16 fetching) { sBulkFetchCount+=fetching; if (sBulkFetchCount<0) sBulkFetchCount=0; } - static void stopBackgroundFetch(); // stop fetch process - static bool isBulkFetchProcessingComplete(); - - // Add categories to a list to be fetched in bulk. - static void bulkFetch(std::string url); - - static bool libraryFetchStarted(); - static bool libraryFetchCompleted(); - static bool libraryFetchInProgress(); - - static bool myInventoryFetchStarted(); - static bool myInventoryFetchCompleted(); - static bool myInventoryFetchInProgress(); - -private: - static BOOL sMyInventoryFetchStarted; - static BOOL sLibraryFetchStarted; - static BOOL sAllFoldersFetched; - static void setAllFoldersFetched(); - - // completing the fetch once per session should be sufficient - static BOOL sBackgroundFetchActive; - static S16 sBulkFetchCount; - //////////////////////////////////////////////////////////////////////////////// // Login status public: @@ -578,234 +534,5 @@ private: // a special inventory model for the agent extern LLInventoryModel gInventory; -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryCollectFunctor -// -// Base class for LLInventoryModel::collectDescendentsIf() method -// which accepts an instance of one of these objects to use as the -// function to determine if it should be added. Derive from this class -// and override the () operator to return TRUE if you want to collect -// the category or item passed in. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLInventoryCollectFunctor -{ -public: - virtual ~LLInventoryCollectFunctor(){}; - virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) = 0; - - static bool itemTransferCommonlyAllowed(LLInventoryItem* item); -}; - - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLAssetIDMatches -// -// This functor finds inventory items pointing to the specified asset -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLViewerInventoryItem; - -class LLAssetIDMatches : public LLInventoryCollectFunctor -{ -public: - LLAssetIDMatches(const LLUUID& asset_id) : mAssetID(asset_id) {} - virtual ~LLAssetIDMatches() {} - bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - -protected: - LLUUID mAssetID; -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLLinkedItemIDMatches -// -// This functor finds inventory items linked to the specific inventory id. -// Assumes the inventory id is itself not a linked item. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLLinkedItemIDMatches : public LLInventoryCollectFunctor -{ -public: - LLLinkedItemIDMatches(const LLUUID& item_id) : mBaseItemID(item_id) {} - virtual ~LLLinkedItemIDMatches() {} - bool operator()(LLInventoryCategory* cat, LLInventoryItem* item); - -protected: - LLUUID mBaseItemID; -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIsType -// -// Implementation of a LLInventoryCollectFunctor which returns TRUE if -// the type is the type passed in during construction. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIsType : public LLInventoryCollectFunctor -{ -public: - LLIsType(LLAssetType::EType type) : mType(type) {} - virtual ~LLIsType() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLAssetType::EType mType; -}; - - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIsNotType -// -// Implementation of a LLInventoryCollectFunctor which returns FALSE if the -// type is the type passed in during construction, otherwise false. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLIsNotType : public LLInventoryCollectFunctor -{ -public: - LLIsNotType(LLAssetType::EType type) : mType(type) {} - virtual ~LLIsNotType() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLAssetType::EType mType; -}; - -class LLIsTypeWithPermissions : public LLInventoryCollectFunctor -{ -public: - LLIsTypeWithPermissions(LLAssetType::EType type, const PermissionBit perms, const LLUUID &agent_id, const LLUUID &group_id) - : mType(type), mPerm(perms), mAgentID(agent_id), mGroupID(group_id) {} - virtual ~LLIsTypeWithPermissions() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLAssetType::EType mType; - PermissionBit mPerm; - LLUUID mAgentID; - LLUUID mGroupID; -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLIsClone -// -// Implementation of a LLInventoryCollectFunctor which returns TRUE if -// the object is a clone of the item passed in during -// construction. -// -// *NOTE: Since clone information is determined based off of asset id -// (or creator with calling cards), if the id is NULL, it has no -// clones - even itself. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -//class LLIsClone : public LLInventoryCollectFunctor -//{ -//public: -// LLIsClone(LLViewerInventoryItem* item) : mItem(item) {} -// virtual ~LLIsClone() {} -// virtual bool operator()(LLViewerInventoryCategory* cat, -// LLViewerInventoryItem* item); -//protected: -// LLPointer<LLViewerInventoryItem> mItem; -//}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLBuddyCollector -// -// Simple class that collects calling cards that are not null, and not -// the agent. Duplicates are possible. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLBuddyCollector : public LLInventoryCollectFunctor -{ -public: - LLBuddyCollector() {} - virtual ~LLBuddyCollector() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLUniqueBuddyCollector -// -// Simple class that collects calling cards that are not null, and not -// the agent. Duplicates are discarded. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLUniqueBuddyCollector : public LLInventoryCollectFunctor -{ -public: - LLUniqueBuddyCollector() {} - virtual ~LLUniqueBuddyCollector() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); - -protected: - std::set<LLUUID> mSeen; -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLParticularBuddyCollector -// -// Simple class that collects calling cards that match a particular uuid -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLParticularBuddyCollector : public LLInventoryCollectFunctor -{ -public: - LLParticularBuddyCollector(const LLUUID& id) : mBuddyID(id) {} - virtual ~LLParticularBuddyCollector() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - LLUUID mBuddyID; -}; - - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLNameCategoryCollector -// -// Collects categories based on case-insensitive match of prefix -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLNameCategoryCollector : public LLInventoryCollectFunctor -{ -public: - LLNameCategoryCollector(const std::string& name) : mName(name) {} - virtual ~LLNameCategoryCollector() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -protected: - std::string mName; -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFindCOFValidItems -// -// Collects items that can be legitimately linked to in the COF. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLFindCOFValidItems : public LLInventoryCollectFunctor -{ -public: - LLFindCOFValidItems() {} - virtual ~LLFindCOFValidItems() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); - -}; - -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLFindWearables -// -// Collects wearables based on item type. -//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLFindWearables : public LLInventoryCollectFunctor -{ -public: - LLFindWearables() {} - virtual ~LLFindWearables() {} - virtual bool operator()(LLInventoryCategory* cat, - LLInventoryItem* item); -}; - #endif // LL_LLINVENTORYMODEL_H diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp new file mode 100644 index 0000000000..cfbc2c3e05 --- /dev/null +++ b/indra/newview/llinventorymodelbackgroundfetch.cpp @@ -0,0 +1,603 @@ +/** + * @file llinventorymodel.cpp + * @brief Implementation of the inventory model used to track agent inventory. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llinventorymodelbackgroundfetch.h" + +// Seraph clean this up +#include "llagent.h" +#include "llinventorypanel.h" +#include "llviewercontrol.h" +#include "llviewermessage.h" +#include "llviewerwindow.h" +#include "llappviewer.h" +#include "llviewerregion.h" +#include "llcallbacklist.h" + +const F32 MAX_TIME_FOR_SINGLE_FETCH = 10.f; +const S32 MAX_FETCH_RETRIES = 10; + +// RN: for some reason, using std::queue in the header file confuses the compiler which thinks it's an xmlrpc_queue +static std::deque<LLUUID> sFetchQueue; +bool fetchQueueContainsNoDescendentsOf(const LLUUID& cat_id) +{ + for (std::deque<LLUUID>::iterator it = sFetchQueue.begin(); + it != sFetchQueue.end(); ++it) + { + const LLUUID& fetch_id = *it; + if (gInventory.isObjectDescendentOf(fetch_id, cat_id)) + return false; + } + return true; +} + + +LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch() : + mBackgroundFetchActive(FALSE), + mAllFoldersFetched(FALSE), + mInventoryFetchStarted(FALSE), + mLibraryFetchStarted(FALSE), + mNumFetchRetries(0), + mMinTimeBetweenFetches(0.3f), + mMaxTimeBetweenFetches(10.f), + mTimelyFetchPending(FALSE), + mBulkFetchCount(0) +{ +} + +LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch() +{ +} + +bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() +{ + return sFetchQueue.empty() && mBulkFetchCount<=0; +} + +bool LLInventoryModelBackgroundFetch::libraryFetchStarted() +{ + return mLibraryFetchStarted; +} + +bool LLInventoryModelBackgroundFetch::libraryFetchCompleted() +{ + return libraryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getLibraryRootFolderID()); +} + +bool LLInventoryModelBackgroundFetch::libraryFetchInProgress() +{ + return libraryFetchStarted() && !libraryFetchCompleted(); +} + +bool LLInventoryModelBackgroundFetch::inventoryFetchStarted() +{ + return mInventoryFetchStarted; +} + +bool LLInventoryModelBackgroundFetch::inventoryFetchCompleted() +{ + return inventoryFetchStarted() && fetchQueueContainsNoDescendentsOf(gInventory.getRootFolderID()); +} + +bool LLInventoryModelBackgroundFetch::inventoryFetchInProgress() +{ + return inventoryFetchStarted() && !inventoryFetchCompleted(); +} + +bool LLInventoryModelBackgroundFetch::isEverythingFetched() +{ + return mAllFoldersFetched; +} + +BOOL LLInventoryModelBackgroundFetch::backgroundFetchActive() +{ + return mBackgroundFetchActive; +} + +void LLInventoryModelBackgroundFetch::start(const LLUUID& cat_id) +{ + if (!mAllFoldersFetched) + { + mBackgroundFetchActive = TRUE; + if (cat_id.isNull()) + { + if (!mInventoryFetchStarted) + { + mInventoryFetchStarted = TRUE; + sFetchQueue.push_back(gInventory.getRootFolderID()); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + if (!mLibraryFetchStarted) + { + mLibraryFetchStarted = TRUE; + sFetchQueue.push_back(gInventory.getLibraryRootFolderID()); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + } + else + { + // specific folder requests go to front of queue + if (sFetchQueue.empty() || sFetchQueue.front() != cat_id) + { + sFetchQueue.push_front(cat_id); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + } + if (cat_id == gInventory.getLibraryRootFolderID()) + { + mLibraryFetchStarted = TRUE; + } + if (cat_id == gInventory.getRootFolderID()) + { + mInventoryFetchStarted = TRUE; + } + } + } +} + +void LLInventoryModelBackgroundFetch::findLostItems() +{ + mBackgroundFetchActive = TRUE; + sFetchQueue.push_back(LLUUID::null); + gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); +} + +void LLInventoryModelBackgroundFetch::stopBackgroundFetch() +{ + if (mBackgroundFetchActive) + { + mBackgroundFetchActive = FALSE; + gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL); + mBulkFetchCount=0; + mMinTimeBetweenFetches=0.0f; + } +} + +void LLInventoryModelBackgroundFetch::setAllFoldersFetched() +{ + if (mInventoryFetchStarted && + mLibraryFetchStarted) + { + mAllFoldersFetched = TRUE; + } + stopBackgroundFetch(); +} + +void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *) +{ + LLInventoryModelBackgroundFetch::instance().backgroundFetch(); +} + +void LLInventoryModelBackgroundFetch::backgroundFetch() +{ + if (mBackgroundFetchActive && gAgent.getRegion()) + { + //If we'll be using the capability, we'll be sending batches and the background thing isn't as important. + std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); + if (!url.empty()) + { + bulkFetch(url); + return; + } + + //DEPRECATED OLD CODE FOLLOWS. + // no more categories to fetch, stop fetch process + if (sFetchQueue.empty()) + { + llinfos << "Inventory fetch completed" << llendl; + + setAllFoldersFetched(); + return; + } + + F32 fast_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.1f); + F32 slow_fetch_time = lerp(mMinTimeBetweenFetches, mMaxTimeBetweenFetches, 0.5f); + if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() > slow_fetch_time) + { + // double timeouts on failure + mMinTimeBetweenFetches = llmin(mMinTimeBetweenFetches * 2.f, 10.f); + mMaxTimeBetweenFetches = llmin(mMaxTimeBetweenFetches * 2.f, 120.f); + llinfos << "Inventory fetch times grown to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + // fetch is no longer considered "timely" although we will wait for full time-out + mTimelyFetchPending = FALSE; + } + + while(1) + { + if (sFetchQueue.empty()) + { + break; + } + + if(gDisconnected) + { + // just bail if we are disconnected. + break; + } + + LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + + // category has been deleted, remove from queue. + if (!cat) + { + sFetchQueue.pop_front(); + continue; + } + + if (mFetchTimer.getElapsedTimeF32() > mMinTimeBetweenFetches && + LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) + { + // category exists but has no children yet, fetch the descendants + // for now, just request every time and rely on retry timer to throttle + if (cat->fetch()) + { + mFetchTimer.reset(); + mTimelyFetchPending = TRUE; + } + else + { + // The catagory also tracks if it has expired and here it says it hasn't + // yet. Get out of here because nothing is going to happen until we + // update the timers. + break; + } + } + // do I have all my children? + else if (gInventory.isCategoryComplete(sFetchQueue.front())) + { + // finished with this category, remove from queue + sFetchQueue.pop_front(); + + // add all children to queue + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + sFetchQueue.push_back((*it)->getUUID()); + } + + // we received a response in less than the fast time + if (mTimelyFetchPending && mFetchTimer.getElapsedTimeF32() < fast_fetch_time) + { + // shrink timeouts based on success + mMinTimeBetweenFetches = llmax(mMinTimeBetweenFetches * 0.8f, 0.3f); + mMaxTimeBetweenFetches = llmax(mMaxTimeBetweenFetches * 0.8f, 10.f); + //llinfos << "Inventory fetch times shrunk to (" << mMinTimeBetweenFetches << ", " << mMaxTimeBetweenFetches << ")" << llendl; + } + + mTimelyFetchPending = FALSE; + continue; + } + else if (mFetchTimer.getElapsedTimeF32() > mMaxTimeBetweenFetches) + { + // received first packet, but our num descendants does not match db's num descendants + // so try again later + LLUUID fetch_id = sFetchQueue.front(); + sFetchQueue.pop_front(); + + if (mNumFetchRetries++ < MAX_FETCH_RETRIES) + { + // push on back of queue + sFetchQueue.push_back(fetch_id); + } + mTimelyFetchPending = FALSE; + mFetchTimer.reset(); + break; + } + + // not enough time has elapsed to do a new fetch + break; + } + } +} + +void LLInventoryModelBackgroundFetch::incrBulkFetch(S16 fetching) +{ + mBulkFetchCount += fetching; + if (mBulkFetchCount < 0) + { + mBulkFetchCount = 0; + } +} + + +class LLInventoryModelFetchDescendentsResponder: public LLHTTPClient::Responder +{ + public: + LLInventoryModelFetchDescendentsResponder(const LLSD& request_sd) : mRequestSD(request_sd) {}; + //LLInventoryModelFetchDescendentsResponder() {}; + void result(const LLSD& content); + void error(U32 status, const std::string& reason); + public: + typedef std::vector<LLViewerInventoryCategory*> folder_ref_t; + protected: + LLSD mRequestSD; +}; + +//If we get back a normal response, handle it here +void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content) +{ + if (content.has("folders")) + { + + for(LLSD::array_const_iterator folder_it = content["folders"].beginArray(); + folder_it != content["folders"].endArray(); + ++folder_it) + { + LLSD folder_sd = *folder_it; + + + //LLUUID agent_id = folder_sd["agent_id"]; + + //if(agent_id != gAgent.getID()) //This should never happen. + //{ + // llwarns << "Got a UpdateInventoryItem for the wrong agent." + // << llendl; + // break; + //} + + LLUUID parent_id = folder_sd["folder_id"]; + LLUUID owner_id = folder_sd["owner_id"]; + S32 version = (S32)folder_sd["version"].asInteger(); + S32 descendents = (S32)folder_sd["descendents"].asInteger(); + LLPointer<LLViewerInventoryCategory> tcategory = new LLViewerInventoryCategory(owner_id); + + if (parent_id.isNull()) + { + LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; + for(LLSD::array_const_iterator item_it = folder_sd["items"].beginArray(); + item_it != folder_sd["items"].endArray(); + ++item_it) + { + const LLUUID lost_uuid = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); + if (lost_uuid.notNull()) + { + LLSD item = *item_it; + titem->unpackMessage(item); + + LLInventoryModel::update_list_t update; + LLInventoryModel::LLCategoryUpdate new_folder(lost_uuid, 1); + update.push_back(new_folder); + gInventory.accountForUpdate(update); + + titem->setParent(lost_uuid); + titem->updateParentOnServer(FALSE); + gInventory.updateItem(titem); + gInventory.notifyObservers("fetchDescendents"); + + } + } + } + + LLViewerInventoryCategory* pcat = gInventory.getCategory(parent_id); + if (!pcat) + { + continue; + } + + for(LLSD::array_const_iterator category_it = folder_sd["categories"].beginArray(); + category_it != folder_sd["categories"].endArray(); + ++category_it) + { + LLSD category = *category_it; + tcategory->fromLLSD(category); + + if (LLInventoryModelBackgroundFetch::instance().inventoryFetchStarted() || + LLInventoryModelBackgroundFetch::instance().libraryFetchStarted()) + { + sFetchQueue.push_back(tcategory->getUUID()); + } + else if ( !gInventory.isCategoryComplete(tcategory->getUUID()) ) + { + gInventory.updateCategory(tcategory); + } + + } + LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; + for(LLSD::array_const_iterator item_it = folder_sd["items"].beginArray(); + item_it != folder_sd["items"].endArray(); + ++item_it) + { + LLSD item = *item_it; + titem->unpackMessage(item); + + gInventory.updateItem(titem); + } + + // set version and descendentcount according to message. + LLViewerInventoryCategory* cat = gInventory.getCategory(parent_id); + if(cat) + { + cat->setVersion(version); + cat->setDescendentCount(descendents); + cat->determineFolderType(); + } + + } + } + + if (content.has("bad_folders")) + { + for(LLSD::array_const_iterator folder_it = content["bad_folders"].beginArray(); + folder_it != content["bad_folders"].endArray(); + ++folder_it) + { + LLSD folder_sd = *folder_it; + + //These folders failed on the dataserver. We probably don't want to retry them. + llinfos << "Folder " << folder_sd["folder_id"].asString() + << "Error: " << folder_sd["error"].asString() << llendl; + } + } + + LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + + if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + { + llinfos << "Inventory fetch completed" << llendl; + LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + } + + gInventory.notifyObservers("fetchDescendents"); +} + +//If we get back an error (not found, etc...), handle it here +void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason) +{ + llinfos << "LLInventoryModelFetchDescendentsResponder::error " + << status << ": " << reason << llendl; + + LLInventoryModelBackgroundFetch::instance().incrBulkFetch(-1); + + if (status==499) //timed out. Let's be awesome! + { + for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray(); + folder_it != mRequestSD["folders"].endArray(); + ++folder_it) + { + LLSD folder_sd = *folder_it; + LLUUID folder_id = folder_sd["folder_id"]; + sFetchQueue.push_front(folder_id); + } + } + else + { + if (LLInventoryModelBackgroundFetch::instance().isBulkFetchProcessingComplete()) + { + LLInventoryModelBackgroundFetch::instance().setAllFoldersFetched(); + } + } + gInventory.notifyObservers("fetchDescendents"); +} + +//static Bundle up a bunch of requests to send all at once. +void LLInventoryModelBackgroundFetch::bulkFetch(std::string url) +{ + //Background fetch is called from gIdleCallbacks in a loop until background fetch is stopped. + //If there are items in sFetchQueue, we want to check the time since the last bulkFetch was + //sent. If it exceeds our retry time, go ahead and fire off another batch. + //Stopbackgroundfetch will be run from the Responder instead of here. + + S16 max_concurrent_fetches=8; + F32 new_min_time = 0.5f; //HACK! Clean this up when old code goes away entirely. + if (mMinTimeBetweenFetches < new_min_time) + { + mMinTimeBetweenFetches=new_min_time; //HACK! See above. + } + + if (gDisconnected || + (mBulkFetchCount > max_concurrent_fetches) || + (mFetchTimer.getElapsedTimeF32() < mMinTimeBetweenFetches)) + { + return; // just bail if we are disconnected. + } + + U32 folder_count=0; + U32 max_batch_size=5; + + U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1; + + LLSD body; + LLSD body_lib; + while (!(sFetchQueue.empty()) && (folder_count < max_batch_size)) + { + if (sFetchQueue.front().isNull()) //DEV-17797 + { + LLSD folder_sd; + folder_sd["folder_id"] = LLUUID::null.asString(); + folder_sd["owner_id"] = gAgent.getID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = (LLSD::Boolean)FALSE; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + body["folders"].append(folder_sd); + folder_count++; + } + else + { + LLViewerInventoryCategory* cat = gInventory.getCategory(sFetchQueue.front()); + + if (cat) + { + if (LLViewerInventoryCategory::VERSION_UNKNOWN == cat->getVersion()) + { + LLSD folder_sd; + folder_sd["folder_id"] = cat->getUUID(); + folder_sd["owner_id"] = cat->getOwnerID(); + folder_sd["sort_order"] = (LLSD::Integer)sort_order; + folder_sd["fetch_folders"] = TRUE; //(LLSD::Boolean)sFullFetchStarted; + folder_sd["fetch_items"] = (LLSD::Boolean)TRUE; + + if (ALEXANDRIA_LINDEN_ID == cat->getOwnerID()) + body_lib["folders"].append(folder_sd); + else + body["folders"].append(folder_sd); + folder_count++; + } + if (mInventoryFetchStarted || mLibraryFetchStarted) + { //Already have this folder but append child folders to list. + // add all children to queue + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + gInventory.getDirectDescendentsOf(cat->getUUID(), categories, items); + for (LLInventoryModel::cat_array_t::const_iterator it = categories->begin(); + it != categories->end(); + ++it) + { + sFetchQueue.push_back((*it)->getUUID()); + } + } + } + } + sFetchQueue.pop_front(); + } + + if (folder_count > 0) + { + mBulkFetchCount++; + if (body["folders"].size()) + { + LLHTTPClient::post(url, body, new LLInventoryModelFetchDescendentsResponder(body),300.0); + } + if (body_lib["folders"].size()) + { + std::string url_lib = gAgent.getRegion()->getCapability("FetchLibDescendents"); + LLHTTPClient::post(url_lib, body_lib, new LLInventoryModelFetchDescendentsResponder(body_lib),300.0); + } + mFetchTimer.reset(); + } + else if (isBulkFetchProcessingComplete()) + { + setAllFoldersFetched(); + } +} diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h new file mode 100644 index 0000000000..94606fae23 --- /dev/null +++ b/indra/newview/llinventorymodelbackgroundfetch.h @@ -0,0 +1,119 @@ +/** + * @file llinventorymodelbackgroundfetch.h + * @brief LLInventoryModelBackgroundFetch class header file + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLINVENTORYMODELBACKGROUNDFETCH_H +#define LL_LLINVENTORYMODELBACKGROUNDFETCH_H + +// Seraph clean this up +#include "llassettype.h" +#include "llfoldertype.h" +#include "lldarray.h" +#include "llframetimer.h" +#include "llhttpclient.h" +#include "lluuid.h" +#include "llpermissionsflags.h" +#include "llstring.h" +#include <map> +#include <set> +#include <string> +#include <vector> + +// Seraph clean this up +class LLInventoryObserver; +class LLInventoryObject; +class LLInventoryItem; +class LLInventoryCategory; +class LLViewerInventoryItem; +class LLViewerInventoryCategory; +class LLViewerInventoryItem; +class LLViewerInventoryCategory; +class LLMessageSystem; +class LLInventoryCollectFunctor; + + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryModelBackgroundFetch +// +// This class handles background fetch. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLInventoryModelBackgroundFetch : public LLSingleton<LLInventoryModelBackgroundFetch> +{ +public: + LLInventoryModelBackgroundFetch(); + ~LLInventoryModelBackgroundFetch(); + + // Start and stop background breadth-first fetching of inventory contents. + // This gets triggered when performing a filter-search + void start(const LLUUID& cat_id = LLUUID::null); + BOOL backgroundFetchActive(); + bool isEverythingFetched(); + void incrBulkFetch(S16 fetching); + void stopBackgroundFetch(); // stop fetch process + bool isBulkFetchProcessingComplete(); + + // Add categories to a list to be fetched in bulk. + void bulkFetch(std::string url); + + bool libraryFetchStarted(); + bool libraryFetchCompleted(); + bool libraryFetchInProgress(); + + bool inventoryFetchStarted(); + bool inventoryFetchCompleted(); + bool inventoryFetchInProgress(); + void findLostItems(); + + void setAllFoldersFetched(); + + static void backgroundFetchCB(void*); // background fetch idle function + void backgroundFetch(); + +private: + BOOL mInventoryFetchStarted; + BOOL mLibraryFetchStarted; + BOOL mAllFoldersFetched; + + // completing the fetch once per session should be sufficient + BOOL mBackgroundFetchActive; + S16 mBulkFetchCount; + BOOL mTimelyFetchPending; + S32 mNumFetchRetries; + + LLFrameTimer mFetchTimer; + F32 mMinTimeBetweenFetches; + F32 mMaxTimeBetweenFetches; + +}; + +#endif // LL_LLINVENTORYMODELBACKGROUNDFETCH_H + diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 62c2d80609..29d99d328a 100644 --- a/indra/newview/llinventoryobserver.cpp +++ b/indra/newview/llinventoryobserver.cpp @@ -62,6 +62,14 @@ #include "llsdutil.h" #include <deque> +// If the viewer gets a notification, your observer assumes +// that that notification is for itself and then tries to process +// the results. The notification could be for something else (e.g. +// you're fetching an item and a notification gets triggered because +// you renamed some other item). This counter is to specify how many +// notification to wait for before giving up. +static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 20; + LLInventoryObserver::LLInventoryObserver() { } @@ -71,21 +79,51 @@ LLInventoryObserver::~LLInventoryObserver() { } +LLInventoryFetchObserver::LLInventoryFetchObserver(const LLUUID& id) +{ + mIDs.clear(); + if (id != LLUUID::null) + { + setFetchID(id); + } +} + +LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids) +{ + setFetchIDs(ids); +} + +BOOL LLInventoryFetchObserver::isFinished() const +{ + return mIncomplete.empty(); +} + +void LLInventoryFetchObserver::setFetchIDs(const uuid_vec_t& ids) +{ + mIDs = ids; +} +void LLInventoryFetchObserver::setFetchID(const LLUUID& id) +{ + mIDs.clear(); + mIDs.push_back(id); +} + + void LLInventoryCompletionObserver::changed(U32 mask) { // scan through the incomplete items and move or erase them as // appropriate. - if(!mIncomplete.empty()) + if (!mIncomplete.empty()) { - for(item_ref_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) + for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { - LLViewerInventoryItem* item = gInventory.getItem(*it); - if(!item) + const LLViewerInventoryItem* item = gInventory.getItem(*it); + if (!item) { it = mIncomplete.erase(it); continue; } - if(item->isComplete()) + if (item->isFinished()) { mComplete.push_back(*it); it = mIncomplete.erase(it); @@ -93,7 +131,7 @@ void LLInventoryCompletionObserver::changed(U32 mask) } ++it; } - if(mIncomplete.empty()) + if (mIncomplete.empty()) { done(); } @@ -102,60 +140,77 @@ void LLInventoryCompletionObserver::changed(U32 mask) void LLInventoryCompletionObserver::watchItem(const LLUUID& id) { - if(id.notNull()) + if (id.notNull()) { mIncomplete.push_back(id); } } +LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) : + LLInventoryFetchObserver(item_id), + + mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) +{ + mIDs.clear(); + mIDs.push_back(item_id); +} + +LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) : + LLInventoryFetchObserver(item_ids), + + mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS) +{ +} -void LLInventoryFetchObserver::changed(U32 mask) +void LLInventoryFetchItemsObserver::changed(U32 mask) { + BOOL any_items_missing = FALSE; + // scan through the incomplete items and move or erase them as // appropriate. - if(!mIncomplete.empty()) + if (!mIncomplete.empty()) { - for(item_ref_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) + for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); ) { - LLViewerInventoryItem* item = gInventory.getItem(*it); - if(!item) + const LLUUID& item_id = (*it); + LLViewerInventoryItem* item = gInventory.getItem(item_id); + if (!item) { - if (mRetryIfMissing) + any_items_missing = TRUE; + if (mNumTries > 0) { - // BAP changed to skip these items, so we should keep retrying until they arrive. - // Did not make this the default behavior because of uncertainty about impact - - // could cause some observers that currently complete to wait forever. + // Keep trying. ++it; } else { - // BUG: This can cause done() to get called prematurely below. - // This happens with the LLGestureInventoryFetchObserver that - // loads gestures at startup. JC + // Just concede that this item hasn't arrived in reasonable time and continue on. + llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl; it = mIncomplete.erase(it); } continue; } - if(item->isComplete()) + if (item->isFinished()) { - mComplete.push_back(*it); + mComplete.push_back(item_id); it = mIncomplete.erase(it); continue; } ++it; } - if(mIncomplete.empty()) + if (any_items_missing) { + mNumTries--; + } + + if (mIncomplete.empty()) + { + mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS; done(); } } - //llinfos << "LLInventoryFetchObserver::changed() mComplete size " << mComplete.size() << llendl; - //llinfos << "LLInventoryFetchObserver::changed() mIncomplete size " << mIncomplete.size() << llendl; -} - -bool LLInventoryFetchObserver::isEverythingComplete() const -{ - return mIncomplete.empty(); + //llinfos << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << llendl; + //llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl; } void fetch_items_from_llsd(const LLSD& items_llsd) @@ -195,7 +250,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd) for (S32 j=0; j<body[i]["items"].size(); j++) { LLSD item_entry = body[i]["items"][j]; - if(start_new_message) + if (start_new_message) { start_new_message = FALSE; msg->newMessageFast(_PREHASH_FetchInventory); @@ -206,30 +261,29 @@ void fetch_items_from_llsd(const LLSD& items_llsd) msg->nextBlockFast(_PREHASH_InventoryData); msg->addUUIDFast(_PREHASH_OwnerID, item_entry["owner_id"].asUUID()); msg->addUUIDFast(_PREHASH_ItemID, item_entry["item_id"].asUUID()); - if(msg->isSendFull(NULL)) + if (msg->isSendFull(NULL)) { start_new_message = TRUE; gAgent.sendReliableMessage(); } } - if(!start_new_message) + if (!start_new_message) { gAgent.sendReliableMessage(); } } } -void LLInventoryFetchObserver::fetchItems( - const LLInventoryFetchObserver::item_ref_t& ids) +void LLInventoryFetchItemsObserver::startFetch() { LLUUID owner_id; LLSD items_llsd; - for(item_ref_t::const_iterator it = ids.begin(); it < ids.end(); ++it) + for (uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it) { LLViewerInventoryItem* item = gInventory.getItem(*it); - if(item) + if (item) { - if(item->isComplete()) + if (item->isFinished()) { // It's complete, so put it on the complete container. mComplete.push_back(*it); @@ -259,84 +313,88 @@ void LLInventoryFetchObserver::fetchItems( fetch_items_from_llsd(items_llsd); } +LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const LLUUID& cat_id) : + LLInventoryFetchObserver(cat_id) +{ +} + +LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids) : + LLInventoryFetchObserver(cat_ids) +{ +} + // virtual void LLInventoryFetchDescendentsObserver::changed(U32 mask) { - for(folder_ref_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();) + for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();) { - LLViewerInventoryCategory* cat = gInventory.getCategory(*it); - if(!cat) + const LLViewerInventoryCategory* cat = gInventory.getCategory(*it); + if (!cat) { - it = mIncompleteFolders.erase(it); + it = mIncomplete.erase(it); continue; } - if(isComplete(cat)) + if (isCategoryComplete(cat)) { - mCompleteFolders.push_back(*it); - it = mIncompleteFolders.erase(it); + mComplete.push_back(*it); + it = mIncomplete.erase(it); continue; } ++it; } - if(mIncompleteFolders.empty()) + if (mIncomplete.empty()) { done(); } } -void LLInventoryFetchDescendentsObserver::fetchDescendents( - const folder_ref_t& ids) +void LLInventoryFetchDescendentsObserver::startFetch() { - for(folder_ref_t::const_iterator it = ids.begin(); it != ids.end(); ++it) + for (uuid_vec_t::const_iterator it = mIDs.begin(); it != mIDs.end(); ++it) { LLViewerInventoryCategory* cat = gInventory.getCategory(*it); - if(!cat) continue; - if(!isComplete(cat)) + if (!cat) continue; + if (!isCategoryComplete(cat)) { - cat->fetchDescendents(); //blindly fetch it without seeing if anything else is fetching it. - mIncompleteFolders.push_back(*it); //Add to list of things being downloaded for this observer. + cat->fetch(); //blindly fetch it without seeing if anything else is fetching it. + mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer. } else { - mCompleteFolders.push_back(*it); + mComplete.push_back(*it); } } } -bool LLInventoryFetchDescendentsObserver::isEverythingComplete() const -{ - return mIncompleteFolders.empty(); -} - -bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* cat) +BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const { const S32 version = cat->getVersion(); const S32 expected_num_descendents = cat->getDescendentCount(); if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) || (expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN)) { - return false; + return FALSE; } // it might be complete - check known descendents against // currently available. LLInventoryModel::cat_array_t* cats; LLInventoryModel::item_array_t* items; gInventory.getDirectDescendentsOf(cat->getUUID(), cats, items); - if(!cats || !items) + if (!cats || !items) { llwarns << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << llendl; // NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean // that the cat just doesn't have any items or subfolders). // Unrecoverable, so just return done so that this observer can be cleared // from memory. - return true; + return TRUE; } const S32 current_num_known_descendents = cats->count() + items->count(); // Got the number of descendents that we were expecting, so we're done. if (current_num_known_descendents == expected_num_descendents) { - return true; + return TRUE; } // Error condition, but recoverable. This happens if something was added to the @@ -345,125 +403,62 @@ bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* if (current_num_known_descendents >= expected_num_descendents) { llwarns << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << llendl; - cat->setDescendentCount(current_num_known_descendents); - return true; + const_cast<LLViewerInventoryCategory *>(cat)->setDescendentCount(current_num_known_descendents); + return TRUE; } - return false; + return FALSE; } -void LLInventoryFetchComboObserver::changed(U32 mask) +LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids, + const uuid_vec_t& item_ids) { - if(!mIncompleteItems.empty()) - { - for(item_ref_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); ) - { - LLViewerInventoryItem* item = gInventory.getItem(*it); - if(!item) - { - it = mIncompleteItems.erase(it); - continue; - } - if(item->isComplete()) - { - mCompleteItems.push_back(*it); - it = mIncompleteItems.erase(it); - continue; - } - ++it; - } - } - if(!mIncompleteFolders.empty()) + mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids); + + uuid_vec_t pruned_item_ids; + for (uuid_vec_t::const_iterator item_iter = item_ids.begin(); + item_iter != item_ids.end(); + ++item_iter) { - for(folder_ref_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();) + const LLUUID& item_id = (*item_iter); + const LLViewerInventoryItem* item = gInventory.getItem(item_id); + if (item && std::find(folder_ids.begin(), folder_ids.end(), item->getParentUUID()) == folder_ids.end()) { - LLViewerInventoryCategory* cat = gInventory.getCategory(*it); - if(!cat) - { - it = mIncompleteFolders.erase(it); - continue; - } - if(gInventory.isCategoryComplete(*it)) - { - mCompleteFolders.push_back(*it); - it = mIncompleteFolders.erase(it); - continue; - } - ++it; + continue; } + pruned_item_ids.push_back(item_id); } - if(!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty()) - { - mDone = true; - done(); - } + + mFetchItems = new LLInventoryFetchItemsObserver(pruned_item_ids); + mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids); } -void LLInventoryFetchComboObserver::fetch( - const folder_ref_t& folder_ids, - const item_ref_t& item_ids) +LLInventoryFetchComboObserver::~LLInventoryFetchComboObserver() { - lldebugs << "LLInventoryFetchComboObserver::fetch()" << llendl; - for(folder_ref_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit) - { - LLViewerInventoryCategory* cat = gInventory.getCategory(*fit); - if(!cat) continue; - if(!gInventory.isCategoryComplete(*fit)) - { - cat->fetchDescendents(); - lldebugs << "fetching folder " << *fit <<llendl; - mIncompleteFolders.push_back(*fit); - } - else - { - mCompleteFolders.push_back(*fit); - lldebugs << "completing folder " << *fit <<llendl; - } - } + mFetchItems->done(); + mFetchDescendents->done(); + delete mFetchItems; + delete mFetchDescendents; +} - // Now for the items - we fetch everything which is not a direct - // descendent of an incomplete folder because the item will show - // up in an inventory descendents message soon enough so we do not - // have to fetch it individually. - LLSD items_llsd; - LLUUID owner_id; - for(item_ref_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit) +void LLInventoryFetchComboObserver::changed(U32 mask) +{ + mFetchItems->changed(mask); + mFetchDescendents->changed(mask); + if (mFetchItems->isFinished() && mFetchDescendents->isFinished()) { - LLViewerInventoryItem* item = gInventory.getItem(*iit); - if(!item) - { - lldebugs << "uanble to find item " << *iit << llendl; - continue; - } - if(item->isComplete()) - { - // It's complete, so put it on the complete container. - mCompleteItems.push_back(*iit); - lldebugs << "completing item " << *iit << llendl; - continue; - } - else - { - mIncompleteItems.push_back(*iit); - owner_id = item->getPermissions().getOwner(); - } - if(std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end()) - { - LLSD item_entry; - item_entry["owner_id"] = owner_id; - item_entry["item_id"] = (*iit); - items_llsd.append(item_entry); - } - else - { - lldebugs << "not worrying about " << *iit << llendl; - } + done(); } - fetch_items_from_llsd(items_llsd); +} + +void LLInventoryFetchComboObserver::startFetch() +{ + mFetchItems->startFetch(); + mFetchDescendents->startFetch(); } void LLInventoryExistenceObserver::watchItem(const LLUUID& id) { - if(id.notNull()) + if (id.notNull()) { mMIA.push_back(id); } @@ -473,12 +468,12 @@ void LLInventoryExistenceObserver::changed(U32 mask) { // scan through the incomplete items and move or erase them as // appropriate. - if(!mMIA.empty()) + if (!mMIA.empty()) { - for(item_ref_t::iterator it = mMIA.begin(); it < mMIA.end(); ) + for (uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); ) { LLViewerInventoryItem* item = gInventory.getItem(*it); - if(!item) + if (!item) { ++it; continue; @@ -486,20 +481,83 @@ void LLInventoryExistenceObserver::changed(U32 mask) mExist.push_back(*it); it = mMIA.erase(it); } - if(mMIA.empty()) + if (mMIA.empty()) { done(); } } } -void LLInventoryAddedObserver::changed(U32 mask) +void LLInventoryMoveFromWorldObserver::changed(U32 mask) { if(!(mask & LLInventoryObserver::ADD)) { return; } + // nothing is watched + if (mWatchedAssets.size() == 0) + { + return; + } + + LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; + LLMessageSystem* msg = gMessageSystem; + S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); + for(S32 i = 0; i < num_blocks; ++i) + { + item->unpackMessage(msg, _PREHASH_InventoryData, i); + const LLUUID& asset_uuid = item->getAssetUUID(); + if (item->getUUID().notNull() && asset_uuid.notNull()) + { + if (isAssetWatched(asset_uuid)) + { + LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL; + mAddedItems.push_back(item->getUUID()); + } + } + } + + if (mAddedItems.size() == mWatchedAssets.size()) + { + done(); + LL_DEBUGS("Inventory_Move") << "All watched items are added & processed." << LL_ENDL; + mAddedItems.clear(); + + // Unable to clean watched items here due to somebody can require to check them in current frame. + // set dirty state to clean them while next watch cycle. + mIsDirty = true; + } +} + +void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) +{ + if(asset_id.notNull()) + { + if (mIsDirty) + { + LL_DEBUGS("Inventory_Move") << "Watched items are dirty. Clean them." << LL_ENDL; + mWatchedAssets.clear(); + mIsDirty = false; + } + + mWatchedAssets.push_back(asset_id); + onAssetAdded(asset_id); + } +} + +bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id ) +{ + return std::find(mWatchedAssets.begin(), mWatchedAssets.end(), asset_id) != mWatchedAssets.end(); +} + +void LLInventoryAddedObserver::changed(U32 mask) +{ + if (!(mask & LLInventoryObserver::ADD)) + { + return; + } + // *HACK: If this was in response to a packet off // the network, figure out which item was updated. LLMessageSystem* msg = gMessageSystem; @@ -527,7 +585,7 @@ void LLInventoryAddedObserver::changed(U32 mask) LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem; S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); - for(S32 i = 0; i < num_blocks; ++i) + for (S32 i = 0; i < num_blocks; ++i) { titem->unpackMessage(msg, _PREHASH_InventoryData, i); if (!(titem->getUUID().isNull())) @@ -542,46 +600,45 @@ void LLInventoryAddedObserver::changed(U32 mask) } } -LLInventoryTransactionObserver::LLInventoryTransactionObserver( - const LLTransactionID& transaction_id) : +LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) : mTransactionID(transaction_id) { } void LLInventoryTransactionObserver::changed(U32 mask) { - if(mask & LLInventoryObserver::ADD) + if (mask & LLInventoryObserver::ADD) { // This could be it - see if we are processing a bulk update LLMessageSystem* msg = gMessageSystem; - if(msg->getMessageName() + if (msg->getMessageName() && (0 == strcmp(msg->getMessageName(), "BulkUpdateInventory"))) { // we have a match for the message - now check the // transaction id. LLUUID id; msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, id); - if(id == mTransactionID) + if (id == mTransactionID) { // woo hoo, we found it - folder_ref_t folders; - item_ref_t items; + uuid_vec_t folders; + uuid_vec_t items; S32 count; count = msg->getNumberOfBlocksFast(_PREHASH_FolderData); S32 i; - for(i = 0; i < count; ++i) + for (i = 0; i < count; ++i) { msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_FolderID, id, i); - if(id.notNull()) + if (id.notNull()) { folders.push_back(id); } } count = msg->getNumberOfBlocksFast(_PREHASH_ItemData); - for(i = 0; i < count; ++i) + for (i = 0; i < count; ++i) { msg->getUUIDFast(_PREHASH_ItemData, _PREHASH_ItemID, id, i); - if(id.notNull()) + if (id.notNull()) { items.push_back(id); } diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h index d6dded52d4..8d60df7e8d 100644 --- a/indra/newview/llinventoryobserver.h +++ b/indra/newview/llinventoryobserver.h @@ -42,10 +42,9 @@ class LLViewerInventoryCategory; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryObserver // -// This class is designed to be a simple abstract base class which can -// relay messages when the inventory changes. +// A simple abstract base class that can relay messages when the inventory +// changes. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryObserver { public: @@ -54,17 +53,17 @@ public: // chaged() to see if the observer is interested in the change. enum { - NONE = 0, - LABEL = 1, // name changed - INTERNAL = 2, // internal change (e.g. asset uuid different) - ADD = 4, // something added - REMOVE = 8, // something deleted - STRUCTURE = 16, // structural change (eg item or folder moved) - CALLING_CARD = 32, // (eg online, grant status, cancel) - GESTURE = 64, - REBUILD = 128, // item UI changed (eg item type different) - SORT = 256, // folder needs to be resorted. - ALL = 0xffffffff + NONE = 0, + LABEL = 1, // Name changed + INTERNAL = 2, // Internal change (e.g. asset uuid different) + ADD = 4, // Something added + REMOVE = 8, // Something deleted + STRUCTURE = 16, // Structural change (e.g. item or folder moved) + CALLING_CARD = 32, // Calling card change (e.g. online, grant status, cancel) + GESTURE = 64, + REBUILD = 128, // Item UI changed (e.g. item type different) + SORT = 256, // Folder needs to be resorted. + ALL = 0xffffffff }; LLInventoryObserver(); virtual ~LLInventoryObserver(); @@ -73,182 +72,194 @@ public: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryCompletionObserver +// Class LLInventoryFetchObserver // -// Class which can be used as a base class for doing something when -// when all observed items are locally complete. This class implements -// the changed() method of LLInventoryObserver and declares a new -// method named done() which is called when all watched items have -// complete information in the inventory model. +// Abstract class to handle fetching items, folders, etc. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLInventoryCompletionObserver : public LLInventoryObserver +class LLInventoryFetchObserver : public LLInventoryObserver { public: - LLInventoryCompletionObserver() {} - virtual void changed(U32 mask); + LLInventoryFetchObserver(const LLUUID& id = LLUUID::null); // single item + LLInventoryFetchObserver(const uuid_vec_t& ids); // multiple items + void setFetchID(const LLUUID& id); + void setFetchIDs(const uuid_vec_t& ids); - void watchItem(const LLUUID& id); + BOOL isFinished() const; + virtual void startFetch() = 0; + virtual void changed(U32 mask) = 0; + virtual void done() {}; protected: - virtual void done() = 0; - - typedef std::vector<LLUUID> item_ref_t; - item_ref_t mComplete; - item_ref_t mIncomplete; + uuid_vec_t mComplete; + uuid_vec_t mIncomplete; + uuid_vec_t mIDs; }; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryFetchObserver +// Class LLInventoryFetchItemsObserver // -// This class is much like the LLInventoryCompletionObserver, except -// that it handles all the the fetching necessary. Override the done() -// method to do the thing you want. +// Fetches inventory items, calls done() when all inventory has arrived. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -class LLInventoryFetchObserver : public LLInventoryObserver +class LLInventoryFetchItemsObserver : public LLInventoryFetchObserver { public: - LLInventoryFetchObserver(bool retry_if_missing = false): mRetryIfMissing(retry_if_missing) {} - virtual void changed(U32 mask); + LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null); + LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids); - typedef std::vector<LLUUID> item_ref_t; - - bool isEverythingComplete() const; - void fetchItems(const item_ref_t& ids); - virtual void done() {}; - -protected: - bool mRetryIfMissing; - item_ref_t mComplete; - item_ref_t mIncomplete; + /*virtual*/ void startFetch(); + /*virtual*/ void changed(U32 mask); +private: + S8 mNumTries; // Number of times changed() was called without success }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryFetchDescendentsObserver // -// This class is much like the LLInventoryCompletionObserver, except -// that it handles fetching based on category. Override the done() -// method to do the thing you want. +// Fetches children of a category/folder, calls done() when all +// inventory has arrived. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLInventoryFetchDescendentsObserver : public LLInventoryObserver +class LLInventoryFetchDescendentsObserver : public LLInventoryFetchObserver { public: - LLInventoryFetchDescendentsObserver() {} - virtual void changed(U32 mask); - - typedef std::vector<LLUUID> folder_ref_t; - void fetchDescendents(const folder_ref_t& ids); - bool isEverythingComplete() const; - virtual void done() = 0; + LLInventoryFetchDescendentsObserver(const LLUUID& cat_id = LLUUID::null); + LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids); + /*virtual*/ void startFetch(); + /*virtual*/ void changed(U32 mask); protected: - bool isComplete(LLViewerInventoryCategory* cat); - folder_ref_t mIncompleteFolders; - folder_ref_t mCompleteFolders; + BOOL isCategoryComplete(const LLViewerInventoryCategory* cat) const; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryFetchComboObserver // -// This class does an appropriate combination of fetch descendents and -// item fetches based on completion of categories and items. Much like -// the fetch and fetch descendents, this will call done() when everything -// has arrived. +// Does an appropriate combination of fetch descendents and +// item fetches based on completion of categories and items. This is optimized +// to not fetch item_ids that are descendents of any of the folder_ids. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class LLInventoryFetchComboObserver : public LLInventoryObserver { public: - LLInventoryFetchComboObserver() : mDone(false) {} - virtual void changed(U32 mask); - - typedef std::vector<LLUUID> folder_ref_t; - typedef std::vector<LLUUID> item_ref_t; - void fetch(const folder_ref_t& folder_ids, const item_ref_t& item_ids); + LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids, + const uuid_vec_t& item_ids); + ~LLInventoryFetchComboObserver(); + /*virtual*/ void changed(U32 mask); + void startFetch(); virtual void done() = 0; - protected: - bool mDone; - folder_ref_t mCompleteFolders; - folder_ref_t mIncompleteFolders; - item_ref_t mCompleteItems; - item_ref_t mIncompleteItems; + LLInventoryFetchItemsObserver *mFetchItems; + LLInventoryFetchDescendentsObserver *mFetchDescendents; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryExistenceObserver // -// This class is used as a base class for doing somethign when all the -// observed item ids exist in the inventory somewhere. You can derive -// a class from this class and implement the done() method to do -// something useful. +// Used as a base class for doing something when all the +// observed item ids exist in the inventory somewhere. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryExistenceObserver : public LLInventoryObserver { public: LLInventoryExistenceObserver() {} - virtual void changed(U32 mask); + /*virtual*/ void changed(U32 mask); void watchItem(const LLUUID& id); +protected: + virtual void done() = 0; + uuid_vec_t mExist; + uuid_vec_t mMIA; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryMovedObserver +// +// This class is used as a base class for doing something when all the +// item for observed asset ids were added into the inventory. +// Derive a class from this class and implement the done() method to do +// something useful. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +{ +public: + LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + virtual void changed(U32 mask); + + void watchAsset(const LLUUID& asset_id); + bool isAssetWatched(const LLUUID& asset_id); protected: + virtual void onAssetAdded(const LLUUID& asset_id) {} virtual void done() = 0; typedef std::vector<LLUUID> item_ref_t; - item_ref_t mExist; - item_ref_t mMIA; + item_ref_t mAddedItems; + item_ref_t mWatchedAssets; + +private: + bool mIsDirty; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryAddedObserver // -// This class is used as a base class for doing something when -// a new item arrives in inventory. -// It does not watch for a certain UUID, rather it acts when anything is added -// Derive a class from this class and implement the done() method to do -// something useful. +// Base class for doing something when a new item arrives in inventory. +// It does not watch for a certain UUID, rather it acts when anything is added //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryAddedObserver : public LLInventoryObserver { public: LLInventoryAddedObserver() : mAdded() {} - virtual void changed(U32 mask); + /*virtual*/ void changed(U32 mask); protected: virtual void done() = 0; - typedef std::vector<LLUUID> item_ref_t; - item_ref_t mAdded; + uuid_vec_t mAdded; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInventoryTransactionObserver // -// Class which can be used as a base class for doing something when an -// inventory transaction completes. -// -// *NOTE: This class is not quite complete. Avoid using unless you fix up it's -// functionality gaps. +// Base class for doing something when an inventory transaction completes. +// NOTE: This class is not quite complete. Avoid using unless you fix up its +// functionality gaps. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - class LLInventoryTransactionObserver : public LLInventoryObserver { public: LLInventoryTransactionObserver(const LLTransactionID& transaction_id); - virtual void changed(U32 mask); + /*virtual*/ void changed(U32 mask); protected: - typedef std::vector<LLUUID> folder_ref_t; - typedef std::vector<LLUUID> item_ref_t; - virtual void done(const folder_ref_t& folders, const item_ref_t& items) = 0; + virtual void done(const uuid_vec_t& folders, const uuid_vec_t& items) = 0; LLTransactionID mTransactionID; }; +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryCompletionObserver +// +// Base class for doing something when when all observed items are locally +// complete. Implements the changed() method of LLInventoryObserver +// and declares a new method named done() which is called when all watched items +// have complete information in the inventory model. +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryCompletionObserver : public LLInventoryObserver +{ +public: + LLInventoryCompletionObserver() {} + /*virtual*/ void changed(U32 mask); + + void watchItem(const LLUUID& id); + +protected: + virtual void done() = 0; + + uuid_vec_t mComplete; + uuid_vec_t mIncomplete; +}; #endif // LL_LLINVENTORYOBSERVERS_H diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d7720b735c..15c872a7c4 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -38,11 +38,14 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llavataractions.h" #include "llfloaterinventory.h" #include "llfloaterreg.h" #include "llimfloater.h" #include "llimview.h" #include "llinventorybridge.h" +#include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llsidepanelinventory.h" #include "llsidetray.h" #include "llscrollcontainer.h" @@ -78,7 +81,7 @@ protected: LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : LLPanel(p), mInventoryObserver(NULL), - mFolders(NULL), + mFolderRoot(NULL), mScroller(NULL), mSortOrderSetting(p.sort_order_setting), mInventory(p.inventory), @@ -97,6 +100,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); if (mStartFolderString != "") { @@ -122,13 +126,13 @@ BOOL LLInventoryPanel::postBuild() p.rect = folder_rect; p.parent_panel = this; p.tool_tip = p.name; - mFolders = LLUICtrlFactory::create<LLFolderView>(p); - mFolders->setAllowMultiSelect(mAllowMultiSelect); + mFolderRoot = LLUICtrlFactory::create<LLFolderView>(p); + mFolderRoot->setAllowMultiSelect(mAllowMultiSelect); } mCommitCallbackRegistrar.popScope(); - mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar); + mFolderRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); // Scroller { @@ -142,9 +146,9 @@ BOOL LLInventoryPanel::postBuild() p.tab_stop(true); mScroller = LLUICtrlFactory::create<LLScrollContainer>(p); addChild(mScroller); - mScroller->addChild(mFolders); - mFolders->setScrollContainer(mScroller); - mFolders->addChild(mFolders->mStatusTextBox); + mScroller->addChild(mFolderRoot); + mFolderRoot->setScrollContainer(mScroller); + mFolderRoot->addChild(mFolderRoot->mStatusTextBox); } // Set up the callbacks from the inventory we're viewing, and then build everything. @@ -167,16 +171,16 @@ BOOL LLInventoryPanel::postBuild() { setSortOrder(gSavedSettings.getU32(DEFAULT_SORT_ORDER)); } - mFolders->setSortOrder(getFilter()->getSortOrder()); + mFolderRoot->setSortOrder(getFilter()->getSortOrder()); return TRUE; } LLInventoryPanel::~LLInventoryPanel() { - if (mFolders) + if (mFolderRoot) { - U32 sort_order = mFolders->getSortOrder(); + U32 sort_order = mFolderRoot->getSortOrder(); if (mSortOrderSetting != INHERIT_SORT_ORDER) { gSavedSettings.setU32(mSortOrderSetting, sort_order); @@ -192,15 +196,15 @@ LLInventoryPanel::~LLInventoryPanel() void LLInventoryPanel::draw() { // Select the desired item (in case it wasn't loaded when the selection was requested) - mFolders->updateSelection(); + mFolderRoot->updateSelection(); LLPanel::draw(); } LLInventoryFilter* LLInventoryPanel::getFilter() { - if (mFolders) + if (mFolderRoot) { - return mFolders->getFilter(); + return mFolderRoot->getFilter(); } return NULL; } @@ -228,9 +232,9 @@ void LLInventoryPanel::setSortOrder(U32 order) getFilter()->setSortOrder(order); if (getFilter()->isModified()) { - mFolders->setSortOrder(order); + mFolderRoot->setSortOrder(order); // try to keep selection onscreen, even if it wasn't to start with - mFolders->scrollToShowSelection(); + mFolderRoot->scrollToShowSelection(); } } @@ -275,8 +279,8 @@ void LLInventoryPanel::modelChanged(U32 mask) { const LLUUID& item_id = (*items_iter); const LLInventoryObject* model_item = model->getObject(item_id); - LLFolderViewItem* view_item = mFolders->getItemByID(item_id); - LLFolderViewFolder* view_folder = mFolders->getFolderByID(item_id); + LLFolderViewItem* view_item = mFolderRoot->getItemByID(item_id); + LLFolderViewFolder* view_folder = mFolderRoot->getFolderByID(item_id); ////////////////////////////// // LABEL Operation @@ -351,7 +355,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // Add the UI element for this item. buildNewViews(item_id); // Select any newly created object that has the auto rename at top of folder root set. - if(mFolders->getRoot()->needsAutoRename()) + if(mFolderRoot->getRoot()->needsAutoRename()) { setSelection(item_id, FALSE); } @@ -366,7 +370,7 @@ void LLInventoryPanel::modelChanged(U32 mask) // model_item's parent will be NULL. if (view_item->getRoot() != view_item->getParent()) { - LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolders->getItemByID(model_item->getParentUUID()); + LLFolderViewFolder* new_parent = (LLFolderViewFolder*)mFolderRoot->getItemByID(model_item->getParentUUID()); // Item has been moved. if (view_item->getParentFolder() != new_parent) { @@ -374,7 +378,7 @@ void LLInventoryPanel::modelChanged(U32 mask) { // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI. view_item->getParentFolder()->extractItem(view_item); - view_item->addToFolder(new_parent, mFolders); + view_item->addToFolder(new_parent, mFolderRoot); } else { @@ -442,14 +446,14 @@ void LLInventoryPanel::initializeViews() if (gAgent.isFirstLogin()) { // Auto open the user's library - LLFolderViewFolder* lib_folder = mFolders->getFolderByID(gInventory.getLibraryRootFolderID()); + LLFolderViewFolder* lib_folder = mFolderRoot->getFolderByID(gInventory.getLibraryRootFolderID()); if (lib_folder) { lib_folder->setOpen(TRUE); } // Auto close the user's my inventory folder - LLFolderViewFolder* my_inv_folder = mFolders->getFolderByID(gInventory.getRootFolderID()); + LLFolderViewFolder* my_inv_folder = mFolderRoot->getFolderByID(gInventory.getRootFolderID()); if (my_inv_folder) { my_inv_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); @@ -460,7 +464,7 @@ void LLInventoryPanel::initializeViews() void LLInventoryPanel::rebuildViewsFor(const LLUUID& id) { // Destroy the old view for this ID so we can rebuild it. - LLFolderViewItem* old_view = mFolders->getItemByID(id); + LLFolderViewItem* old_view = mFolderRoot->getItemByID(id); if (old_view && id.notNull()) { old_view->destroyView(); @@ -477,10 +481,10 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) if (objectp) { const LLUUID &parent_id = objectp->getParentUUID(); - LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolders->getItemByID(parent_id); + LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)mFolderRoot->getItemByID(parent_id); if (id == mStartFolderID) { - parent_folder = mFolders; + parent_folder = mFolderRoot; } else if ((mStartFolderID != LLUUID::null) && (!gInventory.isObjectDescendentOf(id, mStartFolderID))) { @@ -504,19 +508,19 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) objectp->getType(), LLInventoryType::IT_CATEGORY, this, + mFolderRoot, objectp->getUUID()); - if (new_listener) { LLFolderViewFolder::Params params; params.name = new_listener->getDisplayName(); params.icon = new_listener->getIcon(); params.icon_open = new_listener->getOpenIcon(); - params.root = mFolders; + params.root = mFolderRoot; params.listener = new_listener; params.tool_tip = params.name; LLFolderViewFolder* folderp = LLUICtrlFactory::create<LLFolderViewFolder>(params); - folderp->setItemSortOrder(mFolders->getSortOrder()); + folderp->setItemSortOrder(mFolderRoot->getSortOrder()); itemp = folderp; // Hide the root folder, so we can show the contents of a folder flat @@ -540,6 +544,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) item->getActualType(), item->getInventoryType(), this, + mFolderRoot, item->getUUID(), item->getFlags()); @@ -550,7 +555,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) params.icon = new_listener->getIcon(); params.icon_open = new_listener->getOpenIcon(); params.creation_date = new_listener->getCreationDate(); - params.root = mFolders; + params.root = mFolderRoot; params.listener = new_listener; params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; @@ -560,7 +565,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) if (itemp) { - itemp->addToFolder(parent_folder, mFolders); + itemp->addToFolder(parent_folder, mFolderRoot); // Don't add children of hidden folders unless this is the panel's root folder. if (itemp->getHidden() && (id != mStartFolderID)) @@ -609,19 +614,19 @@ void LLInventoryPanel::openStartFolderOrMyInventory() { if (mStartFolderString != "") { - mFolders->openFolder(mStartFolderString); + mFolderRoot->openFolder(mStartFolderString); } else { // Find My Inventory folder and open it up by name - for (LLView *child = mFolders->getFirstChild(); child; child = mFolders->findNextSibling(child)) + for (LLView *child = mFolderRoot->getFirstChild(); child; child = mFolderRoot->findNextSibling(child)) { LLFolderViewFolder *fchild = dynamic_cast<LLFolderViewFolder*>(child); if (fchild && fchild->getListener() && (fchild->getListener()->getUUID() == gInventory.getRootFolderID())) { const std::string& child_name = child->getName(); - mFolders->openFolder(child_name); + mFolderRoot->openFolder(child_name); break; } } @@ -630,7 +635,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory() void LLInventoryPanel::openSelected() { - LLFolderViewItem* folder_item = mFolders->getCurSelectedItem(); + LLFolderViewItem* folder_item = mFolderRoot->getCurSelectedItem(); if(!folder_item) return; LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getListener(); if(!bridge) return; @@ -643,7 +648,7 @@ BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask) if(handled) { ECursorType cursor = getWindow()->getCursor(); - if (LLInventoryModel::backgroundFetchActive() && cursor == UI_CURSOR_ARROW) + if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive() && cursor == UI_CURSOR_ARROW) { // replace arrow cursor with arrow and hourglass cursor getWindow()->setCursor(UI_CURSOR_WORKING); @@ -666,14 +671,15 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // If folder view is empty the (x, y) point won't be in its rect // so the handler must be called explicitly. - if (!mFolders->hasVisibleChildren()) + // but only if was not handled before. See EXT-6746. + if (!handled && !mFolderRoot->hasVisibleChildren()) { - handled = mFolders->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); + handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } if (handled) { - mFolders->setDragAndDropThisFrame(); + mFolderRoot->setDragAndDropThisFrame(); } return handled; @@ -684,20 +690,20 @@ void LLInventoryPanel::onMouseEnter(S32 x, S32 y, MASK mask) { LLPanel::onMouseEnter(x, y, mask); // don't auto-scroll a list when cursor is over Inventory. See EXT-3981. - mFolders->setEnableScroll(false); + mFolderRoot->setEnableScroll(false); } // virtual void LLInventoryPanel::onMouseLeave(S32 x, S32 y, MASK mask) { LLPanel::onMouseLeave(x, y, mask); - mFolders->setEnableScroll(true); + mFolderRoot->setEnableScroll(true); } void LLInventoryPanel::onFocusLost() { // inventory no longer handles cut/copy/paste/delete - if (LLEditMenuHandler::gEditMenuHandler == mFolders) + if (LLEditMenuHandler::gEditMenuHandler == mFolderRoot) { LLEditMenuHandler::gEditMenuHandler = NULL; } @@ -708,39 +714,39 @@ void LLInventoryPanel::onFocusLost() void LLInventoryPanel::onFocusReceived() { // inventory now handles cut/copy/paste/delete - LLEditMenuHandler::gEditMenuHandler = mFolders; + LLEditMenuHandler::gEditMenuHandler = mFolderRoot; LLPanel::onFocusReceived(); } void LLInventoryPanel::openAllFolders() { - mFolders->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); - mFolders->arrangeAll(); + mFolderRoot->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + mFolderRoot->arrangeAll(); } void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus) { // Don't select objects in COF (e.g. to prevent refocus when items are worn). const LLInventoryObject *obj = gInventory.getObject(obj_id); - if (obj && obj->getParentUUID() == LLAppearanceManager::instance().getCOF()) + if (obj && obj->getParentUUID() == LLAppearanceMgr::instance().getCOF()) { return; } - mFolders->setSelectionByID(obj_id, take_keyboard_focus); + mFolderRoot->setSelectionByID(obj_id, take_keyboard_focus); } void LLInventoryPanel::setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { - if (mFolders) + if (mFolderRoot) { - mFolders->setSelectCallback(cb); + mFolderRoot->setSelectCallback(cb); } } void LLInventoryPanel::clearSelection() { - mFolders->clearSelection(); + mFolderRoot->clearSelection(); } void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& items, BOOL user_action) @@ -759,18 +765,18 @@ void LLInventoryPanel::onSelectionChange(const std::deque<LLFolderViewItem*>& it void LLInventoryPanel::doToSelected(const LLSD& userdata) { - mFolders->doToSelected(&gInventory, userdata); + mFolderRoot->doToSelected(&gInventory, userdata); } void LLInventoryPanel::doCreate(const LLSD& userdata) { - menu_create_inventory_item(mFolders, LLFolderBridge::sSelf, userdata); + menu_create_inventory_item(mFolderRoot, LLFolderBridge::sSelf, userdata); } bool LLInventoryPanel::beginIMSession() { std::set<LLUUID> selected_items; - mFolders->getSelectionList(selected_items); + mFolderRoot->getSelectionList(selected_items); std::string name; static int session_num = 1; @@ -783,7 +789,7 @@ bool LLInventoryPanel::beginIMSession() { LLUUID item = *iter; - LLFolderViewItem* folder_item = mFolders->getItemByID(item); + LLFolderViewItem* folder_item = mFolderRoot->getItemByID(item); if(folder_item) { @@ -825,7 +831,7 @@ bool LLInventoryPanel::beginIMSession() } else { - LLFolderViewItem* folder_item = mFolders->getItemByID(item); + LLFolderViewItem* folder_item = mFolderRoot->getItemByID(item); if(!folder_item) return true; LLInvFVBridge* listenerp = (LLInvFVBridge*)folder_item->getListener(); @@ -868,13 +874,12 @@ bool LLInventoryPanel::beginIMSession() bool LLInventoryPanel::attachObject(const LLSD& userdata) { std::set<LLUUID> selected_items; - mFolders->getSelectionList(selected_items); + mFolderRoot->getSelectionList(selected_items); std::string joint_name = userdata.asString(); - LLVOAvatar *avatarp = static_cast<LLVOAvatar*>(gAgent.getAvatarObject()); LLViewerJointAttachment* attachmentp = NULL; - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -899,7 +904,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata) { rez_attachment(item, attachmentp); } - else if(item && item->isComplete()) + else if(item && item->isFinished()) { // must be in library. copy it to our inventory and put it on. LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp); @@ -926,7 +931,7 @@ BOOL LLInventoryPanel::getSinceLogoff() void LLInventoryPanel::dumpSelectionInformation(void* user_data) { LLInventoryPanel* iv = (LLInventoryPanel*)user_data; - iv->mFolders->dumpSelectionInformation(); + iv->mFolderRoot->dumpSelectionInformation(); } BOOL is_inventorysp_active() diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 928a458b84..160a3d6f23 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -133,21 +133,21 @@ public: void clearSelection(); LLInventoryFilter* getFilter(); void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); - U32 getFilterObjectTypes() const { return mFolders->getFilterObjectTypes(); } + U32 getFilterObjectTypes() const { return mFolderRoot->getFilterObjectTypes(); } void setFilterPermMask(PermissionMask filter_perm_mask); - U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); } + U32 getFilterPermMask() const { return mFolderRoot->getFilterPermissions(); } void setFilterSubString(const std::string& string); - const std::string getFilterSubString() { return mFolders->getFilterSubString(); } + const std::string getFilterSubString() { return mFolderRoot->getFilterSubString(); } void setSinceLogoff(BOOL sl); void setHoursAgo(U32 hours); BOOL getSinceLogoff(); void setShowFolderState(LLInventoryFilter::EFolderShow show); LLInventoryFilter::EFolderShow getShowFolderState(); - void setAllowMultiSelect(BOOL allow) { mFolders->setAllowMultiSelect(allow); } + void setAllowMultiSelect(BOOL allow) { mFolderRoot->setAllowMultiSelect(allow); } // This method is called when something has changed about the inventory. void modelChanged(U32 mask); - LLFolderView* getRootFolder() { return mFolders; } + LLFolderView* getRootFolder() { return mFolderRoot; } LLScrollContainer* getScrollableContainer() { return mScroller; } void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); @@ -162,7 +162,7 @@ public: static void dumpSelectionInformation(void* user_data); void openSelected(); - void unSelectAll() { mFolders->setSelection(NULL, FALSE, FALSE); } + void unSelectAll() { mFolderRoot->setSelection(NULL, FALSE, FALSE); } static void onIdle(void* user_data); @@ -177,7 +177,7 @@ protected: LLInventoryObserver* mInventoryObserver; BOOL mAllowMultiSelect; - LLFolderView* mFolders; + LLFolderView* mFolderRoot; LLScrollContainer* mScroller; /** @@ -199,7 +199,7 @@ public: static const std::string INHERIT_SORT_ORDER; void setSortOrder(U32 order); - U32 getSortOrder() const { return mFolders->getSortOrder(); } + U32 getSortOrder() const { return mFolderRoot->getSortOrder(); } private: std::string mSortOrderSetting; diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index 2cc5c8335d..9e1dc3a4b0 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -42,6 +42,7 @@ // Project includes #include "llui.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewertexture.h" #include "llviewertexturelist.h" #include "llviewerwindow.h" @@ -482,25 +483,25 @@ void LLJoystickCameraRotate::onHeldDown() // left-right rotation if (dx > mHorizSlopNear) { - gAgent.unlockView(); - gAgent.setOrbitLeftKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitLeftKey(getOrbitRate()); } else if (dx < -mHorizSlopNear) { - gAgent.unlockView(); - gAgent.setOrbitRightKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitRightKey(getOrbitRate()); } // over/under rotation if (dy > mVertSlopNear) { - gAgent.unlockView(); - gAgent.setOrbitUpKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitUpKey(getOrbitRate()); } else if (dy < -mVertSlopNear) { - gAgent.unlockView(); - gAgent.setOrbitDownKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitDownKey(getOrbitRate()); } } @@ -625,25 +626,25 @@ void LLJoystickCameraTrack::onHeldDown() if (dx > mVertSlopNear) { - gAgent.unlockView(); - gAgent.setPanRightKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setPanRightKey(getOrbitRate()); } else if (dx < -mVertSlopNear) { - gAgent.unlockView(); - gAgent.setPanLeftKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setPanLeftKey(getOrbitRate()); } // over/under rotation if (dy > mVertSlopNear) { - gAgent.unlockView(); - gAgent.setPanUpKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setPanUpKey(getOrbitRate()); } else if (dy < -mVertSlopNear) { - gAgent.unlockView(); - gAgent.setPanDownKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setPanDownKey(getOrbitRate()); } } @@ -692,26 +693,26 @@ void LLJoystickCameraZoom::onHeldDown() if (dy > mVertSlopFar) { // Zoom in fast - gAgent.unlockView(); - gAgent.setOrbitInKey(FAST_RATE); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitInKey(FAST_RATE); } else if (dy > mVertSlopNear) { // Zoom in slow - gAgent.unlockView(); - gAgent.setOrbitInKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitInKey(getOrbitRate()); } else if (dy < -mVertSlopFar) { // Zoom out fast - gAgent.unlockView(); - gAgent.setOrbitOutKey(FAST_RATE); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitOutKey(FAST_RATE); } else if (dy < -mVertSlopNear) { // Zoom out slow - gAgent.unlockView(); - gAgent.setOrbitOutKey(getOrbitRate()); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitOutKey(getOrbitRate()); } } diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index f25d2ef574..7336efb62a 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -36,6 +36,7 @@ #include "roles_constants.h" #include "llinventory.h" +#include "llinventoryfunctions.h" #include "lllandmark.h" #include "llparcel.h" #include "llregionhandle.h" diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 4100e2fc61..4e0be81f62 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -108,7 +108,7 @@ public: private: /*virtual*/ void done() { - std::vector<LLUUID>::const_iterator it = mAdded.begin(), end = mAdded.end(); + uuid_vec_t::const_iterator it = mAdded.begin(), end = mAdded.end(); for(; it != end; ++it) { LLInventoryItem* item = gInventory.getItem(*it); @@ -227,7 +227,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) params.default_text(LLStringUtil::null); params.max_length_bytes(p.max_chars); params.keystroke_callback(boost::bind(&LLComboBox::onTextEntry, this, _1)); - params.handle_edit_keys_directly(true); params.commit_on_focus_lost(false); params.follows.flags(FOLLOWS_ALL); mTextEntry = LLUICtrlFactory::create<LLURLLineEditor>(params); @@ -391,8 +390,8 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mAddLandmarkTooltip = LLTrans::getString("LocationCtrlAddLandmarkTooltip"); mEditLandmarkTooltip = LLTrans::getString("LocationCtrlEditLandmarkTooltip"); - getChild<LLView>("Location History")->setToolTip(LLTrans::getString("LocationCtrlComboBtnTooltip")); - getChild<LLView>("Place Information")->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip")); + mButton->setToolTip(LLTrans::getString("LocationCtrlComboBtnTooltip")); + mInfoBtn->setToolTip(LLTrans::getString("LocationCtrlInfoBtnTooltip")); } LLLocationInputCtrl::~LLLocationInputCtrl() diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 24c72c65ce..454fd29fdc 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -352,20 +352,18 @@ void LLLoginInstance::updateApp(bool mandatory, const std::string& auth_msg) payload["mandatory"] = mandatory; /* - We're constructing one of the following 6 strings here: + We're constructing one of the following 9 strings here: "DownloadWindowsMandatory" "DownloadWindowsReleaseForDownload" "DownloadWindows" "DownloadMacMandatory" "DownloadMacReleaseForDownload" "DownloadMac" + "DownloadLinuxMandatory" + "DownloadLinuxReleaseForDownload" + "DownloadLinux" I've called them out explicitly in this comment so that they can be grepped for. - - Also, we assume that if we're not Windows we're Mac. If we ever intend to support - Linux with autoupdate, this should be an explicit #elif LL_DARWIN, but - we'd rather deliver the wrong message than no message, so until Linux is supported - we'll leave it alone. */ std::string notification_name = "Download"; diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp index a96240e31c..957e88960d 100644 --- a/indra/newview/llmanip.cpp +++ b/indra/newview/llmanip.cpp @@ -43,6 +43,7 @@ #include "llviewertexturelist.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "lldrawable.h" #include "llfontgl.h" @@ -180,7 +181,7 @@ F32 LLManip::getSubdivisionLevel(const LLVector3 &reference_point, const LLVecto LLVector3 cam_to_reference; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - cam_to_reference = LLVector3(1.f / gAgent.mHUDCurZoom, 0.f, 0.f); + cam_to_reference = LLVector3(1.f / gAgentCamera.mHUDCurZoom, 0.f, 0.f); } else { @@ -265,8 +266,8 @@ BOOL LLManip::getMousePointOnPlaneGlobal(LLVector3d& point, S32 x, S32 y, LLVect if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { BOOL result = FALSE; - F32 mouse_x = ((F32)x / gViewerWindow->getWorldViewWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom; - F32 mouse_y = ((F32)y / gViewerWindow->getWorldViewHeightScaled() - 0.5f) / gAgent.mHUDCurZoom; + F32 mouse_x = ((F32)x / gViewerWindow->getWorldViewWidthScaled() - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgentCamera.mHUDCurZoom; + F32 mouse_y = ((F32)y / gViewerWindow->getWorldViewHeightScaled() - 0.5f) / gAgentCamera.mHUDCurZoom; LLVector3 origin_agent = gAgent.getPosAgentFromGlobal(origin); LLVector3 mouse_pos = LLVector3(0.f, -mouse_x, mouse_y); @@ -304,15 +305,15 @@ BOOL LLManip::nearestPointOnLineFromMouse( S32 x, S32 y, const LLVector3& b1, co if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidthScaled()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgent.mHUDCurZoom; - F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeightScaled()) - 0.5f) / gAgent.mHUDCurZoom; + F32 mouse_x = (((F32)x / gViewerWindow->getWindowWidthScaled()) - 0.5f) * LLViewerCamera::getInstance()->getAspect() / gAgentCamera.mHUDCurZoom; + F32 mouse_y = (((F32)y / gViewerWindow->getWindowHeightScaled()) - 0.5f) / gAgentCamera.mHUDCurZoom; a1 = LLVector3(llmin(b1.mV[VX] - 0.1f, b2.mV[VX] - 0.1f, 0.f), -mouse_x, mouse_y); a2 = a1 + LLVector3(1.f, 0.f, 0.f); } else { - a1 = gAgent.getCameraPositionAgent(); - a2 = gAgent.getCameraPositionAgent() + LLVector3(gViewerWindow->mouseDirectionGlobal(x, y)); + a1 = gAgentCamera.getCameraPositionAgent(); + a2 = gAgentCamera.getCameraPositionAgent() + LLVector3(gViewerWindow->mouseDirectionGlobal(x, y)); } BOOL parallel = TRUE; @@ -491,7 +492,7 @@ void LLManip::renderTickText(const LLVector3& pos, const std::string& text, cons LLVector3 render_pos = pos; if (hud_selection) { - F32 zoom_amt = gAgent.mHUDCurZoom; + F32 zoom_amt = gAgentCamera.mHUDCurZoom; F32 inv_zoom_amt = 1.f / zoom_amt; // scale text back up to counter-act zoom level render_pos = pos * zoom_amt; @@ -549,7 +550,7 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string LLVector3 render_pos = pos; if (hud_selection) { - F32 zoom_amt = gAgent.mHUDCurZoom; + F32 zoom_amt = gAgentCamera.mHUDCurZoom; F32 inv_zoom_amt = 1.f / zoom_amt; // scale text back up to counter-act zoom level render_pos = pos * zoom_amt; diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 8535d52015..6747bcb9c9 100644 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -45,6 +45,7 @@ // viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llbox.h" #include "llbutton.h" #include "llviewercontrol.h" @@ -64,6 +65,7 @@ #include "lldrawable.h" #include "llglheaders.h" #include "lltrans.h" +#include "llvoavatarself.h" const F32 RADIUS_PIXELS = 100.f; // size in screen space const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; @@ -138,7 +140,7 @@ void LLManipRotate::render() glPushMatrix(); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom, zoom, zoom); } @@ -690,7 +692,7 @@ void LLManipRotate::drag( S32 x, S32 y ) LLSelectMgr::getInstance()->updateSelectionCenter(); // RN: just clear focus so camera doesn't follow spurious object updates - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); dialog_refresh_all(); } @@ -730,7 +732,7 @@ void LLManipRotate::renderSnapGuides() } else { - cam_at_axis = center - gAgent.getCameraPositionAgent(); + cam_at_axis = center - gAgentCamera.getCameraPositionAgent(); cam_at_axis.normVec(); } @@ -738,7 +740,7 @@ void LLManipRotate::renderSnapGuides() LLVector3 test_axis = constraint_axis; BOOL constrain_to_ref_object = FALSE; - if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject()) + if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { test_axis = test_axis * ~grid_rotation; } @@ -765,7 +767,7 @@ void LLManipRotate::renderSnapGuides() } LLVector3 projected_snap_axis = world_snap_axis; - if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject()) + if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { projected_snap_axis = projected_snap_axis * grid_rotation; } @@ -1097,12 +1099,12 @@ BOOL LLManipRotate::updateVisiblity() LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter ); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - mCenterToCam = LLVector3(-1.f / gAgent.mHUDCurZoom, 0.f, 0.f); + mCenterToCam = LLVector3(-1.f / gAgentCamera.mHUDCurZoom, 0.f, 0.f); mCenterToCamNorm = mCenterToCam; mCenterToCamMag = mCenterToCamNorm.normVec(); mRadiusMeters = RADIUS_PIXELS / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); - mRadiusMeters /= gAgent.mHUDCurZoom; + mRadiusMeters /= gAgentCamera.mHUDCurZoom; mCenterToProfilePlaneMag = mRadiusMeters * mRadiusMeters / mCenterToCamMag; mCenterToProfilePlane = -mCenterToProfilePlaneMag * mCenterToCamNorm; @@ -1110,8 +1112,8 @@ BOOL LLManipRotate::updateVisiblity() // x axis range is (-aspect * 0.5f, +aspect * 0.5) // y axis range is (-0.5, 0.5) // so use getWorldViewHeightRaw as scale factor when converting to pixel coordinates - mCenterScreen.set((S32)((0.5f - center.mV[VY]) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled()), - (S32)((center.mV[VZ] + 0.5f) / gAgent.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled())); + mCenterScreen.set((S32)((0.5f - center.mV[VY]) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled()), + (S32)((center.mV[VZ] + 0.5f) / gAgentCamera.mHUDCurZoom * gViewerWindow->getWorldViewHeightScaled())); visible = TRUE; } else @@ -1119,7 +1121,7 @@ BOOL LLManipRotate::updateVisiblity() visible = LLViewerCamera::getInstance()->projectPosAgentToScreen(center, mCenterScreen ); if( visible ) { - mCenterToCam = gAgent.getCameraPositionAgent() - center; + mCenterToCam = gAgentCamera.getCameraPositionAgent() - center; mCenterToCamNorm = mCenterToCam; mCenterToCamMag = mCenterToCamNorm.normVec(); LLVector3 cameraAtAxis = LLViewerCamera::getInstance()->getAtAxis(); @@ -1165,7 +1167,7 @@ BOOL LLManipRotate::updateVisiblity() LLQuaternion LLManipRotate::dragUnconstrained( S32 x, S32 y ) { - LLVector3 cam = gAgent.getCameraPositionAgent(); + LLVector3 cam = gAgentCamera.getCameraPositionAgent(); LLVector3 center = gAgent.getPosAgentFromGlobal( mRotationCenter ); mMouseCur = intersectMouseWithSphere( x, y, center, mRadiusMeters); @@ -1281,7 +1283,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) LLVector3 axis2; LLVector3 test_axis = constraint_axis; - if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject()) + if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { test_axis = test_axis * ~grid_rotation; } @@ -1305,7 +1307,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) axis1 = LLVector3::x_axis; } - if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject()) + if (mObjectSelection->getSelectType() == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { axis1 = axis1 * grid_rotation; } @@ -1333,7 +1335,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) } else { - cam_to_snap_plane = snap_plane_center - gAgent.getCameraPositionAgent(); + cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); cam_to_snap_plane.normVec(); } @@ -1383,7 +1385,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) } else { - cam_to_snap_plane = snap_plane_center - gAgent.getCameraPositionAgent(); + cam_to_snap_plane = snap_plane_center - gAgentCamera.getCameraPositionAgent(); cam_to_snap_plane.normVec(); } @@ -1430,7 +1432,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y ) } else { - cam_at_axis = snap_plane_center - gAgent.getCameraPositionAgent(); + cam_at_axis = snap_plane_center - gAgentCamera.getCameraPositionAgent(); cam_at_axis.normVec(); } @@ -1627,15 +1629,15 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_ { if (LLSelectMgr::getInstance()->getSelection()->getSelectType() == SELECT_TYPE_HUD) { - F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewRectScaled().getWidth()) - 0.5f) / gAgent.mHUDCurZoom; - F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewRectScaled().getHeight()) - 0.5f) / gAgent.mHUDCurZoom; + F32 mouse_x = (((F32)x / gViewerWindow->getWorldViewRectScaled().getWidth()) - 0.5f) / gAgentCamera.mHUDCurZoom; + F32 mouse_y = ((((F32)y) / gViewerWindow->getWorldViewRectScaled().getHeight()) - 0.5f) / gAgentCamera.mHUDCurZoom; *ray_pt = LLVector3(-1.f, -mouse_x, mouse_y); *ray_dir = LLVector3(1.f, 0.f, 0.f); } else { - *ray_pt = gAgent.getCameraPositionAgent(); + *ray_pt = gAgentCamera.getCameraPositionAgent(); LLViewerCamera::getInstance()->projectScreenToPosAgent(x, y, ray_dir); *ray_dir -= *ray_pt; ray_dir->normVec(); diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index ee3ffa2450..63643a7fc6 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -45,6 +45,7 @@ // viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llbbox.h" #include "llbox.h" #include "llviewercontrol.h" @@ -210,7 +211,7 @@ void LLManipScale::render() glPushMatrix(); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom, zoom, zoom); } @@ -227,11 +228,11 @@ void LLManipScale::render() if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mBoxHandleSize = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR / (F32) LLViewerCamera::getInstance()->getViewHeightInPixels(); - mBoxHandleSize /= gAgent.mHUDCurZoom; + mBoxHandleSize /= gAgentCamera.mHUDCurZoom; } else { - range = dist_vec(gAgent.getCameraPositionAgent(), center_agent); + range = dist_vec(gAgentCamera.getCameraPositionAgent(), center_agent); range_from_agent = dist_vec(gAgent.getPositionAgent(), center_agent); // Don't draw manip if object too far away @@ -438,7 +439,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) LLMatrix4 cfr(OGL_TO_CFR_ROTATION); transform *= cfr; LLMatrix4 window_scale; - F32 zoom_level = 2.f * gAgent.mHUDCurZoom; + F32 zoom_level = 2.f * gAgentCamera.mHUDCurZoom; window_scale.initAll(LLVector3(zoom_level / LLViewerCamera::getInstance()->getAspect(), zoom_level, 0.f), LLQuaternion::DEFAULT, LLVector3::zero); @@ -635,7 +636,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) } // Find nearest vertex - LLVector3 orientWRTHead = bbox.agentToLocalBasis( bbox.getCenterAgent() - gAgent.getCameraPositionAgent() ); + LLVector3 orientWRTHead = bbox.agentToLocalBasis( bbox.getCenterAgent() - gAgentCamera.getCameraPositionAgent() ); U32 nearest = (orientWRTHead.mV[0] < 0.0f ? 1 : 0) + (orientWRTHead.mV[1] < 0.0f ? 2 : 0) + @@ -825,7 +826,7 @@ void LLManipScale::drag( S32 x, S32 y ) } LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); } // Scale around the @@ -1364,7 +1365,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) if(mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgent.mHUDCurZoom; + mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgentCamera.mHUDCurZoom; } else @@ -1377,7 +1378,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { cam_at_axis.setVec(1.f, 0.f, 0.f); - snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgent.mHUDCurZoom; + snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgentCamera.mHUDCurZoom; } else { diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 52fe31fbba..5f0c5e1795 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -42,6 +42,7 @@ #include "llrender.h" #include "llagent.h" +#include "llagentcamera.h" #include "llbbox.h" #include "llbox.h" #include "llviewercontrol.h" @@ -437,12 +438,12 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) { if (x < ROTATE_H_MARGIN) { - gAgent.cameraOrbitAround(rotate_angle); + gAgentCamera.cameraOrbitAround(rotate_angle); rotated = TRUE; } else if (x > world_rect.getWidth() - ROTATE_H_MARGIN) { - gAgent.cameraOrbitAround(-rotate_angle); + gAgentCamera.cameraOrbitAround(-rotate_angle); rotated = TRUE; } } @@ -713,7 +714,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) // in position changes even when the mouse moves object->setPosition(new_position_local); rebuild(object); - gAgent.getAvatarObject()->clampAttachmentPositions(); + gAgentAvatarp->clampAttachmentPositions(); new_position_local = object->getPosition(); if (selectNode->mIndividualSelection) @@ -789,7 +790,7 @@ BOOL LLManipTranslate::handleHover(S32 x, S32 y, MASK mask) } LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); dialog_refresh_all(); // ??? is this necessary? lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipTranslate (active)" << llendl; @@ -830,7 +831,7 @@ void LLManipTranslate::highlightManipulators(S32 x, S32 y) LLMatrix4 cfr(OGL_TO_CFR_ROTATION); transform *= cfr; LLMatrix4 window_scale; - F32 zoom_level = 2.f * gAgent.mHUDCurZoom; + F32 zoom_level = 2.f * gAgentCamera.mHUDCurZoom; window_scale.initAll(LLVector3(zoom_level / LLViewerCamera::getInstance()->getAspect(), zoom_level, 0.f), LLQuaternion::DEFAULT, LLVector3::zero); @@ -1075,7 +1076,7 @@ void LLManipTranslate::render() gGL.pushMatrix(); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom, zoom, zoom); } { @@ -1239,7 +1240,7 @@ void LLManipTranslate::renderSnapGuides() if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - guide_size_meters = 1.f / gAgent.mHUDCurZoom; + guide_size_meters = 1.f / gAgentCamera.mHUDCurZoom; mSnapOffsetMeters = mArrowLengthMeters * 1.5f; } else @@ -1822,11 +1823,11 @@ void LLManipTranslate::renderTranslationHandles() if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mArrowLengthMeters = mAxisArrowLength / gViewerWindow->getWorldViewHeightRaw(); - mArrowLengthMeters /= gAgent.mHUDCurZoom; + mArrowLengthMeters /= gAgentCamera.mHUDCurZoom; } else { - LLVector3 camera_pos_agent = gAgent.getCameraPositionAgent(); + LLVector3 camera_pos_agent = gAgentCamera.getCameraPositionAgent(); F32 range = dist_vec(camera_pos_agent, selection_center); F32 range_from_agent = dist_vec(gAgent.getPositionAgent(), selection_center); @@ -2108,7 +2109,7 @@ void LLManipTranslate::renderTranslationHandles() // Copied from LLDrawable::updateGeometry LLVector3 pos_agent = first_object->getPositionAgent(); - LLVector3 camera_agent = gAgent.getCameraPositionAgent(); + LLVector3 camera_agent = gAgentCamera.getCameraPositionAgent(); LLVector3 headPos = pos_agent - camera_agent; LLVector3 orientWRTHead = headPos * invRotation; @@ -2150,7 +2151,7 @@ void LLManipTranslate::renderTranslationHandles() } else { - camera_axis.setVec(gAgent.getCameraPositionAgent() - first_object->getPositionAgent()); + camera_axis.setVec(gAgentCamera.getCameraPositionAgent() - first_object->getPositionAgent()); } for (U32 i = 0; i < NUM_AXES*2; i++) diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp index 8d950f072d..e6ca0dabda 100644 --- a/indra/newview/llmenucommands.cpp +++ b/indra/newview/llmenucommands.cpp @@ -42,7 +42,7 @@ #include "llstring.h" #include "message.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llcallingcard.h" #include "llviewercontrol.h" //#include "llfirstuse.h" @@ -66,7 +66,7 @@ void handle_mouselook(void*) { - gAgent.changeCameraToMouselook(); + gAgentCamera.changeCameraToMouselook(); } diff --git a/indra/newview/llmimetypes.cpp b/indra/newview/llmimetypes.cpp index 235487cf46..7bddc0d84c 100644 --- a/indra/newview/llmimetypes.cpp +++ b/indra/newview/llmimetypes.cpp @@ -34,6 +34,7 @@ #include "llviewerprecompiledheaders.h" #include "llmimetypes.h" +#include "lltrans.h" #include "llxmlnode.h" #include "lluictrlfactory.h" @@ -49,6 +50,7 @@ std::string sDefaultImpl; // Returned when we don't know what impl to use std::string sXMLFilename; // Squirrel away XML filename so we know how to reset +std::string DEFAULT_MIME_TYPE = "none/none"; ///////////////////////////////////////////////////////////////////////////// @@ -212,7 +214,7 @@ std::string LLMIMETypes::findIcon(const std::string& mime_type) // static std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) { - std::string mime_type = "none/none"; + std::string mime_type = getDefaultMimeType(); mime_widget_set_map_t::iterator it = sWidgetMap.find(widget_type); if(it != sWidgetMap.end()) { @@ -222,6 +224,18 @@ std::string LLMIMETypes::findDefaultMimeType(const std::string& widget_type) } // static +const std::string& LLMIMETypes::getDefaultMimeType() +{ + return DEFAULT_MIME_TYPE; +} + +const std::string& LLMIMETypes::getDefaultMimeTypeTranslation() +{ + static std::string mime_type = LLTrans::getString("DefaultMimeType"); + return mime_type; +} + +// static std::string LLMIMETypes::findToolTip(const std::string& mime_type) { std::string tool_tip = ""; diff --git a/indra/newview/llmimetypes.h b/indra/newview/llmimetypes.h index b217ce7a81..3461769ff3 100644 --- a/indra/newview/llmimetypes.h +++ b/indra/newview/llmimetypes.h @@ -66,6 +66,10 @@ public: static std::string findDefaultMimeType(const std::string& widget_type); // Canonical mime type associated with this widget set + static const std::string& getDefaultMimeType(); + + static const std::string& getDefaultMimeTypeTranslation(); + static bool findAllowResize(const std::string& mime_type); // accessor for flag to enable/disable media size edit fields diff --git a/indra/newview/llmorphview.cpp b/indra/newview/llmorphview.cpp index b95e8bd3a2..d670eb6ffd 100644 --- a/indra/newview/llmorphview.cpp +++ b/indra/newview/llmorphview.cpp @@ -37,6 +37,7 @@ #include "lljoint.h" #include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "lldrawpoolavatar.h" #include "llface.h" @@ -88,15 +89,14 @@ void LLMorphView::initialize() mCameraYaw = 0.f; mCameraDist = -1.f; - LLVOAvatar *avatarp = gAgent.getAvatarObject(); - if (!avatarp || avatarp->isDead()) + if (!isAgentAvatarValid() || gAgentAvatarp->isDead()) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); return; } - avatarp->stopMotion( ANIM_AGENT_BODY_NOISE ); - avatarp->mSpecialRenderMode = 3; + gAgentAvatarp->stopMotion( ANIM_AGENT_BODY_NOISE ); + gAgentAvatarp->mSpecialRenderMode = 3; // set up camera for close look at avatar mOldCameraNearClip = LLViewerCamera::getInstance()->getNear(); @@ -110,11 +110,10 @@ void LLMorphView::shutdown() { LLVOAvatarSelf::onCustomizeEnd(); - LLVOAvatar *avatarp = gAgent.getAvatarObject(); - if(avatarp && !avatarp->isDead()) + if (isAgentAvatarValid()) { - avatarp->startMotion( ANIM_AGENT_BODY_NOISE ); - avatarp->mSpecialRenderMode = 0; + gAgentAvatarp->startMotion( ANIM_AGENT_BODY_NOISE ); + gAgentAvatarp->mSpecialRenderMode = 0; // reset camera LLViewerCamera::getInstance()->setNear(mOldCameraNearClip); } @@ -163,15 +162,11 @@ void LLMorphView::updateCamera() { if (!mCameraTargetJoint) { - setCameraTargetJoint(gAgent.getAvatarObject()->getJoint("mHead")); - } - - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( !avatar ) - { - return; - } - LLJoint* root_joint = avatar->getRootJoint(); + setCameraTargetJoint(gAgentAvatarp->getJoint("mHead")); + } + if (!isAgentAvatarValid()) return; + + LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( !root_joint ) { return; @@ -187,7 +182,7 @@ void LLMorphView::updateCamera() LLVector3d camera_pos = joint_pos + mCameraOffset * camera_rot_pitch * camera_rot_yaw * avatar_rot; - gAgent.setCameraPosAndFocusGlobal( camera_pos, target_pos, gAgent.getID() ); + gAgentCamera.setCameraPosAndFocusGlobal( camera_pos, target_pos, gAgent.getID() ); } void LLMorphView::setCameraDrivenByKeys(BOOL b) diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 70053a7b48..2f22512aba 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -41,7 +41,8 @@ // Viewer includes #include "llagent.h" -#include "llvoavatarself.h" // to check gAgent.getAvatarObject()->isSitting() +#include "llagentcamera.h" +#include "llvoavatarself.h" // to check gAgentAvatarp->isSitting() #include "llbottomtray.h" #include "llbutton.h" #include "llfloaterreg.h" @@ -199,8 +200,8 @@ void LLFloaterMove::setFlyingMode(BOOL fly) if (instance) { instance->setFlyingModeImpl(fly); - LLVOAvatarSelf* avatar_object = gAgent.getAvatarObject(); - BOOL is_sitting = avatar_object + LLVOAvatarSelf* avatar_object = gAgentAvatarp; + bool is_sitting = avatar_object && (avatar_object->getRegion() != NULL) && (!avatar_object->isDead()) && avatar_object->isSitting(); @@ -336,7 +337,7 @@ void LLFloaterMove::setMovementMode(const EMovementMode mode) updateButtonsWithMovementMode(mode); bool bHideModeButtons = MM_FLY == mode - || (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting()); + || (isAgentAvatarValid() && gAgentAvatarp->isSitting()); showModeButtons(!bHideModeButtons); @@ -392,9 +393,9 @@ void LLFloaterMove::initMovementMode() } setMovementMode(initMovementMode); - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - setEnabled(!gAgent.getAvatarObject()->isSitting()); + setEnabled(!gAgentAvatarp->isSitting()); } } @@ -495,7 +496,7 @@ void LLFloaterMove::onOpen(const LLSD& key) showModeButtons(FALSE); } - if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting()) + if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) { setSittingMode(TRUE); showModeButtons(FALSE); @@ -598,7 +599,7 @@ BOOL LLPanelStandStopFlying::postBuild() void LLPanelStandStopFlying::setVisible(BOOL visible) { //we dont need to show the panel if these buttons are not activated - if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false; if (visible) { diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 7a538e372b..9611c286eb 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -148,16 +148,30 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) if(0 <= cur_index && cur_index < (S32)getItemList().size()) { LLScrollListItem* item = getItemList()[cur_index]; - LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); - if(cell) - cell->setTextWidth(cell->getTextWidth() + info_icon_size); + if (item) + { + LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); + if (cell) + cell->setTextWidth(cell->getTextWidth() + info_icon_size); + } + else + { + llwarns << "highlighted name list item is NULL" << llendl; + } } if(target_index != -1) { LLScrollListItem* item = getItemList()[target_index]; LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); - if(cell) - cell->setTextWidth(cell->getTextWidth() - info_icon_size); + if (item) + { + if (cell) + cell->setTextWidth(cell->getTextWidth() - info_icon_size); + } + else + { + llwarns << "target name item is NULL" << llendl; + } } } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 5d72827a7a..f1c13de8bb 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -107,7 +107,9 @@ BOOL LLNearbyChat::postBuild() getDockTongue(), LLDockControl::TOP, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); } - setIsChrome(true); + //fix for EXT-4621 + //chrome="true" prevents floater from stilling capture + setIsChrome(true); //chrome="true" hides floater caption if (mDragHandle) mDragHandle->setTitleVisible(TRUE); @@ -351,3 +353,14 @@ void LLNearbyChat::onFocusLost() LLPanel::onFocusLost(); } +BOOL LLNearbyChat::handleMouseDown(S32 x, S32 y, MASK mask) +{ + //fix for EXT-6625 + //highlight NearbyChat history whenever mouseclick happen in NearbyChat + //setting focus to eidtor will force onFocusLost() call that in its turn will change + //background opaque. This all happenn since NearByChat is "chrome" and didn't process focus change. + + if(mChatHistory) + mChatHistory->setFocus(TRUE); + return LLDockableFloater::handleMouseDown(x, y, mask); +} diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 6ef2a1fee3..3c116dbe83 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -53,6 +53,8 @@ public: void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + // focus overrides /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index af711b6943..1507b7d324 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -103,7 +103,7 @@ LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) setCommitCallback(boost::bind(&LLGestureComboList::onCommitGesture, this)); // now register us as observer since we have a place to put the results - LLGestureManager::instance().addObserver(this); + LLGestureMgr::instance().addObserver(this); // refresh list from current active gestures refreshGestures(); @@ -244,8 +244,8 @@ void LLGestureComboList::refreshGestures() mList->clearRows(); mGestures.clear(); - LLGestureManager::item_map_t::const_iterator it; - const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); + LLGestureMgr::item_map_t::const_iterator it; + const LLGestureMgr::item_map_t& active_gestures = LLGestureMgr::instance().getActiveGestures(); LLSD::Integer idx(0); for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { @@ -289,7 +289,7 @@ void LLGestureComboList::refreshGestures() gesture = mGestures.at(index); } - if(gesture && LLGestureManager::instance().isGesturePlaying(gesture)) + if(gesture && LLGestureMgr::instance().isGesturePlaying(gesture)) { return; } @@ -321,7 +321,7 @@ void LLGestureComboList::onCommitGesture() LLMultiGesture* gesture = mGestures.at(index); if(gesture) { - LLGestureManager::instance().playGesture(gesture); + LLGestureMgr::instance().playGesture(gesture); if(!gesture->mReplaceText.empty()) { LLNearbyChatBar::sendChatFromViewer(gesture->mReplaceText, CHAT_TYPE_NORMAL, FALSE); @@ -332,7 +332,7 @@ void LLGestureComboList::onCommitGesture() LLGestureComboList::~LLGestureComboList() { - LLGestureManager::instance().removeObserver(this); + LLGestureMgr::instance().removeObserver(this); } LLNearbyChatBar::LLNearbyChatBar() @@ -476,7 +476,7 @@ void LLNearbyChatBar::onChatBoxKeystroke(LLLineEditor* caller, void* userdata) std::string utf8_trigger = wstring_to_utf8str(raw_text); std::string utf8_out_str(utf8_trigger); - if (LLGestureManager::instance().matchPrefix(utf8_trigger, &utf8_out_str)) + if (LLGestureMgr::instance().matchPrefix(utf8_trigger, &utf8_out_str)) { std::string rest_of_match = utf8_out_str.substr(utf8_trigger.size()); self->mChatBox->setText(utf8_trigger + rest_of_match); // keep original capitalization for user-entered part @@ -558,7 +558,7 @@ void LLNearbyChatBar::sendChat( EChatType type ) if (0 == channel) { // discard returned "found" boolean - LLGestureManager::instance().triggerAndReviseString(utf8text, &utf8_revised_text); + LLGestureMgr::instance().triggerAndReviseString(utf8text, &utf8_revised_text); } else { @@ -807,8 +807,11 @@ public: { if (tokens.size() < 2) return false; S32 channel = tokens[0].asInteger(); - std::string mesg = tokens[1].asString(); - send_chat_from_viewer(mesg, CHAT_TYPE_NORMAL, channel); + + // Send unescaped message, see EXT-6353. + std::string unescaped_mesg (LLURI::unescape(tokens[1].asString())); + + send_chat_from_viewer(unescaped_mesg, CHAT_TYPE_NORMAL, channel); return true; } }; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index e199f9f180..9824517ed1 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -56,7 +56,6 @@ LLToastPanelBase* createToastPanel() return item; } - class LLNearbyChatScreenChannel: public LLScreenChannelBase { public: @@ -88,11 +87,7 @@ public: { for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { - LLToast* toast = (*it); - toast->setVisible(FALSE); - toast->stopTimer(); - m_toast_pool.push_back(toast); - + addToToastPool((*it)); } m_active_toasts.clear(); }; @@ -105,6 +100,14 @@ public: } protected: + void addToToastPool(LLToast* toast) + { + toast->setVisible(FALSE); + toast->stopTimer(); + toast->setIsHidden(true); + m_toast_pool.push_back(toast); + } + void createOverflowToast(S32 bottom, F32 timer); create_toast_panel_callback_t m_create_toast_panel_callback_t; @@ -132,11 +135,12 @@ void LLNearbyChatScreenChannel::onToastFade(LLToast* toast) //fade mean we put toast to toast pool if(!toast) return; - m_toast_pool.push_back(toast); std::vector<LLToast*>::iterator pos = std::find(m_active_toasts.begin(),m_active_toasts.end(),toast); if(pos!=m_active_toasts.end()) m_active_toasts.erase(pos); + + addToToastPool(toast); arrangeToasts(); } @@ -228,7 +232,7 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) toast->reshapeToPanel(); toast->resetTimer(); - m_active_toasts.insert(m_active_toasts.begin(),toast); + m_active_toasts.push_back(toast); arrangeToasts(); } @@ -240,7 +244,14 @@ void LLNearbyChatScreenChannel::arrangeToasts() hideToastsFromScreen(); - showToastsBottom(); + showToastsBottom(); +} + +int sort_toasts_predicate(LLToast* first,LLToast* second) +{ + F32 v1 = first->getTimer()->getEventTimer().getElapsedTimeF32(); + F32 v2 = second->getTimer()->getEventTimer().getElapsedTimeF32(); + return v1 < v2; } void LLNearbyChatScreenChannel::showToastsBottom() @@ -252,39 +263,41 @@ void LLNearbyChatScreenChannel::showToastsBottom() S32 bottom = getRect().mBottom; S32 margin = gSavedSettings.getS32("ToastGap"); + //sort active toasts + std::sort(m_active_toasts.begin(),m_active_toasts.end(),sort_toasts_predicate); + + //calc max visible item and hide other toasts. + for(std::vector<LLToast*>::iterator it = m_active_toasts.begin(); it != m_active_toasts.end(); ++it) { - LLToast* toast = (*it); - S32 toast_top = bottom + toast->getRect().getHeight() + margin; + S32 toast_top = bottom + (*it)->getRect().getHeight() + margin; if(toast_top > gFloaterView->getRect().getHeight()) { while(it!=m_active_toasts.end()) { - toast->setVisible(FALSE); - toast->stopTimer(); - m_toast_pool.push_back(toast); + addToToastPool((*it)); it=m_active_toasts.erase(it); } break; } - bottom = toast_top - toast->getTopPad(); - } - - // use reverse order to provide correct z-order and avoid toast blinking - for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it) - { LLToast* toast = (*it); - S32 toast_top = bottom + toast->getTopPad(); toast_rect = toast->getRect(); - toast_rect.setLeftTopAndSize(getRect().mLeft , toast_top, toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); + bottom += toast_rect.getHeight() + margin; + } + + // use reverse order to provide correct z-order and avoid toast blinking + + for(std::vector<LLToast*>::reverse_iterator it = m_active_toasts.rbegin(); it != m_active_toasts.rend(); ++it) + { + LLToast* toast = (*it); toast->setIsHidden(false); toast->setVisible(TRUE); - bottom = toast->getRect().mBottom - margin; } } diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 05623198ab..a8dee8a24a 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -49,6 +49,7 @@ // Viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llappviewer.h" // for gDisconnected #include "llcallingcard.h" // LLAvatarTracker #include "lltracker.h" @@ -87,7 +88,7 @@ LLNetMap::LLNetMap (const Params & p) mCurPanX(0.f), mCurPanY(0.f), mUpdateNow(FALSE), - mObjectImageCenterGlobal( gAgent.getCameraPositionGlobal() ), + mObjectImageCenterGlobal( gAgentCamera.getCameraPositionGlobal() ), mObjectRawImagep(), mObjectImagep(), mClosestAgentToCursor(), @@ -203,7 +204,7 @@ void LLNetMap::draw() LLViewerRegion* regionp = *iter; // Find x and y position relative to camera's center. LLVector3 origin_agent = regionp->getOriginAgent(); - LLVector3 rel_region_pos = origin_agent - gAgent.getCameraPositionAgent(); + LLVector3 rel_region_pos = origin_agent - gAgentCamera.getCameraPositionAgent(); F32 relative_x = (rel_region_pos.mV[0] / region_width) * mScale; F32 relative_y = (rel_region_pos.mV[1] / region_width) * mScale; @@ -264,7 +265,7 @@ void LLNetMap::draw() LLVector3d old_center = mObjectImageCenterGlobal; - LLVector3d new_center = gAgent.getCameraPositionGlobal(); + LLVector3d new_center = gAgentCamera.getCameraPositionGlobal(); new_center.mdV[0] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[0]); new_center.mdV[1] = (5.f/mObjectMapTPM)*floor(0.2f*mObjectMapTPM*new_center.mdV[1]); @@ -289,7 +290,7 @@ void LLNetMap::draw() } LLVector3 map_center_agent = gAgent.getPosAgentFromGlobal(mObjectImageCenterGlobal); - map_center_agent -= gAgent.getCameraPositionAgent(); + map_center_agent -= gAgentCamera.getCameraPositionAgent(); map_center_agent.mV[VX] *= mScale/region_width; map_center_agent.mV[VY] *= mScale/region_width; @@ -461,7 +462,7 @@ void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos ) { - LLVector3d relative_pos_global = global_pos - gAgent.getCameraPositionGlobal(); + LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal(); LLVector3 pos_local; pos_local.setVec(relative_pos_global); // convert to floats from doubles @@ -529,7 +530,7 @@ LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y ) LLVector3d pos_global; pos_global.setVec( pos_local ); - pos_global += gAgent.getCameraPositionGlobal(); + pos_global += gAgentCamera.getCameraPositionGlobal(); return pos_global; } diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 1dc0e414a2..99a1fedcf3 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -42,6 +42,8 @@ #include "llinstantmessage.h" #include "llnotificationptr.h" +class LLIMFloater; + namespace LLNotificationsUI { // ENotificationType enumerates all possible types of notifications that could be met @@ -304,8 +306,6 @@ public: /** * Checks if passed notification can create toast. - * - * It returns false only for inventory accepted/declined notifications if respective IM window is open (EXT-5909) */ static bool canSpawnToast(const LLNotificationPtr& notification); @@ -315,6 +315,11 @@ public: static bool isIMFloaterOpened(const LLNotificationPtr& notification); /** + * Determines whether IM floater is focused. + */ + static bool isIMFloaterFocused(const LLNotificationPtr& notification); + + /** * Writes notification message to IM session. */ static void logToIM(const EInstantMessage& session_type, @@ -375,6 +380,14 @@ public: * Decrements counter of IM messages. */ static void decIMMesageCounter(const LLNotificationPtr& notification); + +private: + + /** + * Find IM floater based on "from_id" + */ + static LLIMFloater* findIMFloater(const LLNotificationPtr& notification); + }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index d3ad61128d..3f551f6b32 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -128,7 +128,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), FRIEND_ONLINE("FriendOnline"), FRIEND_OFFLINE("FriendOffline"), SERVER_OBJECT_MESSAGE("ServerObjectMessage"), TELEPORT_OFFERED("TeleportOffered"), - TELEPORT_OFFER_SENT("TeleportOfferSent"); + TELEPORT_OFFER_SENT("TeleportOfferSent"), + IM_SYSTEM_MESSAGE_TIP("IMSystemMessageTip"); // static @@ -147,7 +148,8 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) || INVENTORY_DECLINED == notification->getName() || USER_GIVE_ITEM == notification->getName() || TELEPORT_OFFERED == notification->getName() - || TELEPORT_OFFER_SENT == notification->getName(); + || TELEPORT_OFFER_SENT == notification->getName() + || IM_SYSTEM_MESSAGE_TIP == notification->getName(); } // static @@ -157,7 +159,8 @@ bool LLHandlerUtil::canLogToNearbyChat(const LLNotificationPtr& notification) && FRIEND_ONLINE != notification->getName() && FRIEND_OFFLINE != notification->getName() && INVENTORY_ACCEPTED != notification->getName() - && INVENTORY_DECLINED != notification->getName(); + && INVENTORY_DECLINED != notification->getName() + && IM_SYSTEM_MESSAGE_TIP != notification->getName(); } // static @@ -193,10 +196,36 @@ bool LLHandlerUtil::canSpawnSessionAndLogToIM(const LLNotificationPtr& notificat // static bool LLHandlerUtil::canSpawnToast(const LLNotificationPtr& notification) { - bool cannot_spawn = isIMFloaterOpened(notification) && (INVENTORY_DECLINED == notification->getName() - || INVENTORY_ACCEPTED == notification->getName()); - - return !cannot_spawn; + if(INVENTORY_DECLINED == notification->getName() + || INVENTORY_ACCEPTED == notification->getName()) + { + // return false for inventory accepted/declined notifications if respective IM window is open (EXT-5909) + return ! isIMFloaterOpened(notification); + } + + if(FRIENDSHIP_ACCEPTED == notification->getName()) + { + // don't show FRIENDSHIP_ACCEPTED if IM window is opened and focused - EXT-6441 + return ! isIMFloaterFocused(notification); + } + + if(OFFER_FRIENDSHIP == notification->getName() + || USER_GIVE_ITEM == notification->getName() + || TELEPORT_OFFERED == notification->getName()) + { + // When ANY offer arrives, show toast, unless IM window is already open - EXT-5904 + return ! isIMFloaterOpened(notification); + } + + return true; +} + +// static +LLIMFloater* LLHandlerUtil::findIMFloater(const LLNotificationPtr& notification) +{ + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); + return LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); } // static @@ -204,12 +233,7 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) { bool res = false; - LLUUID from_id = notification->getPayload()["from_id"]; - LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, - from_id); - - LLIMFloater* im_floater = LLFloaterReg::findTypedInstance<LLIMFloater>( - "impanel", session_id); + LLIMFloater* im_floater = findIMFloater(notification); if (im_floater != NULL) { res = im_floater->getVisible() == TRUE; @@ -218,6 +242,19 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification) return res; } +bool LLHandlerUtil::isIMFloaterFocused(const LLNotificationPtr& notification) +{ + bool res = false; + + LLIMFloater* im_floater = findIMFloater(notification); + if (im_floater != NULL) + { + res = im_floater->hasFocus() == TRUE; + } + + return res; +} + // static void LLHandlerUtil::logToIM(const EInstantMessage& session_type, const std::string& session_name, const std::string& from_name, @@ -286,7 +323,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi { const std::string name = LLHandlerUtil::getSubstitutionName(notification); - std::string session_name = notification->getPayload().has( + const std::string& session_name = notification->getPayload().has( "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log @@ -295,12 +332,6 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi { LLUUID from_id = notification->getPayload()["from_id"]; - //*HACK for ServerObjectMessage the sesson name is really weird, see EXT-4779 - if (SERVER_OBJECT_MESSAGE == notification->getName()) - { - session_name = "chat"; - } - //there still appears a log history file with weird name " .txt" if (" " == session_name || "{waiting}" == session_name || "{nobody}" == session_name) { @@ -355,6 +386,7 @@ void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChat LLChat chat_msg(notification->getMessage()); chat_msg.mSourceType = type; chat_msg.mFromName = SYSTEM_FROM; + chat_msg.mFromID = LLUUID::null; nearby_chat->addMessage(chat_msg); } } diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index e93aec9d01..c5960a9040 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -115,15 +115,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify) session_id = LLHandlerUtil::spawnIMSession(name, from_id); } - bool show_toast = true; + bool show_toast = LLHandlerUtil::canSpawnToast(notification); bool add_notid_to_im = LLHandlerUtil::canAddNotifPanelToIM(notification); if (add_notid_to_im) { LLHandlerUtil::addNotifPanelToIM(notification); - if (LLHandlerUtil::isIMFloaterOpened(notification)) - { - show_toast = false; - } } if (notification->getPayload().has("SUPPRESS_TOAST") diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 1f1afe293a..e528f871af 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -41,10 +41,11 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llnotificationmanager.h" +#include "llpaneltiptoast.h" using namespace LLNotificationsUI; -class LLOnlineStatusToast : public LLToastPanel +class LLOnlineStatusToast : public LLPanelTipToast { public: @@ -57,7 +58,7 @@ public: Params() {} }; - LLOnlineStatusToast(Params& p) : LLToastPanel(p.notification) + LLOnlineStatusToast(Params& p) : LLPanelTipToast(p.notification) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_online_status_toast.xml"); @@ -71,8 +72,8 @@ public: p.notification->getResponseTemplate())); } - // set line max count to 2 in case of a very long name - snapToMessageHeight(getChild<LLTextBox>("message"), 2); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox>("message"), 3); } }; @@ -157,6 +158,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) } LLToastPanel* notify_box = NULL; + // TODO: this should be implemented in LLToastPanel::buidPanelFromNotification if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) { LLOnlineStatusToast::Params p; @@ -167,6 +169,14 @@ bool LLTipHandler::processNotification(const LLSD& notify) } else { + notify_box = LLToastPanel::buidPanelFromNotification(notification); + } + + // TODO: this if statement should be removed after modification of + // LLToastPanel::buidPanelFromNotification() to allow create generic tip panel + // for all tip notifications except FriendOnline and FriendOffline + if (notify_box == NULL) + { notify_box = new LLToastNotifyPanel(notification); } diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index a0ba2f739b..dd632ccefe 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -51,6 +51,7 @@ #include "llnotificationsutil.h" #include "llvoiceclient.h" #include "llnamebox.h" +#include "lltrans.h" //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLDropTarget @@ -645,7 +646,11 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) LLAvatarIconIDCache::getInstance()->remove(avatar_data->avatar_id); LLStringUtil::format_map_t args; - args["[REG_DATE]"] = avatar_data->born_on; + { + std::string birth_date = LLTrans::getString("AvatarBirthDateFormat"); + LLStringUtil::format(birth_date, LLSD().with("datetime", (S32) avatar_data->born_on.secondsSinceEpoch())); + args["[REG_DATE]"] = birth_date; + } args["[AGE]"] = LLDateUtil::ageFromDate( avatar_data->born_on, LLDate::now()); std::string register_date = getString("RegisterDateFormat", args); childSetValue("register_date", register_date ); diff --git a/indra/newview/llpanelblockedlist.cpp b/indra/newview/llpanelblockedlist.cpp index a186bc926c..c72f0f8012 100644 --- a/indra/newview/llpanelblockedlist.cpp +++ b/indra/newview/llpanelblockedlist.cpp @@ -186,7 +186,7 @@ void LLPanelBlockedList::onBlockByNameClick() LLFloaterGetBlockedObjectName::show(&LLPanelBlockedList::callbackBlockByName); } -void LLPanelBlockedList::callbackBlockPicked(const std::vector<std::string>& names, const std::vector<LLUUID>& ids) +void LLPanelBlockedList::callbackBlockPicked(const std::vector<std::string>& names, const uuid_vec_t& ids) { if (names.empty() || ids.empty()) return; LLMute mute(ids[0], names[0], LLMute::AGENT); diff --git a/indra/newview/llpanelblockedlist.h b/indra/newview/llpanelblockedlist.h index 1ef16a02f4..a100577e43 100644 --- a/indra/newview/llpanelblockedlist.h +++ b/indra/newview/llpanelblockedlist.h @@ -78,7 +78,7 @@ private: void onPickBtnClick(); void onBlockByNameClick(); - void callbackBlockPicked(const std::vector<std::string>& names, const std::vector<LLUUID>& ids); + void callbackBlockPicked(const std::vector<std::string>& names, const uuid_vec_t& ids); static void callbackBlockByName(const std::string& text); private: diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 2a7d097f94..f4c0a842e7 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -40,6 +40,7 @@ #include "llerror.h" #include "llfloaterreg.h" #include "llfontgl.h" +#include "llinventorydefines.h" #include "llmaterialtable.h" #include "llpermissionsflags.h" #include "llrect.h" @@ -180,7 +181,7 @@ void LLPanelContents::onClickNewScript(void *userdata) LLTrans::getString("PanelContentsNewScript"), desc, LLSaleInfo::DEFAULT, - LLViewerInventoryItem::II_FLAGS_NONE, + LLInventoryItemFlags::II_FLAGS_NONE, time_corrected()); object->saveScript(new_item, TRUE, true); diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index e7acc68b93..da74295f9e 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -270,6 +270,8 @@ LLEditWearableDictionary::SubpartEntry::SubpartEntry(ESubpart part, LLPanelEditWearable::LLPanelEditWearable() : LLPanel() + , mWearablePtr(NULL) + , mWearableItem(NULL) { } @@ -338,8 +340,7 @@ BOOL LLPanelEditWearable::isDirty() const //virtual void LLPanelEditWearable::draw() { - BOOL is_dirty = isDirty(); - mBtnRevert->setEnabled(is_dirty); + updateVerbs(); LLPanel::draw(); } @@ -401,6 +402,9 @@ void LLPanelEditWearable::showWearable(LLWearable* wearable, BOOL show) return; } + mWearableItem = gInventory.getItem(mWearablePtr->getItemID()); + llassert(mWearableItem); + EWearableType type = wearable->getType(); LLPanel *targetPanel = NULL; std::string title; @@ -489,7 +493,7 @@ void LLPanelEditWearable::initializePanel() updateScrollingPanelUI(); } - + updateVerbs(); } void LLPanelEditWearable::updateScrollingPanelUI() @@ -602,7 +606,7 @@ LLPanel* LLPanelEditWearable::getPanel(EWearableType type) void LLPanelEditWearable::getSortedParams(value_map_t &sorted_params, const std::string &edit_group) { LLWearable::visual_param_vec_t param_list; - ESex avatar_sex = gAgent.getAvatarObject()->getSex(); + ESex avatar_sex = gAgentAvatarp->getSex(); mWearablePtr->getVisualParams(param_list); @@ -640,18 +644,25 @@ void LLPanelEditWearable::buildParamList(LLScrollingPanelList *panel_list, value { LLPanel::Params p; p.name("LLScrollingPanelParam"); - p.rect(LLRect(0, LLScrollingPanelParam::PARAM_PANEL_HEIGHT, LLScrollingPanelParam::PARAM_PANEL_WIDTH, 0 )); LLScrollingPanelParam* panel_param = new LLScrollingPanelParam( p, NULL, (*it).second, TRUE, this->getWearable()); height = panel_list->addPanel( panel_param ); } - - S32 width = tab->getRect().getWidth(); - - tab->reshape(width,height + tab->getHeaderHeight()+10,FALSE); } } +void LLPanelEditWearable::updateVerbs() +{ + bool can_copy = false; + if(mWearableItem) + { + can_copy = mWearableItem->getPermissions().allowCopyBy(gAgentID); + } + BOOL is_dirty = isDirty(); + mBtnRevert->setEnabled(is_dirty); + childSetEnabled("save_as_button", is_dirty && can_copy); +} +// EOF diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h index 4178659617..8b63685177 100644 --- a/indra/newview/llpaneleditwearable.h +++ b/indra/newview/llpaneleditwearable.h @@ -41,6 +41,7 @@ class LLWearable; class LLTextEditor; class LLTextBox; +class LLViewerInventoryItem; class LLViewerVisualParam; class LLVisualParamHint; class LLViewerJointMesh; @@ -73,9 +74,12 @@ private: LLPanel* getPanel(EWearableType type); void getSortedParams(value_map_t &sorted_params, const std::string &edit_group); void buildParamList(LLScrollingPanelList *panel_list, value_map_t &sorted_params, LLAccordionCtrlTab *tab); + // update bottom bar buttons ("Save", "Revert", etc) + void updateVerbs(); // the pointer to the wearable we're editing. NULL means we're not editing a wearable. LLWearable *mWearablePtr; + LLViewerInventoryItem* mWearableItem; // these are constant no matter what wearable we're editing LLButton *mBtnRevert; diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp new file mode 100644 index 0000000000..e0658554a4 --- /dev/null +++ b/indra/newview/llpanelgenerictip.cpp @@ -0,0 +1,51 @@ +/** + * @file llpanelgenerictip.cpp + * @brief Represents a generic panel for a notifytip notifications. As example: + * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone". + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpanelgenerictip.h" +#include "llnotifications.h" + + +LLPanelGenericTip::LLPanelGenericTip( + const LLNotificationPtr& notification) : + LLPanelTipToast(notification) +{ + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_generic_tip.xml"); + + childSetValue("message", notification->getMessage()); + + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox> ("message"), 3); +} + diff --git a/indra/newview/llpanelgenerictip.h b/indra/newview/llpanelgenerictip.h new file mode 100644 index 0000000000..defa069727 --- /dev/null +++ b/indra/newview/llpanelgenerictip.h @@ -0,0 +1,57 @@ +/** + * @file llpanelgenerictip.h + * @brief Represents a generic panel for a notifytip notifications. As example: + * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone". + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_PANELGENERICTIP_H +#define LL_PANELGENERICTIP_H + +#include "llpaneltiptoast.h" + +/** + * Represents tip toast panel that contains only one child element - message text. + * This panel can be used for different cases of tip notifications. + */ +class LLPanelGenericTip: public LLPanelTipToast +{ + // disallow instantiation of this class +private: + // grant privileges to instantiate this class to LLToastPanel + friend class LLToastPanel; + /** + * Generic toast tip panel. + * This is particular case of toast panel that decoupled from LLToastNotifyPanel. + * From now LLToastNotifyPanel is deprecated and will be removed after all panel + * types are represented in separate classes. + */ + LLPanelGenericTip(const LLNotificationPtr& notification); +}; +#endif /* LL_PANELGENERICTIP_H */ diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 706787e824..c00b6a4147 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -59,6 +59,8 @@ #include "llaccordionctrltab.h" #include "llaccordionctrl.h" +#include "lltrans.h" + static LLRegisterPanelClassWrapper<LLPanelGroup> t_panel_group("panel_group_info_sidetray"); @@ -333,8 +335,9 @@ void LLPanelGroup::update(LLGroupChange gc) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); if(gdatap) { - childSetValue("group_name", gdatap->mName); - childSetToolTip("group_name",gdatap->mName); + std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; + childSetValue("group_name", group_name); + childSetToolTip("group_name",group_name); LLGroupData agent_gdatap; bool is_member = gAgent.getGroupData(mID,agent_gdatap) || gAgent.isGodlike(); @@ -379,8 +382,9 @@ void LLPanelGroup::setGroupID(const LLUUID& group_id) LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mID); if(gdatap) { - childSetValue("group_name", gdatap->mName); - childSetToolTip("group_name",gdatap->mName); + std::string group_name = gdatap->mName.empty() ? LLTrans::getString("LoadingData") : gdatap->mName; + childSetValue("group_name", group_name); + childSetToolTip("group_name",group_name); } LLButton* button_apply = findChild<LLButton>("btn_apply"); diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 05261a65de..11d3768a3d 100644 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -57,7 +57,7 @@ public: ~impl(); void addUsers(const std::vector<std::string>& names, - const std::vector<LLUUID>& agent_ids); + const uuid_vec_t& agent_ids); void submitInvitations(); void addRoleNames(LLGroupMgrGroupData* gdatap); void handleRemove(); @@ -69,7 +69,7 @@ public: static void callbackClickRemove(void* userdata); static void callbackSelect(LLUICtrl* ctrl, void* userdata); static void callbackAddUsers(const std::vector<std::string>& names, - const std::vector<LLUUID>& agent_ids, + const uuid_vec_t& agent_ids, void* user_data); bool inviteOwnerCallback(const LLSD& notification, const LLSD& response); @@ -111,7 +111,7 @@ LLPanelGroupInvite::impl::~impl() } void LLPanelGroupInvite::impl::addUsers(const std::vector<std::string>& names, - const std::vector<LLUUID>& agent_ids) + const uuid_vec_t& agent_ids) { std::string name; LLUUID id; @@ -361,7 +361,7 @@ void LLPanelGroupInvite::impl::callbackClickOK(void* userdata) //static void LLPanelGroupInvite::impl::callbackAddUsers(const std::vector<std::string>& names, - const std::vector<LLUUID>& ids, + const uuid_vec_t& ids, void* user_data) { impl* selfp = (impl*) user_data; @@ -399,7 +399,7 @@ void LLPanelGroupInvite::clear() mImplementation->mOKButton->setEnabled(FALSE); } -void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) +void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) { std::vector<std::string> names; for (S32 i = 0; i < (S32)agent_ids.size(); i++) @@ -456,7 +456,7 @@ void LLPanelGroupInvite::addUsers(std::vector<LLUUID>& agent_ids) void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const std::string& first_name, const std::string& last_name) { std::vector<std::string> names; - std::vector<LLUUID> agent_ids; + uuid_vec_t agent_ids; std::string full_name = first_name + " " + last_name; agent_ids.push_back(id); names.push_back(first_name + " " + last_name); diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index b095dd2395..2ed443ed46 100644 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -42,7 +42,7 @@ public: LLPanelGroupInvite(const LLUUID& group_id); ~LLPanelGroupInvite(); - void addUsers(std::vector<LLUUID>& agent_ids); + void addUsers(uuid_vec_t& agent_ids); /** * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers(). */ diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 9023afc602..9ac3a07041 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -1600,6 +1600,8 @@ void LLPanelGroupLandMoney::setGroupID(const LLUUID& id) mImplementationp->mMoneySalesTabEHp->setGroupID(mGroupID); } + mImplementationp->mBeenActivated = false; + activate(); } diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 5f913d5469..8da19d1574 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -38,6 +38,7 @@ #include "llinventory.h" #include "llviewerinventory.h" +#include "llinventorydefines.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" #include "llfloaterinventory.h" @@ -329,7 +330,7 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item) mInventoryItem = inv_item; BOOL item_is_multi = FALSE; - if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) + if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) { item_is_multi = TRUE; }; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c6287472fe..0c24e6ad22 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -859,7 +859,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if (selection.empty()) return; // Build a vector of all selected members, and gather allowed actions. - std::vector<LLUUID> selected_members; + uuid_vec_t selected_members; U64 allowed_by_all = 0xffffffffffffLL; U64 allowed_by_some = 0; @@ -925,8 +925,8 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() if (cb_enable && (count > 0) && role_id == gdatap->mOwnerRole) { // Check if any owners besides this agent are selected. - std::vector<LLUUID>::const_iterator member_iter; - std::vector<LLUUID>::const_iterator member_end = + uuid_vec_t::const_iterator member_iter; + uuid_vec_t::const_iterator member_end = selected_members.end(); for (member_iter = selected_members.begin(); member_iter != member_end; @@ -952,7 +952,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() //now see if there are any role changes for the selected //members and remember to include them - std::vector<LLUUID>::iterator sel_mem_iter = selected_members.begin(); + uuid_vec_t::iterator sel_mem_iter = selected_members.begin(); for (; sel_mem_iter != selected_members.end(); sel_mem_iter++) { LLRoleMemberChangeType type; @@ -1009,7 +1009,7 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() check->setTentative( (0 != count) && (selected_members.size() != - (std::vector<LLUUID>::size_type)count)); + (uuid_vec_t::size_type)count)); //NOTE: as of right now a user can break the group //by removing himself from a role if he is the @@ -1084,7 +1084,7 @@ void LLPanelGroupMembersSubTab::onEjectMembers(void *userdata) void LLPanelGroupMembersSubTab::handleEjectMembers() { //send down an eject message - std::vector<LLUUID> selected_members; + uuid_vec_t selected_members; std::vector<LLScrollListItem*> selection = mMembersList->getAllSelected(); if (selection.empty()) return; @@ -1105,13 +1105,13 @@ void LLPanelGroupMembersSubTab::handleEjectMembers() selected_members); } -void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const std::vector<LLUUID>& selected_members) +void LLPanelGroupMembersSubTab::sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members) { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(group_id); if (group_data) { - for (std::vector<LLUUID>::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i) + for (uuid_vec_t::const_iterator i = selected_members.begin(); i != selected_members.end(); ++i) { LLSD args; std::string name; @@ -1437,7 +1437,7 @@ U64 LLPanelGroupMembersSubTab::getAgentPowersBasedOnRoleChanges(const LLUUID& ag if ( role_change_datap ) { - std::vector<LLUUID> roles_to_be_removed; + uuid_vec_t roles_to_be_removed; for (role_change_data_map_t::iterator role = role_change_datap->begin(); role != role_change_datap->end(); ++ role) @@ -2086,8 +2086,8 @@ void LLPanelGroupRolesSubTab::buildMembersList() LLGroupRoleData* rdatap = (*rit).second; if (rdatap) { - std::vector<LLUUID>::const_iterator mit = rdatap->getMembersBegin(); - std::vector<LLUUID>::const_iterator end = rdatap->getMembersEnd(); + uuid_vec_t::const_iterator mit = rdatap->getMembersBegin(); + uuid_vec_t::const_iterator end = rdatap->getMembersEnd(); for ( ; mit != end; ++mit) { mAssignedMembersList->addNameItem((*mit)); diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index eac22a6338..98cebe9882 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -173,7 +173,7 @@ public: static void onEjectMembers(void*); void handleEjectMembers(); - void sendEjectNotifications(const LLUUID& group_id, const std::vector<LLUUID>& selected_members); + void sendEjectNotifications(const LLUUID& group_id, const uuid_vec_t& selected_members); static void onRoleCheck(LLUICtrl* check, void* user_data); void handleRoleCheck(const LLUUID& role_id, diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index 143a64d08b..4ffd43cb0f 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -36,6 +36,7 @@ #include "llcombobox.h" #include "lliconctrl.h" +#include "llinventoryfunctions.h" #include "lllineeditor.h" #include "lltextbox.h" #include "lltexteditor.h" @@ -396,17 +397,20 @@ std::string LLPanelLandmarkInfo::getFullFolderName(const LLViewerInventoryCatego if (is_under_root_category || cat->getParentUUID() == gInventory.getRootFolderID()) { std::string localized_name; + + // Looking for translation only for protected type categories + // to avoid warnings about non existent string in strings.xml. + bool is_protected_type = LLFolderType::lookupIsProtectedType(cat->getPreferredType()); + if (is_under_root_category) { // translate category name, if it's right below the root - // FIXME: it can throw notification about non existent string in strings.xml - bool is_found = LLTrans::findString(localized_name, "InvFolder " + name); + bool is_found = is_protected_type && LLTrans::findString(localized_name, "InvFolder " + name); name = is_found ? localized_name : name; } else { - // FIXME: it can throw notification about non existent string in strings.xml - bool is_found = LLTrans::findString(localized_name, "InvFolder " + cat->getName()); + bool is_found = is_protected_type && LLTrans::findString(localized_name, "InvFolder " + cat->getName()); // add translated category name to folder's full name name = (is_found ? localized_name : cat->getName()) + "/" + name; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index e3b8581aca..67d40a39b1 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -49,6 +49,7 @@ #include "lldndbutton.h" #include "llfloaterworldmap.h" #include "llfolderviewitem.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "lllandmarkactions.h" #include "llplacesinventorybridge.h" @@ -279,6 +280,17 @@ void LLLandmarksPanel::onShowOnMap() doActionOnCurSelectedLandmark(boost::bind(&LLLandmarksPanel::doShowOnMap, this, _1)); } +//virtual +void LLLandmarksPanel::onShowProfile() +{ + LLFolderViewItem* cur_item = getCurSelectedItem(); + + if(!cur_item) + return; + + cur_item->getListener()->performAction(mCurrentSelectedList->getModel(),"about"); +} + // virtual void LLLandmarksPanel::onTeleport() { @@ -305,6 +317,7 @@ void LLLandmarksPanel::updateVerbs() bool landmark_selected = isLandmarkSelected(); mTeleportBtn->setEnabled(landmark_selected && isActionEnabled("teleport")); mShowOnMapBtn->setEnabled(landmark_selected && isActionEnabled("show_on_map")); + mShowProfile->setEnabled(landmark_selected && isActionEnabled("more_info")); // TODO: mantipov: Uncomment when mShareBtn is supported // Share button should be enabled when neither a folder nor a landmark is selected @@ -434,9 +447,9 @@ LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPa if (!inventory_list) return NULL; - LLFolderView* folder_view = inventory_list->getRootFolder(); + LLFolderView* root = inventory_list->getRootFolder(); - LLFolderViewItem* item = folder_view->getItemByID(obj_id); + LLFolderViewItem* item = root->getItemByID(obj_id); if (!item) return NULL; @@ -446,7 +459,7 @@ LLFolderViewItem* LLLandmarksPanel::selectItemInAccordionTab(LLPlacesInventoryPa tab->changeOpenClose(false); } - folder_view->setSelection(item, FALSE, take_keyboard_focus); + root->setSelection(item, FALSE, take_keyboard_focus); LLAccordionCtrl* accordion = getChild<LLAccordionCtrl>("landmarks_accordion"); LLRect screen_rc; @@ -556,7 +569,7 @@ void LLLandmarksPanel::initLibraryInventoryPanel() const LLUUID &landmarks_cat = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK, false, true); if (landmarks_cat.notNull()) { - gInventory.startBackgroundFetch(landmarks_cat); + LLInventoryModelBackgroundFetch::instance().start(landmarks_cat); } // Expanding "Library" tab for new users who have no landmarks in "My Inventory". @@ -620,7 +633,7 @@ void LLLandmarksPanel::onAccordionExpandedCollapsed(const LLSD& param, LLPlacesI if (!gInventory.isCategoryComplete(cat_id)) */ { - gInventory.startBackgroundFetch(cat_id); + LLInventoryModelBackgroundFetch::instance().start(cat_id); } // Apply filter substring because it might have been changed @@ -662,6 +675,7 @@ void LLLandmarksPanel::initListCommandsHandlers() trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this , _4 // BOOL drop , _5 // EDragAndDropType cargo_type + , _6 // void* cargo_data , _7 // EAcceptance* accept )); @@ -923,12 +937,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const return false; } } - else if (!root_folder_view && "category" != command_name) - { - return false; - } else if ( "paste" == command_name - || "rename" == command_name || "cut" == command_name || "copy" == command_name || "delete" == command_name @@ -940,17 +949,16 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else if ( "teleport" == command_name || "more_info" == command_name - || "rename" == command_name || "show_on_map" == command_name || "copy_slurl" == command_name ) { // disable some commands for multi-selection. EXT-1757 - if (root_folder_view && - root_folder_view->getSelectedCount() > 1) - { - return false; - } + return root_folder_view && root_folder_view->getSelectedCount() == 1; + } + else if ("rename" == command_name) + { + return root_folder_view && root_folder_view->getSelectedCount() == 1 && canSelectedBeModified(command_name); } else if("category" == command_name) { @@ -982,13 +990,10 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const void LLLandmarksPanel::onCustomAction(const LLSD& userdata) { - LLFolderViewItem* cur_item = getCurSelectedItem(); - if(!cur_item) - return; std::string command_name = userdata.asString(); if("more_info" == command_name) { - cur_item->getListener()->performAction(mCurrentSelectedList->getRootFolder(),mCurrentSelectedList->getModel(),"about"); + onShowProfile(); } else if ("teleport" == command_name) { @@ -1079,7 +1084,7 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co } else if ("delete" == command_name) { - can_be_modified = listenerp ? listenerp->isItemRemovable() : false; + can_be_modified = listenerp ? listenerp->isItemRemovable() && !listenerp->isItemInTrash() : false; } else if("paste" == command_name) { @@ -1105,7 +1110,7 @@ void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* own pick_panel = NULL; } -bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept) +bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept) { *accept = ACCEPT_NO; @@ -1121,7 +1126,21 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg if (is_enabled && drop) { - onClipboardAction("delete"); + // don't call onClipboardAction("delete") + // this lead to removing (N * 2 - 1) items if drag N>1 items into trash. EXT-6757 + // So, let remove items one by one. + LLInventoryItem* item = static_cast<LLInventoryItem*>(cargo_data); + if (item) + { + LLFolderViewItem* fv_item = (mCurrentSelectedList && mCurrentSelectedList->getRootFolder()) ? + mCurrentSelectedList->getRootFolder()->getItemByID(item->getUUID()) : NULL; + + if (fv_item) + { + // is Item Removable checked inside of remove() + fv_item->remove(); + } + } } } break; diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index c9217a4b2f..2d1eb0f091 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -57,6 +57,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onSearchEdit(const std::string& string); /*virtual*/ void onShowOnMap(); + /*virtual*/ void onShowProfile(); /*virtual*/ void onTeleport(); /*virtual*/ void updateVerbs(); @@ -141,7 +142,7 @@ private: /** * Processes drag-n-drop of the Landmarks and folders into trash button. */ - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept); /** * Landmark actions callbacks. Fire when a landmark is loaded from the list. diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 42ad9820a8..e834e229cd 100644 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -153,7 +153,7 @@ void LLPanelLandMedia::refresh() std::string mime_type = parcel->getMediaType(); if (mime_type.empty()) { - mime_type = "none/none"; + mime_type = LLMIMETypes::getDefaultMimeTypeTranslation(); } setMediaType(mime_type); mMediaTypeCombo->setEnabled( can_change_media ); @@ -218,7 +218,7 @@ void LLPanelLandMedia::refresh() void LLPanelLandMedia::populateMIMECombo() { - std::string default_mime_type = "none/none"; + std::string default_mime_type = LLMIMETypes::getDefaultMimeType(); std::string default_label; LLMIMETypes::mime_widget_set_map_t::const_iterator it; for (it = LLMIMETypes::sWidgetMap.begin(); it != LLMIMETypes::sWidgetMap.end(); ++it) @@ -235,8 +235,7 @@ void LLPanelLandMedia::populateMIMECombo() mMediaTypeCombo->add(info.mLabel, mime_type); } } - // *TODO: The sort order is based on std::map key, which is - // ASCII-sorted and is wrong in other languages. TRANSLATE + mMediaTypeCombo->add( default_label, default_mime_type, ADD_BOTTOM ); } @@ -248,7 +247,15 @@ void LLPanelLandMedia::setMediaType(const std::string& mime_type) std::string media_key = LLMIMETypes::widgetType(mime_type); mMediaTypeCombo->setValue(media_key); - childSetText("mime_type", mime_type); + + std::string mime_str = mime_type; + if(LLMIMETypes::getDefaultMimeType() == mime_type) + { + // Instead of showing predefined "none/none" we are going to show something + // localizable - "none" for example (see EXT-6542) + mime_str = LLMIMETypes::getDefaultMimeTypeTranslation(); + } + childSetText("mime_type", mime_str); } void LLPanelLandMedia::setMediaURL(const std::string& media_url) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d40141c91d..0ba373c51b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,12 +34,14 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llavataractions.h" #include "lldndbutton.h" #include "lleconomy.h" #include "llfilepicker.h" #include "llfloaterinventory.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "llfiltereditor.h" #include "llfloaterreg.h" @@ -115,6 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory() mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this)); mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this)); mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); // Controls // *TODO: Just use persistant settings for each of these @@ -419,7 +422,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) return; } - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); mFilterSubString = search_string; if (mActivePanel->getFilterSubString().empty() && mFilterSubString.empty()) @@ -499,7 +502,7 @@ void LLPanelMainInventory::onFilterSelected() if (filter->isActive()) { // If our filter is active we may be the first thing requiring a fetch so we better start it here. - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); } setFilterTextFromFilter(); } @@ -566,11 +569,11 @@ void LLPanelMainInventory::updateItemcountText() std::string text = ""; - if (LLInventoryModel::backgroundFetchActive()) + if (LLInventoryModelBackgroundFetch::instance().backgroundFetchActive()) { text = getString("ItemcountFetching", string_args); } - else if (LLInventoryModel::isEverythingFetched()) + else if (LLInventoryModelBackgroundFetch::instance().isEverythingFetched()) { text = getString("ItemcountCompleted", string_args); } @@ -600,7 +603,7 @@ void LLPanelMainInventory::toggleFindOptions() if (parent_floater) // Seraph: Fix this, shouldn't be null even for sidepanel parent_floater->addDependentFloater(mFinderHandle); // start background fetch of folders - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); } else { @@ -1043,7 +1046,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - current_item->getListener()->performAction(getActivePanel()->getRootFolder(), getActivePanel()->getModel(), "goto"); + current_item->getListener()->performAction(getActivePanel()->getModel(), "goto"); } if (command_name == "find_links") @@ -1088,19 +1091,19 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) if (command_name == "delete") { BOOL can_delete = FALSE; - LLFolderView *folder = getActivePanel()->getRootFolder(); - if (folder) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { can_delete = TRUE; std::set<LLUUID> selection_set; - folder->getSelectionList(selection_set); + root->getSelectionList(selection_set); if (selection_set.empty()) return FALSE; for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) { const LLUUID &item_id = (*iter); - LLFolderViewItem *item = folder->getItemByID(item_id); + LLFolderViewItem *item = root->getItemByID(item_id); const LLFolderViewEventListener *listener = item->getListener(); llassert(listener); if (!listener) return FALSE; diff --git a/indra/newview/llpanelme.cpp b/indra/newview/llpanelme.cpp index 3504cbd1ef..35acf8edcc 100644 --- a/indra/newview/llpanelme.cpp +++ b/indra/newview/llpanelme.cpp @@ -36,6 +36,7 @@ #include "llavatarconstants.h" #include "llpanelme.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "lliconctrl.h" #include "llsidetray.h" @@ -144,7 +145,7 @@ void LLPanelMe::onEditAppearanceClicked() { if (gAgentWearables.areWearablesLoaded()) { - gAgent.changeCameraToCustomizeAvatar(); + gAgentCamera.changeCameraToCustomizeAvatar(); } } diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 4f2d6374ca..6411cd802d 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -74,6 +74,7 @@ static const LLUUID PARCEL_AUDIO_LIST_ITEM_UUID = LLUUID("DF4B020D-8A24-4B95-AB5 // LLPanelNearByMedia // + LLPanelNearByMedia::LLPanelNearByMedia() : mMediaList(NULL), mEnableAllCtrl(NULL), @@ -87,6 +88,8 @@ LLPanelNearByMedia::LLPanelNearByMedia() mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && gSavedSettings.getBOOL("MediaTentativeAutoPlay"); + gSavedSettings.getControl(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING)->getSignal()->connect(boost::bind(&LLPanelNearByMedia::handleMediaAutoPlayChanged, this, _2)); + mCommitCallbackRegistrar.add("MediaListCtrl.EnableAll", boost::bind(&LLPanelNearByMedia::onClickEnableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.DisableAll", boost::bind(&LLPanelNearByMedia::onClickDisableAll, this)); mCommitCallbackRegistrar.add("MediaListCtrl.GoMediaPrefs", boost::bind(&LLPanelNearByMedia::onAdvancedButtonClick, this)); @@ -168,12 +171,19 @@ BOOL LLPanelNearByMedia::postBuild() mLessRect = getRect(); mLessRect.mBottom = minimized_controls->getRect().mBottom; - getChild<LLUICtrl>("more_less_btn")->setValue(false); + getChild<LLUICtrl>("more_btn")->setVisible(false); onMoreLess(); return TRUE; } +void LLPanelNearByMedia::handleMediaAutoPlayChanged(const LLSD& newvalue) +{ + // update mParcelAudioAutoStart if AUTO_PLAY_MEDIA_SETTING changes + mParcelAudioAutoStart = gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && + gSavedSettings.getBOOL("MediaTentativeAutoPlay"); +} + /*virtual*/ void LLPanelNearByMedia::onMouseEnter(S32 x, S32 y, MASK mask) { @@ -954,7 +964,7 @@ void LLPanelNearByMedia::onAdvancedButtonClick() void LLPanelNearByMedia::onMoreLess() { - bool is_more = getChild<LLUICtrl>("more_less_btn")->getValue(); + bool is_more = getChild<LLUICtrl>("more_btn")->getVisible(); mNearbyMediaPanel->setVisible(is_more); // enable resizing when expanded @@ -964,6 +974,9 @@ void LLPanelNearByMedia::onMoreLess() new_rect.translate(getRect().mRight - new_rect.mRight, getRect().mTop - new_rect.mTop); setShape(new_rect); + + getChild<LLUICtrl>("more_btn")->setVisible(!is_more); + getChild<LLUICtrl>("less_btn")->setVisible(is_more); } void LLPanelNearByMedia::updateControls() @@ -997,7 +1010,7 @@ void LLPanelNearByMedia::updateControls() if (NULL == impl) { // Just means it hasn't started yet - showBasicControls(false, false, false); + showBasicControls(false, false, false, false, 0); } else if (impl->isMediaTimeBased()) { @@ -1009,7 +1022,11 @@ void LLPanelNearByMedia::updateControls() } else { // non-time-based parcel media - showBasicControls(LLViewerMedia::isParcelMediaPlaying(), false, false); + showBasicControls(LLViewerMedia::isParcelMediaPlaying(), + false, + false, + impl->getVolume() == 0.0, + impl->getVolume()); } } } @@ -1032,19 +1049,23 @@ void LLPanelNearByMedia::updateControls() else { showBasicControls(!impl->isMediaDisabled(), ! impl->isParcelMedia(), // include_zoom - LLViewerMediaFocus::getInstance()->isZoomed()); + LLViewerMediaFocus::getInstance()->isZoomed(), + impl->getVolume() == 0.0, + impl->getVolume()); } } } } -void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool is_zoomed) +void LLPanelNearByMedia::showBasicControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume) { mStopCtrl->setVisible(playing); mPlayCtrl->setVisible(!playing); mPauseCtrl->setVisible(false); - mMuteCtrl->setVisible(false); - mVolumeSliderCtrl->setVisible(false); + mVolumeSliderCtrl->setVisible(true); + mMuteCtrl->setVisible(true); + mMuteBtn->setValue(muted); + mVolumeSlider->setValue(volume); mZoomCtrl->setVisible(include_zoom && !is_zoomed); mUnzoomCtrl->setVisible(include_zoom && is_zoomed); mStopCtrl->setEnabled(true); @@ -1143,7 +1164,7 @@ void LLPanelNearByMedia::onClickSelectedMediaMute() else { LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ? ((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id); - if (NULL != impl && impl->isMediaTimeBased()) + if (NULL != impl) { F32 volume = impl->getVolume(); if(volume > 0.0) @@ -1174,7 +1195,7 @@ void LLPanelNearByMedia::onCommitSelectedMediaVolume() else { LLViewerMediaImpl* impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ? ((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id); - if (NULL != impl && impl->isMediaTimeBased()) + if (NULL != impl) { impl->setVolume(mVolumeSlider->getValueF32()); } diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index af4659365f..3cecf8e40c 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -63,6 +63,10 @@ public: // interaction with our buttons. bool getParcelAudioAutoStart(); + // callback for when the auto play media preference changes + // to update mParcelAudioAutoStart + void handleMediaAutoPlayChanged(const LLSD& newvalue); + LLPanelNearByMedia(); virtual ~LLPanelNearByMedia(); @@ -136,7 +140,7 @@ private: bool shouldShow(LLViewerMediaImpl* impl); - void showBasicControls(bool playing, bool include_zoom, bool is_zoomed); + void showBasicControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume); void showTimeBasedControls(bool playing, bool include_zoom, bool is_zoomed, bool muted, F32 volume); void showDisabledControls(); void updateControls(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c43cbf5819..3a82cf6f8b 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -46,10 +46,12 @@ #include "roles_constants.h" #include "llagent.h" +#include "llavataractions.h" #include "llcallbacklist.h" #include "llfloaterbuycurrency.h" #include "llfloaterreg.h" #include "llinventorybridge.h" +#include "llinventorydefines.h" #include "llinventoryfilter.h" #include "llinventoryfunctions.h" #include "llpreviewanim.h" @@ -128,7 +130,7 @@ public: virtual void pasteFromClipboard(); virtual void pasteLinkFromClipboard(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual BOOL isUpToDate() const { return TRUE; } virtual BOOL hasChildren() const { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } @@ -344,7 +346,7 @@ time_t LLTaskInvFVBridge::getCreationDate() const LLUIImagePtr LLTaskInvFVBridge::getIcon() const { BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) + if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) { item_is_multi = TRUE; } @@ -595,7 +597,7 @@ BOOL LLTaskInvFVBridge::dragOrDrop(MASK mask, BOOL drop, } // virtual -void LLTaskInvFVBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string action) { if (action == "task_buy") { @@ -917,7 +919,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual void openItem(); - virtual void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + virtual void performAction(LLInventoryModel* model, std::string action); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); static void openSoundPreview(void* data); }; @@ -954,7 +956,7 @@ void LLTaskSoundBridge::openSoundPreview(void* data) } // virtual -void LLTaskSoundBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLTaskSoundBridge::performAction(LLInventoryModel* model, std::string action) { if (action == "task_play") { @@ -964,7 +966,7 @@ void LLTaskSoundBridge::performAction(LLFolderView* folder, LLInventoryModel* mo send_sound_trigger(item->getAssetUUID(), 1.0); } } - LLTaskInvFVBridge::performAction(folder, model, action); + LLTaskInvFVBridge::performAction(model, action); } void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -1208,7 +1210,7 @@ LLTaskObjectBridge::LLTaskObjectBridge( LLUIImagePtr LLTaskObjectBridge::getIcon() const { BOOL item_is_multi = FALSE; - if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) + if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) { item_is_multi = TRUE; } @@ -1527,6 +1529,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); } // Destroys the object @@ -1615,7 +1618,7 @@ void LLPanelObjectInventory::reset() } void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* data) { @@ -1632,7 +1635,7 @@ void LLPanelObjectInventory::inventoryChanged(LLViewerObject* object, // refresh any properties floaters that are hanging around. if(inventory) { - for (InventoryObjectList::const_iterator iter = inventory->begin(); + for (LLInventoryObject::object_list_t::const_iterator iter = inventory->begin(); iter != inventory->end(); ) { LLInventoryObject* item = *iter++; @@ -1665,7 +1668,7 @@ void LLPanelObjectInventory::updateInventory() if (objectp) { LLInventoryObject* inventory_root = objectp->getInventoryRoot(); - InventoryObjectList contents; + LLInventoryObject::object_list_t contents; objectp->getInventoryContents(contents); if (inventory_root) { @@ -1719,7 +1722,7 @@ void LLPanelObjectInventory::updateInventory() // leads to an N^2 based on the category count. This could be greatly // speeded with an efficient multimap implementation, but we don't // have that in our current arsenal. -void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents) +void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents) { if (!inventory_root) { @@ -1748,7 +1751,7 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root typedef std::pair<LLInventoryObject*, LLFolderViewFolder*> obj_folder_pair; -void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* inventory, +void LLPanelObjectInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory, LLInventoryObject* parent, LLFolderViewFolder* folder) { @@ -1757,8 +1760,8 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento LLTaskInvFVBridge* bridge; LLFolderViewItem* view; - InventoryObjectList::iterator it = inventory->begin(); - InventoryObjectList::iterator end = inventory->end(); + LLInventoryObject::object_list_t::iterator it = inventory->begin(); + LLInventoryObject::object_list_t::iterator end = inventory->end(); for( ; it != end; ++it) { LLInventoryObject* obj = *it; diff --git a/indra/newview/llpanelobjectinventory.h b/indra/newview/llpanelobjectinventory.h index bc339ece35..d015929841 100644 --- a/indra/newview/llpanelobjectinventory.h +++ b/indra/newview/llpanelobjectinventory.h @@ -82,12 +82,12 @@ public: protected: void reset(); /*virtual*/ void inventoryChanged(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* user_data); void updateInventory(); - void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents); - void createViewsForCategory(InventoryObjectList* inventory, + void createFolderViews(LLInventoryObject* inventory_root, LLInventoryObject::object_list_t& contents); + void createViewsForCategory(LLInventoryObject::object_list_t* inventory, LLInventoryObject* parent, LLFolderViewFolder* folder); void clearContents(); diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp new file mode 100644 index 0000000000..ce17e1d624 --- /dev/null +++ b/indra/newview/llpaneloutfitedit.cpp @@ -0,0 +1,580 @@ +/** + * @file llpaneloutfitedit.cpp + * @brief Displays outfit edit information in Side Tray. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneloutfitedit.h" + +// *TODO: reorder includes to match the coding standard +#include "llagent.h" +#include "llagentwearables.h" +#include "llappearancemgr.h" +#include "llinventory.h" +#include "llviewercontrol.h" +#include "llui.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "llinventoryfunctions.h" +#include "llinventorypanel.h" +#include "llviewermenu.h" +#include "llviewerwindow.h" +#include "llviewerinventory.h" +#include "llbutton.h" +#include "llcombobox.h" +#include "llfiltereditor.h" +#include "llfloaterinventory.h" +#include "llinventorybridge.h" +#include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" +#include "llpaneloutfitsinventory.h" +#include "lluiconstants.h" +#include "llscrolllistctrl.h" +#include "lltextbox.h" +#include "lluictrlfactory.h" +#include "llsdutil.h" +#include "llsidepanelappearance.h" +#include "lltoggleablemenu.h" +#include "llwearablelist.h" + +static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); + +const U64 WEARABLE_MASK = (1LL << LLInventoryType::IT_WEARABLE); +const U64 ATTACHMENT_MASK = (1LL << LLInventoryType::IT_ATTACHMENT) | (1LL << LLInventoryType::IT_OBJECT); +const U64 ALL_ITEMS_MASK = WEARABLE_MASK | ATTACHMENT_MASK; + +class LLInventoryLookObserver : public LLInventoryObserver +{ +public: + LLInventoryLookObserver(LLPanelOutfitEdit *panel) : mPanel(panel) {} + virtual ~LLInventoryLookObserver() + { + if (gInventory.containsObserver(this)) + { + gInventory.removeObserver(this); + } + } + + virtual void changed(U32 mask) + { + if (mask & (LLInventoryObserver::ADD | LLInventoryObserver::REMOVE)) + { + mPanel->updateLookInfo(); + } + } +protected: + LLPanelOutfitEdit *mPanel; +}; + +class LLLookFetchObserver : public LLInventoryFetchDescendentsObserver +{ +public: + LLLookFetchObserver(LLPanelOutfitEdit *panel) : + mPanel(panel) + {} + LLLookFetchObserver() {} + virtual void done() + { + mPanel->lookFetched(); + if(gInventory.containsObserver(this)) + { + gInventory.removeObserver(this); + } + } +private: + LLPanelOutfitEdit *mPanel; +}; + + + +LLPanelOutfitEdit::LLPanelOutfitEdit() +: LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL), +mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL), +mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) +{ + mSavedFolderState = new LLSaveFolderState(); + mSavedFolderState->setApply(FALSE); + + mFetchLook = new LLLookFetchObserver(this); + mLookObserver = new LLInventoryLookObserver(this); + gInventory.addObserver(mLookObserver); + + mLookItemTypes.reserve(NUM_LOOK_ITEM_TYPES); + for (U32 i = 0; i < NUM_LOOK_ITEM_TYPES; i++) + { + mLookItemTypes.push_back(LLLookItemType()); + } + + +} + +LLPanelOutfitEdit::~LLPanelOutfitEdit() +{ + delete mSavedFolderState; + if (gInventory.containsObserver(mFetchLook)) + { + gInventory.removeObserver(mFetchLook); + } + delete mFetchLook; + + if (gInventory.containsObserver(mLookObserver)) + { + gInventory.removeObserver(mLookObserver); + } + delete mLookObserver; +} + +BOOL LLPanelOutfitEdit::postBuild() +{ + // gInventory.isInventoryUsable() no longer needs to be tested per Richard's fix for race conditions between inventory and panels + + mLookItemTypes[LIT_ALL] = LLLookItemType(getString("Filter.All"), ALL_ITEMS_MASK); + mLookItemTypes[LIT_WEARABLE] = LLLookItemType(getString("Filter.Clothes/Body"), WEARABLE_MASK); + mLookItemTypes[LIT_ATTACHMENT] = LLLookItemType(getString("Filter.Objects"), ATTACHMENT_MASK); + + mCurrentOutfitName = getChild<LLTextBox>("curr_outfit_name"); + + childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL); + childSetCommitCallback("filter_button", boost::bind(&LLPanelOutfitEdit::showWearablesFilter, this), NULL); + + mLookContents = getChild<LLScrollListCtrl>("look_items_list"); + mLookContents->sortByColumn("look_item_sort", TRUE); + mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); + + mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items"); + mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK); + mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); + mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + + LLComboBox* type_filter = getChild<LLComboBox>("filter_wearables_combobox"); + type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); + type_filter->removeall(); + for (U32 i = 0; i < mLookItemTypes.size(); ++i) + { + type_filter->add(mLookItemTypes[i].displayName); + } + type_filter->setCurrentByIndex(LIT_ALL); + + mSearchFilter = getChild<LLFilterEditor>("look_item_filter"); + mSearchFilter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onSearchEdit, this, _2)); + + /* Removing add to look inline button (not part of mvp for viewer 2) + LLButton::Params add_params; + add_params.name("add_to_look"); + add_params.click_callback.function(boost::bind(&LLPanelOutfitEdit::onAddToLookClicked, this)); + add_params.label("+"); + + mAddToLookBtn = LLUICtrlFactory::create<LLButton>(add_params); + mAddToLookBtn->setEnabled(FALSE); + mAddToLookBtn->setVisible(FALSE); */ + + childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); + childSetEnabled("add_to_outfit_btn", false); + + mUpBtn = getChild<LLButton>("up_btn"); + mUpBtn->setEnabled(TRUE); + mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this)); + + //*TODO rename mLookContents to mOutfitContents + mLookContents = getChild<LLScrollListCtrl>("look_items_list"); + mLookContents->sortByColumn("look_item_sort", TRUE); + mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this)); + + mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn"); + mRemoveFromOutfitBtn->setEnabled(FALSE); + mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this)); + + mEditWearableBtn = getChild<LLButton>("edit_wearable_btn"); + mEditWearableBtn->setEnabled(FALSE); + mEditWearableBtn->setVisible(FALSE); + mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this)); + + childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance())); + + childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); + childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); + childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this)); + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; + save_registar.add("Outfit.Save.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); + save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); + mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + + return TRUE; +} + +void LLPanelOutfitEdit::showAddWearablesPanel() +{ + childSetVisible("add_wearables_panel", childGetValue("add_btn")); +} + +void LLPanelOutfitEdit::showWearablesFilter() +{ + childSetVisible("filter_combobox_panel", childGetValue("filter_button")); +} + +void LLPanelOutfitEdit::saveOutfit(bool as_new) +{ + if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) + { + // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved. + // If updateBaseOutfit fails, ask for an outfit name anyways + return; + } + + LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance(); + if (panel_outfits_inventory) + { + panel_outfits_inventory->onSave(); + } +} + +void LLPanelOutfitEdit::showSaveMenu() +{ + S32 x, y; + LLUI::getMousePositionLocal(this, &x, &y); + + mSaveMenu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, mSaveMenu, x, y); +} + +void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) +{ + LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl); + llassert(type_filter); + if (type_filter) + { + U32 curr_filter_type = type_filter->getCurrentIndex(); + mInventoryItemsPanel->setFilterTypes(mLookItemTypes[curr_filter_type].inventoryMask); + } + + mSavedFolderState->setApply(TRUE); + mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + + LLOpenFoldersWithSelection opener; + mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener); + mInventoryItemsPanel->getRootFolder()->scrollToShowSelection(); + + LLInventoryModelBackgroundFetch::instance().start(); +} + +void LLPanelOutfitEdit::onSearchEdit(const std::string& string) +{ + if (mSearchString != string) + { + mSearchString = string; + + // Searches are case-insensitive + LLStringUtil::toUpper(mSearchString); + LLStringUtil::trimHead(mSearchString); + } + + if (mSearchString == "") + { + mInventoryItemsPanel->setFilterSubString(LLStringUtil::null); + + // re-open folders that were initially open + mSavedFolderState->setApply(TRUE); + mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + LLOpenFoldersWithSelection opener; + mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(opener); + mInventoryItemsPanel->getRootFolder()->scrollToShowSelection(); + } + + LLInventoryModelBackgroundFetch::instance().start(); + + if (mInventoryItemsPanel->getFilterSubString().empty() && mSearchString.empty()) + { + // current filter and new filter empty, do nothing + return; + } + + // save current folder open state if no filter currently applied + if (mInventoryItemsPanel->getRootFolder()->getFilterSubString().empty()) + { + mSavedFolderState->setApply(FALSE); + mInventoryItemsPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + } + + // set new filter string + mInventoryItemsPanel->setFilterSubString(mSearchString); +} + +void LLPanelOutfitEdit::onAddToOutfitClicked(void) +{ + LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!curr_item) return; + + LLFolderViewEventListener* listenerp = curr_item->getListener(); + if (!listenerp) return; + + if (LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID())) + { + updateLookInfo(); + } +} + + +void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void) +{ + LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID(); + + LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove); + + updateLookInfo(); + + mRemoveFromOutfitBtn->setEnabled(FALSE); +} + + +void LLPanelOutfitEdit::onUpClicked(void) +{ + LLUUID inv_id = mLookContents->getSelectionInterface()->getCurrentID(); + if (inv_id.isNull()) + { + //nothing selected, do nothing + return; + } + + LLViewerInventoryItem *link_item = gInventory.getItem(inv_id); + if (!link_item) + { + llwarns << "could not find inventory item based on currently worn link." << llendl; + return; + } + + + LLUUID asset_id = link_item->getAssetUUID(); + if (asset_id.isNull()) + { + llwarns << "inventory link has null Asset ID. could not get object reference" << llendl; + } + + static const std::string empty = ""; + LLWearableList::instance().getAsset(asset_id, + empty, // don't care about wearable name + link_item->getActualType(), + LLSidepanelAppearance::editWearable, + (void*)getParentUICtrl()); +} + + +void LLPanelOutfitEdit::onEditWearableClicked(void) +{ + LLUUID id_to_edit = mLookContents->getSelectionInterface()->getCurrentID(); + LLViewerInventoryItem * item_to_edit = gInventory.getItem(id_to_edit); + + if (item_to_edit) + { + // returns null if not a wearable (attachment, etc). + LLWearable* wearable_to_edit = gAgentWearables.getWearableFromAssetID(item_to_edit->getAssetUUID()); + if(wearable_to_edit) + { + bool can_modify = false; + bool is_complete = item_to_edit->isFinished(); + // if item_to_edit is a link, its properties are not appropriate, + // lets get original item with actual properties + LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID()); + if(original_item) + { + can_modify = original_item->getPermissions().allowModifyBy(gAgentID); + is_complete = original_item->isFinished(); + } + + if (can_modify && is_complete) + { + LLSidepanelAppearance::editWearable(wearable_to_edit, getParent()); + if (mEditWearableBtn->getVisible()) + { + mEditWearableBtn->setVisible(FALSE); + } + } + } + } +} + +void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) +{ + LLFolderViewItem* current_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + + LLViewerInventoryItem* item = current_item->getInventoryItem(); + if (!item) return; + + switch (item->getType()) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_OBJECT: + childSetEnabled("add_to_outfit_btn", true); + break; + default: + childSetEnabled("add_to_outfit_btn", false); + break; + } + + /* Removing add to look inline button (not part of mvp for viewer 2) + LLRect btn_rect(current_item->getLocalRect().mRight - 50, + current_item->getLocalRect().mTop, + current_item->getLocalRect().mRight - 30, + current_item->getLocalRect().mBottom); + + mAddToLookBtn->setRect(btn_rect); + mAddToLookBtn->setEnabled(TRUE); + if (!mAddToLookBtn->getVisible()) + { + mAddToLookBtn->setVisible(TRUE); + } + + current_item->addChild(mAddToLookBtn); */ +} + +void LLPanelOutfitEdit::onOutfitItemSelectionChange(void) +{ + LLScrollListItem* item = mLookContents->getLastSelectedItem(); + if (!item) + return; + + LLRect item_rect; + mLookContents->localRectToOtherView(item->getRect(), &item_rect, this); + + // TODO button(and item list) should be removed (when new widget is ready) + LLRect btn_rect = mEditWearableBtn->getRect(); + btn_rect.set(item_rect.mRight - btn_rect.getWidth(), item_rect.mTop, item_rect.mRight, item_rect.mBottom); + + mEditWearableBtn->setShape(btn_rect); + sendChildToFront(mEditWearableBtn); + + mEditWearableBtn->setEnabled(TRUE); + if (!mEditWearableBtn->getVisible()) + { + mEditWearableBtn->setVisible(TRUE); + } + + + const LLUUID& id_item_to_remove = item->getUUID(); + LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove); + if (!item_to_remove) return; + + switch (item_to_remove->getType()) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_OBJECT: + mRemoveFromOutfitBtn->setEnabled(TRUE); + break; + default: + mRemoveFromOutfitBtn->setEnabled(FALSE); + break; + } +} + +void LLPanelOutfitEdit::changed(U32 mask) +{ +} + +void LLPanelOutfitEdit::lookFetched(void) +{ + LLInventoryModel::cat_array_t cat_array; + LLInventoryModel::item_array_t item_array; + + // collectDescendentsIf takes non-const reference: + LLFindCOFValidItems is_cof_valid; + gInventory.collectDescendentsIf(mCurrentOutfitID, + cat_array, + item_array, + LLInventoryModel::EXCLUDE_TRASH, + is_cof_valid); + for (LLInventoryModel::item_array_t::const_iterator iter = item_array.begin(); + iter != item_array.end(); + iter++) + { + const LLViewerInventoryItem *item = (*iter); + + LLSD row; + row["id"] = item->getUUID(); + LLSD& columns = row["columns"]; + columns[0]["column"] = "look_item"; + columns[0]["type"] = "text"; + columns[0]["value"] = item->getName(); + columns[1]["column"] = "look_item_sort"; + columns[1]["type"] = "text"; // TODO: multi-wearable sort "type" should go here. + columns[1]["value"] = "BAR"; // TODO: Multi-wearable sort index should go here + + mLookContents->addElement(row); + } +} + +void LLPanelOutfitEdit::updateLookInfo() +{ + if (getVisible()) + { + mLookContents->clearRows(); + + mFetchLook->setFetchID(mCurrentOutfitID); + mFetchLook->startFetch(); + if (mFetchLook->isFinished()) + { + mFetchLook->done(); + } + else + { + gInventory.addObserver(mFetchLook); + } + } +} + +void LLPanelOutfitEdit::displayCurrentOutfit() +{ + if (!getVisible()) + { + setVisible(TRUE); + } + + mCurrentOutfitID = LLAppearanceMgr::getInstance()->getCOF(); + + std::string current_outfit_name; + if (LLAppearanceMgr::getInstance()->getBaseOutfitName(current_outfit_name)) + { + mCurrentOutfitName->setText(current_outfit_name); + } + else + { + mCurrentOutfitName->setText(getString("No Outfit")); + } + + updateLookInfo(); +} + + diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h new file mode 100644 index 0000000000..69e8016534 --- /dev/null +++ b/indra/newview/llpaneloutfitedit.h @@ -0,0 +1,131 @@ +/** + * @file llpaneloutfitedit.h + * @brief Displays outfit edit information in Side Tray. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLPANELOUTFITEDIT_H +#define LL_LLPANELOUTFITEDIT_H + +#include "llpanel.h" + +#include "v3dmath.h" +#include "lluuid.h" + +#include "lliconctrl.h" + +#include "llremoteparcelrequest.h" +#include "llinventory.h" +#include "llinventorymodel.h" + +class LLButton; +class LLTextBox; +class LLInventoryCategory; +class LLInventoryLookObserver; +class LLInventoryPanel; +class LLSaveFolderState; +class LLFolderViewItem; +class LLScrollListCtrl; +class LLToggleableMenu; +class LLLookFetchObserver; +class LLFilterEditor; + +class LLPanelOutfitEdit : public LLPanel +{ +public: + + // NOTE: initialize mLookItemTypes at the index of any new enum you add in the LLPanelOutfitEdit() constructor + typedef enum e_look_item_type + { + LIT_ALL = 0, + LIT_WEARABLE, // clothing or shape + LIT_ATTACHMENT, + NUM_LOOK_ITEM_TYPES + } ELookItemType; + + struct LLLookItemType { + std::string displayName; + U64 inventoryMask; + LLLookItemType() : displayName("NONE"), inventoryMask(0) {} + LLLookItemType(std::string name, U64 mask) : displayName(name), inventoryMask(mask) {} + }; + + LLPanelOutfitEdit(); + /*virtual*/ ~LLPanelOutfitEdit(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void changed(U32 mask); + + /*virtual*/ void setParcelID(const LLUUID& parcel_id); + // Sends a request for data about the given parcel, which will + // only update the location if there is none already available. + + void showAddWearablesPanel(); + void showWearablesFilter(); + void saveOutfit(bool as_new = false); + void showSaveMenu(); + + void onTypeFilterChanged(LLUICtrl* ctrl); + void onSearchEdit(const std::string& string); + void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); + void onAddToOutfitClicked(void); + void onOutfitItemSelectionChange(void); + void onRemoveFromOutfitClicked(void); + void onEditWearableClicked(void); + void onUpClicked(void); + + void displayCurrentOutfit(); + + void lookFetched(void); + + void updateLookInfo(void); + +private: + + //*TODO got rid of mCurrentOutfitID + LLUUID mCurrentOutfitID; + + LLTextBox* mCurrentOutfitName; + LLScrollListCtrl* mLookContents; + LLInventoryPanel* mInventoryItemsPanel; + LLFilterEditor* mSearchFilter; + LLSaveFolderState* mSavedFolderState; + std::string mSearchString; + LLButton* mAddToOutfitBtn; + LLButton* mRemoveFromOutfitBtn; + LLButton* mUpBtn; + LLButton* mEditWearableBtn; + LLToggleableMenu* mSaveMenu; + + LLLookFetchObserver* mFetchLook; + LLInventoryLookObserver* mLookObserver; + std::vector<LLLookItemType> mLookItemTypes; +}; + +#endif // LL_LLPANELOUTFITEDIT_H diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index c2f2d32142..b78268da7b 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -43,10 +43,12 @@ #include "llfloaterinventory.h" #include "llfoldervieweventlistener.h" #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventorypanel.h" #include "lllandmark.h" #include "lllineeditor.h" #include "llmodaldialog.h" +#include "llnotificationsutil.h" #include "llsidepanelappearance.h" #include "llsidetray.h" #include "lltabcontainer.h" @@ -67,75 +69,13 @@ static const std::string COF_TAB_NAME = "cof_tab"; static LLRegisterPanelClassWrapper<LLPanelOutfitsInventory> t_inventory("panel_outfits_inventory"); bool LLPanelOutfitsInventory::sShowDebugEditor = false; -class LLOutfitSaveAsDialog : public LLModalDialog -{ -private: - std::string mItemName; - std::string mTempItemName; - - boost::signals2::signal<void (const std::string&)> mSaveAsSignal; - -public: - LLOutfitSaveAsDialog( const LLSD& key ) - : LLModalDialog( key ), - mTempItemName(key.asString()) - { - } - - BOOL postBuild() - { - getChild<LLUICtrl>("Save")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onSave, this )); - getChild<LLUICtrl>("Cancel")->setCommitCallback(boost::bind(&LLOutfitSaveAsDialog::onCancel, this )); - - childSetTextArg("name ed", "[DESC]", mTempItemName); - return TRUE; - } - - void setSaveAsCommit( const boost::signals2::signal<void (const std::string&)>::slot_type& cb ) - { - mSaveAsSignal.connect(cb); - } - - virtual void onOpen(const LLSD& key) - { - LLLineEditor* edit = getChild<LLLineEditor>("name ed"); - if (edit) - { - edit->setFocus(TRUE); - edit->selectAll(); - } - } - void onSave() - { - mItemName = childGetValue("name ed").asString(); - LLStringUtil::trim(mItemName); - if( !mItemName.empty() ) - { - mSaveAsSignal(mItemName); - closeFloater(); // destroys this object - } - } - - void onCancel() - { - closeFloater(); // destroys this object - } -}; - LLPanelOutfitsInventory::LLPanelOutfitsInventory() : mActivePanel(NULL), mParent(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); - - static bool registered_dialog = false; - if (!registered_dialog) - { - LLFloaterReg::add("outfit_save_as", "floater_outfit_save_as.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLOutfitSaveAsDialog>); - registered_dialog = true; - } } LLPanelOutfitsInventory::~LLPanelOutfitsInventory() @@ -191,7 +131,7 @@ void LLPanelOutfitsInventory::updateVerbs() if (mListCommands) { - mListCommands->childSetVisible("look_edit_btn",sShowDebugEditor); + mListCommands->childSetVisible("edit_current_outfit_btn",sShowDebugEditor); updateListCommands(); } } @@ -217,7 +157,7 @@ void LLPanelOutfitsInventory::onSearchEdit(const std::string& string) getRootFolder()->scrollToShowSelection(); } - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); if (mActivePanel->getFilterSubString().empty() && string.empty()) { @@ -241,7 +181,7 @@ void LLPanelOutfitsInventory::onWearButtonClick() LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); if (listenerp) { - listenerp->performAction(NULL, NULL,"replaceoutfit"); + listenerp->performAction(NULL, "replaceoutfit"); } } @@ -250,7 +190,7 @@ void LLPanelOutfitsInventory::onAdd() LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); if (listenerp) { - listenerp->performAction(NULL, NULL,"addtooutfit"); + listenerp->performAction(NULL, "addtooutfit"); } } @@ -259,7 +199,7 @@ void LLPanelOutfitsInventory::onRemove() LLFolderViewEventListener* listenerp = getCorrectListenerForAction(); if (listenerp) { - listenerp->performAction(NULL, NULL,"removefromoutfit"); + listenerp->performAction(NULL, "removefromoutfit"); } } @@ -267,32 +207,61 @@ void LLPanelOutfitsInventory::onEdit() { } +bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == option) + { + std::string outfit_name = response["message"].asString(); + LLStringUtil::trim(outfit_name); + if( !outfit_name.empty() ) + { + LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); + + LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel_appearance) + { + panel_appearance->showOutfitsInventoryPanel(); + } + + if (mAppearanceTabs) + { + mAppearanceTabs->selectTabByName(OUTFITS_TAB_NAME); + } + } + } + + return false; +} + + + void LLPanelOutfitsInventory::onSave() { std::string outfit_name; - if (!LLAppearanceManager::getInstance()->getBaseOutfitName(outfit_name)) + if (!LLAppearanceMgr::getInstance()->getBaseOutfitName(outfit_name)) { outfit_name = LLViewerFolderType::lookupNewCategoryName(LLFolderType::FT_OUTFIT); } + LLSD args; + args["DESC"] = outfit_name; + + LLSD payload; + //payload["ids"].append(*it); + + LLNotificationsUtil::add("SaveOutfitAs", args, payload, boost::bind(&LLPanelOutfitsInventory::onSaveCommit, this, _1, _2)); + + //) + +/* LLOutfitSaveAsDialog* save_as_dialog = LLFloaterReg::showTypedInstance<LLOutfitSaveAsDialog>("outfit_save_as", LLSD(outfit_name), TRUE); if (save_as_dialog) { save_as_dialog->setSaveAsCommit(boost::bind(&LLPanelOutfitsInventory::onSaveCommit, this, _1 )); - } -} - -void LLPanelOutfitsInventory::onSaveCommit(const std::string& outfit_name) -{ - LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); - LLSD key; - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); - - if (mAppearanceTabs) - { - mAppearanceTabs->selectTabByName(OUTFITS_TAB_NAME); - } + }*/ } void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action) @@ -305,19 +274,12 @@ void LLPanelOutfitsInventory::onSelectionChange(const std::deque<LLFolderViewIte } } -void LLPanelOutfitsInventory::onSelectorButtonClicked() +void LLPanelOutfitsInventory::showEditOutfitPanel() { - LLFolderViewItem* cur_item = getRootFolder()->getCurSelectedItem(); - - LLFolderViewEventListener* listenerp = cur_item->getListener(); - if (getIsCorrectType(listenerp)) - { - LLSD key; - key["type"] = "look"; - key["id"] = listenerp->getUUID(); - - LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); - } + LLSD key; + key["type"] = "edit_outfit"; + + LLSideTray::getInstance()->showPanel("sidepanel_appearance", key); } LLFolderViewEventListener *LLPanelOutfitsInventory::getCorrectListenerForAction() @@ -352,6 +314,12 @@ LLFolderView *LLPanelOutfitsInventory::getRootFolder() return mActivePanel->getRootFolder(); } +//static +LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance() +{ + return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); +} + ////////////////////////////////////////////////////////////////////////////////// // List Commands // @@ -364,7 +332,7 @@ void LLPanelOutfitsInventory::initListCommandsHandlers() mListCommands->childSetAction("make_outfit_btn", boost::bind(&LLPanelOutfitsInventory::onAddButtonClick, this)); mListCommands->childSetAction("wear_btn", boost::bind(&LLPanelOutfitsInventory::onWearButtonClick, this)); - mListCommands->childSetAction("look_edit_btn", boost::bind(&LLPanelOutfitsInventory::onSelectorButtonClicked, this)); + mListCommands->childSetAction("edit_current_outfit_btn", boost::bind(&LLPanelOutfitsInventory::showEditOutfitPanel, this)); LLDragAndDropButton* trash_btn = mListCommands->getChild<LLDragAndDropButton>("trash_btn"); trash_btn->setDragAndDropHandler(boost::bind(&LLPanelOutfitsInventory::handleDragAndDropToTrash, this @@ -479,18 +447,18 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) if (command_name == "delete" || command_name == "remove") { BOOL can_delete = FALSE; - LLFolderView *folder = getActivePanel()->getRootFolder(); - if (folder) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { std::set<LLUUID> selection_set; - folder->getSelectionList(selection_set); + root->getSelectionList(selection_set); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); ++iter) { const LLUUID &item_id = (*iter); - LLFolderViewItem *item = folder->getItemByID(item_id); + LLFolderViewItem *item = root->getItemByID(item_id); can_delete &= item->getListener()->isItemRemovable(); } return can_delete; @@ -500,11 +468,11 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) if (command_name == "remove_link") { BOOL can_delete = FALSE; - LLFolderView *folder = getActivePanel()->getRootFolder(); - if (folder) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { std::set<LLUUID> selection_set; - folder->getSelectionList(selection_set); + root->getSelectionList(selection_set); can_delete = (selection_set.size() > 0); for (std::set<LLUUID>::iterator iter = selection_set.begin(); iter != selection_set.end(); @@ -549,11 +517,11 @@ BOOL LLPanelOutfitsInventory::isActionEnabled(const LLSD& userdata) bool LLPanelOutfitsInventory::hasItemsSelected() { bool has_items_selected = false; - LLFolderView *folder = getActivePanel()->getRootFolder(); - if (folder) + LLFolderView* root = getActivePanel()->getRootFolder(); + if (root) { std::set<LLUUID> selection_set; - folder->getSelectionList(selection_set); + root->getSelectionList(selection_set); has_items_selected = (selection_set.size() > 0); } return has_items_selected; diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index ab25ef0a49..5d0d27ee4f 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -61,10 +61,10 @@ public: void onEdit(); void onSave(); - void onSaveCommit(const std::string& item_name); + bool onSaveCommit(const LLSD& notification, const LLSD& response); void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); - void onSelectorButtonClicked(); + void showEditOutfitPanel(); // If a compatible listener type is selected, then return a pointer to that. // Otherwise, return NULL. @@ -73,6 +73,8 @@ public: LLFolderView* getRootFolder(); + static LLPanelOutfitsInventory* findInstance(); + protected: void updateVerbs(); bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 03e8ab644e..daa2a04f65 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -134,13 +134,13 @@ public: typedef std::map < LLUUID, LLVector3d > id_to_pos_map_t; LLAvatarItemDistanceComparator() {}; - void updateAvatarsPositions(std::vector<LLVector3d>& positions, std::vector<LLUUID>& uuids) + void updateAvatarsPositions(std::vector<LLVector3d>& positions, uuid_vec_t& uuids) { std::vector<LLVector3d>::const_iterator pos_it = positions.begin(), pos_end = positions.end(); - std::vector<LLUUID>::const_iterator + uuid_vec_t::const_iterator id_it = uuids.begin(), id_end = uuids.end(); @@ -178,8 +178,8 @@ public: protected: virtual bool doCompare(const LLAvatarListItem* item1, const LLAvatarListItem* item2) const { - LLPointer<LLSpeaker> lhs = LLLocalSpeakerMgr::instance().findSpeaker(item1->getAvatarId()); - LLPointer<LLSpeaker> rhs = LLLocalSpeakerMgr::instance().findSpeaker(item2->getAvatarId()); + LLPointer<LLSpeaker> lhs = LLActiveSpeakerMgr::instance().findSpeaker(item1->getAvatarId()); + LLPointer<LLSpeaker> rhs = LLActiveSpeakerMgr::instance().findSpeaker(item2->getAvatarId()); if ( lhs.notNull() && rhs.notNull() ) { // Compare by last speaking time @@ -512,15 +512,19 @@ BOOL LLPanelPeople::postBuild() mNearbyList = getChild<LLPanel>(NEARBY_TAB_NAME)->getChild<LLAvatarList>("avatar_list"); mNearbyList->setNoItemsCommentText(getString("no_one_near")); + mNearbyList->setNoItemsMsg(getString("no_one_near")); + mNearbyList->setNoFilteredItemsMsg(getString("no_one_filtered_near")); mNearbyList->setShowIcons("NearbyListShowIcons"); mRecentList = getChild<LLPanel>(RECENT_TAB_NAME)->getChild<LLAvatarList>("avatar_list"); - mRecentList->setNoItemsCommentText(getString("no_people")); + mRecentList->setNoItemsCommentText(getString("no_recent_people")); + mRecentList->setNoItemsMsg(getString("no_recent_people")); + mRecentList->setNoFilteredItemsMsg(getString("no_filtered_recent_people")); mRecentList->setShowIcons("RecentListShowIcons"); mGroupList = getChild<LLGroupList>("group_list"); - mGroupList->setNoGroupsMsg(getString("no_groups_msg")); - mGroupList->setNoFilteredGroupsMsg(getString("no_filtered_groups_msg")); + mGroupList->setNoItemsMsg(getString("no_groups_msg")); + mGroupList->setNoFilteredItemsMsg(getString("no_filtered_groups_msg")); mNearbyList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); mRecentList->setContextMenu(&LLPanelPeopleMenus::gNearbyMenu); @@ -652,8 +656,8 @@ void LLPanelPeople::updateFriendList() av_tracker.copyBuddyList(all_buddies); // save them to the online and all friends vectors - LLAvatarList::uuid_vector_t& online_friendsp = mOnlineFriendList->getIDs(); - LLAvatarList::uuid_vector_t& all_friendsp = mAllFriendList->getIDs(); + uuid_vec_t& online_friendsp = mOnlineFriendList->getIDs(); + uuid_vec_t& all_friendsp = mAllFriendList->getIDs(); all_friendsp.clear(); online_friendsp.clear(); @@ -672,11 +676,6 @@ void LLPanelPeople::updateFriendList() lldebugs << "Friends Cards were not found" << llendl; } - // show special help text for just created account to help found friends. EXT-4836 - static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg"); - no_friends_text->setVisible(all_friendsp.size() == 0); - - LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); for (; buddy_it != all_buddies.end(); ++buddy_it) { @@ -685,6 +684,14 @@ void LLPanelPeople::updateFriendList() online_friendsp.push_back(buddy_id); } + // show special help text for just created account to help found friends. EXT-4836 + static LLTextBox* no_friends_text = getChild<LLTextBox>("no_friends_msg"); + + // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) + // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. + bool any_friend_exists = (all_friendsp.size() > 0) || (online_friendsp.size() > 0); + no_friends_text->setVisible(!any_friend_exists); + /* * Avatarlists will be hidden by showFriendsAccordionsIfNeeded(), if they do not have items. * But avatarlist can be updated only if it is visible @see LLAvatarList::draw(); @@ -708,7 +715,7 @@ void LLPanelPeople::updateNearbyList() mNearbyList->setDirty(); DISTANCE_COMPARATOR.updateAvatarsPositions(positions, mNearbyList->getIDs()); - LLLocalSpeakerMgr::instance().update(TRUE); + LLActiveSpeakerMgr::instance().update(TRUE); } void LLPanelPeople::updateRecentList() @@ -743,7 +750,7 @@ void LLPanelPeople::buttonSetAction(const std::string& btn_name, const commit_si bool LLPanelPeople::isFriendOnline(const LLUUID& id) { - LLAvatarList::uuid_vector_t ids = mOnlineFriendList->getIDs(); + uuid_vec_t ids = mOnlineFriendList->getIDs(); return std::find(ids.begin(), ids.end(), id) != ids.end(); } @@ -756,7 +763,7 @@ void LLPanelPeople::updateButtons() //bool recent_tab_active = (cur_tab == RECENT_TAB_NAME); LLUUID selected_id; - std::vector<LLUUID> selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); bool item_selected = (selected_uuids.size() == 1); bool multiple_selected = (selected_uuids.size() >= 1); @@ -852,7 +859,7 @@ LLUUID LLPanelPeople::getCurrentItemID() const return LLUUID::null; } -void LLPanelPeople::getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const +void LLPanelPeople::getCurrentItemIDs(uuid_vec_t& selected_uuids) const { std::string cur_tab = getActiveTabName(); @@ -1063,10 +1070,10 @@ void LLPanelPeople::onAddFriendButtonClicked() } } -bool LLPanelPeople::isItemsFreeOfFriends(const std::vector<LLUUID>& uuids) +bool LLPanelPeople::isItemsFreeOfFriends(const uuid_vec_t& uuids) { const LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); - for ( std::vector<LLUUID>::const_iterator + for ( uuid_vec_t::const_iterator id = uuids.begin(), id_end = uuids.end(); id != id_end; ++id ) @@ -1094,7 +1101,7 @@ void LLPanelPeople::onAddFriendWizButtonClicked() void LLPanelPeople::onDeleteFriendButtonClicked() { - std::vector<LLUUID> selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if (selected_uuids.size() == 1) @@ -1121,7 +1128,7 @@ void LLPanelPeople::onChatButtonClicked() void LLPanelPeople::onImButtonClicked() { - std::vector<LLUUID> selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if ( selected_uuids.size() == 1 ) { @@ -1143,7 +1150,7 @@ void LLPanelPeople::onActivateButtonClicked() // static void LLPanelPeople::onAvatarPicked( const std::vector<std::string>& names, - const std::vector<LLUUID>& ids) + const uuid_vec_t& ids) { if (!names.empty() && !ids.empty()) LLAvatarActions::requestFriendshipDialog(ids[0], names[0]); @@ -1293,7 +1300,7 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) void LLPanelPeople::onCallButtonClicked() { - std::vector<LLUUID> selected_uuids; + uuid_vec_t selected_uuids; getCurrentItemIDs(selected_uuids); if (selected_uuids.size() == 1) diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index 6d3d436156..891381e2de 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -78,12 +78,12 @@ private: void updateRecentList(); bool isFriendOnline(const LLUUID& id); - bool isItemsFreeOfFriends(const std::vector<LLUUID>& uuids); + bool isItemsFreeOfFriends(const uuid_vec_t& uuids); void updateButtons(); std::string getActiveTabName() const; LLUUID getCurrentItemID() const; - void getCurrentItemIDs(std::vector<LLUUID>& selected_uuids) const; + void getCurrentItemIDs(uuid_vec_t& selected_uuids) const; void buttonSetVisible(std::string btn_name, BOOL visible); void buttonSetEnabled(const std::string& btn_name, bool enabled); void buttonSetAction(const std::string& btn_name, const commit_signal_t::slot_type& cb); @@ -134,7 +134,7 @@ private: // misc callbacks static void onAvatarPicked( const std::vector<std::string>& names, - const std::vector<LLUUID>& ids); + const uuid_vec_t& ids); void onFriendsAccordionExpandedCollapsed(LLUICtrl* ctrl, const LLSD& param, LLAvatarList* avatar_list); diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 854651cd01..862e32cca8 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -72,7 +72,7 @@ ContextMenu::~ContextMenu() } } -void ContextMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) +void ContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) { if (mMenu) { @@ -177,7 +177,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) bool result = (mUUIDs.size() > 0); - std::vector<LLUUID>::const_iterator + uuid_vec_t::const_iterator id = mUUIDs.begin(), uuids_end = mUUIDs.end(); @@ -200,7 +200,7 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) bool result = (mUUIDs.size() > 0); - std::vector<LLUUID>::const_iterator + uuid_vec_t::const_iterator id = mUUIDs.begin(), uuids_end = mUUIDs.end(); @@ -226,6 +226,11 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id)) || gAgent.isGodlike(); } + else if(item == std::string("can_offer_teleport")) + { + const LLUUID& id = mUUIDs.front(); + return LLAvatarActions::canOfferTeleport(id); + } return false; } diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 913638d8c8..8e12710afc 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -52,7 +52,7 @@ public: * * @param uuids - an array of avatar or group ids */ - /*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y); + /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); virtual void hide(); @@ -60,7 +60,7 @@ protected: virtual LLContextMenu* createMenu() = 0; - std::vector<LLUUID> mUUIDs; + uuid_vec_t mUUIDs; LLContextMenu* mMenu; LLHandle<LLView> mMenuHandle; }; diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 01b6e8ffad..71d16a08b4 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -195,8 +195,8 @@ void LLPanelPermissions::disableAll() childSetEnabled("Owner Name", FALSE); childSetEnabled("Group:", FALSE); - childSetText("Group Name", LLStringUtil::null); - childSetEnabled("Group Name", FALSE); + childSetText("Group Name Proxy", LLStringUtil::null); + childSetEnabled("Group Name Proxy", FALSE); childSetEnabled("button set group", FALSE); childSetText("Object Name", LLStringUtil::null); diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 6f920cf4b9..bde8d02885 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -288,7 +288,8 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) LLAvatarClassifieds* c_info = static_cast<LLAvatarClassifieds*>(data); if(c_info && getAvatarId() == c_info->target_id) { - mClassifiedsList->clear(); + // do not clear classified list in case we will receive two or more data packets. + // list has been cleared in updateData(). (fix for EXT-6436) LLAvatarClassifieds::classifieds_list_t::const_iterator it = c_info->classifieds_list.begin(); for(; c_info->classifieds_list.end() != it; ++it) diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index b4bf2125cc..17784c31e3 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -252,6 +252,9 @@ BOOL LLPanelPlaces::postBuild() mOverflowBtn = getChild<LLButton>("overflow_btn"); mOverflowBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onOverflowButtonClicked, this)); + mPlaceInfoBtn = getChild<LLButton>("profile_btn"); + mPlaceInfoBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onProfileButtonClicked, this)); + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Places.OverflowMenu.Action", boost::bind(&LLPanelPlaces::onOverflowMenuItemClicked, this, _2)); LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; @@ -745,6 +748,14 @@ void LLPanelPlaces::onOverflowButtonClicked() LLMenuGL::showPopup(this, menu, rect.mRight, rect.mTop); } +void LLPanelPlaces::onProfileButtonClicked() +{ + if (!mActivePanel) + return; + + mActivePanel->onShowProfile(); +} + bool LLPanelPlaces::onOverflowMenuItemEnable(const LLSD& param) { std::string value = param.asString(); @@ -1008,9 +1019,9 @@ void LLPanelPlaces::changedGlobalPos(const LLVector3d &global_pos) updateVerbs(); } -void LLPanelPlaces::showAddedLandmarkInfo(const std::vector<LLUUID>& items) +void LLPanelPlaces::showAddedLandmarkInfo(const uuid_vec_t& items) { - for (std::vector<LLUUID>::const_iterator item_iter = items.begin(); + for (uuid_vec_t::const_iterator item_iter = items.begin(); item_iter != items.end(); ++item_iter) { @@ -1060,8 +1071,11 @@ void LLPanelPlaces::updateVerbs() mSaveBtn->setVisible(isLandmarkEditModeOn); mCancelBtn->setVisible(isLandmarkEditModeOn); mCloseBtn->setVisible(is_create_landmark_visible && !isLandmarkEditModeOn); + mPlaceInfoBtn->setVisible(mPlaceInfoType != LANDMARK_INFO_TYPE && mPlaceInfoType != TELEPORT_HISTORY_INFO_TYPE + && !is_create_landmark_visible && !isLandmarkEditModeOn); mShowOnMapBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); + mPlaceInfoBtn->setEnabled(!is_create_landmark_visible && !isLandmarkEditModeOn && have_3d_pos); if (is_place_info_visible) { diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 78fcbbb11d..7a77fc9300 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -73,7 +73,7 @@ public: void changedGlobalPos(const LLVector3d &global_pos); // Opens landmark info panel when agent creates or receives landmark. - void showAddedLandmarkInfo(const std::vector<LLUUID>& items); + void showAddedLandmarkInfo(const uuid_vec_t& items); void setItem(LLInventoryItem* item); @@ -98,6 +98,7 @@ private: bool onOverflowMenuItemEnable(const LLSD& param); void onCreateLandmarkButtonClicked(const LLUUID& folder_id); void onBackButtonClicked(); + void onProfileButtonClicked(); void toggleMediaPanel(); void togglePickPanel(BOOL visible); @@ -128,6 +129,7 @@ private: LLButton* mCancelBtn; LLButton* mCloseBtn; LLButton* mOverflowBtn; + LLButton* mPlaceInfoBtn; LLPlacesInventoryObserver* mInventoryObserver; LLPlacesParcelObserver* mParcelObserver; diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 9806b8c64d..42cf3b03a3 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -56,6 +56,7 @@ void LLPanelPlacesTab::setPanelPlacesButtons(LLPanelPlaces* panel) { mTeleportBtn = panel->getChild<LLButton>("teleport_btn"); mShowOnMapBtn = panel->getChild<LLButton>("map_btn"); + mShowProfile = panel->getChild<LLButton>("profile_btn"); } void LLPanelPlacesTab::onRegionResponse(const LLVector3d& landmark_global_pos, diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index ce77a42259..f4e93a7658 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -45,6 +45,7 @@ public: virtual void onSearchEdit(const std::string& string) = 0; virtual void updateVerbs() = 0; // Updates buttons at the bottom of Places panel virtual void onShowOnMap() = 0; + virtual void onShowProfile() = 0; virtual void onTeleport() = 0; bool isTabVisible(); // Check if parent TabContainer is visible. @@ -62,6 +63,7 @@ public: protected: LLButton* mTeleportBtn; LLButton* mShowOnMapBtn; + LLButton* mShowProfile; // Search string for filtering landmarks and teleport history locations static std::string sFilterSubString; diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index a53a3ba1ad..0648d99685 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -31,8 +31,8 @@ #include "llviewerprecompiledheaders.h" -//LLPanelPrimMediaControls #include "llagent.h" +#include "llagentcamera.h" #include "llparcel.h" #include "llpanel.h" #include "llselectmgr.h" @@ -64,7 +64,6 @@ #include "llvovolume.h" #include "llweb.h" #include "llwindow.h" - #include "llfloatertools.h" // to enable hide if build tools are up // Functions pulled from pipeline.cpp @@ -351,6 +350,11 @@ void LLPanelPrimMediaControls::updateShape() mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; + mVolumeCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); + mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); + if(media_plugin && media_plugin->pluginSupportsMediaTime()) { mReloadCtrl->setEnabled(false); @@ -463,11 +467,15 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); - mVolumeCtrl->setVisible(FALSE); - mVolumeSliderCtrl->setVisible(FALSE); - mVolumeCtrl->setEnabled(FALSE); - mVolumeSliderCtrl->setEnabled(FALSE); - + if(media_impl->getVolume() <= 0.0) + { + mMuteBtn->setToggleState(true); + } + else + { + mMuteBtn->setToggleState(false); + } + if (mMediaPanelScroll) { mMediaPanelScroll->setVisible(has_focus); @@ -1010,7 +1018,7 @@ void LLPanelPrimMediaControls::updateZoom() { case ZOOM_NONE: { - gAgent.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); break; } case ZOOM_FAR: @@ -1030,7 +1038,7 @@ void LLPanelPrimMediaControls::updateZoom() } default: { - gAgent.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); break; } } diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 90c8f2551f..c0b2244038 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -348,7 +348,7 @@ LLContextMenu* LLTeleportHistoryPanel::ContextMenu::createMenu() void LLTeleportHistoryPanel::ContextMenu::onTeleport() { - LLTeleportHistoryStorage::getInstance()->goToItem(mIndex); + confirmTeleport(mIndex); } void LLTeleportHistoryPanel::ContextMenu::onInfo() @@ -496,6 +496,20 @@ void LLTeleportHistoryPanel::onShowOnMap() } } +//virtual +void LLTeleportHistoryPanel::onShowProfile() +{ + if (!mLastSelectedFlatlList) + return; + + LLTeleportHistoryFlatItem* itemp = dynamic_cast<LLTeleportHistoryFlatItem *> (mLastSelectedFlatlList->getSelectedItem()); + + if(!itemp) + return; + + LLTeleportHistoryFlatItem::showPlaceInfoPanel(itemp->getIndex()); +} + // virtual void LLTeleportHistoryPanel::onTeleport() { @@ -507,7 +521,7 @@ void LLTeleportHistoryPanel::onTeleport() return; // teleport to existing item in history, so we don't add it again - mTeleportHistory->goToItem(itemp->getIndex()); + confirmTeleport(itemp->getIndex()); } /* @@ -544,6 +558,7 @@ void LLTeleportHistoryPanel::updateVerbs() { mTeleportBtn->setEnabled(false); mShowOnMapBtn->setEnabled(false); + mShowProfile->setEnabled(false); return; } @@ -551,6 +566,7 @@ void LLTeleportHistoryPanel::updateVerbs() mTeleportBtn->setEnabled(NULL != itemp); mShowOnMapBtn->setEnabled(NULL != itemp); + mShowProfile->setEnabled(NULL != itemp); } void LLTeleportHistoryPanel::getNextTab(const LLDate& item_date, S32& tab_idx, LLDate& tab_date) @@ -1058,3 +1074,27 @@ void LLTeleportHistoryPanel::onAccordionExpand(LLUICtrl* ctrl, const LLSD& param mLastSelectedFlatlList->resetSelection(); } } + +// static +void LLTeleportHistoryPanel::confirmTeleport(S32 hist_idx) +{ + LLSD args; + args["HISTORY_ENTRY"] = LLTeleportHistoryStorage::getInstance()->getItems()[hist_idx].mTitle; + LLNotificationsUtil::add("TeleportToHistoryEntry", args, LLSD(), + boost::bind(&LLTeleportHistoryPanel::onTeleportConfirmation, _1, _2, hist_idx)); +} + +// Called when user reacts upon teleport confirmation dialog. +// static +bool LLTeleportHistoryPanel::onTeleportConfirmation(const LLSD& notification, const LLSD& response, S32 hist_idx) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (0 == option) + { + // Teleport to given history item. + LLTeleportHistoryStorage::getInstance()->goToItem(hist_idx); + } + + return false; +} diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 4eeaec7705..a456ca506f 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -73,6 +73,7 @@ public: /*virtual*/ void onSearchEdit(const std::string& string); /*virtual*/ void onShowOnMap(); + /*virtual*/ void onShowProfile(); /*virtual*/ void onTeleport(); ///*virtual*/ void onCopySLURL(); /*virtual*/ void updateVerbs(); @@ -103,6 +104,9 @@ private: bool isAccordionCollapsedByUser(LLUICtrl* acc_tab); void onAccordionExpand(LLUICtrl* ctrl, const LLSD& param); + static void confirmTeleport(S32 hist_idx); + static bool onTeleportConfirmation(const LLSD& notification, const LLSD& response, S32 hist_idx); + LLTeleportHistoryStorage* mTeleportHistory; LLAccordionCtrl* mHistoryAccordion; diff --git a/indra/newview/llpaneltiptoast.cpp b/indra/newview/llpaneltiptoast.cpp new file mode 100644 index 0000000000..23367df41a --- /dev/null +++ b/indra/newview/llpaneltiptoast.cpp @@ -0,0 +1,69 @@ +/** + * @file llpaneltiptoast.cpp + * @brief Represents a base class of tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llpaneltiptoast.h" + +BOOL LLPanelTipToast::postBuild() +{ + mMessageText= findChild<LLUICtrl>("message"); + + if (mMessageText != NULL) + { + mMessageText->setMouseUpCallback(boost::bind(&LLPanelTipToast::onMessageTextClick,this)); + setMouseUpCallback(boost::bind(&LLPanelTipToast::onPanelClick, this, _2, _3, _4)); + } + else + { + llassert(!"Can't find child 'message' text box."); + return FALSE; + } + + return TRUE; +} + +void LLPanelTipToast::onMessageTextClick() +{ + // notify parent toast about need hide + LLSD info; + info["action"] = "hide_toast"; + notifyParent(info); +} + +void LLPanelTipToast::onPanelClick(S32 x, S32 y, MASK mask) +{ + if (!mMessageText->getRect().pointInRect(x, y)) + { + onMessageTextClick(); + } +} diff --git a/indra/newview/llpaneltiptoast.h b/indra/newview/llpaneltiptoast.h new file mode 100644 index 0000000000..e8678aa1d3 --- /dev/null +++ b/indra/newview/llpaneltiptoast.h @@ -0,0 +1,57 @@ +/** + * @file llpaneltiptoast.h + * @brief Represents a base class of tip toast panels. + * + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#include "lltoastpanel.h" + +#ifndef LL_PANELTOASTTIP_H +#define LL_PANELTOASTTIP_H + +/** + * Base class for tip toast panels. + * + * Tip toast panels are required to have text message box named as 'message'. + */ +class LLPanelTipToast : public LLToastPanel +{ + LOG_CLASS(LLPanelTipToast); +public: + LLPanelTipToast(const LLNotificationPtr& notification): LLToastPanel(notification) {} + virtual BOOL postBuild(); +private: + void onMessageTextClick(); + void onPanelClick(S32 x, S32 y, MASK mask); + + LLUICtrl* mMessageText; +}; + +#endif /* LL_PANELTOASTTIP_H */ diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 2748daaffa..c3748ca81d 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -39,6 +39,7 @@ #include "llparticipantlist.h" #include "llspeakers.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llvoiceclient.h" @@ -49,8 +50,147 @@ static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; +// See EXT-4301. +/** + * class LLAvalineUpdater - observe the list of voice participants in session and check + * presence of Avaline Callers among them. + * + * LLAvalineUpdater is a LLVoiceClientParticipantObserver. It provides two kinds of validation: + * - whether Avaline caller presence among participants; + * - whether watched Avaline caller still exists in voice channel. + * Both validations have callbacks which will notify subscriber if any of event occur. + * + * @see findAvalineCaller() + * @see checkIfAvalineCallersExist() + */ +class LLAvalineUpdater : public LLVoiceClientParticipantObserver +{ +public: + typedef boost::function<void(const LLUUID& speaker_id)> process_avaline_callback_t; + + LLAvalineUpdater(process_avaline_callback_t found_cb, process_avaline_callback_t removed_cb) + : mAvalineFoundCallback(found_cb) + , mAvalineRemovedCallback(removed_cb) + { + LLVoiceClient::getInstance()->addObserver(this); + } + ~LLAvalineUpdater() + { + if (LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->removeObserver(this); + } + } + + /** + * Adds UUID of Avaline caller to watch. + * + * @see checkIfAvalineCallersExist(). + */ + void watchAvalineCaller(const LLUUID& avaline_caller_id) + { + mAvalineCallers.insert(avaline_caller_id); + } + + void onChange() + { + uuid_set_t participant_uuids; + LLVoiceClient::getInstance()->getParticipantsUUIDSet(participant_uuids); + + + // check whether Avaline caller exists among voice participants + // and notify Participant List + findAvalineCaller(participant_uuids); + + // check whether watched Avaline callers still present among voice participant + // and remove if absents. + checkIfAvalineCallersExist(participant_uuids); + } + +private: + typedef std::set<LLUUID> uuid_set_t; + + /** + * Finds Avaline callers among voice participants and calls mAvalineFoundCallback. + * + * When Avatar is in group call with Avaline caller and then ends call Avaline caller stays + * in Group Chat floater (exists in LLSpeakerMgr). If Avatar starts call with that group again + * Avaline caller is added to voice channel AFTER Avatar is connected to group call. + * But Voice Control Panel (VCP) is filled from session LLSpeakerMgr and there is no information + * if a speaker is Avaline caller. + * + * In this case this speaker is created as avatar and will be recreated when it appears in + * Avatar's Voice session. + * + * @see LLParticipantList::onAvalineCallerFound() + */ + void findAvalineCaller(const uuid_set_t& participant_uuids) + { + uuid_set_t::const_iterator it = participant_uuids.begin(), it_end = participant_uuids.end(); + + for(; it != it_end; ++it) + { + const LLUUID& participant_id = *it; + if (!LLVoiceClient::getInstance()->isParticipantAvatar(participant_id)) + { + LL_DEBUGS("Avaline") << "Avaline caller found among voice participants: " << participant_id << LL_ENDL; + + if (mAvalineFoundCallback) + { + mAvalineFoundCallback(participant_id); + } + } + } + } + + /** + * Finds Avaline callers which are not anymore among voice participants and calls mAvalineRemovedCallback. + * + * The problem is when Avaline caller ends a call it is removed from Voice Client session but + * still exists in LLSpeakerMgr. Server does not send such information. + * This method implements a HUCK to notify subscribers that watched Avaline callers by class + * are not anymore in the call. + * + * @see LLParticipantList::onAvalineCallerRemoved() + */ + void checkIfAvalineCallersExist(const uuid_set_t& participant_uuids) + { + uuid_set_t::iterator it = mAvalineCallers.begin(); + uuid_set_t::const_iterator participants_it_end = participant_uuids.end(); + + while (it != mAvalineCallers.end()) + { + const LLUUID participant_id = *it; + LL_DEBUGS("Avaline") << "Check avaline caller: " << participant_id << LL_ENDL; + bool not_found = participant_uuids.find(participant_id) == participants_it_end; + if (not_found) + { + LL_DEBUGS("Avaline") << "Watched Avaline caller is not found among voice participants: " << participant_id << LL_ENDL; + + // notify Participant List + if (mAvalineRemovedCallback) + { + mAvalineRemovedCallback(participant_id); + } + + // remove from the watch list + mAvalineCallers.erase(it++); + } + else + { + ++it; + } + } + } + + process_avaline_callback_t mAvalineFoundCallback; + process_avaline_callback_t mAvalineRemovedCallback; + + uuid_set_t mAvalineCallers; +}; + LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/, - bool exclude_agent /*= true*/): + bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), mSortOrder(E_SORT_BY_NAME) @@ -58,6 +198,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av , mExcludeAgent(exclude_agent) , mValidateSpeakerCallback(NULL) { + mAvalineUpdater = new LLAvalineUpdater(boost::bind(&LLParticipantList::onAvalineCallerFound, this, _1), + boost::bind(&LLParticipantList::onAvalineCallerRemoved, this, _1)); + mSpeakerAddListener = new SpeakerAddListener(*this); mSpeakerRemoveListener = new SpeakerRemoveListener(*this); mSpeakerClearListener = new SpeakerClearListener(*this); @@ -87,6 +230,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->setContextMenu(NULL); } + if (use_context_menu && can_toggle_icons) + { + mAvatarList->setShowIcons("ParticipantListShowIcons"); + mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); + } + //Lets fill avatarList with existing speakers LLSpeakerMgr::speaker_list_t speaker_list; mSpeakerMgr->getSpeakerList(&speaker_list, true); @@ -113,6 +262,7 @@ LLParticipantList::~LLParticipantList() mAvatarListDoubleClickConnection.disconnect(); mAvatarListRefreshConnection.disconnect(); mAvatarListReturnConnection.disconnect(); + mAvatarListToggleIconsConnection.disconnect(); // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() // See ticket EXT-3427 @@ -129,6 +279,9 @@ LLParticipantList::~LLParticipantList() } mAvatarList->setContextMenu(NULL); + mAvatarList->setComparator(NULL); + + delete mAvalineUpdater; } void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible) @@ -202,6 +355,55 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) } } +/* +Seems this method is not necessary after onAvalineCallerRemoved was implemented; + +It does nothing because list item is always created with correct class type for Avaline caller. +For now Avaline Caller is removed from the LLSpeakerMgr List when it is removed from the Voice Client +session. +This happens in two cases: if Avaline Caller ends call itself or if Resident ends group call. + +Probably Avaline caller should be removed from the LLSpeakerMgr list ONLY if it ends call itself. +Asked in EXT-4301. +*/ +void LLParticipantList::onAvalineCallerFound(const LLUUID& participant_id) +{ + LLPanel* item = mAvatarList->getItemByValue(participant_id); + + if (NULL == item) + { + LL_WARNS("Avaline") << "Something wrong. Unable to find item for: " << participant_id << LL_ENDL; + return; + } + + if (typeid(*item) == typeid(LLAvalineListItem)) + { + LL_DEBUGS("Avaline") << "Avaline caller has already correct class type for: " << participant_id << LL_ENDL; + // item representing an Avaline caller has a correct type already. + return; + } + + LL_DEBUGS("Avaline") << "remove item from the list and re-add it: " << participant_id << LL_ENDL; + + // remove UUID from LLAvatarList::mIDs to be able add it again. + uuid_vec_t& ids = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(ids.begin(), ids.end(), participant_id); + ids.erase(pos); + + // remove item directly + mAvatarList->removeItem(item); + + // re-add avaline caller with a correct class instance. + addAvatarIDExceptAgent(participant_id); +} + +void LLParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id) +{ + LL_DEBUGS("Avaline") << "Removing avaline caller from the list: " << participant_id << LL_ENDL; + + mSpeakerMgr->removeAvalineSpeaker(participant_id); +} + void LLParticipantList::setSortOrder(EParticipantSortOrder order) { if ( mSortOrder != order ) @@ -248,8 +450,8 @@ bool LLParticipantList::onAddItemEvent(LLPointer<LLOldEvents::LLEvent> event, co bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); - LLAvatarList::uuid_vector_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); + uuid_vec_t& group_members = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(group_members.begin(), group_members.end(), event->getValue().asUUID()); if(pos != group_members.end()) { group_members.erase(pos); @@ -260,7 +462,7 @@ bool LLParticipantList::onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, bool LLParticipantList::onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) { - LLAvatarList::uuid_vector_t& group_members = mAvatarList->getIDs(); + uuid_vec_t& group_members = mAvatarList->getIDs(); group_members.clear(); mAvatarList->setDirty(); return true; @@ -347,8 +549,20 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) if (mExcludeAgent && gAgent.getID() == avatar_id) return; if (mAvatarList->contains(avatar_id)) return; - mAvatarList->getIDs().push_back(avatar_id); - mAvatarList->setDirty(); + bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(avatar_id); + + if (is_avatar) + { + mAvatarList->getIDs().push_back(avatar_id); + mAvatarList->setDirty(); + } + else + { + LLVoiceClient::participantState *participant = LLVoiceClient::getInstance()->findParticipantByID(avatar_id); + + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), participant ? participant->mAccountName : LLTrans::getString("AvatarNameWaiting")); + mAvalineUpdater->watchAvalineCaller(avatar_id); + } adjustParticipant(avatar_id); } @@ -429,6 +643,7 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() registrar.add("ParticipantList.ModerateVoice", boost::bind(&LLParticipantList::LLParticipantListMenu::moderateVoice, this, _2)); enable_registrar.add("ParticipantList.EnableItem", boost::bind(&LLParticipantList::LLParticipantListMenu::enableContextMenuItem, this, _2)); + enable_registrar.add("ParticipantList.EnableItem.Moderate", boost::bind(&LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem, this, _2)); enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI @@ -440,18 +655,20 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() main_menu->setItemVisible("SortByName", is_sort_visible); main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible); main_menu->setItemVisible("Moderator Options", isGroupModerator()); + main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected()); + main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected()); main_menu->arrangeAndClear(); return main_menu; } -void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) +void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y) { LLPanelPeopleMenus::ContextMenu::show(spawning_view, uuids, x, y); if (uuids.size() == 0) return; - const LLUUID speaker_id = mUUIDs.front(); + const LLUUID& speaker_id = mUUIDs.front(); BOOL is_muted = isMuted(speaker_id); if (is_muted) @@ -585,28 +802,18 @@ void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(co bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); + const LLUUID& participant_id = mUUIDs.front(); + + // For now non of "can_view_profile" action and menu actions listed below except "can_block" + // can be performed for Avaline callers. + bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); + if (!is_participant_avatar && "can_block" != item) return false; + if (item == "can_mute_text" || "can_block" == item || "can_share" == item || "can_im" == item || "can_pay" == item) { return mUUIDs.front() != gAgentID; } - else if (item == "can_allow_text_chat") - { - return isGroupModerator(); - } - else if ("can_moderate_voice" == item) - { - if (isGroupModerator()) - { - LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(mUUIDs.front()); - if (speakerp.notNull()) - { - // not in voice participants can not be moderated - return speakerp->isInVoiceChannel(); - } - } - return false; - } else if (item == std::string("can_add")) { // We can add friends if: @@ -615,7 +822,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& bool result = (mUUIDs.size() > 0); - std::vector<LLUUID>::const_iterator + uuid_vec_t::const_iterator id = mUUIDs.begin(), uuids_end = mUUIDs.end(); @@ -632,13 +839,43 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_call") { bool not_agent = mUUIDs.front() != gAgentID; - bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + bool can_call = not_agent && LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking(); return can_call; } return true; } +/* +Processed menu items with such parameters: + can_allow_text_chat + can_moderate_voice +*/ +bool LLParticipantList::LLParticipantListMenu::enableModerateContextMenuItem(const LLSD& userdata) +{ + // only group moderators can perform actions related to this "enable callback" + if (!isGroupModerator()) return false; + + const LLUUID& participant_id = mUUIDs.front(); + LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(participant_id); + + // not in voice participants can not be moderated + bool speaker_in_voice = speakerp.notNull() && speakerp->isInVoiceChannel(); + + const std::string& item = userdata.asString(); + + if ("can_moderate_voice" == item) + { + return speaker_in_voice; + } + + // For now non of menu actions except "can_moderate_voice" can be performed for Avaline callers. + bool is_participant_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(participant_id); + if (!is_participant_avatar) return false; + + return true; +} + bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& userdata) { std::string item = userdata.asString(); diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index e1b1b5af00..bbef8baaac 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -38,6 +38,7 @@ class LLSpeakerMgr; class LLAvatarList; class LLUICtrl; +class LLAvalineUpdater; class LLParticipantList { @@ -46,7 +47,7 @@ class LLParticipantList typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true); + LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); ~LLParticipantList(); void setSpeakingIndicatorsVisible(BOOL visible); @@ -152,11 +153,12 @@ class LLParticipantList public: LLParticipantListMenu(LLParticipantList& parent):mParent(parent){}; /*virtual*/ LLContextMenu* createMenu(); - /*virtual*/ void show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y); + /*virtual*/ void show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y); protected: LLParticipantList& mParent; private: bool enableContextMenuItem(const LLSD& userdata); + bool enableModerateContextMenuItem(const LLSD& userdata); bool checkContextMenuItem(const LLSD& userdata); void sortParticipantList(const LLSD& userdata); @@ -235,6 +237,9 @@ class LLParticipantList void onAvatarListDoubleClicked(LLUICtrl* ctrl); void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); + void onAvalineCallerFound(const LLUUID& participant_id); + void onAvalineCallerRemoved(const LLUUID& participant_id); + /** * Adjusts passed participant to work properly. * @@ -268,7 +273,9 @@ class LLParticipantList boost::signals2::connection mAvatarListDoubleClickConnection; boost::signals2::connection mAvatarListRefreshConnection; boost::signals2::connection mAvatarListReturnConnection; + boost::signals2::connection mAvatarListToggleIconsConnection; LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; + LLAvalineUpdater* mAvalineUpdater; }; diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index 4fe69f295c..f59a55cb8b 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -122,7 +122,7 @@ void LLPlacesFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } //virtual -void LLPlacesFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* model, std::string action) +void LLPlacesFolderBridge::performAction(LLInventoryModel* model, std::string action) { if ("expand" == action) { @@ -136,7 +136,7 @@ void LLPlacesFolderBridge::performAction(LLFolderView* folder, LLInventoryModel* } else { - LLFolderBridge::performAction(folder, model, action); + LLFolderBridge::performAction(model, action); } } @@ -158,6 +158,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( LLAssetType::EType actual_asset_type, LLInventoryType::EType inv_type, LLInventoryPanel* inventory, + LLFolderView* root, const LLUUID& uuid, U32 flags/* = 0x00*/) const { @@ -167,9 +168,9 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( case LLAssetType::AT_LANDMARK: if(!(inv_type == LLInventoryType::IT_LANDMARK)) { - llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << safe_inv_type_lookup(inv_type) << " on uuid " << uuid << llendl; + llwarns << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << llendl; } - new_listener = new LLPlacesLandmarkBridge(inv_type, inventory, uuid, flags); + new_listener = new LLPlacesLandmarkBridge(inv_type, inventory, root, uuid, flags); break; case LLAssetType::AT_CATEGORY: if (actual_asset_type == LLAssetType::AT_LINK_FOLDER) @@ -180,11 +181,12 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( actual_asset_type, inv_type, inventory, + root, uuid, flags); break; } - new_listener = new LLPlacesFolderBridge(inv_type, inventory, uuid); + new_listener = new LLPlacesFolderBridge(inv_type, inventory, root, uuid); break; default: new_listener = LLInventoryFVBridgeBuilder::createBridge( @@ -192,6 +194,7 @@ LLInvFVBridge* LLPlacesInventoryBridgeBuilder::createBridge( actual_asset_type, inv_type, inventory, + root, uuid, flags); } diff --git a/indra/newview/llplacesinventorybridge.h b/indra/newview/llplacesinventorybridge.h index 66a8e8e54d..7e5170cc33 100644 --- a/indra/newview/llplacesinventorybridge.h +++ b/indra/newview/llplacesinventorybridge.h @@ -48,8 +48,15 @@ public: /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); protected: - LLPlacesLandmarkBridge(LLInventoryType::EType type, LLInventoryPanel* inventory, const LLUUID& uuid, U32 flags = 0x00) - : LLLandmarkBridge(inventory, uuid, flags) {mInvType = type;} + LLPlacesLandmarkBridge(LLInventoryType::EType type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) : + LLLandmarkBridge(inventory, root, uuid, flags) + { + mInvType = type; + } }; /** @@ -61,12 +68,17 @@ class LLPlacesFolderBridge : public LLFolderBridge public: /*virtual*/ void buildContextMenu(LLMenuGL& menu, U32 flags); - /*virtual*/ void performAction(LLFolderView* folder, LLInventoryModel* model, std::string action); + /*virtual*/ void performAction(LLInventoryModel* model, std::string action); protected: - LLPlacesFolderBridge(LLInventoryType::EType type, LLInventoryPanel* inventory, const LLUUID& uuid) - : LLFolderBridge(inventory, uuid) {mInvType = type;} - + LLPlacesFolderBridge(LLInventoryType::EType type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid) : + LLFolderBridge(inventory, root, uuid) + { + mInvType = type; + } LLFolderViewFolder* getFolder(); }; @@ -79,13 +91,13 @@ protected: class LLPlacesInventoryBridgeBuilder : public LLInventoryFVBridgeBuilder { public: - /*virtual*/ LLInvFVBridge* createBridge( - LLAssetType::EType asset_type, - LLAssetType::EType actual_asset_type, - LLInventoryType::EType inv_type, - LLInventoryPanel* inventory, - const LLUUID& uuid, - U32 flags = 0x00) const; + /*virtual*/ LLInvFVBridge* createBridge(LLAssetType::EType asset_type, + LLAssetType::EType actual_asset_type, + LLInventoryType::EType inv_type, + LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + U32 flags = 0x00) const; }; #endif // LL_LLPLACESINVENTORYBRIDGE_H diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index ed0fb54051..0930a7be7f 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -68,9 +68,9 @@ BOOL LLPlacesInventoryPanel::postBuild() // clear Contents(); { - mFolders->destroyView(); - mFolders->getParent()->removeChild(mFolders); - mFolders->die(); + mFolderRoot->destroyView(); + mFolderRoot->getParent()->removeChild(mFolderRoot); + mFolderRoot->die(); if( mScroller ) { @@ -78,7 +78,7 @@ BOOL LLPlacesInventoryPanel::postBuild() mScroller->die(); mScroller = NULL; } - mFolders = NULL; + mFolderRoot = NULL; } @@ -95,13 +95,13 @@ BOOL LLPlacesInventoryPanel::postBuild() p.title = getLabel(); p.rect = folder_rect; p.parent_panel = this; - mFolders = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p); - mFolders->setAllowMultiSelect(mAllowMultiSelect); + mFolderRoot = (LLFolderView*)LLUICtrlFactory::create<LLPlacesFolderView>(p); + mFolderRoot->setAllowMultiSelect(mAllowMultiSelect); } mCommitCallbackRegistrar.popScope(); - mFolders->setCallbackRegistrar(&mCommitCallbackRegistrar); + mFolderRoot->setCallbackRegistrar(&mCommitCallbackRegistrar); // scroller { @@ -116,14 +116,14 @@ BOOL LLPlacesInventoryPanel::postBuild() mScroller = LLUICtrlFactory::create<LLScrollContainer>(p); } addChild(mScroller); - mScroller->addChild(mFolders); + mScroller->addChild(mFolderRoot); - mFolders->setScrollContainer(mScroller); - mFolders->addChild(mFolders->mStatusTextBox); + mFolderRoot->setScrollContainer(mScroller); + mFolderRoot->addChild(mFolderRoot->mStatusTextBox); // cut subitems - mFolders->setUseEllipses(true); + mFolderRoot->setUseEllipses(true); return TRUE; } @@ -132,17 +132,17 @@ BOOL LLPlacesInventoryPanel::postBuild() void LLPlacesInventoryPanel::saveFolderState() { mSavedFolderState->setApply(FALSE); - getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + mFolderRoot->applyFunctorRecursively(*mSavedFolderState); } // re-open folders which state was saved void LLPlacesInventoryPanel::restoreFolderState() { mSavedFolderState->setApply(TRUE); - getRootFolder()->applyFunctorRecursively(*mSavedFolderState); + mFolderRoot->applyFunctorRecursively(*mSavedFolderState); LLOpenFoldersWithSelection opener; - getRootFolder()->applyFunctorRecursively(opener); - getRootFolder()->scrollToShowSelection(); + mFolderRoot->applyFunctorRecursively(opener); + mFolderRoot->scrollToShowSelection(); } S32 LLPlacesInventoryPanel::notify(const LLSD& info) @@ -152,11 +152,11 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info) std::string str_action = info["action"]; if(str_action == "select_first") { - return getRootFolder()->notify(info); + return mFolderRoot->notify(info); } else if(str_action == "select_last") { - return getRootFolder()->notify(info); + return mFolderRoot->notify(info); } } return 0; diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 0b0c03e9e9..dd31a62642 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -36,7 +36,7 @@ #include "llpreview.h" #include "lllineeditor.h" -#include "llinventory.h" +#include "llinventorydefines.h" #include "llinventorymodel.h" #include "llresmgr.h" #include "lltextbox.h" @@ -138,7 +138,7 @@ void LLPreview::onCommit() const LLViewerInventoryItem *item = dynamic_cast<const LLViewerInventoryItem*>(getItem()); if(item) { - if (!item->isComplete()) + if (!item->isFinished()) { // We are attempting to save an item that was never loaded llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE" @@ -179,10 +179,9 @@ void LLPreview::onCommit() // update the object itself. if( item->getType() == LLAssetType::AT_OBJECT ) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar ) + if (isAgentAvatarValid()) { - LLViewerObject* obj = avatar->getWornAttachment( item->getUUID() ); + LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() ); if( obj ) { LLSelectMgr::getInstance()->deselectAll(); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 0cc747f789..262961b73b 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -71,7 +71,7 @@ BOOL LLPreviewAnim::postBuild() const LLInventoryItem* item = getItem(); if(item) { - gAgent.getAvatarObject()->createMotion(item->getAssetUUID()); // preload the animation + gAgentAvatarp->createMotion(item->getAssetUUID()); // preload the animation childSetText("desc", item->getDescription()); } @@ -125,10 +125,7 @@ void LLPreviewAnim::playAnim( void *userdata ) { self->mPauseRequest = NULL; gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START); - - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLMotion* motion = avatar->findMotion(itemID); - + LLMotion* motion = gAgentAvatarp->findMotion(itemID); if (motion) { motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle()))); @@ -136,7 +133,7 @@ void LLPreviewAnim::playAnim( void *userdata ) } else { - gAgent.getAvatarObject()->stopMotion(itemID); + gAgentAvatarp->stopMotion(itemID); gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); } } @@ -161,10 +158,8 @@ void LLPreviewAnim::auditionAnim( void *userdata ) if (self->childGetValue("Anim audition btn").asBoolean() ) { self->mPauseRequest = NULL; - gAgent.getAvatarObject()->startMotion(item->getAssetUUID()); - - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLMotion* motion = avatar->findMotion(itemID); + gAgentAvatarp->startMotion(item->getAssetUUID()); + LLMotion* motion = gAgentAvatarp->findMotion(itemID); if (motion) { @@ -173,7 +168,7 @@ void LLPreviewAnim::auditionAnim( void *userdata ) } else { - gAgent.getAvatarObject()->stopMotion(itemID); + gAgentAvatarp->stopMotion(itemID); gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP); } } @@ -186,11 +181,9 @@ void LLPreviewAnim::onClose(bool app_quitting) if(item) { - gAgent.getAvatarObject()->stopMotion(item->getAssetUUID()); + gAgentAvatarp->stopMotion(item->getAssetUUID()); gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP); - - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLMotion* motion = avatar->findMotion(item->getAssetUUID()); + LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID()); if (motion) { diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 57a8ca3d12..2e061b235d 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -42,6 +42,10 @@ #include "llstring.h" #include "lldir.h" #include "llfloaterreg.h" +#include "llinventorydefines.h" +#include "llinventoryfunctions.h" +#include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llmultigesture.h" #include "llnotificationsutil.h" #include "llvfile.h" @@ -56,7 +60,6 @@ #include "lldelayedgestureerror.h" #include "llfloatergesture.h" // for some label constants #include "llgesturemgr.h" -#include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" #include "llradiogroup.h" @@ -97,7 +100,7 @@ protected: void LLInventoryGestureAvailable::done() { - for(item_ref_t::iterator it = mComplete.begin(); it != mComplete.end(); ++it) + for(uuid_vec_t::iterator it = mComplete.begin(); it != mComplete.end(); ++it) { LLPreviewGesture* preview = LLFloaterReg::findTypedInstance<LLPreviewGesture>("preview_gesture", *it); if(preview) @@ -131,14 +134,14 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob // Start speculative download of sounds and animations const LLUUID animation_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_ANIMATION); - gInventory.startBackgroundFetch(animation_folder_id); + LLInventoryModelBackgroundFetch::instance().start(animation_folder_id); const LLUUID sound_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SOUND); - gInventory.startBackgroundFetch(sound_folder_id); + LLInventoryModelBackgroundFetch::instance().start(sound_folder_id); // this will call refresh when we have everything. LLViewerInventoryItem* item = (LLViewerInventoryItem*)preview->getItem(); - if (item && !item->isComplete()) + if (item && !item->isFinished()) { LLInventoryGestureAvailable* observer; observer = new LLInventoryGestureAvailable(); @@ -269,7 +272,7 @@ BOOL LLPreviewGesture::canClose() // virtual void LLPreviewGesture::onClose(bool app_quitting) { - LLGestureManager::instance().stopGesture(mPreviewGesture); + LLGestureMgr::instance().stopGesture(mPreviewGesture); } // virtual @@ -293,13 +296,13 @@ bool LLPreviewGesture::handleSaveChangesDialog(const LLSD& notification, const L switch(option) { case 0: // "Yes" - LLGestureManager::instance().stopGesture(mPreviewGesture); + LLGestureMgr::instance().stopGesture(mPreviewGesture); mCloseAfterSave = TRUE; onClickSave(this); break; case 1: // "No" - LLGestureManager::instance().stopGesture(mPreviewGesture); + LLGestureMgr::instance().stopGesture(mPreviewGesture); mDirty = FALSE; // Force the dirty flag because user has clicked NO on confirm save dialog... closeFloater(); break; @@ -645,7 +648,7 @@ void LLPreviewGesture::refresh() LLPreview::refresh(); // If previewing or item is incomplete, all controls are disabled LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem(); - bool is_complete = (item && item->isComplete()) ? true : false; + bool is_complete = (item && item->isFinished()) ? true : false; if (mPreviewGesture || !is_complete) { @@ -784,7 +787,7 @@ void LLPreviewGesture::refresh() mOptionsText->setText(optionstext); - BOOL active = LLGestureManager::instance().isGestureActive(mItemUUID); + BOOL active = LLGestureMgr::instance().isGestureActive(mItemUUID); mActiveCheck->set(active); // Can only preview if there are steps @@ -1138,10 +1141,10 @@ void LLPreviewGesture::saveIfNeeded() // If this gesture is active, then we need to update the in-memory // active map with the new pointer. - if (!delayedUpload && LLGestureManager::instance().isGestureActive(mItemUUID)) + if (!delayedUpload && LLGestureMgr::instance().isGestureActive(mItemUUID)) { // gesture manager now owns the pointer - LLGestureManager::instance().replaceGesture(mItemUUID, gesture, asset_id); + LLGestureMgr::instance().replaceGesture(mItemUUID, gesture, asset_id); // replaceGesture may deactivate other gestures so let the // inventory know. @@ -1702,13 +1705,13 @@ void LLPreviewGesture::onClickDelete(void* data) void LLPreviewGesture::onCommitActive(LLUICtrl* ctrl, void* data) { LLPreviewGesture* self = (LLPreviewGesture*)data; - if (!LLGestureManager::instance().isGestureActive(self->mItemUUID)) + if (!LLGestureMgr::instance().isGestureActive(self->mItemUUID)) { - LLGestureManager::instance().activateGesture(self->mItemUUID); + LLGestureMgr::instance().activateGesture(self->mItemUUID); } else { - LLGestureManager::instance().deactivateGesture(self->mItemUUID); + LLGestureMgr::instance().deactivateGesture(self->mItemUUID); } // Make sure the (active) label in the inventory gets updated. @@ -1747,14 +1750,14 @@ void LLPreviewGesture::onClickPreview(void* data) self->mPreviewBtn->setLabel(self->getString("stop_txt")); // play it, and delete when done - LLGestureManager::instance().playGesture(self->mPreviewGesture); + LLGestureMgr::instance().playGesture(self->mPreviewGesture); self->refresh(); } else { // Will call onDonePreview() below - LLGestureManager::instance().stopGesture(self->mPreviewGesture); + LLGestureMgr::instance().stopGesture(self->mPreviewGesture); self->refresh(); } diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index ee8e3f1db6..75702dc8e5 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -38,9 +38,11 @@ #include "llagent.h" #include "llassetuploadresponders.h" +#include "lldraghandle.h" #include "llviewerwindow.h" #include "llbutton.h" #include "llfloaterreg.h" +#include "llinventorydefines.h" #include "llinventorymodel.h" #include "lllineeditor.h" #include "llnotificationsutil.h" @@ -188,6 +190,20 @@ void LLPreviewNotecard::refreshFromInventory(const LLUUID& new_item_id) loadAsset(); } +void LLPreviewNotecard::updateTitleButtons() +{ + LLPreview::updateTitleButtons(); + + LLUICtrl* lock_btn = getChild<LLUICtrl>("lock"); + if(lock_btn->getVisible() && !isMinimized()) // lock button stays visible if floater is minimized. + { + LLRect lock_rc = lock_btn->getRect(); + LLRect buttons_rect = getDragHandle()->getButtonsRect(); + buttons_rect.mLeft = lock_rc.mLeft; + getDragHandle()->setButtonsRect(buttons_rect); + } +} + void LLPreviewNotecard::loadAsset() { // request the asset. diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h index 5b8cf1c2f6..e0363eef54 100644 --- a/indra/newview/llpreviewnotecard.h +++ b/indra/newview/llpreviewnotecard.h @@ -79,6 +79,7 @@ public: protected: + void updateTitleButtons(); virtual void loadAsset(); bool saveIfNeeded(LLInventoryItem* copyitem = NULL); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index f5a9f82d50..7b926f468d 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -41,6 +41,7 @@ #include "llcombobox.h" #include "lldir.h" #include "llfloaterreg.h" +#include "llinventorydefines.h" #include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" @@ -1090,8 +1091,7 @@ void LLPreviewLSL::onSave(void* userdata, BOOL close_after_save) // Save needs to compile the text in the buffer. If the compile // succeeds, then save both assets out to the database. If the compile -// fails, go ahead and save the text anyway so that the user doesn't -// get too fucked. +// fails, go ahead and save the text anyway. void LLPreviewLSL::saveIfNeeded() { // llinfos << "LLPreviewLSL::saveIfNeeded()" << llendl; @@ -1579,7 +1579,7 @@ void LLLiveLSLEditor::loadAsset() DEFAULT_SCRIPT_NAME, DEFAULT_SCRIPT_DESC, LLSaleInfo::DEFAULT, - LLInventoryItem::II_FLAGS_NONE, + LLInventoryItemFlags::II_FLAGS_NONE, time_corrected()); mAssetStatus = PREVIEW_ASSET_LOADED; } @@ -1823,7 +1823,7 @@ void LLLiveLSLEditor::saveIfNeeded() return; } - if(mItem.isNull() || !mItem->isComplete()) + if(mItem.isNull() || !mItem->isFinished()) { // $NOTE: While the error message may not be exactly correct, // it's pretty close. diff --git a/indra/newview/llrecentpeople.cpp b/indra/newview/llrecentpeople.cpp index bd46b5b56a..62c2ddfd9f 100644 --- a/indra/newview/llrecentpeople.cpp +++ b/indra/newview/llrecentpeople.cpp @@ -63,7 +63,7 @@ bool LLRecentPeople::contains(const LLUUID& id) const return mPeople.find(id) != mPeople.end(); } -void LLRecentPeople::get(std::vector<LLUUID>& result) const +void LLRecentPeople::get(uuid_vec_t& result) const { result.clear(); for (recent_people_t::const_iterator pos = mPeople.begin(); pos != mPeople.end(); ++pos) diff --git a/indra/newview/llrecentpeople.h b/indra/newview/llrecentpeople.h index e0f2faaec5..c718997f7e 100644 --- a/indra/newview/llrecentpeople.h +++ b/indra/newview/llrecentpeople.h @@ -79,7 +79,7 @@ public: * * @param result where to put the result. */ - void get(std::vector<LLUUID>& result) const; + void get(uuid_vec_t& result) const; const LLDate& getDate(const LLUUID& id) const; diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index dffb5e5e12..af440a3689 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -47,7 +47,6 @@ #include "llsyswellwindow.h" #include "llimfloater.h" #include "llscriptfloater.h" -#include "llfontgl.h" #include <algorithm> @@ -480,7 +479,9 @@ void LLScreenChannel::showToastsBottom() } toast_rect = (*it).toast->getRect(); - toast_rect.setOriginAndSize(getRect().mLeft, bottom + toast_margin, toast_rect.getWidth() ,toast_rect.getHeight()); + toast_rect.setOriginAndSize(getRect().mRight - toast_rect.getWidth(), + bottom + toast_margin, toast_rect.getWidth(), + toast_rect.getHeight()); (*it).toast->setRect(toast_rect); if(floater && floater->overlapsScreenChannel()) @@ -580,7 +581,6 @@ void LLScreenChannel::showToastsTop() void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) { LLRect toast_rect; - LLRect tbox_rect; LLToast::Params p; p.lifetime_secs = timer; p.enable_hide_btn = false; @@ -591,34 +591,26 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this)); + LLPanel* wrapper_panel = mStartUpToastPanel->getChild<LLPanel>("wrapper_panel"); LLTextBox* text_box = mStartUpToastPanel->getChild<LLTextBox>("toast_text"); std::string text = LLTrans::getString("StartUpNotifications"); - tbox_rect = text_box->getRect(); - S32 tbox_width = tbox_rect.getWidth(); - S32 tbox_vpad = text_box->getVPad(); - S32 text_width = text_box->getDefaultFont()->getWidth(text); - S32 text_height = text_box->getTextPixelHeight(); - - // EXT - 3703 (Startup toast message doesn't fit toast width) - // Calculating TextBox HEIGHT needed to include the whole string according to the given WIDTH of the TextBox. - S32 new_tbox_height = (text_width/tbox_width + 1) * text_height; - // Calculating TOP position of TextBox - S32 new_tbox_top = new_tbox_height + tbox_vpad + gSavedSettings.getS32("ToastGap"); - // Calculating toast HEIGHT according to the new TextBox size - S32 toast_height = new_tbox_height + tbox_vpad * 2; - - tbox_rect.setLeftTopAndSize(tbox_rect.mLeft, new_tbox_top, tbox_rect.getWidth(), new_tbox_height); - text_box->setRect(tbox_rect); - toast_rect = mStartUpToastPanel->getRect(); mStartUpToastPanel->reshape(getRect().getWidth(), toast_rect.getHeight(), true); - toast_rect.setLeftTopAndSize(0, toast_height + gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_height); - mStartUpToastPanel->setRect(toast_rect); text_box->setValue(text); text_box->setVisible(TRUE); + + S32 old_height = text_box->getRect().getHeight(); + text_box->reshapeToFitText(); + text_box->setOrigin(text_box->getRect().mLeft, (wrapper_panel->getRect().getHeight() - text_box->getRect().getHeight())/2); + S32 new_height = text_box->getRect().getHeight(); + S32 height_delta = new_height - old_height; + + toast_rect.setLeftTopAndSize(0, toast_rect.getHeight() + height_delta +gSavedSettings.getS32("ToastGap"), getRect().getWidth(), toast_rect.getHeight()); + mStartUpToastPanel->setRect(toast_rect); + addChild(mStartUpToastPanel); mStartUpToastPanel->setVisible(TRUE); diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index dc64296521..a5518d87d4 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -42,17 +42,14 @@ #include "llbutton.h" #include "llsliderctrl.h" #include "llagent.h" +#include "llviewborder.h" #include "llvoavatarself.h" // Constants for LLPanelVisualParam const F32 LLScrollingPanelParam::PARAM_STEP_TIME_THRESHOLD = 0.25f; -const S32 LLScrollingPanelParam::BTN_BORDER = 2; const S32 LLScrollingPanelParam::PARAM_HINT_WIDTH = 128; const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128; -const S32 LLScrollingPanelParam::PARAM_HINT_LABEL_HEIGHT = 16; -const S32 LLScrollingPanelParam::PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH + LLPANEL_BORDER_WIDTH); -const S32 LLScrollingPanelParam::PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH; // LLScrollingPanelParam //static @@ -67,14 +64,17 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml"); + // *HACK To avoid hard coding texture position, lets use border's position for texture. + LLViewBorder* left_border = getChild<LLViewBorder>("left_border"); + static LLUICachedControl<S32> slider_ctrl_height ("UISliderctrlHeight", 0); - S32 pos_x = 2 * LLPANEL_BORDER_WIDTH; - S32 pos_y = 3 * LLPANEL_BORDER_WIDTH + slider_ctrl_height; + S32 pos_x = left_border->getRect().mLeft + left_border->getBorderWidth(); + S32 pos_y = left_border->getRect().mBottom + left_border->getBorderWidth(); F32 min_weight = param->getMinWeight(); F32 max_weight = param->getMaxWeight(); mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), min_weight); - pos_x += PARAM_HINT_WIDTH + 3 * BTN_BORDER; + pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth(); mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), max_weight ); mHintMin->setAllowsUpdates( FALSE ); @@ -162,6 +162,10 @@ void LLScrollingPanelParam::draw() childSetVisible("less", mHintMin->getVisible()); childSetVisible("more", mHintMax->getVisible()); + // hide borders if texture has been loaded + childSetVisible("left_border", !mHintMin->getVisible()); + childSetVisible("right_border", !mHintMax->getVisible()); + // Draw all the children except for the labels childSetVisible( "min param text", FALSE ); childSetVisible( "max param text", FALSE ); @@ -171,9 +175,7 @@ void LLScrollingPanelParam::draw() gGL.pushUIMatrix(); { const LLRect& r = mHintMin->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - gGL.translateUI(left, bot, 0.f); + gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); mHintMin->draw(); } gGL.popUIMatrix(); @@ -181,9 +183,7 @@ void LLScrollingPanelParam::draw() gGL.pushUIMatrix(); { const LLRect& r = mHintMax->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - gGL.translateUI(left, bot, 0.f); + gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); mHintMax->draw(); } gGL.popUIMatrix(); @@ -191,10 +191,10 @@ void LLScrollingPanelParam::draw() // Draw labels on top of the buttons childSetVisible( "min param text", TRUE ); - drawChild(getChild<LLView>("min param text"), BTN_BORDER, BTN_BORDER); + drawChild(getChild<LLView>("min param text")); childSetVisible( "max param text", TRUE ); - drawChild(getChild<LLView>("max param text"), BTN_BORDER, BTN_BORDER); + drawChild(getChild<LLView>("max param text")); } // static @@ -209,7 +209,7 @@ void LLScrollingPanelParam::onSliderMoved(LLUICtrl* ctrl, void* userdata) if (current_weight != new_weight ) { self->mWearable->setVisualParamWeight( param->getID(), new_weight, FALSE ); - gAgent.getAvatarObject()->updateVisualParams(); + gAgentAvatarp->updateVisualParams(); } } @@ -298,7 +298,7 @@ void LLScrollingPanelParam::onHintHeldDown( LLVisualParamHint* hint ) && new_percent < slider->getMaxValue()) { mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight, FALSE); - gAgent.getAvatarObject()->updateVisualParams(); + gAgentAvatarp->updateVisualParams(); slider->setValue( weightToPercent( new_weight ) ); } @@ -344,8 +344,7 @@ void LLScrollingPanelParam::onHintMaxMouseUp( void* userdata ) F32 elapsed_time = self->mMouseDownTimer.getElapsedTimeF32(); - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (avatar) + if (isAgentAvatarValid()) { LLVisualParamHint* hint = self->mHintMax; diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index 8c5db64816..fe4ce07166 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -75,13 +75,8 @@ public: // Constants for LLPanelVisualParam const static F32 PARAM_STEP_TIME_THRESHOLD; - const static S32 BTN_BORDER; const static S32 PARAM_HINT_WIDTH; const static S32 PARAM_HINT_HEIGHT; - const static S32 PARAM_HINT_LABEL_HEIGHT; - const static S32 PARAM_PANEL_WIDTH; - const static S32 PARAM_PANEL_HEIGHT; - public: LLViewerVisualParam* mParam; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9147bd1cba..d03a492cd1 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -56,6 +56,7 @@ // viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llviewerwindow.h" #include "lldrawable.h" #include "llfloaterinspect.h" @@ -1474,7 +1475,7 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid) object->sendTEUpdate(); // 1 particle effect per object LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(object); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -2872,7 +2873,7 @@ bool LLSelectMgr::confirmDelete(const LLSD& notification, const LLSD& response, effectp->setDuration(duration); } - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); // Keep track of how many objects have been deleted. F64 obj_delete_count = LLViewerStats::getInstance()->getStat(LLViewerStats::ST_OBJECT_DELETE_COUNT); @@ -3618,7 +3619,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) { LLViewerObject* attach_object = mSelectedObjects->getFirstRootObject(); - if (!attach_object || !gAgent.getAvatarObject() || mSelectedObjects->mSelectType != SELECT_TYPE_WORLD) + if (!attach_object || !isAgentAvatarValid() || mSelectedObjects->mSelectType != SELECT_TYPE_WORLD) { return; } @@ -3629,7 +3630,7 @@ void LLSelectMgr::sendAttach(U8 attachment_point) BOOL build_mode = LLToolMgr::getInstance()->inEdit(); // Special case: Attach to default location for this object. if (0 == attachment_point || - get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) + get_if_there(gAgentAvatarp->mAttachmentPoints, (S32)attachment_point, (LLViewerJointAttachment*)NULL)) { sendListToRegions( "ObjectAttach", @@ -4391,7 +4392,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data msg->getStringFast(_PREHASH_ObjectData, _PREHASH_SitName, sit_name, i); //unpack TE IDs - std::vector<LLUUID> texture_ids; + uuid_vec_t texture_ids; S32 size = msg->getSizeFast(_PREHASH_ObjectData, i, _PREHASH_TextureID); if (size > 0) { @@ -4626,8 +4627,8 @@ void LLSelectMgr::updateSilhouettes() { S32 num_sils_genned = 0; - LLVector3d cameraPos = gAgent.getCameraPositionGlobal(); - F32 currentCameraZoom = gAgent.getCurrentCameraBuildOffset(); + LLVector3d cameraPos = gAgentCamera.getCameraPositionGlobal(); + F32 currentCameraZoom = gAgentCamera.getCurrentCameraBuildOffset(); if (!mSilhouetteImagep) { @@ -4648,7 +4649,7 @@ void LLSelectMgr::updateSilhouettes() } func; getSelection()->applyToObjects(&func); - mLastCameraPos = gAgent.getCameraPositionGlobal(); + mLastCameraPos = gAgentCamera.getCameraPositionGlobal(); } std::vector<LLViewerObject*> changed_objects; @@ -4910,12 +4911,11 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) LLGLEnable blend(GL_BLEND); LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE); - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (for_hud && avatar) + if (isAgentAvatarValid() && for_hud) { - LLBBox hud_bbox = avatar->getHUDBBox(); + LLBBox hud_bbox = gAgentAvatarp->getHUDBBox(); - F32 cur_zoom = gAgent.mHUDCurZoom; + F32 cur_zoom = gAgentCamera.mHUDCurZoom; // set up transform to encompass bounding box of HUD glMatrixMode(GL_PROJECTION); @@ -5022,7 +5022,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) } } - if (for_hud && avatar) + if (isAgentAvatarValid() && for_hud) { glMatrixMode(GL_PROJECTION); gGL.popMatrix(); @@ -5207,13 +5207,13 @@ void LLSelectNode::saveColors() } } -void LLSelectNode::saveTextures(const std::vector<LLUUID>& textures) +void LLSelectNode::saveTextures(const uuid_vec_t& textures) { if (mObject.notNull()) { mSavedTextures.clear(); - for (std::vector<LLUUID>::const_iterator texture_it = textures.begin(); + for (uuid_vec_t::const_iterator texture_it = textures.begin(); texture_it != textures.end(); ++texture_it) { mSavedTextures.push_back(*texture_it); @@ -5398,9 +5398,9 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) if (volume) { F32 silhouette_thickness; - if (is_hud_object && gAgent.getAvatarObject()) + if (isAgentAvatarValid() && is_hud_object) { - silhouette_thickness = LLSelectMgr::sHighlightThickness / gAgent.mHUDCurZoom; + silhouette_thickness = LLSelectMgr::sHighlightThickness / gAgentCamera.mHUDCurZoom; } else { @@ -5420,7 +5420,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) LLGLEnable fog(GL_FOG); glFogi(GL_FOG_MODE, GL_LINEAR); float d = (LLViewerCamera::getInstance()->getPointOfInterest()-LLViewerCamera::getInstance()->getOrigin()).magVec(); - LLColor4 fogCol = color * (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal()-gAgent.getCameraPositionGlobal()).magVec()/(LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec()*4), 0.0, 1.0); + LLColor4 fogCol = color * (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal()-gAgentCamera.getCameraPositionGlobal()).magVec()/(LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec()*4), 0.0, 1.0); glFogf(GL_FOG_START, d); glFogf(GL_FOG_END, d*(1 + (LLViewerCamera::getInstance()->getView() / LLViewerCamera::getInstance()->getDefaultFOV()))); glFogfv(GL_FOG_COLOR, fogCol.mV); @@ -5608,20 +5608,20 @@ void LLSelectMgr::updateSelectionCenter() { mSelectedObjects->mSelectType = getSelectTypeForObject(object); - if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && gAgent.getAvatarObject()) + if (mSelectedObjects->mSelectType == SELECT_TYPE_ATTACHMENT && isAgentAvatarValid()) { - mPauseRequest = gAgent.getAvatarObject()->requestPause(); + mPauseRequest = gAgentAvatarp->requestPause(); } else { mPauseRequest = NULL; } - if (mSelectedObjects->mSelectType != SELECT_TYPE_HUD && gAgent.getAvatarObject()) + if (mSelectedObjects->mSelectType != SELECT_TYPE_HUD && isAgentAvatarValid()) { // reset hud ZOOM - gAgent.mHUDTargetZoom = 1.f; - gAgent.mHUDCurZoom = 1.f; + gAgentCamera.mHUDTargetZoom = 1.f; + gAgentCamera.mHUDCurZoom = 1.f; } mShowSelection = FALSE; @@ -5640,10 +5640,10 @@ void LLSelectMgr::updateSelectionCenter() LLViewerObject* object = node->getObject(); if (!object) continue; - LLViewerObject *myAvatar = gAgent.getAvatarObject(); + LLViewerObject *root = object->getRootEdit(); if (mSelectedObjects->mSelectType == SELECT_TYPE_WORLD && // not an attachment - !root->isChild(myAvatar) && // not the object you're sitting on + !root->isChild(gAgentAvatarp) && // not the object you're sitting on !object->isAvatar()) // not another avatar { mShowSelection = TRUE; @@ -5713,26 +5713,26 @@ void LLSelectMgr::updatePointAt() select_offset.setVec(pick.mObjectOffset); select_offset.rotVec(~click_object->getRenderRotation()); - gAgent.setPointAt(POINTAT_TARGET_SELECT, click_object, select_offset); - gAgent.setLookAt(LOOKAT_TARGET_SELECT, click_object, select_offset); + gAgentCamera.setPointAt(POINTAT_TARGET_SELECT, click_object, select_offset); + gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, click_object, select_offset); } else { // didn't click on an object this time, revert to pointing at center of first object - gAgent.setPointAt(POINTAT_TARGET_SELECT, mSelectedObjects->getFirstObject()); - gAgent.setLookAt(LOOKAT_TARGET_SELECT, mSelectedObjects->getFirstObject()); + gAgentCamera.setPointAt(POINTAT_TARGET_SELECT, mSelectedObjects->getFirstObject()); + gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, mSelectedObjects->getFirstObject()); } } else { - gAgent.setPointAt(POINTAT_TARGET_CLEAR); - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setPointAt(POINTAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } } else { - gAgent.setPointAt(POINTAT_TARGET_CLEAR); - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setPointAt(POINTAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } } @@ -5922,20 +5922,20 @@ BOOL LLSelectMgr::setForceSelection(BOOL force) void LLSelectMgr::resetAgentHUDZoom() { - gAgent.mHUDTargetZoom = 1.f; - gAgent.mHUDCurZoom = 1.f; + gAgentCamera.mHUDTargetZoom = 1.f; + gAgentCamera.mHUDCurZoom = 1.f; } void LLSelectMgr::getAgentHUDZoom(F32 &target_zoom, F32 ¤t_zoom) const { - target_zoom = gAgent.mHUDTargetZoom; - current_zoom = gAgent.mHUDCurZoom; + target_zoom = gAgentCamera.mHUDTargetZoom; + current_zoom = gAgentCamera.mHUDCurZoom; } void LLSelectMgr::setAgentHUDZoom(F32 target_zoom, F32 current_zoom) { - gAgent.mHUDTargetZoom = target_zoom; - gAgent.mHUDCurZoom = current_zoom; + gAgentCamera.mHUDTargetZoom = target_zoom; + gAgentCamera.mHUDCurZoom = current_zoom; } ///////////////////////////////////////////////////////////////////////////// diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 00474827ca..d315f40ff3 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -147,7 +147,7 @@ public: void setObject(LLViewerObject* object); // *NOTE: invalidate stored textures and colors when # faces change void saveColors(); - void saveTextures(const std::vector<LLUUID>& textures); + void saveTextures(const uuid_vec_t& textures); void saveTextureScaleRatios(); BOOL allowOperationOnNode(PermissionBit op, U64 group_proxy_power) const; @@ -183,7 +183,7 @@ public: std::string mSitName; U64 mCreationDate; std::vector<LLColor4> mSavedColors; - std::vector<LLUUID> mSavedTextures; + uuid_vec_t mSavedTextures; std::vector<LLVector3> mTextureScaleRatios; std::vector<LLVector3> mSilhouetteVertices; // array of vertices to render silhouette of object std::vector<LLVector3> mSilhouetteNormals; // array of normals to render silhouette of object diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index cd4a821774..abef47d4be 100644 --- a/indra/newview/llsidepanelappearance.cpp +++ b/indra/newview/llsidepanelappearance.cpp @@ -34,6 +34,7 @@ #include "llaccordionctrltab.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llappearancemgr.h" #include "llinventorypanel.h" @@ -51,10 +52,12 @@ static LLRegisterPanelClassWrapper<LLSidepanelAppearance> t_appearance("sidepanel_appearance"); -class LLCurrentlyWornFetchObserver : public LLInventoryFetchObserver +class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver { public: - LLCurrentlyWornFetchObserver(LLSidepanelAppearance *panel) : + LLCurrentlyWornFetchObserver(const uuid_vec_t &ids, + LLSidepanelAppearance *panel) : + LLInventoryFetchItemsObserver(ids), mPanel(panel) {} ~LLCurrentlyWornFetchObserver() {} @@ -92,7 +95,7 @@ LLSidepanelAppearance::LLSidepanelAppearance() : LLPanel(), mFilterSubString(LLStringUtil::null), mFilterEditor(NULL), - mLookInfo(NULL), + mOutfitEdit(NULL), mCurrOutfitPanel(NULL) { } @@ -128,13 +131,13 @@ BOOL LLSidepanelAppearance::postBuild() mPanelOutfitsInventory = dynamic_cast<LLPanelOutfitsInventory *>(getChild<LLPanel>("panel_outfits_inventory")); mPanelOutfitsInventory->setParent(this); - mLookInfo = dynamic_cast<LLPanelLookInfo*>(getChild<LLPanel>("panel_look_info")); - if (mLookInfo) + mOutfitEdit = dynamic_cast<LLPanelOutfitEdit*>(getChild<LLPanel>("panel_outfit_edit")); + if (mOutfitEdit) { - LLButton* back_btn = mLookInfo->getChild<LLButton>("back_btn"); + LLButton* back_btn = mOutfitEdit->getChild<LLButton>("back_btn"); if (back_btn) { - back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onBackButtonClicked, this)); + back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::showOutfitsInventoryPanel, this)); } } @@ -175,17 +178,15 @@ void LLSidepanelAppearance::onOpen(const LLSD& key) if(key.size() == 0) return; - - toggleLookInfoPanel(TRUE); + + toggleOutfitEditPanel(TRUE); updateVerbs(); mLookInfoType = key["type"].asString(); - if (mLookInfoType == "look") + if (mLookInfoType == "edit_outfit") { - LLInventoryCategory *pLook = gInventory.getCategory(key["id"].asUUID()); - if (pLook) - mLookInfo->displayLookInfo(pLook); + mOutfitEdit->displayCurrentOutfit(); } } @@ -205,7 +206,7 @@ void LLSidepanelAppearance::onFilterEdit(const std::string& search_string) void LLSidepanelAppearance::onOpenOutfitButtonClicked() { - const LLViewerInventoryItem *outfit_link = LLAppearanceManager::getInstance()->getBaseOutfitLink(); + const LLViewerInventoryItem *outfit_link = LLAppearanceMgr::getInstance()->getBaseOutfitLink(); if (!outfit_link) return; if (!outfit_link->getIsLinkType()) @@ -218,13 +219,13 @@ void LLSidepanelAppearance::onOpenOutfitButtonClicked() LLInventoryPanel *inventory_panel = tab_outfits->findChild<LLInventoryPanel>("outfitslist_tab"); if (inventory_panel) { - LLFolderView *folder = inventory_panel->getRootFolder(); - LLFolderViewItem *outfit_folder = folder->getItemByID(outfit_link->getLinkedUUID()); + LLFolderView* root = inventory_panel->getRootFolder(); + LLFolderViewItem *outfit_folder = root->getItemByID(outfit_link->getLinkedUUID()); if (outfit_folder) { outfit_folder->setOpen(!outfit_folder->isOpen()); - folder->setSelectionFromRoot(outfit_folder,TRUE); - folder->scrollToShowSelection(); + root->setSelectionFromRoot(outfit_folder,TRUE); + root->scrollToShowSelection(); } } } @@ -234,15 +235,15 @@ void LLSidepanelAppearance::onEditAppearanceButtonClicked() { if (gAgentWearables.areWearablesLoaded()) { - gAgent.changeCameraToCustomizeAvatar(); + gAgentCamera.changeCameraToCustomizeAvatar(); } } void LLSidepanelAppearance::onEditButtonClicked() { - toggleLookInfoPanel(FALSE); + toggleOutfitEditPanel(FALSE); toggleWearableEditPanel(TRUE, NULL); - /*if (mLookInfo->getVisible()) + /*if (mOutfitEdit->getVisible()) { } else @@ -253,31 +254,49 @@ void LLSidepanelAppearance::onEditButtonClicked() void LLSidepanelAppearance::onNewOutfitButtonClicked() { - if (!mLookInfo->getVisible()) + if (!mOutfitEdit->getVisible()) { mPanelOutfitsInventory->onSave(); } } +void LLSidepanelAppearance::onEditWearBackClicked() +{ + mEditWearable->saveChanges(); + toggleWearableEditPanel(FALSE, NULL); + toggleOutfitEditPanel(TRUE); +} -void LLSidepanelAppearance::onBackButtonClicked() +void LLSidepanelAppearance::showOutfitsInventoryPanel() { - toggleLookInfoPanel(FALSE); + mOutfitEdit->setVisible(FALSE); + + mPanelOutfitsInventory->setVisible(TRUE); + + mFilterEditor->setVisible(TRUE); + mEditBtn->setVisible(TRUE); + mNewOutfitBtn->setVisible(TRUE); + mCurrOutfitPanel->setVisible(TRUE); } -void LLSidepanelAppearance::onEditWearBackClicked() +void LLSidepanelAppearance::showOutfitEditPanel() { - mEditWearable->saveChanges(); - toggleWearableEditPanel(FALSE, NULL); - toggleLookInfoPanel(TRUE); + mOutfitEdit->setVisible(TRUE); + + mPanelOutfitsInventory->setVisible(FALSE); + + mFilterEditor->setVisible(FALSE); + mEditBtn->setVisible(FALSE); + mNewOutfitBtn->setVisible(FALSE); + mCurrOutfitPanel->setVisible(FALSE); } -void LLSidepanelAppearance::toggleLookInfoPanel(BOOL visible) +void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) { - if (!mLookInfo) + if (!mOutfitEdit) return; - mLookInfo->setVisible(visible); + mOutfitEdit->setVisible(visible); if (mPanelOutfitsInventory) mPanelOutfitsInventory->setVisible(!visible); mFilterEditor->setVisible(!visible); mEditBtn->setVisible(!visible); @@ -296,14 +315,17 @@ void LLSidepanelAppearance::toggleWearableEditPanel(BOOL visible, LLWearable *we return; } + mCurrOutfitPanel->setVisible(!visible); + mEditWearable->setVisible(visible); + mEditWearable->setWearable(wearable); mFilterEditor->setVisible(!visible); mPanelOutfitsInventory->setVisible(!visible); } void LLSidepanelAppearance::updateVerbs() { - bool is_look_info_visible = mLookInfo->getVisible(); + bool is_look_info_visible = mOutfitEdit->getVisible(); if (mPanelOutfitsInventory && !is_look_info_visible) { @@ -318,11 +340,11 @@ void LLSidepanelAppearance::updateVerbs() void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) { - mOutfitDirtyTag->setVisible(LLAppearanceManager::getInstance()->isOutfitDirty()); + mOutfitDirtyTag->setVisible(LLAppearanceMgr::getInstance()->isOutfitDirty()); if (name == "") { std::string outfit_name; - if (LLAppearanceManager::getInstance()->getBaseOutfitName(outfit_name)) + if (LLAppearanceMgr::getInstance()->getBaseOutfitName(outfit_name)) { mCurrentLookName->setText(outfit_name); return; @@ -342,7 +364,7 @@ void LLSidepanelAppearance::refreshCurrentOutfitName(const std::string& name) void LLSidepanelAppearance::editWearable(LLWearable *wearable, void *data) { LLSidepanelAppearance *panel = (LLSidepanelAppearance*) data; - panel->toggleLookInfoPanel(FALSE); + panel->toggleOutfitEditPanel(FALSE); panel->toggleWearableEditPanel(TRUE, wearable); } @@ -352,23 +374,24 @@ void LLSidepanelAppearance::fetchInventory() { mNewOutfitBtn->setEnabled(false); - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; LLUUID item_id; for(S32 type = (S32)WT_SHAPE; type < (S32)WT_COUNT; ++type) { - // MULTI_WEARABLE: - item_id = gAgentWearables.getWearableItemID((EWearableType)type,0); - if(item_id.notNull()) + for (U32 index = 0; index < gAgentWearables.getWearableCount((EWearableType)type); ++index) { - ids.push_back(item_id); + item_id = gAgentWearables.getWearableItemID((EWearableType)type, index); + if(item_id.notNull()) + { + ids.push_back(item_id); + } } } - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( avatar ) + if (isAgentAvatarValid()) { - for (LLVOAvatar::attachment_map_t::const_iterator iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); ++iter) + for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter) { LLViewerJointAttachment* attachment = iter->second; if (!attachment) continue; @@ -385,11 +408,11 @@ void LLSidepanelAppearance::fetchInventory() } } - LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this); - fetch_worn->fetchItems(ids); + LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(ids, this); + fetch_worn->startFetch(); // If no items to be fetched, done will never be triggered. - // TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition. - if (fetch_worn->isEverythingComplete()) + // TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition. + if (fetch_worn->isFinished()) { fetch_worn->done(); } diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index aa2e67fd16..0a609797fb 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -36,7 +36,7 @@ #include "llinventoryobserver.h" #include "llinventory.h" -#include "llpanellookinfo.h" +#include "llpaneloutfitedit.h" class LLFilterEditor; class LLCurrentlyWornFetchObserver; @@ -63,20 +63,24 @@ public: void updateVerbs(); void onNewOutfitButtonClicked(); + void showOutfitsInventoryPanel(); + void showOutfitEditPanel(); + private: void onFilterEdit(const std::string& search_string); void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); void onEditButtonClicked(); - void onBackButtonClicked(); void onEditWearBackClicked(); - void toggleLookInfoPanel(BOOL visible); + + //@deprecated use showXXX() methods instead + void toggleOutfitEditPanel(BOOL visible); void toggleWearableEditPanel(BOOL visible, LLWearable* wearable); LLFilterEditor* mFilterEditor; LLPanelOutfitsInventory* mPanelOutfitsInventory; - LLPanelLookInfo* mLookInfo; + LLPanelOutfitEdit* mOutfitEdit; LLPanelEditWearable* mEditWearable; LLButton* mOpenOutfitBtn; diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 73880563d7..fa543f1371 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -33,6 +33,7 @@ #include "llsidepanelinventory.h" #include "llagent.h" +#include "llavataractions.h" #include "llbutton.h" #include "llinventorybridge.h" #include "llinventorypanel.h" @@ -151,6 +152,7 @@ void LLSidepanelInventory::onInfoButtonClicked() void LLSidepanelInventory::onShareButtonClicked() { + LLAvatarActions::shareWithAvatars(); } void LLSidepanelInventory::performActionOnSelection(const std::string &action) @@ -161,7 +163,7 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action) { return; } - current_item->getListener()->performAction(panel_main_inventory->getActivePanel()->getRootFolder(), panel_main_inventory->getActivePanel()->getModel(), action); + current_item->getListener()->performAction(panel_main_inventory->getActivePanel()->getModel(), action); } void LLSidepanelInventory::onWearButtonClicked() @@ -252,7 +254,9 @@ void LLSidepanelInventory::updateVerbs() mPlayBtn->setEnabled(FALSE); mTeleportBtn->setVisible(FALSE); mTeleportBtn->setEnabled(FALSE); - + + mShareBtn->setEnabled(canShare()); + const LLInventoryItem *item = getSelectedItem(); if (!item) return; @@ -260,7 +264,6 @@ void LLSidepanelInventory::updateVerbs() bool is_single_selection = getSelectedCount() == 1; mInfoBtn->setEnabled(is_single_selection); - mShareBtn->setEnabled(is_single_selection); switch(item->getInventoryType()) { @@ -285,6 +288,25 @@ void LLSidepanelInventory::updateVerbs() } } +bool LLSidepanelInventory::canShare() +{ + LLPanelMainInventory* panel_main_inventory = + mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + + LLFolderView* root_folder = + panel_main_inventory->getActivePanel()->getRootFolder(); + + LLFolderViewItem* current_item = root_folder->hasVisibleChildren() + ? root_folder->getCurSelectedItem() + : NULL; + + LLInvFVBridge* bridge = current_item + ? dynamic_cast <LLInvFVBridge*> (current_item->getListener()) + : NULL; + + return bridge ? bridge->canShare() : false; +} + LLInventoryItem *LLSidepanelInventory::getSelectedItem() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index ee11fb6b54..95eab3571c 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -60,6 +60,7 @@ protected: void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); // "wear", "teleport", etc. void performActionOnSelection(const std::string &action); + bool canShare(); void showItemInfoPanel(); void showTaskInfoPanel(); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 0275736f6d..0ec351965a 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -40,6 +40,7 @@ #include "llbutton.h" #include "llfloaterreg.h" #include "llgroupactions.h" +#include "llinventorydefines.h" #include "llinventorymodel.h" #include "llinventoryobserver.h" #include "lllineeditor.h" @@ -235,7 +236,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (!item) return; // do not enable the UI for incomplete items. - BOOL is_complete = item->isComplete(); + BOOL is_complete = item->isFinished(); const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType()); const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD); const LLPermissions& perm = item->getPermissions(); @@ -439,9 +440,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = item->getFlags(); - slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; - overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; - overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; + overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } std::string perm_string; @@ -742,7 +743,7 @@ void LLSidepanelItemInfo::onCommitPermissions() CheckNextOwnerTransfer->get(), PERM_TRANSFER); } if(perm != item->getPermissions() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); new_item->setPermissions(perm); @@ -752,7 +753,7 @@ void LLSidepanelItemInfo::onCommitPermissions() if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM; } // If everyone permissions have changed (and this is an object) // then set the overwrite everyone permissions flag so they @@ -760,7 +761,7 @@ void LLSidepanelItemInfo::onCommitPermissions() if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE; } // If group permissions have changed (and this is an object) // then set the overwrite group permissions flag so they @@ -768,7 +769,7 @@ void LLSidepanelItemInfo::onCommitPermissions() if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup()) && (item->getType() == LLAssetType::AT_OBJECT)) { - flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP; } new_item->setFlags(flags); if(mObjectID.isNull()) @@ -872,7 +873,7 @@ void LLSidepanelItemInfo::updateSaleInfo() sale_info.setSaleType(LLSaleInfo::FS_NOT); } if(sale_info != item->getSaleInfo() - && item->isComplete()) + && item->isFinished()) { LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); @@ -880,7 +881,7 @@ void LLSidepanelItemInfo::updateSaleInfo() if (item->getType() == LLAssetType::AT_OBJECT) { U32 flags = new_item->getFlags(); - flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE; + flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE; new_item->setFlags(flags); } diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index fba1503b4a..3ec1855484 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -34,7 +34,7 @@ #include "lltextbox.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llbottomtray.h" #include "llsidetray.h" #include "llviewerwindow.h" @@ -730,7 +730,7 @@ void LLSideTray::updateSidetrayVisibility() // set visibility of parent container based on collapsed state if (getParent()) { - getParent()->setVisible(!mCollapsed && !gAgent.cameraMouselook()); + getParent()->setVisible(!mCollapsed && !gAgentCamera.cameraMouselook()); } } diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index c04b5f98af..ba6a44dff4 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -879,7 +879,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() } // pick up non-voice speakers in chat range - std::vector<LLUUID> avatar_ids; + uuid_vec_t avatar_ids; std::vector<LLVector3d> positions; LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS); for(U32 i=0; i<avatar_ids.size(); i++) diff --git a/indra/newview/llspeakers.h b/indra/newview/llspeakers.h index b924fb2f2c..2bb160b7ce 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -234,6 +234,14 @@ public: LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; } const LLUUID getSessionID(); + /** + * Removes avaline speaker. + * + * This is a HACK due to server does not send information that Avaline caller ends call. + * It can be removed when server is updated. See EXT-4301 for details + */ + bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); } + protected: virtual void updateSpeakerList(); void setSpeakerNotInChannel(LLSpeaker* speackerp); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1c439d9d14..7ad7799515 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -62,6 +62,7 @@ #include "llimfloater.h" #include "lllocationhistory.h" #include "llimageworker.h" + #include "llloginflags.h" #include "llmd5.h" #include "llmemorystream.h" @@ -88,6 +89,7 @@ #include "v3math.h" #include "llagent.h" +#include "llagentcamera.h" #include "llagentpicksinfo.h" #include "llagentwearables.h" #include "llagentpilot.h" @@ -115,6 +117,7 @@ #include "llimagebmp.h" #include "llinventorybridge.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llfriendcard.h" #include "llkeyboard.h" #include "llloginhandler.h" // gLoginHandler, SLURL support @@ -561,7 +564,7 @@ bool idle_startup() gXferManager->setUseAckThrottling(TRUE); gXferManager->setAckThrottleBPS(xfer_throttle_bps); } - gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS); + gAssetStorage = new LLViewerAssetStorage(msg, gXferManager, gVFS, gStaticVFS); F32 dropPercent = gSavedSettings.getF32("PacketDropPercentage"); @@ -936,6 +939,9 @@ bool idle_startup() // Load Avatars icons cache LLAvatarIconIDCache::getInstance()->load(); + + // Load media plugin cookies + LLViewerMedia::loadCookieFile(); //------------------------------------------------- // Handle startup progress screen @@ -1133,6 +1139,7 @@ bool idle_startup() // Finish agent initialization. (Requires gSavedSettings, builds camera) gAgent.init(); + gAgentCamera.init(); set_underclothes_menu_options(); // Since we connected, save off the settings so the user doesn't have to @@ -1171,7 +1178,7 @@ bool idle_startup() // World initialization must be done after above window init // User might have overridden far clip - LLWorld::getInstance()->setLandFarClip( gAgent.mDrawDistance ); + LLWorld::getInstance()->setLandFarClip(gAgentCamera.mDrawDistance); // Before we create the first region, we need to set the agent's mOriginGlobal // This is necessary because creating objects before this is set will result in a @@ -1335,8 +1342,8 @@ bool idle_startup() gAgent.setPositionAgent(agent_start_position_region); gAgent.resetAxes(gAgentStartLookAt); - gAgent.stopCameraAnimation(); - gAgent.resetCamera(); + gAgentCamera.stopCameraAnimation(); + gAgentCamera.resetCamera(); // Initialize global class data needed for surfaces (i.e. textures) if (!gNoRender) @@ -1740,7 +1747,7 @@ bool idle_startup() { LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size() << LL_ENDL; - std::vector<LLUUID> item_ids; + uuid_vec_t item_ids; for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(), end = gesture_options.endArray(); resp_it != end; ++resp_it) { @@ -1754,7 +1761,7 @@ bool idle_startup() // Could schedule and delay these for later. const BOOL no_inform_server = FALSE; const BOOL no_deactivate_similar = FALSE; - LLGestureManager::instance().activateGestureWithAsset(item_id, asset_id, + LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id, no_inform_server, no_deactivate_similar); // We need to fetch the inventory items for these gestures @@ -1763,7 +1770,8 @@ bool idle_startup() } } // no need to add gesture to inventory observer, it's already made in constructor - LLGestureManager::instance().fetchItems(item_ids); + LLGestureMgr::instance().setFetchIDs(item_ids); + LLGestureMgr::instance().startFetch(); } } gDisplaySwapBuffers = TRUE; @@ -1809,15 +1817,15 @@ bool idle_startup() if (samename) { // restore old camera pos - gAgent.setFocusOnAvatar(FALSE, FALSE); - gAgent.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null); + gAgentCamera.setFocusOnAvatar(FALSE, FALSE); + gAgentCamera.setCameraPosAndFocusGlobal(gSavedSettings.getVector3d("CameraPosOnLogout"), gSavedSettings.getVector3d("FocusPosOnLogout"), LLUUID::null); BOOL limit_hit = FALSE; - gAgent.calcCameraPositionTargetGlobal(&limit_hit); + gAgentCamera.calcCameraPositionTargetGlobal(&limit_hit); if (limit_hit) { - gAgent.setFocusOnAvatar(TRUE, FALSE); + gAgentCamera.setFocusOnAvatar(TRUE, FALSE); } - gAgent.stopCameraAnimation(); + gAgentCamera.stopCameraAnimation(); } } else @@ -1840,7 +1848,7 @@ bool idle_startup() } //DEV-17797. get null folder. Any items found here moved to Lost and Found - LLInventoryModel::findLostItems(); + LLInventoryModelBackgroundFetch::instance().findLostItems(); LLStartUp::setStartupState( STATE_PRECACHE ); timeout.reset(); @@ -1858,7 +1866,7 @@ bool idle_startup() if (gAgent.isFirstLogin() && !sInitialOutfit.empty() // registration set up an outfit && !sInitialOutfitGender.empty() // and a gender - && gAgent.getAvatarObject() // can't wear clothes without object + && isAgentAvatarValid() // can't wear clothes without object && !gAgent.isGenderChosen() ) // nothing already loading { // Start loading the wearables, textures, gestures @@ -1866,7 +1874,7 @@ bool idle_startup() } // wait precache-delay and for agent's avatar or a lot longer. - if(((timeout_frac > 1.f) && gAgent.getAvatarObject()) + if(((timeout_frac > 1.f) && isAgentAvatarValid()) || (timeout_frac > 3.f)) { LLStartUp::setStartupState( STATE_WEARABLES_WAIT ); @@ -1922,8 +1930,8 @@ bool idle_startup() if (gAgent.isFirstLogin()) { // wait for avatar to be completely loaded - if (gAgent.getAvatarObject() - && gAgent.getAvatarObject()->isFullyLoaded()) + if (isAgentAvatarValid() + && gAgentAvatarp->isFullyLoaded()) { //llinfos << "avatar fully loaded" << llendl; LLStartUp::setStartupState( STATE_CLEANUP ); @@ -2530,7 +2538,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, llinfos << "starting" << llendl; // Not going through the processAgentInitialWearables path, so need to set this here. - LLAppearanceManager::instance().setAttachmentInvLinkEnable(true); + LLAppearanceMgr::instance().setAttachmentInvLinkEnable(true); // Initiate creation of COF, since we're also bypassing that. gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT); @@ -2561,13 +2569,13 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, bool do_copy = true; bool do_append = false; LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); - LLAppearanceManager::instance().wearInventoryCategory(cat, do_copy, do_append); + LLAppearanceMgr::instance().wearInventoryCategory(cat, do_copy, do_append); } // Copy gestures LLUUID dst_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE); LLPointer<LLInventoryCallback> cb(NULL); - LLAppearanceManager *app_mgr = &(LLAppearanceManager::instance()); + LLAppearanceMgr *app_mgr = &(LLAppearanceMgr::instance()); // - Copy gender-specific gestures. LLUUID gestures_cat_id = findDescendentCategoryIDByName( @@ -2576,7 +2584,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, if (gestures_cat_id.notNull()) { callAfterCategoryFetch(gestures_cat_id, - boost::bind(&LLAppearanceManager::shallowCopyCategory, + boost::bind(&LLAppearanceMgr::shallowCopyCategory, app_mgr, gestures_cat_id, dst_id, @@ -2590,7 +2598,7 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name, if (common_gestures_cat_id.notNull()) { callAfterCategoryFetch(common_gestures_cat_id, - boost::bind(&LLAppearanceManager::shallowCopyCategory, + boost::bind(&LLAppearanceMgr::shallowCopyCategory, app_mgr, common_gestures_cat_id, dst_id, @@ -2718,6 +2726,8 @@ void LLStartUp::postStartupState() void reset_login() { + gAgentWearables.cleanup(); + gAgentCamera.cleanup(); gAgent.cleanup(); LLWorld::getInstance()->destroyClass(); @@ -3077,6 +3087,13 @@ bool process_login_success_response() } } + // Start the process of fetching the OpenID session cookie for this user login + std::string openid_url = response["openid_url"]; + if(!openid_url.empty()) + { + std::string openid_token = response["openid_token"]; + LLViewerMedia::openIDSetup(openid_url, openid_token); + } bool success = false; // JC: gesture loading done below, when we have an asset system diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 9206b4a43a..b660a2b8ea 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -36,6 +36,7 @@ // viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llbutton.h" #include "llcommandhandler.h" #include "llviewercontrol.h" @@ -313,7 +314,7 @@ void LLStatusBar::refresh() childSetVisible("scriptout", false); } - if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK && + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK && ((region && region->getAllowDamage()) || (parcel && parcel->getAllowDamage()))) { // set visibility based on flashing @@ -371,6 +372,8 @@ void LLStatusBar::setVisibleForMouselook(bool visible) mTextTime->setVisible(visible); getChild<LLUICtrl>("buycurrency")->setVisible(visible); getChild<LLUICtrl>("buyL")->setVisible(visible); + mBtnVolume->setVisible(visible); + mMediaToggle->setVisible(visible); mSGBandwidth->setVisible(visible); mSGPacketLoss->setVisible(visible); setBackgroundVisible(visible); @@ -444,11 +447,9 @@ void LLStatusBar::setHealth(S32 health) { if (mHealth > (health + gSavedSettings.getF32("UISndHealthReductionThreshold"))) { - LLVOAvatar *me; - - if ((me = gAgent.getAvatarObject())) + if (isAgentAvatarValid()) { - if (me->getSex() == SEX_FEMALE) + if (gAgentAvatarp->getSex() == SEX_FEMALE) { make_ui_sound("UISndHealthReductionF"); } diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp index 1d479bac8c..ddb5d08e07 100644 --- a/indra/newview/llsurface.cpp +++ b/indra/newview/llsurface.cpp @@ -44,6 +44,7 @@ #include "llviewerobjectlist.h" #include "llregionhandle.h" #include "llagent.h" +#include "llagentcamera.h" #include "llappviewer.h" #include "llworld.h" #include "llviewercontrol.h" @@ -606,7 +607,7 @@ void LLSurface::moveZ(const S32 x, const S32 y, const F32 delta) void LLSurface::updatePatchVisibilities(LLAgent &agent) { - LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(gAgent.getCameraPositionGlobal()); + LLVector3 pos_region = mRegionp->getPosRegionFromGlobal(gAgentCamera.getCameraPositionGlobal()); LLSurfacePatch *patchp; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 66373feb93..cbb030836e 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -58,7 +58,8 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(N mSysWellChiclet(NULL), mSeparator(NULL), NOTIFICATION_WELL_ANCHOR_NAME("notification_well_panel"), - IM_WELL_ANCHOR_NAME("im_well_panel") + IM_WELL_ANCHOR_NAME("im_well_panel"), + mIsReshapedByUser(false) { mTypedItemsCount[IT_NOTIFICATION] = 0; @@ -100,6 +101,13 @@ void LLSysWellWindow::setMinimized(BOOL minimize) } //--------------------------------------------------------------------------------- +void LLSysWellWindow::handleReshape(const LLRect& rect, bool by_user) +{ + mIsReshapedByUser |= by_user; // mark floater that it is reshaped by user + LLTransientDockableFloater::handleReshape(rect, by_user); +} + +//--------------------------------------------------------------------------------- void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask) { // just set floater visible. Screen channels will be cleared. @@ -211,7 +219,7 @@ void LLSysWellWindow::reshapeWindow() // it includes height from floater top to list top and from floater bottom and list bottom static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); - if (isDocked()) // Don't reshape undocked Well window. See EXT-5715. + if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. { S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 3790aa3ea9..296bdf7482 100644 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -70,6 +70,7 @@ public: /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); @@ -121,7 +122,7 @@ protected: typedef std::map<EItemType, S32> typed_items_count_t; typed_items_count_t mTypedItemsCount; - + bool mIsReshapedByUser; }; /** diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 8cb319b122..4262264a1d 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -172,12 +172,13 @@ void LLTexLayerSetBuffer::popProjection() const BOOL LLTexLayerSetBuffer::needsRender() { - const LLVOAvatarSelf* avatar = mTexLayerSet->getAvatar(); + llassert(mTexLayerSet->getAvatar() == gAgentAvatarp); + if (!isAgentAvatarValid()) return FALSE; BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries(); - BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating; + BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating; if (needs_update) { - BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT); + BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT); if (invalid_skirt) { // we were trying to create a skirt texture @@ -187,7 +188,6 @@ BOOL LLTexLayerSetBuffer::needsRender() } else { - needs_update &= (avatar->isSelf() || (avatar->isVisible() && !avatar->isCulled())); needs_update &= mTexLayerSet->isLocalTextureDataAvailable(); } } @@ -290,8 +290,6 @@ void LLTexLayerSetBuffer::readBackAndUpload() llinfos << "Baked " << mTexLayerSet->getBodyRegion() << llendl; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_BAKES); - llassert( gAgent.getAvatarObject() == mTexLayerSet->getAvatar() ); - // We won't need our caches since we're baked now. (Techically, we won't // really be baked until this image is sent to the server and the Avatar // Appearance message is received.) @@ -358,7 +356,7 @@ void LLTexLayerSetBuffer::readBackAndUpload() { // baked_upload_data is owned by the responder and deleted after the request completes LLBakedUploadData* baked_upload_data = - new LLBakedUploadData(gAgent.getAvatarObject(), this->mTexLayerSet, asset_id); + new LLBakedUploadData(gAgentAvatarp, this->mTexLayerSet, asset_id); mUploadID = asset_id; // upload the image @@ -415,12 +413,10 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, { LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (0 == result && - avatar && - !avatar->isDead() && - baked_upload_data->mAvatar == avatar && // Sanity check: only the user's avatar should be uploading textures. + isAgentAvatarValid() && + !gAgentAvatarp->isDead() && + baked_upload_data->mAvatar == gAgentAvatarp && // Sanity check: only the user's avatar should be uploading textures. baked_upload_data->mTexLayerSet->hasComposite() ) { @@ -445,11 +441,11 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, if (result >= 0) { - LLVOAvatarDefines::ETextureIndex baked_te = avatar->getBakedTE(layerset_buffer->mTexLayerSet); + LLVOAvatarDefines::ETextureIndex baked_te = gAgentAvatarp->getBakedTE(layerset_buffer->mTexLayerSet); // Update baked texture info with the new UUID U64 now = LLFrameTimer::getTotalTime(); // Record starting time llinfos << "Baked texture upload took " << (S32)((now - baked_upload_data->mStartTime) / 1000) << " ms" << llendl; - avatar->setNewBakedTexture(baked_te, uuid); + gAgentAvatarp->setNewBakedTexture(baked_te, uuid); } else { @@ -463,7 +459,7 @@ void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, llinfos << "Received baked texture out of date, ignored." << llendl; } - avatar->dirtyMesh(); + gAgentAvatarp->dirtyMesh(); } else { diff --git a/indra/newview/lltexlayerparams.cpp b/indra/newview/lltexlayerparams.cpp index d55468841d..5e5d344461 100644 --- a/indra/newview/lltexlayerparams.cpp +++ b/indra/newview/lltexlayerparams.cpp @@ -33,7 +33,7 @@ #include "lltexlayerparams.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llimagetga.h" #include "lltexlayer.h" #include "llvoavatarself.h" @@ -180,7 +180,7 @@ void LLTexLayerParamAlpha::setWeight(F32 weight, BOOL upload_bake) if ((mAvatar->getSex() & getSex()) && (mAvatar->isSelf() && !mIsDummy)) // only trigger a baked texture update if we're changing a wearable's visual param. { - if (gAgent.cameraCustomizeAvatar()) + if (gAgentCamera.cameraCustomizeAvatar()) { upload_bake = FALSE; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 67b0ca216e..df79725474 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -963,7 +963,7 @@ void LLTextureCache::purgeCache(ELLPath location) LLAPRFile::remove(file_name, getLocalAPRFilePool()); purgeAllTextures(true); - } + } mTexturesDirName = texture_dir ; } @@ -974,14 +974,14 @@ void LLTextureCache::purgeCache(ELLPath location) //is called in the main thread before initCache(...) is called. void LLTextureCache::setReadOnly(BOOL read_only) { - mReadOnly = read_only; + mReadOnly = read_only ; } //called in the main thread. S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL disable_texture_cache) { llassert_always(getPending() == 0) ; //should not start accessing the texture cache before initialized. - + S64 header_size = (max_size * 2) / 10; S64 max_entries = header_size / TEXTURE_CACHE_ENTRY_SIZE; sCacheMaxEntries = (S32)(llmin((S64)sCacheMaxEntries, max_entries)); @@ -1010,6 +1010,7 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL disable_textu if (!mReadOnly) { LLFile::mkdir(mTexturesDirName); + const char* subdirs = "0123456789abcdef"; for (S32 i=0; i<16; i++) { @@ -1274,8 +1275,8 @@ U32 LLTextureCache::openAndReadEntries(std::vector<Entry>& entries) else //update the header file first. { aprfile = openHeaderEntriesFile(false, 0); - updatedHeaderEntriesFile() ; - aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); + updatedHeaderEntriesFile() ; + aprfile->seek(APR_SET, (S32)sizeof(EntriesInfo)); } for (U32 idx=0; idx<num_entries; idx++) { @@ -1498,9 +1499,9 @@ void LLTextureCache::purgeAllTextures(bool purge_directories) } if (purge_directories) { - gDirUtilp->deleteFilesInDir(mTexturesDirName,mask); + gDirUtilp->deleteFilesInDir(mTexturesDirName, mask); LLFile::rmdir(mTexturesDirName); - } + } } mHeaderIDMap.clear(); mTexturesSizeMap.clear(); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 2b846d33fc..a1b3c8dabd 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -48,6 +48,7 @@ #include "llfoldervieweventlistener.h" #include "llinventory.h" #include "llinventoryfunctions.h" +#include "llinventorymodelbackgroundfetch.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llfloaterinventory.h" @@ -1053,7 +1054,7 @@ public: { // We need to find textures in all folders, so get the main // background download going. - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); gInventory.removeObserver(this); delete this; } @@ -1074,9 +1075,9 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask) { showPicker(FALSE); //grab textures first... - gInventory.startBackgroundFetch(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE)); + LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_TEXTURE)); //...then start full inventory fetch. - gInventory.startBackgroundFetch(); + LLInventoryModelBackgroundFetch::instance().start(); handled = TRUE; } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 60a89c02e4..22b12ee132 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -41,6 +41,16 @@ using namespace LLNotificationsUI; +/*virtual*/ +BOOL LLToastLifeTimer::tick() +{ + if (mEventTimer.hasExpired()) + { + mToast->expire(); + } + return FALSE; +} + //-------------------------------------------------------------------------- LLToast::Params::Params() : can_fade("can_fade", true), @@ -57,7 +67,6 @@ LLToast::Params::Params() LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), - mToastLifetime(p.lifetime_secs), mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), mSessionID(p.session_id), @@ -71,6 +80,8 @@ LLToast::LLToast(const LLToast::Params& p) mIsTip(p.is_tip), mWrapperPanel(NULL) { + mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs)); + LLUICtrlFactory::getInstance()->buildFloater(this, "panel_toast.xml", NULL); setCanDrag(FALSE); @@ -105,33 +116,13 @@ BOOL LLToast::postBuild() { if(!mCanFade) { - mTimer.stop(); - } - - if (mIsTip) - { - mTextEditor = mPanel->getChild<LLTextEditor>("text_editor_box"); - - if (mTextEditor) - { - mTextEditor->setMouseUpCallback(boost::bind(&LLToast::hide,this)); - mPanel->setMouseUpCallback(boost::bind(&LLToast::handleTipToastClick, this, _2, _3, _4)); - } + mTimer->stop(); } return TRUE; } //-------------------------------------------------------------------------- -void LLToast::handleTipToastClick(S32 x, S32 y, MASK mask) -{ - if (!mTextEditor->getRect().pointInRect(x, y)) - { - hide(); - } -} - -//-------------------------------------------------------------------------- void LLToast::setHideButtonEnabled(bool enabled) { if(mHideBtn) @@ -145,38 +136,10 @@ LLToast::~LLToast() } //-------------------------------------------------------------------------- -void LLToast::setAndStartTimer(F32 period) -{ - if(mCanFade) - { - mToastLifetime = period; - mTimer.start(); - } -} - -//-------------------------------------------------------------------------- -bool LLToast::lifetimeHasExpired() -{ - if (mTimer.getStarted()) - { - F32 elapsed_time = mTimer.getElapsedTimeF32(); - if ((mToastLifetime - elapsed_time) <= mToastFadingTime) - { - setBackgroundOpaque(FALSE); - } - if (elapsed_time > mToastLifetime) - { - return true; - } - } - return false; -} - -//-------------------------------------------------------------------------- void LLToast::hide() { setVisible(FALSE); - mTimer.stop(); + mTimer->stop(); mIsHidden = true; mOnFadeSignal(this); } @@ -222,12 +185,13 @@ void LLToast::setCanFade(bool can_fade) { mCanFade = can_fade; if(!mCanFade) - mTimer.stop(); + mTimer->stop(); } //-------------------------------------------------------------------------- -void LLToast::tick() +void LLToast::expire() { + // if toast has fade property - hide it if(mCanFade) { hide(); @@ -263,11 +227,6 @@ void LLToast::insertPanel(LLPanel* panel) //-------------------------------------------------------------------------- void LLToast::draw() { - if(lifetimeHasExpired()) - { - tick(); - } - LLFloater::draw(); if(!isBackgroundVisible()) @@ -300,12 +259,18 @@ void LLToast::setVisible(BOOL show) if(show) { setBackgroundOpaque(TRUE); - if(!mTimer.getStarted() && mCanFade) + if(!mTimer->getStarted() && mCanFade) { - mTimer.start(); + mTimer->start(); } LLModalDialog::setFrontmost(FALSE); } + else + { + //hide "hide" button in case toast was hidden without mouse_leave + if(mHideBtn) + mHideBtn->setVisible(show); + } LLFloater::setVisible(show); if(mPanel) { @@ -436,4 +401,13 @@ bool LLToast::isNotificationValid() //-------------------------------------------------------------------------- +S32 LLToast::notifyParent(const LLSD& info) +{ + if (info.has("action") && "hide_toast" == info["action"].asString()) + { + hide(); + return 1; + } + return LLModalDialog::notifyParent(info); +} diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 64855020a9..4a213580da 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -36,7 +36,7 @@ #include "llpanel.h" #include "llmodaldialog.h" -#include "lltimer.h" +#include "lleventtimer.h" #include "llnotificationptr.h" #include "llviewercontrol.h" @@ -48,12 +48,34 @@ namespace LLNotificationsUI { +class LLToast; +/** + * Timer for toasts. + */ +class LLToastLifeTimer: public LLEventTimer +{ +public: + LLToastLifeTimer(LLToast* toast, F32 period) : mToast(toast), LLEventTimer(period){} + + /*virtual*/ + BOOL tick(); + void stop() { mEventTimer.stop(); } + void start() { mEventTimer.start(); } + void restart() {mEventTimer.reset(); } + BOOL getStarted() { return mEventTimer.getStarted(); } + + LLTimer& getEventTimer() { return mEventTimer;} +private : + LLToast* mToast; +}; + /** * Represents toast pop-up. * This is a parent view for all toast panels. */ class LLToast : public LLModalDialog { + friend class LLToastLifeTimer; public: typedef boost::function<void (LLToast* toast)> toast_callback_t; typedef boost::signals2::signal<void (LLToast* toast)> toast_signal_t; @@ -107,12 +129,12 @@ public: LLPanel* getPanel() { return mPanel; } // enable/disable Toast's Hide button void setHideButtonEnabled(bool enabled); - // initialize and start Toast's timer - void setAndStartTimer(F32 period); // - void resetTimer() { mTimer.start(); } + void resetTimer() { mTimer->start(); } + // + void stopTimer() { mTimer->stop(); } // - void stopTimer() { mTimer.stop(); } + LLToastLifeTimer* getTimer() { return mTimer.get();} // virtual void draw(); // @@ -168,18 +190,15 @@ public: boost::signals2::connection setMouseEnterCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseEnterSignal.connect(cb); }; boost::signals2::connection setMouseLeaveCallback( const commit_signal_t::slot_type& cb ) { return mToastMouseLeaveSignal.connect(cb); }; + virtual S32 notifyParent(const LLSD& info); + private: void onToastMouseEnter(); void onToastMouseLeave(); - void handleTipToastClick(S32 x, S32 y, MASK mask); - - // check timer - bool lifetimeHasExpired(); - // on timer finished function - void tick(); + void expire(); LLUUID mNotificationID; LLUUID mSessionID; @@ -188,13 +207,12 @@ private: LLPanel* mWrapperPanel; // timer counts a lifetime of a toast - LLTimer mTimer; - F32 mToastLifetime; // in seconds + std::auto_ptr<LLToastLifeTimer> mTimer; + F32 mToastFadingTime; // in seconds LLPanel* mPanel; LLButton* mHideBtn; - LLTextEditor* mTextEditor; LLColor4 mBgColor; bool mCanFade; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index c3ccb9380b..986ccdf19b 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -281,9 +281,6 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal mLineEditor->setText(edit_text_contents); mLineEditor->setMaxTextLength(STD_STRING_STR_LEN - 1); - // make sure all edit keys get handled properly (DEV-22396) - mLineEditor->setHandleEditKeysDirectly(TRUE); - LLToastPanel::addChild(mLineEditor); mLineEditor->setDrawAsterixes(is_password); diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 907740a88e..c9d2d404c0 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -45,6 +45,7 @@ #include "lltrans.h" #include "llnotificationsutil.h" #include "llviewermessage.h" +#include "llimfloater.h" const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding @@ -531,12 +532,26 @@ void LLToastNotifyPanel::disableRespondedOptions(LLNotificationPtr& notification ////////////////////////////////////////////////////////////////////////// -LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect /* = LLRect::null */) - : LLToastNotifyPanel(pNotification, rect) +LLIMToastNotifyPanel::LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect /* = LLRect::null */) + : mSessionID(session_id), LLToastNotifyPanel(pNotification, rect) { mTextBox->setFollowsAll(); } +LLIMToastNotifyPanel::~LLIMToastNotifyPanel() +{ + // We shouldn't delete notification when IM floater exists + // since that notification will be reused by IM floater. + // This may happened when IM floater reloads messages, exactly when user + // changes layout of IM chat log(disable/enable plaintext mode). + // See EXT-6500 + LLIMFloater* im_floater = LLIMFloater::findInstance(mSessionID); + if (im_floater != NULL && !im_floater->isDead()) + { + mCloseNotificationOnDestroy = false; + } +} + void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_parent /* = TRUE */) { S32 text_height = mTextBox->getTextBoundingRect().getHeight(); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index a8d2d03236..a6644c0a7a 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -49,6 +49,9 @@ class LLNotificationForm; * Notification panel should be used for notifications that require a response from the user. * * Replaces class LLNotifyBox. + * + * @deprecated this class will be removed after all toast panel types are + * implemented in separate classes. */ class LLToastNotifyPanel: public LLToastPanel { @@ -60,6 +63,8 @@ public: * @param rect an initial rectangle of the toast panel. * If it is null then a loaded from xml rectangle will be used. * @see LLNotification + * @deprecated if you intend to instantiate LLToastNotifyPanel - it's point to + * implement right class for desired toast panel. @see LLGenericTipPanel as example. */ LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null); virtual ~LLToastNotifyPanel(); @@ -138,9 +143,14 @@ class LLIMToastNotifyPanel : public LLToastNotifyPanel { public: - LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null); + LLIMToastNotifyPanel(LLNotificationPtr& pNotification, const LLUUID& session_id, const LLRect& rect = LLRect::null); + + ~LLIMToastNotifyPanel(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); + +protected: + LLUUID mSessionID; }; #endif /* LLTOASTNOTIFYPANEL_H_ */ diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index 755e647777..d142a0665b 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -32,14 +32,14 @@ #include "llviewerprecompiledheaders.h" -#include "lltoastpanel.h" - +#include "llpanelgenerictip.h" #include "llnotifications.h" +#include "lltoastpanel.h" //static const S32 LLToastPanel::MIN_PANEL_HEIGHT = 40; // VPAD(4)*2 + ICON_HEIGHT(32) -LLToastPanel::LLToastPanel(LLNotificationPtr& notification) +LLToastPanel::LLToastPanel(const LLNotificationPtr& notification) { mNotification = notification; } @@ -91,3 +91,20 @@ void LLToastPanel::snapToMessageHeight(LLTextBase* message, S32 maxLineCount) } } +// static +LLToastPanel* LLToastPanel::buidPanelFromNotification( + const LLNotificationPtr& notification) +{ + LLToastPanel* res = NULL; + + if (notification->getName() == "SystemMessageTip") + { + res = new LLPanelGenericTip(notification); + } + /* + else if(...) + create all other specific non-public toast panel + */ + + return res; +} diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h index f1dd7d7a86..54243e52fa 100644 --- a/indra/newview/lltoastpanel.h +++ b/indra/newview/lltoastpanel.h @@ -53,13 +53,21 @@ public: */ class LLToastPanel: public LLPanel { public: - LLToastPanel(LLNotificationPtr&); + LLToastPanel(const LLNotificationPtr&); virtual ~LLToastPanel() = 0; virtual std::string getTitle(); virtual const LLUUID& getID(); static const S32 MIN_PANEL_HEIGHT; + + /** + * Builder method for constructing notification specific panels. + * Normally type of created panels shouldn't be publicated and should be hidden + * from other functionality. + */ + static LLToastPanel* buidPanelFromNotification( + const LLNotificationPtr& notification); protected: LLNotificationPtr mNotification; void snapToMessageHeight(LLTextBase* message, S32 maxLineCount); diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp index fff18df442..d05bfc53e5 100644 --- a/indra/newview/lltoolcomp.cpp +++ b/indra/newview/lltoolcomp.cpp @@ -54,6 +54,7 @@ #include "llviewerobject.h" #include "llviewerwindow.h" #include "llagent.h" +#include "llagentcamera.h" #include "llfloatertools.h" #include "llviewercontrol.h" @@ -784,7 +785,7 @@ BOOL LLToolCompGun::handleScrollWheel(S32 x, S32 y, S32 clicks) { if (clicks > 0) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } return TRUE; diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 47e60a966e..774626f19d 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -37,6 +37,7 @@ #include "llnotificationsutil.h" // project headers #include "llagent.h" +#include "llagentcamera.h" #include "llagentui.h" #include "llagentwearables.h" #include "llappearancemgr.h" @@ -49,6 +50,8 @@ #include "llhudeffecttrail.h" #include "llimview.h" #include "llinventorybridge.h" +#include "llinventorydefines.h" +#include "llinventoryfunctions.h" #include "llmutelist.h" #include "llpreviewnotecard.h" #include "llrecentpeople.h" @@ -79,7 +82,7 @@ public: virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { - if(cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) + if (cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) { return true; } @@ -95,8 +98,8 @@ public: virtual bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { - if(item) return true; - if(cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) + if (item) return true; + if (cat && (cat->getPreferredType() == LLFolderType::FT_NONE)) { return true; } @@ -123,18 +126,18 @@ bool LLDroppableItem::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { bool allowed = false; - if(item) + if (item) { allowed = itemTransferCommonlyAllowed(item); - if(allowed + if (allowed && mIsTransfer && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { allowed = false; } - if(allowed && !item->getPermissions().allowCopyBy(gAgent.getID())) + if (allowed && !item->getPermissions().allowCopyBy(gAgent.getID())) { ++mCountLosing; } @@ -154,7 +157,7 @@ bool LLUncopyableItems::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { bool uncopyable = false; - if(item) + if (item) { if (itemTransferCommonlyAllowed(item) && !item->getPermissions().allowCopyBy(gAgent.getID())) @@ -179,10 +182,10 @@ bool LLDropCopyableItems::operator()( LLInventoryItem* item) { bool allowed = false; - if(item) + if (item) { allowed = itemTransferCommonlyAllowed(item); - if(allowed && + if (allowed && !item->getPermissions().allowCopyBy(gAgent.getID())) { // whoops, can't copy it - don't allow it. @@ -211,16 +214,16 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return true; bool allowed = false; - if(item) + if (item) { allowed = itemTransferCommonlyAllowed(item); - if(allowed && + if (allowed && !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { allowed = FALSE; } - if(allowed && + if (allowed && !item->getPermissions().allowCopyBy(gAgent.getID())) { ++mCountLosing; @@ -229,10 +232,16 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return allowed; } +// Starts a fetch on folders and items. This is really not used +// as an observer in the traditional sense; we're just using it to +// request a fetch and we don't care about when/if the response arrives. class LLCategoryFireAndForget : public LLInventoryFetchComboObserver { public: - LLCategoryFireAndForget() {} + LLCategoryFireAndForget(const uuid_vec_t& folder_ids, + const uuid_vec_t& item_ids) : + LLInventoryFetchComboObserver(folder_ids, item_ids) + {} ~LLCategoryFireAndForget() {} virtual void done() { @@ -241,11 +250,13 @@ public: } }; -class LLCategoryDropObserver : public LLInventoryFetchObserver +class LLCategoryDropObserver : public LLInventoryFetchItemsObserver { public: LLCategoryDropObserver( + const uuid_vec_t& ids, const LLUUID& obj_id, LLToolDragAndDrop::ESource src) : + LLInventoryFetchItemsObserver(ids), mObjectID(obj_id), mSource(src) {} @@ -261,16 +272,16 @@ void LLCategoryDropObserver::done() { gInventory.removeObserver(this); LLViewerObject* dst_obj = gObjectList.findObject(mObjectID); - if(dst_obj) + if (dst_obj) { // *FIX: coalesce these... LLInventoryItem* item = NULL; - item_ref_t::iterator it = mComplete.begin(); - item_ref_t::iterator end = mComplete.end(); + uuid_vec_t::iterator it = mComplete.begin(); + uuid_vec_t::iterator end = mComplete.end(); for(; it < end; ++it) { item = gInventory.getItem(*it); - if(item) + if (item) { LLToolDragAndDrop::dropInventory( dst_obj, @@ -282,7 +293,7 @@ void LLCategoryDropObserver::done() } delete this; } - +/* Doesn't seem to be used anymore. class LLCategoryDropDescendentsObserver : public LLInventoryFetchDescendentsObserver { public: @@ -303,8 +314,8 @@ void LLCategoryDropDescendentsObserver::done() { gInventory.removeObserver(this); - folder_ref_t::iterator it = mCompleteFolders.begin(); - folder_ref_t::iterator end = mCompleteFolders.end(); + uuid_vec_t::iterator it = mComplete.begin(); + uuid_vec_t::iterator end = mComplete.end(); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; for(; it != end; ++it) @@ -317,20 +328,20 @@ void LLCategoryDropDescendentsObserver::done() } S32 count = items.count(); - if(count) + if (count) { std::set<LLUUID> unique_ids; for(S32 i = 0; i < count; ++i) { unique_ids.insert(items.get(i)->getUUID()); } - LLInventoryFetchObserver::item_ref_t ids; - std::back_insert_iterator<LLInventoryFetchObserver::item_ref_t> copier(ids); + uuid_vec_t ids; + std::back_insert_iterator<uuid_vec_t> copier(ids); std::copy(unique_ids.begin(), unique_ids.end(), copier); LLCategoryDropObserver* dropper; - dropper = new LLCategoryDropObserver(mObjectID, mSource); - dropper->fetchItems(ids); - if(dropper->isEverythingComplete()) + dropper = new LLCategoryDropObserver(ids, mObjectID, mSource); + dropper->startFetch(); + if (dropper->isDone()) { dropper->done(); } @@ -341,6 +352,7 @@ void LLCategoryDropDescendentsObserver::done() } delete this; } +*/ LLToolDragAndDrop::DragAndDropEntry::DragAndDropEntry(dragOrDrop3dImpl f_none, dragOrDrop3dImpl f_self, @@ -410,9 +422,12 @@ void LLToolDragAndDrop::setDragStart(S32 x, S32 y) BOOL LLToolDragAndDrop::isOverThreshold(S32 x,S32 y) { - const S32 MIN_MANHATTAN_DIST = 3; - S32 manhattan_dist = llabs( x - mDragStartX ) + llabs( y - mDragStartY ); - return manhattan_dist >= MIN_MANHATTAN_DIST; + static LLCachedControl<S32> drag_and_drop_threshold(gSavedSettings,"DragAndDropDistanceThreshold"); + + S32 mouse_delta_x = x - mDragStartX; + S32 mouse_delta_y = y - mDragStartY; + + return (mouse_delta_x * mouse_delta_x) + (mouse_delta_y * mouse_delta_y) > drag_and_drop_threshold * drag_and_drop_threshold; } void LLToolDragAndDrop::beginDrag(EDragAndDropType type, @@ -421,7 +436,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, const LLUUID& source_id, const LLUUID& object_id) { - if(type == DAD_NONE) + if (type == DAD_NONE) { llwarns << "Attempted to start drag without a cargo type" << llendl; return; @@ -437,24 +452,24 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, setMouseCapture( TRUE ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; - if((mCargoTypes[0] == DAD_CATEGORY) + if ((mCargoTypes[0] == DAD_CATEGORY) && ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY))) { LLInventoryCategory* cat = gInventory.getCategory(cargo_id); // go ahead and fire & forget the descendents if we are not // dragging a protected folder. - if(cat) + if (cat) { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLNoPreferredTypeOrItem is_not_preferred; - LLInventoryFetchComboObserver::folder_ref_t folder_ids; - LLInventoryFetchComboObserver::item_ref_t item_ids; - if(is_not_preferred(cat, NULL)) + uuid_vec_t folder_ids; + uuid_vec_t item_ids; + if (is_not_preferred(cat, NULL)) { folder_ids.push_back(cargo_id); } - gInventory.collectDescendentsIf( + gInventory.collectDescendentsIf ( cargo_id, cats, items, @@ -471,10 +486,11 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, { item_ids.push_back(items.get(i)->getUUID()); } - if(!folder_ids.empty() || !item_ids.empty()) + if (!folder_ids.empty() || !item_ids.empty()) { - LLCategoryFireAndForget fetcher; - fetcher.fetch(folder_ids, item_ids); + LLCategoryFireAndForget *fetcher = new LLCategoryFireAndForget(folder_ids, item_ids); + fetcher->startFetch(); + delete fetcher; } } } @@ -482,7 +498,7 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type, void LLToolDragAndDrop::beginMultiDrag( const std::vector<EDragAndDropType> types, - const std::vector<LLUUID>& cargo_ids, + const uuid_vec_t& cargo_ids, ESource source, const LLUUID& source_id) { @@ -492,7 +508,7 @@ void LLToolDragAndDrop::beginMultiDrag( std::vector<EDragAndDropType>::const_iterator types_it; for (types_it = types.begin(); types_it != types.end(); ++types_it) { - if(DAD_NONE == *types_it) + if (DAD_NONE == *types_it) { llwarns << "Attempted to start drag without a cargo type" << llendl; return; @@ -506,7 +522,7 @@ void LLToolDragAndDrop::beginMultiDrag( setMouseCapture( TRUE ); LLToolMgr::getInstance()->setTransientTool( this ); mCursor = UI_CURSOR_NO; - if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) + if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { // find categories (i.e. inventory folders) in the cargo. LLInventoryCategory* cat = NULL; @@ -515,16 +531,16 @@ void LLToolDragAndDrop::beginMultiDrag( for(S32 i = 0; i < count; ++i) { cat = gInventory.getCategory(cargo_ids[i]); - if(cat) + if (cat) { LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLNoPreferredType is_not_preferred; - if(is_not_preferred(cat, NULL)) + if (is_not_preferred(cat, NULL)) { cat_ids.insert(cat->getUUID()); } - gInventory.collectDescendentsIf( + gInventory.collectDescendentsIf ( cat->getUUID(), cats, items, @@ -537,14 +553,13 @@ void LLToolDragAndDrop::beginMultiDrag( } } } - if(!cat_ids.empty()) + if (!cat_ids.empty()) { - LLInventoryFetchComboObserver::folder_ref_t folder_ids; - LLInventoryFetchComboObserver::item_ref_t item_ids; - std::back_insert_iterator<LLInventoryFetchDescendentsObserver::folder_ref_t> copier(folder_ids); + uuid_vec_t folder_ids; + uuid_vec_t item_ids; + std::back_insert_iterator<uuid_vec_t> copier(folder_ids); std::copy(cat_ids.begin(), cat_ids.end(), copier); - LLCategoryFireAndForget fetcher; - fetcher.fetch(folder_ids, item_ids); + LLCategoryFireAndForget fetcher(folder_ids, item_ids); } } } @@ -569,7 +584,7 @@ void LLToolDragAndDrop::onMouseCaptureLost() BOOL LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask ) { - if( hasMouseCapture() ) + if (hasMouseCapture()) { EAcceptance acceptance = ACCEPT_NO; dragOrDrop( x, y, mask, TRUE, &acceptance ); @@ -580,7 +595,7 @@ BOOL LLToolDragAndDrop::handleMouseUp( S32 x, S32 y, MASK mask ) ECursorType LLToolDragAndDrop::acceptanceToCursor( EAcceptance acceptance ) { - switch( acceptance ) + switch (acceptance) { case ACCEPT_YES_MULTI: if (mCargoIDs.size() > 1) @@ -697,7 +712,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, mToolTipMsg.clear(); - if(top_view) + if (top_view) { handled = TRUE; @@ -762,7 +777,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } - if(!handled) + if (!handled) { handled = TRUE; @@ -820,7 +835,7 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, } } - if ( !handled ) + if (!handled) { dragOrDrop3D( x, y, mask, drop, acceptance ); } @@ -873,7 +888,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) if (hit_obj->isAttachment() && !hit_obj->isHUDAttachment()) { LLVOAvatar* avatar = LLVOAvatar::findAvatarFromAttachment( hit_obj ); - if( !avatar ) + if (!avatar) { mLastAccept = ACCEPT_NO; mCursor = UI_CURSOR_NO; @@ -885,7 +900,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) if (hit_obj->isAvatar()) { - if(((LLVOAvatar*) hit_obj)->isSelf()) + if (((LLVOAvatar*) hit_obj)->isSelf()) { target = DT_SELF; hit_face = -1; @@ -959,7 +974,7 @@ void LLToolDragAndDrop::pick(const LLPickInfo& pick_info) gViewerWindow->getWindow()->setCursor( cursor ); mLastHitPos = pick_info.mPosGlobal; - mLastCameraPos = gAgent.getCameraPositionGlobal(); + mLastCameraPos = gAgentCamera.getCameraPositionGlobal(); } // static @@ -971,7 +986,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, // Always succeed if.... // texture is from the library // or already in the contents of the object - if(SOURCE_LIBRARY == source) + if (SOURCE_LIBRARY == source) { // dropping a texture from the library always just works. return TRUE; @@ -999,7 +1014,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, if (!item) return FALSE; LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item); - if(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) + if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) { // Check that we can add the texture as inventory to the object if (willObjectAcceptInventory(hit_obj,item) < ACCEPT_YES_COPY_SINGLE ) @@ -1007,20 +1022,20 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, return FALSE; } // make sure the object has the texture in it's inventory. - if(SOURCE_AGENT == source) + if (SOURCE_AGENT == source) { // Remove the texture from local inventory. The server // will actually remove the item from agent inventory. gInventory.deleteObject(item->getUUID()); gInventory.notifyObservers(); } - else if(SOURCE_WORLD == source) + else if (SOURCE_WORLD == source) { // *FIX: if the objects are in different regions, and the // source region has crashed, you can bypass these // permissions. LLViewerObject* src_obj = gObjectList.findObject(src_id); - if(src_obj) + if (src_obj) { src_obj->removeInventory(item->getUUID()); } @@ -1035,7 +1050,7 @@ BOOL LLToolDragAndDrop::handleDropTextureProtections(LLViewerObject* hit_obj, // TODO: Check to see if adding the item was successful; if not, then // we should return false here. } - else if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, + else if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { // Check that we can add the texture as inventory to the object @@ -1067,7 +1082,7 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj, } LLUUID asset_id = item->getAssetUUID(); BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id); - if(!success) + if (!success) { return; } @@ -1109,7 +1124,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj, } LLUUID asset_id = item->getAssetUUID(); BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id); - if(!success) + if (!success) { return; } @@ -1132,32 +1147,32 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, { // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) + if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { llwarns << "Call to LLToolDragAndDrop::dropScript() from world" << " or notecard." << llendl; return; } - if(hit_obj && item) + if (hit_obj && item) { LLPointer<LLViewerInventoryItem> new_script = new LLViewerInventoryItem(item); - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { - if(SOURCE_AGENT == source) + if (SOURCE_AGENT == source) { // Remove the script from local inventory. The server // will actually remove the item from agent inventory. gInventory.deleteObject(item->getUUID()); gInventory.notifyObservers(); } - else if(SOURCE_WORLD == source) + else if (SOURCE_WORLD == source) { // *FIX: if the objects are in different regions, and // the source region has crashed, you can bypass // these permissions. LLViewerObject* src_obj = gObjectList.findObject(src_id); - if(src_obj) + if (src_obj) { src_obj->removeInventory(item->getUUID()); } @@ -1173,7 +1188,7 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj, // VEFFECT: SetScript LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -1197,7 +1212,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return; + if (!item || !item->isFinished()) return; //if (regionp // && (regionp->getRegionFlags() & REGION_FLAGS_SANDBOX)) @@ -1208,7 +1223,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // this will remove the object from inventory after rez. Only // bother with this check if we would not normally remove from // inventory. - if(!remove_from_inventory + if (!remove_from_inventory && !item->getPermissions().allowCopyBy(gAgent.getID())) { remove_from_inventory = TRUE; @@ -1219,7 +1234,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // hitting objects that were clipped by the near plane or culled // on the viewer. LLUUID ray_target_id; - if( raycast_target ) + if (raycast_target) { ray_target_id = raycast_target->getID(); } @@ -1231,7 +1246,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // Check if it's in the trash. bool is_in_trash = false; const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { is_in_trash = true; remove_from_inventory = TRUE; @@ -1289,7 +1304,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); LLUUID folder_id = item->getParentUUID(); - if((SOURCE_LIBRARY == mSource) || (is_in_trash)) + if ((SOURCE_LIBRARY == mSource) || (is_in_trash)) { // since it's coming from the library or trash, we want to not // 'take' it back to the same place. @@ -1323,7 +1338,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, gViewerWindow->getWindow()->incBusyCount(); } - if(remove_from_inventory) + if (remove_from_inventory) { // Delete it from inventory immediately so that users cannot // easily bypass copy protection in laggy situations. If the @@ -1334,7 +1349,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target, // VEFFECT: DropObject LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setPositionGlobal(mLastHitPos); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -1349,7 +1364,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, { // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) + if ((SOURCE_WORLD == LLToolDragAndDrop::getInstance()->mSource) || (SOURCE_NOTECARD == LLToolDragAndDrop::getInstance()->mSource)) { llwarns << "Call to LLToolDragAndDrop::dropInventory() from world" @@ -1361,9 +1376,9 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, time_t creation_date = time_corrected(); new_item->setCreationDate(creation_date); - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { - if(SOURCE_AGENT == source) + if (SOURCE_AGENT == source) { // Remove the inventory item from local inventory. The // server will actually remove the item from agent @@ -1371,13 +1386,13 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, gInventory.deleteObject(item->getUUID()); gInventory.notifyObservers(); } - else if(SOURCE_WORLD == source) + else if (SOURCE_WORLD == source) { // *FIX: if the objects are in different regions, and the // source region has crashed, you can bypass these // permissions. LLViewerObject* src_obj = gObjectList.findObject(src_id); - if(src_obj) + if (src_obj) { src_obj->removeInventory(item->getUUID()); } @@ -1397,7 +1412,7 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, // VEFFECT: AddToInventory LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(hit_obj); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -1410,11 +1425,11 @@ void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, { llinfos << "LLToolDragAndDrop::giveInventory()" << llendl; - if(!isInventoryGiveAcceptable(item)) + if (!isInventoryGiveAcceptable(item)) { return; } - if(item->getPermissions().allowCopyBy(gAgent.getID())) + if (item->getPermissions().allowCopyBy(gAgent.getID())) { // just give it away. LLToolDragAndDrop::commitGiveInventoryItem(to_agent, item, im_session_id); @@ -1438,7 +1453,7 @@ bool LLToolDragAndDrop::handleCopyProtectedItem(const LLSD& notification, const { case 0: // "Yes" item = gInventory.getItem(notification["payload"]["item_id"].asUUID()); - if(item) + if (item) { LLToolDragAndDrop::commitGiveInventoryItem(notification["payload"]["agent_id"].asUUID(), item); @@ -1465,7 +1480,7 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent, LLInventoryItem* item, const LLUUID& im_session_id) { - if(!item) return; + if (!item) return; std::string name; LLAgentUI::buildFullname(name); LLUUID transaction_id; @@ -1495,7 +1510,7 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent, // VEFFECT: giveInventory LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(gObjectList.findObject(to_agent)); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -1542,21 +1557,17 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { - if(!cat) return; + if (!cat) return; llinfos << "LLToolDragAndDrop::giveInventoryCategory() - " << cat->getUUID() << llendl; - LLVOAvatar* my_avatar = gAgent.getAvatarObject(); - if( !my_avatar ) - { - return; - } + if (!isAgentAvatarValid()) return; // Test out how many items are being given. LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLGiveable giveable; - gInventory.collectDescendentsIf(cat->getUUID(), + gInventory.collectDescendentsIf (cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, @@ -1565,31 +1576,31 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, bool complete = true; for(S32 i = 0; i < count; ++i) { - if(!gInventory.isCategoryComplete(cats.get(i)->getUUID())) + if (!gInventory.isCategoryComplete(cats.get(i)->getUUID())) { complete = false; break; } } - if(!complete) + if (!complete) { LLNotificationsUtil::add("IncompleteInventory"); return; } count = items.count() + cats.count(); - if(count > MAX_ITEMS) + if (count > MAX_ITEMS) { LLNotificationsUtil::add("TooManyItems"); return; } - else if(count == 0) + else if (count == 0) { LLNotificationsUtil::add("NoItems"); return; } else { - if(0 == giveable.countNoCopy()) + if (0 == giveable.countNoCopy()) { LLToolDragAndDrop::commitGiveInventoryCategory(to_agent, cat, im_session_id); } @@ -1615,14 +1626,14 @@ bool LLToolDragAndDrop::handleCopyProtectedCategory(const LLSD& notification, co { case 0: // "Yes" cat = gInventory.getCategory(notification["payload"]["folder_id"].asUUID()); - if(cat) + if (cat) { LLToolDragAndDrop::commitGiveInventoryCategory(notification["payload"]["agent_id"].asUUID(), cat); LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLUncopyableItems remove; - gInventory.collectDescendentsIf(cat->getUUID(), + gInventory.collectDescendentsIf (cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, @@ -1653,7 +1664,7 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, const LLUUID& im_session_id) { - if(!cat) return; + if (!cat) return; llinfos << "LLToolDragAndDrop::commitGiveInventoryCategory() - " << cat->getUUID() << llendl; @@ -1664,7 +1675,7 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLGiveable giveable; - gInventory.collectDescendentsIf(cat->getUUID(), + gInventory.collectDescendentsIf (cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, @@ -1674,12 +1685,12 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, // MTUBYTES or 18 * count < 1200 => count < 1200/18 => // 66. I've cut it down a bit from there to give some pad. S32 count = items.count() + cats.count(); - if(count > MAX_ITEMS) + if (count > MAX_ITEMS) { LLNotificationsUtil::add("TooManyItems"); return; } - else if(count == 0) + else if (count == 0) { LLNotificationsUtil::add("NoItems"); return; @@ -1738,7 +1749,7 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, // VEFFECT: giveInventoryCategory LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(gObjectList.findObject(to_agent)); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -1753,35 +1764,31 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent, // static BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item) { - if(!item) + if (!item) { return FALSE; } - if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { return FALSE; } BOOL copyable = FALSE; - if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = TRUE; + if (item->getPermissions().allowCopyBy(gAgent.getID())) copyable = TRUE; - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if(!my_avatar) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; BOOL acceptable = TRUE; switch(item->getType()) { case LLAssetType::AT_OBJECT: - if(my_avatar->isWearingAttachment(item->getUUID())) + if (gAgentAvatarp->isWearingAttachment(item->getUUID())) { acceptable = FALSE; } break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: - if(!copyable && gAgentWearables.isWearingItem(item->getUUID())) + if (!copyable && gAgentWearables.isWearingItem(item->getUUID())) { acceptable = FALSE; } @@ -1795,33 +1802,29 @@ BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item) // Static BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item) { - if(!item) + if (!item) { return FALSE; } // These permissions are double checked in the simulator in // LLGroupNoticeInventoryItemFetch::result(). - if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { return FALSE; } - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { return FALSE; } - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if(!my_avatar) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; BOOL acceptable = TRUE; switch(item->getType()) { case LLAssetType::AT_OBJECT: - if(my_avatar->isWearingAttachment(item->getUUID())) + if (gAgentAvatarp->isWearingAttachment(item->getUUID())) { acceptable = FALSE; } @@ -1840,14 +1843,14 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL if (!item || !obj) return ACCEPT_NO; // HACK: downcast LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item; - if (!vitem->isComplete()) return ACCEPT_NO; + if (!vitem->isFinished()) return ACCEPT_NO; if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links // deny attempts to drop from an object onto itself. This is to // help make sure that drops that are from an object to an object // don't have to worry about order of evaluation. Think of this // like check for self in assignment. - if(obj->getID() == item->getParentUUID()) + if (obj->getID() == item->getParentUUID()) { return ACCEPT_NO; } @@ -1856,19 +1859,17 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL // gAgent.getGroupID()) // && (obj->mPermModify || obj->mFlagAllowInventoryAdd)); BOOL worn = FALSE; - LLVOAvatarSelf* my_avatar = NULL; switch(item->getType()) { case LLAssetType::AT_OBJECT: - my_avatar = gAgent.getAvatarObject(); - if(my_avatar && my_avatar->isWearingAttachment(item->getUUID())) + if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getUUID())) { worn = TRUE; } break; case LLAssetType::AT_BODYPART: case LLAssetType::AT_CLOTHING: - if(gAgentWearables.isWearingItem(item->getUUID())) + if (gAgentWearables.isWearingItem(item->getUUID())) { worn = TRUE; } @@ -1879,7 +1880,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL const LLPermissions& perm = item->getPermissions(); BOOL modify = (obj->permModify() || obj->flagAllowInventoryAdd()); BOOL transfer = FALSE; - if((obj->permYouOwner() && (perm.getOwner() == gAgent.getID())) + if ((obj->permYouOwner() && (perm.getOwner() == gAgent.getID())) || perm.allowOperationBy(PERM_TRANSFER, gAgent.getID())) { transfer = TRUE; @@ -1887,15 +1888,15 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL BOOL volume = (LL_PCODE_VOLUME == obj->getPCode()); BOOL attached = obj->isAttachment(); BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE; - if(attached && !unrestricted) + if (attached && !unrestricted) { return ACCEPT_NO_LOCKED; } - else if(modify && transfer && volume && !worn) + else if (modify && transfer && volume && !worn) { return ACCEPT_YES_MULTI; } - else if(!modify) + else if (!modify) { return ACCEPT_NO_LOCKED; } @@ -1926,12 +1927,12 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ case DAD_CALLINGCARD: { LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; - if(gInventory.getItem(inv_item->getUUID()) + if (gInventory.getItem(inv_item->getUUID()) && LLToolDragAndDrop::isInventoryGiveAcceptable(inv_item)) { // *TODO: get multiple object transfers working *accept = ACCEPT_YES_COPY_SINGLE; - if(drop) + if (drop) { LLToolDragAndDrop::giveInventory(dest_agent, inv_item, session_id); } @@ -1949,11 +1950,11 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ case DAD_CATEGORY: { LLViewerInventoryCategory* inv_cat = (LLViewerInventoryCategory*)cargo_data; - if( gInventory.getCategory( inv_cat->getUUID() ) ) + if (gInventory.getCategory(inv_cat->getUUID())) { // *TODO: get multiple object transfers working *accept = ACCEPT_YES_COPY_SINGLE; - if(drop) + if (drop) { LLToolDragAndDrop::giveInventoryCategory(dest_agent, inv_cat, session_id); } @@ -1994,7 +1995,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( { lldebugs << "LLToolDragAndDrop::dad3dRezAttachmentFromInv()" << llendl; // must be in the user's inventory - if(mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY) + if (mSource != SOURCE_AGENT && mSource != SOURCE_LIBRARY) { return ACCEPT_NO; } @@ -2002,25 +2003,24 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; // must not be in the trash const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { return ACCEPT_NO; } // must not be already wearing it - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if( !avatar || avatar->isWearingAttachment(item->getUUID()) ) + if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID())) { return ACCEPT_NO; } - if( drop ) + if (drop) { - if(mSource == SOURCE_LIBRARY) + if (mSource == SOURCE_LIBRARY) { LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0); copy_inventory_item( @@ -2052,10 +2052,9 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) ) + if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID())) { return ACCEPT_NO; } @@ -2080,7 +2079,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( // check if the item can be copied. If not, send that to the sim // which will remove the inventory item. - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; remove_inventory = TRUE; @@ -2088,13 +2087,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand( // Check if it's in the trash. const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; remove_inventory = TRUE; } - if(drop) + if (drop) { dropObject(obj, TRUE, FALSE, remove_inventory); } @@ -2115,24 +2114,23 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; - LLVOAvatarSelf* my_avatar = gAgent.getAvatarObject(); - if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) ) + if (!item || !item->isFinished()) return ACCEPT_NO; + if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID())) { return ACCEPT_NO; } - if((mask & MASK_CONTROL)) + if ((mask & MASK_CONTROL)) { // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if(mSource == SOURCE_NOTECARD) + if (mSource == SOURCE_NOTECARD) { return ACCEPT_NO; } EAcceptance rv = willObjectAcceptInventory(obj, item); - if(drop && (ACCEPT_YES_SINGLE <= rv)) + if (drop && (ACCEPT_YES_SINGLE <= rv)) { dropInventory(obj, item, mSource, mSourceID); } @@ -2158,7 +2156,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( // check if the item can be copied. If not, send that to the sim // which will remove the inventory item. - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { accept = ACCEPT_YES_SINGLE; remove_inventory = TRUE; @@ -2166,13 +2164,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject( // Check if it's in the trash. const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if(gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { accept = ACCEPT_YES_SINGLE; remove_inventory = TRUE; } - if(drop) + if (drop) { dropObject(obj, FALSE, FALSE, remove_inventory); } @@ -2187,7 +2185,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) + if ((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) { return ACCEPT_NO; } @@ -2195,9 +2193,9 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; EAcceptance rv = willObjectAcceptInventory(obj, item); - if(drop && (ACCEPT_YES_SINGLE <= rv)) + if (drop && (ACCEPT_YES_SINGLE <= rv)) { // rez in the script active by default, rez in inactive if the // control key is being held down. @@ -2225,7 +2223,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject( // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) + if ((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) { return ACCEPT_NO; } @@ -2233,29 +2231,29 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; EAcceptance rv = willObjectAcceptInventory(obj, item); - if((mask & MASK_CONTROL)) + if ((mask & MASK_CONTROL)) { - if((ACCEPT_YES_SINGLE <= rv) && drop) + if ((ACCEPT_YES_SINGLE <= rv) && drop) { dropInventory(obj, item, mSource, mSourceID); } return rv; } - if(!obj->permModify()) + if (!obj->permModify()) { return ACCEPT_NO_LOCKED; } //If texture !copyable don't texture or you'll never get it back. - if(!item->getPermissions().allowCopyBy(gAgent.getID())) + if (!item->getPermissions().allowCopyBy(gAgent.getID())) { return ACCEPT_NO; } - if(drop && (ACCEPT_YES_SINGLE <= rv)) + if (drop && (ACCEPT_YES_SINGLE <= rv)) { - if((mask & MASK_SHIFT)) + if ((mask & MASK_SHIFT)) { dropTextureAllFaces(obj, item, mSource, mSourceID); } @@ -2266,7 +2264,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject( // VEFFECT: SetTexture LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject(gAgent.getAvatarObject()); + effectp->setSourceObject(gAgentAvatarp); effectp->setTargetObject(obj); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); @@ -2280,9 +2278,9 @@ EAcceptance LLToolDragAndDrop::dad3dTextureSelf( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { lldebugs << "LLToolDragAndDrop::dad3dTextureAvatar()" << llendl; - if(drop) + if (drop) { - if( !(mask & MASK_SHIFT) ) + if (!(mask & MASK_SHIFT)) { dropTextureOneFaceAvatar( (LLVOAvatar*)obj, face, (LLInventoryItem*)mCargoData); } @@ -2298,18 +2296,18 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; - if(mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) + if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) { // it's in the agent inventory const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { return ACCEPT_NO; } - if( drop ) + if (drop) { // Don't wear anything until initial wearables are loaded, can // destroy clothing items. @@ -2319,7 +2317,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem( return ACCEPT_NO; } - if(mSource == SOURCE_LIBRARY) + if (mSource == SOURCE_LIBRARY) { // create item based on that one, and put it on if that // was a success. @@ -2353,21 +2351,21 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; - if(mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) + if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY) { // it's in the agent inventory const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if( gInventory.isObjectDescendentOf( item->getUUID(), trash_id ) ) + if (gInventory.isObjectDescendentOf(item->getUUID(), trash_id)) { return ACCEPT_NO; } - if( drop ) + if (drop) { LLUUID item_id; - if(mSource == SOURCE_LIBRARY) + if (mSource == SOURCE_LIBRARY) { // create item based on that one, and put it on if that // was a success. @@ -2382,7 +2380,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture( } else { - LLGestureManager::instance().activateGesture(item->getUUID()); + LLGestureMgr::instance().activateGesture(item->getUUID()); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -2402,7 +2400,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( LLViewerInventoryItem* item; LLViewerInventoryCategory* category; locateInventory(item, category); - if(!category) return ACCEPT_NO; + if (!category) return ACCEPT_NO; if (drop) { @@ -2415,26 +2413,26 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory( } } - if(mSource == SOURCE_AGENT) + if (mSource == SOURCE_AGENT) { const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); - if( gInventory.isObjectDescendentOf( category->getUUID(), trash_id ) ) + if (gInventory.isObjectDescendentOf(category->getUUID(), trash_id)) { return ACCEPT_NO; } - if(drop) + if (drop) { BOOL append = ( (mask & MASK_SHIFT) ? TRUE : FALSE ); - LLAppearanceManager::instance().wearInventoryCategory(category, false, append); + LLAppearanceMgr::instance().wearInventoryCategory(category, false, append); } return ACCEPT_YES_MULTI; } - else if(mSource == SOURCE_LIBRARY) + else if (mSource == SOURCE_LIBRARY) { - if(drop) + if (drop) { - LLAppearanceManager::instance().wearInventoryCategory(category, true, false); + LLAppearanceMgr::instance().wearInventoryCategory(category, true, false); } return ACCEPT_YES_MULTI; } @@ -2453,7 +2451,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. - if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) + if ((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource)) { return ACCEPT_NO; } @@ -2461,7 +2459,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; LLViewerObject* root_object = obj; if (obj && obj->getParent()) { @@ -2473,7 +2471,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory( } EAcceptance rv = willObjectAcceptInventory(root_object, item); - if(root_object && drop && (ACCEPT_YES_COPY_SINGLE <= rv)) + if (root_object && drop && (ACCEPT_YES_COPY_SINGLE <= rv)) { dropInventory(root_object, item, mSource, mSourceID); } @@ -2517,7 +2515,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( LLDroppableItem droppable(!obj->permYouOwner()); LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - gInventory.collectDescendentsIf(cat->getUUID(), + gInventory.collectDescendentsIf (cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, @@ -2546,7 +2544,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( { const LLViewerInventoryCategory *cat = (*cat_iter); rv = gInventory.isCategoryComplete(cat->getUUID()) ? ACCEPT_YES_MULTI : ACCEPT_NO; - if(rv < ACCEPT_YES_SINGLE) + if (rv < ACCEPT_YES_SINGLE) { lldebugs << "Category " << cat->getUUID() << "is not complete." << llendl; break; @@ -2579,7 +2577,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( // If every item is accepted, send it on if (drop && (ACCEPT_YES_COPY_SINGLE <= rv)) { - LLInventoryFetchObserver::item_ref_t ids; + uuid_vec_t ids; for (LLInventoryModel::item_array_t::const_iterator item_iter = items.begin(); item_iter != items.end(); ++item_iter) @@ -2587,9 +2585,9 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory( const LLViewerInventoryItem *item = (*item_iter); ids.push_back(item->getUUID()); } - LLCategoryDropObserver* dropper = new LLCategoryDropObserver(obj->getID(), mSource); - dropper->fetchItems(ids); - if(dropper->isEverythingComplete()) + LLCategoryDropObserver* dropper = new LLCategoryDropObserver(ids, obj->getID(), mSource); + dropper->startFetch(); + if (dropper->isFinished()) { dropper->done(); } @@ -2614,27 +2612,26 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject( lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryObject()" << llendl; // item has to be in agent inventory. - if(mSource != SOURCE_AGENT) return ACCEPT_NO; + if (mSource != SOURCE_AGENT) return ACCEPT_NO; // find the item now. LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; - if(!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + if (!item || !item->isFinished()) return ACCEPT_NO; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) { // cannot give away no-transfer objects return ACCEPT_NO; } - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if(avatar && avatar->isWearingAttachment( item->getUUID() ) ) + if (isAgentAvatarValid() && gAgentAvatarp->isWearingAttachment(item->getUUID())) { // You can't give objects that are attached to you return ACCEPT_NO; } - if( obj && avatar ) + if (obj && isAgentAvatarValid()) { - if(drop) + if (drop) { giveInventory(obj->getID(), item ); } @@ -2651,16 +2648,16 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory( { lldebugs << "LLToolDragAndDrop::dad3dGiveInventory()" << llendl; // item has to be in agent inventory. - if(mSource != SOURCE_AGENT) return ACCEPT_NO; + if (mSource != SOURCE_AGENT) return ACCEPT_NO; LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; - if(!isInventoryGiveAcceptable(item)) + if (!item || !item->isFinished()) return ACCEPT_NO; + if (!isInventoryGiveAcceptable(item)) { return ACCEPT_NO; } - if(drop && obj) + if (drop && obj) { giveInventory(obj->getID(), item); } @@ -2673,12 +2670,12 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryCategory( LLViewerObject* obj, S32 face, MASK mask, BOOL drop) { lldebugs << "LLToolDragAndDrop::dad3dGiveInventoryCategory()" << llendl; - if(drop && obj) + if (drop && obj) { LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!cat) return ACCEPT_NO; + if (!cat) return ACCEPT_NO; giveInventoryCategory(obj->getID(), cat); } // *TODO: deal with all the issues surrounding multi-object @@ -2694,14 +2691,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand( LLViewerInventoryItem* item = NULL; LLViewerInventoryCategory* cat = NULL; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; + if (!item || !item->isFinished()) return ACCEPT_NO; - if(!gAgent.allowOperation(PERM_COPY, item->getPermissions()) + if (!gAgent.allowOperation(PERM_COPY, item->getPermissions()) || !item->getPermissions().allowTransferTo(LLUUID::null)) { return ACCEPT_NO_LOCKED; } - if(drop) + if (drop) { dropObject(obj, TRUE, TRUE, FALSE); } @@ -2715,8 +2712,8 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( LLViewerInventoryItem* item; LLViewerInventoryCategory* cat; locateInventory(item, cat); - if(!item || !item->isComplete()) return ACCEPT_NO; - if((mask & MASK_CONTROL)) + if (!item || !item->isFinished()) return ACCEPT_NO; + if ((mask & MASK_CONTROL)) { // *HACK: In order to resolve SL-22177, we need to block drags // from notecards and objects onto other objects. @@ -2724,19 +2721,19 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject( // *HACK: uncomment this when appropriate //EAcceptance rv = willObjectAcceptInventory(obj, item); - //if(drop && (ACCEPT_YES_SINGLE <= rv)) + //if (drop && (ACCEPT_YES_SINGLE <= rv)) //{ // dropInventory(obj, item, mSource, mSourceID); //} //return rv; } - if(!item->getPermissions().allowCopyBy(gAgent.getID(), + if (!item->getPermissions().allowCopyBy(gAgent.getID(), gAgent.getGroupID()) || !item->getPermissions().allowTransferTo(LLUUID::null)) { return ACCEPT_NO_LOCKED; } - if(drop) + if (drop) { dropObject(obj, FALSE, TRUE, FALSE); } @@ -2752,23 +2749,23 @@ EAcceptance LLToolDragAndDrop::dad3dCategoryOnLand( LLInventoryItem* item; LLInventoryCategory* cat; locateInventory(item, cat); - if(!cat) return ACCEPT_NO; + if (!cat) return ACCEPT_NO; EAcceptance rv = ACCEPT_NO; // find all the items in the category LLViewerInventoryCategory::cat_array_t cats; LLViewerInventoryItem::item_array_t items; LLDropCopyableItems droppable; - gInventory.collectDescendentsIf(cat->getUUID(), + gInventory.collectDescendentsIf (cat->getUUID(), cats, items, LLInventoryModel::EXCLUDE_TRASH, droppable); - if(items.count() > 0) + if (items.count() > 0) { rv = ACCEPT_YES_SINGLE; } - if((rv >= ACCEPT_YES_COPY_SINGLE) && drop) + if ((rv >= ACCEPT_YES_COPY_SINGLE) && drop) { createContainer(items, cat->getName()); return ACCEPT_NO; @@ -2791,19 +2788,19 @@ EAcceptance LLToolDragAndDrop::dad3dAssetOnLand( LLViewerInventoryItem::item_array_t items; LLViewerInventoryItem::item_array_t copyable_items; locateMultipleInventory(items, cats); - if(!items.count()) return ACCEPT_NO; + if (!items.count()) return ACCEPT_NO; EAcceptance rv = ACCEPT_NO; for (S32 i = 0; i < items.count(); i++) { LLInventoryItem* item = items[i]; - if(item->getPermissions().allowCopyBy(gAgent.getID())) + if (item->getPermissions().allowCopyBy(gAgent.getID())) { copyable_items.put(item); rv = ACCEPT_YES_SINGLE; } } - if((rv >= ACCEPT_YES_COPY_SINGLE) && drop) + if ((rv >= ACCEPT_YES_COPY_SINGLE) && drop) { createContainer(copyable_items, NULL); } @@ -2818,20 +2815,20 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( { item = NULL; cat = NULL; - if(mCargoIDs.empty()) return NULL; - if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) + if (mCargoIDs.empty()) return NULL; + if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { // The object should be in user inventory. item = (LLViewerInventoryItem*)gInventory.getItem(mCargoIDs[mCurItemIndex]); cat = (LLViewerInventoryCategory*)gInventory.getCategory(mCargoIDs[mCurItemIndex]); } - else if(mSource == SOURCE_WORLD) + else if (mSource == SOURCE_WORLD) { // This object is in some task inventory somewhere. LLViewerObject* obj = gObjectList.findObject(mSourceID); - if(obj) + if (obj) { - if((mCargoTypes[mCurItemIndex] == DAD_CATEGORY) + if ((mCargoTypes[mCurItemIndex] == DAD_CATEGORY) || (mCargoTypes[mCurItemIndex] == DAD_ROOT_CATEGORY)) { cat = (LLViewerInventoryCategory*)obj->getInventoryObject(mCargoIDs[mCurItemIndex]); @@ -2842,16 +2839,16 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( } } } - else if(mSource == SOURCE_NOTECARD) + else if (mSource == SOURCE_NOTECARD) { LLPreviewNotecard* preview = LLFloaterReg::findTypedInstance<LLPreviewNotecard>("preview_notecard", mSourceID); - if(preview) + if (preview) { item = (LLViewerInventoryItem*)preview->getDragItem(); } } - if(item) return item; - if(cat) return cat; + if (item) return item; + if (cat) return cat; return NULL; } @@ -2859,8 +2856,8 @@ LLInventoryObject* LLToolDragAndDrop::locateInventory( LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryCategory::cat_array_t& cats, LLViewerInventoryItem::item_array_t& items) { - if(mCargoIDs.count() == 0) return NULL; - if((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) + if (mCargoIDs.count() == 0) return NULL; + if ((mSource == SOURCE_AGENT) || (mSource == SOURCE_LIBRARY)) { // The object should be in user inventory. for (S32 i = 0; i < mCargoIDs.count(); i++) @@ -2877,13 +2874,13 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC } } } - else if(mSource == SOURCE_WORLD) + else if (mSource == SOURCE_WORLD) { // This object is in some task inventory somewhere. LLViewerObject* obj = gObjectList.findObject(mSourceID); - if(obj) + if (obj) { - if((mCargoType == DAD_CATEGORY) + if ((mCargoType == DAD_CATEGORY) || (mCargoType == DAD_ROOT_CATEGORY)) { // The object should be in user inventory. @@ -2909,17 +2906,17 @@ LLInventoryObject* LLToolDragAndDrop::locateMultipleInventory(LLViewerInventoryC } } } - else if(mSource == SOURCE_NOTECARD) + else if (mSource == SOURCE_NOTECARD) { LLPreviewNotecard* card; card = (LLPreviewNotecard*)LLPreview::find(mSourceID); - if(card) + if (card) { items.put((LLInventoryItem*)card->getDragItem()); } } - if(items.count()) return items[0]; - if(cats.count()) return cats[0]; + if (items.count()) return items[0]; + if (cats.count()) return cats[0]; return NULL; } */ diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 0da13dac8b..85d003e5fc 100644 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -81,7 +81,7 @@ public: const LLUUID& source_id = LLUUID::null, const LLUUID& object_id = LLUUID::null); void beginMultiDrag(const std::vector<EDragAndDropType> types, - const std::vector<LLUUID>& cargo_ids, + const uuid_vec_t& cargo_ids, ESource source, const LLUUID& source_id = LLUUID::null); void endDrag(); @@ -125,7 +125,7 @@ protected: std::vector<EDragAndDropType> mCargoTypes; //void* mCargoData; - std::vector<LLUUID> mCargoIDs; + uuid_vec_t mCargoIDs; ESource mSource; LLUUID mSourceID; LLUUID mObjectID; diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 2320ae57df..032714cabf 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -42,6 +42,7 @@ // Viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llbutton.h" #include "llviewercontrol.h" #include "lldrawable.h" @@ -167,19 +168,17 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) } } - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() ) + if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { BOOL good_customize_avatar_hit = FALSE; if( hit_obj ) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( hit_obj == avatar) + if (isAgentAvatarValid() && (hit_obj == gAgentAvatarp)) { // It's you good_customize_avatar_hit = TRUE; } - else - if( hit_obj->isAttachment() && hit_obj->permYouOwner() ) + else if (hit_obj->isAttachment() && hit_obj->permYouOwner()) { // It's an attachment that you're wearing good_customize_avatar_hit = TRUE; @@ -207,23 +206,23 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) // ...clicked on a world object, so focus at its position if (!hit_obj->isHUDAttachment()) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(pick_info); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(pick_info); } } else if (!pick_info.mPosGlobal.isExactlyZero()) { // Hit the ground - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(pick_info); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(pick_info); } if (!(pick_info.mKeyMask & MASK_ALT) && - gAgent.cameraThirdPerson() && + gAgentCamera.cameraThirdPerson() && gViewerWindow->getLeftMouseDown() && !gSavedSettings.getBOOL("FreezeTime") && - (hit_obj == gAgent.getAvatarObject() || - (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) + (hit_obj == gAgentAvatarp || + (hit_obj && hit_obj->isAttachment() && LLVOAvatar::findAvatarFromAttachment(hit_obj)->isSelf()))) { LLToolCamera::getInstance()->mMouseSteering = TRUE; } @@ -232,14 +231,14 @@ void LLToolCamera::pickCallback(const LLPickInfo& pick_info) LLToolCamera::getInstance()->mValidClickPoint = TRUE; - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() ) + if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { - gAgent.setFocusOnAvatar(FALSE, FALSE); + gAgentCamera.setFocusOnAvatar(FALSE, FALSE); - LLVector3d cam_pos = gAgent.getCameraPositionGlobal(); - cam_pos -= LLVector3d(LLViewerCamera::getInstance()->getLeftAxis() * gAgent.calcCustomizeAvatarUIOffset( cam_pos )); + LLVector3d cam_pos = gAgentCamera.getCameraPositionGlobal(); + cam_pos -= LLVector3d(LLViewerCamera::getInstance()->getLeftAxis() * gAgentCamera.calcCustomizeAvatarUIOffset( cam_pos )); - gAgent.setCameraPosAndFocusGlobal( cam_pos, pick_info.mPosGlobal, pick_info.mObjectID); + gAgentCamera.setCameraPosAndFocusGlobal( cam_pos, pick_info.mPosGlobal, pick_info.mObjectID); } } @@ -280,10 +279,10 @@ BOOL LLToolCamera::handleMouseUp(S32 x, S32 y, MASK mask) { if (mValidClickPoint) { - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() ) + if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { LLCoordGL mouse_pos; - LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgent.getFocusGlobal()); + LLVector3 focus_pos = gAgent.getPosAgentFromGlobal(gAgentCamera.getFocusGlobal()); BOOL success = LLViewerCamera::getInstance()->projectPosAgentToScreen(focus_pos, mouse_pos); if (success) { @@ -369,12 +368,12 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) if (dx != 0) { - gAgent.cameraOrbitAround( -dx * RADIANS_PER_PIXEL ); + gAgentCamera.cameraOrbitAround( -dx * RADIANS_PER_PIXEL ); } if (dy != 0) { - gAgent.cameraOrbitOver( -dy * RADIANS_PER_PIXEL ); + gAgentCamera.cameraOrbitOver( -dy * RADIANS_PER_PIXEL ); } gViewerWindow->moveCursorToCenter(); @@ -388,8 +387,8 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) // Pan tool if (hasMouseCapture()) { - LLVector3d camera_to_focus = gAgent.getCameraPositionGlobal(); - camera_to_focus -= gAgent.getFocusGlobal(); + LLVector3d camera_to_focus = gAgentCamera.getCameraPositionGlobal(); + camera_to_focus -= gAgentCamera.getFocusGlobal(); F32 dist = (F32) camera_to_focus.normVec(); // Fudge factor for pan @@ -397,12 +396,12 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) if (dx != 0) { - gAgent.cameraPanLeft( dx * meters_per_pixel ); + gAgentCamera.cameraPanLeft( dx * meters_per_pixel ); } if (dy != 0) { - gAgent.cameraPanUp( -dy * meters_per_pixel ); + gAgentCamera.cameraPanUp( -dy * meters_per_pixel ); } gViewerWindow->moveCursorToCenter(); @@ -419,7 +418,7 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) if (dx != 0) { - gAgent.cameraOrbitAround( -dx * RADIANS_PER_PIXEL ); + gAgentCamera.cameraOrbitAround( -dx * RADIANS_PER_PIXEL ); } const F32 IN_FACTOR = 0.99f; @@ -428,11 +427,11 @@ BOOL LLToolCamera::handleHover(S32 x, S32 y, MASK mask) { if (mMouseSteering) { - gAgent.cameraOrbitOver( -dy * RADIANS_PER_PIXEL ); + gAgentCamera.cameraOrbitOver( -dy * RADIANS_PER_PIXEL ); } else { - gAgent.cameraZoomIn( pow( IN_FACTOR, dy ) ); + gAgentCamera.cameraZoomIn( pow( IN_FACTOR, dy ) ); } } diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index d837a334f1..04d873f91b 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -46,6 +46,7 @@ // newview headers #include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "llfloatertools.h" #include "llhudeffect.h" @@ -225,7 +226,7 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) // non-touchable objects. If it has a touch handler, we // do grab it (so llDetectedGrab works), but movement is // blocked on the server side. JC - if (gAgent.cameraMouselook()) + if (gAgentCamera.cameraMouselook()) { mMode = GRAB_LOCKED; } @@ -285,8 +286,8 @@ BOOL LLToolGrab::handleObjectHit(const LLPickInfo& info) LLVector3 local_edit_point = gAgent.getPosAgentFromGlobal(info.mPosGlobal); local_edit_point -= edit_object->getPositionAgent(); local_edit_point = local_edit_point * ~edit_object->getRenderRotation(); - gAgent.setPointAt(POINTAT_TARGET_GRAB, edit_object, local_edit_point ); - gAgent.setLookAt(LOOKAT_TARGET_SELECT, edit_object, local_edit_point ); + gAgentCamera.setPointAt(POINTAT_TARGET_GRAB, edit_object, local_edit_point ); + gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, edit_object, local_edit_point ); } // on transient grabs (clicks on world objects), kill the grab immediately @@ -390,7 +391,7 @@ void LLToolGrab::startGrab() // This planar drag starts at the grab point mDragStartPointGlobal = grab_start_global; - mDragStartFromCamera = grab_start_global - gAgent.getCameraPositionGlobal(); + mDragStartFromCamera = grab_start_global - gAgentCamera.getCameraPositionGlobal(); LLMessageSystem *msg = gMessageSystem; msg->newMessageFast(_PREHASH_ObjectGrab); @@ -502,7 +503,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) mVerticalDragging = FALSE; mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp); - mDragStartFromCamera = mDragStartPointGlobal - gAgent.getCameraPositionGlobal(); + mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal(); } else if (!mVerticalDragging && (mask == MASK_VERTICAL) ) { @@ -510,7 +511,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) mVerticalDragging = TRUE; mDragStartPointGlobal = gViewerWindow->clickPointInWorldGlobal(x, y, objectp); - mDragStartFromCamera = mDragStartPointGlobal - gAgent.getCameraPositionGlobal(); + mDragStartFromCamera = mDragStartPointGlobal - gAgentCamera.getCameraPositionGlobal(); } const F32 RADIANS_PER_PIXEL_X = 0.01f; @@ -598,7 +599,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // need to return offset from mGrabStartPoint LLVector3d grab_point_global; - grab_point_global = gAgent.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; + grab_point_global = gAgentCamera.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; /* Snap to grid disabled for grab tool - very confusing // Handle snapping to grid, but only when the tool is formally selected. @@ -632,7 +633,7 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) grab_point_global = LLWorld::getInstance()->clipToVisibleRegions(mDragStartPointGlobal, grab_point_global); // propagate constrained grab point back to grab offset - mGrabHiddenOffsetFromCamera = grab_point_global - gAgent.getCameraPositionGlobal(); + mGrabHiddenOffsetFromCamera = grab_point_global - gAgentCamera.getCameraPositionGlobal(); // Handle auto-rotation at screen edge. LLVector3 grab_pos_agent = gAgent.getPosAgentFromGlobal( grab_point_global ); @@ -646,24 +647,24 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // ...build mode moves camera about focus point if (grab_center_gl.mX < ROTATE_H_MARGIN) { - if (gAgent.getFocusOnAvatar()) + if (gAgentCamera.getFocusOnAvatar()) { gAgent.yaw(rotate_angle); } else { - gAgent.cameraOrbitAround(rotate_angle); + gAgentCamera.cameraOrbitAround(rotate_angle); } } else if (grab_center_gl.mX > gViewerWindow->getWorldViewWidthScaled() - ROTATE_H_MARGIN) { - if (gAgent.getFocusOnAvatar()) + if (gAgentCamera.getFocusOnAvatar()) { gAgent.yaw(-rotate_angle); } else { - gAgent.cameraOrbitAround(-rotate_angle); + gAgentCamera.cameraOrbitAround(-rotate_angle); } } @@ -705,17 +706,17 @@ void LLToolGrab::handleHoverActive(S32 x, S32 y, MASK mask) // once we've initiated a drag, lock the camera down if (mHasMoved) { - if (!gAgent.cameraMouselook() && + if (!gAgentCamera.cameraMouselook() && !objectp->isHUDAttachment() && - objectp->getRoot() == gAgent.getAvatarObject()->getRoot()) + objectp->getRoot() == gAgentAvatarp->getRoot()) { // force focus to point in space where we were looking previously - gAgent.setFocusGlobal(gAgent.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); } else { - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); } } @@ -814,7 +815,7 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask) } // need to return offset from mGrabStartPoint - LLVector3d grab_point_global = gAgent.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; + LLVector3d grab_point_global = gAgentCamera.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; grab_pos_region = objectp->getRegion()->getPosRegionFromGlobal( grab_point_global ); } @@ -872,8 +873,8 @@ void LLToolGrab::handleHoverNonPhysical(S32 x, S32 y, MASK mask) LLVector3 local_edit_point = pick.mIntersection; local_edit_point -= objectp->getPositionAgent(); local_edit_point = local_edit_point * ~objectp->getRenderRotation(); - gAgent.setPointAt(POINTAT_TARGET_GRAB, objectp, local_edit_point ); - gAgent.setLookAt(LOOKAT_TARGET_SELECT, objectp, local_edit_point ); + gAgentCamera.setPointAt(POINTAT_TARGET_GRAB, objectp, local_edit_point ); + gAgentCamera.setLookAt(LOOKAT_TARGET_SELECT, objectp, local_edit_point ); } @@ -892,7 +893,7 @@ void LLToolGrab::handleHoverInactive(S32 x, S32 y, MASK mask) // Only works in fullscreen if (gSavedSettings.getBOOL("WindowFullScreen")) { - if (gAgent.cameraThirdPerson() ) + if (gAgentCamera.cameraThirdPerson() ) { if (x == 0) { @@ -994,7 +995,7 @@ void LLToolGrab::onMouseCaptureLost() return; } // First, fix cursor placement - if( !gAgent.cameraMouselook() + if( !gAgentCamera.cameraMouselook() && (GRAB_ACTIVE_CENTER == mMode)) { if (objectp->isHUDAttachment()) @@ -1035,8 +1036,8 @@ void LLToolGrab::onMouseCaptureLost() mGrabPick.mObjectID.setNull(); LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgent.setPointAt(POINTAT_TARGET_CLEAR); - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.setPointAt(POINTAT_TARGET_CLEAR); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); dialog_refresh_all(); } @@ -1128,7 +1129,7 @@ LLVector3d LLToolGrab::getGrabPointGlobal() case GRAB_ACTIVE_CENTER: case GRAB_NONPHYSICAL: case GRAB_LOCKED: - return gAgent.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; + return gAgentCamera.getCameraPositionGlobal() + mGrabHiddenOffsetFromCamera; case GRAB_NOOBJECT: case GRAB_INACTIVE: diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp index a441d653c7..c815f1e96a 100644 --- a/indra/newview/lltoolgun.cpp +++ b/indra/newview/lltoolgun.cpp @@ -36,6 +36,7 @@ #include "llviewerwindow.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llsky.h" #include "llappviewer.h" @@ -83,7 +84,7 @@ BOOL LLToolGun::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask) { - if( gAgent.cameraMouselook() && mIsSelected ) + if( gAgentCamera.cameraMouselook() && mIsSelected ) { const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f; diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index fd12163fd3..a8696c22ef 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -56,6 +56,7 @@ #include "lltoolobjpicker.h" #include "lltoolpipette.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llviewerjoystick.h" #include "llviewermenu.h" @@ -262,7 +263,7 @@ void LLToolMgr::toggleBuildMode() else { // manually disable edit mode, but do not affect the camera - gAgent.resetView(false); + gAgentCamera.resetView(false); LLFloaterReg::hideInstance("build"); gViewerWindow->showCursor(); } @@ -271,7 +272,7 @@ void LLToolMgr::toggleBuildMode() } else { - ECameraMode camMode = gAgent.getCameraMode(); + ECameraMode camMode = gAgentCamera.getCameraMode(); if (CAMERA_MODE_MOUSELOOK == camMode || CAMERA_MODE_CUSTOMIZE_AVATAR == camMode) { // pull the user out of mouselook or appearance mode when entering build mode @@ -286,13 +287,13 @@ void LLToolMgr::toggleBuildMode() handle_toggle_flycam(); } - if (gAgent.getFocusOnAvatar()) + if (gAgentCamera.getFocusOnAvatar()) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(gAgent.getPositionGlobal() + 2.0 * LLVector3d(gAgent.getAtAxis())); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); } } @@ -303,7 +304,7 @@ void LLToolMgr::toggleBuildMode() // Could be first use //LLFirstUse::useBuild(); - gAgent.resetView(false); + gAgentCamera.resetView(false); // avoid spurious avatar movements LLViewerJoystick::getInstance()->setNeedsReset(); @@ -317,7 +318,7 @@ bool LLToolMgr::inBuildMode() // cameraMouselook() actually starts returning true. Also, appearance edit // sets build mode to true, so let's exclude that. bool b=(inEdit() - && !gAgent.cameraMouselook() + && !gAgentCamera.cameraMouselook() && mCurrentToolset != gFaceEditToolset); return b; diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 79846b9160..22176c037f 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -145,22 +145,20 @@ void LLVisualParamHint::requestHintUpdates( LLVisualParamHint* exception1, LLVis BOOL LLVisualParamHint::needsRender() { - return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgent.getAvatarObject()->mAppearanceAnimating && mAllowsUpdates; + return mNeedsUpdate && mDelayFrames-- <= 0 && !gAgentAvatarp->mAppearanceAnimating && mAllowsUpdates; } void LLVisualParamHint::preRender(BOOL clear_depth) { - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - mLastParamWeight = mVisualParam->getWeight(); mVisualParam->setWeight(mVisualParamWeight, FALSE); - avatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); - avatarp->setVisualParamWeight("Blink_Left", 0.f); - avatarp->setVisualParamWeight("Blink_Right", 0.f); - avatarp->updateComposites(); - avatarp->updateVisualParams(); - avatarp->updateGeometry(avatarp->mDrawable); - avatarp->updateLOD(); + gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mVisualParamWeight, FALSE); + gAgentAvatarp->setVisualParamWeight("Blink_Left", 0.f); + gAgentAvatarp->setVisualParamWeight("Blink_Right", 0.f); + gAgentAvatarp->updateComposites(); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable); + gAgentAvatarp->updateLOD(); LLViewerDynamicTexture::preRender(clear_depth); } @@ -171,7 +169,6 @@ void LLVisualParamHint::preRender(BOOL clear_depth) BOOL LLVisualParamHint::render() { LLVisualParamReset::sDirty = TRUE; - LLVOAvatar* avatarp = gAgent.getAvatarObject(); gGL.pushUIMatrix(); gGL.loadUIIdentity(); @@ -202,7 +199,7 @@ BOOL LLVisualParamHint::render() const std::string& cam_target_mesh_name = mVisualParam->getCameraTargetName(); if( !cam_target_mesh_name.empty() ) { - cam_target_joint = (LLViewerJointMesh*)avatarp->getJoint( cam_target_mesh_name ); + cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint( cam_target_mesh_name ); } if( !cam_target_joint ) { @@ -210,11 +207,11 @@ BOOL LLVisualParamHint::render() } if( !cam_target_joint ) { - cam_target_joint = (LLViewerJointMesh*)avatarp->getJoint("mHead"); + cam_target_joint = (LLViewerJointMesh*)gAgentAvatarp->getJoint("mHead"); } LLQuaternion avatar_rotation; - LLJoint* root_joint = avatarp->getRootJoint(); + LLJoint* root_joint = gAgentAvatarp->getRootJoint(); if( root_joint ) { avatar_rotation = root_joint->getWorldRotation(); @@ -242,17 +239,17 @@ BOOL LLVisualParamHint::render() LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mFullWidth, mFullHeight, FALSE); - if (avatarp->mDrawable.notNull()) + if (gAgentAvatarp->mDrawable.notNull()) { - LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); + LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)gAgentAvatarp->mDrawable->getFace(0)->getPool(); LLGLDepthTest gls_depth(GL_TRUE, GL_TRUE); gGL.setAlphaRejectSettings(LLRender::CF_ALWAYS); gGL.setSceneBlendType(LLRender::BT_REPLACE); - avatarPoolp->renderAvatars(avatarp); // renders only one avatar + avatarPoolp->renderAvatars(gAgentAvatarp); // renders only one avatar gGL.setSceneBlendType(LLRender::BT_ALPHA); gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); } - avatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); + gAgentAvatarp->setVisualParamWeight(mVisualParam->getID(), mLastParamWeight); mVisualParam->setWeight(mLastParamWeight, FALSE); gGL.color4f(1,1,1,1); mGLTexturep->setGLTextureCreated(true); @@ -309,10 +306,9 @@ BOOL LLVisualParamReset::render() { if (sDirty) { - LLVOAvatarSelf* avatarp = gAgent.getAvatarObject(); - avatarp->updateComposites(); - avatarp->updateVisualParams(); - avatarp->updateGeometry(avatarp->mDrawable); + gAgentAvatarp->updateComposites(); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->updateGeometry(gAgentAvatarp->mDrawable); sDirty = FALSE; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index aa5c99439c..ae244cd8a1 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -39,6 +39,7 @@ #include "llparcel.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llfocusmgr.h" //#include "llfirstuse.h" @@ -180,10 +181,10 @@ BOOL LLToolPie::pickLeftMouseDownCallback() parent = object->getRootEdit(); } - - BOOL touchable = (object && object->flagHandleTouch()) - || (parent && parent->flagHandleTouch()); - + if (handleMediaClick(mPick)) + { + return TRUE; + } // If it's a left-click, and we have a special action, do it. if (useClickAction(mask, object, parent)) @@ -204,15 +205,15 @@ BOOL LLToolPie::pickLeftMouseDownCallback() // touch behavior down below... break; case CLICK_ACTION_SIT: - - if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // agent not already sitting { - handle_object_sit_or_stand(); - // put focus in world when sitting on an object - gFocusMgr.setKeyboardFocus(NULL); - return TRUE; - } // else nothing (fall through to touch) - + if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting + { + handle_object_sit_or_stand(); + // put focus in world when sitting on an object + gFocusMgr.setKeyboardFocus(NULL); + return TRUE; + } // else nothing (fall through to touch) + } case CLICK_ACTION_PAY: if ((object && object->flagTakesMoney()) || (parent && parent->flagTakesMoney())) @@ -263,7 +264,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() if (object) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent() ; F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -273,7 +274,7 @@ BOOL LLToolPie::pickLeftMouseDownCallback() obj_to_cam.normVec(); LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); - gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), object_center_global, mPick.mObjectID ); } @@ -285,14 +286,12 @@ BOOL LLToolPie::pickLeftMouseDownCallback() } } - if (handleMediaClick(mPick)) - { - return TRUE; - } - // put focus back "in world" gFocusMgr.setKeyboardFocus(NULL); + BOOL touchable = (object && object->flagHandleTouch()) + || (parent && parent->flagHandleTouch()); + // Switch to grab tool if physical or triggerable if (object && !object->isAvatar() && @@ -329,14 +328,14 @@ BOOL LLToolPie::pickLeftMouseDownCallback() } object = (LLViewerObject*)object->getParent(); } - if (object && object == gAgent.getAvatarObject()) + if (object && object == gAgentAvatarp) { // we left clicked on avatar, switch to focus mode LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance()); gViewerWindow->hideCursor(); LLToolCamera::getInstance()->setMouseCapture(TRUE); LLToolCamera::getInstance()->pickCallback(mPick); - gAgent.setFocusOnAvatar(TRUE, TRUE); + gAgentCamera.setFocusOnAvatar(TRUE, TRUE); return TRUE; } @@ -410,9 +409,11 @@ ECursorType cursor_from_object(LLViewerObject* object) switch(click_action) { case CLICK_ACTION_SIT: - if ((gAgent.getAvatarObject() != NULL) && (!gAgent.getAvatarObject()->isSitting())) // not already sitting? { - cursor = UI_CURSOR_TOOLSIT; + if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting? + { + cursor = UI_CURSOR_TOOLSIT; + } } break; case CLICK_ACTION_BUY: @@ -510,21 +511,22 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask) } LLViewerObject* click_action_object = click_action_pick.getObject(); - if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit())) + if (handleMediaHover(mHoverPick)) { + // *NOTE: If you think the hover glow conflicts with the media outline, you + // could disable it here. show_highlight = true; - ECursorType cursor = cursor_from_object(click_action_object); - gViewerWindow->setCursor(cursor); + // cursor set by media object lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } - else if (handleMediaHover(mHoverPick)) + else if (click_action_object && useClickAction(mask, click_action_object, click_action_object->getRootEdit())) { - // *NOTE: If you think the hover glow conflicts with the media outline, you - // could disable it here. show_highlight = true; - // cursor set by media object + ECursorType cursor = cursor_from_object(click_action_object); + gViewerWindow->setCursor(cursor); lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolPie (inactive)" << llendl; } + else if ((object && !object->isAvatar() && object->usePhysics()) || (parent && !parent->isAvatar() && parent->usePhysics())) { @@ -595,7 +597,7 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask) mGrabMouseButtonDown = FALSE; LLToolMgr::getInstance()->clearTransientTool(); - gAgent.setLookAt(LOOKAT_TARGET_CONVERSATION, obj); // maybe look at object/person clicked on + gAgentCamera.setLookAt(LOOKAT_TARGET_CONVERSATION, obj); // maybe look at object/person clicked on return LLTool::handleMouseUp(x, y, mask); } @@ -1265,6 +1267,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) if (!parcel || objectp.isNull() || + objectp->isHUDAttachment() || pick.mObjectFace < 0 || pick.mObjectFace >= objectp->getNumTEs()) { diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp index 612bcc03bd..91f01f0b36 100644 --- a/indra/newview/lltoolplacer.cpp +++ b/indra/newview/lltoolplacer.cpp @@ -56,11 +56,13 @@ #include "llvolumemessage.h" #include "llhudmanager.h" #include "llagent.h" +#include "llagentcamera.h" #include "llaudioengine.h" #include "llhudeffecttrail.h" #include "llviewerobjectlist.h" #include "llviewercamera.h" #include "llviewerstats.h" +#include "llvoavatarself.h" // linden library headers #include "llprimitive.h" @@ -120,7 +122,7 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj, } // Make sure the surface isn't too far away. - LLVector3d ray_start_global = gAgent.getCameraPositionGlobal(); + LLVector3d ray_start_global = gAgentCamera.getCameraPositionGlobal(); F32 dist_to_surface_sq = (F32)((surface_pos_global - ray_start_global).magVecSquared()); if( dist_to_surface_sq > (max_dist_from_camera * max_dist_from_camera) ) { @@ -432,7 +434,7 @@ BOOL LLToolPlacer::addObject( LLPCode pcode, S32 x, S32 y, U8 use_physics ) // VEFFECT: AddObject LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE); - effectp->setSourceObject((LLViewerObject*)gAgent.getAvatarObject()); + effectp->setSourceObject((LLViewerObject*)gAgentAvatarp); effectp->setPositionGlobal(regionp->getPosGlobalFromRegion(ray_end_region)); effectp->setDuration(LL_HUD_DUR_SHORT); effectp->setColor(LLColor4U(gAgent.getEffectColor())); diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp index 97e2865179..2065ba1791 100644 --- a/indra/newview/lltoolselect.cpp +++ b/indra/newview/lltoolselect.cpp @@ -35,6 +35,7 @@ #include "lltoolselect.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "lldrawable.h" #include "llmanip.h" @@ -167,9 +168,9 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi LLSelectMgr::getInstance()->setAgentHUDZoom(target_zoom, current_zoom); } - if (!gAgent.getFocusOnAvatar() && // if camera not glued to avatar - LLVOAvatar::findAvatarFromAttachment(object) != gAgent.getAvatarObject() && // and it's not one of your attachments - object != gAgent.getAvatarObject()) // and it's not you + if (!gAgentCamera.getFocusOnAvatar() && // if camera not glued to avatar + LLVOAvatar::findAvatarFromAttachment(object) != gAgentAvatarp && // and it's not one of your attachments + object != gAgentAvatarp) // and it's not you { // have avatar turn to face the selected object(s) LLVector3d selection_center = LLSelectMgr::getInstance()->getSelectionCenterGlobal(); diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 407cc23d0d..cc074287c4 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -39,6 +39,7 @@ #include "llgl.h" #include "llrender.h" #include "llinventory.h" +#include "llinventorydefines.h" #include "llpointer.h" #include "llstring.h" #include "lluuid.h" @@ -50,6 +51,7 @@ #include "llappviewer.h" #include "lltracker.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcallingcard.h" #include "llfloaterworldmap.h" #include "llhudtext.h" @@ -480,14 +482,14 @@ void LLTracker::renderBeacon(LLVector3d pos_global, const std::string& label ) { sCheesyBeacon = gSavedSettings.getBOOL("CheesyBeacon"); - LLVector3d to_vec = pos_global - gAgent.getCameraPositionGlobal(); + LLVector3d to_vec = pos_global - gAgentCamera.getCameraPositionGlobal(); F32 dist = (F32)to_vec.magVec(); F32 color_frac = 1.f; if (dist > 0.99f * LLViewerCamera::getInstance()->getFar()) { color_frac = 0.4f; - // pos_global = gAgent.getCameraPositionGlobal() + 0.99f*(LLViewerCamera::getInstance()->getFar()/dist)*to_vec; + // pos_global = gAgentCamera.getCameraPositionGlobal() + 0.99f*(LLViewerCamera::getInstance()->getFar()/dist)*to_vec; } else { @@ -741,10 +743,10 @@ void LLTracker::setLandmarkVisited() LLInventoryItem* i = gInventory.getItem( mTrackedLandmarkItemID ); LLViewerInventoryItem* item = (LLViewerInventoryItem*)i; if ( item - && !(item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED)) + && !(item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)) { U32 flags = item->getFlags(); - flags |= LLInventoryItem::II_FLAGS_LANDMARK_VISITED; + flags |= LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED; item->setFlags(flags); LLMessageSystem* msg = gMessageSystem; msg->newMessage("ChangeInventoryItemFlags"); @@ -797,7 +799,7 @@ void LLTracker::cacheLandmarkPosition() mLandmarkHasBeenVisited = FALSE; LLInventoryItem* item = gInventory.getItem(mTrackedLandmarkItemID); if ( item - && item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED) + && item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED) { mLandmarkHasBeenVisited = TRUE; } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 0b6bd4b401..b88069cd48 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -180,6 +180,16 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous return false; } + std::string sim_string = LLSLURL::stripProtocol(url); + std::string region_name; + S32 x = 128; + S32 y = 128; + S32 z = 0; + if (! LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) + { + return false; + } + // Before we're logged in, need to update the startup screen // to tell the user where they are going. if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) @@ -194,22 +204,15 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous return true; } - std::string sim_string = LLSLURL::stripProtocol(url); - std::string region_name; - S32 x = 128; - S32 y = 128; - S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); //if(url_displayp) url_displayp->setName(region_name); // Request a region handle by name LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, - LLURLDispatcherImpl::regionNameCallback, - url, - false); // don't teleport + LLURLDispatcherImpl::regionNameCallback, + url, + false); // don't teleport return true; } @@ -221,34 +224,11 @@ void LLURLDispatcherImpl::regionNameCallback(U64 region_handle, const std::strin S32 x = 128; S32 y = 128; S32 z = 0; - LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - - LLVector3 local_pos; - local_pos.mV[VX] = (F32)x; - local_pos.mV[VY] = (F32)y; - local_pos.mV[VZ] = (F32)z; - - // determine whether the point is in this region - if ((x >= 0) && (x < REGION_WIDTH_UNITS) && - (y >= 0) && (y < REGION_WIDTH_UNITS)) + if (LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z)) { - // if so, we're done regionHandleCallback(region_handle, url, snapshot_id, teleport); } - - else - { - // otherwise find the new region from the location - - // add the position to get the new region - LLVector3d global_pos = from_region_handle(region_handle) + LLVector3d(local_pos); - - U64 new_region_handle = to_region_handle(global_pos); - LLWorldMapMessage::getInstance()->sendHandleRegionRequest(new_region_handle, - LLURLDispatcherImpl::regionHandleCallback, - url, teleport); - } } /* static */ @@ -261,17 +241,9 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str S32 z = 0; LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - // remap x and y to local coordinates - S32 local_x = x % REGION_WIDTH_UNITS; - S32 local_y = y % REGION_WIDTH_UNITS; - if (local_x < 0) - local_x += REGION_WIDTH_UNITS; - if (local_y < 0) - local_y += REGION_WIDTH_UNITS; - LLVector3 local_pos; - local_pos.mV[VX] = (F32)local_x; - local_pos.mV[VY] = (F32)local_y; + local_pos.mV[VX] = (F32)x; + local_pos.mV[VY] = (F32)y; local_pos.mV[VZ] = (F32)z; LLVector3d global_pos = from_region_handle(region_handle); diff --git a/indra/newview/llurllineeditorctrl.cpp b/indra/newview/llurllineeditorctrl.cpp index 258c3ddd75..1d2687a8c2 100644 --- a/indra/newview/llurllineeditorctrl.cpp +++ b/indra/newview/llurllineeditorctrl.cpp @@ -72,7 +72,7 @@ void LLURLLineEditor::cut() if( need_to_rollback ) { rollback.doRollback( this ); - reportBadKeystroke(); + LLUI::reportBadKeystroke(); } else if( mKeystrokeCallback ) @@ -96,8 +96,3 @@ void LLURLLineEditor::copyEscapedURLToClipboard() gClipboard.copyFromString( text_to_copy ); } -// Makes UISndBadKeystroke sound -void LLURLLineEditor::reportBadKeystroke() -{ - make_ui_sound("UISndBadKeystroke"); -} diff --git a/indra/newview/llurllineeditorctrl.h b/indra/newview/llurllineeditorctrl.h index 618f29dfbf..ebe417e855 100644 --- a/indra/newview/llurllineeditorctrl.h +++ b/indra/newview/llurllineeditorctrl.h @@ -55,8 +55,6 @@ protected: private: // util function to escape selected text and copy it to clipboard void copyEscapedURLToClipboard(); - // send a beep signal if keystroke is bad. As it is private at LLLineEditor we need own function - void reportBadKeystroke(); // Helper class to do rollback if needed class LLURLLineEditorRollback diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp index bb49804aff..c3a6b7111b 100644 --- a/indra/newview/llviewerassetstorage.cpp +++ b/indra/newview/llviewerassetstorage.cpp @@ -41,15 +41,16 @@ #include "llagent.h" LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host) - : LLAssetStorage(msg, xfer, vfs, upstream_host) + LLVFS *vfs, LLVFS *static_vfs, + const LLHost &upstream_host) + : LLAssetStorage(msg, xfer, vfs, static_vfs, upstream_host) { } LLViewerAssetStorage::LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs) - : LLAssetStorage(msg, xfer, vfs) + LLVFS *vfs, LLVFS *static_vfs) + : LLAssetStorage(msg, xfer, vfs, static_vfs) { } diff --git a/indra/newview/llviewerassetstorage.h b/indra/newview/llviewerassetstorage.h index 512b590a1b..8e7ea3471d 100644 --- a/indra/newview/llviewerassetstorage.h +++ b/indra/newview/llviewerassetstorage.h @@ -42,10 +42,10 @@ class LLViewerAssetStorage : public LLAssetStorage { public: LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs, const LLHost &upstream_host); + LLVFS *vfs, LLVFS *static_vfs, const LLHost &upstream_host); LLViewerAssetStorage(LLMessageSystem *msg, LLXferManager *xfer, - LLVFS *vfs); + LLVFS *vfs, LLVFS *static_vfs); using LLAssetStorage::storeAssetData; virtual void storeAssetData( diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp index 1d935f5ab8..2661c9f32b 100644 --- a/indra/newview/llvieweraudio.cpp +++ b/indra/newview/llvieweraudio.cpp @@ -34,6 +34,7 @@ #include "llaudioengine.h" #include "llagent.h" +#include "llagentcamera.h" #include "llappviewer.h" #include "llvieweraudio.h" #include "llviewercamera.h" @@ -51,7 +52,7 @@ void init_audio() llwarns << "Failed to create an appropriate Audio Engine" << llendl; return; } - LLVector3d lpos_global = gAgent.getCameraPositionGlobal(); + LLVector3d lpos_global = gAgentCamera.getCameraPositionGlobal(); LLVector3 lpos_global_f; lpos_global_f.setVec(lpos_global); @@ -180,7 +181,7 @@ void audio_update_listener() if (gAudiop) { // update listener position because agent has moved - LLVector3d lpos_global = gAgent.getCameraPositionGlobal(); + LLVector3d lpos_global = gAgentCamera.getCameraPositionGlobal(); LLVector3 lpos_global_f; lpos_global_f.setVec(lpos_global); @@ -203,7 +204,7 @@ void audio_update_wind(bool force_update) if (region) { static F32 last_camera_water_height = -1000.f; - LLVector3 camera_pos = gAgent.getCameraPositionAgent(); + LLVector3 camera_pos = gAgentCamera.getCameraPositionAgent(); F32 camera_water_height = camera_pos.mV[VZ] - region->getWaterHeight(); // diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp index 0051f46716..aa82c216d9 100644 --- a/indra/newview/llviewercamera.cpp +++ b/indra/newview/llviewercamera.cpp @@ -37,6 +37,7 @@ // Viewer includes #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" @@ -354,7 +355,7 @@ void LLViewerCamera::setPerspective(BOOL for_selection, } else { - z_far = gAgent.mDrawDistance; + z_far = gAgentCamera.mDrawDistance; } } else diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 5daea96123..874995a09e 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -41,6 +41,7 @@ // For Listeners #include "llaudioengine.h" #include "llagent.h" +#include "llagentcamera.h" #include "llconsole.h" #include "lldrawpoolterrain.h" #include "llflexibleobject.h" @@ -73,6 +74,7 @@ #include "llnavigationbar.h" #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" +#include "llpanellogin.h" #ifdef TOGGLE_HACKED_GODLIKE_VIEWER BOOL gHackGodmode = FALSE; @@ -102,7 +104,7 @@ static bool handleRenderAvatarMouselookChanged(const LLSD& newvalue) static bool handleRenderFarClipChanged(const LLSD& newvalue) { F32 draw_distance = (F32) newvalue.asReal(); - gAgent.mDrawDistance = draw_distance; + gAgentCamera.mDrawDistance = draw_distance; LLWorld::getInstance()->setLandFarClip(draw_distance); return true; } @@ -411,10 +413,7 @@ bool handleHighResSnapshotChanged(const LLSD& newvalue) bool handleVoiceClientPrefsChanged(const LLSD& newvalue) { - if(gVoiceClient) - { - gVoiceClient->updateSettings(); - } + LLVoiceClient::getInstance()->updateSettings(); return true; } @@ -442,6 +441,12 @@ bool handleVelocityInterpolate(const LLSD& newvalue) return true; } +bool handleForceShowGrid(const LLSD& newvalue) +{ + LLPanelLogin::refreshLocation( false ); + return true; +} + bool toggle_agent_pause(const LLSD& newvalue) { if ( newvalue.asBoolean() ) @@ -647,6 +652,7 @@ void settings_setup_listeners() gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2)); gSavedSettings.getControl("ShowDebugAppearanceEditor")->getSignal()->connect(boost::bind(&toggle_show_appearance_editor, _2)); gSavedSettings.getControl("ShowObjectRenderingCost")->getSignal()->connect(boost::bind(&toggle_show_object_render_cost, _2)); + gSavedSettings.getControl("ForceShowGrid")->getSignal()->connect(boost::bind(&handleForceShowGrid, _2)); } #if TEST_CACHED_CONTROL diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 6c1c1d1096..823466e33e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -38,6 +38,7 @@ #include "llrender.h" #include "llglheaders.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llcoord.h" #include "llcriticaldamp.h" @@ -174,8 +175,8 @@ void display_update_camera() // Cut draw distance in half when customizing avatar, // but on the viewer only. - F32 final_far = gAgent.mDrawDistance; - if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode()) + F32 final_far = gAgentCamera.mDrawDistance; + if (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) { final_far *= 0.5f; } @@ -344,9 +345,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived. S32 attach_count = 0; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - attach_count = gAgent.getAvatarObject()->getAttachmentCount(); + attach_count = gAgentAvatarp->getAttachmentCount(); } F32 teleport_save_time = TELEPORT_EXPIRY + TELEPORT_EXPIRY_PER_ATTACHMENT * attach_count; F32 teleport_elapsed = gTeleportDisplayTimer.getElapsedTimeF32(); @@ -393,7 +394,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gAgent.setTeleportMessage( LLAgent::sTeleportProgressMessages["arriving"]); gTextureList.mForceResetTextureStats = TRUE; - gAgent.resetView(TRUE, TRUE); + gAgentCamera.resetView(TRUE, TRUE); break; case LLAgent::TELEPORT_ARRIVING: @@ -920,9 +921,9 @@ void render_hud_attachments() glh::matrix4f current_mod = glh_get_current_modelview(); // clamp target zoom level to reasonable values - gAgent.mHUDTargetZoom = llclamp(gAgent.mHUDTargetZoom, 0.1f, 1.f); + gAgentCamera.mHUDTargetZoom = llclamp(gAgentCamera.mHUDTargetZoom, 0.1f, 1.f); // smoothly interpolate current zoom level - gAgent.mHUDCurZoom = lerp(gAgent.mHUDCurZoom, gAgent.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f)); + gAgentCamera.mHUDCurZoom = lerp(gAgentCamera.mHUDCurZoom, gAgentCamera.mHUDTargetZoom, LLCriticalDamp::getInterpolant(0.03f)); if (LLPipeline::sShowHUDAttachments && !gDisconnected && setup_hud_matrices()) { @@ -1031,11 +1032,10 @@ LLRect get_whole_screen_region() bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model) { - LLVOAvatar* my_avatarp = gAgent.getAvatarObject(); - if (my_avatarp && my_avatarp->hasHUDAttachment()) + if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment()) { - F32 zoom_level = gAgent.mHUDCurZoom; - LLBBox hud_bbox = my_avatarp->getHUDBBox(); + F32 zoom_level = gAgentCamera.mHUDCurZoom; + LLBBox hud_bbox = gAgentAvatarp->getHUDBBox(); F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f); proj = gl_ortho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth); @@ -1299,14 +1299,14 @@ void render_ui_2d() gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); // render outline for HUD - if (gAgent.getAvatarObject() && gAgent.mHUDCurZoom < 0.98f) + if (isAgentAvatarValid() && gAgentCamera.mHUDCurZoom < 0.98f) { glPushMatrix(); S32 half_width = (gViewerWindow->getWorldViewWidthScaled() / 2); S32 half_height = (gViewerWindow->getWorldViewHeightScaled() / 2); glScalef(LLUI::sGLScaleFactor.mV[0], LLUI::sGLScaleFactor.mV[1], 1.f); glTranslatef((F32)half_width, (F32)half_height, 0.f); - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom,zoom,1.f); gGL.color4fv(LLColor4::white.mV); gl_rect_2d(-half_width, half_height, half_width, -half_height, FALSE); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 65e9d8971a..506cebfe73 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -40,7 +40,6 @@ #include "llcompilequeue.h" #include "llcallfloater.h" #include "llfloaterabout.h" -#include "llfloateractivespeakers.h" #include "llfloateranimpreview.h" #include "llfloaterauction.h" #include "llfloateravatarpicker.h" @@ -135,7 +134,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterAboutUtil::registerFloater(); LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>); - LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterActiveSpeakers>); LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>); LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>); LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>); @@ -151,7 +149,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>); LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>); - //LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>); LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 80336e5c5a..8a891b1462 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -39,11 +39,15 @@ #include "indra_constants.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewerfoldertype.h" #include "llfolderview.h" #include "llviewercontrol.h" #include "llconsole.h" +#include "llinventorydefines.h" +#include "llinventoryfunctions.h" #include "llinventorymodel.h" +#include "llinventorymodelbackgroundfetch.h" #include "llgesturemgr.h" #include "llsidetray.h" @@ -101,7 +105,7 @@ public: const std::string verb = params[1].asString(); if (verb == "select") { - std::vector<LLUUID> items_to_open; + uuid_vec_t items_to_open; items_to_open.push_back(inventory_id); //inventory_handler is just a stub, because we don't know from who this offer open_inventory_offer(items_to_open, "inventory_handler"); @@ -512,7 +516,7 @@ void LLViewerInventoryCategory::removeFromServer( void ) gAgent.sendReliableMessage(); } -bool LLViewerInventoryCategory::fetchDescendents() +bool LLViewerInventoryCategory::fetch() { if((VERSION_UNKNOWN == mVersion) && mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads. @@ -537,7 +541,7 @@ bool LLViewerInventoryCategory::fetchDescendents() std::string url = gAgent.getRegion()->getCapability("WebFetchInventoryDescendents"); if (!url.empty()) //Capability found. Build up LLSD and use it. { - gInventory.startBackgroundFetch(mUUID); + LLInventoryModelBackgroundFetch::instance().start(mUUID); } else { //Deprecated, but if we don't have a capability, use the old system. @@ -790,8 +794,8 @@ void WearOnAvatarCallback::fire(const LLUUID& inv_item) void ModifiedCOFCallback::fire(const LLUUID& inv_item) { - LLAppearanceManager::instance().updateAppearanceFromCOF(); - if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode() ) + LLAppearanceMgr::instance().updateAppearanceFromCOF(); + if( CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode() ) { // If we're in appearance editing mode, the current tab may need to be refreshed if (gFloaterCustomize) @@ -826,7 +830,7 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item) if (inv_item.isNull()) return; - LLGestureManager::instance().activateGesture(inv_item); + LLGestureMgr::instance().activateGesture(inv_item); } void CreateGestureCallback::fire(const LLUUID& inv_item) @@ -834,7 +838,7 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) if (inv_item.isNull()) return; - LLGestureManager::instance().activateGesture(inv_item); + LLGestureMgr::instance().activateGesture(inv_item); LLViewerInventoryItem* item = gInventory.getItem(inv_item); if (!item) return; @@ -1071,7 +1075,7 @@ const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) // ! REFACTOR ! Really need to refactor this so that it's not a bunch of if-then statements... -void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid) +void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, const LLSD& userdata, const LLUUID& default_parent_uuid) { std::string type_name = userdata.asString(); @@ -1095,7 +1099,7 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co LLUUID category = gInventory.createNewCategory(parent_id, preferred_type, LLStringUtil::null); gInventory.notifyObservers(); - folder->setSelectionByID(category, TRUE); + root->setSelectionByID(category, TRUE); } else if ("lsl" == type_name) { @@ -1140,7 +1144,7 @@ void menu_create_inventory_item(LLFolderView* folder, LLFolderBridge *bridge, co llwarns << "Can't create unrecognized type " << type_name << llendl; } } - folder->setNeedsAutoRename(TRUE); + root->setNeedsAutoRename(TRUE); } LLAssetType::EType LLViewerInventoryItem::getType() const @@ -1475,7 +1479,7 @@ EWearableType LLViewerInventoryItem::getWearableType() const llwarns << "item is not a wearable" << llendl; return WT_INVALID; } - return EWearableType(getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK); + return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK); } diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 3d3f80b9b5..9d449399e8 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -138,7 +138,7 @@ public: bool importFileLocal(LLFILE* fp); // new methods - BOOL isComplete() const { return mIsComplete; } + BOOL isFinished() const { return mIsComplete; } void setComplete(BOOL complete) { mIsComplete = complete; } //void updateAssetOnServer() const; @@ -212,7 +212,7 @@ public: void setVersion(S32 version) { mVersion = version; } // Returns true if a fetch was issued. - bool fetchDescendents(); + bool fetch(); // used to help make cacheing more robust - for example, if // someone is getting 4 packets but logs out after 3. the viewer @@ -356,7 +356,7 @@ void copy_inventory_from_notecard(const LLUUID& object_id, U32 callback_id = 0); -void menu_create_inventory_item(LLFolderView* folder, +void menu_create_inventory_item(LLFolderView* root, LLFolderBridge* bridge, const LLSD& userdata, const LLUUID& default_parent_uuid = LLUUID::null); diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp index b593fbfb00..240a539f2e 100644 --- a/indra/newview/llviewerjoystick.cpp +++ b/indra/newview/llviewerjoystick.cpp @@ -43,6 +43,7 @@ #include "llselectmgr.h" #include "llviewermenu.h" #include "llagent.h" +#include "llagentcamera.h" #include "llfocusmgr.h" @@ -106,7 +107,7 @@ void LLViewerJoystick::setOverrideCamera(bool val) if (mOverrideCamera) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } } @@ -162,7 +163,7 @@ LLViewerJoystick::LLViewerJoystick() memset(mBtn, 0, sizeof(mBtn)); // factor in bandwidth? bandwidth = gViewerStats->mKBitStat - mPerfScale = 4000.f / gSysCPU.getMhz(); + mPerfScale = 4000.f / gSysCPU.getMHz(); // hmm. why? } // ----------------------------------------------------------------------------- @@ -432,7 +433,7 @@ void LLViewerJoystick::agentPitch(F32 pitch_inc) void LLViewerJoystick::agentYaw(F32 yaw_inc) { // Cannot steer some vehicles in mouselook if the script grabs the controls - if (gAgent.cameraMouselook() && !gSavedSettings.getBOOL("JoystickMouselookYaw")) + if (gAgentCamera.cameraMouselook() && !gSavedSettings.getBOOL("JoystickMouselookYaw")) { gAgent.rotate(-yaw_inc, gAgent.getReferenceUpVector()); } @@ -1005,7 +1006,7 @@ bool LLViewerJoystick::toggleFlycam() if (!mOverrideCamera) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } if (gAwayTimer.getElapsedTimeF32() > MIN_AFK_TIME) diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp index f757155b94..dd7390a907 100644 --- a/indra/newview/llviewerkeyboard.cpp +++ b/indra/newview/llviewerkeyboard.cpp @@ -36,6 +36,7 @@ #include "llviewerkeyboard.h" #include "llmath.h" #include "llagent.h" +#include "llagentcamera.h" #include "llnearbychatbar.h" #include "llviewercontrol.h" #include "llfocusmgr.h" @@ -279,22 +280,22 @@ F32 get_orbit_rate() void camera_spin_around_ccw( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitLeftKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitLeftKey( get_orbit_rate() ); } void camera_spin_around_cw( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitRightKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitRightKey( get_orbit_rate() ); } void camera_spin_around_ccw_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) { //send keystrokes, but do not change camera agent_turn_right(s); @@ -302,7 +303,7 @@ void camera_spin_around_ccw_sitting( EKeystate s ) else { //change camera but do not send keystrokes - gAgent.setOrbitLeftKey( get_orbit_rate() ); + gAgentCamera.setOrbitLeftKey( get_orbit_rate() ); } } @@ -310,7 +311,7 @@ void camera_spin_around_ccw_sitting( EKeystate s ) void camera_spin_around_cw_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.rotateGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.rotateGrabbed() || gAgentCamera.sitCameraEnabled()) { //send keystrokes, but do not change camera agent_turn_left(s); @@ -318,7 +319,7 @@ void camera_spin_around_cw_sitting( EKeystate s ) else { //change camera but do not send keystrokes - gAgent.setOrbitRightKey( get_orbit_rate() ); + gAgentCamera.setOrbitRightKey( get_orbit_rate() ); } } @@ -326,22 +327,22 @@ void camera_spin_around_cw_sitting( EKeystate s ) void camera_spin_over( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitUpKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitUpKey( get_orbit_rate() ); } void camera_spin_under( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitDownKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitDownKey( get_orbit_rate() ); } void camera_spin_over_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.upGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.upGrabbed() || gAgentCamera.sitCameraEnabled()) { //send keystrokes, but do not change camera agent_jump(s); @@ -349,7 +350,7 @@ void camera_spin_over_sitting( EKeystate s ) else { //change camera but do not send keystrokes - gAgent.setOrbitUpKey( get_orbit_rate() ); + gAgentCamera.setOrbitUpKey( get_orbit_rate() ); } } @@ -357,7 +358,7 @@ void camera_spin_over_sitting( EKeystate s ) void camera_spin_under_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.downGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.downGrabbed() || gAgentCamera.sitCameraEnabled()) { //send keystrokes, but do not change camera agent_push_down(s); @@ -365,35 +366,35 @@ void camera_spin_under_sitting( EKeystate s ) else { //change camera but do not send keystrokes - gAgent.setOrbitDownKey( get_orbit_rate() ); + gAgentCamera.setOrbitDownKey( get_orbit_rate() ); } } void camera_move_forward( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitInKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitInKey( get_orbit_rate() ); } void camera_move_backward( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitOutKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitOutKey( get_orbit_rate() ); } void camera_move_forward_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.forwardGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.forwardGrabbed() || gAgentCamera.sitCameraEnabled()) { agent_push_forward(s); } else { - gAgent.setOrbitInKey( get_orbit_rate() ); + gAgentCamera.setOrbitInKey( get_orbit_rate() ); } } @@ -402,70 +403,70 @@ void camera_move_backward_sitting( EKeystate s ) { if( KEYSTATE_UP == s ) return; - if (gAgent.backwardGrabbed() || gAgent.sitCameraEnabled()) + if (gAgent.backwardGrabbed() || gAgentCamera.sitCameraEnabled()) { agent_push_backward(s); } else { - gAgent.setOrbitOutKey( get_orbit_rate() ); + gAgentCamera.setOrbitOutKey( get_orbit_rate() ); } } void camera_pan_up( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanUpKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanUpKey( get_orbit_rate() ); } void camera_pan_down( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanDownKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanDownKey( get_orbit_rate() ); } void camera_pan_left( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanLeftKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanLeftKey( get_orbit_rate() ); } void camera_pan_right( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanRightKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanRightKey( get_orbit_rate() ); } void camera_pan_in( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanInKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanInKey( get_orbit_rate() ); } void camera_pan_out( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setPanOutKey( get_orbit_rate() ); + gAgentCamera.unlockView(); + gAgentCamera.setPanOutKey( get_orbit_rate() ); } void camera_move_forward_fast( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitInKey(2.5f); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitInKey(2.5f); } void camera_move_backward_fast( EKeystate s ) { if( KEYSTATE_UP == s ) return; - gAgent.unlockView(); - gAgent.setOrbitOutKey(2.5f); + gAgentCamera.unlockView(); + gAgentCamera.setOrbitOutKey(2.5f); } @@ -473,7 +474,7 @@ void edit_avatar_spin_ccw( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitLeftKey( get_orbit_rate() ); + gAgentCamera.setOrbitLeftKey( get_orbit_rate() ); //gMorphView->orbitLeft( get_orbit_rate() ); } @@ -482,7 +483,7 @@ void edit_avatar_spin_cw( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitRightKey( get_orbit_rate() ); + gAgentCamera.setOrbitRightKey( get_orbit_rate() ); //gMorphView->orbitRight( get_orbit_rate() ); } @@ -490,7 +491,7 @@ void edit_avatar_spin_over( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitUpKey( get_orbit_rate() ); + gAgentCamera.setOrbitUpKey( get_orbit_rate() ); //gMorphView->orbitUp( get_orbit_rate() ); } @@ -499,7 +500,7 @@ void edit_avatar_spin_under( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitDownKey( get_orbit_rate() ); + gAgentCamera.setOrbitDownKey( get_orbit_rate() ); //gMorphView->orbitDown( get_orbit_rate() ); } @@ -507,7 +508,7 @@ void edit_avatar_move_forward( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitInKey( get_orbit_rate() ); + gAgentCamera.setOrbitInKey( get_orbit_rate() ); //gMorphView->orbitIn(); } @@ -516,7 +517,7 @@ void edit_avatar_move_backward( EKeystate s ) { if( KEYSTATE_UP == s ) return; gMorphView->setCameraDrivenByKeys( TRUE ); - gAgent.setOrbitOutKey( get_orbit_rate() ); + gAgentCamera.setOrbitOutKey( get_orbit_rate() ); //gMorphView->orbitOut(); } @@ -868,7 +869,7 @@ S32 LLViewerKeyboard::loadBindings(const std::string& filename) EKeyboardMode LLViewerKeyboard::getMode() { - if ( gAgent.cameraMouselook() ) + if ( gAgentCamera.cameraMouselook() ) { return MODE_FIRST_PERSON; } @@ -876,7 +877,7 @@ EKeyboardMode LLViewerKeyboard::getMode() { return MODE_EDIT_AVATAR; } - else if (gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting()) + else if (isAgentAvatarValid() && gAgentAvatarp->isSitting()) { return MODE_SITTING; } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 6ff46222ff..3c0345df90 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -45,6 +45,7 @@ #include "llviewertexturelist.h" #include "llvovolume.h" #include "llpluginclassmedia.h" +#include "llplugincookiestore.h" #include "llviewerwindow.h" #include "llfocusmgr.h" #include "llcallbacklist.h" @@ -256,6 +257,43 @@ public: LLViewerMediaImpl *mMediaImpl; bool mInitialized; }; + +class LLViewerMediaOpenIDResponder : public LLHTTPClient::Responder +{ +LOG_CLASS(LLViewerMediaOpenIDResponder); +public: + LLViewerMediaOpenIDResponder( ) + { + } + + ~LLViewerMediaOpenIDResponder() + { + } + + /* virtual */ void completedHeader(U32 status, const std::string& reason, const LLSD& content) + { + LL_DEBUGS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL; + LL_DEBUGS("MediaAuth") << content << LL_ENDL; + std::string cookie = content["set-cookie"].asString(); + + LLViewerMedia::openIDCookieResponse(cookie); + } + + /* virtual */ void completedRaw( + U32 status, + const std::string& reason, + const LLChannelDescriptors& channels, + const LLIOPipe::buffer_ptr_t& buffer) + { + // This is just here to disable the default behavior (attempting to parse the response as llsd). + // We don't care about the content of the response, only the set-cookie header. + } + +}; + +LLPluginCookieStore *LLViewerMedia::sCookieStore = NULL; +LLURL LLViewerMedia::sOpenIDURL; +std::string LLViewerMedia::sOpenIDCookie; static LLViewerMedia::impl_list sViewerMediaImplList; static LLViewerMedia::impl_id_map sViewerMediaTextureIDMap; static LLTimer sMediaCreateTimer; @@ -264,6 +302,8 @@ static F32 sGlobalVolume = 1.0f; static F64 sLowestLoadableImplInterest = 0.0f; static bool sAnyMediaShowing = false; static boost::signals2::connection sTeleportFinishConnection; +static std::string sUpdatedCookies; +static const char *PLUGIN_COOKIE_FILE_NAME = "plugin_cookies.txt"; ////////////////////////////////////////////////////////////////////////////////////////// static void add_media_impl(LLViewerMediaImpl* media) @@ -399,7 +439,6 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s media_impl->setHomeURL(media_entry->getHomeURL()); media_impl->mMediaAutoPlay = media_entry->getAutoPlay(); media_impl->mMediaEntryURL = media_entry->getCurrentURL(); - if(media_impl->isAutoPlayable()) { needs_navigate = true; @@ -698,6 +737,13 @@ static bool proximity_comparitor(const LLViewerMediaImpl* i1, const LLViewerMedi void LLViewerMedia::updateMedia(void *dummy_arg) { sAnyMediaShowing = false; + sUpdatedCookies = getCookieStore()->getChangedCookies(); + if(!sUpdatedCookies.empty()) + { + lldebugs << "updated cookies will be sent to all loaded plugins: " << llendl; + lldebugs << sUpdatedCookies << llendl; + } + impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); @@ -998,6 +1044,9 @@ void LLViewerMedia::clearAllCookies() } } + // Clear all cookies from the cookie store + getCookieStore()->setAllCookies(""); + // FIXME: this may not be sufficient, since the on-disk cookie file won't get written until some browser instance exits cleanly. // It also won't clear cookies for other accounts, or for any account if we're not logged in, and won't do anything at all if there are no webkit plugins loaded. // Until such time as we can centralize cookie storage, the following hack should cover these cases: @@ -1008,6 +1057,7 @@ void LLViewerMedia::clearAllCookies() // Places that cookie files can be: // <getOSUserAppDir>/browser_profile/cookies // <getOSUserAppDir>/first_last/browser_profile/cookies (note that there may be any number of these!) + // <getOSUserAppDir>/first_last/plugin_cookies.txt (note that there may be any number of these!) std::string base_dir = gDirUtilp->getOSUserAppDir() + gDirUtilp->getDirDelimiter(); std::string target; @@ -1040,9 +1090,21 @@ void LLViewerMedia::clearAllCookies() { LLFile::remove(target); } + + // Other accounts may have new-style cookie files too -- delete them as well + target = base_dir; + target += filename; + target += gDirUtilp->getDirDelimiter(); + target += PLUGIN_COOKIE_FILE_NAME; + lldebugs << "target = " << target << llendl; + if(LLFile::isfile(target)) + { + LLFile::remove(target); + } } - + // If we have an OpenID cookie, re-add it to the cookie store. + setOpenIDCookie(); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -1095,6 +1157,208 @@ void LLViewerMedia::setProxyConfig(bool enable, const std::string &host, int por ///////////////////////////////////////////////////////////////////////////////////////// // static +///////////////////////////////////////////////////////////////////////////////////////// +// static +LLPluginCookieStore *LLViewerMedia::getCookieStore() +{ + if(sCookieStore == NULL) + { + sCookieStore = new LLPluginCookieStore; + } + + return sCookieStore; +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::loadCookieFile() +{ + // build filename for each user + std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME); + + if (resolved_filename.empty()) + { + llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + return; + } + + // open the file for reading + llifstream file(resolved_filename); + if (!file.is_open()) + { + llwarns << "can't load plugin cookies from file \"" << PLUGIN_COOKIE_FILE_NAME << "\"" << llendl; + return; + } + + getCookieStore()->readAllCookies(file, true); + + file.close(); + + // send the clear_cookies message to all loaded plugins + impl_list::iterator iter = sViewerMediaImplList.begin(); + impl_list::iterator end = sViewerMediaImplList.end(); + for (; iter != end; iter++) + { + LLViewerMediaImpl* pimpl = *iter; + if(pimpl->mMediaSource) + { + pimpl->mMediaSource->clear_cookies(); + } + } + + // If we have an OpenID cookie, re-add it to the cookie store. + setOpenIDCookie(); +} + + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::saveCookieFile() +{ + // build filename for each user + std::string resolved_filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, PLUGIN_COOKIE_FILE_NAME); + + if (resolved_filename.empty()) + { + llinfos << "can't get path to plugin cookie file - probably not logged in yet." << llendl; + return; + } + + // open a file for writing + llofstream file (resolved_filename); + if (!file.is_open()) + { + llwarns << "can't open plugin cookie file \"" << PLUGIN_COOKIE_FILE_NAME << "\" for writing" << llendl; + return; + } + + getCookieStore()->writePersistentCookies(file); + + file.close(); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path, bool secure) +{ + std::stringstream cookie; + + cookie << name << "=" << LLPluginCookieStore::quoteString(value); + + if(expires.notNull()) + { + cookie << "; expires=" << expires.asRFC1123(); + } + + cookie << "; domain=" << domain; + + cookie << "; path=" << path; + + if(secure) + { + cookie << "; secure"; + } + + getCookieStore()->setCookies(cookie.str()); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path, bool secure) +{ + // A session cookie just has a NULL date. + addCookie(name, value, domain, LLDate(), path, secure); +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::removeCookie(const std::string &name, const std::string &domain, const std::string &path ) +{ + // To remove a cookie, add one with the same name, domain, and path that expires in the past. + + addCookie(name, "", domain, LLDate(LLDate::now().secondsSinceEpoch() - 1.0), path); +} + + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::setOpenIDCookie() +{ + if(!sOpenIDCookie.empty()) + { + // The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port] + // We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that. + // We therefore do it here. + std::string authority = sOpenIDURL.mAuthority; + std::string::size_type host_start = authority.find('@'); + if(host_start == std::string::npos) + { + // no username/password + host_start = 0; + } + else + { + // Hostname starts after the @. + // (If the hostname part is empty, this may put host_start at the end of the string. In that case, it will end up passing through an empty hostname, which is correct.) + ++host_start; + } + std::string::size_type host_end = authority.rfind(':'); + if((host_end == std::string::npos) || (host_end < host_start)) + { + // no port + host_end = authority.size(); + } + + getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start)); + } +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::openIDSetup(const std::string &openid_url, const std::string &openid_token) +{ + LL_DEBUGS("MediaAuth") << "url = \"" << openid_url << "\", token = \"" << openid_token << "\"" << LL_ENDL; + + // post the token to the url + // the responder will need to extract the cookie(s). + + // Save the OpenID URL for later -- we may need the host when adding the cookie. + sOpenIDURL.init(openid_url.c_str()); + + // We shouldn't ever do this twice, but just in case this code gets repurposed later, clear existing cookies. + sOpenIDCookie.clear(); + + LLSD headers = LLSD::emptyMap(); + // Keep LLHTTPClient from adding an "Accept: application/llsd+xml" header + headers["Accept"] = "*/*"; + // and use the expected content-type for a post, instead of the LLHTTPClient::postRaw() default of "application/octet-stream" + headers["Content-Type"] = "application/x-www-form-urlencoded"; + + // postRaw() takes ownership of the buffer and releases it later, so we need to allocate a new buffer here. + size_t size = openid_token.size(); + U8 *data = new U8[size]; + memcpy(data, openid_token.data(), size); + + LLHTTPClient::postRaw( + openid_url, + data, + size, + new LLViewerMediaOpenIDResponder(), + headers); + +} + +///////////////////////////////////////////////////////////////////////////////////////// +// static +void LLViewerMedia::openIDCookieResponse(const std::string &cookie) +{ + LL_DEBUGS("MediaAuth") << "Cookie received: \"" << cookie << "\"" << LL_ENDL; + + sOpenIDCookie += cookie; + + setOpenIDCookie(); +} + bool LLViewerMedia::hasInWorldMedia() { if (sInWorldMediaDisabled) return false; @@ -1232,11 +1496,6 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, ////////////////////////////////////////////////////////////////////////////////////////// LLViewerMediaImpl::~LLViewerMediaImpl() { - if( gEditMenuHandler == this ) - { - gEditMenuHandler = NULL; - } - destroyMediaSource(); LLViewerMediaTexture::removeMediaImplFromTexture(mTextureId) ; @@ -1296,7 +1555,10 @@ void LLViewerMediaImpl::createMediaSource() } else if(! mMimeType.empty()) { - initializeMedia(mMimeType); + if (!initializeMedia(mMimeType)) + { + LL_WARNS("Media") << "Failed to initialize media for mime type " << mMimeType << LL_ENDL; + } } } @@ -1455,6 +1717,17 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) media_source->clear_cache(); } + // TODO: Only send cookies to plugins that need them + // Ideally, the plugin should tell us whether it handles cookies or not -- either via the init response or through a separate message. + // Due to the ordering of messages, it's possible we wouldn't get that information back in time to send cookies before sending a navigate message, + // which could cause odd race conditions. + std::string all_cookies = LLViewerMedia::getCookieStore()->getAllCookies(); + lldebugs << "setting cookies: " << all_cookies << llendl; + if(!all_cookies.empty()) + { + media_source->set_cookies(all_cookies); + } + mMediaSource = media_source; updateVolume(); @@ -1972,7 +2245,7 @@ void LLViewerMediaImpl::navigateInternal() // This helps in supporting legacy media content where the server the media resides on returns a bogus MIME type // but the parcel owner has correctly set the MIME type in the parcel media settings. - if(!mMimeType.empty() && (mMimeType != "none/none")) + if(!mMimeType.empty() && (mMimeType != LLMIMETypes::getDefaultMimeType())) { std::string plugin_basename = LLMIMETypes::implType(mMimeType); if(!plugin_basename.empty()) @@ -2152,6 +2425,16 @@ void LLViewerMediaImpl::update() } } } + else + { + // If we didn't just create the impl, it may need to get cookie updates. + if(!sUpdatedCookies.empty()) + { + // TODO: Only send cookies to plugins that need them + mMediaSource->set_cookies(sUpdatedCookies); + } + } + if(mMediaSource == NULL) { @@ -2614,6 +2897,13 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla //////////////////////////////////////////////////////////////////////////////// // virtual +void LLViewerMediaImpl::handleCookieSet(LLPluginClassMedia* self, const std::string &cookie) +{ + LLViewerMedia::getCookieStore()->setCookies(cookie); +} + +//////////////////////////////////////////////////////////////////////////////// +// virtual void LLViewerMediaImpl::cut() { @@ -3032,7 +3322,7 @@ bool LLViewerMediaImpl::isObjectAttachedToAnotherAvatar(LLVOVolume *obj) if (NULL != object) { LLVOAvatar *avatar = object->asAvatar(); - if (NULL != avatar && avatar != gAgent.getAvatarObject()) + if ((NULL != avatar) && (avatar != gAgentAvatarp)) { result = true; break; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index f9870fb3b9..e829d7a5b4 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -44,12 +44,15 @@ #include "llpluginclassmedia.h" #include "v4color.h" +#include "llurl.h" + class LLViewerMediaImpl; class LLUUID; class LLViewerMediaTexture; class LLMediaEntry; class LLVOVolume; class LLMimeDiscoveryResponder; +class LLPluginCookieStore; typedef LLPointer<LLViewerMediaImpl> viewer_media_t; /////////////////////////////////////////////////////////////////////////////// @@ -145,8 +148,23 @@ public: // Set the proxy config for all loaded plugins static void setProxyConfig(bool enable, const std::string &host, int port); + static LLPluginCookieStore *getCookieStore(); + static void loadCookieFile(); + static void saveCookieFile(); + static void addCookie(const std::string &name, const std::string &value, const std::string &domain, const LLDate &expires, const std::string &path = std::string("/"), bool secure = false ); + static void addSessionCookie(const std::string &name, const std::string &value, const std::string &domain, const std::string &path = std::string("/"), bool secure = false ); + static void removeCookie(const std::string &name, const std::string &domain, const std::string &path = std::string("/") ); + + static void openIDSetup(const std::string &openid_url, const std::string &openid_token); + static void openIDCookieResponse(const std::string &cookie); + private: + static void setOpenIDCookie(); static void onTeleportFinished(); + + static LLPluginCookieStore *sCookieStore; + static LLURL sOpenIDURL; + static std::string sOpenIDCookie; }; // Implementation functions not exported into header file @@ -294,6 +312,7 @@ public: // Inherited from LLPluginClassMediaOwner /*virtual*/ void handleMediaEvent(LLPluginClassMedia* plugin, LLPluginClassMediaOwner::EMediaEvent); + /*virtual*/ void handleCookieSet(LLPluginClassMedia* self, const std::string &cookie); // LLEditMenuHandler overrides /*virtual*/ void cut(); diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index b8179f7fc2..c1e851350b 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -38,6 +38,7 @@ #include "llpanelprimmediacontrols.h" #include "llpluginclassmedia.h" #include "llagent.h" +#include "llagentcamera.h" #include "lltoolpie.h" #include "llviewercamera.h" #include "llviewermedia.h" @@ -201,7 +202,7 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, { if (object) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent(); LLVector3d center = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); @@ -260,7 +261,7 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, // orientation with respect to the face. In other words, if before zoom // the media appears "upside down" from the camera, after zooming it will // still be upside down, but at least it will not flip. - LLVector3d cur_camera_pos = LLVector3d(gAgent.getCameraPositionGlobal()); + LLVector3d cur_camera_pos = LLVector3d(gAgentCamera.getCameraPositionGlobal()); LLVector3d delta = (cur_camera_pos - camera_pos); F64 len = delta.length(); delta.normalize(); @@ -271,18 +272,18 @@ void LLViewerMediaFocus::setCameraZoom(LLViewerObject* object, LLVector3 normal, // If we are not allowing zooming out and the old camera position is closer to // the center then the new intended camera position, don't move camera and return if (zoom_in_only && - (dist_vec_squared(gAgent.getCameraPositionGlobal(), target_pos) < dist_vec_squared(camera_pos, target_pos))) + (dist_vec_squared(gAgentCamera.getCameraPositionGlobal(), target_pos) < dist_vec_squared(camera_pos, target_pos))) { return; } - gAgent.setCameraPosAndFocusGlobal(camera_pos, target_pos, object->getID() ); + gAgentCamera.setCameraPosAndFocusGlobal(camera_pos, target_pos, object->getID() ); } else { // If we have no object, focus back on the avatar. - gAgent.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); } } void LLViewerMediaFocus::onFocusReceived() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 5598a589cc..7c439d7200 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -42,6 +42,7 @@ // newview includes #include "llagent.h" +#include "llagentcamera.h" #include "llagentwearables.h" #include "llagentpilot.h" #include "llbottomtray.h" @@ -72,6 +73,8 @@ #include "llhudmanager.h" #include "llimview.h" #include "llinventorybridge.h" +#include "llinventorydefines.h" +#include "llinventoryfunctions.h" #include "llpanellogin.h" #include "llpanelblockedlist.h" #include "llmenucommands.h" @@ -134,6 +137,7 @@ extern BOOL gDebugWindowProc; LLMenuBarGL *gMenuBarView = NULL; LLViewerMenuHolderGL *gMenuHolder = NULL; LLMenuGL *gPopupMenuView = NULL; +LLMenuGL *gEditMenu = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus @@ -381,8 +385,10 @@ void init_menus() /// /// Context menus /// + const widget_registry_t& registry = LLViewerMenuHolderGL::child_registry_t::instance(); + gEditMenu = LLUICtrlFactory::createFromFile<LLMenuGL>("menu_edit.xml", gMenuHolder, registry); gMenuAvatarSelf = LLUICtrlFactory::createFromFile<LLContextMenu>( "menu_avatar_self.xml", gMenuHolder, registry); gMenuAvatarOther = LLUICtrlFactory::createFromFile<LLContextMenu>( @@ -1800,9 +1806,10 @@ class LLAdvancedDebugAvatarTextures : public view_listener_t { bool handleEvent(const LLSD& userdata) { -#ifndef LL_RELEASE_FOR_DOWNLOAD - handle_debug_avatar_textures(NULL); -#endif + if (gAgent.isGodlike()) + { + handle_debug_avatar_textures(NULL); + } return true; } }; @@ -2482,18 +2489,18 @@ class LLObjectBuild : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -2511,7 +2518,7 @@ void handle_object_edit() { LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit()) { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); @@ -2519,19 +2526,19 @@ void handle_object_edit() { // always freeze camera in space, even if camera doesn't move // so, for example, follow cam scripts can't affect you when in build mode - gAgent.setFocusGlobal(gAgent.calcFocusPositionTargetGlobal(), LLUUID::null); - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(gAgentCamera.calcFocusPositionTargetGlobal(), LLUUID::null); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); } else { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLViewerObject* selected_objectp = selection->getFirstRootObject(); if (selected_objectp) { // zoom in on object center instead of where we clicked, as we need to see the manipulator handles - gAgent.setFocusGlobal(selected_objectp->getPositionGlobal(), selected_objectp->getID()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusGlobal(selected_objectp->getPositionGlobal(), selected_objectp->getID()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } } @@ -2576,19 +2583,19 @@ class LLLandBuild : public view_listener_t { LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraZoomIn(0.666f); - gAgent.cameraOrbitOver( 30.f * DEG_TO_RAD ); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.cameraZoomIn(0.666f); + gAgentCamera.cameraOrbitOver( 30.f * DEG_TO_RAD ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { // otherwise just move focus - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -2691,11 +2698,10 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t bool handleEvent(const LLSD& userdata) { bool new_value = false; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -2823,14 +2829,14 @@ bool handle_go_to() LLViewerParcelMgr::getInstance()->deselectLand(); - if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) + if (isAgentAvatarValid() && !gSavedSettings.getBOOL("AutoPilotLocksCamera")) { - gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); + gAgentCamera.setFocusGlobal(gAgentCamera.getFocusTargetGlobal(), gAgentAvatarp->getID()); } else { // Snap camera back to behind avatar - gAgent.setFocusOnAvatar(TRUE, ANIMATE); + gAgentCamera.setFocusOnAvatar(TRUE, ANIMATE); } // Could be first use @@ -3364,7 +3370,7 @@ class LLSelfStandUp : public view_listener_t bool enable_standup_self() { - bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting(); + bool new_value = isAgentAvatarValid() && gAgentAvatarp->isSitting(); return new_value; } @@ -3693,9 +3699,9 @@ class LLLandSit : public view_listener_t LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal; LLQuaternion target_rot; - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - target_rot = gAgent.getAvatarObject()->getRotation(); + target_rot = gAgentAvatarp->getRotation(); } else { @@ -3717,14 +3723,14 @@ void reset_view_final( BOOL proceed ); void handle_reset_view() { - if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgent.getCameraMode()) && gFloaterCustomize ) + if( (CAMERA_MODE_CUSTOMIZE_AVATAR == gAgentCamera.getCameraMode()) && gFloaterCustomize ) { // Show dialog box if needed. gFloaterCustomize->askToSaveIfDirty( reset_view_final ); } else { - gAgent.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); + gAgentCamera.switchCameraPreset(CAMERA_PRESET_REAR_VIEW); reset_view_final( TRUE ); LLFloaterCamera::resetCameraMode(); } @@ -3747,15 +3753,15 @@ void reset_view_final( BOOL proceed ) return; } - gAgent.resetView(TRUE, TRUE); - gAgent.setLookAt(LOOKAT_TARGET_CLEAR); + gAgentCamera.resetView(TRUE, TRUE); + gAgentCamera.setLookAt(LOOKAT_TARGET_CLEAR); } class LLViewLookAtLastChatter : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gAgent.lookAtLastChat(); + gAgentCamera.lookAtLastChat(); return true; } }; @@ -3764,13 +3770,13 @@ class LLViewMouselook : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (!gAgent.cameraMouselook()) + if (!gAgentCamera.cameraMouselook()) { - gAgent.changeCameraToMouselook(); + gAgentCamera.changeCameraToMouselook(); } else { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } return true; } @@ -3858,15 +3864,15 @@ BOOL enable_deed_object_to_group(void*) * No longer able to support viewer side manipulations in this way * void god_force_inv_owner_permissive(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void*) { typedef std::vector<LLPointer<LLViewerInventoryItem> > item_array_t; item_array_t items; - InventoryObjectList::const_iterator inv_it = inventory->begin(); - InventoryObjectList::const_iterator inv_end = inventory->end(); + LLInventoryObject::object_list_t::const_iterator inv_it = inventory->begin(); + LLInventoryObject::object_list_t::const_iterator inv_end = inventory->end(); for ( ; inv_it != inv_end; ++inv_it) { if(((*inv_it)->getType() != LLAssetType::AT_CATEGORY)) @@ -3989,9 +3995,9 @@ void handle_god_request_avatar_geometry(void *) void derez_objects(EDeRezDestination dest, const LLUUID& dest_id) { - if(gAgent.cameraMouselook()) + if(gAgentCamera.cameraMouselook()) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } //gInventoryView->setPanelOpen(TRUE); @@ -4586,13 +4592,9 @@ BOOL sitting_on_selection() } // Need to determine if avatar is sitting on this object - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if (!avatar) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; - return (avatar->isSitting() && avatar->getRoot() == root_object); + return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } class LLToolsSaveToInventory : public view_listener_t @@ -5034,7 +5036,7 @@ class LLViewEnableLastChatter : public view_listener_t bool handleEvent(const LLSD& userdata) { // *TODO: add check that last chatter is in range - bool new_value = (gAgent.cameraThirdPerson() && gAgent.getLastChatter().notNull()); + bool new_value = (gAgentCamera.cameraThirdPerson() && gAgent.getLastChatter().notNull()); return new_value; } }; @@ -5148,7 +5150,7 @@ void print_agent_nvpairs(void*) llinfos << "Can't find agent object" << llendl; } - llinfos << "Camera at " << gAgent.getCameraPositionGlobal() << llendl; + llinfos << "Camera at " << gAgentCamera.getCameraPositionGlobal() << llendl; } void show_debug_menus() @@ -5185,10 +5187,6 @@ void toggle_debug_menus(void*) { BOOL visible = ! gSavedSettings.getBOOL("UseDebugMenus"); gSavedSettings.setBOOL("UseDebugMenus", visible); - if(visible) - { - //LLFirstUse::useDebugMenus(); - } show_debug_menus(); } @@ -5333,13 +5331,23 @@ class LLWorldCreateLandmark : public view_listener_t } }; +class LLWorldPlaceProfile : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "agent")); + + return true; + } +}; + void handle_look_at_selection(const LLSD& param) { const F32 PADDING_FACTOR = 1.75f; BOOL zoom = (param.asString() == "zoom"); if (!LLSelectMgr::getInstance()->getSelection()->isEmpty()) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox selection_bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -5356,17 +5364,17 @@ void handle_look_at_selection(const LLSD& param) if (zoom) { // Make sure we are not increasing the distance between the camera and object - LLVector3d orig_distance = gAgent.getCameraPositionGlobal() - LLSelectMgr::getInstance()->getSelectionCenterGlobal(); + LLVector3d orig_distance = gAgentCamera.getCameraPositionGlobal() - LLSelectMgr::getInstance()->getSelectionCenterGlobal(); distance = llmin(distance, (F32) orig_distance.length()); - gAgent.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal() + LLVector3d(obj_to_cam * distance), LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); } else { - gAgent.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); + gAgentCamera.setFocusGlobal( LLSelectMgr::getInstance()->getSelectionCenterGlobal(), object_id ); } } } @@ -5379,7 +5387,7 @@ void handle_zoom_to_object(LLUUID object_id) if (object) { - gAgent.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); LLBBox bbox = object->getBoundingBoxAgent() ; F32 angle_of_view = llmax(0.1f, LLViewerCamera::getInstance()->getAspect() > 1.f ? LLViewerCamera::getInstance()->getView() * LLViewerCamera::getInstance()->getAspect() : LLViewerCamera::getInstance()->getView()); @@ -5391,7 +5399,7 @@ void handle_zoom_to_object(LLUUID object_id) LLVector3d object_center_global = gAgent.getPosGlobalFromAgent(bbox.getCenterAgent()); - gAgent.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), + gAgentCamera.setCameraPosAndFocusGlobal(object_center_global + LLVector3d(obj_to_cam * distance), object_center_global, object_id ); } @@ -5589,7 +5597,7 @@ void handle_customize_avatar() { if (gAgentWearables.areWearablesLoaded()) { - gAgent.changeCameraToCustomizeAvatar(); + gAgentCamera.changeCameraToCustomizeAvatar(); } } @@ -5775,18 +5783,18 @@ class LLLandEdit : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if (gAgent.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) + if (gAgentCamera.getFocusOnAvatar() && gSavedSettings.getBOOL("EditCameraMovement") ) { // zoom in if we're looking at the avatar - gAgent.setFocusOnAvatar(FALSE, ANIMATE); - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); - gAgent.cameraOrbitOver( F_PI * 0.25f ); + gAgentCamera.cameraOrbitOver( F_PI * 0.25f ); gViewerWindow->moveCursorToCenter(); } else if ( gSavedSettings.getBOOL("EditCameraMovement") ) { - gAgent.setFocusGlobal(LLToolPie::getInstance()->getPick()); + gAgentCamera.setFocusGlobal(LLToolPie::getInstance()->getPick()); gViewerWindow->moveCursorToCenter(); } @@ -5845,7 +5853,7 @@ private: S32 index = userdata.asInteger(); LLViewerJointAttachment* attachment_point = NULL; if (index > 0) - attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); + attachment_point = get_if_there(gAgentAvatarp->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); confirm_replace_attachment(0, attachment_point); } return true; @@ -5866,8 +5874,8 @@ void near_attach_object(BOOL success, void *user_data) U8 attachment_id = 0; if (attachment) { - for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgent.getAvatarObject()->mAttachmentPoints.begin(); - iter != gAgent.getAvatarObject()->mAttachmentPoints.end(); ++iter) + for (LLVOAvatar::attachment_map_t::const_iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ++iter) { if (iter->second == attachment) { @@ -5912,7 +5920,7 @@ void confirm_replace_attachment(S32 option, void* user_data) walkToSpot -= delta; gAgent.startAutoPilotGlobal(gAgent.getPosGlobalFromAgent(walkToSpot), "Attach", NULL, near_attach_object, user_data, stop_distance); - gAgent.clearFocusObject(); + gAgentCamera.clearFocusObject(); } } } @@ -5992,7 +6000,7 @@ class LLAttachmentDetachFromPoint : public view_listener_t { bool handleEvent(const LLSD& user_data) { - const LLViewerJointAttachment *attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL); + const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, user_data.asInteger(), (LLViewerJointAttachment*)NULL); if (attachment->getNumObjects() > 0) { gMessageSystem->newMessage("ObjectDetach"); @@ -6020,7 +6028,7 @@ static bool onEnableAttachmentLabel(LLUICtrl* ctrl, const LLSD& data) LLMenuItemGL* menu = dynamic_cast<LLMenuItemGL*>(ctrl); if (menu) { - const LLViewerJointAttachment *attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, data["index"].asInteger(), (LLViewerJointAttachment*)NULL); + const LLViewerJointAttachment *attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, data["index"].asInteger(), (LLViewerJointAttachment*)NULL); if (attachment) { label = data["label"].asString(); @@ -6098,10 +6106,12 @@ class LLAttachmentDetach : public view_listener_t //Adding an observer for a Jira 2422 and needs to be a fetch observer //for Jira 3119 -class LLWornItemFetchedObserver : public LLInventoryFetchObserver +class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver { public: - LLWornItemFetchedObserver() {} + LLWornItemFetchedObserver(const LLUUID& worn_item_id) : + LLInventoryFetchItemsObserver(worn_item_id) + {} virtual ~LLWornItemFetchedObserver() {} protected: @@ -6138,7 +6148,7 @@ class LLAttachmentEnableDrop : public view_listener_t if (object && LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) { S32 attachmentID = ATTACHMENT_ID_FROM_STATE(object->getState()); - attachment = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); + attachment = get_if_there(gAgentAvatarp->mAttachmentPoints, attachmentID, (LLViewerJointAttachment*)NULL); if (attachment) { @@ -6155,13 +6165,9 @@ class LLAttachmentEnableDrop : public view_listener_t // when the item finishes fetching worst case scenario // if a fetch is already out there (being sent from a slow sim) // we refetch and there are 2 fetches - LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver(); - LLInventoryFetchObserver::item_ref_t items; //add item to the inventory item to be fetched - - items.push_back((*attachment_iter)->getItemID()); - - wornItemFetched->fetchItems(items); - gInventory.addObserver(wornItemFetched); + LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver((*attachment_iter)->getItemID()); + worn_item_fetched->startFetch(); + gInventory.addObserver(worn_item_fetched); } } } @@ -6270,8 +6276,8 @@ class LLAttachmentPointFilled : public view_listener_t bool handleEvent(const LLSD& user_data) { bool enable = false; - LLVOAvatar::attachment_map_t::iterator found_it = gAgent.getAvatarObject()->mAttachmentPoints.find(user_data.asInteger()); - if (found_it != gAgent.getAvatarObject()->mAttachmentPoints.end()) + LLVOAvatar::attachment_map_t::iterator found_it = gAgentAvatarp->mAttachmentPoints.find(user_data.asInteger()); + if (found_it != gAgentAvatarp->mAttachmentPoints.end()) { enable = found_it->second->getNumObjects() > 0; } @@ -6467,13 +6473,13 @@ void handle_selected_texture_info(void*) void handle_test_male(void*) { - LLAppearanceManager::instance().wearOutfitByName("Male Shape & Outfit"); + LLAppearanceMgr::instance().wearOutfitByName("Male Shape & Outfit"); //gGestureList.requestResetFromServer( TRUE ); } void handle_test_female(void*) { - LLAppearanceManager::instance().wearOutfitByName("Female Shape & Outfit"); + LLAppearanceMgr::instance().wearOutfitByName("Female Shape & Outfit"); //gGestureList.requestResetFromServer( FALSE ); } @@ -6488,15 +6494,10 @@ void handle_toggle_pg(void*) void handle_dump_attachments(void*) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - if( !avatar ) - { - llinfos << "NO AVATAR" << llendl; - return; - } + if(!isAgentAvatarValid()) return; - for (LLVOAvatar::attachment_map_t::iterator iter = avatar->mAttachmentPoints.begin(); - iter != avatar->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -6758,7 +6759,7 @@ class LLViewEnableMouselook : public view_listener_t { // You can't go directly from customize avatar to mouselook. // TODO: write code with appropriate dialogs to handle this transition. - bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); + bool new_value = (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() && !gSavedSettings.getBOOL("FreezeTime")); return new_value; } }; @@ -6916,7 +6917,7 @@ void reload_vertex_shader(void *) void handle_dump_avatar_local_textures(void*) { - gAgent.getAvatarObject()->dumpLocalTextures(); + gAgentAvatarp->dumpLocalTextures(); } void handle_dump_timers() @@ -6936,86 +6937,83 @@ void handle_debug_avatar_textures(void*) void handle_grab_texture(void* data) { ETextureIndex tex_index = (ETextureIndex)((intptr_t)data); - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if ( avatar ) - { - // MULTI-WEARABLE: change to support an index - const LLUUID& asset_id = avatar->grabLocalTexture(tex_index, 0); - LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; - LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; - LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; - const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); - if(folder_id.notNull()) - { - std::string name = "Unknown"; - const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); - if (texture_dict->mIsBakedTexture) - { - EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; - name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; - } - name += " Texture"; - - LLUUID item_id; - item_id.generate(); - LLPermissions perm; - perm.init(gAgentID, - gAgentID, - LLUUID::null, - LLUUID::null); - U32 next_owner_perm = PERM_MOVE | PERM_TRANSFER; - perm.initMasks(PERM_ALL, - PERM_ALL, - PERM_NONE, - PERM_NONE, - next_owner_perm); - time_t creation_date_now = time_corrected(); - LLPointer<LLViewerInventoryItem> item - = new LLViewerInventoryItem(item_id, - folder_id, - perm, - asset_id, - asset_type, - inv_type, - name, - LLStringUtil::null, - LLSaleInfo::DEFAULT, - LLInventoryItem::II_FLAGS_NONE, - creation_date_now); - - item->updateServer(TRUE); - gInventory.updateItem(item); - gInventory.notifyObservers(); - - // Show the preview panel for textures to let - // user know that the image is now in inventory. - LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); - if(active_panel) - { - LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); - - active_panel->setSelection(item_id, TAKE_FOCUS_NO); - active_panel->openSelected(); - //LLFloaterInventory::dumpSelectionInformation((void*)view); - // restore keyboard focus - gFocusMgr.setKeyboardFocus(focus_ctrl); - } - } - else - { - llwarns << "Can't find a folder to put it in" << llendl; + if (!isAgentAvatarValid()) return; + + // MULTI-WEARABLE: change to support an index + const LLUUID& asset_id = gAgentAvatarp->grabLocalTexture(tex_index, 0); + LL_INFOS("texture") << "Adding baked texture " << asset_id << " to inventory." << llendl; + LLAssetType::EType asset_type = LLAssetType::AT_TEXTURE; + LLInventoryType::EType inv_type = LLInventoryType::IT_TEXTURE; + const LLUUID folder_id = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(asset_type)); + if(folder_id.notNull()) + { + std::string name = "Unknown"; + const LLVOAvatarDictionary::TextureEntry *texture_dict = LLVOAvatarDictionary::getInstance()->getTexture(tex_index); + if (texture_dict->mIsBakedTexture) + { + EBakedTextureIndex baked_index = texture_dict->mBakedTextureIndex; + name = "Baked " + LLVOAvatarDictionary::getInstance()->getBakedTexture(baked_index)->mNameCapitalized; + } + name += " Texture"; + + LLUUID item_id; + item_id.generate(); + LLPermissions perm; + perm.init(gAgentID, + gAgentID, + LLUUID::null, + LLUUID::null); + U32 next_owner_perm = PERM_MOVE | PERM_TRANSFER; + perm.initMasks(PERM_ALL, + PERM_ALL, + PERM_NONE, + PERM_NONE, + next_owner_perm); + time_t creation_date_now = time_corrected(); + LLPointer<LLViewerInventoryItem> item + = new LLViewerInventoryItem(item_id, + folder_id, + perm, + asset_id, + asset_type, + inv_type, + name, + LLStringUtil::null, + LLSaleInfo::DEFAULT, + LLInventoryItemFlags::II_FLAGS_NONE, + creation_date_now); + + item->updateServer(TRUE); + gInventory.updateItem(item); + gInventory.notifyObservers(); + + // Show the preview panel for textures to let + // user know that the image is now in inventory. + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); + if(active_panel) + { + LLFocusableElement* focus_ctrl = gFocusMgr.getKeyboardFocus(); + + active_panel->setSelection(item_id, TAKE_FOCUS_NO); + active_panel->openSelected(); + //LLFloaterInventory::dumpSelectionInformation((void*)view); + // restore keyboard focus + gFocusMgr.setKeyboardFocus(focus_ctrl); } } + else + { + llwarns << "Can't find a folder to put it in" << llendl; + } } BOOL enable_grab_texture(void* data) { ETextureIndex index = (ETextureIndex)((intptr_t)data); - const LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if ( avatar ) + if (isAgentAvatarValid()) { // MULTI-WEARABLE: - return avatar->canGrabLocalTexture(index,0); + return gAgentAvatarp->canGrabLocalTexture(index,0); } return FALSE; } @@ -7226,12 +7224,11 @@ void handle_buy_currency_test(void*) void handle_rebake_textures(void*) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (!avatar) return; + if (!isAgentAvatarValid()) return; // Slam pending upload count to "unstick" things bool slam_for_debug = true; - avatar->forceBakeAllTextures(slam_for_debug); + gAgentAvatarp->forceBakeAllTextures(slam_for_debug); } void toggle_visibility(void* user_data) @@ -7751,6 +7748,7 @@ void initialize_menus() commit.add("World.Chat", boost::bind(&handle_chat, (void*)NULL)); view_listener_t::addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); view_listener_t::addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); + view_listener_t::addMenu(new LLWorldPlaceProfile(), "World.PlaceProfile"); view_listener_t::addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); view_listener_t::addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); view_listener_t::addMenu(new LLWorldSetAway(), "World.SetAway"); diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index d3c34f0de4..d72ea00077 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -157,6 +157,7 @@ extern const std::string SAVE_INTO_INVENTORY; extern LLMenuBarGL* gMenuBarView; //extern LLView* gMenuBarHolder; +extern LLMenuGL* gEditMenu; extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index a5bc5d0634..c415d89e9c 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -36,6 +36,7 @@ // project includes #include "llagent.h" +#include "llagentcamera.h" #include "llfilepicker.h" #include "llfloaterreg.h" #include "llfloaterbuycurrency.h" @@ -140,9 +141,9 @@ std::string build_extensions_string(LLFilePicker::ELoadFilter filter) **/ const std::string upload_pick(void* data) { - if( gAgent.cameraMouselook() ) + if( gAgentCamera.cameraMouselook() ) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); // This doesn't seem necessary. JC // display(); } @@ -289,9 +290,9 @@ class LLFileUploadBulk : public view_listener_t { bool handleEvent(const LLSD& userdata) { - if( gAgent.cameraMouselook() ) + if( gAgentCamera.cameraMouselook() ) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } // TODO: @@ -317,13 +318,11 @@ class LLFileUploadBulk : public view_listener_t LLStringUtil::trim(asset_name); std::string display_name = LLStringUtil::null; - LLAssetStorage::LLStoreAssetCallback callback = NULL; S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - void *userdata = NULL; - upload_new_resource(filename, asset_name, asset_name, 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + upload_new_resource(filename, asset_name, asset_name, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), display_name, - callback, expected_upload_cost, userdata); + NULL, expected_upload_cost); // *NOTE: Ew, we don't iterate over the file list here, // we handle the next files in upload_done_callback() @@ -479,16 +478,15 @@ void handle_compress_image(void*) } void upload_new_resource(const std::string& src_filename, std::string name, - std::string desc, S32 compression_info, + std::string desc, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - LLAssetStorage::LLStoreAssetCallback callback, - S32 expected_upload_cost, - void *userdata) + boost::function<void(const LLUUID& uuid)> callback, + S32 expected_upload_cost) { // Generate the temporary UUID. std::string filename = gDirUtilp->getTempFilename(); @@ -770,9 +768,9 @@ void upload_new_resource(const std::string& src_filename, std::string name, { t_disp_name = src_filename; } - upload_new_resource(tid, asset_type, name, desc, compression_info, // tid + upload_new_resource(tid, asset_type, name, desc, destination_folder_type, inv_type, next_owner_perms, group_perms, everyone_perms, - display_name, callback, expected_upload_cost, userdata); + display_name, callback, expected_upload_cost); } else { @@ -891,30 +889,28 @@ void upload_done_callback(const LLUUID& uuid, void* user_data, S32 result, LLExt LLStringUtil::trim(asset_name); std::string display_name = LLStringUtil::null; - LLAssetStorage::LLStoreAssetCallback callback = NULL; - void *userdata = NULL; upload_new_resource(next_file, asset_name, asset_name, // file - 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, + LLFolderType::FT_NONE, LLInventoryType::IT_NONE, PERM_NONE, PERM_NONE, PERM_NONE, display_name, - callback, - expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost - userdata); + NULL, + expected_upload_cost); // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost + } } -void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_type, +void upload_new_resource(const LLTransactionID &tid, + LLAssetType::EType asset_type, std::string name, - std::string desc, S32 compression_info, + std::string desc, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - LLAssetStorage::LLStoreAssetCallback callback, - S32 expected_upload_cost, - void *userdata) + boost::function<void(const LLUUID& uuid)> callback, + S32 expected_upload_cost) { if(gDisconnected) { @@ -958,78 +954,26 @@ void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType asset_ty upload_message.append(display_name); LLUploadDialog::modalUploadDialog(upload_message); - llinfos << "*** Uploading: " << llendl; - llinfos << "Type: " << LLAssetType::lookup(asset_type) << llendl; - llinfos << "UUID: " << uuid << llendl; - llinfos << "Name: " << name << llendl; - llinfos << "Desc: " << desc << llendl; - llinfos << "Expected Upload Cost: " << expected_upload_cost << llendl; - lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl; - lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; std::string url = gAgent.getRegion()->getCapability("NewFileAgentInventory"); - if (!url.empty()) - { - llinfos << "New Agent Inventory via capability" << llendl; - LLSD body; - body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type); - body["asset_type"] = LLAssetType::lookup(asset_type); - body["inventory_type"] = LLInventoryType::lookup(inv_type); - body["name"] = name; - body["description"] = desc; - body["next_owner_mask"] = LLSD::Integer(next_owner_perms); - body["group_mask"] = LLSD::Integer(group_perms); - body["everyone_mask"] = LLSD::Integer(everyone_perms); - body["expected_upload_cost"] = LLSD::Integer(expected_upload_cost); - - //std::ostringstream llsdxml; - //LLSDSerialize::toPrettyXML(body, llsdxml); - //llinfos << "posting body to capability: " << llsdxml.str() << llendl; - - LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type)); + + if (url.empty()) { + llwarns << "Could not get NewFileAgentInventory capability" << llendl; + return; } - else - { - llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl; - // check for adequate funds - // TODO: do this check on the sim - if (LLAssetType::AT_SOUND == asset_type || - LLAssetType::AT_TEXTURE == asset_type || - LLAssetType::AT_ANIMATION == asset_type) - { - S32 balance = gStatusBar->getBalance(); - if (balance < expected_upload_cost) - { - // insufficient funds, bail on this upload - LLStringUtil::format_map_t args; - args["AMOUNT"] = llformat("%d", expected_upload_cost); - LLFloaterBuyCurrency::buyCurrency(LLTrans::getString("uploading_costs", args), expected_upload_cost); - return; - } - } - LLResourceData* data = new LLResourceData; - data->mAssetInfo.mTransactionID = tid; - data->mAssetInfo.mUuid = uuid; - data->mAssetInfo.mType = asset_type; - data->mAssetInfo.mCreatorID = gAgentID; - data->mInventoryType = inv_type; - data->mNextOwnerPerm = next_owner_perms; - data->mExpectedUploadCost = expected_upload_cost; - data->mUserData = userdata; - data->mAssetInfo.setName(name); - data->mAssetInfo.setDescription(desc); - data->mPreferredLocation = destination_folder_type; - - LLAssetStorage::LLStoreAssetCallback asset_callback = &upload_done_callback; - if (callback) - { - asset_callback = callback; - } - gAssetStorage->storeAssetData(data->mAssetInfo.mTransactionID, data->mAssetInfo.mType, - asset_callback, - (void*)data, - FALSE); - } + llinfos << "New Agent Inventory via capability" << llendl; + LLSD body; + body["folder_id"] = gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type); + body["asset_type"] = LLAssetType::lookup(asset_type); + body["inventory_type"] = LLInventoryType::lookup(inv_type); + body["name"] = name; + body["description"] = desc; + body["next_owner_mask"] = LLSD::Integer(next_owner_perms); + body["group_mask"] = LLSD::Integer(group_perms); + body["everyone_mask"] = LLSD::Integer(everyone_perms); + body["expected_upload_cost"] = LLSD::Integer(expected_upload_cost); + + LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type, callback)); } void init_menu_file() diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index 1e6d13f1c6..33f8243ac0 100644 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -34,41 +34,35 @@ #define LLVIEWERMENUFILE_H #include "llfoldertype.h" -#include "llassetstorage.h" #include "llinventorytype.h" class LLTransactionID; - void init_menu_file(); void upload_new_resource(const std::string& src_filename, std::string name, std::string desc, - S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - LLAssetStorage::LLStoreAssetCallback callback, - S32 expected_upload_cost, - void *userdata); + boost::function<void(const LLUUID& uuid)> callback, + S32 expected_upload_cost); void upload_new_resource(const LLTransactionID &tid, LLAssetType::EType type, std::string name, std::string desc, - S32 compression_info, LLFolderType::EType destination_folder_type, LLInventoryType::EType inv_type, U32 next_owner_perms, U32 group_perms, U32 everyone_perms, const std::string& display_name, - LLAssetStorage::LLStoreAssetCallback callback, - S32 expected_upload_cost, - void *userdata); + boost::function<void(const LLUUID& uuid)> callback, + S32 expected_upload_cost); #endif diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index fab1d983c2..0d02aa56b8 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "llviewermessage.h" +#include "boost/lexical_cast.hpp" #include "llanimationstates.h" #include "llaudioengine.h" @@ -41,6 +42,7 @@ #include "lleventtimer.h" #include "llfloaterreg.h" #include "llfollowcamparams.h" +#include "llinventorydefines.h" #include "llregionhandle.h" #include "llsdserialize.h" #include "llteleportflags.h" @@ -51,6 +53,7 @@ #include "mean_collision_data.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcallingcard.h" //#include "llfirstuse.h" #include "llfloaterbuycurrency.h" @@ -62,13 +65,13 @@ #include "llfloaterpreference.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" +#include "llinventoryfunctions.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" #include "llpanelgrouplandmoney.h" -#include "llpanelplaces.h" #include "llrecentpeople.h" #include "llscriptfloater.h" #include "llselectmgr.h" @@ -113,6 +116,11 @@ #include "llnotificationmanager.h" // +#if LL_MSVC +// disable boost::lexical_cast warning +#pragma warning (disable:4702) +#endif + // // Constants // @@ -689,6 +697,52 @@ bool join_group_response(const LLSD& notification, const LLSD& response) return false; } + +static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items, LLInventoryPanel *inventory_panel) +{ + if (NULL == inventory_panel) return; + + for (std::vector<LLUUID>::const_iterator item_iter = items.begin(); + item_iter != items.end(); + ++item_iter) + { + const LLUUID& item_id = (*item_iter); + if(!highlight_offered_item(item_id)) + { + continue; + } + + LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } + + LL_DEBUGS("Inventory_Move") << "Highlighting inventory item: " << item->getName() << ", " << item_id << LL_ENDL; + LLFolderView* fv = inventory_panel->getRootFolder(); + if (fv) + { + LLFolderViewItem* fv_item = fv->getItemByID(item_id); + if (fv_item) + { + LLFolderViewItem* fv_folder = fv_item->getParentFolder(); + if (fv_folder) + { + // Parent folders can be different in case of 2 consecutive drag and drop + // operations when the second one is started before the first one completes. + LL_DEBUGS("Inventory_Move") << "Open folder: " << fv_folder->getName() << LL_ENDL; + fv_folder->setOpen(TRUE); + if (fv_folder->isSelected()) + { + fv->changeSelection(fv_folder, FALSE); + } + } + fv->changeSelection(fv_item, TRUE); + } + } + } +} + static LLNotificationFunctorRegistration jgr_1("JoinGroup", join_group_response); static LLNotificationFunctorRegistration jgr_2("JoinedTooManyGroupsMember", join_group_response); static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_response); @@ -697,10 +751,13 @@ static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_ //----------------------------------------------------------------------------- // Instant Message //----------------------------------------------------------------------------- -class LLOpenAgentOffer : public LLInventoryFetchObserver +class LLOpenAgentOffer : public LLInventoryFetchItemsObserver { public: - LLOpenAgentOffer(const std::string& from_name) : mFromName(from_name) {} + LLOpenAgentOffer(const LLUUID& object_id, + const std::string& from_name) : + LLInventoryFetchItemsObserver(object_id), + mFromName(from_name) {} /*virtual*/ void done() { open_inventory_offer(mComplete, mFromName); @@ -711,6 +768,111 @@ private: std::string mFromName; }; +/** + * Class to observe adding of new items moved from the world to user's inventory to select them in inventory. + * + * We can't create it each time items are moved because "drop" event is sent separately for each + * element even while multi-dragging. We have to have the only instance of the observer. See EXT-4347. + */ +class LLViewerInventoryMoveFromWorldObserver : public LLInventoryMoveFromWorldObserver +{ +public: + LLViewerInventoryMoveFromWorldObserver() + : LLInventoryMoveFromWorldObserver() + , mActivePanel(NULL) + { + + } + + void setMoveIntoFolderID(const LLUUID& into_folder_uuid) {mMoveIntoFolderID = into_folder_uuid; } + +private: + /*virtual */void onAssetAdded(const LLUUID& asset_id) + { + // Store active Inventory panel. + mActivePanel = LLInventoryPanel::getActiveInventoryPanel(); + + // Store selected items (without destination folder) + mSelectedItems.clear(); + if (mActivePanel) + { + mActivePanel->getRootFolder()->getSelectionList(mSelectedItems); + } + mSelectedItems.erase(mMoveIntoFolderID); + } + + /** + * Selects added inventory items watched by their Asset UUIDs if selection was not changed since + * all items were started to watch (dropped into a folder). + */ + void done() + { + // if selection is not changed since watch started lets hightlight new items. + if (mActivePanel && !isSelectionChanged()) + { + LL_DEBUGS("Inventory_Move") << "Selecting new items..." << LL_ENDL; + mActivePanel->clearSelection(); + highlight_inventory_items_in_panel(mAddedItems, mActivePanel); + } + } + + /** + * Returns true if selected inventory items were changed since moved inventory items were started to watch. + */ + bool isSelectionChanged() + { + const LLInventoryPanel * const current_active_panel = LLInventoryPanel::getActiveInventoryPanel(); + + if (NULL == mActivePanel || current_active_panel != mActivePanel) + { + return true; + } + + // get selected items (without destination folder) + selected_items_t selected_items; + mActivePanel->getRootFolder()->getSelectionList(selected_items); + selected_items.erase(mMoveIntoFolderID); + + // compare stored & current sets of selected items + selected_items_t different_items; + std::set_symmetric_difference(mSelectedItems.begin(), mSelectedItems.end(), + selected_items.begin(), selected_items.end(), std::inserter(different_items, different_items.begin())); + + LL_DEBUGS("Inventory_Move") << "Selected firstly: " << mSelectedItems.size() + << ", now: " << selected_items.size() << ", difference: " << different_items.size() << LL_ENDL; + + return different_items.size() > 0; + } + + LLInventoryPanel *mActivePanel; + typedef std::set<LLUUID> selected_items_t; + selected_items_t mSelectedItems; + + /** + * UUID of FolderViewFolder into which watched items are moved. + * + * Destination FolderViewFolder becomes selected while mouse hovering (when dragged items are dropped). + * + * If mouse is moved out it set unselected and number of selected items is changed + * even if selected items in Inventory stay the same. + * So, it is used to update stored selection list. + * + * @see onAssetAdded() + * @see isSelectionChanged() + */ + LLUUID mMoveIntoFolderID; +}; + +LLViewerInventoryMoveFromWorldObserver* gInventoryMoveObserver = NULL; + +void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid) +{ + start_new_inventory_observer(); + + gInventoryMoveObserver->setMoveIntoFolderID(into_folder_uuid); + gInventoryMoveObserver->watchAsset(inv_item->getAssetUUID()); +} + //unlike the FetchObserver for AgentOffer, we only make one //instance of the AddedObserver for TaskOffers //and it never dies. We do this because we don't know the UUID of @@ -721,6 +883,33 @@ class LLOpenTaskOffer : public LLInventoryAddedObserver protected: /*virtual*/ void done() { + for (uuid_vec_t::iterator it = mAdded.begin(); it != mAdded.end();) + { + const LLUUID& item_uuid = *it; + bool was_moved = false; + LLInventoryObject* added_object = gInventory.getObject(item_uuid); + if (added_object) + { + // cast to item to get Asset UUID + LLInventoryItem* added_item = dynamic_cast<LLInventoryItem*>(added_object); + if (added_item) + { + const LLUUID& asset_uuid = added_item->getAssetUUID(); + if (gInventoryMoveObserver->isAssetWatched(asset_uuid)) + { + LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL; + was_moved = true; + } + } + } + + if (was_moved) + { + it = mAdded.erase(it); + } + else ++it; + } + open_inventory_offer(mAdded, ""); mAdded.clear(); } @@ -749,13 +938,21 @@ void start_new_inventory_observer() gNewInventoryObserver = new LLOpenTaskOffer; gInventory.addObserver(gNewInventoryObserver); } + + if (!gInventoryMoveObserver) //inventory move from the world observer + { + // Observer is deleted by gInventory + gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver; + gInventory.addObserver(gInventoryMoveObserver); + } } -class LLDiscardAgentOffer : public LLInventoryFetchComboObserver +class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver { LOG_CLASS(LLDiscardAgentOffer); public: LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) : + LLInventoryFetchItemsObserver(object_id), mFolderID(folder_id), mObjectID(object_id) {} virtual ~LLDiscardAgentOffer() {} @@ -869,9 +1066,9 @@ bool check_offer_throttle(const std::string& from_name, bool check_only) } } -void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& from_name) +void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) { - for (std::vector<LLUUID>::const_iterator item_iter = items.begin(); + for (uuid_vec_t::const_iterator item_iter = items.begin(); item_iter != items.end(); ++item_iter) { @@ -913,9 +1110,12 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f } else if("group_offer" == from_name) { - // do not open inventory when we open group notice attachment because - // we already opened landmark info panel // "group_offer" is passed by LLOpenTaskGroupOffer + // Notification about added landmark will be generated under the "from_name.empty()" called from LLOpenTaskOffer::done(). + LLSD args; + args["type"] = "landmark"; + args["id"] = item_id; + LLSideTray::getInstance()->showPanel("panel_places", args); continue; } @@ -926,28 +1126,6 @@ void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& f args["LANDMARK_NAME"] = item->getName(); args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); LLNotificationsUtil::add("LandmarkCreated", args); - // Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed. - // If the panel is closed we don't reopen it until created landmark is loaded. - //TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here - LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->getPanel("panel_places")); - if (places_panel) - { - // Landmark creation handling is moved to LLPanelPlaces::showAddedLandmarkInfo() - // TODO* LLPanelPlaces dependency is going to be removed. See EXT-4347. - //if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem()) - //{ - // places_panel->setItem(item); - //} - //else - // we are opening a group notice attachment - if("create_landmark" != places_panel->getPlaceInfoType()) - { - LLSD args; - args["type"] = "landmark"; - args["id"] = item_id; - LLSideTray::getInstance()->showPanel("panel_places", args); - } - } } } break; @@ -1201,11 +1379,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // This is an offer from an agent. In this case, the back // end has already copied the items into your inventory, // so we can fetch it out of our inventory. - LLInventoryFetchObserver::item_ref_t items; - items.push_back(mObjectID); - LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string); - open_agent_offer->fetchItems(items); - if(catp || (itemp && itemp->isComplete())) + LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string); + open_agent_offer->startFetch(); + if(catp || (itemp && itemp->isFinished())) { open_agent_offer->done(); } @@ -1262,13 +1438,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD& // Disabled logging to old chat floater to fix crash in group notices - EXT-4149 // LLFloaterChat::addChatHistory(chat); - LLInventoryFetchComboObserver::folder_ref_t folders; - LLInventoryFetchComboObserver::item_ref_t items; - items.push_back(mObjectID); - LLDiscardAgentOffer* discard_agent_offer; - discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); - discard_agent_offer->fetch(folders, items); - if(catp || (itemp && itemp->isComplete())) + LLDiscardAgentOffer* discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID); + discard_agent_offer->startFetch(); + if (catp || (itemp && itemp->isFinished())) { discard_agent_offer->done(); } @@ -1467,6 +1639,18 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const return false; } +class LLPostponedOfferNotification: public LLPostponedNotification +{ +protected: + /* virtual */ + void modifyNotificationParams() + { + LLSD substitutions = mParams.substitutions; + substitutions["NAME"] = mName; + mParams.substitutions = substitutions; + } +}; + void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1599,11 +1783,9 @@ void inventory_offer_handler(LLOfferInfo* info) p.name = "UserGiveItem"; // Prefetch the item into your local inventory. - LLInventoryFetchObserver::item_ref_t items; - items.push_back(info->mObjectID); - LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver(); - fetch_item->fetchItems(items); - if(fetch_item->isEverythingComplete()) + LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); + fetch_item->startFetch(); + if(fetch_item->isFinished()) { fetch_item->done(); } @@ -1618,7 +1800,10 @@ void inventory_offer_handler(LLOfferInfo* info) // Inform user that there is a script floater via toast system { payload["give_inventory_notification"] = TRUE; - LLNotificationPtr notification = LLNotifications::instance().add(p.payload(payload)); + LLNotification::Params params(p.name); + params.substitutions = p.substitutions; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, info->mFromID, false); } } } @@ -1683,6 +1868,65 @@ bool inspect_remote_object_callback(const LLSD& notification, const LLSD& respon } static LLNotificationFunctorRegistration inspect_remote_object_callback_reg("ServerObjectMessage", inspect_remote_object_callback); +class LLPostponedServerObjectNotification: public LLPostponedNotification +{ +protected: + /* virtual */ + void modifyNotificationParams() + { + LLSD payload = mParams.payload; + payload["SESSION_NAME"] = mName; + mParams.payload = payload; + } +}; + +static void parse_lure_bucket(const std::string& bucket, + U64& region_handle, + LLVector3& pos, + LLVector3& look_at, + U8& region_access) +{ + // tokenize the bucket + typedef boost::tokenizer<boost::char_separator<char> > tokenizer; + boost::char_separator<char> sep("|", "", boost::keep_empty_tokens); + tokenizer tokens(bucket, sep); + tokenizer::iterator iter = tokens.begin(); + + S32 gx = boost::lexical_cast<S32>((*(iter)).c_str()); + S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str()); + + // Grab region access + region_access = SIM_ACCESS_MIN; + if (++iter != tokens.end()) + { + std::string access_str((*iter).c_str()); + LLStringUtil::trim(access_str); + if ( access_str == "A" ) + { + region_access = SIM_ACCESS_ADULT; + } + else if ( access_str == "M" ) + { + region_access = SIM_ACCESS_MATURE; + } + else if ( access_str == "PG" ) + { + region_access = SIM_ACCESS_PG; + } + } + + pos.setVec((F32)rx, (F32)ry, (F32)rz); + look_at.setVec((F32)lx, (F32)ly, (F32)lz); + + region_handle = to_region_handle(gx, gy); +} + void process_improved_im(LLMessageSystem *msg, void **user_data) { if (gNoRender) @@ -1752,17 +1996,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) std::string separator_string(": "); LLSD args; + LLSD payload; switch(dialog) { case IM_CONSOLE_AND_CHAT_HISTORY: - // These are used for system messages, hence don't need the name, - // as it is always "Second Life". // *TODO: Translate args["MESSAGE"] = message; - - // Note: don't put the message in the IM history, even though was sent - // via the IM mechanism. - LLNotificationsUtil::add("SystemMessageTip",args); + payload["SESSION_NAME"] = name; + payload["from_id"] = from_id; + LLNotificationsUtil::add("IMSystemMessageTip",args, payload); break; case IM_NOTHING_SPECIAL: @@ -1985,7 +2227,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // For requested notices, we don't want to send the popups. if (dialog != IM_GROUP_NOTICE_REQUESTED) { - LLSD payload; payload["subject"] = subj; payload["message"] = mes; payload["sender_name"] = name; @@ -2109,10 +2350,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (is_muted) { // Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331) - LLInventoryFetchObserver::item_ref_t items; - items.push_back(info->mObjectID); - LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver(); - fetch_item->fetchItems(items); + LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID); + fetch_item->startFetch(); delete fetch_item; // Same as closing window @@ -2218,10 +2457,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mFromID = from_id ^ gAgent.getSessionID(); } + chat.mSourceType = CHAT_SOURCE_OBJECT; + if(SYSTEM_FROM == name) { // System's UUID is NULL (fixes EXT-4766) - chat.mFromID = from_id = LLUUID::null; + chat.mFromID = LLUUID::null; + chat.mSourceType = CHAT_SOURCE_SYSTEM; } LLSD query_string; @@ -2238,7 +2480,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mURL = link.str(); chat.mText = message; - chat.mSourceType = CHAT_SOURCE_OBJECT; // Note: lie to Nearby Chat, pretending that this is NOT an IM, because // IMs from obejcts don't open IM sessions. @@ -2267,13 +2508,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["slurl"] = location; payload["name"] = name; std::string session_name; - gCacheName->getFullName(from_id, session_name); - payload["SESSION_NAME"] = session_name; if (from_group) { payload["group_owned"] = "true"; } - LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload); + + LLNotification::Params params("ServerObjectMessage"); + params.substitutions = substitutions; + params.payload = payload; + + LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, false); } break; case IM_FROM_TASK_AS_ALERT: @@ -2314,15 +2558,28 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { + LLVector3 pos, look_at; + U64 region_handle; + U8 region_access; + std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size); + parse_lure_bucket(region_info, region_handle, pos, look_at, region_access); + + std::string region_access_str = LLViewerRegion::accessToString(region_access); + LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) - args["NAME"] = name; + args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); args["MESSAGE"] = message; + args["MATURITY"] = region_access_str; LLSD payload; payload["from_id"] = from_id; payload["lure_id"] = session_id; payload["godlike"] = FALSE; - LLNotificationsUtil::add("TeleportOffered", args, payload); + + LLNotification::Params params("TeleportOffered"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } break; @@ -2382,7 +2639,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { - args["[NAME]"] = name; + args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); if(message.empty()) { //support for frienship offers from clients before July 2008 @@ -2391,7 +2648,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { args["[MESSAGE]"] = message; - LLNotificationsUtil::add("OfferFriendship", args, payload); + LLNotification::Params params("OfferFriendship"); + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedOfferNotification>( params, from_id, false); } } } @@ -2832,7 +3092,9 @@ void process_teleport_progress(LLMessageSystem* msg, void**) class LLFetchInWelcomeArea : public LLInventoryFetchDescendentsObserver { public: - LLFetchInWelcomeArea() {} + LLFetchInWelcomeArea(const uuid_vec_t &ids) : + LLInventoryFetchDescendentsObserver(ids) + {} virtual void done() { LLIsType is_landmark(LLAssetType::AT_LANDMARK); @@ -2843,8 +3105,8 @@ public: LLInventoryModel::cat_array_t land_cats; LLInventoryModel::item_array_t land_items; - folder_ref_t::iterator it = mCompleteFolders.begin(); - folder_ref_t::iterator end = mCompleteFolders.end(); + uuid_vec_t::iterator it = mComplete.begin(); + uuid_vec_t::iterator end = mComplete.end(); for(; it != end; ++it) { gInventory.collectDescendentsIf( @@ -2905,7 +3167,7 @@ BOOL LLPostTeleportNotifiers::tick() if ( gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) { // get callingcards and landmarks available to the user arriving. - LLInventoryFetchDescendentsObserver::folder_ref_t folders; + uuid_vec_t folders; const LLUUID callingcard_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); if(callingcard_id.notNull()) folders.push_back(callingcard_id); @@ -2914,9 +3176,9 @@ BOOL LLPostTeleportNotifiers::tick() folders.push_back(folder_id); if(!folders.empty()) { - LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea; - fetcher->fetchDescendents(folders); - if(fetcher->isEverythingComplete()) + LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea(folders); + fetcher->startFetch(); + if(fetcher->isFinished()) { fetcher->done(); } @@ -2945,6 +3207,9 @@ void process_teleport_finish(LLMessageSystem* msg, void**) LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL; return; } + + // Teleport is finished; it can't be cancelled now. + gViewerWindow->setProgressCancelButtonVisible(FALSE); // Do teleport effect for where you're leaving // VEFFECT: TeleportStart @@ -2990,18 +3255,18 @@ void process_teleport_finish(LLMessageSystem* msg, void**) /* // send camera update to new region - gAgent.updateCamera(); + gAgentCamera.updateCamera(); // likewise make sure the camera is behind the avatar - gAgent.resetView(TRUE); + gAgentCamera.resetView(TRUE); LLVector3 shift_vector = regionp->getPosRegionFromGlobal(gAgent.getRegion()->getOriginGlobal()); gAgent.setRegion(regionp); gObjectList.shiftObjects(shift_vector); - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - gAgent.getAvatarObject()->clearChatText(); - gAgent.slamLookAt(look_at); + gAgentAvatarp->clearChatText(); + gAgentCamera.slamLookAt(look_at); } gAgent.setPositionAgent(pos); gAssetStorage->setUpstream(sim); @@ -3080,8 +3345,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) std::string version_channel; msg->getString("SimData", "ChannelVersion", version_channel); - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (!avatarp) + if (!isAgentAvatarValid()) { // Could happen if you were immediately god-teleported away on login, // maybe other cases. Continue, but warn. @@ -3125,9 +3389,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if( is_teleport ) { // Force the camera back onto the agent, don't animate. - gAgent.setFocusOnAvatar(TRUE, FALSE); - gAgent.slamLookAt(look_at); - gAgent.updateCamera(); + gAgentCamera.setFocusOnAvatar(TRUE, FALSE); + gAgentCamera.slamLookAt(look_at); + gAgentCamera.updateCamera(); gAgent.setTeleportState( LLAgent::TELEPORT_START_ARRIVAL ); @@ -3135,7 +3399,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // know what you look like. gAgent.sendAgentSetAppearance(); - if (avatarp) + if (isAgentAvatarValid()) { // Chat the "back" SLURL. (DEV-4907) @@ -3148,9 +3412,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) LLNotificationsUtil::add("SystemMessageTip", args); // Set the new position - avatarp->setPositionAgent(agent_pos); - avatarp->clearChat(); - avatarp->slamPosition(); + gAgentAvatarp->setPositionAgent(agent_pos); + gAgentAvatarp->clearChat(); + gAgentAvatarp->slamPosition(); } } else @@ -3176,7 +3440,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) global_agent_pos[1] += y; look_at = (LLVector3)beacon_pos - global_agent_pos; look_at.normVec(); - gAgent.slamLookAt(look_at); + gAgentCamera.slamLookAt(look_at); } } @@ -3210,9 +3474,9 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) gAgent.clearBusy(); } - if (avatarp) + if (isAgentAvatarValid()) { - avatarp->mFootPlane.clearVec(); + gAgentAvatarp->mFootPlane.clearVec(); } // send walk-vs-run status @@ -3353,7 +3617,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) LLQuaternion body_rotation = gAgent.getFrameAgent().getQuaternion(); LLQuaternion head_rotation = gAgent.getHeadRotation(); - camera_pos_agent = gAgent.getCameraPositionAgent(); + camera_pos_agent = gAgentCamera.getCameraPositionAgent(); render_state = gAgent.getRenderState(); @@ -3476,7 +3740,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable) msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis()); msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis()); msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis()); - msg->addF32Fast(_PREHASH_Far, gAgent.mDrawDistance); + msg->addF32Fast(_PREHASH_Far, gAgentCamera.mDrawDistance); msg->addU32Fast(_PREHASH_ControlFlags, control_flags); @@ -4113,7 +4377,7 @@ void process_avatar_appearance(LLMessageSystem *mesgsys, void **user_data) mesgsys->getUUIDFast(_PREHASH_Sender, _PREHASH_ID, uuid); LLVOAvatar* avatarp = (LLVOAvatar *)gObjectList.findObject(uuid); - if( avatarp ) + if (avatarp) { avatarp->processAvatarAppearance( mesgsys ); } @@ -4128,7 +4392,7 @@ void process_camera_constraint(LLMessageSystem *mesgsys, void **user_data) LLVector4 cameraCollidePlane; mesgsys->getVector4Fast(_PREHASH_CameraCollidePlane, _PREHASH_Plane, cameraCollidePlane); - gAgent.setCameraCollidePlane(cameraCollidePlane); + gAgentCamera.setCameraCollidePlane(cameraCollidePlane); } void near_sit_object(BOOL success, void *data) @@ -4161,14 +4425,12 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) BOOL force_mouselook; mesgsys->getBOOLFast(_PREHASH_SitTransform, _PREHASH_ForceMouselook, force_mouselook); - LLVOAvatar* avatar = gAgent.getAvatarObject(); - - if (avatar && dist_vec_squared(camera_eye, camera_at) > 0.0001f) + if (isAgentAvatarValid() && dist_vec_squared(camera_eye, camera_at) > 0.0001f) { - gAgent.setSitCamera(sitObjectID, camera_eye, camera_at); + gAgentCamera.setSitCamera(sitObjectID, camera_eye, camera_at); } - gAgent.setForceMouselook(force_mouselook); + gAgentCamera.setForceMouselook(force_mouselook); // Forcing turning off flying here to prevent flying after pressing "Stand" // to stand up from an object. See EXT-1655. gAgent.setFlying(FALSE); @@ -4177,7 +4439,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data) if (object) { LLVector3 sit_spot = object->getPositionAgent() + (sitPosition * object->getRotation()); - if (!use_autopilot || (avatar && avatar->isSitting() && avatar->getRoot() == object->getRoot())) + if (!use_autopilot || isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == object->getRoot()) { //we're already sitting on this object, so don't autopilot } @@ -4540,11 +4802,12 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) if(boost::regex_match(desc, matches, expr)) { // Name of full localizable notification string - // there are three types of this string- with name of receiver and reason of payment, - // without name and without reason (but not simultaneously) + // there are four types of this string- with name of receiver and reason of payment, + // without name and without reason (both may also be absent simultaneously). // example of string without name - You paid L$100 to create a group. // example of string without reason - You paid Smdby Linden L$100. // example of string with reason and name - You paid Smbdy Linden L$100 for a land access pass. + // example of string with no info - You paid L$50. std::string line = "you_paid_ldollars_no_name"; // arguments of string which will be in notification @@ -4565,7 +4828,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) std::string reason = std::string(matches[3]); if (reason.empty()) { - line = "you_paid_ldollars_no_reason"; + line = name.empty() ? "you_paid_ldollars_no_info" : "you_paid_ldollars_no_reason"; } else { @@ -4609,6 +4872,10 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD& gSavedSettings.setU32("PreferredMaturity", preferredMaturity); gAgent.sendMaturityPreferenceToServer(preferredMaturity); + // notify user that the maturity preference has been changed + LLSD args; + args["RATING"] = LLViewerRegion::accessToString(preferredMaturity); + LLNotificationsUtil::add("PreferredMaturityChanged", args); } return false; @@ -5217,14 +5484,14 @@ void process_derez_container(LLMessageSystem *msg, void**) } void container_inventory_arrived(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* data) { LL_DEBUGS("Messaging") << "container_inventory_arrived()" << LL_ENDL; - if( gAgent.cameraMouselook() ) + if( gAgentCamera.cameraMouselook() ) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(); @@ -5237,8 +5504,8 @@ void container_inventory_arrived(LLViewerObject* object, LLFolderType::FT_NONE, LLTrans::getString("AcquiredItems")); - InventoryObjectList::const_iterator it = inventory->begin(); - InventoryObjectList::const_iterator end = inventory->end(); + LLInventoryObject::object_list_t::const_iterator it = inventory->begin(); + LLInventoryObject::object_list_t::const_iterator end = inventory->end(); for ( ; it != end; ++it) { if ((*it)->getType() != LLAssetType::AT_CATEGORY) @@ -5274,7 +5541,7 @@ void container_inventory_arrived(LLViewerObject* object, { // we're going to get one fake root category as well as the // one actual object - InventoryObjectList::iterator it = inventory->begin(); + LLInventoryObject::object_list_t::iterator it = inventory->begin(); if ((*it)->getType() == LLAssetType::AT_CATEGORY) { @@ -5449,13 +5716,13 @@ void process_teleport_local(LLMessageSystem *msg,void**) } gAgent.setPositionAgent(pos); - gAgent.slamLookAt(look_at); + gAgentCamera.slamLookAt(look_at); // likewise make sure the camera is behind the avatar - gAgent.resetView(TRUE, TRUE); + gAgentCamera.resetView(TRUE, TRUE); // send camera update to new region - gAgent.updateCamera(); + gAgentCamera.updateCamera(); send_agent_update(TRUE, TRUE); @@ -5589,8 +5856,12 @@ void handle_lure(const LLUUID& invitee) } // Prompt for a message to the invited user. -void handle_lure(const std::vector<LLUUID>& ids) +void handle_lure(const uuid_vec_t& ids) { + if (ids.empty()) return; + + if (!gAgent.getRegion()) return; + LLSD edit_args; edit_args["REGION"] = gAgent.getRegion()->getName(); diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 88f9697037..7c021dc05f 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -129,7 +129,7 @@ void process_frozen_message(LLMessageSystem* msg, void**); void process_derez_container(LLMessageSystem *msg, void**); void container_inventory_arrived(LLViewerObject* object, - std::list<LLPointer<LLInventoryObject> >* inventory, //InventoryObjectList + std::list<LLPointer<LLInventoryObject> >* inventory, //LLInventoryObject::object_list_t S32 serial_num, void* data); @@ -157,7 +157,7 @@ void send_group_notice(const LLUUID& group_id, const LLInventoryItem* item); void handle_lure(const LLUUID& invitee); -void handle_lure(const std::vector<LLUUID>& ids); +void handle_lure(const uuid_vec_t& ids); // always from gAgent and // routes through the gAgent's current simulator @@ -201,13 +201,15 @@ void invalid_message_callback(LLMessageSystem*, void*, EMessageException); void process_initiate_download(LLMessageSystem* msg, void**); void start_new_inventory_observer(); -void open_inventory_offer(const std::vector<LLUUID>& items, const std::string& from_name); +void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name); // Returns true if item is not in certain "quiet" folder which don't need UI // notification (e.g. trash, cof, lost-and-found) and agent is not AFK, false otherwise. // Returns false if item is not found. bool highlight_offered_item(const LLUUID& item_id); +void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); + struct LLOfferInfo { LLOfferInfo() diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 6c8346df86..bb7933c10e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -46,6 +46,7 @@ #include "llfontgl.h" #include "llframetimer.h" #include "llinventory.h" +#include "llinventorydefines.h" #include "llmaterialtable.h" #include "llmutelist.h" #include "llnamevalue.h" @@ -60,6 +61,7 @@ #include "llaudiosourcevo.h" #include "llagent.h" +#include "llagentcamera.h" #include "llbbox.h" #include "llbox.h" #include "llcylinder.h" @@ -133,7 +135,15 @@ LLViewerObject *LLViewerObject::createObject(const LLUUID &id, const LLPCode pco { if (id == gAgentID) { - res = new LLVOAvatarSelf(id, pcode, regionp); + if (!gAgentAvatarp) + { + gAgentAvatarp = new LLVOAvatarSelf(id, pcode, regionp); + } + else + { + gAgentAvatarp->updateRegion(regionp); + } + res = gAgentAvatarp; } else { @@ -222,7 +232,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mClickAction(0), mAttachmentItemID(LLUUID::null) { - if(!is_global) + if (!is_global) { llassert(mRegionp); } @@ -234,7 +244,7 @@ LLViewerObject::LLViewerObject(const LLUUID &id, const LLPCode pcode, LLViewerRe mPositionRegion = LLVector3(0.f, 0.f, 0.f); - if(!is_global) + if (!is_global && mRegionp) { mPositionAgent = mRegionp->getOriginAgent(); } @@ -376,11 +386,10 @@ void LLViewerObject::markDead() if (flagAnimSource()) { - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp && !avatarp->isDead()) + if (isAgentAvatarValid()) { // stop motions associated with this object - avatarp->stopMotionFromSource(mID); + gAgentAvatarp->stopMotionFromSource(mID); } } @@ -2169,8 +2178,8 @@ void LLViewerObject::deleteInventoryItem(const LLUUID& item_id) { if(mInventory) { - InventoryObjectList::iterator it = mInventory->begin(); - InventoryObjectList::iterator end = mInventory->end(); + LLInventoryObject::object_list_t::iterator it = mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = mInventory->end(); for( ; it != end; ++it ) { if((*it)->getUUID() == item_id) @@ -2480,7 +2489,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data) } else { - object->mInventory = new InventoryObjectList(); + object->mInventory = new LLInventoryObject::object_list_t(); } LLPointer<LLInventoryObject> obj; obj = new LLInventoryObject(object->mID, LLUUID::null, @@ -2536,7 +2545,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename) } else { - mInventory = new InventoryObjectList; + mInventory = new LLInventoryObject::object_list_t; } while(ifs.good()) { @@ -2669,8 +2678,8 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id) LLInventoryObject* rv = NULL; if(mInventory) { - InventoryObjectList::iterator it = mInventory->begin(); - InventoryObjectList::iterator end = mInventory->end(); + LLInventoryObject::object_list_t::iterator it = mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = mInventory->end(); for ( ; it != end; ++it) { if((*it)->getUUID() == item_id) @@ -2683,12 +2692,12 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id) return rv; } -void LLViewerObject::getInventoryContents(InventoryObjectList& objects) +void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& objects) { if(mInventory) { - InventoryObjectList::iterator it = mInventory->begin(); - InventoryObjectList::iterator end = mInventory->end(); + LLInventoryObject::object_list_t::iterator it = mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = mInventory->end(); for( ; it != end; ++it) { if ((*it)->getType() != LLAssetType::AT_CATEGORY) @@ -2718,8 +2727,8 @@ LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& ass { LLViewerInventoryItem* item = NULL; - InventoryObjectList::iterator it = mInventory->begin(); - InventoryObjectList::iterator end = mInventory->end(); + LLInventoryObject::object_list_t::iterator it = mInventory->begin(); + LLInventoryObject::object_list_t::iterator end = mInventory->end(); for( ; it != end; ++it) { LLInventoryObject* obj = *it; @@ -2757,7 +2766,7 @@ void LLViewerObject::setPixelAreaAndAngle(LLAgent &agent) return; } - LLVector3 viewer_pos_agent = agent.getCameraPositionAgent(); + LLVector3 viewer_pos_agent = gAgentCamera.getCameraPositionAgent(); LLVector3 pos_agent = getRenderPosition(); F32 dx = viewer_pos_agent.mV[VX] - pos_agent.mV[VX]; @@ -4081,8 +4090,8 @@ S32 LLViewerObject::countInventoryContents(LLAssetType::EType type) S32 count = 0; if( mInventory ) { - InventoryObjectList::const_iterator it = mInventory->begin(); - InventoryObjectList::const_iterator end = mInventory->end(); + LLInventoryObject::object_list_t::const_iterator it = mInventory->begin(); + LLInventoryObject::object_list_t::const_iterator end = mInventory->end(); for( ; it != end ; ++it ) { if( (*it)->getType() == type ) @@ -4919,7 +4928,6 @@ void LLViewerObject::setIncludeInSearch(bool include_in_search) void LLViewerObject::setRegion(LLViewerRegion *regionp) { - llassert(regionp); mLatestRecvPacketID = 0; mRegionp = regionp; diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 266c40d493..be83fb7ef8 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -88,7 +88,7 @@ typedef enum e_object_update_type // callback typedef for inventory typedef void (*inventory_callback)(LLViewerObject*, - InventoryObjectList*, + LLInventoryObject::object_list_t*, S32 serial_num, void*); @@ -409,7 +409,7 @@ public: void updateInventory(LLViewerInventoryItem* item, U8 key, bool is_new); void updateInventoryLocal(LLInventoryItem* item, U8 key); // Update without messaging. LLInventoryObject* getInventoryObject(const LLUUID& item_id); - void getInventoryContents(InventoryObjectList& objects); + void getInventoryContents(LLInventoryObject::object_list_t& objects); LLInventoryObject* getInventoryRoot(); LLViewerInventoryItem* getInventoryItemByAsset(const LLUUID& asset_id); S16 getInventorySerial() const { return mInventorySerialNum; } @@ -629,7 +629,7 @@ protected: F32 mPixelArea; // Apparent area in pixels // This is the object's inventory from the viewer's perspective. - InventoryObjectList* mInventory; + LLInventoryObject::object_list_t* mInventory; class LLInventoryCallbackInfo { public: diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6347090f71..752aeaaab0 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -47,6 +47,7 @@ #include "llviewerwindow.h" #include "llnetmap.h" #include "llagent.h" +#include "llagentcamera.h" #include "pipeline.h" #include "llspatialpartition.h" #include "lltooltip.h" @@ -288,7 +289,7 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, LLMemType mt(LLMemType::MTYPE_OBJECT_PROCESS_UPDATE); LLFastTimer t(FTM_PROCESS_OBJECTS); - LLVector3d camera_global = gAgent.getCameraPositionGlobal(); + LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); LLViewerObject *objectp; S32 num_objects; U32 local_id; @@ -473,7 +474,6 @@ void LLViewerObjectList::processObjectUpdate(LLMessageSystem *mesgsys, if (objectp->getRegion() != regionp) { // Object changed region, so update it - objectp->setRegion(regionp); objectp->updateRegion(regionp); // for LLVOAvatar } } @@ -614,7 +614,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) } // Focused - objectp = gAgent.getFocusObject(); + objectp = gAgentCamera.getFocusObject(); if (objectp) { objectp->boostTexturePriority(); @@ -894,6 +894,13 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { + // Don't ever kill gAgentAvatarp, just mark it as null region instead. + if (objectp == gAgentAvatarp) + { + objectp->setRegion(NULL); + return FALSE; + } + // When we're killing objects, all we do is mark them as dead. // We clean up the dead objects later. @@ -942,7 +949,8 @@ void LLViewerObjectList::killAllObjects() { objectp = *iter; killObject(objectp); - llassert(objectp->isDead()); + // Object must be dead, or it's the LLVOAvatarSelf which never dies. + llassert((objectp == gAgentAvatarp) || objectp->isDead()); } cleanDeadObjects(FALSE); @@ -1209,11 +1217,10 @@ void LLViewerObjectList::generatePickList(LLCamera &camera) } // add all hud objects to pick list - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -1281,7 +1288,7 @@ void LLViewerObjectList::renderPickList(const LLRect& screen_rect, BOOL pick_par gViewerWindow->renderSelections( TRUE, pick_parcel_wall, FALSE ); //fix for DEV-19335. Don't pick hud objects when customizing avatar (camera mode doesn't play nice with nametags). - if (!gAgent.cameraCustomizeAvatar()) + if (!gAgentCamera.cameraCustomizeAvatar()) { // render pickable ui elements, like names, etc. LLHUDObject::renderAllForSelect(); diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index b967436df6..202f8822e3 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -35,6 +35,7 @@ #include "llagent.h" #include "llaudioengine.h" +#include "llmimetypes.h" #include "llviewercontrol.h" #include "llviewermedia.h" #include "llviewerregion.h" @@ -212,7 +213,7 @@ void LLViewerParcelMedia::play(LLParcel* parcel) } // Don't ever try to play if the media type is set to "none/none" - if(stricmp(mime_type.c_str(), "none/none") != 0) + if(stricmp(mime_type.c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) { if(!sMediaImpl) { @@ -306,7 +307,7 @@ LLPluginClassMediaOwner::EMediaStatus LLViewerParcelMedia::getStatus() // static std::string LLViewerParcelMedia::getMimeType() { - return sMediaImpl.notNull() ? sMediaImpl->getMimeType() : "none/none"; + return sMediaImpl.notNull() ? sMediaImpl->getMimeType() : LLMIMETypes::getDefaultMimeType(); } //static @@ -316,7 +317,7 @@ std::string LLViewerParcelMedia::getURL() if(sMediaImpl.notNull()) url = sMediaImpl->getMediaURL(); - if(stricmp(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaType().c_str(), "none/none") != 0) + if(stricmp(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaType().c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) { if (url.empty()) url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL(); diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index f55d6d89c4..032ad6635a 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -42,6 +42,7 @@ #include "message.h" #include "llviewertexturelist.h" // for texture stats #include "llagent.h" +#include "llmimetypes.h" const F32 AUTOPLAY_TIME = 5; // how many seconds before we autoplay const F32 AUTOPLAY_SIZE = 24*24; // how big the texture must be (pixel area) before we autoplay @@ -126,7 +127,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick() if ((!mPlayed) && // if we've never played (mTimeInParcel > AUTOPLAY_TIME) && // and if we've been here for so many seconds (!this_media_url.empty()) && // and if the parcel has media - (stricmp(this_media_type.c_str(), "none/none") != 0) && + (stricmp(this_media_type.c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) && (LLViewerParcelMedia::sMediaImpl.isNull())) // and if the media is not already playing { if (this_media_texture_id.notNull()) // and if the media texture is good diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 1f6bbcbae8..a591cc1e14 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -2185,7 +2185,8 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const return true; // change this if want to make it gods only } - LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + LLVector3 parcel_coord = parcel->getCenterpoint(); + LLViewerRegion* regionp = LLWorld::getInstance()->getRegionFromPosAgent(parcel_coord); if (regionp) { U8 sim_access = regionp->getSimAccess(); diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp index 9de1ef7190..2d17ea7bcd 100644 --- a/indra/newview/llviewerparceloverlay.cpp +++ b/indra/newview/llviewerparceloverlay.cpp @@ -43,11 +43,11 @@ #include "v2math.h" // newview includes +#include "llagentcamera.h" #include "llviewertexture.h" #include "llviewercontrol.h" #include "llsurface.h" #include "llviewerregion.h" -#include "llagent.h" #include "llviewercamera.h" #include "llviewertexturelist.h" #include "llselectmgr.h" @@ -760,7 +760,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines () LLGLDepthTest mDepthTest(GL_TRUE); // Find camera height off the ground (not from zero) - F32 ground_height_at_camera = land.resolveHeightGlobal( gAgent.getCameraPositionGlobal() ); + F32 ground_height_at_camera = land.resolveHeightGlobal( gAgentCamera.getCameraPositionGlobal() ); F32 camera_z = LLViewerCamera::getInstance()->getOrigin().mV[VZ]; F32 camera_height = camera_z - ground_height_at_camera; @@ -791,7 +791,7 @@ S32 LLViewerParcelOverlay::renderPropertyLines () const S32 vertex_per_edge = 3 + 2 * (GRID_STEP-1) + 3; // Stomp the camera into two dimensions - LLVector3 camera_region = mRegion->getPosRegionFromGlobal( gAgent.getCameraPositionGlobal() ); + LLVector3 camera_region = mRegion->getPosRegionFromGlobal( gAgentCamera.getCameraPositionGlobal() ); // Set up a cull plane 2 * PARCEL_GRID_STEP_METERS behind // the camera. The cull plane normal is the camera's at axis. diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index ce627494c8..07d4ac664f 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -47,6 +47,7 @@ #include "v4math.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcallingcard.h" #include "llcaphttpsender.h" #include "llcommandhandler.h" @@ -819,7 +820,7 @@ void LLViewerRegion::calculateCenterGlobal() void LLViewerRegion::calculateCameraDistance() { - mCameraDistanceSquared = (F32)(gAgent.getCameraPositionGlobal() - getCenterGlobal()).magVecSquared(); + mCameraDistanceSquared = (F32)(gAgentCamera.getCameraPositionGlobal() - getCenterGlobal()).magVecSquared(); } std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index 41d9f6d067..b7c265be59 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -52,6 +52,7 @@ #include "llsurface.h" #include "llvlmanager.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewercontrol.h" #include "llfloatertools.h" #include "lldebugview.h" @@ -577,11 +578,11 @@ void update_statistics(U32 frame_count) // make sure we have a valid time delta for this frame if (gFrameIntervalSeconds > 0.f) { - if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { LLViewerStats::getInstance()->incStat(LLViewerStats::ST_MOUSELOOK_SECONDS, gFrameIntervalSeconds); } - else if (gAgent.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) + else if (gAgentCamera.getCameraMode() == CAMERA_MODE_CUSTOMIZE_AVATAR) { LLViewerStats::getInstance()->incStat(LLViewerStats::ST_AVATAR_EDIT_SECONDS, gFrameIntervalSeconds); } diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index c9b3886fef..59efae4cb2 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -40,8 +40,8 @@ #include "llfloaterreg.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" -#include "llinventory.h" #include "llinventorybridge.h" +#include "llinventorydefines.h" #include "llinventorymodel.h" #include "lllandmark.h" #include "lllandmarkactions.h" @@ -525,7 +525,7 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const case LLAssetType::AT_SOUND: img_name = "Inv_Sound"; break; case LLAssetType::AT_CLOTHING: img_name = "Inv_Clothing"; break; case LLAssetType::AT_OBJECT: - img_name = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ? + img_name = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags() ? "Inv_Object_Multi" : "Inv_Object"; break; case LLAssetType::AT_CALLINGCARD: img_name = "Inv_CallingCard"; break; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d91833fd22..a96a6bf1b3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -44,6 +44,8 @@ #include <fstream> #include <algorithm> +#include "llagent.h" +#include "llagentcamera.h" #include "llfloaterreg.h" #include "llpanellogin.h" #include "llviewerkeyboard.h" @@ -363,9 +365,9 @@ public: agent_center_text = llformat("AgentCenter %f %f %f", (F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ])); - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - tvector = gAgent.getPosGlobalFromAgent(gAgent.getAvatarObject()->mRoot.getWorldPosition()); + tvector = gAgent.getPosGlobalFromAgent(gAgentAvatarp->mRoot.getWorldPosition()); agent_root_center_text = llformat("AgentRootCenter %f %f %f", (F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ])); } @@ -383,7 +385,7 @@ public: agent_left_text = llformat("AgentLeftAxis %f %f %f", (F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ])); - tvector = gAgent.getCameraPositionGlobal(); + tvector = gAgentCamera.getCameraPositionGlobal(); camera_center_text = llformat("CameraCenter %f %f %f", (F32)(tvector.mdV[VX]), (F32)(tvector.mdV[VY]), (F32)(tvector.mdV[VZ])); @@ -776,7 +778,7 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK // *HACK: this should be rolled into the composite tool logic, not // hardcoded at the top level. - if (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgent.getCameraMode() && LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance()) + if (CAMERA_MODE_CUSTOMIZE_AVATAR != gAgentCamera.getCameraMode() && LLToolMgr::getInstance()->getCurrentTool() != LLToolPie::getInstance()) { // If the current tool didn't process the click, we should show // the pie menu. This can be done by passing the event to the pie @@ -836,7 +838,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLPanelLogin::refreshLocation( true ); LLPanelLogin::updateLocationUI(); } - return LLWindowCallbacks::DND_MOVE; + return LLWindowCallbacks::DND_COPY; }; } @@ -855,7 +857,11 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (obj && !obj->getRegion()->getCapability("ObjectMedia").empty()) { LLTextureEntry *te = obj->getTE(object_face); - if (te) + + // can modify URL if we can modify the object or we have navigate permissions + bool allow_modify_url = obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ); + + if (te && allow_modify_url ) { if (drop) { @@ -886,29 +892,24 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi // URL passes the whitelist if (te->getMediaData()->checkCandidateUrl( url ) ) { - // we are allowed to modify the object or we have navigate permissions - // NOTE: Design states you you can change the URL if you have media - // navigate permissions even if you do not have prim modify rights - if ( obj->permModify() || obj->hasMediaPermission( te->getMediaData(), LLVOVolume::MEDIA_PERM_INTERACT ) ) + // just navigate to the URL + if (obj->getMediaImpl(object_face)) { - // just navigate to the URL - if (obj->getMediaImpl(object_face)) - { - obj->getMediaImpl(object_face)->navigateTo(url); - } - else - { - // This is very strange. Navigation should - // happen via the Impl, but we don't have one. - // This sends it to the server, which /should/ - // trigger us getting it. Hopefully. - LLSD media_data; - media_data[LLMediaEntry::CURRENT_URL_KEY] = url; - obj->syncMediaData(object_face, media_data, true, true); - obj->sendMediaDataUpdate(); - } - result = LLWindowCallbacks::DND_LINK; + obj->getMediaImpl(object_face)->navigateTo(url); } + else + { + // This is very strange. Navigation should + // happen via the Impl, but we don't have one. + // This sends it to the server, which /should/ + // trigger us getting it. Hopefully. + LLSD media_data; + media_data[LLMediaEntry::CURRENT_URL_KEY] = url; + obj->syncMediaData(object_face, media_data, true, true); + obj->sendMediaDataUpdate(); + } + result = LLWindowCallbacks::DND_LINK; + } } LLSelectMgr::getInstance()->unhighlightObjectOnly(mDragHoveredObject); @@ -928,6 +929,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi LLSelectMgr::getInstance()->highlightObjectOnly(mDragHoveredObject); } result = (! te->hasMedia()) ? LLWindowCallbacks::DND_COPY : LLWindowCallbacks::DND_LINK; + } } } @@ -1151,9 +1153,9 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) } // SL-53351: Make sure we're not in mouselook when minimised, to prevent control issues - if (gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } send_agent_pause(); @@ -1171,7 +1173,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated) BOOL LLViewerWindow::handleActivateApp(LLWindow *window, BOOL activating) { - //if (!activating) gAgent.changeCameraToDefault(); + //if (!activating) gAgentCamera.changeCameraToDefault(); LLViewerJoystick::getInstance()->setNeedsReset(true); return FALSE; @@ -2088,7 +2090,7 @@ void LLViewerWindow::draw() // Draw tool specific overlay on world LLToolMgr::getInstance()->getCurrentTool()->draw(); - if( gAgent.cameraMouselook() ) + if( gAgentCamera.cameraMouselook() || LLFloaterCamera::inFreeCameraMode() ) { drawMouselookInstructions(); stop_glerror(); @@ -2143,12 +2145,14 @@ void LLViewerWindow::draw() // Takes a single keydown event, usually when UI is visible BOOL LLViewerWindow::handleKey(KEY key, MASK mask) { + // hide tooltips on keypress + LLToolTipMgr::instance().blockToolTips(); + if (gFocusMgr.getKeyboardFocus() && !(mask & (MASK_CONTROL | MASK_ALT)) && !gFocusMgr.getKeystrokesOnly()) { // We have keyboard focus, and it's not an accelerator - if (key < 0x80) { // Not a special key, so likely (we hope) to generate a character. Let it fall through to character handler first. @@ -2156,68 +2160,49 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } } - // hide tooltips on keypress - LLToolTipMgr::instance().blockToolTips(); - - // Explicit hack for debug menu. - if ((MASK_ALT & mask) && - (MASK_CONTROL & mask) && - ('D' == key || 'd' == key)) + // let menus handle navigation keys for navigation + if ((gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) + ||(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE))) { - toggle_debug_menus(NULL); + return TRUE; } - // Explicit hack for debug menu. - if ((mask == (MASK_SHIFT | MASK_CONTROL)) && - ('G' == key || 'g' == key)) + // give menus a chance to handle modified (Ctrl, Alt) shortcut keys before current focus + // as long as focus isn't locked + if (mask & (MASK_CONTROL | MASK_ALT) && !gFocusMgr.focusLocked()) { - if (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) //on splash page + if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) { - BOOL visible = ! gSavedSettings.getBOOL("ForceShowGrid"); - gSavedSettings.setBOOL("ForceShowGrid", visible); - - // Initialize visibility (and don't force visibility - use prefs) - LLPanelLogin::refreshLocation( false ); + return TRUE; } } - // Debugging view for unified notifications: CTRL-SHIFT-5 - // *FIXME: Having this special-cased right here (just so this can be invoked from the login screen) sucks. - if ((MASK_SHIFT & mask) - && (!(MASK_ALT & mask)) - && (MASK_CONTROL & mask) - && ('5' == key)) + // give floaters first chance to handle TAB key + // so frontmost floater gets focus + // if nothing has focus, go to first or last UI element as appropriate + if (key == KEY_TAB && (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL)) { - //LLFloaterNotificationConsole::showInstance(); - LLFloaterReg::showInstance("notifications_console"); - return TRUE; - } + if (gMenuHolder) gMenuHolder->hideMenus(); - // handle escape key - //if (key == KEY_ESCAPE && mask == MASK_NONE) - //{ + // if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode + gFloaterView->setCycleMode((mask & MASK_CONTROL) != 0); - // *TODO: get this to play well with mouselook and hidden - // cursor modes, etc, and re-enable. - //if (gFocusMgr.getMouseCapture()) - //{ - // gFocusMgr.setMouseCapture(NULL); - // return TRUE; - //} - //} - - // let menus handle navigation keys - if (gMenuBarView && gMenuBarView->handleKey(key, mask, TRUE)) - { - return TRUE; - } - // let menus handle navigation keys - if (gLoginMenuBarView && gLoginMenuBarView->handleKey(key, mask, TRUE)) - { + // do CTRL-TAB and CTRL-SHIFT-TAB logic + if (mask & MASK_SHIFT) + { + mRootView->focusPrevRoot(); + } + else + { + mRootView->focusNextRoot(); + } return TRUE; } - //some of context menus use this container, let context menu handle navigation keys - if(gMenuHolder && gMenuHolder->handleKey(key, mask, TRUE)) + + // hidden edit menu for cut/copy/paste + if (gEditMenu && gEditMenu->handleAcceleratorKey(key, mask)) { return TRUE; } @@ -2270,7 +2255,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) } // Try for a new-format gesture - if (LLGestureManager::instance().triggerGesture(key, mask)) + if (LLGestureMgr::instance().triggerGesture(key, mask)) { return TRUE; } @@ -2282,50 +2267,10 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) return TRUE; } - // Topmost view gets a chance before the hierarchy - // *FIX: get rid of this? - //LLUICtrl* top_ctrl = gFocusMgr.getTopCtrl(); - //if (top_ctrl) - //{ - // if( top_ctrl->handleKey( key, mask, TRUE ) ) - // { - // return TRUE; - // } - //} - // give floaters first chance to handle TAB key - // so frontmost floater gets focus - if (key == KEY_TAB) - { - // if nothing has focus, go to first or last UI element as appropriate - if (mask & MASK_CONTROL || gFocusMgr.getKeyboardFocus() == NULL) - { - if (gMenuHolder) gMenuHolder->hideMenus(); - - // if CTRL-tabbing (and not just TAB with no focus), go into window cycle mode - gFloaterView->setCycleMode((mask & MASK_CONTROL) != 0); - - // do CTRL-TAB and CTRL-SHIFT-TAB logic - if (mask & MASK_SHIFT) - { - mRootView->focusPrevRoot(); - } - else - { - mRootView->focusNextRoot(); - } - return TRUE; - } - } - - // give menus a chance to handle keys - if (gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) - { - return TRUE; - } - - // give menus a chance to handle keys - if (gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)) + // give menus a chance to handle unmodified accelerator keys + if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask)) + ||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask))) { return TRUE; } @@ -2424,7 +2369,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) // Zoom the camera in and out behavior if(top_ctrl == 0 && getWorldViewRectScaled().pointInRect(mCurrentMousePoint.mX, mCurrentMousePoint.mY) ) - gAgent.handleScrollWheel(clicks); + gAgentCamera.handleScrollWheel(clicks); return; } @@ -3148,7 +3093,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, // setup HUD render if (selection->getSelectType() == SELECT_TYPE_HUD && LLSelectMgr::getInstance()->getSelection()->getObjectCount()) { - LLBBox hud_bbox = gAgent.getAvatarObject()->getHUDBBox(); + LLBBox hud_bbox = gAgentAvatarp->getHUDBBox(); // set up transform to encompass bounding box of HUD glMatrixMode(GL_PROJECTION); @@ -3175,7 +3120,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, glPushMatrix(); if (selection->getSelectType() == SELECT_TYPE_HUD) { - F32 zoom = gAgent.mHUDCurZoom; + F32 zoom = gAgentCamera.mHUDCurZoom; glScalef(zoom, zoom, zoom); } @@ -3294,7 +3239,7 @@ LLVector3d LLViewerWindow::clickPointInWorldGlobal(S32 x, S32 y_from_bot, LLView // world at the location of the mouse click LLVector3 mouse_direction_global = mouseDirectionGlobal( x, y_from_bot ); - LLVector3d relative_object = clicked_object->getPositionGlobal() - gAgent.getCameraPositionGlobal(); + LLVector3d relative_object = clicked_object->getPositionGlobal() - gAgentCamera.getCameraPositionGlobal(); // make mouse vector as long as object vector, so it touchs a point near // where the user clicked on the object @@ -3303,7 +3248,7 @@ LLVector3d LLViewerWindow::clickPointInWorldGlobal(S32 x, S32 y_from_bot, LLView LLVector3d new_pos; new_pos.setVec(mouse_direction_global); // transform mouse vector back to world coords - new_pos += gAgent.getCameraPositionGlobal(); + new_pos += gAgentCamera.getCameraPositionGlobal(); return new_pos; } @@ -3570,7 +3515,7 @@ LLVector3 LLViewerWindow::mousePointHUD(const S32 x, const S32 y) const F32 hud_x = -((F32)x - center_x) / height; F32 hud_y = ((F32)y - center_y) / height; - return LLVector3(0.f, hud_x/gAgent.mHUDCurZoom, hud_y/gAgent.mHUDCurZoom); + return LLVector3(0.f, hud_x/gAgentCamera.mHUDCurZoom, hud_y/gAgentCamera.mHUDCurZoom); } // Returns unit vector relative to camera in camera space @@ -3617,7 +3562,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con LLVector3d plane_normal_global_d; plane_normal_global_d.setVec(plane_normal_global); F64 plane_mouse_dot = (plane_normal_global_d * mouse_direction_global_d); - LLVector3d plane_origin_camera_rel = plane_point_global - gAgent.getCameraPositionGlobal(); + LLVector3d plane_origin_camera_rel = plane_point_global - gAgentCamera.getCameraPositionGlobal(); F64 mouse_look_at_scale = (plane_normal_global_d * plane_origin_camera_rel) / plane_mouse_dot; if (llabs(plane_mouse_dot) < 0.00001) @@ -3631,7 +3576,7 @@ BOOL LLViewerWindow::mousePointOnPlaneGlobal(LLVector3d& point, const S32 x, con mouse_look_at_scale = plane_origin_camera_rel.magVec() / (plane_origin_dir * mouse_direction_global_d); } - point = gAgent.getCameraPositionGlobal() + mouse_look_at_scale * mouse_direction_global_d; + point = gAgentCamera.getCameraPositionGlobal() + mouse_look_at_scale * mouse_direction_global_d; return mouse_look_at_scale > 0.0; } @@ -3649,12 +3594,12 @@ BOOL LLViewerWindow::mousePointOnLandGlobal(const S32 x, const S32 y, LLVector3d const F32 SECOND_PASS_STEP = 0.1f; // meters LLVector3d camera_pos_global; - camera_pos_global = gAgent.getCameraPositionGlobal(); + camera_pos_global = gAgentCamera.getCameraPositionGlobal(); LLVector3d probe_point_global; LLVector3 probe_point_region; // walk forwards to find the point - for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgent.mDrawDistance; mouse_dir_scale += FIRST_PASS_STEP) + for (mouse_dir_scale = FIRST_PASS_STEP; mouse_dir_scale < gAgentCamera.mDrawDistance; mouse_dir_scale += FIRST_PASS_STEP) { LLVector3d mouse_direction_global_d; mouse_direction_global_d.setVec(mouse_direction_global * mouse_dir_scale); @@ -5039,9 +4984,9 @@ bool LLViewerWindow::onAlert(const LLSD& notify) // If we're in mouselook, the mouse is hidden and so the user can't click // the dialog buttons. In that case, change to First Person instead. - if( gAgent.cameraMouselook() ) + if( gAgentCamera.cameraMouselook() ) { - gAgent.changeCameraToDefault(); + gAgentCamera.changeCameraToDefault(); } return false; } @@ -5153,7 +5098,7 @@ void LLPickInfo::fetchResults() { mPickType = PICK_OBJECT; } - mObjectOffset = gAgent.calcFocusOffset(objectp, intersection, mPickPt.mX, mPickPt.mY); + mObjectOffset = gAgentCamera.calcFocusOffset(objectp, intersection, mPickPt.mX, mPickPt.mY); mObjectID = objectp->mID; mObjectFace = (te_offset == NO_FACE) ? -1 : (S32)te_offset; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 86987f4c78..3f021d1f84 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -1,6 +1,6 @@ /** * @File llvoavatar.cpp - * @brief Implementation of LLVOAvatar class which is a derivation fo LLViewerObject + * @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject * * $LicenseInfo:firstyear=2001&license=viewergpl$ * @@ -48,6 +48,7 @@ #include "sound_ids.h" #include "llagent.h" // Get state values from here +#include "llagentcamera.h" #include "llagentwearables.h" #include "llanimationstates.h" #include "llavatarpropertiesprocessor.h" @@ -65,6 +66,7 @@ #include "llkeyframewalkmotion.h" #include "llmutelist.h" #include "llmoveview.h" +#include "llnotificationsutil.h" #include "llquantize.h" #include "llregionhandle.h" #include "llresmgr.h" @@ -100,6 +102,8 @@ #include <boost/lexical_cast.hpp> +#define DISPLAY_AVATAR_LOAD_TIMES + using namespace LLVOAvatarDefines; //----------------------------------------------------------------------------- @@ -755,11 +759,6 @@ LLVOAvatar::~LLVOAvatar() { lldebugs << "LLVOAvatar Destructor (0x" << this << ") id:" << mID << llendl; - if (isSelf()) - { - gAgent.setAvatarObject(NULL); - } - mRoot.removeAllChildren(); deleteAndClearArray(mSkeleton); @@ -886,7 +885,7 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars) // static void LLVOAvatar::dumpBakedStatus() { - LLVector3d camera_pos_global = gAgent.getCameraPositionGlobal(); + LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal(); for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin(); iter != LLCharacter::sInstances.end(); ++iter) @@ -965,15 +964,14 @@ void LLVOAvatar::dumpBakedStatus() //static void LLVOAvatar::restoreGL() { - LLVOAvatar* self = gAgent.getAvatarObject(); - if (!self) - return; - self->setCompositeUpdatesEnabled(TRUE); - for (U32 i = 0; i < self->mBakedTextureDatas.size(); i++) + if (!isAgentAvatarValid()) return; + + gAgentAvatarp->setCompositeUpdatesEnabled(TRUE); + for (U32 i = 0; i < gAgentAvatarp->mBakedTextureDatas.size(); i++) { - self->invalidateComposite(self->mBakedTextureDatas[i].mTexLayerSet, FALSE); + gAgentAvatarp->invalidateComposite(gAgentAvatarp->mBakedTextureDatas[i].mTexLayerSet, FALSE); } - self->updateMeshTextures(); + gAgentAvatarp->updateMeshTextures(); } //static @@ -2085,7 +2083,7 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys, if(retval & LLViewerObject::INVALID_UPDATE) { - if(this == gAgent.getAvatarObject()) + if (isSelf()) { //tell sim to cancel this update gAgent.teleportViaLocation(gAgent.getPositionGlobal()); @@ -2226,7 +2224,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) { // disable voice visualizer when in mouselook - mVoiceVisualizer->setVoiceEnabled( voice_enabled && !(isSelf() && gAgent.cameraMouselook()) ); + mVoiceVisualizer->setVoiceEnabled( voice_enabled && !(isSelf() && gAgentCamera.cameraMouselook()) ); if ( voice_enabled ) { //---------------------------------------------------------------- @@ -2254,7 +2252,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled) else { llinfos << "oops - CurrentGesticulationLevel can be only 0, 1, or 2" << llendl; } // this is the call that Karl S. created for triggering gestures from within the code. - LLGestureManager::instance().triggerAndReviseString( gestureString ); + LLGestureMgr::instance().triggerAndReviseString( gestureString ); } } @@ -2547,7 +2545,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() llinfos << "self isFullyLoaded, first_fully_visible" << llendl; first_fully_visible = false; - LLAppearanceManager::instance().onFirstFullyVisible(); + LLAppearanceMgr::instance().onFirstFullyVisible(); } } if (isFullyLoaded()) @@ -2672,7 +2670,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) if (isSelf()) { render_name = render_name - && !gAgent.cameraMouselook() + && !gAgentCamera.cameraMouselook() && (visible_chat || (gSavedSettings.getBOOL("RenderNameShowSelf") && gSavedSettings.getS32("AvatarNameTagMode") )); } @@ -2936,14 +2934,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) } else { - if (gSavedSettings.getBOOL("SmallAvatarNames")) - { - mNameText->setFont(LLFontGL::getFontSansSerif()); - } - else - { - mNameText->setFont(LLFontGL::getFontSansSerifBig()); - } + mNameText->setFont(LLFontGL::getFontSansSerif()); mNameText->setTextAlignment(LLHUDText::ALIGN_TEXT_CENTER); mNameText->setFadeDistance(CHAT_NORMAL_RADIUS, 5.f); mNameText->setVisibleOffScreen(FALSE); @@ -3237,7 +3228,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) } } LLVector3 fwdDir = lerp(primDir, velDir, clamp_rescale(speed, 0.5f, 2.0f, 0.0f, 1.0f)); - if (isSelf() && gAgent.cameraMouselook()) + if (isSelf() && gAgentCamera.cameraMouselook()) { // make sure fwdDir stays in same general direction as primdir if (gAgent.getFlying()) @@ -3268,7 +3259,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) // When moving very slow, the pelvis is allowed to deviate from the // forward direction to allow it to hold it's position while the torso // and head turn. Once in motion, it must conform however. - BOOL self_in_mouselook = isSelf() && gAgent.cameraMouselook(); + BOOL self_in_mouselook = isSelf() && gAgentCamera.cameraMouselook(); LLVector3 pelvisDir( mRoot.getWorldMatrix().getFwdRow4().mV ); F32 pelvis_rot_threshold = clamp_rescale(speed, 0.1f, 1.0f, PELVIS_ROT_THRESHOLD_SLOW, PELVIS_ROT_THRESHOLD_FAST); @@ -5208,7 +5199,7 @@ BOOL LLVOAvatar::updateJointLODs() { if (isSelf()) { - if(gAgent.cameraCustomizeAvatar() || gAgent.cameraMouselook()) + if(gAgentCamera.cameraCustomizeAvatar() || gAgentCamera.cameraMouselook()) { mAdjustedPixelArea = MAX_PIXEL_AREA; } @@ -5354,7 +5345,7 @@ void LLVOAvatar::updateShadowFaces() // Render sprite sprite.setNormal(normal); - if (isSelf() && gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + if (isSelf() && gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { sprite.setColor(0.f, 0.f, 0.f, 0.f); } @@ -5387,7 +5378,7 @@ void LLVOAvatar::updateShadowFaces() // Render sprite sprite.setNormal(normal); - if (isSelf() && gAgent.getCameraMode() == CAMERA_MODE_MOUSELOOK) + if (isSelf() && gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) { sprite.setColor(0.f, 0.f, 0.f, 0.f); } @@ -5442,7 +5433,7 @@ BOOL LLVOAvatar::setParent(LLViewerObject* parent) ret = LLViewerObject::setParent(parent); if (isSelf()) { - gAgent.resetCamera(); + gAgentCamera.resetCamera(); } } else @@ -5627,15 +5618,15 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object) //LLFirstUse::useSit(); gAgent.setFlying(FALSE); - gAgent.setThirdPersonHeadOffset(LLVector3::zero); + gAgentCamera.setThirdPersonHeadOffset(LLVector3::zero); //interpolate to new camera position - gAgent.startCameraAnimation(); + gAgentCamera.startCameraAnimation(); // make sure we are not trying to autopilot gAgent.stopAutoPilot(); - gAgent.setupSitCamera(); - if (gAgent.getForceMouselook()) + gAgentCamera.setupSitCamera(); + if (gAgentCamera.getForceMouselook()) { - gAgent.changeCameraToMouselook(); + gAgentCamera.changeCameraToMouselook(); } } @@ -5724,9 +5715,9 @@ void LLVOAvatar::getOffObject() //reset orientation // mRoot.setRotation(avWorldRot); - gAgent.setThirdPersonHeadOffset(LLVector3(0.f, 0.f, 1.f)); + gAgentCamera.setThirdPersonHeadOffset(LLVector3(0.f, 0.f, 1.f)); - gAgent.setSitCamera(LLUUID::null); + gAgentCamera.setSitCamera(LLUUID::null); } } @@ -5864,6 +5855,7 @@ void LLVOAvatar::updateRuthTimer(bool loading) if (mPreviousFullyLoaded) { mRuthTimer.reset(); + mRuthDebugTimer.reset(); } const F32 LOADING_TIMEOUT = 120.f; @@ -5892,7 +5884,17 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading) mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > PAUSE); - +#ifdef DISPLAY_AVATAR_LOAD_TIMES + if (!mPreviousFullyLoaded && !loading && mFullyLoaded) + { + llinfos << "Avatar '" << getFullname() << "' resolved in " << mRuthDebugTimer.getElapsedTimeF32() << " seconds." << llendl; + LLSD args; + args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32()); + args["NAME"] = getFullname(); + LLNotificationsUtil::add("AvatarRezNotification",args); + } +#endif + // did our loading state "change" from last call? const S32 UPDATE_RATE = 30; BOOL changed = @@ -5943,7 +5945,7 @@ void LLVOAvatar::updateMeshTextures() } } - const BOOL self_customizing = isSelf() && gAgent.cameraCustomizeAvatar(); // During face edit mode, we don't use baked textures + const BOOL self_customizing = isSelf() && gAgentCamera.cameraCustomizeAvatar(); // During face edit mode, we don't use baked textures const BOOL other_culled = !isSelf() && mCulled; std::vector<BOOL> is_layer_baked; @@ -6864,8 +6866,7 @@ void LLVOAvatar::useBakedTexture( const LLUUID& id ) // static void LLVOAvatar::dumpArchetypeXML( void* ) { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLAPRFile outfile ; + LLAPRFile outfile; outfile.open(gDirUtilp->getExpandedFilename(LL_PATH_CHARACTER,"new archetype.xml"), LL_APR_WB ); apr_file_t* file = outfile.getFileHandle() ; if (!file) @@ -6883,7 +6884,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) const std::string& wearable_name = LLWearableDictionary::getTypeName((EWearableType)type); apr_file_printf( file, "\n\t\t<!-- wearable: %s -->\n", wearable_name.c_str() ); - for (LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam()) + for (LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam()) { LLViewerVisualParam* viewer_param = (LLViewerVisualParam*)param; if( (viewer_param->getWearableType() == type) && @@ -6899,7 +6900,7 @@ void LLVOAvatar::dumpArchetypeXML( void* ) if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex)te) == type) { // MULTIPLE_WEARABLES: extend to multiple wearables? - LLViewerTexture* te_image = avatar->getImage((ETextureIndex)te, 0); + LLViewerTexture* te_image = ((LLVOAvatar *)(gAgentAvatarp))->getImage((ETextureIndex)te, 0); if( te_image ) { std::string uuid_str; diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h index 55753233b0..c80d59966c 100644 --- a/indra/newview/llvoavatar.h +++ b/indra/newview/llvoavatar.h @@ -1,6 +1,6 @@ /** * @file llvoavatar.h - * @brief Declaration of LLVOAvatar class which is a derivation fo + * @brief Declaration of LLVOAvatar class which is a derivation of * LLViewerObject * * $LicenseInfo:firstyear=2001&license=viewergpl$ @@ -259,6 +259,7 @@ private: S32 mFullyLoadedFrameCounter; LLFrameTimer mFullyLoadedTimer; LLFrameTimer mRuthTimer; + LLFrameTimer mRuthDebugTimer; // For tracking how long it takes for av to rez /** State ** ** diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 5e9c139bc4..7473adda1f 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -44,9 +44,11 @@ #include "pipeline.h" #include "llagent.h" // Get state values from here +#include "llagentcamera.h" #include "llagentwearables.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" +#include "llinventoryfunctions.h" #include "llselectmgr.h" #include "lltoolgrab.h" // for needsRenderBeam #include "lltoolmgr.h" // for needsRenderBeam @@ -66,6 +68,14 @@ #include <boost/lexical_cast.hpp> +LLVOAvatarSelf *gAgentAvatarp = NULL; +BOOL isAgentAvatarValid() +{ + return (gAgentAvatarp && + (gAgentAvatarp->getRegion() != NULL) && + (!gAgentAvatarp->isDead())); +} + using namespace LLVOAvatarDefines; /********************************************************************************* @@ -77,14 +87,14 @@ using namespace LLVOAvatarDefines; struct LocalTextureData { LocalTextureData() : - mIsBakedReady(FALSE), + mIsBakedReady(false), mDiscard(MAX_DISCARD_LEVEL+1), mImage(NULL), mWearableID(IMG_DEFAULT_AVATAR), mTexEntry(NULL) {} LLPointer<LLViewerFetchedTexture> mImage; - BOOL mIsBakedReady; + bool mIsBakedReady; S32 mDiscard; LLUUID mWearableID; // UUID of the wearable that this texture belongs to, not of the image itself LLTextureEntry *mTexEntry; @@ -132,7 +142,6 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id, mLastRegionHandle(0), mRegionCrossingCount(0) { - gAgent.setAvatarObject(this); gAgentWearables.setAvatarObject(this); lldebugs << "Marking avatar as self " << id << llendl; @@ -510,16 +519,17 @@ BOOL LLVOAvatarSelf::buildMenus() return TRUE; } +void LLVOAvatarSelf::cleanup() +{ + markDead(); + delete mScreenp; + mScreenp = NULL; + mRegionp = NULL; +} + LLVOAvatarSelf::~LLVOAvatarSelf() { - // gAgents pointer might have been set to a different Avatar Self, don't get rid of it if so. - if (gAgent.getAvatarObject() == this) - { - gAgent.setAvatarObject(NULL); - gAgentWearables.setAvatarObject(NULL); - } - delete mScreenp; - mScreenp = NULL; + cleanup(); } /** @@ -610,6 +620,17 @@ BOOL LLVOAvatarSelf::updateCharacter(LLAgent &agent) } // virtual +BOOL LLVOAvatarSelf::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) +{ + if (!isAgentAvatarValid()) + { + return TRUE; + } + LLVOAvatar::idleUpdate(agent, world, time); + return TRUE; +} + +// virtual LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) { if (mScreenp) @@ -620,7 +641,8 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return LLVOAvatar::getJoint(name); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake ) +// virtual +BOOL LLVOAvatarSelf::setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake ) { if (!which_param) { @@ -630,7 +652,8 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return setParamWeight(param,weight,upload_bake); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake ) +// virtual +BOOL LLVOAvatarSelf::setVisualParamWeight(const char* param_name, F32 weight, BOOL upload_bake ) { if (!param_name) { @@ -640,7 +663,8 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) return setParamWeight(param,weight,upload_bake); } -/*virtual*/ BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake ) +// virtual +BOOL LLVOAvatarSelf::setVisualParamWeight(S32 index, F32 weight, BOOL upload_bake ) { LLViewerVisualParam *param = (LLViewerVisualParam*) LLCharacter::getVisualParam(index); return setParamWeight(param,weight,upload_bake); @@ -774,7 +798,8 @@ void LLVOAvatarSelf::removeMissingBakedTextures() //virtual void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) { - if (regionp->getHandle() != mLastRegionHandle) + setRegion(regionp); + if (!regionp || (regionp->getHandle() != mLastRegionHandle)) { if (mLastRegionHandle != 0) { @@ -788,7 +813,10 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp) max = llmax(delta, max); LLViewerStats::getInstance()->setStat(LLViewerStats::ST_CROSSING_MAX, max); } - mLastRegionHandle = regionp->getHandle(); + if (regionp) + { + mLastRegionHandle = regionp->getHandle(); + } } mRegionCrossingTimer.reset(); } @@ -817,10 +845,10 @@ void LLVOAvatarSelf::idleUpdateTractorBeam() { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - if (gAgent.mPointAt.notNull()) + if (gAgentCamera.mPointAt.notNull()) { // get point from pointat effect - mBeam->setPositionGlobal(gAgent.mPointAt->getPointAtPosGlobal()); + mBeam->setPositionGlobal(gAgentCamera.mPointAt->getPointAtPosGlobal()); mBeam->triggerLocal(); } else if (selection->getFirstRootObject() && @@ -871,7 +899,7 @@ void LLVOAvatarSelf::restoreMeshData() //llinfos << "Restoring" << llendl; mMeshValid = TRUE; updateJointLODs(); - updateAttachmentVisibility(gAgent.getCameraMode()); + updateAttachmentVisibility(gAgentCamera.getCameraMode()); // force mesh update as LOD might not have changed to trigger this gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE); @@ -936,7 +964,7 @@ void LLVOAvatarSelf::wearableUpdated( EWearableType type, BOOL upload_result ) // if we're editing our appearance, ensure that we're not using baked textures // The baked texture for alpha masks is set explicitly when you hit "save" - if (gAgent.cameraCustomizeAvatar()) + if (gAgentCamera.cameraCustomizeAvatar()) { setNewBakedTexture(index,IMG_DEFAULT_AVATAR); } @@ -1025,7 +1053,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view return 0; } - updateAttachmentVisibility(gAgent.getCameraMode()); + updateAttachmentVisibility(gAgentCamera.getCameraMode()); // Then make sure the inventory is in sync with the avatar. @@ -1033,7 +1061,7 @@ const LLViewerJointAttachment *LLVOAvatarSelf::attachObject(LLViewerObject *view if (attachment->isObjectAttached(viewer_object)) { const LLUUID& attachment_id = viewer_object->getItemID(); - LLAppearanceManager::instance().registerAttachment(attachment_id); + LLAppearanceMgr::instance().registerAttachment(attachment_id); } return attachment; @@ -1066,13 +1094,13 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) // Make sure the inventory is in sync with the avatar. // Update COF contents, don't trigger appearance update. - if (gAgent.getAvatarObject() == NULL) + if (!isAgentAvatarValid()) { llinfos << "removeItemLinks skipped, avatar is under destruction" << llendl; } else { - LLAppearanceManager::instance().unregisterAttachment(attachment_id); + LLAppearanceMgr::instance().unregisterAttachment(attachment_id); } return TRUE; @@ -1113,11 +1141,11 @@ void LLVOAvatarSelf::localTextureLoaded(BOOL success, LLViewerFetchedTexture *sr discard_level < local_tex_obj->getDiscard()) { local_tex_obj->setDiscard(discard_level); - if (!gAgent.cameraCustomizeAvatar()) + if (!gAgentCamera.cameraCustomizeAvatar()) { requestLayerSetUpdate(index); } - else if (gAgent.cameraCustomizeAvatar()) + else if (gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } @@ -1521,11 +1549,11 @@ void LLVOAvatarSelf::setLocalTexture(ETextureIndex type, LLViewerTexture* src_te if (tex_discard >= 0 && tex_discard <= desired_discard) { local_tex_obj->setDiscard(tex_discard); - if (isSelf() && !gAgent.cameraCustomizeAvatar()) + if (isSelf() && !gAgentCamera.cameraCustomizeAvatar()) { requestLayerSetUpdate(type); } - else if (isSelf() && gAgent.cameraCustomizeAvatar()) + else if (isSelf() && gAgentCamera.cameraCustomizeAvatar()) { LLVisualParamHint::requestHintUpdates(); } @@ -1665,7 +1693,7 @@ void LLVOAvatarSelf::onLocalTextureLoaded(BOOL success, LLViewerFetchedTexture * void LLVOAvatarSelf::dumpTotalLocalTextureByteCount() { S32 gl_bytes = 0; - gAgent.getAvatarObject()->getLocalTextureByteCount(&gl_bytes); + gAgentAvatarp->getLocalTextureByteCount(&gl_bytes); llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl; } @@ -1920,9 +1948,7 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) { LLUUID texture_id; msg->getUUID("TextureData", "TextureID", texture_id); - - LLVOAvatarSelf* self = gAgent.getAvatarObject(); - if (!self) return; + if (!isAgentAvatarValid()) return; // If this is a texture corresponding to one of our baked entries, // just rebake that layer set. @@ -1939,13 +1965,13 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) const LLVOAvatarDictionary::TextureEntry *texture_dict = iter->second; if (texture_dict->mIsBakedTexture) { - if (texture_id == self->getTEImage(index)->getID()) + if (texture_id == gAgentAvatarp->getTEImage(index)->getID()) { - LLTexLayerSet* layer_set = self->getLayerSet(index); + LLTexLayerSet* layer_set = gAgentAvatarp->getLayerSet(index); if (layer_set) { llinfos << "TAT: rebake - matched entry " << (S32)index << llendl; - self->invalidateComposite(layer_set, TRUE); + gAgentAvatarp->invalidateComposite(layer_set, TRUE); found = TRUE; LLViewerStats::getInstance()->incStat(LLViewerStats::ST_TEX_REBAKES); } @@ -1956,12 +1982,12 @@ void LLVOAvatarSelf::processRebakeAvatarTextures(LLMessageSystem* msg, void**) // If texture not found, rebake all entries. if (!found) { - self->forceBakeAllTextures(); + gAgentAvatarp->forceBakeAllTextures(); } else { // Not sure if this is necessary, but forceBakeAllTextures() does it. - self->updateMeshTextures(); + gAgentAvatarp->updateMeshTextures(); } } @@ -2041,10 +2067,9 @@ void LLVOAvatarSelf::onCustomizeStart() // static void LLVOAvatarSelf::onCustomizeEnd() { - LLVOAvatarSelf *avatarp = gAgent.getAvatarObject(); - if (avatarp) + if (isAgentAvatarValid()) { - avatarp->invalidateAll(); + gAgentAvatarp->invalidateAll(); } } diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h index 24a2896eb0..337d445eac 100644 --- a/indra/newview/llvoavatarself.h +++ b/indra/newview/llvoavatarself.h @@ -55,7 +55,8 @@ public: LLVOAvatarSelf(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp); virtual ~LLVOAvatarSelf(); virtual void markDead(); - virtual void initInstance(); // Called after construction to initialize the class. + virtual void initInstance(); // Called after construction to initialize the class. + void cleanup(); protected: /*virtual*/ BOOL loadAvatar(); BOOL loadAvatarSelf(); @@ -77,6 +78,7 @@ protected: //-------------------------------------------------------------------- public: /*virtual*/ void updateRegion(LLViewerRegion *regionp); + /*virtual*/ BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time); //-------------------------------------------------------------------- // LLCharacter interface and related @@ -122,12 +124,10 @@ public: public: /*virtual*/ BOOL getIsCloud(); private: - BOOL mIsBaked; // are the stored baked textures up to date? //-------------------------------------------------------------------- // Region state //-------------------------------------------------------------------- -private: U64 mLastRegionHandle; LLFrameTimer mRegionCrossingTimer; S32 mRegionCrossingCount; @@ -333,4 +333,8 @@ public: }; +extern LLVOAvatarSelf *gAgentAvatarp; + +BOOL isAgentAvatarValid(); + #endif // LL_VO_AVATARSELF_H diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp index e311f07912..a82afbeb76 100644 --- a/indra/newview/llvograss.cpp +++ b/indra/newview/llvograss.cpp @@ -37,7 +37,7 @@ #include "imageids.h" #include "llviewercontrol.h" -#include "llagent.h" +#include "llagentcamera.h" #include "llnotificationsutil.h" #include "lldrawable.h" #include "llface.h" @@ -306,7 +306,7 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) void LLVOGrass::setPixelAreaAndAngle(LLAgent &agent) { // This should be the camera's center, as soon as we move to all region-local. - LLVector3 relative_position = getPositionAgent() - agent.getCameraPositionAgent(); + LLVector3 relative_position = getPositionAgent() - gAgentCamera.getCameraPositionAgent(); F32 range = relative_position.length(); F32 max_scale = getMaxScale(); diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index fac7fa6a18..7bb1006e93 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -139,13 +139,10 @@ LLVoiceChannel::LLVoiceChannel(const LLUUID& session_id, const std::string& sess LLVoiceChannel::~LLVoiceChannel() { - // Don't use LLVoiceClient::getInstance() here -- this can get called during atexit() time and that singleton MAY have already been destroyed. - // Using call of instanceExists() instead of gVoiceClient in check to avoid crash in LLVoiceClient::removeObserver() - // when quitting viewer by closing console window before login (though in case of such quit crash will occur - // later in other destructors anyway). EXT-5524 + // Must check instance exists here, the singleton MAY have already been destroyed. if(LLVoiceClient::instanceExists()) { - gVoiceClient->removeObserver(this); + LLVoiceClient::instance().removeObserver(this); } sVoiceChannelMap.erase(mSessionID); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 9bb85d2bd5..298ce3fcec 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -60,6 +60,7 @@ #include "llappviewer.h" // for gDisconnected, gDisableVoice #include "llmutelist.h" // to check for muted avatars #include "llagent.h" +#include "llvoavatarself.h" #include "llcachename.h" #include "llimview.h" // for LLIMMgr #include "llparcel.h" @@ -86,6 +87,12 @@ static bool sConnectingToAgni = false; F32 LLVoiceClient::OVERDRIVEN_POWER_LEVEL = 0.7f; +const F32 LLVoiceClient::VOLUME_MIN = 0.f; +const F32 LLVoiceClient::VOLUME_DEFAULT = 0.5f; +const F32 LLVoiceClient::VOLUME_MAX = 1.0f; + +const F32 VOLUME_SCALE_VIVOX = 0.01f; + const F32 SPEAKING_TIMEOUT = 1.f; const int VOICE_MAJOR_VERSION = 1; @@ -1111,24 +1118,28 @@ class LLSpeakerVolumeStorage : public LLSingleton<LLSpeakerVolumeStorage> public: /** - * Sets internal voluem level for specified user. + * Stores volume level for specified user. * - * @param[in] speaker_id - LLUUID of user to store volume level for - * @param[in] volume - external (vivox) volume level to be stored for user. + * @param[in] speaker_id - LLUUID of user to store volume level for. + * @param[in] volume - volume level to be stored for user. */ void storeSpeakerVolume(const LLUUID& speaker_id, F32 volume); /** - * Gets stored external (vivox) volume level for specified speaker and - * transforms it into internal (viewer) level. + * Gets stored volume level for specified speaker * - * If specified user is not found -1 will be returned. - * Internal level is calculated as: internal = 400 * external^2 - * Maps 0.0 to 1.0 to internal values 0-400 + * @param[in] speaker_id - LLUUID of user to retrieve volume level for. + * @param[out] volume - set to stored volume if found, otherwise unmodified. + * @return - true if a stored volume is found. + */ + bool getSpeakerVolume(const LLUUID& speaker_id, F32& volume); + + /** + * Removes stored volume level for specified user. * - * @param[in] speaker_id - LLUUID of user to get his volume level + * @param[in] speaker_id - LLUUID of user to remove. */ - S32 getSpeakerVolume(const LLUUID& speaker_id); + void removeSpeakerVolume(const LLUUID& speaker_id); private: friend class LLSingleton<LLSpeakerVolumeStorage>; @@ -1140,6 +1151,9 @@ private: void load(); void save(); + static F32 transformFromLegacyVolume(F32 volume_in); + static F32 transformToLegacyVolume(F32 volume_in); + typedef std::map<LLUUID, F32> speaker_data_map_t; speaker_data_map_t mSpeakersData; }; @@ -1158,23 +1172,85 @@ LLSpeakerVolumeStorage::~LLSpeakerVolumeStorage() void LLSpeakerVolumeStorage::storeSpeakerVolume(const LLUUID& speaker_id, F32 volume) { - mSpeakersData[speaker_id] = volume; + if ((volume >= LLVoiceClient::VOLUME_MIN) && (volume <= LLVoiceClient::VOLUME_MAX)) + { + mSpeakersData[speaker_id] = volume; + + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Stored volume = " << volume << " for " << id << LL_ENDL; + } + else + { + LL_WARNS("Voice") << "Attempted to store out of range volume " << volume << " for " << speaker_id << LL_ENDL; + llassert(0); + } } -S32 LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id) +bool LLSpeakerVolumeStorage::getSpeakerVolume(const LLUUID& speaker_id, F32& volume) { - // Return value of -1 indicates no level is stored for this speaker - S32 ret_val = -1; speaker_data_map_t::const_iterator it = mSpeakersData.find(speaker_id); if (it != mSpeakersData.end()) { - F32 f_val = it->second; - // volume can amplify by as much as 4x! - S32 ivol = (S32)(400.f * f_val * f_val); - ret_val = llclamp(ivol, 0, 400); + volume = it->second; + + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Retrieved stored volume = " << volume << " for " << id << LL_ENDL; + + return true; + } + + return false; +} + +void LLSpeakerVolumeStorage::removeSpeakerVolume(const LLUUID& speaker_id) +{ + mSpeakersData.erase(speaker_id); + + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "Removing stored volume for " << id << LL_ENDL; +} + +/* static */ F32 LLSpeakerVolumeStorage::transformFromLegacyVolume(F32 volume_in) +{ + // Convert to linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // from legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.5, volume_out = 0.56 + + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); + + if (volume_in <= 0.5f) + { + volume_out = volume_in * volume_in * 4.f * 0.56f; + } + else + { + volume_out = (1.f - 0.56f) * (4.f * volume_in * volume_in - 1.f) / 3.f + 0.56f; + } + + return volume_out; +} + +/* static */ F32 LLSpeakerVolumeStorage::transformToLegacyVolume(F32 volume_in) +{ + // Convert from linear-logarithmic [0.0..1.0] with 0.5 = 0dB + // to legacy characteristic composed of two square-curves + // that intersect at volume_in = 0.56, volume_out = 0.5 + + F32 volume_out = 0.f; + volume_in = llclamp(volume_in, 0.f, 1.0f); + + if (volume_in <= 0.56f) + { + volume_out = sqrt(volume_in / (4.f * 0.56f)); + } + else + { + volume_out = sqrt((3.f * (volume_in - 0.56f) / (1.f - 0.56f) + 1.f) / 4.f); } - return ret_val; + + return volume_out; } void LLSpeakerVolumeStorage::load() @@ -1182,6 +1258,8 @@ void LLSpeakerVolumeStorage::load() // load per-resident voice volume information std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); + LL_INFOS("Voice") << "Loading stored speaker volumes from: " << filename << LL_ENDL; + LLSD settings_llsd; llifstream file; file.open(filename); @@ -1193,7 +1271,10 @@ void LLSpeakerVolumeStorage::load() for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); iter != settings_llsd.endMap(); ++iter) { - mSpeakersData.insert(std::make_pair(LLUUID(iter->first), (F32)iter->second.asReal())); + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformFromLegacyVolume((F32)iter->second.asReal()); + + storeSpeakerVolume(LLUUID(iter->first), volume); } } @@ -1208,9 +1289,14 @@ void LLSpeakerVolumeStorage::save() std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SETTINGS_FILE_NAME); LLSD settings_llsd; + LL_INFOS("Voice") << "Saving stored speaker volumes to: " << filename << LL_ENDL; + for(speaker_data_map_t::const_iterator iter = mSpeakersData.begin(); iter != mSpeakersData.end(); ++iter) { - settings_llsd[iter->first.asString()] = iter->second; + // Maintain compatibility with 1.23 non-linear saved volume levels + F32 volume = transformToLegacyVolume(iter->second); + + settings_llsd[iter->first.asString()] = volume; } llofstream file; @@ -2419,9 +2505,10 @@ void LLVoiceClient::stateMachine() enforceTether(); } - // Send an update if the ptt state has changed (which shouldn't be able to happen that often -- the user can only click so fast) - // or every 10hz, whichever is sooner. - if((mAudioSession && mAudioSession->mVolumeDirty) || mPTTDirty || mSpeakerVolumeDirty || mUpdateTimer.hasExpired()) + // Send an update only if the ptt or mute state has changed (which shouldn't be able to happen that often + // -- the user can only click so fast) or every 10hz, whichever is sooner. + // Sending for every volume update causes an excessive flood of messages whenever a volume slider is dragged. + if((mAudioSession && mAudioSession->mMuteDirty) || mPTTDirty || mUpdateTimer.hasExpired()) { mUpdateTimer.setTimerExpirySec(UPDATE_THROTTLE_SECONDS); sendPositionalUpdate(); @@ -3416,38 +3503,26 @@ void LLVoiceClient::sendPositionalUpdate(void) stream << "</Request>\n\n\n"; } - if(mAudioSession && mAudioSession->mVolumeDirty) + if(mAudioSession && (mAudioSession->mVolumeDirty || mAudioSession->mMuteDirty)) { participantMap::iterator iter = mAudioSession->mParticipantsByURI.begin(); mAudioSession->mVolumeDirty = false; + mAudioSession->mMuteDirty = false; for(; iter != mAudioSession->mParticipantsByURI.end(); iter++) { participantState *p = iter->second; - + if(p->mVolumeDirty) { // Can't set volume/mute for yourself if(!p->mIsSelf) { - int volume = 56; // nominal default value + // scale from the range 0.0-1.0 to vivox volume in the range 0-100 + S32 volume = llround(p->mVolume / VOLUME_SCALE_VIVOX); + bool mute = p->mOnMuteList; - - if(p->mUserVolume != -1) - { - // scale from user volume in the range 0-400 (with 100 as "normal") to vivox volume in the range 0-100 (with 56 as "normal") - if(p->mUserVolume < 100) - volume = (p->mUserVolume * 56) / 100; - else - volume = (((p->mUserVolume - 100) * (100 - 56)) / 300) + 56; - } - else if(p->mVolume != -1) - { - // Use the previously reported internal volume (comes in with a ParticipantUpdatedEvent) - volume = p->mVolume; - } - if(mute) { @@ -3455,10 +3530,16 @@ void LLVoiceClient::sendPositionalUpdate(void) // If we want the user to be muted, set their volume to 0 as well. // This isn't perfect, but it will at least reduce their volume to a minimum. volume = 0; + + // Mark the current volume level as set to prevent incoming events + // changing it to 0, so that we can return to it when unmuting. + p->mVolumeSet = true; } - + if(volume == 0) + { mute = true; + } LL_DEBUGS("Voice") << "Setting volume/mute for avatar " << p->mAvatarID << " to " << volume << (mute?"/true":"/false") << LL_ENDL; @@ -4599,16 +4680,13 @@ void LLVoiceClient::participantUpdatedEvent( participant->mPower = 0.0f; } - // *HACK: Minimal hack to fix EXT-6508, ignore the incoming volume if it is zero. - // This happens because we send volume zero to Vivox when someone is muted, - // Vivox then send it back to us, overwriting the previous volume. - // Remove this hack once volume refactoring from EXT-6031 is applied. - if (volume != 0) + // Ignore incoming volume level if it has been explicitly set, or there + // is a volume or mute change pending. + if ( !participant->mVolumeSet && !participant->mVolumeDirty) { - participant->mVolume = volume; + participant->mVolume = (F32)volume * VOLUME_SCALE_VIVOX; } - // *HACK: mantipov: added while working on EXT-3544 /* Sometimes LLVoiceClient::participantUpdatedEvent callback is called BEFORE @@ -4992,7 +5070,7 @@ void LLVoiceClient::muteListChanged() // Check to see if this participant is on the mute list already if(p->updateMuteState()) - mAudioSession->mVolumeDirty = true; + mAudioSession->mMuteDirty = true; } } } @@ -5015,10 +5093,10 @@ LLVoiceClient::participantState::participantState(const std::string &uri) : mIsModeratorMuted(false), mLastSpokeTimestamp(0.f), mPower(0.f), - mVolume(-1), - mOnMuteList(false), - mUserVolume(-1), - mVolumeDirty(false), + mVolume(VOLUME_DEFAULT), + mOnMuteList(false), + mVolumeSet(false), + mVolumeDirty(false), mAvatarIDValid(false), mIsSelf(false) { @@ -5067,20 +5145,19 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con result->mAvatarID = id; if(result->updateMuteState()) - mVolumeDirty = true; + mMuteDirty = true; } else { // Create a UUID by hashing the URI, but do NOT set mAvatarIDValid. - // This tells both code in LLVoiceClient and code in llfloateractivespeakers.cpp that the ID will not be in the name cache. + // This tells code in LLVoiceClient that the ID will not be in the name cache. setUUIDFromStringHash(result->mAvatarID, uri); } } mParticipantsByUUID.insert(participantUUIDMap::value_type(&(result->mAvatarID), result)); - result->mUserVolume = LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID); - if (result->mUserVolume != -1) + if (LLSpeakerVolumeStorage::getInstance()->getSpeakerVolume(result->mAvatarID, result->mVolume)) { result->mVolumeDirty = true; mVolumeDirty = true; @@ -5871,12 +5948,10 @@ void LLVoiceClient::enforceTether(void) void LLVoiceClient::updatePosition(void) { - if(gVoiceClient) { - LLVOAvatar *agent = gAgent.getAvatarObject(); LLViewerRegion *region = gAgent.getRegion(); - if(region && agent) + if(region && isAgentAvatarValid()) { LLMatrix3 rot; LLVector3d pos; @@ -5894,9 +5969,9 @@ void LLVoiceClient::updatePosition(void) rot); // rotation matrix // Send the current avatar position to the voice code - rot = agent->getRootJoint()->getWorldRotation().getMatrix3(); + rot = gAgentAvatarp->getRootJoint()->getWorldRotation().getMatrix3(); - pos = agent->getPositionGlobal(); + pos = gAgentAvatarp->getPositionGlobal(); // TODO: Can we get the head offset from outside the LLVOAvatar? // pos += LLVector3d(mHeadOffset); pos += LLVector3d(0.f, 0.f, 1.f); @@ -6280,51 +6355,21 @@ BOOL LLVoiceClient::getOnMuteList(const LLUUID& id) return result; } -// External accessiors. Maps 0.0 to 1.0 to internal values 0-400 with .5 == 100 -// internal = 400 * external^2 +// External accessors. F32 LLVoiceClient::getUserVolume(const LLUUID& id) { - F32 result = 0.0f; + // Minimum volume will be returned for users with voice disabled + F32 result = VOLUME_MIN; participantState *participant = findParticipantByID(id); if(participant) { - S32 ires = 100; // nominal default volume - - if(participant->mIsSelf) - { - // Always make it look like the user's own volume is set at the default. - } - else if(participant->mUserVolume != -1) - { - // Use the internal volume - ires = participant->mUserVolume; - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. -// LL_DEBUGS("Voice") << "mapping from mUserVolume " << ires << LL_ENDL; - } - else if(participant->mVolume != -1) - { - // Map backwards from vivox volume - - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. -// LL_DEBUGS("Voice") << "mapping from mVolume " << participant->mVolume << LL_ENDL; + result = participant->mVolume; - if(participant->mVolume < 56) - { - ires = (participant->mVolume * 100) / 56; - } - else - { - ires = (((participant->mVolume - 56) * 300) / (100 - 56)) + 100; - } - } - result = sqrtf(((F32)ires) / 400.f); + // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. + // LL_DEBUGS("Voice") << "mVolume = " << result << " for " << id << LL_ENDL; } - // Enable this when debugging voice slider issues. It's way to spammy even for debug-level logging. -// LL_DEBUGS("Voice") << "returning " << result << LL_ENDL; - return result; } @@ -6333,16 +6378,23 @@ void LLVoiceClient::setUserVolume(const LLUUID& id, F32 volume) if(mAudioSession) { participantState *participant = findParticipantByID(id); - if (participant) + if (participant && !participant->mIsSelf) { - // store this volume setting for future sessions - LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); + if (!is_approx_equal(volume, VOLUME_DEFAULT)) + { + // Store this volume setting for future sessions if it has been + // changed from the default + LLSpeakerVolumeStorage::getInstance()->storeSpeakerVolume(id, volume); + } + else + { + // Remove stored volume setting if it is returned to the default + LLSpeakerVolumeStorage::getInstance()->removeSpeakerVolume(id); + } - // volume can amplify by as much as 4x! - S32 ivol = (S32)(400.f * volume * volume); - participant->mUserVolume = llclamp(ivol, 0, 400); - participant->mVolumeDirty = TRUE; - mAudioSession->mVolumeDirty = TRUE; + participant->mVolume = llclamp(volume, VOLUME_MIN, VOLUME_MAX); + participant->mVolumeDirty = true; + mAudioSession->mVolumeDirty = true; } } } @@ -6483,6 +6535,7 @@ LLVoiceClient::sessionState::sessionState() : mVoiceEnabled(false), mReconnect(false), mVolumeDirty(false), + mMuteDirty(false), mParticipantsChanged(false) { } diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index aaacab69e0..a29c386182 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -101,6 +101,10 @@ class LLVoiceClient: public LLSingleton<LLVoiceClient> static F32 OVERDRIVEN_POWER_LEVEL; + static const F32 VOLUME_MIN; + static const F32 VOLUME_DEFAULT; + static const F32 VOLUME_MAX; + void updateSettings(); // call after loading settings and whenever they change void getCaptureDevicesSendMessage(); @@ -269,7 +273,7 @@ static void updatePosition(void); public: participantState(const std::string &uri); - bool updateMuteState(); + bool updateMuteState(); // true if mute state has changed bool isAvatar(); std::string mURI; @@ -279,13 +283,13 @@ static void updatePosition(void); LLFrameTimer mSpeakingTimeout; F32 mLastSpokeTimestamp; F32 mPower; - int mVolume; + F32 mVolume; std::string mGroupID; - int mUserVolume; bool mPTT; bool mIsSpeaking; bool mIsModeratorMuted; bool mOnMuteList; // true if this avatar is on the user's mute list (and should be muted) + bool mVolumeSet; // true if incoming volume messages should not change the volume bool mVolumeDirty; // true if this participant needs a volume command sent (either mOnMuteList or mUserVolume has changed) bool mAvatarIDValid; bool mIsSelf; @@ -349,6 +353,7 @@ static void updatePosition(void); // Set to true when the mute state of someone in the participant list changes. // The code will have to walk the list to find the changed participant(s). bool mVolumeDirty; + bool mMuteDirty; bool mParticipantsChanged; participantMap mParticipantsByURI; diff --git a/indra/newview/llvoinventorylistener.h b/indra/newview/llvoinventorylistener.h index 335e867fca..1531e6e339 100644 --- a/indra/newview/llvoinventorylistener.h +++ b/indra/newview/llvoinventorylistener.h @@ -42,7 +42,7 @@ class LLVOInventoryListener { public: virtual void inventoryChanged(LLViewerObject* object, - InventoryObjectList* inventory, + LLInventoryObject::object_list_t* inventory, S32 serial_num, void* user_data) = 0; diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 139d2fbd88..3ba4ecad0c 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -40,7 +40,7 @@ #include "message.h" #include "v2math.h" -#include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "llface.h" #include "llsky.h" @@ -136,7 +136,7 @@ F32 LLVOPartGroup::getPartSize(S32 idx) LLVector3 LLVOPartGroup::getCameraPosition() const { - return gAgent.getCameraPositionAgent(); + return gAgentCamera.getCameraPositionAgent(); } static LLFastTimer::DeclareTimer FTM_UPDATE_PARTICLES("Update Particles"); diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 0550ed770b..d73850cb49 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -41,6 +41,7 @@ #include "timing.h" #include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "llface.h" #include "llcubemap.h" @@ -357,7 +358,7 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mFace[i] = NULL; } - mCameraPosAgent = gAgent.getCameraPositionAgent(); + mCameraPosAgent = gAgentCamera.getCameraPositionAgent(); mAtmHeight = ATM_HEIGHT; mEarthCenter = LLVector3(mCameraPosAgent.mV[0], mCameraPosAgent.mV[1], -EARTH_RADIUS); @@ -2034,7 +2035,7 @@ void LLVOSky::updateFog(const F32 distance) const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f; // LLWorld::getInstance()->getWaterHeight(); - F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; + F32 camera_height = gAgentCamera.getCameraPositionAgent().mV[2]; F32 near_clip_height = LLViewerCamera::getInstance()->getAtAxis().mV[VZ] * LLViewerCamera::getInstance()->getNear(); camera_height += near_clip_height; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 55e2c58a52..b89c0cd638 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -44,7 +44,7 @@ #include "material_codes.h" #include "object_flags.h" -#include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "llface.h" #include "llviewercamera.h" @@ -444,7 +444,7 @@ void LLVOTree::setPixelAreaAndAngle(LLAgent &agent) // Re-calculate mPixelArea accurately // This should be the camera's center, as soon as we move to all region-local. - LLVector3 relative_position = getPositionAgent() - agent.getCameraPositionAgent(); + LLVector3 relative_position = getPositionAgent() - gAgentCamera.getCameraPositionAgent(); F32 range = relative_position.length(); // ugh, square root F32 max_scale = mBillboardScale * getMaxScale(); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 95ceb0189c..594435475f 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -369,7 +369,7 @@ U32 LLVOVolume::processUpdateMessage(LLMessageSystem *mesgsys, S32 res2 = unpackTEMessage(*dp); if (TEM_INVALID == res2) { - // Well, crap, there's something bogus in the data that we're unpacking. + // There's something bogus in the data that we're unpacking. dp->dumpBufferToLog(); llwarns << "Flushing cache files" << llendl; std::string mask; diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 8be8f494da..436cd478b4 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -54,6 +54,7 @@ #include "llviewercontrol.h" #include "lldrawpoolwater.h" #include "llagent.h" +#include "llagentcamera.h" #include "llviewerregion.h" #include "llwlparammanager.h" @@ -434,7 +435,7 @@ F32 LLWaterParamManager::getFogDensity(void) // modify if we're underwater const F32 water_height = gAgent.getRegion() ? gAgent.getRegion()->getWaterHeight() : 0.f; - F32 camera_height = gAgent.getCameraPositionAgent().mV[2]; + F32 camera_height = gAgentCamera.getCameraPositionAgent().mV[2]; if(camera_height <= water_height) { // raise it to the underwater fog density modifier diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 3334c17a8f..63f99273fe 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -62,13 +62,12 @@ class LLOverrideBakedTextureUpdate public: LLOverrideBakedTextureUpdate(bool temp_state) { - mAvatar = gAgent.getAvatarObject(); U32 num_bakes = (U32) LLVOAvatarDefines::BAKED_NUM_INDICES; for( U32 index = 0; index < num_bakes; ++index ) { - composite_enabled[index] = mAvatar->isCompositeUpdateEnabled(index); + composite_enabled[index] = gAgentAvatarp->isCompositeUpdateEnabled(index); } - mAvatar->setCompositeUpdatesEnabled(temp_state); + gAgentAvatarp->setCompositeUpdatesEnabled(temp_state); } ~LLOverrideBakedTextureUpdate() @@ -76,13 +75,11 @@ public: U32 num_bakes = (U32)LLVOAvatarDefines::BAKED_NUM_INDICES; for( U32 index = 0; index < num_bakes; ++index ) { - mAvatar->setCompositeUpdatesEnabled(index, composite_enabled[index]); - } + gAgentAvatarp->setCompositeUpdatesEnabled(index, composite_enabled[index]); + } } - private: bool composite_enabled[LLVOAvatarDefines::BAKED_NUM_INDICES]; - LLVOAvatarSelf *mAvatar; }; // Private local functions @@ -205,10 +202,9 @@ BOOL LLWearable::exportFile(LLFILE* file) const void LLWearable::createVisualParams() { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*) avatar->getNextVisualParam()) + param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam()) { if (param->getWearableType() == mType) { @@ -228,7 +224,7 @@ void LLWearable::createVisualParams() param->resetDrivenParams(); if(!param->linkDrivenParams(boost::bind(wearable_function,(LLWearable*)this, _1), false)) { - if( !param->linkDrivenParams(boost::bind(avatar_function,(LLVOAvatarSelf*)avatar,_1 ), true)) + if( !param->linkDrivenParams(boost::bind(avatar_function,gAgentAvatarp,_1 ), true)) { llwarns << "could not link driven params for wearable " << getName() << " id: " << param->getID() << llendl; continue; @@ -464,12 +460,7 @@ BOOL LLWearable::importFile( LLFILE* file ) // since this wearable was created. BOOL LLWearable::isOldVersion() const { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - return FALSE; - } + if (!isAgentAvatarValid()) return FALSE; if( LLWearable::sCurrentDefinitionVersion < mDefinitionVersion ) { @@ -483,9 +474,9 @@ BOOL LLWearable::isOldVersion() const } S32 param_count = 0; - for( LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + for( LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*) avatar->getNextVisualParam() ) + param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam() ) { if( (param->getWearableType() == mType) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) ) { @@ -531,17 +522,11 @@ BOOL LLWearable::isOldVersion() const // only if those values are the same as the defaults. BOOL LLWearable::isDirty() const { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - return FALSE; - } - + if (!isAgentAvatarValid()) return FALSE; - for( LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + for( LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*) avatar->getNextVisualParam() ) + param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam() ) { if( (param->getWearableType() == mType) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) @@ -602,14 +587,9 @@ BOOL LLWearable::isDirty() const void LLWearable::setParamsToDefaults() { - LLVOAvatar* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - return; - } + if (!isAgentAvatarValid()) return; - for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) + for( LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam() ) { if( (((LLViewerVisualParam*)param)->getWearableType() == mType ) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) ) { @@ -645,18 +625,12 @@ void LLWearable::setTexturesToDefaults() // Updates the user's avatar's appearance void LLWearable::writeToAvatar() { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - llerrs << "could not get avatar object to write to for wearable " << this->getName() << llendl; - return; - } + if (!isAgentAvatarValid()) return; - ESex old_sex = avatar->getSex(); + ESex old_sex = gAgentAvatarp->getSex(); // Pull params - for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) + for( LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam() ) { // cross-wearable parameters are not authoritative, as they are driven by a different wearable. So don't copy the values to the // avatar object if cross wearable. Cross wearable params get their values from the avatar, they shouldn't write the other way. @@ -665,7 +639,7 @@ void LLWearable::writeToAvatar() S32 param_id = param->getID(); F32 weight = getVisualParamWeight(param_id); - avatar->setVisualParamWeight( param_id, weight, FALSE ); + gAgentAvatarp->setVisualParamWeight( param_id, weight, FALSE ); } } @@ -686,14 +660,14 @@ void LLWearable::writeToAvatar() } LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture( image_id, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE ); // MULTI-WEARABLE: replace hard-coded 0 - avatar->setLocalTextureTE(te, image, 0); + gAgentAvatarp->setLocalTextureTE(te, image, 0); } } - ESex new_sex = avatar->getSex(); + ESex new_sex = gAgentAvatarp->getSex(); if( old_sex != new_sex ) { - avatar->updateSexDependentLayerSets( FALSE ); + gAgentAvatarp->updateSexDependentLayerSets( FALSE ); } // if( upload_bake ) @@ -707,12 +681,7 @@ void LLWearable::writeToAvatar() // static void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - return; - } + if (!isAgentAvatarValid()) return; // You can't just remove body parts. if( (type == WT_SHAPE) || @@ -724,12 +693,12 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) } // Pull params - for( LLVisualParam* param = avatar->getFirstVisualParam(); param; param = avatar->getNextVisualParam() ) + for( LLVisualParam* param = gAgentAvatarp->getFirstVisualParam(); param; param = gAgentAvatarp->getNextVisualParam() ) { if( (((LLViewerVisualParam*)param)->getWearableType() == type) && (param->getGroup() == VISUAL_PARAM_GROUP_TWEAKABLE ) ) { S32 param_id = param->getID(); - avatar->setVisualParamWeight( param_id, param->getDefaultWeight(), upload_bake ); + gAgentAvatarp->setVisualParamWeight( param_id, param->getDefaultWeight(), upload_bake ); } } @@ -738,8 +707,8 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) gFloaterCustomize->setWearable(type, NULL, PERM_ALL, TRUE); } - avatar->updateVisualParams(); - avatar->wearableUpdated(type, TRUE); + gAgentAvatarp->updateVisualParams(); + gAgentAvatarp->wearableUpdated(type, TRUE); // if( upload_bake ) // { @@ -751,12 +720,7 @@ void LLWearable::removeFromAvatar( EWearableType type, BOOL upload_bake ) // Definition version is current: removes obsolete enties and creates default values for new ones. void LLWearable::copyDataFrom(const LLWearable* src) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - llassert( avatar ); - if( !avatar ) - { - return; - } + if (!isAgentAvatarValid()) return; mDefinitionVersion = LLWearable::sCurrentDefinitionVersion; @@ -769,9 +733,9 @@ void LLWearable::copyDataFrom(const LLWearable* src) mSavedVisualParamMap.clear(); // Deep copy of mVisualParamMap (copies only those params that are current, filling in defaults where needed) - for( LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*) avatar->getNextVisualParam() ) + param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam() ) { if( (param->getWearableType() == mType) ) { @@ -783,7 +747,7 @@ void LLWearable::copyDataFrom(const LLWearable* src) destroyTextures(); // Deep copy of mTEMap (copies only those tes that are current, filling in defaults where needed) - for( S32 te = 0; te < TEX_NUM_INDICES; te++ ) + for (S32 te = 0; te < TEX_NUM_INDICES; te++) { if (LLVOAvatarDictionary::getTEWearableType((ETextureIndex) te) == mType) { @@ -876,14 +840,12 @@ void LLWearable::addVisualParam(LLVisualParam *param) void LLWearable::setVisualParams() { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - for (visual_param_index_map_t::const_iterator iter = mVisualParamIndexMap.begin(); iter != mVisualParamIndexMap.end(); iter++) { S32 id = iter->first; LLVisualParam *wearable_param = iter->second; F32 value = wearable_param->getWeight(); - avatar->setVisualParamWeight(id, value, FALSE); + gAgentAvatarp->setVisualParamWeight(id, value, FALSE); } } @@ -1024,9 +986,8 @@ BOOL LLWearable::isOnTop() const void LLWearable::createLayers(S32 te) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - LLTexLayerSet *layer_set = avatar->getLayerSet((ETextureIndex)te); - if( layer_set ) + LLTexLayerSet *layer_set = gAgentAvatarp->getLayerSet((ETextureIndex)te); + if (layer_set) { layer_set->cloneTemplates(mTEMap[te], (ETextureIndex)te, this); } @@ -1123,10 +1084,9 @@ void LLWearable::destroyTextures() void LLWearable::pullCrossWearableValues() { // scan through all of the avatar's visual parameters - LLVOAvatar* avatar = gAgent.getAvatarObject(); - for (LLViewerVisualParam* param = (LLViewerVisualParam*) avatar->getFirstVisualParam(); + for (LLViewerVisualParam* param = (LLViewerVisualParam*) gAgentAvatarp->getFirstVisualParam(); param; - param = (LLViewerVisualParam*) avatar->getNextVisualParam()) + param = (LLViewerVisualParam*) gAgentAvatarp->getNextVisualParam()) { if( param ) { diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 3385b75c65..1a64f9d881 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -103,8 +103,18 @@ void LLWeb::loadURLInternal(const std::string &url) // static void LLWeb::loadURLExternal(const std::string& url) { + loadURLExternal(url, true); +} + + +// static +void LLWeb::loadURLExternal(const std::string& url, bool async) +{ std::string escaped_url = escapeURL(url); - gViewerWindow->getWindow()->spawnWebBrowser(escaped_url); + if (gViewerWindow) + { + gViewerWindow->getWindow()->spawnWebBrowser(escaped_url, async); + } } diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h index f4666c9280..1119b80bb4 100644 --- a/indra/newview/llweb.h +++ b/indra/newview/llweb.h @@ -54,8 +54,10 @@ public: static void loadURL(const char* url) { loadURL( ll_safe_string(url) ); } /// Load the given url in the Second Life internal web browser static void loadURLInternal(const std::string &url); - /// Load the given url in the operating system's web browser + /// Load the given url in the operating system's web browser, async if we want to return immediately + /// before browser has spawned static void loadURLExternal(const std::string& url); + static void loadURLExternal(const std::string& url, bool async); /// Returns escaped url (eg, " " to "%20") - used by all loadURL methods static std::string escapeURL(const std::string& url); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 19f303ab88..0b63f5efbd 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -1209,7 +1209,7 @@ static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3 return pos_global; } -void LLWorld::getAvatars(std::vector<LLUUID>* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const +void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const { if(avatar_ids != NULL) { diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index 48025c700b..502f7b0320 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -158,7 +158,7 @@ public: // All arguments are optional. Given containers will be emptied and then filled. // Not supplying origin or radius input returns data on all avatars in the known regions. void getAvatars( - std::vector<LLUUID>* avatar_ids = NULL, + uuid_vec_t* avatar_ids = NULL, std::vector<LLVector3d>* positions = NULL, const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const; diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 27757d19e5..151180aae7 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -44,6 +44,7 @@ #include "lltooltip.h" #include "llagent.h" +#include "llagentcamera.h" #include "llcallingcard.h" #include "llcommandhandler.h" #include "llviewercontrol.h" @@ -311,7 +312,7 @@ void LLWorldMapView::draw() const S32 height = getRect().getHeight(); const F32 half_width = F32(width) / 2.0f; const F32 half_height = F32(height) / 2.0f; - LLVector3d camera_global = gAgent.getCameraPositionGlobal(); + LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); S32 level = LLWorldMipmap::scaleToLevel(sMapScale); @@ -885,35 +886,61 @@ void LLWorldMapView::drawFrustum() F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 ); F32 half_width_pixels = half_width_meters * meters_to_pixels; - F32 ctr_x = getRect().getWidth() * 0.5f + sPanX; - F32 ctr_y = getRect().getHeight() * 0.5f + sPanY; + F32 ctr_x = getLocalRect().getWidth() * 0.5f + sPanX; + F32 ctr_y = getLocalRect().getHeight() * 0.5f + sPanY; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); // Since we don't rotate the map, we have to rotate the frustum. gGL.pushMatrix(); + { gGL.translatef( ctr_x, ctr_y, 0 ); - glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); // Draw triangle with more alpha in far pixels to make it // fade out in distance. gGL.begin( LLRender::TRIANGLES ); + { + // get camera look at and left axes + LLVector3 at_axis = LLViewerCamera::instance().getAtAxis(); + LLVector3 left_axis = LLViewerCamera::instance().getLeftAxis(); + + // grab components along XY plane + LLVector2 cam_lookat(at_axis.mV[VX], at_axis.mV[VY]); + LLVector2 cam_left(left_axis.mV[VX], left_axis.mV[VY]); + + // but, when looking near straight up or down... + if (is_approx_zero(cam_lookat.magVecSquared())) + { + //...just fall back to looking down the x axis + cam_lookat = LLVector2(1.f, 0.f); // x axis + cam_left = LLVector2(0.f, 1.f); // y axis + } + + // normalize to unit length + cam_lookat.normVec(); + cam_left.normVec(); + gGL.color4f(1.f, 1.f, 1.f, 0.25f); gGL.vertex2f( 0, 0 ); gGL.color4f(1.f, 1.f, 1.f, 0.02f); - gGL.vertex2f( -half_width_pixels, far_clip_pixels ); + + // use 2d camera vectors to render frustum triangle + LLVector2 vert = cam_lookat * far_clip_pixels + cam_left * half_width_pixels; + gGL.vertex2f(vert.mV[VX], vert.mV[VY]); - gGL.color4f(1.f, 1.f, 1.f, 0.02f); - gGL.vertex2f( half_width_pixels, far_clip_pixels ); + vert = cam_lookat * far_clip_pixels - cam_left * half_width_pixels; + gGL.vertex2f(vert.mV[VX], vert.mV[VY]); + } gGL.end(); + } gGL.popMatrix(); } LLVector3 LLWorldMapView::globalPosToView( const LLVector3d& global_pos ) { - LLVector3d relative_pos_global = global_pos - gAgent.getCameraPositionGlobal(); + LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal(); LLVector3 pos_local; pos_local.setVec(relative_pos_global); // convert to floats from doubles @@ -1006,7 +1033,7 @@ LLVector3d LLWorldMapView::viewPosToGlobal( S32 x, S32 y ) LLVector3d pos_global; pos_global.setVec( pos_local ); - pos_global += gAgent.getCameraPositionGlobal(); + pos_global += gAgentCamera.getCameraPositionGlobal(); if(gAgent.isGodlike()) { pos_global.mdV[VZ] = GODLY_TELEPORT_HEIGHT; // Godly height should always be 200. @@ -1638,7 +1665,7 @@ void LLWorldMapView::updateVisibleBlocks() // Load the blocks visible in the current World Map view // Get the World Map view coordinates and boundaries - LLVector3d camera_global = gAgent.getCameraPositionGlobal(); + LLVector3d camera_global = gAgentCamera.getCameraPositionGlobal(); const S32 width = getRect().getWidth(); const S32 height = getRect().getHeight(); const F32 half_width = F32(width) / 2.0f; diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp index c19be37e75..5884cdd1c3 100644 --- a/indra/newview/llxmlrpctransaction.cpp +++ b/indra/newview/llxmlrpctransaction.cpp @@ -252,8 +252,10 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip) // mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1); mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this); - mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, LLCurl::getSSLVerify()); + BOOL verifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert"); mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, LLCurl::getSSLVerify() ? 2 : 0); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYPEER, verifySSLCert); + mCurlRequest->setopt(CURLOPT_SSL_VERIFYHOST, verifySSLCert ? 2 : 0); // Be a little impatient about establishing connections. mCurlRequest->setopt(CURLOPT_CONNECTTIMEOUT, 40L); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e82fccde27..36daca174b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -56,6 +56,7 @@ // newview includes #include "llagent.h" +#include "llagentcamera.h" #include "lldrawable.h" #include "lldrawpoolalpha.h" #include "lldrawpoolavatar.h" @@ -3862,15 +3863,14 @@ void LLPipeline::renderForSelect(std::set<LLViewerObject*>& objects, BOOL render } // pick HUD objects - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - if (avatarp && sShowHUDAttachments) + if (isAgentAvatarValid() && sShowHUDAttachments) { glh::matrix4f save_proj(glh_get_current_projection()); glh::matrix4f save_model(glh_get_current_modelview()); setup_hud_matrices(screen_rect); - for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); - iter != avatarp->mAttachmentPoints.end(); ) + for (LLVOAvatar::attachment_map_t::iterator iter = gAgentAvatarp->mAttachmentPoints.begin(); + iter != gAgentAvatarp->mAttachmentPoints.end(); ) { LLVOAvatar::attachment_map_t::iterator curiter = iter++; LLViewerJointAttachment* attachment = curiter->second; @@ -3970,9 +3970,9 @@ void LLPipeline::rebuildPools() max_count--; } - if (gAgent.getAvatarObject()) + if (isAgentAvatarValid()) { - gAgent.getAvatarObject()->rebuildHUD(); + gAgentAvatarp->rebuildHUD(); } } @@ -4368,7 +4368,7 @@ void LLPipeline::calcNearbyLights(LLCamera& camera) // mNearbyLight (and all light_set_t's) are sorted such that // begin() == the closest light and rbegin() == the farthest light const S32 MAX_LOCAL_LIGHTS = 6; -// LLVector3 cam_pos = gAgent.getCameraPositionAgent(); +// LLVector3 cam_pos = gAgentCamera.getCameraPositionAgent(); LLVector3 cam_pos = LLViewerJoystick::getInstance()->getOverrideCamera() ? camera.getOrigin() : gAgent.getPositionAgent(); @@ -4604,8 +4604,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); } - if (gAgent.getAvatarObject() && - gAgent.getAvatarObject()->mSpecialRenderMode == 3) + if (isAgentAvatarValid() && + gAgentAvatarp->mSpecialRenderMode == 3) { LLColor4 light_color = LLColor4::white; light_color.mV[3] = 0.0f; @@ -4714,15 +4714,13 @@ void LLPipeline::enableLightsDynamic() glColor4f(0.f, 0.f, 0.f, 1.f); // no local lighting by default } - LLVOAvatar* avatarp = gAgent.getAvatarObject(); - - if (avatarp && getLightingDetail() <= 0) + if (isAgentAvatarValid() && getLightingDetail() <= 0) { - if (avatarp->mSpecialRenderMode == 0) // normal + if (gAgentAvatarp->mSpecialRenderMode == 0) // normal { gPipeline.enableLightsAvatar(); } - else if (avatarp->mSpecialRenderMode >= 1) // anim preview + else if (gAgentAvatarp->mSpecialRenderMode >= 1) // anim preview { gPipeline.enableLightsAvatarEdit(LLColor4(0.7f, 0.6f, 0.3f, 1.f)); } @@ -7108,15 +7106,15 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) llpushcallstacks ; if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate) { - LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); - if (gAgent.getCameraAnimating() || gAgent.getCameraMode() != CAMERA_MODE_MOUSELOOK) + BOOL skip_avatar_update = FALSE; + if (gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK) { - avatar = NULL; + skip_avatar_update = TRUE; } - if (avatar) + if (!skip_avatar_update) { - avatar->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON); + gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON); } LLVertexBuffer::unbind(); @@ -7340,9 +7338,9 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); - if (avatar) + if (!skip_avatar_update) { - avatar->updateAttachmentVisibility(gAgent.getCameraMode()); + gAgentAvatarp->updateAttachmentVisibility(gAgentCamera.getCameraMode()); } } } diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index bb3378f490..12a09392f6 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -129,8 +129,8 @@ TOOLSIT CURSOR "toolsit.cur" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,0,0,3422 - PRODUCTVERSION 2,0,0,3422 + FILEVERSION 2,0,0,203110 + PRODUCTVERSION 2,0,0,203110 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -147,12 +147,12 @@ BEGIN BEGIN VALUE "CompanyName", "Linden Lab" VALUE "FileDescription", "Second Life" - VALUE "FileVersion", "2.0.0.200030" + VALUE "FileVersion", "2.0.0.203110" VALUE "InternalName", "Second Life" VALUE "LegalCopyright", "Copyright 2001-2008, Linden Research, Inc." VALUE "OriginalFilename", "SecondLife.exe" VALUE "ProductName", "Second Life" - VALUE "ProductVersion", "2.0.0.200030" + VALUE "ProductVersion", "2.0.0.203110" END END BLOCK "VarFileInfo" diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index fcf5cfadb2..99603530d8 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -61,7 +61,7 @@ value="0.26 0.345 0.263 1" /> <color name="Red" - value="0.729 0 0.121 1" /> + value="1 0 0 1" /> <color name="Blue" value="0 0 1 1" /> @@ -197,7 +197,7 @@ value="0.5 0.5 0.5 1" /> <color name="ColorPaletteEntry03" - value="0.3344 0.5456 0.5159 1" /> + value="0.5 0 0 1" /> <color name="ColorPaletteEntry04" value="0.5 0.5 0 1" /> @@ -239,7 +239,7 @@ reference="LtYellow" /> <color name="ColorPaletteEntry17" - reference="LtGreen" /> + reference="White" /> <color name="ColorPaletteEntry18" reference="LtGray" /> @@ -248,7 +248,7 @@ reference="Red" /> <color name="ColorPaletteEntry20" - reference=".5 .5 1 0" /> + reference="Yellow" /> <color name="ColorPaletteEntry21" reference="Green" /> @@ -421,6 +421,9 @@ name="InventoryItemSuffixColor" reference="White_25" /> <color + name="InventoryItemLibraryColor" + reference="EmphasisColor" /> + <color name="InventorySearchStatusColor" reference="EmphasisColor" /> <color @@ -524,7 +527,7 @@ reference="Unused?" /> <color name="NetMapBackgroundColor" - value="0 0 0 0.3" /> + value="0 0 0 0" /> <color name="NetMapGroupOwnAboveWater" reference="Purple" /> @@ -731,7 +734,10 @@ <color name="ChatToastAgentNameColor" reference="EmphasisColor" /> - <color + <color name="ColorSwatchBorderColor" value="0.45098 0.517647 0.607843 1"/> + <color + name="ChatTimestampColor" + reference="White" /> </colors> diff --git a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png b/indra/newview/skins/default/textures/icons/Generic_Group_Large.png Binary files differdeleted file mode 100644 index 4d4f1e1bee..0000000000 --- a/indra/newview/skins/default/textures/icons/Generic_Group_Large.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_1.png b/indra/newview/skins/default/textures/icons/Progress_1.png Binary files differdeleted file mode 100644 index 58b56003c4..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_1.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_10.png b/indra/newview/skins/default/textures/icons/Progress_10.png Binary files differdeleted file mode 100644 index 07fe0be8a3..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_10.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_11.png b/indra/newview/skins/default/textures/icons/Progress_11.png Binary files differdeleted file mode 100644 index 215d68cc46..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_11.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_12.png b/indra/newview/skins/default/textures/icons/Progress_12.png Binary files differdeleted file mode 100644 index d755588621..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_12.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_2.png b/indra/newview/skins/default/textures/icons/Progress_2.png Binary files differdeleted file mode 100644 index 6640ee227b..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_2.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_3.png b/indra/newview/skins/default/textures/icons/Progress_3.png Binary files differdeleted file mode 100644 index 5decbe977e..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_3.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_4.png b/indra/newview/skins/default/textures/icons/Progress_4.png Binary files differdeleted file mode 100644 index 56e81c17aa..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_4.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_5.png b/indra/newview/skins/default/textures/icons/Progress_5.png Binary files differdeleted file mode 100644 index a89bf2ac62..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_5.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_6.png b/indra/newview/skins/default/textures/icons/Progress_6.png Binary files differdeleted file mode 100644 index 233c479540..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_6.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_7.png b/indra/newview/skins/default/textures/icons/Progress_7.png Binary files differdeleted file mode 100644 index 631d7a6819..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_7.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_8.png b/indra/newview/skins/default/textures/icons/Progress_8.png Binary files differdeleted file mode 100644 index ac0e3f13f7..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_8.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/icons/Progress_9.png b/indra/newview/skins/default/textures/icons/Progress_9.png Binary files differdeleted file mode 100644 index 17fb4a0335..0000000000 --- a/indra/newview/skins/default/textures/icons/Progress_9.png +++ /dev/null diff --git a/indra/newview/skins/default/textures/locked_image.j2c b/indra/newview/skins/default/textures/locked_image.j2c Binary files differdeleted file mode 100644 index 9e8998d675..0000000000 --- a/indra/newview/skins/default/textures/locked_image.j2c +++ /dev/null diff --git a/indra/newview/skins/default/textures/map_infohub.tga b/indra/newview/skins/default/textures/map_infohub.tga Binary files differdeleted file mode 100644 index 545b8e532c..0000000000 --- a/indra/newview/skins/default/textures/map_infohub.tga +++ /dev/null diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index fed326c25e..84a99ba92a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,4 +1,4 @@ -<!-- +<!-- This file contains metadata about how to load, display, and scale textures for rendering in the UI. Images do *NOT* have to appear in this file in order to use them as textures in the UI...simply refer to them by filename (relative to textures directory). @@ -46,13 +46,9 @@ with the same filename but different name <texture name="AddItem_Press" file_name="icons/AddItem_Press.png" preload="false" /> <texture name="Arrow_Left_Off" file_name="navbar/Arrow_Left_Off.png" preload="true" /> - <texture name="Arrow_Left_Press" file_name="navbar/Arrow_Left_Press.png" preload="true" /> <texture name="Arrow_Right_Off" file_name="navbar/Arrow_Right_Off.png" preload="true" /> - <texture name="Arrow_Right_Press" file_name="navbar/Arrow_Right_Press.png" preload="true" /> <!-- - <texture name="Arrow_Left" file_name="widgets/Arrow_Left.png" preload="true" /> - <texture name="Arrow_Right" file_name="widgets/Arrow_Right.png" preload="true" /> --> <texture name="Arrow_Small_Up" file_name="widgets/Arrow_Small_Up.png" preload="true" /> @@ -64,49 +60,28 @@ with the same filename but different name <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" /> <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" /> - <texture name="AudioMute_Press" file_name="icons/AudioMute_Press.png" preload="false" /> <texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" /> - <texture name="Audio_Over" file_name="icons/Audio_Over.png" preload="false" /> <texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" /> <texture name="Avaline_Icon" file_name="icons/avaline_default_icon.jpg" preload="true" /> - <texture name="BackArrow_Disabled" file_name="icons/BackArrow_Disabled.png" preload="false" /> <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" /> - <texture name="BackArrow_Press" file_name="icons/BackArrow_Press.png" preload="false" /> <texture name="Blank" file_name="Blank.png" preload="false" /> - <texture name="BottomTray_BG" file_name="bottomtray/BottomTray_BG.png" preload="false" /> - <texture name="BottomTray_Scroll_Right" file_name="navbar/Arrow_Right_Off.png" preload="false" /> - <texture name="BottomTray_Scroll_Left" file_name="navbar/Arrow_Left_Off.png" preload="false" /> - <texture name="BuyArrow_Off" file_name="navbar/BuyArrow_Off.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="BuyArrow_Over" file_name="navbar/BuyArrow_Over.png" preload="true" scale.left="0" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="BuyArrow_Press" file_name="navbar/BuyArrow_Press.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> - <texture name="Cam_Avatar_Disabled" file_name="bottomtray/Cam_Avatar_Disabled.png" preload="false" /> - <texture name="Cam_Avatar_Over" file_name="bottomtray/Cam_Avatar_Over.png" preload="false" /> <texture name="Cam_Avatar_Off" file_name="bottomtray/Cam_Avatar_Off.png" preload="false" /> - <texture name="Cam_Avatar_Press" file_name="bottomtray/Cam_Avatar_Press.png" preload="false" /> - <texture name="Cam_FreeCam_Disabled" file_name="bottomtray/Cam_FreeCam_Disabled.png" preload="false" /> <texture name="Cam_FreeCam_Off" file_name="bottomtray/Cam_FreeCam_Off.png" preload="false" /> - <texture name="Cam_FreeCam_Over" file_name="bottomtray/Cam_FreeCam_Over.png" preload="false" /> - <texture name="Cam_FreeCam_Press" file_name="bottomtray/Cam_FreeCam_Press.png" preload="false" /> - <texture name="Cam_Orbit_Disabled" file_name="bottomtray/Cam_Orbit_Disabled.png" preload="false" /> <texture name="Cam_Orbit_Off" file_name="bottomtray/Cam_Orbit_Off.png" preload="false" /> - <texture name="Cam_Orbit_Over" file_name="bottomtray/Cam_Orbit_Over.png" preload="false" /> - <texture name="Cam_Orbit_Press" file_name="bottomtray/Cam_Orbit_Press.png" preload="false" /> - <texture name="Cam_Pan_Disabled" file_name="bottomtray/Cam_Pan_Disabled.png" preload="false" /> <texture name="Cam_Pan_Off" file_name="bottomtray/Cam_Pan_Off.png" preload="false" /> - <texture name="Cam_Pan_Over" file_name="bottomtray/CCam_Pan_Over.png" preload="false" /> - <texture name="Cam_Pan_Press" file_name="bottomtray/Cam_Pan_Press.png" preload="false" /> <texture name="Cam_Preset_Back_Off" file_name="bottomtray/Cam_Preset_Back_Off.png" preload="false" /> <texture name="Cam_Preset_Back_On" file_name="bottomtray/Cam_Preset_Back_On.png" preload="false" /> <texture name="Cam_Preset_Eye_Off" file_name="bottomtray/Cam_Preset_Eye_Off.png" preload="false" /> - <texture name="Cam_Preset_Eye_On" file_name="bottomtray/Cam_Preset_Eye_On.png" preload="false" /> <texture name="Cam_Preset_Front_Off" file_name="bottomtray/Cam_Preset_Front_Off.png" preload="false" /> <texture name="Cam_Preset_Front_On" file_name="bottomtray/Cam_Preset_Front_On.png" preload="false" /> <texture name="Cam_Preset_Side_Off" file_name="bottomtray/Cam_Preset_Side_Off.png" preload="false" /> @@ -116,8 +91,6 @@ with the same filename but different name <texture name="Cam_Rotate_Out" file_name="bottomtray/Cam_Rotate_Out.png" preload="false" /> <texture name="Cam_Tracking_In" file_name="bottomtray/Cam_Tracking_In.png" preload="false" /> <texture name="Cam_Tracking_Out" file_name="bottomtray/Cam_Tracking_Out.png" preload="false" /> - <texture name="CameraView_Off" file_name="bottomtray/CameraView_Off.png" preload="false" /> - <texture name="CameraView_Over" file_name="bottomtray/CameraView_Over.png" preload="false" /> <texture name="Checkbox_Off_Disabled" file_name="widgets/Checkbox_Disabled.png" preload="true" /> <texture name="Checkbox_On_Disabled" file_name="widgets/Checkbox_On_Disabled.png" preload="true" /> @@ -127,8 +100,6 @@ with the same filename but different name <texture name="Checkbox_Press" file_name="widgets/Checkbox_Press.png" preload="true" /> <texture name="ComboButton_Disabled" file_name="widgets/ComboButton_Disabled.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> - <texture name="ComboButton_Over" file_name="widgets/ComboButton_Over.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> - <texture name="ComboButton_Press" file_name="widgets/ComboButton_Press.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Selected" file_name="widgets/ComboButton_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_UpSelected" file_name="widgets/ComboButton_UpSelected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="ComboButton_Up_On_Selected" file_name="widgets/ComboButton_Up_On_Selected.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> @@ -136,25 +107,18 @@ with the same filename but different name <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" /> <texture name="Container" file_name="containers/Container.png" preload="false" /> - <texture name="DisclosureArrow_Closed_Off" file_name="widgets/DisclosureArrow_Closed_Off.png" preload="true" /> - <texture name="DisclosureArrow_Closed_Press" file_name="widgets/DisclosureArrow_Closed_Press.png" preload="true" /> <texture name="DisclosureArrow_Opened_Off" file_name="widgets/DisclosureArrow_Opened_Off.png" preload="true" /> - <texture name="DisclosureArrow_Opened_Press" file_name="widgets/DisclosureArrow_Opened_Press.png" preload="true" /> <texture name="DownArrow" file_name="bottomtray/DownArrow.png" preload="false" /> <texture name="DropDown_Disabled" file_name="widgets/DropDown_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> - <texture name="DropDown_Over" file_name="widgets/DropDown_Over.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> <texture name="DropDown_Press" file_name="widgets/DropDown_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> - <texture name="DropDown_Selected" file_name="widgets/DropDown_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> <texture name="DropDown_On" file_name="widgets/DropDown_On.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> <texture name="DropDown_Off" file_name="widgets/DropDown_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="99" scale.bottom="4" /> <texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" /> <texture name="ExternalBrowser_Off" file_name="icons/ExternalBrowser_Off.png" preload="false" /> - <texture name="ExternalBrowser_Over" file_name="icons/ExternalBrowser_Over.png" preload="false" /> - <texture name="ExternalBrowser_Press" file_name="icons/ExternalBrowser_Press.png" preload="false" /> <texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" /> <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" /> @@ -162,8 +126,6 @@ with the same filename but different name <texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" /> <texture name="Favorite_Link_Over" file_name="navbar/Favorite_Link_Over.png" preload="false" /> - <texture name="FileMenu_BarSelect" file_name="navbar/FileMenu_BarSelect.png" preload="false" scale.left="2" scale.top="0" scale.right="2" scale.bottom="0" /> - <texture name="FileMenu_BG" file_name="navbar/FileMenu_BG.png" preload="false" /> <texture name="Flag" file_name="navbar/Flag.png" preload="false" /> @@ -174,22 +136,16 @@ with the same filename but different name <texture name="Generic_Group" file_name="icons/Generic_Group.png" preload="false" /> <texture name="icon_group.tga" file_name="icons/Generic_Group.png" preload="false" /> - <texture name="Generic_Group_Large" file_name="icons/Generic_Group_Large.png" preload="false" /> - <texture name="Generic_Object_Medium" file_name="icons/Generic_Object_Medium.png" preload="false" /> <texture name="Generic_Object_Small" file_name="icons/Generic_Object_Small.png" preload="false" /> - <texture name="Generic_Object_Large" file_name="icons/Generic_Object_Large.png" preload="false" /> <texture name="Generic_Person" file_name="icons/Generic_Person.png" preload="false" /> <texture name="Generic_Person_Large" file_name="icons/Generic_Person_Large.png" preload="false" /> <texture name="Health" file_name="icons/Health.png" preload="false" /> - <texture name="Help_Off" file_name="navbar/Help_Off.png" preload="false" /> <texture name="Help_Press" file_name="navbar/Help_Press.png" preload="false" /> - <texture name="History_Arrow" file_name="navbar/History_Arrow.png" preload="true" /> <texture name="Home_Off" file_name="navbar/Home_Off.png" preload="false" /> - <texture name="Home_Press" file_name="navbar/Home_Press.png" preload="false" /> <texture name="Icon_Close_Foreground" file_name="windows/Icon_Close_Foreground.png" preload="true" /> <texture name="Icon_Close_Press" file_name="windows/Icon_Close_Press.png" preload="true" /> @@ -206,7 +162,6 @@ with the same filename but different name <texture name="Icon_Help_Foreground" file_name="windows/Icon_Help_Foreground.png" preload="true" /> <texture name="Icon_Help_Press" file_name="windows/Icon_Help_Press.png" preload="true" /> - <texture name="Icon_Info" file_name="windows/Icon_Info.png" preload="false" /> <texture name="Icon_Minimize_Foreground" file_name="windows/Icon_Minimize_Foreground.png" preload="true" /> <texture name="Icon_Minimize_Press" file_name="windows/Icon_Minimize_Press.png" preload="true" /> @@ -225,13 +180,11 @@ with the same filename but different name <texture name="Inspector_Hover" file_name="windows/Inspector_Hover.png" preload="false" /> <texture name="Inspector_I" file_name="windows/Inspector_I.png" preload="false" /> - <texture name="Inv_Acessories" file_name="icons/Inv_Accessories.png" preload="false" /> <texture name="Inv_Alpha" file_name="icons/Inv_Alpha.png" preload="false" /> <texture name="Inv_Animation" file_name="icons/Inv_Animation.png" preload="false" /> <texture name="Inv_BodyShape" file_name="icons/Inv_BodyShape.png" preload="false" /> <texture name="Inv_CallingCard" file_name="icons/Inv_CallingCard.png" preload="false" /> <texture name="Inv_Clothing" file_name="icons/Inv_Clothing.png" preload="false" /> - <texture name="Inv_DangerousScript" file_name="icons/Inv_DangerousScript.png" preload="false" /> <texture name="Inv_Eye" file_name="icons/Inv_Eye.png" preload="false" /> <texture name="Inv_FolderClosed" file_name="icons/Inv_FolderClosed.png" preload="false" /> <texture name="Inv_FolderOpen" file_name="icons/Inv_FolderOpen.png" preload="false" /> @@ -239,7 +192,6 @@ with the same filename but different name <texture name="Inv_Gloves" file_name="icons/Inv_Gloves.png" preload="false" /> <texture name="Inv_Hair" file_name="icons/Inv_Hair.png" preload="false" /> <texture name="Inv_LinkItem" file_name="icons/Inv_LinkItem.png" preload="false" /> - <texture name="Inv_LinkItem_Broken" file_name="icons/Inv_LinkItem_Broken.png" preload="false" /> <texture name="Inv_LinkFolder" file_name="icons/Inv_LinkFolder.png" preload="false" /> <texture name="Inv_Jacket" file_name="icons/Inv_Jacket.png" preload="false" /> <texture name="Inv_LookFolderOpen" file_name="icons/Inv_LookFolderOpen.png" preload="false" /> @@ -259,7 +211,6 @@ with the same filename but different name <texture name="Inv_Sound" file_name="icons/Inv_Sound.png" preload="false" /> <texture name="Inv_Tattoo" file_name="icons/Inv_Tattoo.png" preload="false" /> <texture name="Inv_Texture" file_name="icons/Inv_Texture.png" preload="false" /> - <texture name="Inv_Trash" file_name="icons/Inv_Trash.png" preload="false" /> <texture name="Inv_Underpants" file_name="icons/Inv_Underpants.png" preload="false" /> <texture name="Inv_Undershirt" file_name="icons/Inv_Undershirt.png" preload="false" /> @@ -272,9 +223,7 @@ with the same filename but different name <texture name="Lock" file_name="icons/Lock.png" preload="false" /> <texture name="Lock2" file_name="navbar/Lock.png" preload="false" /> - <texture name="Login_Pod" file_name="windows/Login_Pod.png" preload="true" /> - <texture name="Microphone_Mute" file_name="icons/Microphone_Mute.png" preload="false" /> <texture name="Microphone_On" file_name="icons/Microphone_On.png" preload="false" /> <texture name="MinusItem_Disabled" file_name="icons/MinusItem_Disabled.png" preload="false" /> @@ -283,18 +232,9 @@ with the same filename but different name <texture name="menu_separator" file_name="navbar/FileMenu_Divider.png" scale.left="4" scale.top="166" scale.right="0" scale.bottom="0" /> - <texture name="Move_Fly_Disabled" file_name="bottomtray/Move_Fly_Disabled.png" preload="false" /> <texture name="Move_Fly_Off" file_name="bottomtray/Move_Fly_Off.png" preload="false" /> - <texture name="Move_Fly_Over" file_name="bottomtray/Move_Fly_Over.png" preload="false" /> - <texture name="Move_Fly_Press" file_name="bottomtray/Move_Fly_Press.png" preload="false" /> - <texture name="Move_Run_Disabled" file_name="bottomtray/Move_Run_Disabled.png" preload="false" /> <texture name="Move_Run_Off" file_name="bottomtray/Move_Run_Off.png" preload="false" /> - <texture name="Move_Run_Over" file_name="bottomtray/Move_Run_Over.png" preload="false" /> - <texture name="Move_Run_Press" file_name="bottomtray/Move_Run_Press.png" preload="false" /> - <texture name="Move_Walk_Disabled" file_name="bottomtray/Move_Walk_Disabled.png" preload="false" /> <texture name="Move_Walk_Off" file_name="bottomtray/Move_Walk_Off.png" preload="false" /> - <texture name="Move_Walk_Over" file_name="bottomtray/Move_Walk_Over.png" preload="false" /> - <texture name="Move_Walk_Press" file_name="bottomtray/Move_Walk_Press.png" preload="false" /> <texture name="Movement_Backward_Off" file_name="bottomtray/Movement_Backward_Off.png" preload="false" /> <texture name="Movement_Backward_On" file_name="bottomtray/Movement_Backward_On.png" preload="false" /> <texture name="Movement_Down_Off" file_name="bottomtray/Movement_Down_Off.png" preload="false" /> @@ -311,10 +251,6 @@ with the same filename but different name <texture name="NavBar_BG_NoFav" file_name="navbar/NavBar_BG_NoFav.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> <texture name="NavBar_BG" file_name="navbar/NavBar_BG.png" preload="true" scale.left="1" scale.top="1" scale.right="0" scale.bottom="0" /> - <texture name="NearbyVoice_Lvl1" file_name="bottomtray/NearbyVoice_Lvl1.png" preload="false" /> - <texture name="NearbyVoice_Lvl2" file_name="bottomtray/NearbyVoice_Lvl2.png" preload="false" /> - <texture name="NearbyVoice_Lvl3" file_name="bottomtray/NearbyVoice_Lvl3.png" preload="false" /> - <texture name="NearbyVoice_On" file_name="bottomtray/NearbyVoice_On.png" preload="false" /> <texture name="Notices_Unread" file_name="bottomtray/Notices_Unread.png" preload="true" /> @@ -356,27 +292,15 @@ with the same filename but different name <texture name="OptionsMenu_Off" file_name="icons/OptionsMenu_Off.png" preload="false" /> <texture name="OptionsMenu_Press" file_name="icons/OptionsMenu_Press.png" preload="false" /> - <texture name="Overhead_Arrow_L" file_name="world/Overhead_Arrow_L.png" preload="false" /> - <texture name="Overhead_Arrow_M" file_name="world/Overhead_Arrow_M.png" preload="false" /> - <texture name="Overhead_Arrow_S" file_name="world/Overhead_Arrow_S.png" preload="false" /> - <texture name="Overhead_L" file_name="world/Overhead_L.png" preload="false" /> - <texture name="Overhead_M" file_name="world/Overhead_M.png" preload="false" /> - <texture name="Overhead_S" file_name="world/Overhead_S.png" preload="false" /> - <texture name="Parcel_Evry_Color" file_name="icons/Parcel_Evry_Color.png" preload="false" /> <texture name="Parcel_Exp_Color" file_name="icons/Parcel_Exp_Color.png" preload="false" /> - <texture name="Parcel_M_Color" file_name="icons/Parcel_M_Color.png" preload="false" /> <texture name="Parcel_Build_Dark" file_name="icons/Parcel_Build_Dark.png" preload="false" /> <texture name="Parcel_BuildNo_Dark" file_name="icons/Parcel_BuildNo_Dark.png" preload="false" /> <texture name="Parcel_Damage_Dark" file_name="icons/Parcel_Damage_Dark.png" preload="false" /> <texture name="Parcel_DamageNo_Dark" file_name="icons/Parcel_DamageNo_Dark.png" preload="false" /> - <texture name="Parcel_Evry_Dark" file_name="icons/Parcel_Evry_Dark.png" preload="false" /> - <texture name="Parcel_Exp_Dark" file_name="icons/Parcel_Exp_Dark.png" preload="false" /> <texture name="Parcel_Fly_Dark" file_name="icons/Parcel_Fly_Dark.png" preload="false" /> <texture name="Parcel_FlyNo_Dark" file_name="icons/Parcel_FlyNo_Dark.png" preload="false" /> - <texture name="Parcel_ForSale_Dark" file_name="icons/Parcel_ForSale_Dark.png" preload="false" /> - <texture name="Parcel_ForSaleNo_Dark" file_name="icons/Parcel_ForSaleNo_Dark.png" preload="false" /> <texture name="Parcel_Health_Dark" file_name="icons/Parcel_Health_Dark.png" preload="false" /> <texture name="Parcel_M_Dark" file_name="icons/Parcel_M_Dark.png" preload="false" /> <texture name="Parcel_PG_Dark" file_name="icons/Parcel_PG_Dark.png" preload="false" /> @@ -388,22 +312,13 @@ with the same filename but different name <texture name="Parcel_Voice_Dark" file_name="icons/Parcel_Voice_Dark.png" preload="false" /> <texture name="Parcel_VoiceNo_Dark" file_name="icons/Parcel_VoiceNo_Dark.png" preload="false" /> - <texture name="Parcel_Build_Light" file_name="icons/Parcel_Build_Light.png" preload="false" /> <texture name="Parcel_BuildNo_Light" file_name="icons/Parcel_BuildNo_Light.png" preload="false" /> - <texture name="Parcel_Damage_Light" file_name="icons/Parcel_Damage_Light.png" preload="false" /> - <texture name="Parcel_DamageNo_Light" file_name="icons/Parcel_DamageNo_Light.png" preload="false" /> - <texture name="Parcel_Evry_Light" file_name="icons/Parcel_Evry_Light.png" preload="false" /> - <texture name="Parcel_Exp_Light" file_name="icons/Parcel_Exp_Light.png" preload="false" /> - <texture name="Parcel_Fly_Light" file_name="icons/Parcel_Fly_Light.png" preload="false" /> <texture name="Parcel_FlyNo_Light" file_name="icons/Parcel_FlyNo_Light.png" preload="false" /> <texture name="Parcel_ForSale_Light" file_name="icons/Parcel_ForSale_Light.png" preload="false" /> - <texture name="Parcel_ForSaleNo_Light" file_name="icons/Parcel_ForSaleNo_Light.png" preload="false" /> <texture name="Parcel_M_Light" file_name="icons/Parcel_M_Light.png" preload="false" /> <texture name="Parcel_PG_Light" file_name="icons/Parcel_PG_Light.png" preload="false" /> - <texture name="Parcel_Push_Light" file_name="icons/Parcel_Push_Light.png" preload="false" /> <texture name="Parcel_PushNo_Light" file_name="icons/Parcel_PushNo_Light.png" preload="false" /> <texture name="Parcel_R_Light" file_name="icons/Parcel_R_Light.png" preload="false" /> - <texture name="Parcel_Scripts_Light" file_name="icons/Parcel_Scripts_Light.png" preload="false" /> <texture name="Parcel_ScriptsNo_Light" file_name="icons/Parcel_ScriptsNo_Dark.png" preload="false" /> <texture name="Parcel_Voice_Light" file_name="icons/Parcel_Voice_Light.png" preload="false" /> <texture name="Parcel_VoiceNo_Light" file_name="icons/Parcel_VoiceNo_Light.png" preload="false" /> @@ -415,18 +330,6 @@ with the same filename but different name <texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" /> <texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" /> - <texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" /> - <texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" /> - <texture name="Progress_3" file_name="icons/Progress_3.png" preload="false" /> - <texture name="Progress_4" file_name="icons/Progress_4.png" preload="false" /> - <texture name="Progress_5" file_name="icons/Progress_5.png" preload="false" /> - <texture name="Progress_6" file_name="icons/Progress_6.png" preload="false" /> - <texture name="Progress_7" file_name="icons/Progress_7.png" preload="false" /> - <texture name="Progress_8" file_name="icons/Progress_8.png" preload="false" /> - <texture name="Progress_9" file_name="icons/Progress_9.png" preload="false" /> - <texture name="Progress_10" file_name="icons/Progress_10.png" preload="false" /> - <texture name="Progress_11" file_name="icons/Progress_11.png" preload="false" /> - <texture name="Progress_12" file_name="icons/Progress_12.png" preload="false" /> <texture name="ProgressBar" file_name="widgets/ProgressBar.png" preload="true" scale.left="4" scale.top="10" scale.right="48" scale.bottom="2" /> <texture name="ProgressTrack" file_name="widgets/ProgressTrack.png" preload="true" scale.left="4" scale.top="13" scale.right="148" scale.bottom="2" /> @@ -435,7 +338,6 @@ with the same filename but different name <texture name="PushButton_Off" file_name="widgets/PushButton_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_On" file_name="widgets/PushButton_On.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_On_Selected" file_name="widgets/PushButton_On_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="PushButton_On_Disabled" file_name="widgets/PushButton_On_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Press" file_name="widgets/PushButton_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected" file_name="widgets/PushButton_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="PushButton_Selected_Press" file_name="widgets/PushButton_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> @@ -448,12 +350,8 @@ with the same filename but different name <texture name="RadioButton_Disabled" file_name="widgets/RadioButton_Disabled.png" preload="true" /> <texture name="RadioButton_On_Disabled" file_name="widgets/RadioButton_On_Disabled.png" preload="true" /> - <texture name="Rec_Off" file_name="icons/Rec_Off.png" preload="false" /> - <texture name="Rec_On" file_name="icons/Rec_On.png" preload="false" /> - <texture name="Refresh_Disabled" file_name="icons/Refresh_Disabled.png" preload="false" /> <texture name="Refresh_Off" file_name="icons/Refresh_Off.png" preload="false" /> - <texture name="Refresh_Press" file_name="icons/Refresh_Press.png" preload="false" /> <texture name="Resize_Corner" file_name="windows/Resize_Corner.png" preload="true" /> @@ -470,11 +368,6 @@ with the same filename but different name <texture name="ScrollTrack_Vert" file_name="widgets/ScrollTrack_Vert.png" preload="true" scale.left="2" scale.top="40" scale.bottom="13" scale.right="0" /> <texture name="ScrollTrack_Horiz" file_name="widgets/ScrollTrack_Horiz.png" preload="true" scale.left="4" scale.top="0" scale.bottom="0" scale.right="2" /> - <texture name="ScrubberThumb_Disabled" file_name="widgets/ScrubberThumb_Disabled.png" preload="false" /> - <texture name="ScrubberThumb_Focus" file_name="widgets/ScrubberThumb_Focus.png" preload="false" /> - <texture name="ScrubberThumb_Off" file_name="widgets/ScrubberThumb_Off.png" preload="false" /> - <texture name="ScrubberThumb_Over" file_name="widgets/ScrubberThumb_Over.png" preload="false" /> - <texture name="ScrubberThumb_Press" file_name="widgets/ScrubberThumb_Press.png" preload="false" /> <texture name="Search" file_name="navbar/Search.png" preload="false" /> @@ -487,8 +380,6 @@ with the same filename but different name <texture name="SegmentedBtn_Left_Selected_Press" file_name="widgets/SegmentedBtn_Left_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Left_Selected_Disabled" file_name="widgets/SegmentedBtn_Left_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> - <texture name="SegmentedBtn_Middle_Off" file_name="widgets/SegmentedBtn_Middle_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> - <texture name="SegmentedBtn_Middle_Press" file_name="widgets/SegmentedBtn_Middle_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Middle_Disabled" file_name="widgets/SegmentedBtn_Middle_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Middle_Selected" file_name="widgets/SegmentedBtn_Middle_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Middle_Selected_Press" file_name="widgets/SegmentedBtn_Middle_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> @@ -503,11 +394,7 @@ with the same filename but different name <texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SkipBackward_Off" file_name="icons/SkipBackward_Off.png" preload="false" /> - <texture name="SkipBackward_Over" file_name="icons/SkipBackward_Over.png" preload="false" /> - <texture name="SkipBackward_Press" file_name="icons/SkipBackward_Press.png" preload="false" /> <texture name="SkipForward_Off" file_name="icons/SkipForward_Off.png" preload="false" /> - <texture name="SkipForward_Over" file_name="icons/SkipForward_Over.png" preload="false" /> - <texture name="SkipForward_Press" file_name="icons/SkipForward_Press.png" preload="false" /> <texture name="SliderTrack_Horiz" file_name="widgets/SliderTrack_Horiz.png" scale.left="4" scale.top="4" scale.right="100" scale.bottom="2" /> <texture name="SliderTrack_Vert" file_name="widgets/SliderTrack_Vert.png" scale.left="2" scale.top="100" scale.right="4" scale.bottom="4" /> @@ -520,63 +407,35 @@ with the same filename but different name <texture name="Unknown_Icon" file_name="icons/unknown_icon.png" preload="true" /> <texture name="Snapshot_Off" file_name="bottomtray/Snapshot_Off.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> - <texture name="Snapshot_Over" file_name="bottomtray/Snapshot_Over.png" preload="false" /> - <texture name="Snapshot_Press" file_name="bottomtray/Snapshot_Press.png" preload="false" /> <texture name="startup_logo" file_name="windows/startup_logo.png" preload="true" /> - <texture name="Stepper_Down_Disabled" file_name="widgets/Stepper_Down_Disabled.png" preload="false" /> <texture name="Stepper_Down_Off" file_name="widgets/Stepper_Down_Off.png" preload="false" /> <texture name="Stepper_Down_Press" file_name="widgets/Stepper_Down_Press.png" preload="false" /> - <texture name="Stepper_Up_Disabled" file_name="widgets/Stepper_Up_Disabled.png" preload="false" /> <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="false" /> <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="false" /> <texture name="Stop_Off" file_name="icons/Stop_Off.png" preload="false" /> - <texture name="Stop_Over" file_name="icons/Stop_Over.png" preload="false" /> - <texture name="Stop_Press" file_name="icons/Stop_Press.png" preload="false" /> <texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" /> <texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" /> - <texture name="StopReload_Press" file_name="icons/StopReload_Press.png" preload="false" /> - <texture name="TabIcon_Appearance_Large" file_name="taskpanel/TabIcon_Appearance_Large.png" preload="false" /> <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" /> - <texture name="TabIcon_Appearance_Over" file_name="taskpanel/TabIcon_Appearance_Over.png" preload="false" /> <texture name="TabIcon_Appearance_Selected" file_name="taskpanel/TabIcon_Appearance_Selected.png" preload="false" /> <texture name="TabIcon_Close_Off" file_name="taskpanel/TabIcon_Close_Off.png" preload="false" /> - <texture name="TabIcon_Close_Over" file_name="taskpanel/TabIcon_Close_Over.png" preload="false" /> - <texture name="TabIcon_Inventory_Large" file_name="taskpanel/TabIcon_Inventory_Large.png" preload="false" /> - <texture name="TabIcon_Inventory_Off" file_name="taskpanel/TabIcon_Inventory_Off.png" preload="false" /> - <texture name="TabIcon_Inventory_Over" file_name="taskpanel/TabIcon_Inventory_Over.png" preload="false" /> - <texture name="TabIcon_Inventory_Selected" file_name="taskpanel/TabIcon_Inventory_Selected.png" preload="false" /> - <texture name="TabIcon_Home_Large" file_name="taskpanel/TabIcon_Home_Large.png" preload="false" /> <texture name="TabIcon_Home_Off" file_name="taskpanel/TabIcon_Home_Off.png" preload="false" /> - <texture name="TabIcon_Home_Over" file_name="taskpanel/TabIcon_Home_Over.png" preload="false" /> <texture name="TabIcon_Home_Selected" file_name="taskpanel/TabIcon_Home_Selected.png" preload="false" /> - <texture name="TabIcon_Me_Large" file_name="taskpanel/TabIcon_Me_Large.png" preload="false" /> <texture name="TabIcon_Me_Off" file_name="taskpanel/TabIcon_Me_Off.png" preload="false" /> - <texture name="TabIcon_Me_Over" file_name="taskpanel/TabIcon_Me_Over.png" preload="false" /> <texture name="TabIcon_Me_Selected" file_name="taskpanel/TabIcon_Me_Selected.png" preload="false" /> <texture name="TabIcon_Open_Off" file_name="taskpanel/TabIcon_Open_Off.png" preload="false" /> - <texture name="TabIcon_Open_Over" file_name="taskpanel/TabIcon_Open_Over.png" preload="false" /> - <texture name="TabIcon_People_Large" file_name="taskpanel/TabIcon_People_Large.png" preload="false" /> <texture name="TabIcon_People_Off" file_name="taskpanel/TabIcon_People_Off.png" preload="false" /> - <texture name="TabIcon_People_Over" file_name="taskpanel/TabIcon_People_Over.png" preload="false" /> <texture name="TabIcon_People_Selected" file_name="taskpanel/TabIcon_People_Selected.png" preload="false" /> <texture name="TabIcon_Places_Large" file_name="taskpanel/TabIcon_Places_Large.png" preload="false" /> <texture name="TabIcon_Places_Off" file_name="taskpanel/TabIcon_Places_Off.png" preload="false" /> - <texture name="TabIcon_Places_Over" file_name="taskpanel/TabIcon_Places_Over.png" preload="false" /> <texture name="TabIcon_Places_Selected" file_name="taskpanel/TabIcon_Places_Selected.png" preload="false" /> - <texture name="TabIcon_Things_Large" file_name="taskpanel/TabIcon_Things_Large.png" preload="false" /> <texture name="TabIcon_Things_Off" file_name="taskpanel/TabIcon_Things_Off.png" preload="false" /> - <texture name="TabIcon_Things_Over" file_name="taskpanel/TabIcon_Things_Over.png" preload="false" /> <texture name="TabIcon_Things_Selected" file_name="taskpanel/TabIcon_Things_Selected.png" preload="false" /> - <texture name="TabTop_Divider" file_name="containers/TabTop_Divider.png" preload="false" /> - <texture name="TabTop_Left_Press" file_name="containers/TabTop_Left_Press.png" preload="false" /> - <texture name="TabTop_Middle_Press" file_name="containers/TabTop_Middle_Press.png" preload="false" /> <texture name="TabTop_Right_Off" file_name="containers/TabTop_Right_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> - <texture name="TabTop_Right_Press" file_name="containers/TabTop_Right_Press.png" preload="false" /> <texture name="TabTop_Right_Selected" file_name="containers/TabTop_Right_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="62" scale.bottom="9" /> <texture name="TabTop_Middle_Off" file_name="containers/TabTop_Middle_Off.png" preload="false" scale.left="8" scale.top="8" scale.right="120" scale.bottom="9" /> <texture name="TabTop_Middle_Selected" file_name="containers/TabTop_Middle_Selected.png" preload="false" scale.left="8" scale.top="8" scale.right="96" scale.bottom="9" /> @@ -585,8 +444,6 @@ with the same filename but different name <texture name="TaskPanel_Tab_Off" file_name="taskpanel/TaskPanel_Tab_Off.png" preload="false" scale.left="4" scale.top="29" scale.right="36" scale.bottom="4" /> <texture name="TaskPanel_Tab_Selected" file_name="taskpanel/TaskPanel_Tab_Selected.png" preload="false" scale.left="5" scale.top="30" scale.right="36" scale.bottom="5" /> - <texture name="TaskPanel_BG" file_name="taskpanel/TaskPanel_BG.png" preload="false" scale.left="4" scale.top="146" scale.right="146" scale.bottom="4" /> - <texture name="TaskPanel_Tab_Unselected" file_name="taskpanel/TaskPanel_Tab_Over.png" preload="false" scale.left="5" scale.top="30" scale.right="36" scale.bottom="5" /> <texture name="TextField_Search_Disabled" file_name="widgets/TextField_Search_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Off" file_name="widgets/TextField_Off.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> @@ -595,7 +452,6 @@ with the same filename but different name <texture name="TextField_Disabled" file_name="widgets/TextField_Disabled.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> <texture name="TextField_Active" file_name="widgets/TextField_Active.png" preload="true" scale.left="9" scale.top="12" scale.right="248" scale.bottom="12" /> - <texture name="TimeBasedMediaBackground" file_name="windows/TimeBasedMediaBackground.png" preload="false" /> <texture name="Toast_CloseBtn" file_name="windows/Toast_CloseBtn.png" preload="true" /> <texture name="Toast_Background" file_name="windows/Toast_Background.png" preload="true" @@ -604,28 +460,19 @@ with the same filename but different name scale.left="4" scale.top="28" scale.right="60" scale.bottom="4" /> <texture name="Tool_Create" file_name="build/Tool_Create.png" preload="false" /> - <texture name="Tool_Create_Selected" file_name="build/Tool_Create_Selected.png" preload="false" /> <texture name="Tool_Dozer" file_name="build/Tool_Dozer.png" preload="false" /> - <texture name="Tool_Dozer_Selected" file_name="build/Tool_Dozer_Selected.png" preload="false" /> <texture name="Tool_Face" file_name="build/Tool_Face.png" preload="false" /> - <texture name="Tool_Face_Selected" file_name="build/Tool_Face_Selected.png" preload="false" /> <texture name="Tool_Grab" file_name="build/Tool_Grab.png" preload="false" /> - <texture name="Tool_Grab_Selected" file_name="build/Tool_Grab_Selected.png" preload="false" /> <texture name="Tool_Zoom" file_name="build/Tool_Zoom.png" preload="false" /> - <texture name="Tool_Zoom_Selected" file_name="build/Tool_Zoom_Selected.png" preload="false" /> - <texture name="Toolbar_Divider" file_name="containers/Toolbar_Divider.png" preload="false" /> <texture name="Toolbar_Left_Off" file_name="containers/Toolbar_Left_Off.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Left_Over" file_name="containers/Toolbar_Left_Over.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> - <texture name="Toolbar_Left_Press" file_name="containers/Toolbar_Left_Press.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Left_Selected" file_name="containers/Toolbar_Left_Selected.png" preload="false" scale.left="5" scale.bottom="4" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Off" file_name="containers/Toolbar_Middle_Off.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Over" file_name="containers/Toolbar_Middle_Over.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> - <texture name="Toolbar_Middle_Press" file_name="containers/Toolbar_Middle_Press.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> <texture name="Toolbar_Middle_Selected" file_name="containers/Toolbar_Middle_Selected.png" preload="false" scale.left="1" scale.bottom="2" scale.top="24" scale.right="30" /> <texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Toolbar_Right_Over" file_name="containers/Toolbar_Right_Over.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> - <texture name="Toolbar_Right_Press" file_name="containers/Toolbar_Right_Press.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" scale.left="1" scale.bottom="4" scale.top="24" scale.right="26" /> <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" /> @@ -635,7 +482,6 @@ with the same filename but different name <texture name="TrashItem_Press" file_name="icons/TrashItem_Press.png" preload="false" /> <texture name="Unread_Chiclet" file_name="bottomtray/Unread_Chiclet.png" preload="false" /> - <texture name="Unread_Msg" file_name="bottomtray/Unread_Msg.png" preload="false" /> <texture name="Unread_IM" file_name="bottomtray/Unread_IM.png" preload="false" /> <texture name="Volume_Background" file_name="windows/Volume_Background.png" preload="false" @@ -650,10 +496,7 @@ with the same filename but different name <texture name="WellButton_Lit" file_name="bottomtray/WellButton_Lit.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> <texture name="WellButton_Lit_Selected" file_name="bottomtray/WellButton_Lit_Selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" /> - <texture name="WebBasedMediaBackground" file_name="windows/WebBasedMediaBackground.png" preload="false" /> - <texture name="Widget_DownArrow" file_name="icons/Widget_DownArrow.png" preload="true" /> - <texture name="Widget_UpArrow" file_name="icons/Widget_UpArrow.png" preload="true" /> <texture name="Window_Background" file_name="windows/Window_Background.png" preload="true" scale.left="4" scale.top="24" scale.right="26" scale.bottom="4" /> @@ -667,17 +510,7 @@ with the same filename but different name <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> <texture name="Zoom_Off" file_name="icons/Zoom_Off.png" preload="false" /> - <texture name="Zoom_Over" file_name="icons/Zoom_Over.png" preload="false" /> - <texture name="Zoom_Press" file_name="icons/Zoom_Press.png" preload="false" /> <texture name="UnZoom_Off" file_name="icons/UnZoom_Off.png" preload="false" /> - <texture name="UnZoom_Over" file_name="icons/UnZoom_Over.png" preload="false" /> - <texture name="UnZoom_Press" file_name="icons/UnZoom_Press.png" preload="false" /> - <texture name="PowerOn_Off" file_name="icons/PowerOn_Off.png" preload="false" /> - <texture name="PowerOn_Over" file_name="icons/PowerOn_Over.png" preload="false" /> - <texture name="PowerOn_Press" file_name="icons/PowerOn_Press.png" preload="false" /> - <texture name="PowerOff_Off" file_name="icons/PowerOff_Off.png" preload="false" /> - <texture name="PowerOff_Over" file_name="icons/PowerOff_Over.png" preload="false" /> - <texture name="PowerOff_Press" file_name="icons/PowerOff_Press.png" preload="false" /> <texture name="pixiesmall.j2c" use_mips="true" /> <texture name="script_error.j2c" use_mips="true" /> @@ -687,11 +520,8 @@ with the same filename but different name <texture name="transparent.j2c" use_mips="true" /> <!--WARNING OLD ART BELOW *do not use*--> - <texture name="icn_chatbar.tga" /> <texture name="icn_media_web.tga" preload="true" /> <texture name="icn_media_movie.tga" preload="true" /> - <texture name="icn_speaker-muted_dark.tga" /> - <texture name="icn_speaker_dark.tga" /> <texture name="icn_voice-localchat.tga" /> <texture name="icn_voice-groupfocus.tga" /> <texture name="icn_voice-pvtfocus.tga" /> @@ -713,12 +543,6 @@ with the same filename but different name <texture name="tearoffbox.tga" /> <texture name="tearoff_pressed.tga" /> - <texture name="icn_label_music.tga" /> - <texture name="icn_label_media.tga" /> - <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114" /> - - <texture name="toggle_button_off" file_name="toggle_button_off.png" preload="true" /> - <texture name="toggle_button_selected" file_name="toggle_button_selected.png" preload="true" /> <texture name="color_swatch_alpha.tga" preload="true" /> <texture name="button_anim_pause.tga" /> @@ -728,15 +552,11 @@ with the same filename but different name <texture name="crosshairs.tga" /> <texture name="direction_arrow.tga" file_name="world/BeaconArrow.png" /> - <texture name="icon_auction.tga" /> <texture name="icon_avatar_offline.tga" /> <texture name="icon_avatar_online.tga" /> <texture name="icon_day_cycle.tga" /> <texture name="icon_diurnal.tga" /> - <texture name="icon_event.tga" /> - <texture name="icon_event_mature.tga" /> <texture name="icon_for_sale.tga" /> - <texture name="icon_place_for_sale.tga" /> <texture name="icon_top_pick.tga" /> <texture name="lag_status_critical.tga" /> @@ -747,7 +567,6 @@ with the same filename but different name <texture name="map_avatar_16.tga" /> <texture name="map_avatar_8.tga" /> - <texture name="map_avatar_you_8.tga" /> <texture name="map_event.tga" /> <texture name="map_event_mature.tga" /> <texture name="map_home.tga" /> @@ -756,29 +575,9 @@ with the same filename but different name <texture name="map_track_16.tga" /> <texture name="notify_caution_icon.tga" /> - <texture name="notify_next.png" preload="true" /> - <texture name="notify_box_icon.tga" /> - - <texture name="icn_active-speakers-dot-lvl0.tga" /> - <texture name="icn_active-speakers-dot-lvl1.tga" /> - <texture name="icn_active-speakers-dot-lvl2.tga" /> - <texture name="icn_active-speakers-typing1.tga" /> - <texture name="icn_active-speakers-typing2.tga" /> - <texture name="icn_active-speakers-typing3.tga" /> - - <texture name="icn_voice_ptt-off.tga" /> - <texture name="icn_voice_ptt-on.tga" /> - <texture name="icn_voice_ptt-on-lvl1.tga" /> - <texture name="icn_voice_ptt-on-lvl2.tga" /> - <texture name="icn_voice_ptt-on-lvl3.tga" /> - <texture name="icn_voice-call-end.tga" /> - <texture name="icn_voice-call-start.tga" /> - - <texture name="mute_icon.tga" /> <texture name="default_land_picture.j2c" /> <texture name="default_profile_picture.j2c" /> <texture name="locked_image.j2c" /> - <texture name="media_floater_border_16.png" scale_top="12" scale_left="4" scale_bottom="4" scale_right="12" /> </textures> diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png Binary files differindex db74b93afd..93d62a8d4f 100644 --- a/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png +++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Background.png diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png Binary files differindex 1032e45f7e..b2b2a77a88 100644 --- a/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png +++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Foreground.png diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png Binary files differindex 01dbde102b..67bd399358 100644 --- a/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png +++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Over.png diff --git a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png Binary files differindex 6614bdd165..6fc3744d6b 100644 --- a/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png +++ b/indra/newview/skins/default/textures/windows/Icon_Gear_Press.png diff --git a/indra/newview/skins/default/xui/da/language_settings.xml b/indra/newview/skins/default/xui/da/language_settings.xml index 71418d446a..fa8a788605 100644 --- a/indra/newview/skins/default/xui/da/language_settings.xml +++ b/indra/newview/skins/default/xui/da/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">danish</string> + <string name="DarwinLocale">da_DK.UTF-8</string> + <string name="LinuxLocale">da_DK.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/da/menu_viewer.xml b/indra/newview/skins/default/xui/da/menu_viewer.xml index 7e7d1b190a..be57f88e8a 100644 --- a/indra/newview/skins/default/xui/da/menu_viewer.xml +++ b/indra/newview/skins/default/xui/da/menu_viewer.xml @@ -119,6 +119,7 @@ <menu_item_call label="[SECOND_LIFE] Help" name="Second Life Help"/> <menu_item_call label="Rapporter misbrug" name="Report Abuse"/> <menu_item_call label="Rapportér fejl" name="Report Bug"/> + <menu_item_call label="Om [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanceret" name="Advanced"> <menu_item_call label="Stop animering af min avatar" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml index 9276ff3a09..1e60174909 100644 --- a/indra/newview/skins/default/xui/da/panel_login.xml +++ b/indra/newview/skins/default/xui/da/panel_login.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="panel_login"> + <panel.string name="create_account_url"> + http://join.secondlife.com/ + </panel.string> <panel.string name="real_url"> http://secondlife.com/app/login/ </panel.string> @@ -12,20 +15,31 @@ Fornavn: </text> <line_editor label="Fornavn" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> + <text name="last_name_text"> + Efternavn: + </text> <line_editor label="Efternavn" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <text name="password_text"> + Password: + </text> <check_box label="Husk password" name="remember_check"/> + <button label="Log på" name="connect_btn"/> <text name="start_location_text"> Start ved: </text> <combo_box name="start_location_combo"> + <combo_box.item label="Min sidste lokation" name="MyLastLocation"/> <combo_box.item label="Hjem" name="MyHome"/> + <combo_box.item label="<Indtast regionnavn>" name="Typeregionname"/> </combo_box> - <button label="Log på" name="connect_btn"/> </layout_panel> <layout_panel name="links"> <text name="create_new_account_text"> Opret bruger </text> + <text name="forgot_password_text"> + Glemt navn eller password? + </text> <text name="login_help"> Hjælp til login </text> diff --git a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml index 54a8a43edf..837dfa9e8c 100644 --- a/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/de/floater_day_cycle_options.xml @@ -66,7 +66,7 @@ Key-Zeit: </text> <spinner label="Std." name="WLCurKeyHour" /> - <spinner label="Min." name="WLCurKeyMin" label_width="100" width="66"/> + <spinner label="Min." name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> Key-Voreinstellung: </text> @@ -79,8 +79,8 @@ Zykluslänge: </text> <spinner label="Std." name="WLLengthOfDayHour" /> - <spinner label="Min." name="WLLengthOfDayMin" label_width="100" width="66"/> - <spinner label="Sek." name="WLLengthOfDaySec" label_width="100" width="66"/> + <spinner label="Min." name="WLLengthOfDayMin"/> + <spinner label="Sek." name="WLLengthOfDaySec"/> <text name="DayCycleText3"> Vorschau: </text> diff --git a/indra/newview/skins/default/xui/de/language_settings.xml b/indra/newview/skins/default/xui/de/language_settings.xml index 71418d446a..3e357007ff 100644 --- a/indra/newview/skins/default/xui/de/language_settings.xml +++ b/indra/newview/skins/default/xui/de/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">german</string> + <string name="DarwinLocale">de_DE.UTF-8</string> + <string name="LinuxLocale">de_DE.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index c2f25c84b8..97387e9e87 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1725,7 +1725,7 @@ Inventarobjekt(e) verschieben? <notification name="ClickActionNotPayable"> Achtung: Die Klickaktion „Objekt bezahlen" wurde eingestellt. Diese funktioniert jedoch nicht, wenn ein Skript mit einer Geldtransaktion () hinzugefügt wird. <form name="form"> - <ignore name="ignore" text="I habe die Aktion „Objekt bezahlen" eingestellt, während ich ein Objekt gebaut habe, dass kein Geld()-Skript enthält."/> + <ignore name="ignore" text="Ich habe die Aktion „Objekt bezahlen" eingestellt, während ich ein Objekt gebaut habe, dass kein Geld()-Skript enthält."/> </form> </notification> <notification name="OpenObjectCannotCopy"> diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml index fd05f02ceb..b3aeb8cd68 100644 --- a/indra/newview/skins/default/xui/de/strings.xml +++ b/indra/newview/skins/default/xui/de/strings.xml @@ -3577,4 +3577,7 @@ Missbrauchsbericht <string name="Contents"> Inhalt </string> + <string name="AvatarBirthDateFormat"> + [day,datetime,slt]/[mthnum,datetime,slt]/[year,datetime,slt] + </string> </strings> diff --git a/indra/newview/skins/default/xui/en/alert_line_editor.xml b/indra/newview/skins/default/xui/en/alert_line_editor.xml index 97991153d8..82bf5fc8da 100644 --- a/indra/newview/skins/default/xui/en/alert_line_editor.xml +++ b/indra/newview/skins/default/xui/en/alert_line_editor.xml @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <line_editor select_on_focus="false" - handle_edit_keys_directly="false" revert_on_esc="true" commit_on_focus_lost="true" ignore_tab="true" diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 05beb45593..a6a4c79da4 100644 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -76,7 +76,7 @@ Packets Lost: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number allow_html="true" follows="top|left" font="SansSerif" - height="350" + height="343" bg_readonly_color="Transparent" left="5" max_length="65536" diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 51bd7a0a16..59f1889808 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -636,7 +636,6 @@ Leyla Linden </text> length="1" enabled="false" follows="all" - handle_edit_keys_directly="true" height="200" layout="topleft" left="10" diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml index 9dff4abe2c..cb6b2f6ebc 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml @@ -333,66 +333,86 @@ Maximum animation length is [MAX_LENGTH] seconds. left_pad="20" name="emote_combo" tool_tip="Controls what face does during animation"> - <combo_box.item - label="(None)" - name="[None]" /> - <combo_box.item - label="Aaaaah" - name="Aaaaah" /> - <combo_box.item - label="Afraid" - name="Afraid" /> - <combo_box.item - label="Angry" - name="Angry" /> - <combo_box.item - label="Big Smile" - name="BigSmile" /> - <combo_box.item - label="Bored" - name="Bored" /> - <combo_box.item - label="Cry" - name="Cry" /> - <combo_box.item - label="Disdain" - name="Disdain" /> - <combo_box.item - label="Embarrassed" - name="Embarrassed" /> - <combo_box.item - label="Frown" - name="Frown" /> - <combo_box.item - label="Kiss" - name="Kiss" /> - <combo_box.item - label="Laugh" - name="Laugh" /> - <combo_box.item - label="Plllppt" - name="Plllppt" /> - <combo_box.item - label="Repulsed" - name="Repulsed" /> - <combo_box.item - label="Sad" - name="Sad" /> - <combo_box.item - label="Shrug" - name="Shrug" /> - <combo_box.item - label="Smile" - name="Smile" /> - <combo_box.item - label="Surprise" - name="Surprise" /> - <combo_box.item - label="Wink" - name="Wink" /> - <combo_box.item - label="Worry" - name="Worry" /> + <item + label="(None)" + value="" + name="[None]" /> + <item + label="Aaaaah" + value="Aaaaah" + name="Aaaaah" /> + <item + label="Afraid" + value="Afraid" + name="Afraid" /> + <item + label="Angry" + value="Angry" + name="Angry" /> + <item + label="Big Smile" + value="Big Smile" + name="BigSmile" /> + <item + label="Bored" + value="Bored" + name="Bored" /> + <item + label="Cry" + value="Cry" + name="Cry" /> + <item + label="Disdain" + value="Disdain" + name="Disdain" /> + <item + label="Embarrassed" + value="Embarrassed" + name="Embarrassed" /> + <item + label="Frown" + value="Frown" + name="Frown" /> + <item + label="Kiss" + value="Kiss" + name="Kiss" /> + <item + label="Laugh" + value="Laugh" + name="Laugh" /> + <item + label="Plllppt" + value="Plllppt" + name="Plllppt" /> + <item + label="Repulsed" + value="Repulsed" + name="Repulsed" /> + <item + label="Sad" + value="Sad" + name="Sad" /> + <item + label="Shrug" + value="Shrug" + name="Shrug" /> + <item + label="Smile" + value="Smile" + name="Smile" /> + <item + label="Surprise" + value="Surprise" + name="Surprise" /> + <item + label="Wink" + value="Wink" + name="Wink" /> + <item + label="Worry" + value="Worry" + name="Worry" /> </combo_box> <text type="string" @@ -414,17 +434,21 @@ Maximum animation length is [MAX_LENGTH] seconds. left_pad="20" name="preview_base_anim" tool_tip="Use this to test your animation behavior while your avatar performs common actions."> - <combo_box.item + <item label="Standing" + value="Standing" name="Standing" /> - <combo_box.item + <item label="Walking" + value="Walking" name="Walking" /> - <combo_box.item + <item label="Sitting" + value="Sitting" name="Sitting" /> - <combo_box.item + <item label="Flying" + value="Flying" name="Flying" /> </combo_box> <spinner diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml index 54b6edb0ec..e30e958543 100644 --- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml +++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="650" + height="660" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" title="AVATAR TEXTURES" - width="1250"> + width="1253"> <floater.string name="InvalidAvatar"> INVALID AVATAR diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index e02d32596a..637f9f55d4 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -24,13 +24,13 @@ <text type="string" length="1" - follows="top|left" + follows="top|left|right" font="SansSerifHuge" layout="topleft" left="20" height="30" top="25" - width="300" + width="340" name="info_need_more"> You need more L$ </text> @@ -55,7 +55,7 @@ left="20" height="30" top="25" - width="200" + width="300" name="info_buying"> Buy L$ </text> @@ -178,8 +178,8 @@ follows="top|left" height="16" halign="right" - left="140" - width="180" + left="20" + width="300" layout="topleft" name="buy_action"> [ACTION] diff --git a/indra/newview/skins/default/xui/en/floater_buy_land.xml b/indra/newview/skins/default/xui/en/floater_buy_land.xml index 125b080519..df44b61632 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_land.xml @@ -356,7 +356,6 @@ supports [AMOUNT2] objects length="1" enabled="false" follows="top|right" - handle_edit_keys_directly="false" height="237" layout="topleft" left="444" diff --git a/indra/newview/skins/default/xui/en/floater_color_picker.xml b/indra/newview/skins/default/xui/en/floater_color_picker.xml index 2fa112af8c..421f3a72c6 100644 --- a/indra/newview/skins/default/xui/en/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/en/floater_color_picker.xml @@ -213,7 +213,8 @@ left="10" name="(Drag below to save.)" top_pad="66" - width="130"> + width="130" + wrap="true"> (Drag below to save) </text> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 6f2b0fc3ea..32460e937d 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -3365,7 +3365,7 @@ layout="topleft" name="make_outfit_btn" right="-218" - width="100" /> + width="120" /> <button bottom="574" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml index 8c5af2283d..42a9ff551e 100644 --- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml @@ -7,7 +7,7 @@ help_topic="day_cycle_floater" save_rect="true" title="DAY CYCLE EDITOR" - width="646"> + width="658"> <tab_container follows="left|top" height="255" @@ -16,7 +16,7 @@ name="Day Cycle Tabs" tab_position="top" top="20" - width="644"> + width="656"> <panel border="true" follows="left|top|right|bottom" @@ -27,7 +27,7 @@ mouse_opaque="false" name="Day Cycle" top="0" - width="642"> + width="654"> <multi_slider can_edit_text="true" control_name="WLTimeSlider" @@ -313,7 +313,7 @@ left="555" name="WLAddKey" top="30" - width="80" /> + width="96" /> <button height="20" label="Delete Key" @@ -322,7 +322,7 @@ left_delta="0" name="WLDeleteKey" top_pad="5" - width="80" /> + width="96" /> <text type="string" length="1" @@ -334,7 +334,7 @@ left="20" name="WLCurKeyFrameText" top="104" - width="150"> + width="235"> Key Frame Settings: </text> <text @@ -348,7 +348,7 @@ left="30" name="WLCurKeyTimeText" top="124" - width="100"> + width="105"> Key Time: </text> <spinner @@ -361,11 +361,11 @@ label="Hour" label_width="30" layout="topleft" - left_delta="0" + left_delta="25" max_val="100" name="WLCurKeyHour" top_pad="4" - width="70" /> + width="74" /> <spinner control_name="WLCurKeyMin" decimal_digits="0" @@ -392,7 +392,7 @@ left="30" name="WLCurKeyTimeText2" top="169" - width="120"> + width="185"> Key Preset: </text> <combo_box @@ -402,7 +402,7 @@ left_delta="0" name="WLKeyPresets" top_pad="7" - width="155" /> + width="205" /> <view_border bevel_style="none" follows="top|left" @@ -410,7 +410,7 @@ layout="topleft" left="12" top="101" - width="190" /> + width="240" /> <text type="string" length="1" @@ -419,7 +419,7 @@ font="SansSerif" height="16" layout="topleft" - left="220" + left_pad="15" name="DayCycleText" top="114" width="120"> @@ -444,7 +444,7 @@ layout="topleft" left_delta="0" name="DayCycleText2" - top_pad="9" + top_pad="17" width="120"> Length of Cycle: </text> @@ -462,7 +462,7 @@ max_val="100" name="WLLengthOfDayHour" top_pad="4" - width="70" /> + width="74" /> <spinner control_name="WLLengthOfDayMin" decimal_digits="0" @@ -492,57 +492,58 @@ max_val="59" name="WLLengthOfDaySec" top_delta="0" - width="60" /> + width="60"/> <text type="string" + halign="right" length="1" border_visible="true" follows="left|top|right" font="SansSerif" height="16" layout="topleft" - left="310" + left_delta="-23" name="DayCycleText3" top="114" - width="120"> - Preview: + width="85"> + Preview : </text> <button height="20" label="Play" label_selected="Play" layout="topleft" - left_delta="60" + left="480" name="WLAnimSky" top_pad="5" - width="50" /> + width="83" /> <button height="20" label="Stop!" label_selected="Stop" layout="topleft" - left_pad="5" + left_pad="4" name="WLStopAnimSky" top_delta="0" - width="50" /> + width="83" /> <button height="20" label="Use Estate Time" label_selected="Go to Estate Time" layout="topleft" - left_pad="5" + left="480" name="WLUseLindenTime" - top_delta="0" - width="150" /> + top_pad="9" + width="170" /> <button height="20" label="Save Test Day" label_selected="Save Test Day" layout="topleft" - left="480" + left_delta="0" name="WLSaveDayCycle" - top="175" - width="150" /> + top_pad="9" + width="170" /> <button height="20" label="Load Test Day" @@ -550,8 +551,8 @@ layout="topleft" left_delta="0" name="WLLoadDayCycle" - top_pad="5" - width="150" /> + top_pad="3" + width="170" /> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_event.xml b/indra/newview/skins/default/xui/en/floater_event.xml index 0255e202fb..d9c9d63c72 100644 --- a/indra/newview/skins/default/xui/en/floater_event.xml +++ b/indra/newview/skins/default/xui/en/floater_event.xml @@ -244,6 +244,7 @@ layout="topleft" left="6" name="event_desc" + textbox.label="More" width="322"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</expandable_text> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/floater_god_tools.xml b/indra/newview/skins/default/xui/en/floater_god_tools.xml index 36ef6beb59..dfe3cf4485 100644 --- a/indra/newview/skins/default/xui/en/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_god_tools.xml @@ -31,19 +31,6 @@ <button follows="left|top" height="20" - label="Kick all Residents" - label_selected="Kick all Residents" - layout="topleft" - left="10" - name="Kick all users" - top="30" - width="120"> - <button.commit_callback - function="GridTools.KickAll" /> - </button> - <button - follows="left|top" - height="20" label="Flush This Region's Map Visibility Caches" label_selected="Flush This Region's Map Visibility Caches" layout="topleft" @@ -74,10 +61,10 @@ height="10" layout="topleft" left="10" - name="Sim Name:" + name="Region Name:" top="12" width="80"> - Sim Name: + Region Name: </text> <line_editor border_style="line" @@ -494,10 +481,10 @@ height="10" layout="topleft" left="10" - name="Sim Name:" + name="Region Name:" top="10" width="80"> - Sim Name: + Region Name: </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 1e2440580e..27f8b4bb39 100644 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -6,7 +6,7 @@ name="Hardware Settings Floater" help_topic="hardware_settings_floater" title="HARDWARE SETTINGS" - width="500"> + width="615"> <text type="string" length="1" @@ -16,7 +16,7 @@ left="10" name="Filtering:" top="20" - width="128"> + width="188"> Filtering: </text> <check_box @@ -37,7 +37,7 @@ left="10" name="Antialiasing:" top_pad="7" - width="128"> + width="188"> Antialiasing: </text> <combo_box @@ -79,13 +79,13 @@ increment="0.01" initial_value="1" label="Gamma:" - label_width="138" + label_width="198" layout="topleft" left="10" max_val="2" name="gamma" top_pad="7" - width="202" /> + width="262" /> <text type="string" length="1" @@ -95,7 +95,7 @@ left_pad="10" name="(brightness, lower is brighter)" top_delta="2" - width="315"> + width="385"> (0 = default brightness, lower = brighter) </text> <text @@ -107,7 +107,7 @@ left="10" name="Enable VBO:" top_pad="10" - width="128"> + width="188"> Enable VBO: </text> <check_box @@ -128,14 +128,14 @@ increment="16" initial_value="32" label="Texture Memory (MB):" - label_width="135" + label_width="195" layout="topleft" left="10" max_val="4096" name="GraphicsCardTextureMemory" tool_tip="Amount of memory to allocate for textures. Defaults to video card memory. Reducing this may improve performance but may also make textures blurry." top_pad="10" - width="300" /> + width="360" /> <spinner control_name="RenderFogRatio" decimal_digits="1" @@ -143,14 +143,14 @@ height="22" initial_value="4" label="Fog Distance Ratio:" - label_width="138" + label_width="198" layout="topleft" left_delta="0" max_val="10" min_val="0.5" name="fog" top_pad="7" - width="202" /> + width="262" /> <button follows="right|bottom" height="22" diff --git a/indra/newview/skins/default/xui/en/floater_image_preview.xml b/indra/newview/skins/default/xui/en/floater_image_preview.xml index 6f8f272128..86232de1a4 100644 --- a/indra/newview/skins/default/xui/en/floater_image_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_image_preview.xml @@ -64,35 +64,45 @@ name="clothing_type_combo" top_delta="3" width="160"> - <combo_box.item + <item label="Image" + value="Image" name="Image" /> - <combo_box.item + <item label="Hair" + value="Hair" name="Hair" /> - <combo_box.item + <item label="Female Head" + value="Female Head" name="FemaleHead" /> - <combo_box.item + <item label="Female Upper Body" + value="Female Upper Body" name="FemaleUpperBody" /> - <combo_box.item + <item label="Female Lower Body" + value="Female Lower Body" name="FemaleLowerBody" /> - <combo_box.item + <item label="Male Head" + value="Male Head" name="MaleHead" /> - <combo_box.item + <item label="Male Upper Body" + value="Male Upper Body" name="MaleUpperBody" /> - <combo_box.item + <item label="Male Lower Body" + value="Male Lower Body" name="MaleLowerBody" /> - <combo_box.item + <item label="Skirt" + value="Skirt" name="Skirt" /> - <combo_box.item + <item label="Sculpted Prim" + value="Sculpted Prim" name="SculptedPrim" /> </combo_box> <text diff --git a/indra/newview/skins/default/xui/en/floater_joystick.xml b/indra/newview/skins/default/xui/en/floater_joystick.xml index 4d67e4c343..6e1bb8fcd0 100644 --- a/indra/newview/skins/default/xui/en/floater_joystick.xml +++ b/indra/newview/skins/default/xui/en/floater_joystick.xml @@ -6,7 +6,7 @@ name="Joystick" help_topic="joystick" title="JOYSTICK CONFIGURATION" - width="550"> + width="569"> <floater.string name="NoDevice"> no device detected @@ -148,7 +148,7 @@ halign="right" height="10" layout="topleft" - left="12" + left="37" mouse_opaque="false" name="Control Modes:" top="110" @@ -161,7 +161,7 @@ halign="center" label="Avatar" layout="topleft" - left="125" + left="150" name="JoystickAvatarEnabled" width="60" /> <check_box @@ -170,7 +170,7 @@ halign="center" label="Build" layout="topleft" - left="194" + left="219" name="JoystickBuildEnabled" width="60" /> <check_box @@ -179,14 +179,14 @@ halign="center" label="Flycam" layout="topleft" - left="262" + left="289" name="JoystickFlycamEnabled" width="60" /> <stat_view height="250" label="Joystick Monitor" layout="topleft" - left="340" + left="359" name="axis_view" show_label="true" top="142" @@ -250,9 +250,9 @@ bottom="144" halign="right" layout="topleft" - left="20" + left="3" name="XScale" - width="94"> + width="140"> X Scale </text> <spinner @@ -261,7 +261,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="125" + left="150" max_val="50" min_val="-50" name="AvatarAxisScale1" @@ -272,7 +272,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale1" @@ -283,7 +283,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale1" @@ -294,9 +294,9 @@ bottom="164" halign="right" layout="topleft" - left="20" + left="3" name="YScale" - width="94"> + width="140"> Y Scale </text> <spinner @@ -305,7 +305,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="125" + left="150" max_val="50" min_val="-50" name="AvatarAxisScale2" @@ -316,7 +316,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale2" @@ -327,7 +327,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale2" @@ -338,9 +338,9 @@ bottom="184" halign="right" layout="topleft" - left="20" + left="3" name="ZScale" - width="94"> + width="140"> Z Scale </text> <spinner @@ -349,7 +349,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="125" + left="150" max_val="50" min_val="-50" name="AvatarAxisScale0" @@ -360,7 +360,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale0" @@ -371,7 +371,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale0" @@ -382,9 +382,9 @@ bottom="204" halign="right" layout="topleft" - left="20" + left="3" name="PitchScale" - width="94"> + width="140"> Pitch Scale </text> <spinner @@ -393,7 +393,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="125" + left="150" max_val="1024" min_val="-1024" name="AvatarAxisScale4" @@ -404,7 +404,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale4" @@ -415,7 +415,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale4" @@ -426,9 +426,9 @@ bottom="224" halign="right" layout="topleft" - left="20" + left="3" name="YawScale" - width="94"> + width="140"> Yaw Scale </text> <spinner @@ -437,7 +437,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="125" + left="150" max_val="1024" min_val="-1024" name="AvatarAxisScale5" @@ -448,7 +448,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale5" @@ -459,7 +459,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale5" @@ -470,9 +470,9 @@ bottom="244" halign="right" layout="topleft" - left="20" + left="3" name="RollScale" - width="94"> + width="140"> Roll Scale </text> <spinner @@ -481,7 +481,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="195" + left="220" max_val="1024" min_val="-1024" name="BuildAxisScale3" @@ -492,7 +492,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale3" @@ -503,9 +503,9 @@ bottom="274" halign="right" layout="topleft" - left="20" + left="3" name="XDeadZone" - width="94"> + width="140"> X Dead Zone </text> <spinner @@ -515,7 +515,7 @@ increment="0.01" label_width="0" layout="topleft" - left="125" + left="150" name="AvatarAxisDeadZone1" width="56" /> <spinner @@ -525,7 +525,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone1" width="56" /> <spinner @@ -535,7 +535,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone1" width="56" /> <text @@ -544,9 +544,9 @@ bottom="294" halign="right" layout="topleft" - left="20" + left="3" name="YDeadZone" - width="94"> + width="140"> Y Dead Zone </text> <spinner @@ -556,7 +556,7 @@ increment="0.01" label_width="0" layout="topleft" - left="125" + left="150" name="AvatarAxisDeadZone2" width="56" /> <spinner @@ -566,7 +566,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone2" width="56" /> <spinner @@ -576,7 +576,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone2" width="56" /> <text @@ -585,9 +585,9 @@ bottom="314" halign="right" layout="topleft" - left="20" + left="3" name="ZDeadZone" - width="94"> + width="140"> Z Dead Zone </text> <spinner @@ -597,7 +597,7 @@ increment="0.01" label_width="0" layout="topleft" - left="125" + left="150" name="AvatarAxisDeadZone0" width="56" /> <spinner @@ -607,7 +607,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone0" width="56" /> <spinner @@ -617,7 +617,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone0" width="56" /> <text @@ -626,9 +626,9 @@ bottom="334" halign="right" layout="topleft" - left="20" + left="2" name="PitchDeadZone" - width="94"> + width="140"> Pitch Dead Zone </text> <spinner @@ -638,7 +638,7 @@ increment="0.01" label_width="0" layout="topleft" - left="125" + left="150" name="AvatarAxisDeadZone4" width="56" /> <spinner @@ -648,7 +648,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone4" width="56" /> <spinner @@ -658,7 +658,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone4" width="56" /> <text @@ -667,9 +667,9 @@ bottom="354" halign="right" layout="topleft" - left="20" + left="3" name="YawDeadZone" - width="94"> + width="140"> Yaw Dead Zone </text> <spinner @@ -679,7 +679,7 @@ increment="0.01" label_width="0" layout="topleft" - left="125" + left="150" name="AvatarAxisDeadZone5" width="56" /> <spinner @@ -689,7 +689,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone5" width="56" /> <spinner @@ -699,7 +699,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone5" width="56" /> <text @@ -708,9 +708,9 @@ bottom="374" halign="right" layout="topleft" - left="20" + left="3" name="RollDeadZone" - width="94"> + width="140"> Roll Dead Zone </text> <spinner @@ -720,7 +720,7 @@ increment="0.01" label_width="0" layout="topleft" - left="195" + left="220" name="BuildAxisDeadZone3" width="56" /> <spinner @@ -730,7 +730,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone3" width="56" /> <text @@ -739,9 +739,9 @@ bottom="402" halign="right" layout="topleft" - left="20" + left="3" name="Feathering" - width="94"> + width="140"> Feathering </text> <slider @@ -752,7 +752,7 @@ increment="1" initial_value="0.7" layout="topleft" - left="116" + left="141" max_val="32" min_val="1" name="AvatarFeathering" @@ -795,9 +795,9 @@ bottom="430" halign="right" layout="topleft" - left="20" + left="3" name="ZoomScale2" - width="94"> + width="140"> Zoom Scale </text> <spinner @@ -806,7 +806,7 @@ decimal_digits="2" label_width="0" layout="topleft" - left="265" + left="290" max_val="1024" min_val="-1024" name="FlycamAxisScale6" @@ -817,9 +817,9 @@ bottom="450" halign="right" layout="topleft" - left="20" + left="3" name="ZoomDeadZone" - width="94"> + width="140"> Zoom Dead Zone </text> <spinner @@ -829,7 +829,7 @@ increment="0.01" label_width="0" layout="topleft" - left="265" + left="290" name="FlycamAxisDeadZone6" width="56" /> <button @@ -837,10 +837,10 @@ height="22" label="SpaceNavigator Defaults" layout="topleft" - left="340" + left="359" name="SpaceNavigatorDefaults" top="429" - width="184" /> + width="200" /> <button follows="right|bottom" height="20" @@ -850,7 +850,7 @@ left_delta="0" name="ok_btn" top_pad="9" - width="90" /> + width="98" /> <button follows="right|bottom" height="20" @@ -860,5 +860,5 @@ left_pad="4" name="cancel_btn" top_delta="0" - width="90" /> + width="98" /> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 5d35275e17..e21e44204d 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater + bg_alpha_image_overlay="DkGray_66" legacy_header_height="18" can_minimize="true" can_resize="true" diff --git a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml index a2938e8574..1d73d516d0 100644 --- a/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml +++ b/indra/newview/skins/default/xui/en/floater_outfit_save_as.xml @@ -45,7 +45,6 @@ as a new Outfit: border_style="line" border_thickness="1" follows="left|top" - handle_edit_keys_directly="true" height="23" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 2bafd1bdef..5ea207675b 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -100,7 +100,7 @@ No Answer. Please try again later. top="27" width="315" word_wrap="true"> - [VOICE_CHANNEL_NAME] has ended the call. [RECONNECT_NEARBY] + Your call has ended. [RECONNECT_NEARBY] </text> <text font="SansSerifLarge" diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml index 4909b8988f..ff454e3ebf 100644 --- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml @@ -44,7 +44,7 @@ left_delta="0" name="NextOwnerLabel" top_pad="5" - width="150"> + width="200"> Next owner can: </text> <check_box diff --git a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml index e9099211a3..14c0081c0d 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_notecard.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_notecard.xml @@ -72,7 +72,6 @@ max_length="65536" name="Notecard Editor" allow_html="false" - handle_edit_keys_directly="true" tab_group="1" top="46" width="392" diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index ac0fca9cce..21c0bfef48 100644 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -456,7 +456,7 @@ layout="topleft" left_delta="0" name="dscr_title" - top_pad="5" + top_pad="6" width="50"> Details: </text> @@ -464,11 +464,12 @@ type="string" length="1" follows="left|top" - height="16" + height="22" layout="topleft" name="bug_aviso" left_pad="10" - width="200"> + word_wrap="true" + width="270"> Please be as specific as possible </text> <text_editor diff --git a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml index bd9925be1d..e94af2c8d5 100644 --- a/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml +++ b/indra/newview/skins/default/xui/en/floater_script_debug_panel.xml @@ -15,7 +15,7 @@ follows="left|top|right|bottom" height="176" layout="topleft" - max_length="10000" + max_length="2147483647" name="Chat History Editor" parse_highlights="true" width="420" diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index dda14f02ff..7dcf2aab99 100644 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -1,395 +1,127 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - can_minimize="false" - can_close="true" + can_minimize="true" + can_close="false" follows="left|top" - height="516" + height="340" layout="topleft" name="Snapshot" help_topic="snapshot" save_rect="true" save_visibility="true" - title="SNAPSHOT PREVIEW" - width="215"> - <floater.string - name="unknown"> - unknown - </floater.string> - <radio_group - height="58" - label="Snapshot type" - layout="topleft" - left="10" - name="snapshot_type_radio" - top="25" - width="205"> - <radio_item - bottom="19" - height="16" - label="Email" - layout="topleft" - name="postcard" /> - <radio_item - bottom="38" - height="16" - label="My inventory (L$[AMOUNT])" - layout="topleft" - name="texture" /> - <radio_item - bottom="57" - height="16" - label="Save to my computer" - layout="topleft" - name="local" /> - </radio_group> - <ui_ctrl - height="90" - width="125" + can_dock="true" + title="Snapshot" + width="250"> + <floater.string + name="unknown"> + unknown + </floater.string> + <floater.string + name="share_to_web_url" translate="false"> + http://pdp36.lindenlab.com:12777/ + </floater.string> + <view + height="160" + width="230" layout="topleft" name="thumbnail_placeholder" - top_pad="6" + top_pad="30" follows="left|top" left="10" /> - <text - type="string" - font="SansSerifSmall" - length="1" - follows="left|top" - height="14" - layout="topleft" - right="-5" - left_delta="0" - halign="right" - name="file_size_label" - top_pad="10" - width="195"> - [SIZE] KB - </text> - <button - follows="left|top" + <button + follows="left|top" + height="22" + image_overlay="Refresh_Off" + layout="topleft" + left="20" + top_pad="-30" + name="new_snapshot_btn" + width="23" /> + <line_editor + border_style="line" + border_thickness="1" + follows="left|top" + height="20" + layout="topleft" + left="10" + max_length="500" + name="description" + top_pad="15" + width="230" + label="Description"/> + <button + label="Share Snapshot" + name="share" + top_pad="20" + left="10" + width="130"/> + <button + label="Share to Web" + name="share_to_web" + top_delta="0" + left="10" + width="130"/> + <button + label="Save to My Inventory" + name="save_to_inventory" + top_delta="0" + left="10" + width="130"/> + <button + label="Save Snapshot" + name="save" + top_pad="7" + left="10" + width="130"/> + <button + label="Email Snapshot" + name="share_to_email" + top_delta="0" + left="10" + width="130"/> + <button + label="Save to My Computer" + name="save_to_computer" + top_delta="0" + left="10" + width="130"/> + <button + label="Set As Profile Pic" + name="set_profile_pic" + top_pad="7" + left="10" + width="130"/> + <button + label="Back" + name="cancel" + top_delta="0" + left="10" + width="130"/> + <button + follows="left" height="22" - image_overlay="Refresh_Off" - layout="topleft" - left="10" - name="new_snapshot_btn" - width="23" /> - <button - follows="left|top" - height="23" - label="Send" - layout="topleft" - left_pad="5" - right="-5" - name="send_btn" - width="100" /> - <button - follows="left|top" - height="23" - label="Save (L$[AMOUNT])" - layout="topleft" - right="-5" - name="upload_btn" - top_delta="0" - width="100" /> - <flyout_button - follows="left|top" - height="23" - label="Save" - layout="topleft" - right="-5" - name="save_btn" - tool_tip="Save image to a file" - top_delta="0" - width="100"> - <flyout_button.item - label="Save" - name="save_item" - value="save" /> - <flyout_button.item - label="Save As..." - name="saveas_item" - value="save as" /> - </flyout_button> - <button - follows="left|top" - height="23" - label="More" - layout="topleft" - left="10" - name="more_btn" - tool_tip="Advanced options" - width="80" /> - <button - follows="left|top" - height="23" - label="Less" - layout="topleft" - left_delta="0" - name="less_btn" - tool_tip="Advanced options" - top_delta="0" - width="80" /> - <button - follows="left|top" - height="23" - label="Cancel" - layout="topleft" - right="-5" - left_pad="5" - name="discard_btn" - width="100" /> - <text - type="string" - length="1" - follows="top|left" - height="12" - layout="topleft" - left="10" - name="type_label2" - top_pad="5" - width="127"> - Size - </text> - <text - type="string" - length="1" - follows="top|left" - height="12" - layout="topleft" - left_pad="5" - name="format_label" - top_delta="0" - width="70"> - Format - </text> - <combo_box - height="23" - label="Resolution" - layout="topleft" - left="10" - name="postcard_size_combo" - width="120"> - <combo_box.item - label="Current Window" - name="CurrentWindow" - value="[i0,i0]" /> - <combo_box.item - label="640x480" - name="640x480" - value="[i640,i480]" /> - <combo_box.item - label="800x600" - name="800x600" - value="[i800,i600]" /> - <combo_box.item - label="1024x768" - name="1024x768" - value="[i1024,i768]" /> - <combo_box.item - label="Custom" - name="Custom" - value="[i-1,i-1]" /> - </combo_box> - <combo_box - height="23" - label="Resolution" layout="topleft" - left_delta="0" - name="texture_size_combo" - top_delta="0" - width="127"> - <combo_box.item - label="Current Window" - name="CurrentWindow" - value="[i0,i0]" /> - <combo_box.item - label="Small (128x128)" - name="Small(128x128)" - value="[i128,i128]" /> - <combo_box.item - label="Medium (256x256)" - name="Medium(256x256)" - value="[i256,i256]" /> - <combo_box.item - label="Large (512x512)" - name="Large(512x512)" - value="[i512,i512]" /> - <combo_box.item - label="Custom" - name="Custom" - value="[i-1,i-1]" /> - </combo_box> - <combo_box - height="23" - label="Resolution" - layout="topleft" - left_delta="0" - name="local_size_combo" - top_delta="0" - width="127"> - <combo_box.item - label="Current Window" - name="CurrentWindow" - value="[i0,i0]" /> - <combo_box.item - label="320x240" - name="320x240" - value="[i320,i240]" /> - <combo_box.item - label="640x480" - name="640x480" - value="[i640,i480]" /> - <combo_box.item - label="800x600" - name="800x600" - value="[i800,i600]" /> - <combo_box.item - label="1024x768" - name="1024x768" - value="[i1024,i768]" /> - <combo_box.item - label="1280x1024" - name="1280x1024" - value="[i1280,i1024]" /> - <combo_box.item - label="1600x1200" - name="1600x1200" - value="[i1600,i1200]" /> - <combo_box.item - label="Custom" - name="Custom" - value="[i-1,i-1]" /> - </combo_box> - <combo_box - height="23" - label="Format" - layout="topleft" - left_pad="5" - name="local_format_combo" - width="70"> - <combo_box.item - label="PNG" - name="PNG" /> - <combo_box.item - label="JPEG" - name="JPEG" /> - <combo_box.item - label="BMP" - name="BMP" /> - </combo_box> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Width" - label_width="40" - layout="topleft" - left="10" - max_val="6016" - min_val="32" - name="snapshot_width" - top_pad="10" - width="95" /> - <spinner - allow_text_entry="false" - decimal_digits="0" - follows="left|top" - height="20" - increment="32" - label="Height" - label_width="40" + left="210" + name="show_advanced" + image_overlay="TabIcon_Close_Off" + top_delta="1" + width="30"/> + <button + follows="left" + height="22" layout="topleft" - left_pad="5" - max_val="6016" - min_val="32" - name="snapshot_height" + left="210" + visible="false" + name="hide_advanced" + image_overlay="TabIcon_Open_Off" top_delta="0" - width="95" /> - <check_box - bottom_delta="20" - label="Constrain proportions" - layout="topleft" - left="10" - name="keep_aspect_check" /> - <slider - decimal_digits="0" - follows="left|top" - height="15" - increment="1" - initial_value="75" - label="Image quality" - label_width="100" - layout="topleft" - left_delta="0" - max_val="100" - name="image_quality_slider" - top_pad="5" - width="205" /> - <text - type="string" - length="1" - follows="left|top" - height="13" - layout="topleft" - left="10" - name="layer_type_label" - top_pad="5" - width="50"> - Capture: - </text> - <combo_box - height="23" - label="Image Layers" - layout="topleft" - left="30" - name="layer_types" - width="145"> - <combo_box.item - label="Colors" - name="Colors" - value="colors" /> - <combo_box.item - label="Depth" - name="Depth" - value="depth" /> - </combo_box> - <check_box - label="Interface" - layout="topleft" - left="30" - top_pad="10" - width="180" - name="ui_check" /> - <check_box - label="HUDs" - layout="topleft" - left="30" - top_pad="10" - width="180" - name="hud_check" /> - <check_box - label="Keep open after saving" - layout="topleft" - left="10" - top_pad="8" - width="180" - name="keep_open_check" /> - <check_box - label="Freeze frame (fullscreen)" - layout="topleft" - left="10" - top_pad="8" - width="180" - name="freeze_frame_check" /> - <check_box - label="Auto-refresh" - layout="topleft" - left="10" - top_pad="8" - width="180" - name="auto_snapshot_check" /> + width="30"/> + <panel + visible="false" + left="250" + top="17" + name="snapshot_advanced" + filename="panel_snapshot_advanced.xml"/> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml index b730f0e511..548e24efba 100644 --- a/indra/newview/skins/default/xui/en/floater_test_text_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_test_text_editor.xml @@ -14,6 +14,7 @@ name="test_text_editor" tool_tip="text editor" top="25" + word_wrap="true" width="200"> Text Editor </text_editor> diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 957ab240ee..cc9e72cfb5 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2540,18 +2540,18 @@ even though the user gets a free copy. height="19" initial_value="0" label="Horizontal (U)" - label_width="90" + label_width="125" layout="topleft" left="20" max_val="100" name="TexScaleU" top_pad="6" - width="160" /> + width="185" /> <check_box height="19" label="Flip" layout="topleft" - left_pad="10" + left_pad="5" name="checkbox flip s" top_delta="0" width="70" /> @@ -2560,17 +2560,17 @@ even though the user gets a free copy. height="19" initial_value="0" label="Vertical (V)" - label_width="90" + label_width="125" layout="topleft" left="20" max_val="100" name="TexScaleV" - width="160" /> + width="185" /> <check_box height="19" label="Flip" layout="topleft" - left_pad="10" + left_pad="5" name="checkbox flip t" top_delta="0" width="70" /> @@ -2582,12 +2582,12 @@ even though the user gets a free copy. initial_value="0" label="Rotation˚" layout="topleft" - label_width="100" + label_width="135" left="10" max_val="9999" min_val="-9999" name="TexRot" - width="170" /> + width="195" /> <spinner decimal_digits="1" @@ -2596,19 +2596,19 @@ even though the user gets a free copy. initial_value="1" label="Repeats / Meter" layout="topleft" - label_width="100" + label_width="135" left="10" max_val="10" min_val="0.1" name="rptctrl" - width="170" /> + width="195" /> <button follows="left|top" height="23" label="Apply" label_selected="Apply" layout="topleft" - left_pad="10" + left_pad="5" name="button apply" width="75" /> <text @@ -2627,24 +2627,24 @@ even though the user gets a free copy. height="19" initial_value="0" label="Horizontal (U)" - label_width="90" + label_width="125" layout="topleft" left="20" min_val="-1" name="TexOffsetU" - width="160" /> + width="185" /> <spinner follows="left|top" height="19" initial_value="0" label="Vertical (V)" - label_width="90" + label_width="125" layout="topleft" left_delta="0" min_val="-1" name="TexOffsetV" top_pad="1" - width="160" /> + width="185" /> <panel border="false" follows="left|top" @@ -2701,15 +2701,15 @@ even though the user gets a free copy. <button follows="top|left" tool_tip="Edit this Media" - height="18" - image_disabled="OptionsMenu_Disabled" - image_selected="OptionsMenu_Press" - image_unselected="OptionsMenu_Off" + height="12" + image_disabled="Icon_Gear_Foreground" + image_selected="Icon_Gear_Background" + image_unselected="Icon_Gear_Press" layout="topleft" left_pad="10" name="edit_media" - top_delta="0" - width="18"> + top_delta="3" + width="12"> <button.commit_callback function="BuildTool.EditMedia"/> </button> diff --git a/indra/newview/skins/default/xui/en/floater_ui_preview.xml b/indra/newview/skins/default/xui/en/floater_ui_preview.xml index 3a981adfdf..3b10a57c50 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -238,7 +238,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="100" @@ -278,7 +277,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="100" @@ -320,7 +318,6 @@ border_thickness="1" follows="left|bottom" font="SansSerif" - handle_edit_keys_directly="true" height="20" layout="topleft" left_delta="65" diff --git a/indra/newview/skins/default/xui/en/floater_voice_controls.xml b/indra/newview/skins/default/xui/en/floater_voice_controls.xml index 114b9a84e3..5b77f11d71 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -10,7 +10,9 @@ name="floater_voice_controls" help_topic="floater_voice_controls" title="Voice Controls" + save_dock_state="true" save_visibility="true" + save_rect="true" single_instance="true" width="282"> <string diff --git a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml index b4b57f2dbc..71812bd1a6 100644 --- a/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml +++ b/indra/newview/skins/default/xui/en/floater_wearable_save_as.xml @@ -44,7 +44,6 @@ border_style="line" border_thickness="1" follows="left|top" - handle_edit_keys_directly="true" height="23" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_windlight_options.xml b/indra/newview/skins/default/xui/en/floater_windlight_options.xml index d09a41978d..85a5be369c 100644 --- a/indra/newview/skins/default/xui/en/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/en/floater_windlight_options.xml @@ -1132,7 +1132,7 @@ layout="topleft" left_delta="0" name="BHText8" - top_pad="5" + top_pad="8" width="10"> X </text> @@ -1145,7 +1145,7 @@ initial_value="0.5" layout="topleft" left_pad="3" - top_pad="6" + top_pad="8" name="WLCloudDetailX" width="200" /> <text diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 291f8f6f51..233ab2c1b2 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -496,7 +496,7 @@ top_delta="-1" name="DoSearch" tool_tip="Search for region" - width="58"> + width="62"> <button.commit_callback function="WMap.Location" /> </button> diff --git a/indra/newview/skins/default/xui/en/inspect_object.xml b/indra/newview/skins/default/xui/en/inspect_object.xml index 00e00b9694..b8a7222e8e 100644 --- a/indra/newview/skins/default/xui/en/inspect_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_object.xml @@ -26,6 +26,7 @@ owner [OWNER] <string name="Touch">Touch</string> <string name="Sit">Sit</string> <text + allow_html="false" follows="all" font="SansSerifLarge" height="16" diff --git a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml index 39fb54d513..a7ecc39ed8 100644 --- a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml +++ b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml @@ -1,8 +1,8 @@ <button chrome="true" - image_selected="Info_Small" - image_unselected="Info_Small" - image_pressed="Info_Small" + image_selected="Info_Over" + image_unselected="Info_Over" + image_pressed="Info_Over" height="12" name="inspector_info_ctrl" width="12" /> diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index e8f9d65be5..b2e4a7ad95 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -164,15 +164,6 @@ tab_group="-2" width="1024"/> <panel top="0" - follows="all" - height="768" - mouse_opaque="true" - name="progress_view" - filename="panel_progress.xml" - class="progress_view" - width="1024" - visible="false"/> - <panel top="0" follows="all" mouse_opaque="false" left="0" @@ -193,6 +184,15 @@ <panel top="0" follows="all" height="768" + mouse_opaque="true" + name="progress_view" + filename="panel_progress.xml" + class="progress_view" + width="1024" + visible="false"/> + <panel top="0" + follows="all" + height="768" mouse_opaque="false" name="popup_holder" class="popup_holder" diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index c5b31c7f63..b46b62ec4d 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -72,7 +72,7 @@ function="Avatar.EnableFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="Debug..."> <menu_item_call.on_click function="Avatar.Debug" /> diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml index 281ec5a7c3..5c30b9ee94 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -99,5 +99,12 @@ function="ShowAgentProfile" parameter="agent" /> </menu_item_call> - + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index ac9101cfd9..276b5f106f 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -72,7 +72,7 @@ function="Avatar.EnableFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="Debug..."> <menu_item_call.on_click function="Avatar.Debug" /> diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml index 1e32cfd9df..a21c1ac44b 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -215,4 +215,12 @@ function="ShowAgentProfile" parameter="agent" /> </menu_item_call> + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_edit.xml b/indra/newview/skins/default/xui/en/menu_edit.xml new file mode 100644 index 0000000000..68f3cb532c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_edit.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu create_jump_keys="true" + label="Edit" + name="Edit" + visible="false"> + <menu_item_call + label="Undo" + name="Undo" + shortcut="control|Z"> + <menu_item_call.on_click + function="Edit.Undo" /> + <menu_item_call.on_enable + function="Edit.EnableUndo" /> + </menu_item_call> + <menu_item_call + label="Redo" + name="Redo" + shortcut="control|Y"> + <menu_item_call.on_click + function="Edit.Redo" /> + <menu_item_call.on_enable + function="Edit.EnableRedo" /> + </menu_item_call> + <menu_item_separator/> + <menu_item_call + label="Cut" + name="Cut" + shortcut="control|X"> + <menu_item_call.on_click + function="Edit.Cut" /> + <menu_item_call.on_enable + function="Edit.EnableCut" /> + </menu_item_call> + <menu_item_call + label="Copy" + name="Copy" + shortcut="control|C"> + <menu_item_call.on_click + function="Edit.Copy" /> + <menu_item_call.on_enable + function="Edit.EnableCopy" /> + </menu_item_call> + <menu_item_call + label="Paste" + name="Paste" + shortcut="control|V"> + <menu_item_call.on_click + function="Edit.Paste" /> + <menu_item_call.on_enable + function="Edit.EnablePaste" /> + </menu_item_call> + <menu_item_call + label="Delete" + name="Delete" + shortcut="Del"> + <menu_item_call.on_click + function="Edit.Delete" /> + <menu_item_call.on_enable + function="Edit.EnableDelete" /> + </menu_item_call> + <menu_item_call + label="Duplicate" + name="Duplicate" + shortcut="control|D"> + <menu_item_call.on_click + function="Edit.Duplicate" /> + <menu_item_call.on_enable + function="Edit.EnableDuplicate" /> + </menu_item_call> + <menu_item_separator/> + <menu_item_call + label="Select All" + name="Select All" + shortcut="control|A"> + <menu_item_call.on_click + function="Edit.SelectAll" /> + <menu_item_call.on_enable + function="Edit.EnableSelectAll" /> + </menu_item_call> + <menu_item_call + label="Deselect" + name="Deselect" + shortcut="control|E"> + <menu_item_call.on_click + function="Edit.Deselect" /> + <menu_item_call.on_enable + function="Edit.EnableDeselect" /> + </menu_item_call> +</menu>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/menu_group_plus.xml b/indra/newview/skins/default/xui/en/menu_group_plus.xml index e83d07baec..fce7414d80 100644 --- a/indra/newview/skins/default/xui/en/menu_group_plus.xml +++ b/indra/newview/skins/default/xui/en/menu_group_plus.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false"> <menu_item_call name="item_join" label="Join Group..."> <menu_item_call.on_click function="People.Group.Plus.Action" userdata="join_group" /> </menu_item_call> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml index 1b002b1c32..334decdf58 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml @@ -40,6 +40,8 @@ name="teleport"> <menu_item_call.on_click function="InspectAvatar.Teleport"/> + <menu_item_call.on_enable + function="InspectAvatar.Gear.EnableTeleportOffer"/> </menu_item_call> <menu_item_call label="Invite to Group" @@ -87,7 +89,7 @@ function="InspectAvatar.VisibleFreezeEject"/> </menu_item_call> <menu_item_call - label="Debug" + label="Debug Textures" name="debug"> <menu_item_call.on_click function="Avatar.Debug"/> diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml index 9dc2611663..03bd93e271 100644 --- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml @@ -45,4 +45,12 @@ function="SideTray.PanelPeopleTab" parameter="groups_panel" /> </menu_item_call> + <menu_item_call + label="Debug Textures" + name="Debug..."> + <menu_item_call.on_click + function="Avatar.Debug" /> + <menu_item_call.on_visible + function="IsGodCustomerService"/> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml new file mode 100644 index 0000000000..45a0a6635b --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_inv_offer_chiclet.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="101" + layout="topleft" + left="100" + mouse_opaque="false" + name="InvOfferChiclet Menu" + top="724" + visible="false" + width="128"> + <menu_item_call + label="Close" + layout="topleft" + name="Close"> + <menu_item_call.on_click + function="InvOfferChiclet.Action" + parameter="end" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index 2874151df5..5e1f6b58e8 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -5,6 +5,14 @@ name="Popup" visible="false"> <menu_item_call + label="Share" + layout="topleft" + name="Share" + visible="true"> + <menu_item_call.on_click + function="Inventory.Share" /> + </menu_item_call> + <menu_item_call label="Buy" layout="topleft" name="Task Buy"> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index ba74104594..e95300a4b3 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu_bar - follows="left|top|right" + follows="left|top" height="18" layout="topleft" left_delta="0" @@ -29,14 +29,6 @@ function="File.Quit" /> </menu_item_call> </menu> -<!-- Edit menu merged into the Me menu above - <menu - create_jump_keys="true" - label="Edit" - name="Edit" - width="153"> - </menu> ---> <menu create_jump_keys="true" label="Help" @@ -59,105 +51,24 @@ parameter="sl_about" /> </menu_item_call> </menu> + <menu_item_check + label="Show Debug Menu" + name="Show Debug Menu" + visible="false" + shortcut="control|alt|D"> + <on_check + function="CheckControl" + parameter="UseDebugMenus" /> + <on_click + function="ToggleControl" + parameter="UseDebugMenus" /> + </menu_item_check> <menu visible="false" create_jump_keys="true" label="Debug" name="Debug" tear_off="true"> - <!-- Need a copy of the edit menu here so keyboard shortcuts like - control-C work to copy text at login screen and About dialog (for QA) - --> - <menu - create_jump_keys="true" - label="Edit" - name="Edit" - tear_off="true"> - <menu_item_call - label="Undo" - name="Undo" - shortcut="control|Z"> - <menu_item_call.on_click - function="Edit.Undo" /> - <menu_item_call.on_enable - function="Edit.EnableUndo" /> - </menu_item_call> - <menu_item_call - label="Redo" - name="Redo" - shortcut="control|Y"> - <menu_item_call.on_click - function="Edit.Redo" /> - <menu_item_call.on_enable - function="Edit.EnableRedo" /> - </menu_item_call> - <menu_item_separator /> - <menu_item_call - label="Cut" - name="Cut" - shortcut="control|X"> - <menu_item_call.on_click - function="Edit.Cut" /> - <menu_item_call.on_enable - function="Edit.EnableCut" /> - </menu_item_call> - <menu_item_call - label="Copy" - name="Copy" - shortcut="control|C"> - <menu_item_call.on_click - function="Edit.Copy" /> - <menu_item_call.on_enable - function="Edit.EnableCopy" /> - </menu_item_call> - <menu_item_call - label="Paste" - name="Paste" - shortcut="control|V"> - <menu_item_call.on_click - function="Edit.Paste" /> - <menu_item_call.on_enable - function="Edit.EnablePaste" /> - </menu_item_call> - <menu_item_call - label="Delete" - name="Delete" - shortcut="Del"> - <menu_item_call.on_click - function="Edit.Delete" /> - <menu_item_call.on_enable - function="Edit.EnableDelete" /> - </menu_item_call> - <menu_item_call - label="Duplicate" - name="Duplicate" - shortcut="control|D"> - <menu_item_call.on_click - function="Edit.Duplicate" /> - <menu_item_call.on_enable - function="Edit.EnableDuplicate" /> - </menu_item_call> - <menu_item_separator /> - <menu_item_call - label="Select All" - name="Select All" - shortcut="control|A"> - <menu_item_call.on_click - function="Edit.SelectAll" /> - <menu_item_call.on_enable - function="Edit.EnableSelectAll" /> - </menu_item_call> - <menu_item_call - label="Deselect" - name="Deselect" - shortcut="control|E"> - <menu_item_call.on_click - function="Edit.Deselect" /> - <menu_item_call.on_enable - function="Edit.EnableDeselect" /> - </menu_item_call> - </menu> - <menu_item_separator /> <menu_item_call label="Show Debug Settings" name="Debug Settings"> @@ -270,5 +181,27 @@ function="Advanced.WebBrowserTest" parameter="http://join.secondlife.com/"/> </menu_item_call> + <menu_item_separator/> + <menu_item_check + label="Show Grid Picker" + name="Show Grid Picker" + visible="false" + shortcut="control|shift|G"> + <on_check + function="CheckControl" + parameter="ForceShowGrid" /> + <on_click + function="ToggleControl" + parameter="ForceShowGrid" /> + </menu_item_check> + <menu_item_call + label="Show Notifications Console" + name="Show Notifications Console" + visible="false" + shortcut="control|shift|5"> + <on_click + function="Floater.Toggle" + parameter="notifications_console" /> + </menu_item_call> </menu> </menu_bar> diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 2c97112e38..8b10c7b049 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -138,26 +138,13 @@ </context_menu> <menu_item_separator layout="topleft" /> <menu_item_call - label="Buy" - layout="topleft" - name="Pie Object Bye"> - <menu_item_call.on_click - function="Tools.BuyOrTake"/> - <menu_item_call.on_visible - function="Tools.VisibleBuyObject"/> - <menu_item_call.on_enable - function="Tools.EnableBuyOrTake"/> - </menu_item_call> - <menu_item_call label="Take" layout="topleft" name="Pie Object Take"> <menu_item_call.on_click - function="Tools.BuyOrTake"/> - <menu_item_call.on_visible - function="Tools.VisibleTakeObject"/> + function="Object.Take"/> <menu_item_call.on_enable - function="Tools.EnableBuyOrTake"/> + function="Object.VisibleTake"/> </menu_item_call> <menu_item_call enabled="false" diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index d03a7e3d41..2515b60868 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -30,6 +30,9 @@ name="View Profile"> <menu_item_call.on_click function="Avatar.Profile" /> + <menu_item_call.on_enable + function="ParticipantList.EnableItem" + parameter="can_view_profile" /> </menu_item_call> <menu_item_call label="Add Friend" @@ -82,8 +85,21 @@ function="ParticipantList.EnableItem" parameter="can_pay" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator + layout="topleft" + name="View Icons Separator" /> + <menu_item_check + label="View People Icons" + name="View Icons"> + <on_click + function="ToggleControl" + parameter="ParticipantListShowIcons"/> + <on_check + function="CheckControl" + parameter="ParticipantListShowIcons" /> + </menu_item_check> + <menu_item_separator + layout="topleft" /> <menu_item_check label="Block Voice" layout="topleft" @@ -140,7 +156,7 @@ function="ParticipantList.ModerateVoice" parameter="selected" /> <on_enable - function="ParticipantList.EnableItem" + function="ParticipantList.EnableItem.Moderate" parameter="can_moderate_voice" /> </menu_item_call> <menu_item_call @@ -151,7 +167,7 @@ function="ParticipantList.ModerateVoice" parameter="others" /> <on_enable - function="ParticipantList.EnableItem" + function="ParticipantList.EnableItem.Moderate" parameter="can_moderate_voice" /> </menu_item_call> <menu_item_call @@ -162,7 +178,7 @@ function="ParticipantList.ModerateVoice" parameter="selected" /> <on_enable - function="ParticipantList.EnableItem" + function="ParticipantList.EnableItem.Moderate" parameter="can_moderate_voice" /> </menu_item_call> <menu_item_call @@ -173,7 +189,7 @@ function="ParticipantList.ModerateVoice" parameter="others" /> <on_enable - function="ParticipantList.EnableItem" + function="ParticipantList.EnableItem.Moderate" parameter="can_moderate_voice" /> </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml index f1117d1419..92752a0fee 100644 --- a/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_friends_view_sort.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false"> <menu_item_check label="Sort by Name" name="sort_name"> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups.xml b/indra/newview/skins/default/xui/en/menu_people_groups.xml index afa680139d..8f89d37dbb 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false" opaque="true" color="MenuDefaultBgColor"> <menu_item_call label="View Info" name="View Info"> diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index df3cb26b04..2efb204ffb 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false"> <menu_item_check label="Display Group Icons" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby.xml b/indra/newview/skins/default/xui/en/menu_people_nearby.xml index 014a52bb4f..d2e35e4cc0 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -88,5 +88,8 @@ name="teleport"> <menu_item_call.on_click function="Avatar.OfferTeleport"/> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_offer_teleport"/> </menu_item_call> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml index 39f9e48609..69b3831738 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby_view_sort.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false"> <menu_item_check label="Sort by Recent Speakers" name="sort_by_recent_speakers"> diff --git a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml index cfd6dc78b6..5c9555db92 100644 --- a/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_recent_view_sort.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <menu name="menu_group_plus" left="0" bottom="0" visible="false" - mouse_opaque="false" opaque="true" color="MenuDefaultBgColor" drop_shadow="false"> + mouse_opaque="false"> <menu_item_check label="Sort by Most Recent" name="sort_most"> diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml new file mode 100644 index 0000000000..a8778df7f6 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<toggleable_menu + height="201" + layout="topleft" + mouse_opaque="false" + name="save_outfit_menu" + width="120"> + <menu_item_call + name="save_outfit" + label="Save"> + <menu_item_call.on_click + function="Outfit.Save.Action" + userdata=""/> + </menu_item_call> + <menu_item_call + name="save_as_new_outfit" + label="Save As New"> + <menu_item_call.on_click + function="Outfit.SaveAsNew.Action" + userdata="" /> + </menu_item_call> +</toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/menu_script_chiclet.xml b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml new file mode 100644 index 0000000000..db29d9cebc --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_script_chiclet.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<menu + height="101" + layout="topleft" + left="100" + mouse_opaque="false" + name="ScriptChiclet Menu" + top="724" + visible="false" + width="128"> + <menu_item_call + label="Close" + layout="topleft" + name="Close"> + <menu_item_call.on_click + function="ScriptChiclet.Action" + parameter="end" /> + </menu_item_call> +</menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index a08bc16066..3af80f63fe 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2,16 +2,13 @@ <menu_bar bg_visible="false" follows="left|top|right" - layout="topleft" name="Main Menu"> <menu label="Me" - layout="topleft" name="Me" tear_off="true"> <menu_item_call label="Preferences" - layout="topleft" name="Preferences" shortcut="control|P"> <menu_item_call.on_click @@ -20,7 +17,6 @@ </menu_item_call> <menu_item_call label="My Dashboard" - layout="topleft" name="Manage My Account"> <menu_item_call.on_click function="PromptShowURL" @@ -29,16 +25,13 @@ </menu_item_call> <menu_item_call label="Buy L$" - layout="topleft" name="Buy and Sell L$"> <menu_item_call.on_click function="BuyCurrency" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="My Profile" - layout="topleft" name="Profile"> <menu_item_call.on_click function="ShowAgentProfile" @@ -46,7 +39,6 @@ </menu_item_call> <menu_item_call label="My Appearance" - layout="topleft" name="Appearance"> <menu_item_call.on_click function="CustomizeAvatar" /> @@ -56,7 +48,6 @@ <menu_item_check label="My Inventory" name="Inventory" - layout="topleft" shortcut="control|shift|I" visible="false"> <menu_item_check.on_check @@ -69,7 +60,6 @@ <menu_item_check label="My Inventory" name="ShowSidetrayInventory" - layout="topleft" shortcut="control|I" visible="true"> <menu_item_check.on_check @@ -81,7 +71,6 @@ </menu_item_check> <menu_item_check label="My Gestures" - layout="topleft" name="Gestures" shortcut="control|G"> <menu_item_check.on_check @@ -93,21 +82,17 @@ </menu_item_check> <menu label="My Status" - layout="topleft" name="Status" tear_off="true"> <menu_item_call label="Away" - layout="topleft" name="Set Away"> <menu_item_call.on_click function="World.SetAway" /> </menu_item_call> - <menu_item_separator - layout="topleft"/> + <menu_item_separator/> <menu_item_call label="Busy" - layout="topleft" name="Set Busy"> <menu_item_call.on_click function="World.SetBusy"/> @@ -115,7 +100,6 @@ </menu> <menu_item_call label="Request Admin Status" - layout="topleft" name="Request Admin Options" shortcut="control|alt|G" visible="false"> @@ -124,18 +108,15 @@ </menu_item_call> <menu_item_call label="Leave Admin Status" - layout="topleft" name="Leave Admin Options" shortcut="control|alt|shift|G" visible="false"> <menu_item_call.on_click function="Advanced.LeaveAdminStatus" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Quit [APP_NAME]" - layout="topleft" name="Quit" shortcut="control|Q"> <menu_item_call.on_click @@ -144,12 +125,10 @@ </menu> <menu label="Communicate" - layout="topleft" name="Communicate" tear_off="true"> <menu_item_call label="My Friends" - layout="topleft" name="My Friends" shortcut="control|shift|F"> <menu_item_call.on_click @@ -158,24 +137,21 @@ </menu_item_call> <menu_item_call label="My Groups" - layout="topleft" - name="My Groups"> + name="My Groups" + shortcut="control|shift|G"> <menu_item_call.on_click function="SideTray.PanelPeopleTab" parameter="groups_panel" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <!--menu_item_call label="Chat" - layout="topleft" name="Chat"> <menu_item_call.on_click function="World.Chat" /> </menu_item_call--> <menu_item_check label="Nearby Chat" - layout="topleft" name="Nearby Chat" shortcut="control|H" use_mac_ctrl="true"> @@ -188,7 +164,6 @@ </menu_item_check> <menu_item_call label="Nearby People" - layout="topleft" name="Active Speakers" shortcut="control|shift|A"> <menu_item_call.on_click @@ -198,12 +173,10 @@ </menu> <menu label="World" - layout="topleft" name="World" tear_off="true"> <menu_item_check label="Mini-Map" - layout="topleft" name="Mini-Map" shortcut="control|shift|M"> <menu_item_check.on_check @@ -215,7 +188,6 @@ </menu_item_check> <menu_item_check label="World Map" - layout="topleft" name="World Map" shortcut="control|M" use_mac_ctrl="true"> @@ -228,7 +200,6 @@ </menu_item_check> <menu_item_call label="Snapshot" - layout="topleft" name="Take Snapshot" shortcut="control|shift|S"> <menu_item_call.on_click @@ -237,7 +208,6 @@ </menu_item_call> <menu_item_call label="Landmark This Place" - layout="topleft" name="Create Landmark Here"> <menu_item_call.on_click function="World.CreateLandmark" /> @@ -247,12 +217,17 @@ <menu create_jump_keys="true" label="Place Profile" - layout="topleft" name="Land" tear_off="true"> <menu_item_call - label="About Land" + label="Place Profile" layout="topleft" + name="Place Profile"> + <menu_item_call.on_click + function="World.PlaceProfile" /> + </menu_item_call> + <menu_item_call + label="About Land" name="About Land"> <menu_item_call.on_click function="Floater.Show" @@ -260,18 +235,15 @@ </menu_item_call> <menu_item_call label="Region/Estate" - layout="topleft" name="Region/Estate"> <menu_item_call.on_click function="Floater.Show" parameter="region_info" /> </menu_item_call> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Buy This Land" - layout="topleft" name="Buy Land"> <menu_item_call.on_click function="Land.Buy" /> @@ -280,7 +252,6 @@ </menu_item_call> <menu_item_call label="My Land" - layout="topleft" name="My Land"> <menu_item_call.on_click function="Floater.Show" @@ -289,12 +260,10 @@ <menu create_jump_keys="true" label="Show" - layout="topleft" name="LandShow" tear_off="true"> <menu_item_check label="Move Controls" - layout="topleft" name="Movement Controls"> <menu_item_check.on_check function="Floater.Visible" @@ -304,7 +273,6 @@ </menu_item_check> <menu_item_check label="View Controls" - layout="topleft" name="Camera Controls"> <menu_item_check.on_check function="Floater.Visible" @@ -314,7 +282,6 @@ </menu_item_check> <menu_item_check label="Ban Lines" - layout="topleft" name="Ban Lines"> <menu_item_check.on_check control="ShowBanLines" /> @@ -324,7 +291,6 @@ </menu_item_check> <menu_item_check label="Beacons" - layout="topleft" name="beacons" shortcut="control|alt|shift|N"> <menu_item_check.on_check @@ -336,7 +302,6 @@ </menu_item_check> <menu_item_check label="Property Lines" - layout="topleft" name="Property Lines" shortcut="control|alt|shift|P"> <menu_item_check.on_check @@ -347,7 +312,6 @@ </menu_item_check> <menu_item_check label="Land Owners" - layout="topleft" name="Land Owners"> <menu_item_check.on_check control="ShowParcelOwners" /> @@ -374,11 +338,9 @@ control="NavBarShowParcelProperties" /> </menu_item_check> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Teleport Home" - layout="topleft" name="Teleport Home" shortcut="control|shift|H"> <menu_item_call.on_click @@ -388,7 +350,6 @@ </menu_item_call> <menu_item_call label="Set Home to Here" - layout="topleft" name="Set Home to Here"> <menu_item_call.on_click function="World.SetHomeLocation" /> @@ -397,7 +358,6 @@ </menu_item_call> <!-- <menu_item_check label="Show Navigation Bar" - layout="topleft" name="ShowNavbarNavigationPanel"> <menu_item_check.on_click function="ToggleControl" @@ -408,7 +368,6 @@ </menu_item_check> <menu_item_check label="Show Favorites Bar" - layout="topleft" name="ShowNavbarFavoritesPanel"> <menu_item_check.on_click function="ToggleControl" @@ -417,19 +376,15 @@ function="CheckControl" parameter="ShowNavbarFavoritesPanel" /> </menu_item_check> - <menu_item_separator - layout="topleft" />--> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/>--> + <menu_item_separator/> <menu create_jump_keys="true" label="Sun" - layout="topleft" name="Environment Settings" tear_off="true"> <menu_item_call label="Sunrise" - layout="topleft" name="Sunrise"> <menu_item_call.on_click function="World.EnvSettings" @@ -437,7 +392,6 @@ </menu_item_call> <menu_item_call label="Midday" - layout="topleft" name="Noon" shortcut="control|shift|Y"> <menu_item_call.on_click @@ -446,7 +400,6 @@ </menu_item_call> <menu_item_call label="Sunset" - layout="topleft" name="Sunset" shortcut="control|shift|N"> <menu_item_call.on_click @@ -455,7 +408,6 @@ </menu_item_call> <menu_item_call label="Midnight" - layout="topleft" name="Midnight"> <menu_item_call.on_click function="World.EnvSettings" @@ -463,17 +415,14 @@ </menu_item_call> <menu_item_call label="Estate Time" - layout="topleft" name="Revert to Region Default"> <menu_item_call.on_click function="World.EnvSettings" parameter="default" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Environment Editor" - layout="topleft" name="Environment Editor"> <menu_item_call.on_click function="World.EnvSettings" @@ -484,13 +433,11 @@ <menu create_jump_keys="true" label="Build" - layout="topleft" name="BuildTools" tear_off="true" visible="true"> <menu_item_check label="Build" - layout="topleft" name="Show Build Tools" shortcut="control|B"> <menu_item_check.on_check @@ -503,12 +450,10 @@ <menu create_jump_keys="true" label="Select Build Tool" - layout="topleft" name="Select Tool" tear_off="true"> <menu_item_call label="Focus Tool" - layout="topleft" name="Focus" shortcut="control|1"> <menu_item_call.on_click @@ -517,7 +462,6 @@ </menu_item_call> <menu_item_call label="Move Tool" - layout="topleft" name="Move" shortcut="control|2"> <menu_item_call.on_click @@ -526,7 +470,6 @@ </menu_item_call> <menu_item_call label="Edit Tool" - layout="topleft" name="Edit" shortcut="control|3"> <menu_item_call.on_click @@ -535,7 +478,6 @@ </menu_item_call> <menu_item_call label="Create Tool" - layout="topleft" name="Create" shortcut="control|4"> <menu_item_call.on_click @@ -544,7 +486,6 @@ </menu_item_call> <menu_item_call label="Land Tool" - layout="topleft" name="Land" shortcut="control|5"> <menu_item_call.on_click @@ -552,112 +493,8 @@ parameter="land" /> </menu_item_call> </menu> - <menu - create_jump_keys="true" - label="Edit" - layout="topleft" - name="Edit" - tear_off="true"> - <menu_item_call - label="Undo" - layout="topleft" - name="Undo" - shortcut="control|Z"> - <menu_item_call.on_click - function="Edit.Undo" /> - <menu_item_call.on_enable - function="Edit.EnableUndo" /> - </menu_item_call> - <menu_item_call - label="Redo" - layout="topleft" - name="Redo" - shortcut="control|Y"> - <menu_item_call.on_click - function="Edit.Redo" /> - <menu_item_call.on_enable - function="Edit.EnableRedo" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Cut" - layout="topleft" - name="Cut" - shortcut="control|X"> - <menu_item_call.on_click - function="Edit.Cut" /> - <menu_item_call.on_enable - function="Edit.EnableCut" /> - </menu_item_call> - <menu_item_call - label="Copy" - layout="topleft" - name="Copy" - shortcut="control|C"> - <menu_item_call.on_click - function="Edit.Copy" /> - <menu_item_call.on_enable - function="Edit.EnableCopy" /> - </menu_item_call> - <menu_item_call - label="Paste" - layout="topleft" - name="Paste" - shortcut="control|V"> - <menu_item_call.on_click - function="Edit.Paste" /> - <menu_item_call.on_enable - function="Edit.EnablePaste" /> - </menu_item_call> - <menu_item_call - label="Delete" - layout="topleft" - name="Delete" - shortcut="Del"> - <menu_item_call.on_click - function="Edit.Delete" /> - <menu_item_call.on_enable - function="Edit.EnableDelete" /> - </menu_item_call> - <menu_item_call - label="Duplicate" - layout="topleft" - name="Duplicate" - shortcut="control|D"> - <menu_item_call.on_click - function="Edit.Duplicate" /> - <menu_item_call.on_enable - function="Edit.EnableDuplicate" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="Select All" - layout="topleft" - name="Select All" - shortcut="control|A"> - <menu_item_call.on_click - function="Edit.SelectAll" /> - <menu_item_call.on_enable - function="Edit.EnableSelectAll" /> - </menu_item_call> - <menu_item_call - label="Deselect" - layout="topleft" - name="Deselect" - shortcut="control|E"> - <menu_item_call.on_click - function="Edit.Deselect" /> - <menu_item_call.on_enable - function="Edit.EnableDeselect" /> - </menu_item_call> - </menu> - <menu_item_separator - layout="topleft" /> <menu_item_call label="Link" - layout="topleft" name="Link" shortcut="control|L"> <menu_item_call.on_click @@ -667,7 +504,6 @@ </menu_item_call> <menu_item_call label="Unlink" - layout="topleft" name="Unlink" shortcut="control|shift|L"> <menu_item_call.on_click @@ -677,7 +513,6 @@ </menu_item_call> <menu_item_check label="Edit Linked Parts" - layout="topleft" name="Edit Linked Parts"> <menu_item_check.on_check control="EditLinkedParts" /> @@ -687,11 +522,9 @@ <menu_item_check.on_enable function="Tools.EnableToolNotPie" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Focus on Selection" - layout="topleft" name="Focus on Selection" shortcut="H"> <menu_item_call.on_click @@ -702,7 +535,6 @@ </menu_item_call> <menu_item_call label="Zoom to Selection" - layout="topleft" name="Zoom to Selection" shortcut="shift|H"> <menu_item_call.on_click @@ -711,17 +543,14 @@ <menu_item_call.on_enable function="Tools.SomethingSelectedNoHUD" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu create_jump_keys="true" label="Object" - layout="topleft" name="Object" tear_off="true"> <menu_item_call label="Buy" - layout="topleft" name="Menu Object Buy"> <menu_item_call.on_click function="Tools.BuyOrTake"/> @@ -732,7 +561,6 @@ </menu_item_call> <menu_item_call label="Take" - layout="topleft" name="Menu Object Take"> <menu_item_call.on_click function="Tools.BuyOrTake"/> @@ -743,7 +571,6 @@ </menu_item_call> <menu_item_call label="Take Copy" - layout="topleft" name="Take Copy"> <menu_item_call.on_click function="Tools.TakeCopy" /> @@ -752,7 +579,6 @@ </menu_item_call> <menu_item_call label="Save Back to My Inventory" - layout="topleft" name="Save Object Back to My Inventory"> <menu_item_call.on_click function="Tools.SaveToInventory" /> @@ -761,7 +587,6 @@ </menu_item_call> <menu_item_call label="Save Back to Object Contents" - layout="topleft" name="Save Object Back to Object Contents"> <menu_item_call.on_click function="Tools.SaveToObjectInventory" /> @@ -772,12 +597,10 @@ <menu create_jump_keys="true" label="Scripts" - layout="topleft" name="Scripts" tear_off="true"> <menu_item_call label="Recompile Scripts (Mono)" - layout="topleft" name="Mono"> <menu_item_call.on_click function="Tools.SelectedScriptAction" @@ -787,7 +610,6 @@ </menu_item_call> <menu_item_call label="Recompile Scripts (LSL)" - layout="topleft" name="LSL"> <menu_item_call.on_click function="Tools.SelectedScriptAction" @@ -797,7 +619,6 @@ </menu_item_call> <menu_item_call label="Reset Scripts" - layout="topleft" name="Reset Scripts"> <menu_item_call.on_click function="Tools.SelectedScriptAction" @@ -807,7 +628,6 @@ </menu_item_call> <menu_item_call label="Set Scripts to Running" - layout="topleft" name="Set Scripts to Running"> <menu_item_call.on_click function="Tools.SelectedScriptAction" @@ -817,7 +637,6 @@ </menu_item_call> <menu_item_call label="Set Scripts to Not Running" - layout="topleft" name="Set Scripts to Not Running"> <menu_item_call.on_click function="Tools.SelectedScriptAction" @@ -826,17 +645,14 @@ function="EditableSelected" /> </menu_item_call> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu create_jump_keys="true" label="Options" - layout="topleft" name="Options" tear_off="true"> <menu_item_call label="Set Default Upload Permissions" - layout="topleft" name="perm prefs"> <menu_item_call.on_click function="Floater.Toggle" @@ -844,7 +660,6 @@ </menu_item_call> <menu_item_check label="Show Advanced Permissions" - layout="topleft" name="DebugPermissions"> <menu_item_check.on_check function="CheckControl" @@ -853,11 +668,9 @@ function="ToggleControl" parameter="DebugPermissions" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Select Only My Objects" - layout="topleft" name="Select Only My Objects"> <menu_item_check.on_check control="SelectOwnedOnly" /> @@ -867,7 +680,6 @@ </menu_item_check> <menu_item_check label="Select Only Movable Objects" - layout="topleft" name="Select Only Movable Objects"> <menu_item_check.on_check control="SelectMovableOnly" /> @@ -877,18 +689,15 @@ </menu_item_check> <menu_item_check label="Select By Surrounding" - layout="topleft" name="Select By Surrounding"> <menu_item_check.on_check control="RectangleSelectInclusive" /> <menu_item_check.on_click function="Tools.SelectBySurrounding" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Show Hidden Selection" - layout="topleft" name="Show Hidden Selection"> <menu_item_check.on_check control="RenderHiddenSelections" /> @@ -897,7 +706,6 @@ </menu_item_check> <menu_item_check label="Show Light Radius for Selection" - layout="topleft" name="Show Light Radius for Selection"> <menu_item_check.on_check control="RenderLightRadius" /> @@ -906,7 +714,6 @@ </menu_item_check> <menu_item_check label="Show Selection Beam" - layout="topleft" name="Show Selection Beam"> <menu_item_check.on_check control="ShowSelectionBeam" /> @@ -914,11 +721,9 @@ function="ToggleControl" parameter="ShowSelectionBeam" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Snap to Grid" - layout="topleft" name="Snap to Grid" shortcut="G"> <menu_item_check.on_check @@ -931,7 +736,6 @@ </menu_item_check> <menu_item_call label="Snap Object XY to Grid" - layout="topleft" name="Snap Object XY to Grid" shortcut="shift|X"> <menu_item_call.on_click @@ -941,7 +745,6 @@ </menu_item_call> <menu_item_call label="Use Selection for Grid" - layout="topleft" name="Use Selection for Grid" shortcut="shift|G"> <menu_item_call.on_click @@ -951,7 +754,6 @@ </menu_item_call> <menu_item_call label="Grid Options" - layout="topleft" name="Grid Options" shortcut="control|shift|B"> <menu_item_call.on_click @@ -964,12 +766,10 @@ <menu create_jump_keys="true" label="Select Linked Parts" - layout="topleft" name="Select Linked Parts" tear_off="true"> <menu_item_call label="Select Next Part" - layout="topleft" name="Select Next Part" shortcut="control|."> <menu_item_call.on_click @@ -980,7 +780,6 @@ </menu_item_call> <menu_item_call label="Select Previous Part" - layout="topleft" name="Select Previous Part" shortcut="control|,"> <menu_item_call.on_click @@ -991,7 +790,6 @@ </menu_item_call> <menu_item_call label="Include Next Part" - layout="topleft" name="Include Next Part" shortcut="control|shift|."> <menu_item_call.on_click @@ -1002,7 +800,6 @@ </menu_item_call> <menu_item_call label="Include Previous Part" - layout="topleft" name="Include Previous Part" shortcut="control|shift|,"> <menu_item_call.on_click @@ -1015,48 +812,40 @@ </menu> <menu label="Help" - layout="topleft" name="Help" tear_off="true"> <menu_item_call label="[SECOND_LIFE] Help" - layout="topleft" name="Second Life Help" shortcut="F1"> <menu_item_call.on_click function="ShowHelp" parameter="f1_help" /> </menu_item_call> - <!-- <menu_item_call +<!-- <menu_item_call label="Tutorial" - layout="topleft" name="Tutorial"> <menu_item_call.on_click function="Floater.Show" parameter="hud" /> </menu_item_call>--> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Report Abuse" - layout="topleft" name="Report Abuse"> <menu_item_call.on_click function="ReportAbuse" /> </menu_item_call> <menu_item_call label="Report Bug" - layout="topleft" name="Report Bug"> <menu_item_call.on_click function="ShowHelp" parameter="report_bug" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="About [APP_NAME]" - layout="topleft" name="About Second Life"> <menu_item_call.on_click function="Floater.Show" @@ -1065,20 +854,28 @@ </menu> <menu label="Advanced" - layout="topleft" name="Advanced" tear_off="true" visible="false"> + <menu_item_check + label="Show Advanced Menu" + name="Show Advanced Menu" + shortcut="control|alt|D"> + <on_check + function="CheckControl" + parameter="UseDebugMenus" /> + <on_click + function="ToggleControl" + parameter="UseDebugMenus" /> + </menu_item_check> <menu_item_call label="Stop Animating Me" - layout="topleft" name="Stop Animating My Avatar"> <menu_item_call.on_click function="Tools.StopAllAnimations" /> </menu_item_call> <menu_item_call label="Rebake Textures" - layout="topleft" name="Rebake Texture" shortcut="control|alt|R"> <menu_item_call.on_click @@ -1086,7 +883,6 @@ </menu_item_call> <menu_item_call label="Set UI Size to Default" - layout="topleft" name="Set UI Size to Default"> <menu_item_call.on_click function="View.DefaultUISize" /> @@ -1101,7 +897,6 @@ <menu_item_separator/> <menu_item_check label="Limit Select Distance" - layout="topleft" name="Limit Select Distance"> <menu_item_check.on_check function="CheckControl" @@ -1112,7 +907,6 @@ </menu_item_check> <menu_item_check label="Disable Camera Constraints" - layout="topleft" name="Disable Camera Distance"> <menu_item_check.on_check function="CheckControl" @@ -1121,11 +915,9 @@ function="ToggleControl" parameter="DisableCameraConstraints" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="High-res Snapshot" - layout="topleft" name="HighResSnapshot"> <menu_item_check.on_check function="CheckControl" @@ -1136,7 +928,6 @@ </menu_item_check> <menu_item_check label="Quiet Snapshots to Disk" - layout="topleft" name="QuietSnapshotsToDisk"> <menu_item_check.on_check function="CheckControl" @@ -1147,7 +938,6 @@ </menu_item_check> <menu_item_check label="Compress Snapshots to Disk" - layout="topleft" name="CompressSnapshotsToDisk"> <menu_item_check.on_check function="CheckControl" @@ -1156,17 +946,14 @@ function="ToggleControl" parameter="CompressSnapshotsToDisk" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu create_jump_keys="true" label="Performance Tools" - layout="topleft" name="Performance Tools" tear_off="true"> <menu_item_call label="Lag Meter" - layout="topleft" name="Lag Meter"> <menu_item_call.on_click function="Floater.Show" @@ -1174,7 +961,6 @@ </menu_item_call> <menu_item_check label="Statistics Bar" - layout="topleft" name="Statistics Bar" shortcut="control|shift|1"> <menu_item_check.on_check @@ -1186,7 +972,6 @@ </menu_item_check> <menu_item_check label="Show Avatar Rendering Cost" - layout="topleft" name="Avatar Rendering Cost"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -1199,12 +984,10 @@ <menu create_jump_keys="true" label="Highlighting and Visibility" - layout="topleft" name="Highlighting and Visibility" tear_off="true"> <menu_item_check label="Cheesy Beacon" - layout="topleft" name="Cheesy Beacon"> <menu_item_check.on_check function="CheckControl" @@ -1215,7 +998,6 @@ </menu_item_check> <menu_item_check label="Hide Particles" - layout="topleft" name="Hide Particles" shortcut="control|alt|shift|="> <menu_item_check.on_check @@ -1227,7 +1009,6 @@ </menu_item_check> <menu_item_check label="Hide Selected" - layout="topleft" name="Hide Selected"> <menu_item_check.on_check function="CheckControl" @@ -1238,7 +1019,6 @@ </menu_item_check> <menu_item_check label="Highlight Transparent" - layout="topleft" name="Highlight Transparent" shortcut="control|alt|T"> <menu_item_check.on_check @@ -1248,7 +1028,6 @@ </menu_item_check> <menu_item_check label="Show HUD Attachments" - layout="topleft" name="Show HUD Attachments" shortcut="alt|shift|H"> <menu_item_check.on_check @@ -1258,7 +1037,6 @@ </menu_item_check> <menu_item_check label="Show Mouselook Crosshairs" - layout="topleft" name="ShowCrosshairs"> <menu_item_check.on_check function="CheckControl" @@ -1270,12 +1048,10 @@ <!-- <menu create_jump_keys="true" label="Hover Tips" - layout="topleft" name="Hover Tips" tear_off="true"> <menu_item_check label="Show Tips" - layout="topleft" name="Show Tips" shortcut="control|shift|T"> <menu_item_check.on_check @@ -1283,11 +1059,9 @@ <menu_item_check.on_click function="View.ShowHoverTips" /> </menu_item_check> - <menu_item_separator - layout="topleft" />--> + <menu_item_separator/> <menu_item_check label="Show Land Tooltips" - layout="topleft" name="Land Tips"> <menu_item_check.on_check control="ShowLandHoverTip" /> @@ -1297,9 +1071,8 @@ <menu_item_check.on_enable function="View.CheckShowHoverTips" /> </menu_item_check> - <!-- <menu_item_check + <menu_item_check label="Show Tips On All Objects" - layout="topleft" name="Tips On All Objects"> <menu_item_check.on_check control="ShowAllObjectHoverTip" /> @@ -1316,12 +1089,10 @@ <menu create_jump_keys="true" label="Rendering Types" - layout="topleft" name="Rendering Types" tear_off="true"> <menu_item_check label="Simple" - layout="topleft" name="Simple" shortcut="control|alt|shift|1"> <menu_item_check.on_check @@ -1333,7 +1104,6 @@ </menu_item_check> <menu_item_check label="Alpha" - layout="topleft" name="Alpha" shortcut="control|alt|shift|2"> <menu_item_check.on_check @@ -1345,7 +1115,6 @@ </menu_item_check> <menu_item_check label="Tree" - layout="topleft" name="Tree" shortcut="control|alt|shift|3"> <menu_item_check.on_check @@ -1357,7 +1126,6 @@ </menu_item_check> <menu_item_check label="Avatars" - layout="topleft" name="Character" shortcut="control|alt|shift|4"> <menu_item_check.on_check @@ -1369,7 +1137,6 @@ </menu_item_check> <menu_item_check label="SurfacePath" - layout="topleft" name="SurfacePath" shortcut="control|alt|shift|5"> <menu_item_check.on_check @@ -1381,7 +1148,6 @@ </menu_item_check> <menu_item_check label="Sky" - layout="topleft" name="Sky" shortcut="control|alt|shift|6"> <menu_item_check.on_check @@ -1393,7 +1159,6 @@ </menu_item_check> <menu_item_check label="Water" - layout="topleft" name="Water" shortcut="control|alt|shift|7"> <menu_item_check.on_check @@ -1405,7 +1170,6 @@ </menu_item_check> <menu_item_check label="Ground" - layout="topleft" name="Ground" shortcut="control|alt|shift|8"> <menu_item_check.on_check @@ -1417,7 +1181,6 @@ </menu_item_check> <menu_item_check label="Volume" - layout="topleft" name="Volume" shortcut="control|alt|shift|9"> <menu_item_check.on_check @@ -1429,7 +1192,6 @@ </menu_item_check> <menu_item_check label="Grass" - layout="topleft" name="Grass" shortcut="control|alt|shift|0"> <menu_item_check.on_check @@ -1441,7 +1203,6 @@ </menu_item_check> <menu_item_check label="Clouds" - layout="topleft" name="Clouds" shortcut="control|alt|shift|-"> <menu_item_check.on_check @@ -1453,7 +1214,6 @@ </menu_item_check> <menu_item_check label="Particles" - layout="topleft" name="Particles" shortcut="control|alt|shift|="> <menu_item_check.on_check @@ -1465,7 +1225,6 @@ </menu_item_check> <menu_item_check label="Bump" - layout="topleft" name="Bump" shortcut="control|alt|shift|\"> <menu_item_check.on_check @@ -1479,12 +1238,10 @@ <menu create_jump_keys="true" label="Rendering Features" - layout="topleft" name="Rendering Features" tear_off="true"> <menu_item_check label="UI" - layout="topleft" name="UI" shortcut="control|alt|F1"> <menu_item_check.on_check @@ -1496,7 +1253,6 @@ </menu_item_check> <menu_item_check label="Selected" - layout="topleft" name="Selected" shortcut="control|alt|F2"> <menu_item_check.on_check @@ -1508,7 +1264,6 @@ </menu_item_check> <menu_item_check label="Highlighted" - layout="topleft" name="Highlighted" shortcut="control|alt|F3"> <menu_item_check.on_check @@ -1520,7 +1275,6 @@ </menu_item_check> <menu_item_check label="Dynamic Textures" - layout="topleft" name="Dynamic Textures" shortcut="control|alt|F4"> <menu_item_check.on_check @@ -1532,7 +1286,6 @@ </menu_item_check> <menu_item_check label="Foot Shadows" - layout="topleft" name="Foot Shadows" shortcut="control|alt|F5"> <menu_item_check.on_check @@ -1544,7 +1297,6 @@ </menu_item_check> <menu_item_check label="Fog" - layout="topleft" name="Fog" shortcut="control|alt|F6"> <menu_item_check.on_check @@ -1556,7 +1308,6 @@ </menu_item_check> <menu_item_check label="Test FRInfo" - layout="topleft" name="Test FRInfo" shortcut="control|alt|F8"> <menu_item_check.on_check @@ -1568,7 +1319,6 @@ </menu_item_check> <menu_item_check label="Flexible Objects" - layout="topleft" name="Flexible Objects" shortcut="control|alt|F9"> <menu_item_check.on_check @@ -1581,7 +1331,6 @@ </menu> <menu_item_check label="Run Multiple Threads" - layout="topleft" name="Run Multiple Threads"> <menu_item_check.on_check function="CheckControl" @@ -1592,7 +1341,6 @@ </menu_item_check> <menu_item_call label="Clear Group Cache" - layout="topleft" name="ClearGroupCache"> <menu_item_call.on_click function="Advanced.ClearGroupCache" @@ -1600,7 +1348,6 @@ </menu_item_call> <menu_item_check label="Mouse Smoothing" - layout="topleft" name="Mouse Smoothing"> <menu_item_check.on_check function="CheckControl" @@ -1609,17 +1356,14 @@ function="ToggleControl" parameter="MouseSmooth" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu label="Shortcuts" - layout="topleft" name="Shortcuts" tear_off="true" visible="false"> <menu_item_call label="Image (L$[COST])..." - layout="topleft" name="Upload Image" shortcut="control|U"> <menu_item_call.on_click @@ -1630,7 +1374,6 @@ </menu_item_call> <menu_item_check label="Search" - layout="topleft" name="Search" shortcut="control|F"> <menu_item_check.on_check @@ -1643,7 +1386,6 @@ <menu_item_call enabled="false" label="Release Keys" - layout="topleft" name="Release Keys"> <menu_item_call.on_click function="Tools.ReleaseKeys" @@ -1654,16 +1396,13 @@ </menu_item_call> <menu_item_call label="Set UI Size to Default" - layout="topleft" name="Set UI Size to Default"> <menu_item_call.on_click function="View.DefaultUISize" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Always Run" - layout="topleft" name="Always Run" shortcut="control|R"> <menu_item_check.on_check @@ -1673,7 +1412,6 @@ </menu_item_check> <menu_item_check label="Fly" - layout="topleft" name="Fly" shortcut="Home"> <menu_item_check.on_check @@ -1683,11 +1421,9 @@ <menu_item_check.on_enable function="Agent.enableFlying" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Close Window" - layout="topleft" name="Close Window" shortcut="control|W"> <menu_item_call.on_click @@ -1697,7 +1433,6 @@ </menu_item_call> <menu_item_call label="Close All Windows" - layout="topleft" name="Close All Windows" shortcut="control|shift|W"> <menu_item_call.on_click @@ -1705,22 +1440,18 @@ <menu_item_call.on_enable function="File.EnableCloseAllWindows" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Snapshot to Disk" - layout="topleft" name="Snapshot to Disk" shortcut="control|`" use_mac_ctrl="true"> <menu_item_call.on_click function="File.TakeSnapshotToDisk" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Mouselook" - layout="topleft" name="Mouselook" shortcut="M"> <menu_item_call.on_click @@ -1730,7 +1461,6 @@ </menu_item_call> <menu_item_check label="Joystick Flycam" - layout="topleft" name="Joystick Flycam" shortcut="alt|shift|F"> <menu_item_check.on_check @@ -1742,7 +1472,6 @@ </menu_item_check> <menu_item_call label="Reset View" - layout="topleft" name="Reset View" shortcut="Esc"> <menu_item_call.on_click @@ -1750,7 +1479,6 @@ </menu_item_call> <menu_item_call label="Look at Last Chatter" - layout="topleft" name="Look at Last Chatter" shortcut="control|\"> <menu_item_call.on_click @@ -1758,17 +1486,14 @@ <menu_item_call.on_enable function="View.EnableLastChatter" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu create_jump_keys="true" label="Select Build Tool" - layout="topleft" name="Select Tool" tear_off="true"> <menu_item_call label="Focus Tool" - layout="topleft" name="Focus" shortcut="control|1"> <menu_item_call.on_click @@ -1777,7 +1502,6 @@ </menu_item_call> <menu_item_call label="Move Tool" - layout="topleft" name="Move" shortcut="control|2"> <menu_item_call.on_click @@ -1786,7 +1510,6 @@ </menu_item_call> <menu_item_call label="Edit Tool" - layout="topleft" name="Edit" shortcut="control|3"> <menu_item_call.on_click @@ -1795,7 +1518,6 @@ </menu_item_call> <menu_item_call label="Create Tool" - layout="topleft" name="Create" shortcut="control|4"> <menu_item_call.on_click @@ -1804,7 +1526,6 @@ </menu_item_call> <menu_item_call label="Land Tool" - layout="topleft" name="Land" shortcut="control|5"> <menu_item_call.on_click @@ -1812,11 +1533,9 @@ parameter="land" /> </menu_item_call> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Zoom In" - layout="topleft" name="Zoom In" shortcut="control|0"> <menu_item_call.on_click @@ -1824,7 +1543,6 @@ </menu_item_call> <menu_item_call label="Zoom Default" - layout="topleft" name="Zoom Default" shortcut="control|9"> <menu_item_call.on_click @@ -1832,17 +1550,14 @@ </menu_item_call> <menu_item_call label="Zoom Out" - layout="topleft" name="Zoom Out" shortcut="control|8"> <menu_item_call.on_click function="View.ZoomOut" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Toggle Fullscreen" - layout="topleft" name="Toggle Fullscreen" > <!-- Note: shortcut="alt|Enter" was deleted from the preceding node--> @@ -1850,11 +1565,9 @@ function="View.Fullscreen" /> </menu_item_call> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Show Debug Settings" - layout="topleft" name="Debug Settings"> <menu_item_call.on_click function="Advanced.ShowDebugSettings" @@ -1862,7 +1575,6 @@ </menu_item_call> <menu_item_check label="Show Develop Menu" - layout="topleft" name="Debug Mode" shortcut="control|alt|Q"> <menu_item_check.on_check @@ -1872,23 +1584,21 @@ function="ToggleControl" parameter="QAMode" /> </menu_item_check> + </menu> <menu create_jump_keys="true" label="Develop" - layout="topleft" name="Develop" tear_off="true" visible="false"> <menu create_jump_keys="true" label="Consoles" - layout="topleft" name="Consoles" tear_off="true"> <menu_item_check label="Texture Console" - layout="topleft" name="Texture Console" shortcut="control|shift|3" use_mac_ctrl="true"> @@ -1901,7 +1611,6 @@ </menu_item_check> <menu_item_check label="Debug Console" - layout="topleft" name="Debug Console" shortcut="control|shift|4" use_mac_ctrl="true"> @@ -1914,7 +1623,6 @@ </menu_item_check> <menu_item_call label="Notifications Console" - layout="topleft" name="Notifications" shortcut="control|shift|5"> <menu_item_call.on_click @@ -1923,7 +1631,6 @@ </menu_item_call> <menu_item_check label="Texture Size Console" - layout="topleft" name="Texture Size" shortcut="control|shift|6"> <menu_item_check.on_check @@ -1935,7 +1642,6 @@ </menu_item_check> <menu_item_check label="Texture Category Console" - layout="topleft" name="Texture Category" shortcut="control|shift|7"> <menu_item_check.on_check @@ -1947,7 +1653,6 @@ </menu_item_check> <menu_item_check label="Fast Timers" - layout="topleft" name="Fast Timers" shortcut="control|shift|9" use_mac_ctrl="true"> @@ -1960,7 +1665,6 @@ </menu_item_check> <menu_item_check label="Memory" - layout="topleft" name="Memory" shortcut="control|shift|0" use_mac_ctrl="true"> @@ -1971,11 +1675,9 @@ function="Advanced.ToggleConsole" parameter="memory view" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Region Info to Debug Console" - layout="topleft" name="Region Info to Debug Console"> <menu_item_call.on_click function="Advanced.DumpInfoToConsole" @@ -1983,7 +1685,6 @@ </menu_item_call> <menu_item_call label="Group Info to Debug Console" - layout="topleft" name="Group Info to Debug Console"> <menu_item_call.on_click function="Advanced.DumpInfoToConsole" @@ -1991,17 +1692,14 @@ </menu_item_call> <menu_item_call label="Capabilities Info to Debug Console" - layout="topleft" name="Capabilities Info to Debug Console"> <menu_item_call.on_click function="Advanced.DumpInfoToConsole" parameter="capabilities" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Camera" - layout="topleft" name="Camera"> <menu_item_check.on_check function="Advanced.CheckHUDInfo" @@ -2012,7 +1710,6 @@ </menu_item_check> <menu_item_check label="Wind" - layout="topleft" name="Wind"> <menu_item_check.on_check function="Advanced.CheckHUDInfo" @@ -2023,7 +1720,6 @@ </menu_item_check> <menu_item_check label="FOV" - layout="topleft" name="FOV"> <menu_item_check.on_check function="Advanced.CheckHUDInfo" @@ -2034,7 +1730,6 @@ </menu_item_check> <menu_item_check label="Badge" - layout="topleft" name="Badge" shortcut="alt|control|shift|h"> <menu_item_check.on_check @@ -2048,12 +1743,10 @@ <menu create_jump_keys="true" label="Show Info" - layout="topleft" name="Display Info" tear_off="true"> <menu_item_check label="Show Time" - layout="topleft" name="Show Time"> <menu_item_check.on_check function="CheckControl" @@ -2064,7 +1757,6 @@ </menu_item_check> <menu_item_check label="Show Render Info" - layout="topleft" name="Show Render Info"> <menu_item_check.on_check function="CheckControl" @@ -2075,7 +1767,6 @@ </menu_item_check> <menu_item_check label="Show Matrices" - layout="topleft" name="Show Matrices"> <menu_item_check.on_check function="CheckControl" @@ -2086,7 +1777,6 @@ </menu_item_check> <menu_item_check label="Show Color Under Cursor" - layout="topleft" name="Show Color Under Cursor"> <menu_item_check.on_check function="CheckControl" @@ -2095,11 +1785,9 @@ function="ToggleControl" parameter="DebugShowColor" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Show Updates to Objects" - layout="topleft" name="Show Updates" shortcut="control|alt|shift|U"> <menu_item_check.on_check @@ -2109,17 +1797,14 @@ function="Advanced.ToggleShowObjectUpdates" /> </menu_item_check> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu create_jump_keys="true" label="Force an Error" - layout="topleft" name="Force Errors" tear_off="true"> <menu_item_call label="Force Breakpoint" - layout="topleft" name="Force Breakpoint" shortcut="control|alt|shift|B"> <menu_item_call.on_click @@ -2127,49 +1812,42 @@ </menu_item_call> <menu_item_call label="Force LLError And Crash" - layout="topleft" name="Force LLError And Crash"> <menu_item_call.on_click function="Advanced.ForceErrorLlerror" /> </menu_item_call> <menu_item_call label="Force Bad Memory Access" - layout="topleft" name="Force Bad Memory Access"> <menu_item_call.on_click function="Advanced.ForceErrorBadMemoryAccess" /> </menu_item_call> <menu_item_call label="Force Infinite Loop" - layout="topleft" name="Force Infinite Loop"> <menu_item_call.on_click function="Advanced.ForceErrorInfiniteLoop" /> </menu_item_call> <menu_item_call label="Force Driver Crash" - layout="topleft" name="Force Driver Carsh"> <menu_item_call.on_click function="Advanced.ForceErrorDriverCrash" /> </menu_item_call> <menu_item_call label="Force Software Exception" - layout="topleft" name="Force Software Exception"> <menu_item_call.on_click function="Advanced.ForceErrorSoftwareException" /> </menu_item_call> <menu_item_call label="Force Disconnect Viewer" - layout="topleft" name="Force Disconnect Viewer"> <menu_item_call.on_click function="Advanced.ForceErrorDisconnectViewer" /> </menu_item_call> <menu_item_call label="Simulate a Memory Leak" - layout="topleft" name="Memory Leaking Simulation"> <menu_item_call.on_click function="Floater.Show" @@ -2179,12 +1857,10 @@ <menu create_jump_keys="true" label="Render Tests" - layout="topleft" name="Render Tests" tear_off="true"> <menu_item_check label="Camera Offset" - layout="topleft" name="Camera Offset"> <menu_item_check.on_check function="CheckControl" @@ -2195,7 +1871,6 @@ </menu_item_check> <menu_item_check label="Randomize Framerate" - layout="topleft" name="Randomize Framerate"> <menu_item_check.on_check function="Advanced.CheckRandomizeFramerate" @@ -2205,7 +1880,6 @@ </menu_item_check> <menu_item_check label="Periodic Slow Frame" - layout="topleft" name="Periodic Slow Frame"> <menu_item_check.on_check function="Advanced.CheckPeriodicSlowFrame" @@ -2216,7 +1890,6 @@ </menu_item_check> <menu_item_check label="Frame Test" - layout="topleft" name="Frame Test"> <menu_item_check.on_check function="Advanced.CheckFrameTest" @@ -2228,12 +1901,10 @@ <menu create_jump_keys="true" label="Render Metadata" - layout="topleft" name="Render Metadata" tear_off="true"> <menu_item_check label="Bounding Boxes" - layout="topleft" name="Bounding Boxes"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2244,7 +1915,6 @@ </menu_item_check> <menu_item_check label="Octree" - layout="topleft" name="Octree"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2255,7 +1925,6 @@ </menu_item_check> <menu_item_check label="Shadow Frusta" - layout="topleft" name="Shadow Frusta"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2266,7 +1935,6 @@ </menu_item_check> <menu_item_check label="Occlusion" - layout="topleft" name="Occlusion"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2277,7 +1945,6 @@ </menu_item_check> <menu_item_check label="Render Batches" - layout="topleft" name="Render Batches"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2288,7 +1955,6 @@ </menu_item_check> <menu_item_check label="Texture Anim" - layout="topleft" name="Texture Anim"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2299,7 +1965,6 @@ </menu_item_check> <menu_item_check label="Texture Priority" - layout="topleft" name="Texture Priority"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2310,7 +1975,6 @@ </menu_item_check> <menu_item_check label="Texture Area" - layout="topleft" name="Texture Area"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2321,7 +1985,6 @@ </menu_item_check> <menu_item_check label="Face Area" - layout="topleft" name="Face Area"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2332,7 +1995,6 @@ </menu_item_check> <menu_item_check label="Lights" - layout="topleft" name="Lights"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2343,7 +2005,6 @@ </menu_item_check> <menu_item_check label="Collision Skeleton" - layout="topleft" name="Collision Skeleton"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2354,7 +2015,6 @@ </menu_item_check> <menu_item_check label="Raycast" - layout="topleft" name="Raycast"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -2367,7 +2027,6 @@ <menu create_jump_keys="true" label="Rendering" - layout="topleft" name="Rendering" tear_off="true"> <menu_item_check @@ -2509,7 +2168,6 @@ </menu_item_check> <menu_item_check label="Full Res Textures" - layout="topleft" name="Rull Res Textures"> <menu_item_check.on_check function="CheckControl" @@ -2520,7 +2178,6 @@ </menu_item_check> <menu_item_check label="Audit Textures" - layout="topleft" name="Audit Textures"> <menu_item_check.on_check function="CheckControl" @@ -2574,12 +2231,10 @@ <menu create_jump_keys="true" label="Network" - layout="topleft" name="Network" tear_off="true"> <menu_item_check label="Pause Agent" - layout="topleft" name="AgentPause"> <menu_item_check.on_check function="CheckControl" @@ -2588,27 +2243,22 @@ function="ToggleControl" parameter="AgentPause" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Enable Message Log" - layout="topleft" name="Enable Message Log"> <menu_item_call.on_click function="Advanced.EnableMessageLog" /> </menu_item_call> <menu_item_call label="Disable Message Log" - layout="topleft" name="Disable Message Log"> <menu_item_call.on_click function="Advanced.DisableMessageLog" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Velocity Interpolate Objects" - layout="topleft" name="Velocity Interpolate Objects"> <menu_item_check.on_check function="CheckControl" @@ -2619,7 +2269,6 @@ </menu_item_check> <menu_item_check label="Ping Interpolate Object Positions" - layout="topleft" name="Ping Interpolate Object Positions"> <menu_item_check.on_check function="CheckControl" @@ -2628,11 +2277,9 @@ function="ToggleControl" parameter="PingInterpolate" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Drop a Packet" - layout="topleft" name="Drop a Packet" shortcut="control|alt|L"> <menu_item_call.on_click @@ -2641,14 +2288,12 @@ </menu> <menu_item_call label="Dump Scripted Camera" - layout="topleft" name="Dump Scripted Camera"> <menu_item_call.on_click function="Advanced.DumpScriptedCamera" /> </menu_item_call> <menu_item_call label="Bumps, Pushes & Hits" - layout="topleft" name="Bumps, Pushes &amp; Hits"> <menu_item_call.on_click function="Floater.Show" @@ -2658,12 +2303,10 @@ <menu create_jump_keys="true" label="Recorder" - layout="topleft" name="Recorder" tear_off="true"> <menu_item_call label="Start Playback" - layout="topleft" name="Start Playback"> <menu_item_call.on_click function="Advanced.AgentPilot" @@ -2671,7 +2314,6 @@ </menu_item_call> <menu_item_call label="Stop Playback" - layout="topleft" name="Stop Playback"> <menu_item_call.on_click function="Advanced.AgentPilot" @@ -2679,7 +2321,6 @@ </menu_item_call> <menu_item_check label="Loop Playback" - layout="topleft" name="Loop Playback"> <menu_item_check.on_check function="Advanced.CheckAgentPilotLoop" @@ -2689,7 +2330,6 @@ </menu_item_check> <menu_item_call label="Start Record" - layout="topleft" name="Start Record"> <menu_item_call.on_click function="Advanced.AgentPilot" @@ -2697,7 +2337,6 @@ </menu_item_call> <menu_item_call label="Stop Record" - layout="topleft" name="Stop Record"> <menu_item_call.on_click function="Advanced.AgentPilot" @@ -2708,12 +2347,10 @@ <menu create_jump_keys="true" label="World" - layout="topleft" name="World" tear_off="true"> <menu_item_check label="Sim Sun Override" - layout="topleft" name="Sim Sun Override"> <menu_item_check.on_check function="CheckControl" @@ -2724,7 +2361,6 @@ </menu_item_check> <menu_item_check label="Cheesy Beacon" - layout="topleft" name="Cheesy Beacon"> <menu_item_check.on_check function="CheckControl" @@ -2735,7 +2371,6 @@ </menu_item_check> <menu_item_check label="Fixed Weather" - layout="topleft" name="Fixed Weather"> <menu_item_check.on_check function="CheckControl" @@ -2746,7 +2381,6 @@ </menu_item_check> <menu_item_call label="Dump Region Object Cache" - layout="topleft" name="Dump Region Object Cache"> <menu_item_call.on_click function="Advanced.DumpRegionObjectCache" /> @@ -2755,12 +2389,10 @@ <menu create_jump_keys="true" label="UI" - layout="topleft" name="UI" tear_off="true"> <!-- <menu_item_check label="New Bottom Bar" - layout="topleft" name="New Bottom Bar"> <menu_item_check.on_check function="CheckControl" @@ -2771,7 +2403,6 @@ </menu_item_check>--> <menu_item_call label="Web Browser Test" - layout="topleft" name="Web Browser Test"> <menu_item_call.on_click function="Advanced.WebBrowserTest" @@ -2779,14 +2410,12 @@ </menu_item_call> <menu_item_call label="Dump SelectMgr" - layout="topleft" name="Dump SelectMgr"> <menu_item_call.on_click function="Advanced.DumpSelectMgr" /> </menu_item_call> <menu_item_call label="Dump Inventory" - layout="topleft" name="Dump Inventory"> <menu_item_call.on_click function="Advanced.DumpInventory" /> @@ -2799,14 +2428,12 @@ </menu_item_call> <menu_item_call label="Dump Focus Holder" - layout="topleft" name="Dump Focus Holder"> <menu_item_call.on_click function="Advanced.DumpFocusHolder" /> </menu_item_call> <menu_item_call label="Print Selected Object Info" - layout="topleft" name="Print Selected Object Info" shortcut="control|shift|P"> <menu_item_call.on_click @@ -2814,7 +2441,6 @@ </menu_item_call> <menu_item_call label="Print Agent Info" - layout="topleft" name="Print Agent Info" shortcut="shift|P"> <menu_item_call.on_click @@ -2822,7 +2448,6 @@ </menu_item_call> <menu_item_call label="Memory Stats" - layout="topleft" name="Memory Stats" shortcut="control|alt|shift|M"> <menu_item_call.on_click @@ -2830,7 +2455,6 @@ </menu_item_call> <menu_item_check label="Double-ClickAuto-Pilot" - layout="topleft" name="Double-ClickAuto-Pilot"> <menu_item_check.on_check function="CheckControl" @@ -2843,7 +2467,6 @@ <menu_item_separator /> <menu_item_check label="Debug SelectMgr" - layout="topleft" name="Debug SelectMgr"> <menu_item_check.on_check function="CheckControl" @@ -2854,7 +2477,6 @@ </menu_item_check> <menu_item_check label="Debug Clicks" - layout="topleft" name="Debug Clicks"> <menu_item_check.on_check function="Advanced.CheckDebugClicks" @@ -2865,7 +2487,6 @@ </menu_item_check> <menu_item_check label="Debug Views" - layout="topleft" name="Debug Views"> <menu_item_check.on_check function="Advanced.CheckDebugViews" /> @@ -2874,7 +2495,6 @@ </menu_item_check> <menu_item_check label="Debug Name Tooltips" - layout="topleft" name="Debug Name Tooltips"> <menu_item_check.on_check function="Advanced.CheckXUINameTooltips" @@ -2884,7 +2504,6 @@ </menu_item_check> <menu_item_check label="Debug Mouse Events" - layout="topleft" name="Debug Mouse Events"> <menu_item_check.on_check function="Advanced.CheckDebugMouseEvents" @@ -2894,7 +2513,6 @@ </menu_item_check> <menu_item_check label="Debug Keys" - layout="topleft" name="Debug Keys"> <menu_item_check.on_check function="Advanced.CheckDebugKeys" @@ -2904,7 +2522,6 @@ </menu_item_check> <menu_item_check label="Debug WindowProc" - layout="topleft" name="Debug WindowProc"> <menu_item_check.on_check function="Advanced.CheckDebugWindowProc" @@ -2921,14 +2538,12 @@ tear_off="true"> <menu_item_call label="Reload Color Settings" - layout="topleft" name="Reload Color Settings"> <menu_item_call.on_click function="Advanced.ReloadColorSettings" /> </menu_item_call> <menu_item_call label="Show Font Test" - layout="topleft" name="Show Font Test"> <menu_item_call.on_click function="Floater.Show" @@ -2936,21 +2551,18 @@ </menu_item_call> <menu_item_call label="Load from XML" - layout="topleft" name="Load from XML"> <menu_item_call.on_click function="Advanced.LoadUIFromXML" /> </menu_item_call> <menu_item_call label="Save to XML" - layout="topleft" name="Save to XML"> <menu_item_call.on_click function="Advanced.SaveUIToXML" /> </menu_item_call> <menu_item_check label="Show XUI Names" - layout="topleft" name="Show XUI Names"> <menu_item_check.on_check function="Advanced.CheckXUINames" @@ -2960,7 +2572,6 @@ </menu_item_check> <menu_item_call label="Send Test IMs" - layout="topleft" name="Send Test IMs"> <menu_item_call.on_click function="Advanced.SendTestIMs" /> @@ -2969,18 +2580,15 @@ <menu create_jump_keys="true" label="Avatar" - layout="topleft" name="Character" tear_off="true"> <menu create_jump_keys="true" label="Grab Baked Texture" - layout="topleft" name="Grab Baked Texture" tear_off="true"> <menu_item_call label="Iris" - layout="topleft" name="Iris"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" @@ -2991,7 +2599,6 @@ </menu_item_call> <menu_item_call label="Head" - layout="topleft" name="Head"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" @@ -3002,7 +2609,6 @@ </menu_item_call> <menu_item_call label="Upper Body" - layout="topleft" name="Upper Body"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" @@ -3013,7 +2619,6 @@ </menu_item_call> <menu_item_call label="Lower Body" - layout="topleft" name="Lower Body"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" @@ -3024,7 +2629,6 @@ </menu_item_call> <menu_item_call label="Skirt" - layout="topleft" name="Skirt"> <menu_item_call.on_click function="Advanced.GrabBakedTexture" @@ -3037,19 +2641,16 @@ <menu create_jump_keys="true" label="Character Tests" - layout="topleft" name="Character Tests" tear_off="true"> <menu_item_call label="Appearance To XML" - layout="topleft" name="Appearance To XML"> <menu_item_call.on_click function="Advanced.AppearanceToXML" /> </menu_item_call> <menu_item_call label="Toggle Character Geometry" - layout="topleft" name="Toggle Character Geometry"> <menu_item_call.on_click function="Advanced.ToggleCharacterGeometry" /> @@ -3058,28 +2659,24 @@ </menu_item_call> <menu_item_call label="Test Male" - layout="topleft" name="Test Male"> <menu_item_call.on_click function="Advanced.TestMale" /> </menu_item_call> <menu_item_call label="Test Female" - layout="topleft" name="Test Female"> <menu_item_call.on_click function="Advanced.TestFemale" /> </menu_item_call> <menu_item_call label="Toggle PG" - layout="topleft" name="Toggle PG"> <menu_item_call.on_click function="Advanced.TogglePG" /> </menu_item_call> <menu_item_check label="Allow Select Avatar" - layout="topleft" name="Allow Select Avatar"> <menu_item_check.on_check function="CheckControl" @@ -3091,14 +2688,12 @@ </menu> <menu_item_call label="Force Params to Default" - layout="topleft" name="Force Params to Default"> <menu_item_call.on_click function="Advanced.ForceParamsToDefault" /> </menu_item_call> <menu_item_check label="Animation Info" - layout="topleft" name="Animation Info"> <menu_item_check.on_check function="Advanced.CheckAnimationInfo" @@ -3109,7 +2704,6 @@ </menu_item_check> <menu_item_check label="Slow Motion Animations" - layout="topleft" name="Slow Motion Animations"> <menu_item_check.on_check function="CheckControl" @@ -3120,7 +2714,6 @@ </menu_item_check> <menu_item_check label="Show Look At" - layout="topleft" name="Show Look At"> <menu_item_check.on_check function="Advanced.CheckShowLookAt" @@ -3130,7 +2723,6 @@ </menu_item_check> <menu_item_check label="Show Point At" - layout="topleft" name="Show Point At"> <menu_item_check.on_check function="Advanced.CheckShowPointAt" @@ -3140,7 +2732,6 @@ </menu_item_check> <menu_item_check label="Debug Joint Updates" - layout="topleft" name="Debug Joint Updates"> <menu_item_check.on_check function="Advanced.CheckDebugJointUpdates" @@ -3150,7 +2741,6 @@ </menu_item_check> <menu_item_check label="Disable LOD" - layout="topleft" name="Disable LOD"> <menu_item_check.on_check function="Advanced.CheckDisableLOD" @@ -3160,7 +2750,6 @@ </menu_item_check> <menu_item_check label="Debug Character Vis" - layout="topleft" name="Debug Character Vis"> <menu_item_check.on_check function="Advanced.CheckDebugCharacterVis" @@ -3170,7 +2759,6 @@ </menu_item_check> <menu_item_check label="Show Collision Skeleton" - layout="topleft" name="Show Collision Skeleton"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -3181,7 +2769,6 @@ </menu_item_check> <menu_item_check label="Display Agent Target" - layout="topleft" name="Display Agent Target"> <menu_item_check.on_check function="Advanced.CheckInfoDisplay" @@ -3193,7 +2780,6 @@ <!-- Appears not to exist anymore <menu_item_check label="Debug Rotation" - layout="topleft" name="Debug Rotation"> <menu_item_check.on_check function="CheckControl" @@ -3205,14 +2791,12 @@ --> <menu_item_call label="Dump Attachments" - layout="topleft" name="Dump Attachments"> <menu_item_call.on_click function="Advanced.DumpAttachments" /> </menu_item_call> <menu_item_call label="Debug Avatar Textures" - layout="topleft" name="Debug Avatar Textures" shortcut="control|alt|shift|A"> <menu_item_call.on_click @@ -3220,18 +2804,15 @@ </menu_item_call> <menu_item_call label="Dump Local Textures" - layout="topleft" name="Dump Local Textures" shortcut="alt|shift|M"> <menu_item_call.on_click function="Advanced.DumpAvatarLocalTextures" /> </menu_item_call> </menu> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="HTTP Textures" - layout="topleft" name="HTTP Textures"> <menu_item_check.on_check function="CheckControl" @@ -3242,14 +2823,12 @@ </menu_item_check> <menu_item_call label="Compress Images" - layout="topleft" name="Compress Images"> <menu_item_call.on_click function="Advanced.CompressImage" /> </menu_item_call> <menu_item_check label="Output Debug Minidump" - layout="topleft" name="Output Debug Minidump"> <menu_item_check.on_check function="CheckControl" @@ -3260,7 +2839,6 @@ </menu_item_check> <menu_item_check label="Console Window on next Run" - layout="topleft" name="Console Window"> <menu_item_check.on_check function="CheckControl" @@ -3269,11 +2847,9 @@ function="ToggleControl" parameter="ShowConsoleWindow" /> </menu_item_check> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_check label="Show Admin Menu" - layout="topleft" name="View Admin Options"> <menu_item_check.on_check function="Advanced.CheckViewAdminOptions" @@ -3283,7 +2859,6 @@ </menu_item_check> <menu_item_call label="Request Admin Status" - layout="topleft" name="Request Admin Options" shortcut="control|alt|G"> <menu_item_call.on_click @@ -3291,7 +2866,6 @@ </menu_item_call> <menu_item_call label="Leave Admin Status" - layout="topleft" name="Leave Admin Options" shortcut="control|alt|shift|G"> <menu_item_call.on_click @@ -3301,18 +2875,15 @@ <menu create_jump_keys="true" label="Admin" - layout="topleft" name="Admin" tear_off="true" visible="false"> <menu create_jump_keys="true" label="Object" - layout="topleft" tear_off="true"> <menu_item_call label="Take Copy" - layout="topleft" name="Take Copy" shortcut="control|alt|shift|O"> <menu_item_call.on_click @@ -3322,7 +2893,6 @@ </menu_item_call> <menu_item_call label="Force Owner To Me" - layout="topleft" name="Force Owner To Me"> <menu_item_call.on_click function="Admin.HandleObjectOwnerSelf" /> @@ -3331,7 +2901,6 @@ </menu_item_call> <menu_item_call label="Force Owner Permissive" - layout="topleft" name="Force Owner Permissive"> <menu_item_call.on_click function="Admin.HandleObjectOwnerPermissive" /> @@ -3340,7 +2909,6 @@ </menu_item_call> <menu_item_call label="Delete" - layout="topleft" name="Delete" shortcut="control|alt|shift|Del"> <menu_item_call.on_click @@ -3350,7 +2918,6 @@ </menu_item_call> <menu_item_call label="Lock" - layout="topleft" name="Lock" shortcut="control|alt|shift|L"> <menu_item_call.on_click @@ -3360,7 +2927,6 @@ </menu_item_call> <menu_item_call label="Get Assets IDs" - layout="topleft" name="Get Assets IDs" shortcut="control|alt|shift|I"> <menu_item_call.on_click @@ -3372,12 +2938,10 @@ <menu create_jump_keys="true" label="Parcel" - layout="topleft" name="Parcel" tear_off="true"> <menu_item_call label="Force Owner To Me" - layout="topleft" name="Owner To Me"> <menu_item_call.on_click function="Admin.HandleForceParcelOwnerToMe" /> @@ -3386,7 +2950,6 @@ </menu_item_call> <menu_item_call label="Set to Linden Content" - layout="topleft" name="Set to Linden Content" shortcut="control|alt|shift|C"> <menu_item_call.on_click @@ -3396,7 +2959,6 @@ </menu_item_call> <menu_item_call label="Claim Public Land" - layout="topleft" name="Claim Public Land"> <menu_item_call.on_click function="Admin.HandleClaimPublicLand" /> @@ -3407,12 +2969,10 @@ <menu create_jump_keys="true" label="Region" - layout="topleft" name="Region" tear_off="true"> <menu_item_call label="Dump Temp Asset Data" - layout="topleft" name="Dump Temp Asset Data"> <menu_item_call.on_click function="Admin.HandleRegionDumpTempAssetData" /> @@ -3421,7 +2981,6 @@ </menu_item_call> <menu_item_call label="Save Region State" - layout="topleft" name="Save Region State"> <menu_item_call.on_click function="Admin.OnSaveState" /> @@ -3431,7 +2990,6 @@ </menu> <menu_item_call label="God Tools" - layout="topleft" name="God Tools"> <menu_item_call.on_click function="Floater.Show" @@ -3443,34 +3001,29 @@ <menu create_jump_keys="true" label="Admin" - layout="topleft" name="Deprecated" tear_off="true" visible="false"> <menu create_jump_keys="true" label="Attach Object" - layout="topleft" mouse_opaque="false" name="Attach Object" tear_off="true" /> <menu create_jump_keys="true" label="Detach Object" - layout="topleft" mouse_opaque="false" name="Detach Object" tear_off="true" /> <menu create_jump_keys="true" label="Take Off Clothing" - layout="topleft" mouse_opaque="false" name="Take Off Clothing" tear_off="true"> <menu_item_call label="Shirt" - layout="topleft" name="Shirt"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3481,7 +3034,6 @@ </menu_item_call> <menu_item_call label="Pants" - layout="topleft" name="Pants"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3492,7 +3044,6 @@ </menu_item_call> <menu_item_call label="Shoes" - layout="topleft" name="Shoes"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3503,7 +3054,6 @@ </menu_item_call> <menu_item_call label="Socks" - layout="topleft" name="Socks"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3514,7 +3064,6 @@ </menu_item_call> <menu_item_call label="Jacket" - layout="topleft" name="Jacket"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3525,7 +3074,6 @@ </menu_item_call> <menu_item_call label="Gloves" - layout="topleft" name="Gloves"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3536,7 +3084,6 @@ </menu_item_call> <menu_item_call label="Undershirt" - layout="topleft" name="Menu Undershirt"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3547,7 +3094,6 @@ </menu_item_call> <menu_item_call label="Underpants" - layout="topleft" name="Menu Underpants"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3558,7 +3104,6 @@ </menu_item_call> <menu_item_call label="Skirt" - layout="topleft" name="Skirt"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3569,7 +3114,6 @@ </menu_item_call> <menu_item_call label="Alpha" - layout="topleft" name="Alpha"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3580,7 +3124,6 @@ </menu_item_call> <menu_item_call label="Tattoo" - layout="topleft" name="Tattoo"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3591,7 +3134,6 @@ </menu_item_call> <menu_item_call label="All Clothes" - layout="topleft" name="All Clothes"> <menu_item_call.on_click function="Edit.TakeOff" @@ -3601,12 +3143,10 @@ <menu create_jump_keys="true" label="Help" - layout="topleft" name="Help" tear_off="true"> <menu_item_call label="Official Linden Blog" - layout="topleft" name="Official Linden Blog"> <menu_item_call.on_click function="PromptShowURL" @@ -3615,7 +3155,6 @@ </menu_item_call> <menu_item_call label="Scripting Portal" - layout="topleft" name="Scripting Portal"> <menu_item_call.on_click function="PromptShowURL" @@ -3625,12 +3164,10 @@ <menu create_jump_keys="true" label="Bug Reporting" - layout="topleft" name="Bug Reporting" tear_off="true"> <menu_item_call label="Public Issue Tracker" - layout="topleft" name="Public Issue Tracker"> <menu_item_call.on_click function="PromptShowURL" @@ -3639,18 +3176,15 @@ </menu_item_call> <menu_item_call label="Public Issue Tracker Help" - layout="topleft" name="Publc Issue Tracker Help"> <menu_item_call.on_click function="PromptShowURL" name="PublicIssueTrackerHelp_url" parameter="WebLaunchPublicIssueHelp,http://wiki.secondlife.com/wiki/Issue_tracker" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> + <menu_item_separator/> <menu_item_call label="Bug Reporting 101" - layout="topleft" name="Bug Reporing 101"> <menu_item_call.on_click function="PromptShowURL" @@ -3659,7 +3193,6 @@ </menu_item_call> <menu_item_call label="Security Issues" - layout="topleft" name="Security Issues"> <menu_item_call.on_click function="PromptShowURL" @@ -3668,7 +3201,6 @@ </menu_item_call> <menu_item_call label="QA Wiki" - layout="topleft" name="QA Wiki"> <menu_item_call.on_click function="PromptShowURL" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5680b91c05..07304eb14e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -800,7 +800,7 @@ Insufficient funds to create classified. icon="alertmodal.tga" name="DeleteAvatarPick" type="alertmodal"> -Delete pick [PICK]? +Delete pick <nolink>[PICK]</nolink>? <usetemplate name="okcancelbuttons" notext="Cancel" @@ -2024,6 +2024,28 @@ Would you be my friend? </notification> <notification + icon="alertmodal.tga" + label="Save Outfit" + name="SaveOutfitAs" + type="alertmodal"> + Save what I'm wearing as a new Outfit: + <form name="form"> + <input name="message" type="text"> + [DESC] (new) + </input> + <button + default="true" + index="0" + name="Offer" + text="OK"/> + <button + index="1" + name="Cancel" + text="Cancel"/> + </form> + </notification> + + <notification icon="alertmodal.tga" name="RemoveFromFriends" type="alertmodal"> @@ -3111,6 +3133,18 @@ Teleport to [PICK]? </notification> <notification + icon="alertmodal.tga" + name="TeleportToHistoryEntry" + type="alertmodal"> +Teleport to [HISTORY_ENTRY]? + <usetemplate + ignoretext="Confirm that I want to teleport to a history location" + name="okcancelignore" + notext="Cancel" + yestext="Teleport"/> + </notification> + + <notification icon="alert.tga" label="Message everyone in your Estate" name="MessageEstate" @@ -3346,6 +3380,13 @@ You can click 'Change Preference' to raise your maturity Rating prefer </notification> <notification + icon="notifytip.tga" + name="PreferredMaturityChanged" + type="notifytip"> +Your maturity rating preference is now [RATING]. + </notification> + + <notification icon="alertmodal.tga" name="LandClaimAccessBlocked" type="alertmodal"> @@ -4269,6 +4310,13 @@ The string [STRING_NAME] is missing from strings.xml type="notifytip"> [MESSAGE] </notification> + + <notification + icon="notifytip.tga" + name="IMSystemMessageTip" + type="notifytip"> +[MESSAGE] + </notification> <notification icon="notifytip.tga" @@ -4335,6 +4383,18 @@ Uploading in-world and web site snapshots... </notification> <notification + icon="alertmodal.tga" + name="UploadConfirmation" + type="alertmodal"> +Uploading costs L$[AMOUNT]. +Do you wish to proceed? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Upload"/> + </notification> + + <notification icon="notify.tga" name="UploadPayment" type="notify"> @@ -5103,9 +5163,9 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th icon="notify.tga" name="TeleportOffered" type="offer"> -[NAME] has offered to teleport you to their location: +[NAME_SLURL] has offered to teleport you to their location: -[MESSAGE] +[MESSAGE], ([MATURITY]) <form name="form"> <button index="0" @@ -5148,7 +5208,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th icon="notify.tga" name="OfferFriendship" type="offer"> -[NAME] is offering friendship. +[NAME_SLURL] is offering friendship. [MESSAGE] @@ -5294,6 +5354,13 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" + name="ShareToWebFailed" + type="notify"> + Failed to upload image to web. + </notification> + + <notification + icon="notify.tga" name="InvalidWearable" type="notify"> The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. @@ -5894,6 +5961,19 @@ Selected button can not be shown right now. The button will be shown when there is enough space for it. </notification> + <notification + icon="notifytip.tga" + name="ShareNotification" + type="notifytip"> +Drag items from inventory onto a person in the resident picker + </notification> + + <notification + icon="notifytip.tga" + name="AvatarRezNotification" + type="notifytip"> +Avatar '[NAME]' rezzed in [TIME] seconds. + </notification> <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 58c5c11e51..e412c491fd 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -127,6 +127,8 @@ <gesture_combo_list.combo_button pad_right="10" use_ellipses="true" /> + <gesture_combo_list.combo_list + page_lines="17" /> </gesture_combo_list> </layout_panel> <icon @@ -263,7 +265,7 @@ top="0" name="chiclet_list_panel" width="189" - min_width="60" + min_width="95" user_resize="false" auto_resize="true"> <!--*NOTE: min_width of the chiclet_panel (chiclet_list) must be the same @@ -274,7 +276,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. height="24" layout="topleft" left="1" - min_width="60" + min_width="95" name="chiclet_list" top="7" chiclet_padding="4" @@ -330,7 +332,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_width="4" name="DUMMY" top="0" - width="5"/> + width="4"/> <layout_panel auto_resize="false" follows="right" @@ -339,12 +341,11 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_height="28" top="0" name="im_well_panel" - width="35" - min_width="35" + width="37" + min_width="37" user_resize="false"> <chiclet_im_well max_displayed_count="99" - flash_period="0.3" follows="right" height="28" layout="topleft" @@ -388,24 +389,11 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well layout="topleft" min_height="28" top="0" - left_pad="3" name="notification_well_panel" - width="40" - min_width="40" + width="37" + min_width="37" user_resize="false"> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="4" - top="0" - width="5" /> <chiclet_notification - flash_period="0.25" follows="right" height="23" layout="topleft" @@ -434,17 +422,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well function="Button.SetDockableFloaterToggle" parameter="notification_well_window" /> </button> - <icon - auto_resize="false" - color="0 0 0 0" - follows="left|right" - height="10" - image_name="spacer24.tga" - layout="topleft" - left="0" - min_width="4" - top="0" - width="5" /> </chiclet_notification> </layout_panel> </layout_stack> diff --git a/indra/newview/skins/default/xui/en/panel_chat_header.xml b/indra/newview/skins/default/xui/en/panel_chat_header.xml index 250dadd390..9124ad528d 100644 --- a/indra/newview/skins/default/xui/en/panel_chat_header.xml +++ b/indra/newview/skins/default/xui/en/panel_chat_header.xml @@ -21,6 +21,7 @@ top="3" width="18" /> <text + allow_html="false" allow_scroll="false" v_pad = "7" read_only = "true" diff --git a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml index 996e28c575..af3315ebfe 100644 --- a/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_classifieds_list_item.xml @@ -65,6 +65,7 @@ left="103" name="description" textbox.max_length="1024" + textbox.label="More" textbox.show_context_menu="false" top_pad="0" width="178" diff --git a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml index 40647e1b81..1d0c0a02b0 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_alpha.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_alpha.xml @@ -1,33 +1,38 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_alpha_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="180" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="400" left="10" layout="topleft" name="avatar_alpha_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Lower Alpha" layout="topleft" - left="10" + left="30" name="Lower Alpha" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="94" /> <check_box control_name="LowerAlphaTextureInvisible" follows="left" @@ -41,14 +46,14 @@ can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Upper Alpha" layout="topleft" - left_pad="10" + left_pad="20" name="Upper Alpha" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="94" /> <check_box control_name="UpperAlphaTextureInvisible" follows="left" @@ -62,14 +67,14 @@ can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Head Alpha" layout="topleft" - left_pad="10" + left="30" name="Head Alpha" tool_tip="Click to choose a picture" - top="10" - width="64" /> + top="120" + width="94" /> <check_box control_name="HeadAlphaTextureInvisible" follows="left" @@ -83,14 +88,14 @@ can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Eye Alpha" layout="topleft" - left="10" + left_pad="20" name="Eye Alpha" tool_tip="Click to choose a picture" - top="100" - width="64" /> + top="120" + width="94" /> <check_box control_name="Eye AlphaTextureInvisible" follows="left" @@ -104,14 +109,14 @@ can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Hair Alpha" layout="topleft" - left_pad="10" + left="30" name="Hair Alpha" tool_tip="Click to choose a picture" - top_delta="-4" - width="64" /> + top="230" + width="94" /> <check_box control_name="HairAlphaTextureInvisible" follows="left" diff --git a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml index c514054c41..f11ef43c76 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_eyes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_eyes.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_eyes_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_eye_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -23,31 +28,49 @@ height="80" label="Iris" layout="topleft" - left="8" + left="10" name="Iris" tool_tip="Click to choose a picture" - top_pad="10" + top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> - <accordion_tab + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> + <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="eyes_main_tab" title="Eyes"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="eyes_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml index 7aca40e8d9..7d8eed5085 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_gloves.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_gloves.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_gloves_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_gloves_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="gloves_main_tab" title="Gloves"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="gloves_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_hair.xml b/indra/newview/skins/default/xui/en/panel_edit_hair.xml index e7d1c05301..cd81aa2c4f 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_hair.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_hair.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_hair_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_hair_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -23,26 +28,43 @@ height="80" label="Texture" layout="topleft" - left="8" + left="10" name="Texture" tool_tip="Click to choose a picture" top="10" width="64" /> </panel> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="hair_color_tab" title="Color"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="hair_color_param_list" top="0" @@ -50,11 +72,13 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="hair_style_tab" title="Style"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="hair_style_param_list" top="0" @@ -62,11 +86,13 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="hair_eyebrows_tab" title="Eyebrows"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="hair_eyebrows_param_list" top="0" @@ -74,16 +100,19 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="hair_facial_tab" title="Facial"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="hair_facial_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml index ed92b1e0f8..ba03865937 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_jacket.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_jacket.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_jacket_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_jacket_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -23,11 +28,11 @@ height="80" label="Upper Fabric" layout="topleft" - left="10" + left="25" name="Upper Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="74" /> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -35,42 +40,60 @@ height="80" label="Lower Fabric" layout="topleft" - left_pad="10" + left_pad="20" name="Lower Fabric" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="74" /> <color_swatch can_apply_immediately="true" follows="left|top" height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" - width="64" /> + width="74" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="jacket_main_tab" title="Jacket"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="jacket_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_pants.xml b/indra/newview/skins/default/xui/en/panel_edit_pants.xml index b764188e04..5b02d1f968 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_pants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_pants.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_pants_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_pants_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="pants_main_tab" title="Pants"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="pants_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shape.xml b/indra/newview/skins/default/xui/en/panel_edit_shape.xml index 45c4b92338..e1c574001a 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shape.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shape.xml @@ -1,38 +1,43 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_shape_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="top|left" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" height="50" left="10" layout="topleft" name="avatar_sex_panel" - top="10" - width="293" > + top="0" + width="313" > <text follows="top|left" height="16" layout="topleft" left="10" name="gender_text" - width="303"> + width="313"> Gender: </text> <radio_group - follows="all" + follows="left|top|right" left="10" - height="34" + height="28" layout="topleft" name="sex_radio" top_pad="3" - width="200" > + width="303" > <radio_item follows="all" height="16" @@ -51,21 +56,41 @@ width="82" /> </radio_group> </panel> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="345" + label="Shirt" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> <accordion - follows="left|top|right|bottom" - height ="330" - left="10" + layout="topleft" + follows="all" + height ="345" + left="0" name="wearable_accordion" - top_pad="10" - width="303"> + top="0" + single_expansion="true" + fit_parent="false" + width="313"> <accordion_tab layout="topleft" min_height="150" name="shape_body_tab" + fit_panel="false" title="Body"> <scrolling_panel_list + layout="topleft" follows="all" left="0" + height="300" name="shape_body_param_list" top="0" width="303" /> @@ -73,11 +98,13 @@ <accordion_tab layout="topleft" min_height="150" + fit_panel="false" name="shape_head_tab" title="Head"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" - left="0" + left="10" name="shape_head_param_list" top="0" width="303" /> @@ -85,9 +112,11 @@ <accordion_tab layout="topleft" min_height="150" + fit_panel="false" name="shape_eyes_tab" title="Eyes"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_eyes_param_list" @@ -97,9 +126,11 @@ <accordion_tab layout="topleft" min_height="150" + fit_panel="false" name="shape_ears_tab" title="Ears"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_ears_param_list" @@ -110,8 +141,10 @@ layout="topleft" min_height="150" name="shape_nose_tab" + fit_panel="false" title="Nose"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_nose_param_list" @@ -122,8 +155,10 @@ layout="topleft" min_height="150" name="shape_mouth_tab" + fit_panel="false" title="Mouth"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_mouth_param_list" @@ -134,8 +169,10 @@ layout="topleft" min_height="150" name="shape_chin_tab" + fit_panel="false" title="Chin"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_chin_param_list" @@ -146,8 +183,10 @@ layout="topleft" min_height="150" name="shape_torso_tab" + fit_panel="false" title="Torso"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_torso_param_list" @@ -158,8 +197,10 @@ layout="topleft" min_height="150" name="shape_legs_tab" + fit_panel="false" title="Legs"> - <scrolling_panel_list + <scrolling_panel_list + layout="topleft" follows="all" left="0" name="shape_legs_param_list" @@ -167,5 +208,6 @@ width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml index 4b7235545f..7da8de4c0b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shirt.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_shirt_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_shirt_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> <accordion - follows="left|top|right|bottom" - height ="340" - left="10" + follows="all" + height ="300" + layout="topleft" + left="0" name="wearable_accordion" - top_pad="10" - width="303"> + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="shirt_main_tab" title="Shirt"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="shirt_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml index e886afa010..84fe26f7f6 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_shoes.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_shoes.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_shoes_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_shoes_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="shoes_main_tab" title="Shoes"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="shoes_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_skin.xml b/indra/newview/skins/default/xui/en/panel_edit_skin.xml index 918606b54c..b5c8c95473 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skin.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skin.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_skin_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_skin_color_panel" top="0" - width="293" > + width="313" > <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -24,7 +29,7 @@ height="80" label="Head Tattoos" layout="topleft" - left="10" + left="25" name="Head Tattoos" tool_tip="Click to choose a picture" top="10" @@ -37,7 +42,7 @@ height="80" label="Upper Tattoos" layout="topleft" - left_pad="10" + left_pad="20" name="Upper Tattoos" tool_tip="Click to choose a picture" top="10" @@ -50,26 +55,43 @@ height="80" label="Lower Tattoos" layout="topleft" - left_pad="10" + left_pad="20" name="Lower Tattoos" tool_tip="Click to choose a picture" top="10" width="74" /> </panel> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> <accordion - follows="left|top|right|bottom" - height ="340" - left="10" + layout="topleft" + follows="all" + height ="300" + left="0" name="wearable_accordion" - top_pad="10" - width="303"> + top="0" + single_expansion="true" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="skin_color_tab" title="Skin Color"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="skin_color_param_list" top="0" @@ -77,11 +99,13 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="skin_face_tab" title="Face Detail"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="skin_face_param_list" top="0" @@ -89,11 +113,13 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="skin_makeup_tab" title="Makeup"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="skin_makeup_param_list" top="0" @@ -101,16 +127,19 @@ </accordion_tab> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="skin_body_tab" title="Body Detail"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="skin_body_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml index 6cccab1843..16f6950bd5 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_skirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_skirt.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_skirt_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_skirt_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="skirt_main_tab" title="Skirt"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="skirt_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_socks.xml b/indra/newview/skins/default/xui/en/panel_edit_socks.xml index fc7de00714..e4f916703b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_socks.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_socks.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_socks_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_socks_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="socks_main_tab" title="Socks"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="socks_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml index b214cd3de0..ed990eb095 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_tattoo.xml @@ -1,57 +1,62 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_tattoo_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="400" left="10" layout="topleft" name="avatar_tattoo_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Head Tattoo" layout="topleft" - left="10" + left="30" name="Head Tattoo" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="94" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Upper Tattoo" layout="topleft" - left_pad="10" + left_pad="30" name="Upper Tattoo" tool_tip="Click to choose a picture" top="10" - width="64" /> + width="94" /> <texture_picker can_apply_immediately="true" default_image_name="Default" follows="left|top" - height="80" + height="100" label="Lower Tattoo" layout="topleft" - left_pad="10" + left="30" name="Lower Tattoo" tool_tip="Click to choose a picture" - top="10" - width="64" /> + top_pad="10" + width="94" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml index 03e0bb70ef..d43497c943 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_underpants.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_underpants.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_underpants_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_underpants_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open color picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="underpants_main_tab" title="Underpants"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="underpants_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml index 20c56142fb..45c6ef4526 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_undershirt.xml @@ -1,21 +1,26 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel + background_visible="true" follows="all" height="400" layout="topleft" - left="10" + left="0" name="edit_undershirt_panel" top_pad="10" - width="313" > + width="333" > <panel - border="true" - follows="left|top|right" - height="100" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" + height="90" left="10" layout="topleft" name="avatar_undershirt_color_panel" top="0" - width="293" > + width="313" > <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -34,31 +39,49 @@ height="80" label="Color/Tint" layout="topleft" - left_pad="10" + left_pad="20" name="Color/Tint" tool_tip="Click to open Color Picker" top="10" width="64" /> </panel> - <accordion - follows="left|top|right|bottom" - height ="340" - left="10" - name="wearable_accordion" - top_pad="10" - width="303"> + <panel + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="all" + height="300" + layout="topleft" + left="10" + name="accordion_panel" + top_pad="10" + width="313"> + <accordion + follows="all" + height ="300" + layout="topleft" + left="0" + name="wearable_accordion" + single_expansion="true" + top="0" + width="313"> <accordion_tab layout="topleft" + fit_panel="false" min_height="150" name="undershirt_main_tab" title="Undershirt"> <scrolling_panel_list follows="all" + layout="topleft" left="0" name="undershirt_main_param_list" top="0" width="303" /> </accordion_tab> </accordion> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml index f76a56bda4..dc2f085356 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_wearable.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_wearable.xml @@ -150,8 +150,12 @@ left="0" value="Editing Shape" width="270" /> <panel - border="true" - follows="top|left" + border="false" + bg_alpha_color="DkGray2" + bg_opaque_color="DkGray2" + background_visible="true" + background_opaque="true" + follows="top|left|right" height="60" label="Shirt" layout="topleft" @@ -160,7 +164,7 @@ left="0" top_pad="10" width="313"> <text - follows="top|left" + follows="top|left|right" height="16" layout="topleft" left="10" @@ -335,30 +339,76 @@ left="0" visible="false" width="333" /> </panel> + <panel + follows="left|right|bottom" + height="38" + label="gear_buttom_panel" + layout="bottom|left|right" + left="0" + bottom="25" + name="gear_buttom_panel" + width="333"> + <button + follows="bottom|left" + tool_tip="Options" + height="18" + image_disabled="OptionsMenu_Disabled" + image_selected="OptionsMenu_Press" + image_unselected="OptionsMenu_Off" + layout="topleft" + left="10" + name="friends_viewsort_btn" + top="10" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="AddItem_Press" + image_unselected="AddItem_Off" + image_disabled="AddItem_Disabled" + layout="topleft" + left_pad="10" + name="add_btn" + tool_tip="TODO" + width="18" /> + <button + follows="bottom|left" + height="18" + image_selected="TrashItem_Press" + image_unselected="TrashItem_Off" + image_disabled="TrashItem_Disabled" + layout="topleft" + left_pad="10" + right="-10" + name="del_btn" + tool_tip="TODO" + top_delta="0" + width="18" /> + </panel> <panel - follows="all" + follows="bottom|left|right" height="25" layout="bottom|left|right" left="0" name="button_panel" - top_pad="10" + bottom="5" width="333" > <button follows="bottomleft" layout="topleft" height="23" label="Save As" - left="10" + left="8" name="save_as_button" top="0" - width="100" /> + width="153" /> <button follows="bottomleft" layout="topleft" height="23" label="Revert" - left_pad="10" + left_pad="7" name="revert_button" - width="100" /> + width="153" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_generic_tip.xml b/indra/newview/skins/default/xui/en/panel_generic_tip.xml new file mode 100644 index 0000000000..eea92895f5 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_generic_tip.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<panel + height="40" + layout="topleft" + left="0" + name="panel_generic_tip" + top="0" + width="305"> + <text + follows="all" + font="SansSerif" + height="20" + layout="topleft" + left="10" + max_length="350" + name="message" + text_color="white" + top="10" + use_ellipses="true" + value="" + width="285" + wrap="true" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 701a14e1c5..789d69bc68 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -98,6 +98,7 @@ background_visible="true" left="0" top="0" single_expansion="true" + fit_parent="true" follows="all" layout="topleft" name="groups_accordion"> diff --git a/indra/newview/skins/default/xui/en/panel_group_land_money.xml b/indra/newview/skins/default/xui/en/panel_group_land_money.xml index 7996a89e72..9e99a8ceaf 100644 --- a/indra/newview/skins/default/xui/en/panel_group_land_money.xml +++ b/indra/newview/skins/default/xui/en/panel_group_land_money.xml @@ -262,6 +262,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="200" @@ -286,6 +287,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="185" @@ -329,6 +331,7 @@ top="0" width="313"> <text_editor + enabled="false" type="string" follows="all" height="185" diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 731b3c119c..479629f6ea 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -131,6 +131,7 @@ Maximum 200 per group daily Subject: </text> <line_editor + follows="left|top|right" border_style="line" border_thickness="1" height="16" @@ -153,6 +154,7 @@ Maximum 200 per group daily Message: </text> <text_editor + follows="left|top|right" height="90" layout="topleft" left_pad="3" @@ -173,6 +175,7 @@ Maximum 200 per group daily Attach: </text> <line_editor + follows="left|top|right" enabled="false" height="19" layout="topleft" @@ -222,7 +225,7 @@ Maximum 200 per group daily label="Send" label_selected="Send" layout="topleft" - right="-10" + right="-25" top_pad="10" name="send_notice" width="100" /> diff --git a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml index 88566ea037..29c6a17c31 100644 --- a/indra/newview/skins/default/xui/en/panel_im_control_panel.xml +++ b/indra/newview/skins/default/xui/en/panel_im_control_panel.xml @@ -16,7 +16,7 @@ border_size="0" clip="false" follows="all" - height="168" + height="183" layout="topleft" left="5" name="button_stack" @@ -150,7 +150,7 @@ <button follows="left|top|right" height="23" - label="Leave Call" + label="End Call" name="end_call_btn" width="100" /> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index befeb182f9..31ba539c44 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -133,6 +133,7 @@ layout="topleft" left="10" name="description" + textbox.label="More" top_pad="10" value="Du waltz die spritz" width="280" /> diff --git a/indra/newview/skins/default/xui/en/panel_landmarks.xml b/indra/newview/skins/default/xui/en/panel_landmarks.xml index 639e5d30ef..a7e87f2a1e 100644 --- a/indra/newview/skins/default/xui/en/panel_landmarks.xml +++ b/indra/newview/skins/default/xui/en/panel_landmarks.xml @@ -16,7 +16,7 @@ bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="369" + height="373" layout="topleft" left="3" name="landmarks_accordion" diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index cc68ec2bdc..a725548e61 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -64,7 +64,6 @@ First name: </text> <line_editor follows="left|bottom" -handle_edit_keys_directly="true" height="22" label="First" left_delta="0" @@ -85,7 +84,6 @@ top_pad="0" Last name: </text> <line_editor follows="left|bottom" -handle_edit_keys_directly="true" height="22" label="Last" max_length="31" @@ -106,7 +104,6 @@ top="20" </text> <line_editor follows="left|bottom" -handle_edit_keys_directly="true" height="22" max_length="16" name="password_edit" @@ -204,7 +201,7 @@ height="16" name="forgot_password_text" top_pad="12" right="-10" - width="210"> + width="215"> Forgot your name or password? </text> <text @@ -216,7 +213,7 @@ height="16" name="login_help" top_pad="2" right="-10" - width="190"> + width="220"> Need help logging in? </text> <!-- <text follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index bef62f48e0..27d66945d9 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" + default_tab_group="1" follows="all" height="408" label="Things" @@ -9,22 +10,22 @@ min_width="240" name="main inventory panel" width="330"> - <panel.string - name="Itemcount"> - </panel.string> - <panel.string - name="ItemcountFetching"> - Fetching [ITEM_COUNT] Items... [FILTER] - </panel.string> - <panel.string - name="ItemcountCompleted"> - [ITEM_COUNT] Items [FILTER] - </panel.string> - <panel.string - name="ItemcountUnknown"> + <panel.string + name="Itemcount"> + </panel.string> + <panel.string + name="ItemcountFetching"> + Fetching [ITEM_COUNT] Items... [FILTER] + </panel.string> + <panel.string + name="ItemcountCompleted"> + [ITEM_COUNT] Items [FILTER] + </panel.string> + <panel.string + name="ItemcountUnknown"> - </panel.string> - <text + </panel.string> + <text type="string" length="1" follows="left|top" @@ -36,487 +37,125 @@ text_color="EmphasisColor" top_pad="0" width="300"> - Items: - </text> - <menu_bar - bg_visible="false" - follows="left|top|right" - height="20" + Items: + </text> + <filter_editor + text_pad_left="10" + follows="left|top|right" + height="23" + label="Filter Inventory" + layout="topleft" + left="10" + max_length="300" + name="inventory search editor" + top="3" + width="303" /> + <tab_container + bg_alpha_color="DkGray" + bg_opaque_color="DkGray" + background_visible="true" + background_opaque="true" + follows="all" + halign="center" + height="339" layout="topleft" - left="10" - mouse_opaque="false" - name="Inventory Menu" - top="+10" - visible="true" - width="290"> - <menu - height="101" - label="File" - layout="topleft" - left="0" - mouse_opaque="false" - name="File" - tear_off="true" - top="-117" - width="128"> - <menu_item_call - label="Open" - layout="topleft" - name="Open"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="open" /> - </menu_item_call> - <menu - create_jump_keys="true" - label="Upload" - layout="topleft" - name="upload" - tear_off="true"> - <menu_item_call - label="Image (L$[COST])..." - layout="topleft" - name="Upload Image" - shortcut="control|U"> - <menu_item_call.on_click - function="File.UploadImage" - parameter="" /> - <menu_item_call.on_enable - function="File.EnableUpload" /> - </menu_item_call> - <menu_item_call - label="Sound (L$[COST])..." - layout="topleft" - name="Upload Sound"> - <menu_item_call.on_click - function="File.UploadSound" - parameter="" /> - <menu_item_call.on_enable - function="File.EnableUpload" /> - </menu_item_call> - <menu_item_call - label="Animation (L$[COST])..." - layout="topleft" - name="Upload Animation"> - <menu_item_call.on_click - function="File.UploadAnim" - parameter="" /> - <menu_item_call.on_enable - function="File.EnableUpload" /> - </menu_item_call> - <menu_item_call - label="Bulk (L$[COST] per file)..." - layout="topleft" - name="Bulk Upload"> - <menu_item_call.on_click - function="File.UploadBulk" - parameter="" /> - </menu_item_call> - <menu_item_separator - layout="topleft" /> - </menu> - <menu_item_separator - layout="topleft" /> - <menu_item_call - label="New Window" - layout="topleft" - name="New Window"> - <menu_item_call.on_click - function="Inventory.NewWindow" /> - </menu_item_call> - <menu_item_separator - layout="topleft" - name="separator2" /> - <menu_item_call - label="Show Filters" - layout="topleft" - name="Show Filters"> - <menu_item_call.on_click - function="Inventory.ShowFilters" /> - </menu_item_call> - <menu_item_call - label="Reset Filters" - layout="topleft" - name="Reset Current"> - <menu_item_call.on_click - function="Inventory.ResetFilters" /> - </menu_item_call> - <menu_item_call - label="Close All Folders" - layout="topleft" - name="Close All Folders"> - <menu_item_call.on_click - function="Inventory.CloseAllFolders" /> - </menu_item_call> - <menu_item_separator - layout="topleft" - name="separator3" /> - <menu_item_call - label="Empty Trash" - layout="topleft" - name="Empty Trash"> - <menu_item_call.on_click - function="Inventory.EmptyTrash" /> - </menu_item_call> - <menu_item_call - label="Empty Lost And Found" - layout="topleft" - name="Empty Lost And Found"> - <menu_item_call.on_click - function="Inventory.EmptyLostAndFound" /> - </menu_item_call> - </menu> - <menu - height="121" - label="Create" - layout="topleft" - left="0" - mouse_opaque="false" - name="Create" - tear_off="true" - top="-201" - width="121"> - <menu_item_call - label="New Folder" - layout="topleft" - name="New Folder"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="category" /> - </menu_item_call> - <menu_item_call - label="New Script" - layout="topleft" - name="New Script"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="lsl" /> - </menu_item_call> - <menu_item_call - label="New Notecard" - layout="topleft" - name="New Note"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="notecard" /> - </menu_item_call> - <menu_item_call - label="New Gesture" - layout="topleft" - name="New Gesture"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="gesture" /> - </menu_item_call> - <menu - height="175" - label="New Clothes" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="New Clothes" - top_pad="514" - width="125"> - <menu_item_call - label="New Shirt" - layout="topleft" - name="New Shirt"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="shirt" /> - </menu_item_call> - <menu_item_call - label="New Pants" - layout="topleft" - name="New Pants"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="pants" /> - </menu_item_call> - <menu_item_call - label="New Shoes" - layout="topleft" - name="New Shoes"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="shoes" /> - </menu_item_call> - <menu_item_call - label="New Socks" - layout="topleft" - name="New Socks"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="socks" /> - </menu_item_call> - <menu_item_call - label="New Jacket" - layout="topleft" - name="New Jacket"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="jacket" /> - </menu_item_call> - <menu_item_call - label="New Skirt" - layout="topleft" - name="New Skirt"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="skirt" /> - </menu_item_call> - <menu_item_call - label="New Gloves" - layout="topleft" - name="New Gloves"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="gloves" /> - </menu_item_call> - <menu_item_call - label="New Undershirt" - layout="topleft" - name="New Undershirt"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="undershirt" /> - </menu_item_call> - <menu_item_call - label="New Underpants" - layout="topleft" - name="New Underpants"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="underpants" /> - </menu_item_call> - <menu_item_call - label="New Alpha" - layout="topleft" - name="New Alpha"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="alpha" /> - </menu_item_call> - <menu_item_call - label="New Tattoo" - layout="topleft" - name="New Tattoo"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="tattoo" /> - </menu_item_call> - </menu> - <menu - height="85" - label="New Body Parts" - layout="topleft" - left_delta="0" - mouse_opaque="false" - name="New Body Parts" - top_pad="514" - width="118"> - <menu_item_call - label="New Shape" - layout="topleft" - name="New Shape"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="shape" /> - </menu_item_call> - <menu_item_call - label="New Skin" - layout="topleft" - name="New Skin"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="skin" /> - </menu_item_call> - <menu_item_call - label="New Hair" - layout="topleft" - name="New Hair"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="hair" /> - </menu_item_call> - <menu_item_call - label="New Eyes" - layout="topleft" - name="New Eyes"> - <menu_item_call.on_click - function="Inventory.DoCreate" - parameter="eyes" /> - </menu_item_call> - </menu> - </menu> - <menu - height="49" - label="Sort" - layout="topleft" - left="0" - mouse_opaque="false" - name="Sort" - tear_off="true" - top="-113" - width="118"> - <menu_item_check - control_name="Inventory.SortByName" - label="By Name" - layout="topleft" - name="By Name"> - <menu_item_check.on_click - function="Inventory.SetSortBy" - parameter="name" /> - </menu_item_check> - <menu_item_check - control_name="Inventory.SortByDate" - label="By Date" - layout="topleft" - name="By Date"> - <menu_item_check.on_click - function="Inventory.SetSortBy" - parameter="date" /> - </menu_item_check> - <menu_item_separator - layout="topleft" /> - <menu_item_check - control_name="Inventory.FoldersAlwaysByName" - label="Folders Always By Name" - layout="topleft" - name="Folders Always By Name"> - <menu_item_check.on_click - function="Inventory.SetSortBy" - parameter="foldersalwaysbyname" /> - </menu_item_check> - <menu_item_check - control_name="Inventory.SystemFoldersToTop" - label="System Folders To Top" - layout="topleft" - name="System Folders To Top"> - <menu_item_check.on_click - function="Inventory.SetSortBy" - parameter="systemfolderstotop" /> - </menu_item_check> - </menu> - </menu_bar> - <filter_editor - text_pad_left="10" - follows="left|top|right" - height="23" - label="Filter Inventory" + left="7" + name="inventory filter tabs" + tab_height="30" + tab_group="1" + tab_position="top" + tab_min_width="100" + top_pad="10" + width="312"> + <inventory_panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + border="false" + bevel_style="none" + follows="all" + height="338" + label="MY INVENTORY" + help_topic="my_inventory_tab" layout="topleft" - left="10" - max_length="300" - name="inventory search editor" - top="+31" - width="303" /> - <tab_container - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - background_opaque="true" - follows="all" - halign="center" - height="306" - layout="topleft" - left="7" - name="inventory filter tabs" - tab_height="30" - tab_position="top" - tab_min_width="100" - top_pad="10" - width="312"> - <inventory_panel - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - background_opaque="true" - border="false" - bevel_style="none" - follows="all" - height="295" - label="MY INVENTORY" - help_topic="my_inventory_tab" - layout="topleft" - left="0" - name="All Items" - sort_order_setting="InventorySortOrder" - top="16" - width="288" /> - <inventory_panel - bg_opaque_color="DkGray2" - bg_alpha_color="DkGray2" - background_visible="true" - background_opaque="true" - border="false" - bevel_style="none" - follows="all" - height="293" - label="RECENT" - help_topic="recent_inventory_tab" - layout="topleft" - left_delta="0" - name="Recent Items" - width="290" /> - </tab_container> - - <panel - background_visible="true" + left="0" + name="All Items" + sort_order_setting="InventorySortOrder" + top="16" + width="288" /> + <inventory_panel + bg_opaque_color="DkGray2" + bg_alpha_color="DkGray2" + background_visible="true" + background_opaque="true" + border="false" bevel_style="none" - follows="left|right|bottom" - height="27" + follows="all" + height="338" + label="RECENT" + help_topic="recent_inventory_tab" layout="topleft" - top_pad="4" - left="10" - name="bottom_panel" - width="310"> - <button - follows="bottom|left" - tool_tip="Show additional options" - height="25" - image_hover_unselected="Toolbar_Left_Over" - image_overlay="OptionsMenu_Off" - image_selected="Toolbar_Left_Selected" - image_unselected="Toolbar_Left_Off" - layout="topleft" - left="0" - name="options_gear_btn" - top="1" - width="31" /> - <button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Middle_Over" - image_overlay="AddItem_Off" - image_selected="Toolbar_Middle_Selected" - image_unselected="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="add_btn" - tool_tip="Add new item" - width="31" /> - <icon - follows="bottom|left" - height="25" - image_name="Toolbar_Middle_Off" - layout="topleft" - left_pad="1" - name="dummy_icon" - width="209" - /> - <dnd_button - follows="bottom|left" - height="25" - image_hover_unselected="Toolbar_Right_Over" - image_overlay="TrashItem_Off" - image_selected="Toolbar_Right_Selected" - image_unselected="Toolbar_Right_Off" - left_pad="1" - layout="topleft" - name="trash_btn" - tool_tip="Remove selected item" - width="31"/> - </panel> + left_delta="0" + name="Recent Items" + width="290" /> + </tab_container> - + <panel + background_visible="true" + bevel_style="none" + follows="left|right|bottom" + height="27" + layout="topleft" + top_pad="-1" + left="10" + name="bottom_panel" + width="310"> + <button + follows="bottom|left" + tool_tip="Show additional options" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="options_gear_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="1" + name="add_btn" + tool_tip="Add new item" + width="31" /> + <icon + follows="bottom|left" + height="25" + image_name="Toolbar_Middle_Off" + layout="topleft" + left_pad="1" + name="dummy_icon" + width="209" + /> + <dnd_button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Right_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Right_Selected" + image_unselected="Toolbar_Right_Off" + left_pad="1" + layout="topleft" + name="trash_btn" + tool_tip="Remove selected item" + width="31"/> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml index b5c2371510..c5f44cd049 100644 --- a/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml +++ b/indra/newview/skins/default/xui/en/panel_media_settings_permissions.xml @@ -42,10 +42,11 @@ <text bottom_delta="-50" + enabled="false" follows="top|left" height="15" left="10" - enabled="false"> + name="owner_label"> Owner </text> @@ -79,10 +80,11 @@ <text bottom_delta="-36" + enabled="false" follows="top|left" height="15" left="10" - enabled="false"> + name="group_label"> Group: </text> @@ -126,10 +128,11 @@ <text bottom_delta="-36" + enabled="false" follows="top|left" height="15" left="10" - enabled="false"> + name="anyone_label"> Anyone </text> diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index 4112b65635..5e41d65720 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -117,6 +117,8 @@ layout="topleft" left="107" textbox.max_length="512" + textbox.label="More" + textbox.show_context_menu="true" name="sl_description_edit" top_pad="-3" translate="false" @@ -171,6 +173,8 @@ layout="topleft" left="107" textbox.max_length="512" + textbox.label="More" + textbox.show_context_menu="true" name="fl_description_edit" top_pad="-3" translate="false" @@ -311,6 +315,8 @@ name="sl_groups" top_pad="0" translate="false" + textbox.label="More" + textbox.show_context_menu="true" width="298" expanded_bg_visible="true" expanded_bg_color="DkGray"> diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index a314cedc21..96c76576c0 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -66,6 +66,7 @@ <button follows="left|top" height="23" + image_bottom_pad="1" image_overlay="Home_Off" layout="topleft" left_pad="7" @@ -118,7 +119,7 @@ commit_on_focus_lost="false" follows="right|top" halign="right" - height="22" + height="23" label="Search" layout="topleft" right="-10" diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 1d99de1fa7..184ea54fcb 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -16,10 +16,11 @@ label="Click here to chat." layout="topleft" left_delta="3" - text_pad_right="25" left="0" max_length="512" name="chat_box" + text_pad_left="5" + text_pad_right="25" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="2" width="283" /> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml index d14712a7fa..ff2aae645b 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -2,34 +2,34 @@ <panel can_resize="true" can_close="false" - mouse_opaque="true" - bg_opaque_image="Volume_Background" - bg_alpha_image="Volume_Background" - background_opaque="true" + bg_opaque_image="Volume_Background" + bg_alpha_image="Volume_Background" + background_opaque="true" background_visible="true" layout="topleft" width="270" - height="235" + height="230" name="nearby_media" help_topic="nearby_media"> + <string name="media_item_count_format">(%ld media items)</string> <string name="empty_item_text"><empty></string> <string name="parcel_media_name">Parcel Streaming Media</string> <string name="parcel_audio_name">Parcel Streaming Audio</string> <string name="playing_suffix">(playing)</string> <panel bevel_style="in" - background_visible="false" + background_visible="false" follows="left|right|top" top="0" - height="30" + height="35" name="minimized_controls" left="0"> <button name="all_nearby_media_disable_btn" follows="left" tool_tip="Turn all nearby media off" - left="15" - width="60" + left="8" + width="66" height="22" label="Stop All"> <button.commit_callback @@ -40,7 +40,7 @@ follows="left" tool_tip="Turn all nearby media on" left_pad="4" - width="60" + width="66" height="22" label="Start All"> <button.commit_callback @@ -64,19 +64,31 @@ function="MediaListCtrl.GoMediaPrefs" /> </button> <button - name="more_less_btn" + name="more_btn" follows="right" tool_tip="Advanced Controls" top_delta="0" - right="-10" - width="60" + right="-8" + width="66" height="22" - toggle="true" label="More >>" label_selected="Less <<"> <button.commit_callback function="MediaListCtrl.MoreLess" /> </button> + <button + name="less_btn" + follows="right" + tool_tip="Advanced Controls" + top_delta="0" + right="-8" + width="66" + height="22" + label="More >>" + label_selected="Less <<"> + <button.commit_callback + function="MediaListCtrl.MoreLess" /> + </button> </panel> <panel name="nearby_media_panel" @@ -95,7 +107,6 @@ follows="top|left" font="SansSerif" left="10" - name="nearby_media" width="100"> Nearby Media </text> @@ -106,7 +117,6 @@ font="SansSerif" top_pad="15" left="10" - name="show" width="40"> Show: </text> @@ -135,7 +145,6 @@ name="OnOthers" /> </combo_box> <scroll_list - name="media_list" follows="left|top|bottom|right" column_padding="0" height="105" @@ -144,7 +153,8 @@ bg_stripe_color="0.25 0.25 0.25 0.25" top_pad="8" left="10" - right="-10"> + right="-10" + name="media_list"> <scroll_list.columns type="checkbox" width="-1" @@ -181,7 +191,6 @@ top_pad="5" height="30" left="10" - name="media_controls_panel" right="-10"> <layout_stack name="media_controls" @@ -190,12 +199,14 @@ height="26" layout="topleft" top="4" - left="10" + left="8" right="-10" border_size="0" + mouse_opaque="false" orientation="horizontal"> <layout_panel name="stop" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -223,6 +234,7 @@ </layout_panel> <layout_panel name="play" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -250,6 +262,7 @@ </layout_panel> <layout_panel name="pause" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -276,6 +289,7 @@ </layout_panel> <layout_panel name="volume_slider_ctrl" + mouse_opaque="false" auto_resize="true" user_resize="false" follows="left|right" @@ -300,6 +314,7 @@ </layout_panel> <layout_panel name="mute" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -328,6 +343,7 @@ </layout_panel> <layout_panel name="zoom" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -355,6 +371,7 @@ </layout_panel> <layout_panel name="unzoom" + mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -383,6 +400,7 @@ <layout_panel name="right_bookend" width="0" + mouse_opaque="false" user_resize="false" /> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml index 14cb5fffee..b1a7697e83 100644 --- a/indra/newview/skins/default/xui/en/panel_online_status_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_online_status_toast.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="false" - height="152" + height="40" label="friend_online_status" layout="topleft" left="0" name="friend_online_status" top="0" - width="305"> + width="220"> <avatar_icon follows="top|left" height="18" @@ -21,7 +21,7 @@ <text font="SansSerifSmall" follows="all" - height="137" + height="13" layout="topleft" left_pad="5" name="message" @@ -29,7 +29,7 @@ top="15" use_ellipses="true" value="" - width="285" + width="189" word_wrap="true" max_length="350" /> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml new file mode 100644 index 0000000000..c77e4e8d5e --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml @@ -0,0 +1,448 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<!-- Side tray Outfit Edit panel --> +<panel + background_visible="true" + border="false" + height="600" + follows="all" + label="Outfit Edit" + layout="topleft" + left="0" + min_height="350" + name="outfit_edit" + top="0" + width="320"> + <string + name="No Outfit" + value="No Outfit"/> + + <panel.string + name="not_available"> + (N\A) + </panel.string> + <panel.string + name="unknown"> + (unknown) + </panel.string> + + <!-- Wearables filtering strings --> + <string name="Filter.All" value="All"/> + <string name="Filter.Clothes/Body" value="Clothes/Body"/> + <string name="Filter.Objects" value="Objects"/> + + <!-- + TODO remove this button. Added it temporary for QA to be able to test new edit wearable + panel (see EXT-6564) + --> + <button + follows="left|top|right" + height="20" + label="edit" + left="0" + top="0" + layout="topleft" + name="edit_wearable_btn" + width="40" /> + + <button + follows="top|left" + height="23" + image_overlay="BackArrow_Off" + layout="topleft" + name="back_btn" + left="5" + tab_stop="false" + top="2" + width="23" /> + <text + follows="top|right" + font="SansSerifHugeBold" + height="26" + layout="topleft" + left_pad="20" + name="title" + text_color="LtGray" + top="0" + value="Edit Outfit" + use_ellipses="true" + width="275" /> + +<!-- "HEADER WITH ICON, STATUS TEXT AND OUTFIT NAME" --> + <panel + bevel_style="none" + follows="top|left|right" + height="45" + label="bottom_panel" + layout="topleft" + left="5" + name="header_panel" + top_pad="5" + width="300"> + <icon + follows="left|top" + height="40" + image_name="t-shirt-image" + left="2" + mouse_opaque="false" + name="outfit_icon" + top="1" + scale_image="true" + visible="true" + width="35" /> + <panel + bevel_style="none" + follows="top|right" + height="40" + label="bottom_panel" + layout="topleft" + left_pad="10" + name="outfit_name_and_status" + top="2" + width="200"> + <text + follows="top|left|right" + font="SansSerif" + height="13" + layout="topleft" + name="status" + text_color="Green" + top="0" + value="Editing..." + use_ellipses="true" + width="275" /> + <text + follows="bottom|left|right" + font="SansSerifHugeBold" + height="26" + layout="topleft" + name="curr_outfit_name" + text_color="LtGray" + top_pad="0" + value="[Current Outfit]" + use_ellipses="true" + width="275" /> + </panel> + </panel> + + +<!-- LIST OF WEARABLES (CURRENT OUTFIT/ WEARABLES TO ADD) --> + <layout_stack + animate="false" + default_tab_group="2" + follows="all" + height="470" + width="300" + layout="topleft" + orientation="vertical" + name="im_panels" + tab_group="1" + top_pad="10" + left="5"> + <layout_panel + layout="topleft" + follows="left|top|right" + height="220" + label="IM Control Panel" + min_height="100" + name="outfit_wearables_panel" + width="300" + auto_resize="true" + user_resize="true"> + + <scroll_list + width="300" + column_padding="0" + draw_heading="false" + draw_stripes="false" + follows="left|top|right|bottom" + layout="topleft" + name="look_items_list" + search_column="1" + sort_column="2" + left="0" + height="193" + top="0"> + <scroll_list.columns + label="Look Item" + name="look_item" + width="285" /> + <scroll_list.columns + label="Outfit Item Sort" + width="0" + sort_column="look_item_sort" + name="look_item_sort" /> + </scroll_list> + + <panel + background_visible="true" + bevel_style="none" + follows="bottom|left|right" + height="27" + label="bottom_panel" + layout="topleft" + left="0" + name="edit_panel" + top_pad="0" + width="300"> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="gear_menu_btn" + top="1" + width="31" /> + <button + is_toggle="true" + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="1" + name="add_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + left_pad="1" + name="new_btn" + top="1" + width="31" /> + <button + follows="bottom|right" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="TrashItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + layout="topleft" + name="remove_from_outfit_btn" + right="-1" + top="1" + width="31" /> + </panel> + </layout_panel> + + + <layout_panel + auto_resize="true" + default_tab_group="3" + height="210" + min_height="210" + name="add_wearables_panel" + width="300" + tab_group="2" + user_resize="true" + visible="false"> + + <!-- *NOTE is not used, invisible and disabled --> + <filter_editor + background_image="TextField_Search_Off" + enabled="false" + follows="left|top|right" + font="SansSerif" + label="Filter" + layout="topleft" + left="5" + width="290" + height="20" + name="look_item_filter" + text_color="black" + text_pad_left="25" + visible="false"/> + + <layout_stack + animate="true" + follows="all" + height="25" + width="300" + layout="topleft" + orientation="horizontal" + name="filter_panels" + top="0" + left="0"> + <layout_panel + layout="topleft" + follows="left|top|right" + height="25" + label="IM Control Panel" + name="filter_button_panel" + width="150" + auto_resize="true" + user_resize="false"> + <text + follows="top|left|right" + font="SansSerifBold" + height="13" + layout="topleft" + left="5" + name="add_to_outfit_label" + text_color="LtGray" + top="3" + value="Add to Outfit:" + use_ellipses="true" + width="270" /> + <button + follows="top|right" + height="20" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + is_toggle="true" + label="O" + layout="topleft" + right="-1" + name="filter_button" + top="3" + width="20" /> + </layout_panel> + <layout_panel + auto_resize="true" + height="25" + min_width="130" + name="filter_combobox_panel" + width="150" + user_resize="false" + visible="false"> + <combo_box + follows="top|left|right" + height="20" + layout="topleft" + right="-5" + name="filter_wearables_combobox" + top="0" + width="130"/> + </layout_panel> + </layout_stack> + + <inventory_panel + allow_multi_select="false" + border="false" + follows="left|top|right|bottom" + height="155" + layout="topleft" + left="0" + mouse_opaque="false" + name="inventory_items" + top_pad="5" + width="300"/> + + <panel + background_visible="true" + bevel_style="none" + follows="left|right|bottom" + height="27" + label="add_wearables_button_bar" + layout="topleft" + left="0" + name="add_wearables_button_bar" + top_pad="0" + width="300"> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Left_Over" + image_overlay="OptionsMenu_Off" + image_selected="Toolbar_Left_Selected" + image_unselected="Toolbar_Left_Off" + layout="topleft" + left="0" + name="wearables_gear_menu_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="F" + layout="topleft" + left_pad="1" + name="folder_view_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="L" + layout="topleft" + left_pad="1" + name="list_view_btn" + top="1" + width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="" + layout="topleft" + left_pad="1" + name="add_to_outfit_btn" + top="1" + width="31" /> + </panel> + </layout_panel> + </layout_stack> + + <panel + follows="left|right|bottom" + height="30" + layout="topleft" + left="5" + top_pad="10" + name="save_revert_button_bar" + width="300"> + <button + follows="bottom|left|right" + height="23" + label="Save" + left="0" + layout="topleft" + name="save_btn" + width="145" /> + <button + follows="bottom|right" + height="23" + name="save_flyout_btn" + label="" + left_pad="-20" + tab_stop="false" + image_selected="SegmentedBtn_Right_Selected_Press" + image_unselected="SegmentedBtn_Right_Off" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Selected_Press" + image_overlay="Arrow_Small_Up" + width="20"/> + <button + follows="bottom|left|right" + height="23" + left_pad="15" + label="Revert" + layout="topleft" + name="revert_btn" + width="145" /> + </panel> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml index 66ef373168..66ed43efec 100644 --- a/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_outfits_inventory.xml @@ -14,7 +14,7 @@ border="false"> <tab_container follows="all" - height="497" + height="501" layout="topleft" left="7" name="appearance_tabs" @@ -58,7 +58,7 @@ height="73" layout="topleft" left="9" - top_pad="3" + top_pad="-1" visible="true" name="bottom_panel" width="310"> @@ -119,13 +119,13 @@ <button follows="bottom|left" height="23" - label="M" + label="Edit Outfit" layout="topleft" right="-140" - name="look_edit_btn" + name="edit_current_outfit_btn" top="26" visible="false" - width="20" /> + width="50" /> </panel> </panel>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 85841da48f..61784fede4 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <!-- Side tray panel --> <panel + default_tab_group="1" follows="all" height="449" label="People" @@ -11,11 +12,17 @@ top="0" width="333"> <string - name="no_people" - value="No people" /> + name="no_recent_people" + value="No recent people. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> + <string + name="no_filtered_recent_people" + value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." /> <string name="no_one_near" - value="No one near" /> + value="No one nearby. Looking for people to hang out with? Try [secondlife:///app/search/people Search] or the [secondlife:///app/worldmap World Map]." /> + <string + name="no_one_filtered_near" + value="Didn't find what you're looking for? Try [secondlife:///app/search/people Search]." /> <string name="no_friends_online" value="No friends online" /> @@ -29,15 +36,15 @@ name="groups_filter_label" value="Filter Groups" /> <!-- - *WORKAROUND: for group_list.no_groups_msg & group_list.no_filtered_groups_msg attributes. + *WORKAROUND: for group_list.no_items_msg & group_list.no_filtered_items_msg attributes. They are not defined as translatable in VLT. See EXT-5931 --> <string name="no_filtered_groups_msg" - value="[secondlife:///app/search/groups Try finding the group in search?]" /> + value="Didn't find what you're looking for? Try [secondlife:///app/search/groups Search]." /> <string name="no_groups_msg" - value="[secondlife:///app/search/groups Try searching for some groups to join.]" /> + value="Looking for Groups to join? Try [secondlife:///app/search/groups Search]." /> <filter_editor follows="left|top|right" height="23" @@ -56,6 +63,7 @@ layout="topleft" left="5" name="tabs" + tab_group="1" tab_min_width="70" tab_height="30" tab_position="top" @@ -81,7 +89,7 @@ bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="352" + height="356" ignore_online_status="true" layout="topleft" left="3" @@ -97,6 +105,7 @@ layout="topleft" left="3" name="bottom_panel" + top_pad="0" width="313"> <button follows="bottom|left" @@ -156,7 +165,7 @@ bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="352" + height="356" layout="topleft" left="3" name="friends_accordion" @@ -204,6 +213,7 @@ layout="topleft" left="3" name="bottom_panel" + top_pad="0" width="313"> <button follows="bottom|left" @@ -237,7 +247,7 @@ layout="topleft" left_pad="1" name="dummy_icon" - width="210" + width="209" /> <button follows="bottom|left" @@ -260,8 +270,8 @@ top="10" width="293" wrap="true"> - To add friends try [secondlife:///app/search/people global search] or use right-click on a Resident to add them as a friend. -If you're looking for people to hang out with, [secondlife:///app/worldmap try the Map]. + Find friends using [secondlife:///app/search/people Search] or right-click on a Resident to add them as a friend. +Looking for people to hang out with? Try the [secondlife:///app/worldmap World Map]. </text> </panel> <panel @@ -287,7 +297,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="352" + height="356" layout="topleft" left="3" name="group_list" @@ -303,6 +313,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t layout="topleft" left="0" name="bottom_panel" + top_pad="0" width="313"> <button follows="bottom|left" @@ -372,7 +383,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t bg_alpha_color="DkGray2" bg_opaque_color="DkGray2" follows="all" - height="352" + height="356" layout="topleft" left="3" multi_select="true" @@ -388,6 +399,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t layout="topleft" left="0" name="bottom_panel" + top_pad="0" width="313"> <button follows="bottom|left" diff --git a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml index 715dc5f23c..41651edaa0 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_list_item.xml @@ -65,6 +65,7 @@ left="103" name="picture_descr" textbox.max_length="1024" + textbox.label="More" textbox.show_context_menu="false" top_pad="0" width="178" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index 9e5ef10d42..9725e9952a 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -275,6 +275,7 @@ layout="topleft" left="5" name="description" + textbox.label="More" top_pad="10" value="Du waltz die spritz" width="300" /> @@ -320,6 +321,7 @@ follows="all" height="223" layout="topleft" + single_expansion="true" left="0" name="advanced_info_accordion" top_pad="10" @@ -742,7 +744,6 @@ bg_focus_color="DkGray2" bg_readonly_color="DkGray2" follows="left|top|right" - handle_edit_keys_directly="true" height="90" layout="topleft" left="10" diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index c61007a9e1..a7a0efcdb3 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" + default_tab_group="1" follows="all" height="570" label="Places" @@ -37,6 +38,7 @@ background_visible="true" name="Places Tabs" tab_min_width="80" tab_height="30" + tab_group="1" tab_position="top" top_pad="10" width="315" /> @@ -132,5 +134,14 @@ background_visible="true" right="-10" top="1" width="60" /> + <button + follows="bottom|left" + height="23" + label="Profile" + layout="topleft" + name="profile_btn" + right="-1" + top="1" + width="111" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index e604e401f6..69e8e6fdcc 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -186,6 +186,32 @@ Automatic position for: function="Pref.applyUIColor" parameter="BackgroundChatColor" /> </color_swatch> + <text + type="string" + length="1" + follows="left|top" + height="12" + layout="topleft" + left="30" + name="UI Size:" + top_pad="5" + width="300"> + UI size + </text> + <slider + control_name="UIScaleFactor" + decimal_digits="2" + follows="left|top" + height="17" + increment="0.025" + initial_value="1" + layout="topleft" + left_delta="52" + max_val="1.4" + min_val="0.75" + name="ui_scale_slider" + top_pad="-14" + width="180" /> <check_box control_name="ShowScriptErrors" follows="left|top" @@ -193,6 +219,7 @@ Automatic position for: label="Show script errors in:" layout="topleft" left="30" + top_pad="10" name="show_script_errors" width="256" /> <radio_group @@ -247,6 +274,7 @@ Automatic position for: top_pad="5" width="200" /> <button + layout="topleft" follows="top|left" enabled_control="EnableVoiceChat" height="23" @@ -257,8 +285,8 @@ Automatic position for: <button.commit_callback function="Pref.VoiceSetKey" /> </button> - <button - enabled_control="EnableVoiceChat" + <button + enabled_control="EnableVoiceChat" follows="top|left" halign="center" height="23" @@ -271,4 +299,15 @@ Automatic position for: <button.commit_callback function="Pref.VoiceSetMiddleMouse" /> </button> + <button + height="23" + label="Other Devices" + left="30" + name="joystick_setup_button" + top_pad="12" + width="155"> + <button.commit_callback + function="Floater.Show" + parameter="pref_joystick" /> + </button> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index eb2112c586..3ef16d2dec 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -342,7 +342,7 @@ layout="topleft" left="30" height="20" - width="120" + width="170" top_pad="20"> Show IMs in: </text> @@ -351,9 +351,9 @@ follows="left|top" layout="topleft" top_delta="0" - left="120" + left="170" height="20" - width="100" + width="130" text_color="White_25" > (requires restart) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index e667fa9a2b..9eaabbe77b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -177,7 +177,7 @@ layout="topleft" left="30" name="start_location_textbox" - top_pad="10" + top_pad="15" width="394"> Start location: </text> @@ -256,26 +256,15 @@ left="50" name="show_my_name_checkbox1" width="300" /> - <check_box - enabled_control="AvatarNameTagMode" - control_name="SmallAvatarNames" - height="16" - initial_value="true" - label="Small name tags" - layout="topleft" - left_delta="175" - name="small_avatar_names_checkbox" - width="200" /> <check_box enabled_control="AvatarNameTagMode" control_name="RenderShowGroupTitleAll" height="16" label="Show group titles" layout="topleft" - left_delta="-175" + left_delta="175" name="show_all_title_checkbox1" - top_pad="5" - width="300" /> + width="200" /> <text type="string" length="1" @@ -354,7 +343,7 @@ left="30" mouse_opaque="false" name="text_box3" - top_pad="10" + top_pad="15" width="240"> Busy mode response: </text> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index c74de043e9..0a56f711dd 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -16,35 +16,8 @@ height="12" layout="topleft" left="30" - name="UI Size:" - top="10" - width="300"> - UI size: - </text> - <slider - can_edit_text="true" - control_name="UIScaleFactor" - decimal_digits="2" - follows="left|top" - height="15" - increment="0.025" - initial_value="1" - layout="topleft" - left_delta="52" - max_val="1.4" - min_val="0.75" - name="ui_scale_slider" - top_pad="2" - width="180" /> - <text - type="string" - length="1" - follows="left|top" - height="12" - layout="topleft" - left="30" name="QualitySpeed" - top_pad="4" + top="10" width="400"> Quality and speed: </text> @@ -314,7 +287,7 @@ left_delta="2" name="AvatarRenderingText" top_pad="5" - width="128"> + width="158"> Avatar rendering: </text> <check_box @@ -359,21 +332,21 @@ increment="8" initial_value="160" label="Draw distance:" - label_width="140" + label_width="185" layout="topleft" - left="216" + left="200" max_val="512" min_val="64" name="DrawDistance" top="3" - width="255" /> + width="296" /> <text type="string" length="1" follows="left|top" height="12" layout="topleft" - left_delta="250" + left_delta="291" name="DrawDistanceMeterText2" top_delta="0" width="128"> @@ -387,13 +360,13 @@ increment="256" initial_value="4096" label="Max. particle count:" - label_width="140" + label_width="185" layout="topleft" - left="216" + left="200" max_val="8192" name="MaxParticleCount" top_pad="7" - width="262" /> + width="303" /> <slider control_name="RenderGlowResolutionPow" decimal_digits="0" @@ -402,7 +375,7 @@ increment="1" initial_value="8" label="Post process quality:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" max_val="9" @@ -410,7 +383,7 @@ name="RenderPostProcess" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="PostProcessText" /> @@ -434,14 +407,14 @@ increment="0.125" initial_value="160" label=" Objects:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" max_val="2" name="ObjectMeshDetail" show_text="false" top_pad="6" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="ObjectMeshDetailText" /> @@ -452,13 +425,13 @@ height="16" initial_value="160" label=" Flexiprims:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" name="FlexibleMeshDetail" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="FlexibleMeshDetailText" /> @@ -470,13 +443,13 @@ increment="0.125" initial_value="160" label=" Trees:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" name="TreeMeshDetail" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="TreeMeshDetailText" /> @@ -488,13 +461,13 @@ increment="0.125" initial_value="160" label=" Avatars:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" name="AvatarMeshDetail" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="AvatarMeshDetailText" /> @@ -506,7 +479,7 @@ increment="0.125" initial_value="160" label=" Terrain:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" max_val="2" @@ -514,7 +487,7 @@ name="TerrainMeshDetail" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="TerrainMeshDetailText" /> @@ -528,7 +501,7 @@ increment="8" initial_value="160" label=" Sky:" - label_width="140" + label_width="185" layout="topleft" left_delta="0" max_val="128" @@ -536,7 +509,7 @@ name="SkyMeshDetail" show_text="false" top_pad="4" - width="223"> + width="264"> <slider.commit_callback function="Pref.UpdateSliderText" parameter="SkyMeshDetailText" /> @@ -547,7 +520,7 @@ follows="left|top" height="12" layout="topleft" - left="444" + left="469" name="PostProcessText" top="305" width="128"> @@ -632,7 +605,7 @@ follows="left|top" height="12" layout="topleft" - left_delta="-230" + left="200" name="LightingDetailText" top_pad="8" width="140"> @@ -643,15 +616,13 @@ draw_border="false" height="38" layout="topleft" - left_delta="0" name="LightingDetailRadio" top_pad="5" - width="321"> + width="200"> <radio_item height="16" label="Sun and moon only" layout="topleft" - left="3" name="SunMoon" value="0" top="3" @@ -660,7 +631,6 @@ height="16" label="Nearby local lights" layout="topleft" - left_delta="0" name="LocalLights" value="1" top_delta="16" @@ -672,7 +642,7 @@ follows="left|top" height="12" layout="topleft" - left="358" + left_pad="-30" name="TerrainDetailText" top="465" width="155"> @@ -686,23 +656,21 @@ left_delta="0" name="TerrainDetailRadio" top_pad="5" - width="321"> + width="70"> <radio_item height="16" label="Low" layout="topleft" - left="3" name="0" top="3" - width="315" /> + width="50" /> <radio_item height="16" label="High" layout="topleft" - left_delta="0" name="2" top_delta="16" - width="315" /> + width="50" /> </radio_group> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 2123e62daa..500e65b916 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -9,18 +9,6 @@ name="Input panel" top="1" width="517"> - <button - height="23" - label="Other Devices" - layout="topleft" - left="30" - name="joystick_setup_button" - top="10" - width="155"> - <button.commit_callback - function="Floater.Show" - parameter="pref_joystick" /> - </button> <text type="string" length="1" @@ -29,7 +17,7 @@ layout="topleft" left="30" name="Mouselook:" - top_pad="10" + top="10" width="300"> Mouselook: </text> @@ -210,7 +198,6 @@ enabled="false" follows="left|top" font="SansSerif" - handle_edit_keys_directly="true" height="23" layout="topleft" left="80" diff --git a/indra/newview/skins/default/xui/en/panel_profile.xml b/indra/newview/skins/default/xui/en/panel_profile.xml index 30191aecb6..a666608103 100644 --- a/indra/newview/skins/default/xui/en/panel_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_profile.xml @@ -107,6 +107,8 @@ layout="topleft" left="107" textbox.max_length="512" + textbox.label="More" + textbox.show_context_menu="true" name="sl_description_edit" top_pad="-3" translate="false" @@ -151,6 +153,8 @@ layout="topleft" left="107" textbox.max_length="512" + textbox.label="More" + textbox.show_context_menu="true" name="fl_description_edit" top_pad="-3" translate="false" @@ -289,6 +293,8 @@ left="7" name="sl_groups" textbox.max_length="512" + textbox.label="More" + textbox.show_context_menu="true" top_pad="0" translate="false" width="290" diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml index dc8f71c868..2b2ea78fac 100644 --- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml @@ -113,7 +113,6 @@ max_length="65535" name="covenant_editor" top_delta="30" - handle_edit_keys_directly="true" width="340" word_wrap="true"> There is no Covenant provided for this Estate. diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index c5b2512fba..08e36d5e57 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -2,14 +2,14 @@ <panel border="false" follows="top|left" - height="320" + height="510" help_topic="panel_region_estate_tab" label="Estate" layout="topleft" left="0" name="Estate" top="320" - width="480"> + width="530"> <text type="string" length="1" @@ -20,7 +20,7 @@ name="estate_help_text" top="14" word_wrap="true" - width="250"> + width="300"> Changes to settings on this tab will affect all regions in the estate. </text> <text @@ -33,7 +33,7 @@ left_delta="0" name="estate_text" top_pad="2" - width="80"> + width="140"> Estate: </text> <text @@ -59,7 +59,7 @@ left_delta="0" name="owner_text" top_pad="2" - width="80"> + width="150"> Estate owner: </text> <text @@ -82,7 +82,7 @@ layout="topleft" left_delta="-4" top_pad="5" - width="250" /> + width="300" /> <check_box height="20" label="Use Global Time" @@ -184,26 +184,26 @@ layout="topleft" name="apply_btn" top_pad="10" - left="78" + left="110" width="97" /> <button follows="left|top" height="23" label="Send Message To Estate..." layout="topleft" - left="50" + left="45" name="message_estate_btn" top_pad="20" - width="160" /> + width="220" /> <button follows="left|top" height="23" label="Kick Resident from Estate..." layout="topleft" - left="50" + left="45" name="kick_user_from_estate_btn" top_pad="5" - width="160" /> + width="220" /> <text type="string" @@ -213,7 +213,7 @@ height="20" layout="topleft" name="estate_manager_label" - right="470" + right="520" width="200"> Estate Managers: </text> @@ -222,7 +222,7 @@ follows="top|left" height="71" layout="topleft" - right="470" + right="520" top_pad="-5" width="200" /> <name_list @@ -240,7 +240,7 @@ label="Remove..." layout="topleft" name="remove_estate_manager_btn" - right="470" + right="520" top_pad="5" width="97" /> <button @@ -269,7 +269,7 @@ follows="top|left" height="71" layout="topleft" - right="470" + right="520" top_pad="-5" width="200" /> <name_list @@ -287,7 +287,7 @@ label="Remove..." layout="topleft" name="remove_allowed_avatar_btn" - right="470" + right="520" top_pad="5" width="97" /> <button @@ -316,7 +316,7 @@ follows="top|left" height="71" layout="topleft" - right="470" + right="520" top_pad="-5" width="200" /> <name_list @@ -334,7 +334,7 @@ label="Remove..." layout="topleft" name="remove_allowed_group_btn" - right="470" + right="520" top_pad="5" width="97" /> <button @@ -363,7 +363,7 @@ follows="top|left" height="71" layout="topleft" - right="470" + right="520" top_pad="-5" width="200" /> <name_list @@ -381,7 +381,7 @@ label="Remove..." layout="topleft" name="remove_banned_avatar_btn" - right="470" + right="520" top_pad="5" width="97" /> <button diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index d444420550..c5c66c04d5 100644 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -143,7 +143,6 @@ name="Script Editor" width="487" show_line_numbers="true" - handle_edit_keys_directly="true" word_wrap="true"> Loading... </text_editor> diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index 44afadf65a..19eb4bb0d6 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - height="152" + height="157" layout="topleft" left="0" name="LLScrollingPanelParam" top="152" - width="270"> + width="290"> <text follows="left|top" height="16" layout="topleft" - left="4" + left="12" name="min param text" - top="116" - width="128" /> + top="120" + width="120" /> <text follows="left|top" height="16" layout="topleft" - left_pad="6" + left="155" name="max param text" top_delta="0" - width="128" /> + width="120" /> <text type="string" length="1" follows="left|top" height="16" layout="topleft" - left="8" + left="12" name="Loading..." top="11" width="128"> @@ -40,12 +40,42 @@ follows="left|top" height="16" layout="topleft" - left_pad="6" + left="155" name="Loading...2" top_delta="0" width="128"> Loading... </text> + <view_border + layout="topleft" + follows="left|top" + left="7" + top="5" + width="132" + height="132" + thickness="2" + shadow_light_color="0.3 0.3 0.3 1" + highlight_light_color="0.3 0.3 0.3 1" + highlight_dark_color="0.3 0.3 0.3 1" + shadow_dark_color="0.3 0.3 0.3 1" + bevel_style="in" + name="left_border" + /> + <view_border + layout="topleft" + follows="left|top" + left_pad="10" + top_delta="0" + width="132" + height="132" + thickness="2" + shadow_light_color="0.3 0.3 0.3 1" + highlight_light_color="0.3 0.3 0.3 1" + highlight_dark_color="0.3 0.3 0.3 1" + shadow_dark_color="0.3 0.3 0.3 1" + bevel_style="in" + name="right_border" + /> <button enabled="false" height="132" @@ -54,10 +84,10 @@ image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" - left="2" + left="7" name="less" tab_stop="false" - top="0" + top="5" width="132" /> <button enabled="false" @@ -67,7 +97,7 @@ image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" - left_pad="2" + left_pad="10" name="more" tab_stop="false" top_delta="0" @@ -80,11 +110,11 @@ increment="1" initial_value="0" label="[DESC]" - label_width="100" - layout="topleft" + layout="bottom|left" left="6" max_val="100" name="param slider" - top="134" - width="258" /> + bottom="1" + width="274" + slider_label.font.style="BOLD" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_teleport_history.xml b/indra/newview/skins/default/xui/en/panel_teleport_history.xml index cbcaf1a58c..21addb8e6f 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -6,7 +6,7 @@ bg_alpha_color="DkGray"> <accordion follows="left|top|right|bottom" - height="369" + height="373" layout="topleft" left="3" top="0" diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index 11069b3ac3..92b4c17247 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -55,7 +55,7 @@ clip_partial="true" visible="false" follows="left|top|right|bottom" - font="SansSerifBold" + font="SansSerif" height="20" layout="topleft" left="20" @@ -64,7 +64,6 @@ text_color="white" top="5" translate="false" - v_pad="5" use_ellipses="true" width="260"> Toast text; diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml index cd66c56ca1..7b22b2cce1 100644 --- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml +++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml @@ -32,9 +32,9 @@ parameter="MuteAudio" /> </slider> <button - left="7" + left="10" top_pad="9" - width="18" + width="12" height="12" follows="top|left" name="prefs_btn" diff --git a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml index b3d55fec65..73650a19dc 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_appearance.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_appearance.xml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel background_visible="true" +default_tab_group="1" follows="all" height="570" label="Outfits" @@ -90,6 +91,7 @@ width="333"> min_height="410" width="320" left="0" + tab_group="1" top_pad="6" follows="all" /> <!-- <button @@ -102,14 +104,17 @@ width="333"> name="newlook_btn" width="100" />--> <panel - class="panel_look_info" - filename="panel_look_info.xml" + class="panel_outfit_edit" + filename="panel_outfit_edit.xml" + height="550" follows="all" layout="topleft" - left="0" - name="panel_look_info" - top="35" - visible="false" /> + left="5" + min_height="410" + name="panel_outfit_edit" + top="5" + visible="false" + width="320"/> <panel class="panel_edit_wearable" filename="panel_edit_wearable.xml" @@ -117,6 +122,6 @@ width="333"> layout="topleft" left="0" name="panel_edit_wearable" - top="35" + top="0" visible="false" /> </panel> diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index a233d42568..812d94c55f 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -46,17 +46,27 @@ left="0" name="info_btn" top="0" - width="153" /> + width="102" /> + <button + enabled="true" + follows="bottom|left" + height="23" + label="Share" + layout="topleft" + left="105" + name="share_btn" + top="0" + width="102" /> <button enabled="false" follows="bottom|left" height="23" label="Wear" layout="topleft" - left="156" + left="210" name="wear_btn" top="0" - width="152" /> + width="102" /> <button enabled="false" follows="bottom|left" @@ -64,19 +74,19 @@ label="Play" layout="topleft" name="play_btn" - left="156" + left="210" top="0" - width="152" /> + width="102" /> <button enabled="false" follows="bottom|left" height="23" label="Teleport" layout="topleft" - left="156" + left="210" name="teleport_btn" top="0" - width="152" /> + width="102" /> </panel> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 00bbbd65d0..80fddcba43 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -114,6 +114,7 @@ <!-- ButtonToolTips, llfloater.cpp --> <string name="BUTTON_CLOSE_DARWIN">Close (⌘W)</string> <string name="BUTTON_CLOSE_WIN">Close (Ctrl+W)</string> + <string name="BUTTON_CLOSE_CHROME">Close</string>> <string name="BUTTON_RESTORE">Restore</string> <string name="BUTTON_MINIMIZE">Minimize</string> <string name="BUTTON_TEAR_OFF">Tear Off</string> @@ -147,6 +148,8 @@ <!-- Group name: text shown for LLUUID::null --> <string name="GroupNameNone">(none)</string> + <string name="AvalineCaller">Avaline Caller [ORDER]</string> + <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. --> <string name="AssetErrorNone">No error</string> <string name="AssetErrorRequestFailed">Asset request: failed</string> @@ -2153,7 +2156,7 @@ Clears (deletes) the media and all params from the given face. <!-- Region/Estate Covenant --> <string name="RegionNoCovenant">There is no Covenant provided for this Estate.</string> <string name="RegionNoCovenantOtherOwner">There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not Linden Lab. Please contact the Estate Owner for sales details.</string> - <string name="covenant_last_modified">Last Modified:</string> + <string name="covenant_last_modified" value="Last Modified: " /> <!-- use value="" to keep the trailing space --> <string name="none_text" value=" (none) " /> <string name="never_text" value=" (never) " /> @@ -2939,6 +2942,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_moderator_label">(Moderator)</string> <!-- voice calls --> + <string name="answered_call">Your call has been answered</string> <string name="started_call">Started a voice call</string> <string name="joined_call">Joined the voice call</string> @@ -3048,10 +3052,14 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="unread_chat_multiple"> [SOURCES] have said something new </string>" + <string name="session_initialization_timed_out_error"> + The session initialization is timed out + </string> <!-- Financial operations strings --> <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT]</string> <string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string> + <string name="you_paid_ldollars_no_info">You paid L$[AMOUNT].</string> <string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string> <string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string> <string name="for a parcel of land">for a parcel of land</string> @@ -3095,4 +3103,11 @@ Abuse Report</string> <string name="New Script">New Script</string> <string name="New Folder">New Folder</string> <string name="Contents">Contents</string> -</strings> + + <!-- birth date format shared by avatar inspector and profile panels --> + <string name="AvatarBirthDateFormat">[mthnum,datetime,slt]/[day,datetime,slt]/[year,datetime,slt]</string> + + <string name="DefaultMimeType">none/none</string> + <string name="texture_load_dimensions_error">Can't load images larger than [WIDTH]*[HEIGHT]</string> + + </strings> diff --git a/indra/newview/skins/default/xui/en/widgets/chat_history.xml b/indra/newview/skins/default/xui/en/widgets/chat_history.xml index aa3ea736b8..ef885e8045 100644 --- a/indra/newview/skins/default/xui/en/widgets/chat_history.xml +++ b/indra/newview/skins/default/xui/en/widgets/chat_history.xml @@ -2,7 +2,6 @@ <chat_history message_header="panel_chat_header.xml" message_separator="panel_chat_separator.xml" - message_plaintext_separator="panel_chat_plaintext_separator.xml" left_text_pad="10" right_text_pad="15" left_widget_pad="0" diff --git a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml index d9b6387f0d..6190ea7872 100644 --- a/indra/newview/skins/default/xui/en/widgets/expandable_text.xml +++ b/indra/newview/skins/default/xui/en/widgets/expandable_text.xml @@ -5,7 +5,7 @@ allow_html="true" allow_scroll="true" bg_visible="false" - more_label="More" + label="More" follows="left|top|right" name="text" read_only="true" diff --git a/indra/newview/skins/default/xui/en/widgets/line_editor.xml b/indra/newview/skins/default/xui/en/widgets/line_editor.xml index a21e3f2645..a054960bf8 100644 --- a/indra/newview/skins/default/xui/en/widgets/line_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/line_editor.xml @@ -3,7 +3,6 @@ background_image_disabled="TextField_Disabled" background_image_focused="TextField_Active" select_on_focus="false" - handle_edit_keys_directly="false" commit_on_focus_lost="true" ignore_tab="true" cursor_color="TextCursorColor" diff --git a/indra/newview/skins/default/xui/en/widgets/text.xml b/indra/newview/skins/default/xui/en/widgets/text.xml index 855584a0db..998ec5b170 100644 --- a/indra/newview/skins/default/xui/en/widgets/text.xml +++ b/indra/newview/skins/default/xui/en/widgets/text.xml @@ -15,6 +15,7 @@ bg_visible="false" border_visible="false" hover="false" + sound_flags="0" text_color="LabelTextColor" v_pad="0" max_length="4096"/> diff --git a/indra/newview/skins/default/xui/es/floater_about_land.xml b/indra/newview/skins/default/xui/es/floater_about_land.xml index c453d415b4..6118a63872 100644 --- a/indra/newview/skins/default/xui/es/floater_about_land.xml +++ b/indra/newview/skins/default/xui/es/floater_about_land.xml @@ -264,7 +264,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s [COUNT] </text> <text left="4" name="Autoreturn" width="412"> - Devolución automática de objetos de otros Residentes (minutos, 0 para desactivarla): + Devolución automát. de objetos de otros (en min., 0 la desactiva): </text> <line_editor name="clean other time" right="-20"/> <text name="Object Owners:" width="150"> @@ -275,7 +275,7 @@ Vaya al menú Mundo > Acerca del terreno o seleccione otra parcela para ver s <name_list name="owner list"> <name_list.columns label="Tipo" name="type"/> <name_list.columns label="Nombre" name="name"/> - <name_list.columns label="Número" name="count"/> + <name_list.columns label="Núm." name="count"/> <name_list.columns label="Más recientes" name="mostrecent"/> </name_list> </panel> diff --git a/indra/newview/skins/default/xui/es/floater_buy_land.xml b/indra/newview/skins/default/xui/es/floater_buy_land.xml index 9a0a566a55..a40f65d5d0 100644 --- a/indra/newview/skins/default/xui/es/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/es/floater_buy_land.xml @@ -13,17 +13,17 @@ No puede unirse ni dividirse. </floater.string> <floater.string name="cant_buy_for_group"> - No tiene permiso de comprar terreno para el grupo que tiene activado. + No tienes permiso de comprar terreno para el grupo que tienes activado. </floater.string> <floater.string name="no_land_selected"> No se ha seleccionado terreno. </floater.string> <floater.string name="multiple_parcels_selected"> Se han seleccionado varias parcelas diferentes. -Inténtelo seleccionando un área más pequeña. +Inténtalo seleccionando un área más pequeña. </floater.string> <floater.string name="no_permission"> - No tiene permiso de comprar terreno para el grupo que tiene activado. + No tienes permiso de comprar terreno para el grupo que tienes activado. </floater.string> <floater.string name="parcel_not_for_sale"> La parcela seleccionada no está en venta. @@ -32,20 +32,20 @@ Inténtelo seleccionando un área más pequeña. El grupo ya es propietario de la parcela. </floater.string> <floater.string name="you_already_own"> - Usted ya es propietario de la parcela. + Ya eres propietario de la parcela. </floater.string> <floater.string name="set_to_sell_to_other"> - La parcela seleccionada está marcada para ser vendida a otro + La parcela seleccionada está marcada para ser vendida a otro. </floater.string> <floater.string name="no_public_land"> El área seleccionada no tiene terreno público. </floater.string> <floater.string name="not_owned_by_you"> - Está seleccionado un terreno propiedad de otro Residente. + Estás seleccionado un terreno propiedad de otro Residente. Prueba a seleccionar un área más pequeña. </floater.string> <floater.string name="processing"> - Procesando su compra... + Procesando tu compra... (Llevará uno o dos minutos). </floater.string> @@ -68,10 +68,10 @@ Prueba a seleccionar un área más pequeña. no necesita </floater.string> <floater.string name="must_upgrade"> - Para poseer terreno, su cuenta debe ascender de categoría. + Para poseer terreno, tu cuenta debe ascender de categoría. </floater.string> <floater.string name="cant_own_land"> - Su cuenta puede poseer terreno. + Tu cuenta puede poseer terreno. </floater.string> <floater.string name="land_holdings"> Tienes [BUYER] m² de terreno. @@ -112,16 +112,16 @@ los suficientes créditos de uso en contribución de terreno para cubrir esta parcela. </floater.string> <floater.string name="have_enough_lindens"> - Tiene [AMOUNT] L$, cantidad suficiente para comprar este terreno. + Tienes [AMOUNT] L$, cantidad suficiente para comprar este terreno. </floater.string> <floater.string name="not_enough_lindens"> - Sólo tiene [AMOUNT] L$. Necesitaría [AMOUNT2] L$ más. + Sólo tienes [AMOUNT] L$. Necesitarías [AMOUNT2] L$ más. </floater.string> <floater.string name="balance_left"> - Tras la compra, aún tendrá [AMOUNT] L$. + Tras la compra, aún tendrás [AMOUNT] L$. </floater.string> <floater.string name="balance_needed"> - Para costearse este terreno, deberá comprar, al menos, [AMOUNT] L$. + Para costearte este terreno, deberás comprar, al menos, [AMOUNT] L$. </floater.string> <floater.string name="no_parcel_selected"> (No se ha seleccionado una parcela) @@ -163,7 +163,7 @@ para cubrir esta parcela. Podrá o no unirse o dividirse. </text> <text name="covenant_text"> - Deve aceptar el Contrato del Estado: + Debes aceptar el Contrato del Estado: </text> <text left="470" name="covenant_timestamp_text"/> <text_editor name="covenant_editor"> @@ -198,7 +198,7 @@ se vende con los objetos </text> <button label="Ir al sitio web" name="error_web"/> <text name="account_action"> - Ascienda a la categoría de miembro premium. + Asciende a la categoría de miembro premium. </text> <text name="account_reason"> Sólo pueden ser propietarios de terreno los miembros premium. @@ -209,7 +209,7 @@ se vende con los objetos <combo_box.item label="6.00 US$/mes, facturados anualmente" name="US$6.00/month,billedannually"/> </combo_box> <text name="land_use_action"> - Aumenta su cuota mensual por uso de terreno a 40 US$/mes. + Aumenta tu cuota mensual por uso de terreno a 40 US$/mes. </text> <text name="land_use_reason"> Tienes 1309 m² de terreno. @@ -219,7 +219,7 @@ Esta parcela es de 512 m². Pagar al residente Joe 4.000 L$ por el terreno </text> <text name="currency_reason"> - Tiene 2.100 L$. + Tienes 2.100 L$. </text> <text name="currency_action"> Comprar más L$ @@ -231,7 +231,7 @@ Esta parcela es de 512 m². por, aprox., [LOCAL_AMOUNT] </text> <text name="currency_balance"> - Tiene 2.100 L$. + Tienes 2.100 L$. </text> <check_box label="Quitar [AMOUNT] m² de las contribuciones de grupo." name="remove_contribution"/> <button label="Comprar" name="buy_btn"/> diff --git a/indra/newview/skins/default/xui/es/floater_customize.xml b/indra/newview/skins/default/xui/es/floater_customize.xml index 8daf2bed15..b7058d4314 100644 --- a/indra/newview/skins/default/xui/es/floater_customize.xml +++ b/indra/newview/skins/default/xui/es/floater_customize.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="floater customize" title="APARIENCIA" width="527"> - <tab_container name="customize tab container" width="525"> +<floater name="floater customize" title="APARIENCIA"> + <tab_container name="customize tab container"> <text label="Partes del cuerpo" name="body_parts_placeholder"> Partes del cuerpo </text> - <panel label="Forma" name="Shape" width="389"> + <panel label="Forma" name="Shape"> <button label="Restablecer" label_selected="Restablecer" name="Revert"/> <button label="Cuerpo" label_selected="Cuerpo" name="Body"/> <button label="Cabeza" label_selected="Cabeza" name="Head"/> @@ -40,12 +40,12 @@ <text name="no modify instructions"> No tiene permiso para modificar este ítem. </text> - <text name="Item Action Label" right="107"> + <text name="Item Action Label"> Forma: </text> <button label="Crear una forma nueva" label_selected="Crear una forma nueva" name="Create New"/> - <button label="Guardar" label_selected="Guardar" left="113" name="Save"/> - <button label="Guardar como..." label_selected="Guardar como..." left="199" name="Save As" width="102"/> + <button label="Guardar" label_selected="Guardar" name="Save"/> + <button label="Guardar como..." label_selected="Guardar como..." name="Save As"/> </panel> <panel label="Piel" name="Skin"> <button label="Color de piel" label_selected="Color de piel" name="Skin Color" width="115"/> @@ -522,7 +522,7 @@ <button label="Revertir" label_selected="Revertir" name="Revert"/> </panel> </tab_container> - <scroll_container left="230" name="panel_container"/> + <scroll_container name="panel_container"/> <button label="Información del script" label_selected="Información del script" name="script_info" tool_tip="Mostrar los scripts anexados a tu avatar"/> <button label="Hacer un vestuario" label_selected="Hacer un vestuario" name="make_outfit_btn"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> diff --git a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml index fc2b12d1e4..9c3ac1be0e 100644 --- a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml @@ -57,9 +57,9 @@ <text name="WL12amHash2"> | </text> - <button font="SansSerifSmall" width="96" left="546" label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/> - <button font="SansSerifSmall" width="96" left="546" label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/> - <text font="SansSerifSmall" name="WLCurKeyFrameText" width="190"> + <button label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/> + <button label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/> + <text name="WLCurKeyFrameText"> Configuración del fotograma clave: </text> <text name="WLCurKeyTimeText"> @@ -86,9 +86,9 @@ </text> <button label="Probar" label_selected="Probar" name="WLAnimSky"/> <button label="Parar" label_selected="Parar" name="WLStopAnimSky"/> - <button width="150" font="SansSerifSmall" label="Usar el horario del estado" label_selected="Ir al horario del estado" name="WLUseLindenTime"/> - <button left="440" width="180" font="SansSerifSmall" label="Guardar este tipo de día" label_selected="Guardar este tipo de día" name="WLSaveDayCycle"/> - <button left="440" width="180" font="SansSerifSmall" label="Cargar y probar un tipo de día" label_selected="Cargar y probar un tipo de día" name="WLLoadDayCycle"/> + <button label="Usar el horario del estado" label_selected="Ir al horario del estado" name="WLUseLindenTime"/> + <button label="Guardar este tipo de día" label_selected="Guardar este tipo de día" name="WLSaveDayCycle"/> + <button label="Cargar y probar un tipo de día" label_selected="Cargar y probar un tipo de día" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_incoming_call.xml b/indra/newview/skins/default/xui/es/floater_incoming_call.xml index 2b5fc7f193..021e5fb6b7 100644 --- a/indra/newview/skins/default/xui/es/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/es/floater_incoming_call.xml @@ -22,6 +22,6 @@ ¿Quieres dejar [CURRENT_CHAT] y entrar a este chat de voz? </text> <button label="Aceptar" label_selected="Aceptar" name="Accept"/> - <button label="Expulsar" label_selected="Expulsar" name="Reject"/> + <button label="Rechazar" label_selected="Rechazar" name="Reject"/> <button label="Comenzar un MI" name="Start IM"/> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml index 0cbee11bfb..c9d639d8cf 100644 --- a/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/es/floater_inventory_view_finder.xml @@ -11,12 +11,12 @@ <check_box label="Sonidos" name="check_sound"/> <check_box label="Texturas" name="check_texture"/> <check_box label="Fotos" name="check_snapshot"/> - <button label="Todo" label_selected="Todo" name="All" width="70"/> - <button label="Nada" label_selected="Nada" name="None" width="70" bottom_delta="0" left="83"/> - <check_box label="Mostrar siempre las carpetas" name="check_show_empty"/> + <button label="Todos" label_selected="Todo" name="All"/> + <button label="Ninguno" label_selected="Nada" name="None"/> + <check_box label="Mostrar siempre las carpetas" name="check_show_empty"/> <check_box label="Desde el fin de sesión" name="check_since_logoff" bottom_delta="-36"/> <text name="- OR -"> - - O - + - o - </text> <spinner label="horas atrás" name="spin_hours_ago"/> <spinner label="días atrás" name="spin_days_ago"/> diff --git a/indra/newview/skins/default/xui/es/floater_joystick.xml b/indra/newview/skins/default/xui/es/floater_joystick.xml index dbd2e4f04e..2c1804bd90 100644 --- a/indra/newview/skins/default/xui/es/floater_joystick.xml +++ b/indra/newview/skins/default/xui/es/floater_joystick.xml @@ -16,7 +16,7 @@ Modos de control: </text> <check_box label="Avatar" name="JoystickAvatarEnabled"/> - <check_box label="Construir" left="192" name="JoystickBuildEnabled"/> + <check_box label="Construir" name="JoystickBuildEnabled"/> <check_box label="Flycam" name="JoystickFlycamEnabled"/> <text name="XScale"> Escala: X @@ -27,7 +27,7 @@ <text name="ZScale"> Escala: Z </text> - <text left="3" name="PitchScale" width="115"> + <text name="PitchScale"> Escala: arriba/abajo </text> <text name="YawScale"> @@ -45,10 +45,10 @@ <text name="ZDeadZone"> Zona muerta Z </text> - <text left="3" name="PitchDeadZone" width="115"> + <text name="PitchDeadZone"> Zona muerta arri./aba. </text> - <text left="3" name="YawDeadZone" width="115"> + <text name="YawDeadZone"> Zona muerta izq./der. </text> <text name="RollDeadZone"> @@ -63,7 +63,7 @@ <text name="ZoomDeadZone"> Zona muerta zoom </text> - <button font="SansSerifSmall" label="Por defecto del SpaceNavigator" left="330" name="SpaceNavigatorDefaults" width="210"/> + <button font="SansSerifSmall" label="Por defecto del SpaceNavigator" name="SpaceNavigatorDefaults"/> <button label="OK" label_selected="OK" left="330" name="ok_btn"/> <button label="Cancelar" label_selected="Cancelar" left_delta="120" name="cancel_btn"/> <stat_view label="Monitor del joystick" name="axis_view"> diff --git a/indra/newview/skins/default/xui/es/floater_land_holdings.xml b/indra/newview/skins/default/xui/es/floater_land_holdings.xml index 36a02b7300..ed7055b3a1 100644 --- a/indra/newview/skins/default/xui/es/floater_land_holdings.xml +++ b/indra/newview/skins/default/xui/es/floater_land_holdings.xml @@ -17,7 +17,7 @@ <column label="Superficie" name="area"/> </scroll_list> <text name="allowed_label"> - Propiedades de terreno permitidas en el plan de pago actual: + Propiedad de terreno permitida en el plan de pago: </text> <text name="allowed_text"> [AREA] m² diff --git a/indra/newview/skins/default/xui/es/floater_preferences.xml b/indra/newview/skins/default/xui/es/floater_preferences.xml index 37d56ea839..61f12fc0d7 100644 --- a/indra/newview/skins/default/xui/es/floater_preferences.xml +++ b/indra/newview/skins/default/xui/es/floater_preferences.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater min_width="350" name="Preferences" title="PREFERENCIAS" width="646"> +<floater name="Preferences" title="PREFERENCIAS"> <button label="OK" label_selected="OK" name="OK"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> - <tab_container name="pref core" tab_width="146" width="646"> + <tab_container name="pref core"> <panel label="General" name="general"/> <panel label="Gráficos" name="display"/> <panel label="Privacidad" name="im"/> diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml index 9c5fea9267..59f953c239 100644 --- a/indra/newview/skins/default/xui/es/floater_tools.xml +++ b/indra/newview/skins/default/xui/es/floater_tools.xml @@ -182,7 +182,7 @@ <button label="Configurar..." label_selected="Configurar..." name="button set group" tool_tip="Elige un grupo con el que compartir los permisos de este objeto"/> <name_box initial_value="Cargando..." name="Group Name Proxy"/> <button label="Transferir" label_selected="Transferir" name="button deed" tool_tip="La transferencia entrega este objeto con los permisos del próximo propietario. Los objetos compartidos por el grupo pueden ser transferidos por un oficial del grupo."/> - <check_box label="Comprtir" name="checkbox share with group" tool_tip="Permite que todos los miembros del grupo compartan tus permisos de modificación en este objeto. Debes transferirlo para activar las restricciones según los roles."/> + <check_box label="Compartir" name="checkbox share with group" tool_tip="Permite que todos los miembros del grupo compartan tus permisos de modificación en este objeto. Debes transferirlo para activar las restricciones según los roles."/> <text name="label click action" width="180"> Al tocarlo: </text> @@ -475,7 +475,7 @@ máximo" name="checkbox fullbright"/> <text name="label_area"> Área: [AREA] m² </text> - <button label="Acerca del terreno" label_selected="Acerca del terreno" name="button about land" width="140"/> + <button label="Acerca del terreno" label_selected="Acerca del terreno" name="button about land"/> <check_box label="Mostrar los propietarios" name="checkbox show owners" tool_tip="El color de las parcelas es según su propietario: Verde = Su terreno @@ -492,7 +492,7 @@ Gris = Público"/> <text name="label_parcel_trans"> Transacciones de terreno </text> - <button label="Comprar terreno" label_selected="Comprar terreno" name="button buy land" width="140"/> - <button label="Abandonar el terreno" label_selected="Abandonar el terreno" name="button abandon land" width="140"/> + <button label="Comprar terreno" label_selected="Comprar terreno" name="button buy land"/> + <button label="Abandonar el terreno" label_selected="Abandonar el terreno" name="button abandon land"/> </panel> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_windlight_options.xml b/indra/newview/skins/default/xui/es/floater_windlight_options.xml index 9bc3750951..585a42e429 100644 --- a/indra/newview/skins/default/xui/es/floater_windlight_options.xml +++ b/indra/newview/skins/default/xui/es/floater_windlight_options.xml @@ -157,8 +157,7 @@ </text> <button label="?" name="WLCloudScaleHelp"/> <text font="SansSerifSmall" name="WLCloudDetailText"> - Detalle de las nubes -(Posición/Densidad) + Detalle de las nubes (Posición/Densidad) </text> <button label="?" name="WLCloudDetailHelp"/> <text bottom="-113" name="BHText8"> diff --git a/indra/newview/skins/default/xui/es/language_settings.xml b/indra/newview/skins/default/xui/es/language_settings.xml index 71418d446a..1ade4ba300 100644 --- a/indra/newview/skins/default/xui/es/language_settings.xml +++ b/indra/newview/skins/default/xui/es/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">spanish</string> + <string name="DarwinLocale">es_ES.UTF-8</string> + <string name="LinuxLocale">es_ES.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/es/menu_attachment_self.xml b/indra/newview/skins/default/xui/es/menu_attachment_self.xml index c5afb99d49..8cbe4299a8 100644 --- a/indra/newview/skins/default/xui/es/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/es/menu_attachment_self.xml @@ -4,7 +4,7 @@ <menu_item_call label="Editar" name="Edit..."/> <menu_item_call label="Quitar" name="Detach"/> <menu_item_call label="Soltar" name="Drop"/> - <menu_item_call label="Levantarse" name="Stand Up"/> + <menu_item_call label="Levantarme" name="Stand Up"/> <menu_item_call label="Mi apariencia" name="Appearance..."/> <menu_item_call label="Mis amigos" name="Friends..."/> <menu_item_call label="Mis grupos" name="Groups..."/> diff --git a/indra/newview/skins/default/xui/es/menu_avatar_self.xml b/indra/newview/skins/default/xui/es/menu_avatar_self.xml index 46b6d3ece6..67e56844b1 100644 --- a/indra/newview/skins/default/xui/es/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/es/menu_avatar_self.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Self Pie"> - <menu_item_call label="Levantarse" name="Stand Up"/> + <menu_item_call label="Levantarme" name="Stand Up"/> <context_menu label="Quitarme ▶" name="Take Off >"> <context_menu label="Ropas ▶" name="Clothes >"> <menu_item_call label="Camisa" name="Shirt"/> diff --git a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml index cb8fb82f0d..f21866e54f 100644 --- a/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml +++ b/indra/newview/skins/default/xui/es/menu_inspect_self_gear.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <menu name="Gear Menu"> - <menu_item_call label="Levantarse" name="stand_up"/> + <menu_item_call label="Levantarme" name="stand_up"/> <menu_item_call label="Mi apariencia" name="my_appearance"/> <menu_item_call label="Mi perfil" name="my_profile"/> <menu_item_call label="Mis amigos" name="my_friends"/> diff --git a/indra/newview/skins/default/xui/es/menu_land.xml b/indra/newview/skins/default/xui/es/menu_land.xml index c315cb2f2c..b0f15be1b6 100644 --- a/indra/newview/skins/default/xui/es/menu_land.xml +++ b/indra/newview/skins/default/xui/es/menu_land.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <context_menu name="Land Pie"> <menu_item_call label="Acerca del terreno" name="Place Information..."/> - <menu_item_call label="Sentarse aquí" name="Sit Here"/> + <menu_item_call label="Sentarme aquí" name="Sit Here"/> <menu_item_call label="Comprar este terreno" name="Land Buy"/> <menu_item_call label="Comprar un pase" name="Land Buy Pass"/> <menu_item_call label="Construir" name="Create"/> diff --git a/indra/newview/skins/default/xui/es/menu_object.xml b/indra/newview/skins/default/xui/es/menu_object.xml index 1677b9461e..d2743cd4fc 100644 --- a/indra/newview/skins/default/xui/es/menu_object.xml +++ b/indra/newview/skins/default/xui/es/menu_object.xml @@ -4,12 +4,12 @@ <menu_item_call label="Editar" name="Edit..."/> <menu_item_call label="Construir" name="Build"/> <menu_item_call label="Abrir" name="Open"/> - <menu_item_call label="Sentarse aquí" name="Object Sit"/> + <menu_item_call label="Sentarme aquí" name="Object Sit"/> <menu_item_call label="Levantarme" name="Object Stand Up"/> <menu_item_call label="Perfil del objeto" name="Object Inspect"/> <menu_item_call label="Acercar el zoom" name="Zoom In"/> <context_menu label="Ponerme ▶" name="Put On"> - <menu_item_call label="Ponerse" name="Wear"/> + <menu_item_call label="Ponerme" name="Wear"/> <context_menu label="Anexar ▶" name="Object Attach"/> <context_menu label="Anexar como HUD ▶" name="Object Attach HUD"/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_participant_list.xml b/indra/newview/skins/default/xui/es/menu_participant_list.xml index 60c92eec75..ed69683de9 100644 --- a/indra/newview/skins/default/xui/es/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/es/menu_participant_list.xml @@ -5,7 +5,7 @@ <menu_item_call label="Ver el perfil" name="View Profile"/> <menu_item_call label="Añadir como amigo" name="Add Friend"/> <menu_item_call label="MI" name="IM"/> - <menu_item_call label="Llamada" name="Call"/> + <menu_item_call label="Llamar" name="Call"/> <menu_item_call label="Compartir" name="Share"/> <menu_item_call label="Pagar" name="Pay"/> <menu_item_check label="Ignorar la voz" name="Block/Unblock"/> diff --git a/indra/newview/skins/default/xui/es/menu_people_nearby.xml b/indra/newview/skins/default/xui/es/menu_people_nearby.xml index 88df983838..dc1486d879 100644 --- a/indra/newview/skins/default/xui/es/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/es/menu_people_nearby.xml @@ -4,7 +4,7 @@ <menu_item_call label="Añadir como amigo" name="Add Friend"/> <menu_item_call label="Quitarle como amigo" name="Remove Friend"/> <menu_item_call label="MI" name="IM"/> - <menu_item_call label="Llamada" name="Call"/> + <menu_item_call label="Llamar" name="Call"/> <menu_item_call label="Mapa" name="Map"/> <menu_item_call label="Compartir" name="Share"/> <menu_item_call label="Pagar" name="Pay"/> diff --git a/indra/newview/skins/default/xui/es/menu_people_nearby_multiselect.xml b/indra/newview/skins/default/xui/es/menu_people_nearby_multiselect.xml index b87d6c6deb..4ab6000994 100644 --- a/indra/newview/skins/default/xui/es/menu_people_nearby_multiselect.xml +++ b/indra/newview/skins/default/xui/es/menu_people_nearby_multiselect.xml @@ -3,7 +3,7 @@ <menu_item_call label="Añadir como amigos" name="Add Friends"/> <menu_item_call label="Quitar amigos" name="Remove Friend"/> <menu_item_call label="MI" name="IM"/> - <menu_item_call label="Llamada" name="Call"/> + <menu_item_call label="Llamar" name="Call"/> <menu_item_call label="Compartir" name="Share"/> <menu_item_call label="Pagar" name="Pay"/> </context_menu> diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml index 93964a2f4f..323e7c98bf 100644 --- a/indra/newview/skins/default/xui/es/menu_viewer.xml +++ b/indra/newview/skins/default/xui/es/menu_viewer.xml @@ -19,7 +19,7 @@ <menu_item_call label="Dejar el estatus de Administrador" name="Leave Admin Options"/> <menu_item_call label="Salir de [APP_NAME]" name="Quit"/> </menu> - <menu label="Comunicarse" name="Communicate"> + <menu label="Comunicarme" name="Communicate"> <menu_item_call label="Mis amigos" name="My Friends"/> <menu_item_call label="Mis grupos" name="My Groups"/> <menu_item_check label="Chat" name="Nearby Chat"/> @@ -121,6 +121,7 @@ <menu_item_call label="Ayuda de [SECOND_LIFE]" name="Second Life Help"/> <menu_item_call label="Denunciar una infracción" name="Report Abuse"/> <menu_item_call label="Informar de un fallo" name="Report Bug"/> + <menu_item_call label="Acerca de [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzado" name="Advanced"> <menu_item_call label="Parar mis animaciones" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml index df18b88832..082841af31 100644 --- a/indra/newview/skins/default/xui/es/notifications.xml +++ b/indra/newview/skins/default/xui/es/notifications.xml @@ -74,7 +74,7 @@ Detalles del error: la notificación de nombre '[_NAME]' no se ha enco <notification name="LoginFailedNoNetwork"> No se puede conectar con [SECOND_LIFE_GRID]. '[DIAGNOSTIC]' -Asegúrate de que tu conexión a internet está funcionando adecuadamente. +Asegúrate de que tu conexión a Internet está funcionando adecuadamente. <usetemplate name="okbutton" yestext="OK"/> </notification> <notification name="MessageTemplateNotFound"> @@ -86,19 +86,19 @@ Asegúrate de que tu conexión a internet está funcionando adecuadamente. <usetemplate canceltext="Cancelar" name="yesnocancelbuttons" notext="No guardarlos" yestext="Guardarlos"/> </notification> <notification name="CompileQueueSaveText"> - Hubo un problema al subir el texto de un script por la siguiente razón: [REASON]. Por favor, inténtelo más tarde. + Hubo un problema al subir el texto de un script por la siguiente razón: [REASON]. Por favor, inténtalo más tarde. </notification> <notification name="CompileQueueSaveBytecode"> - Hubo un problema al subir el script compilado por la siguiente razón: [REASON]. Por favor, inténtelo más tarde. + Hubo un problema al subir el script compilado por la siguiente razón: [REASON]. Por favor, inténtalo más tarde. </notification> <notification name="WriteAnimationFail"> - Hubo un problema al escribir los datos de la animación. Por favor, inténtelo más tarde. + Hubo un problema al escribir los datos de la animación. Por favor, inténtalo más tarde. </notification> <notification name="UploadAuctionSnapshotFail"> Hubo un problema al subir la foto de la subasta por la siguiente razón: [REASON] </notification> <notification name="UnableToViewContentsMoreThanOne"> - No se puede ver a la vez los contenidos de más de un ítem. Por favor, elija un solo objeto y vuelva a intentarlo. + No se puede ver a la vez los contenidos de más de un ítem. Por favor, elige un solo objeto y vuelve a intentarlo. </notification> <notification name="SaveClothingBodyChanges"> ¿Guardar todos los cambios en la ropa y partes del cuerpo? @@ -119,11 +119,11 @@ Asegúrate de que tu conexión a internet está funcionando adecuadamente. <usetemplate name="okcancelbuttons" notext="No" yestext="Sí"/> </notification> <notification name="RevokeModifyRights"> - ¿Quiere revocar los derechos de modificación a [FIRST_NAME] [LAST_NAME]? + ¿Quieres revocar los derechos de modificación a [FIRST_NAME] [LAST_NAME]? <usetemplate name="okcancelbuttons" notext="No" yestext="Sí"/> </notification> <notification name="RevokeModifyRightsMultiple"> - ¿Quiere revocar los derechos de modificación a los residentes seleccionados? + ¿Quieres revocar los derechos de modificación a los residentes seleccionados? <usetemplate name="okcancelbuttons" notext="No" yestext="Sí"/> </notification> <notification name="UnableToCreateGroup"> @@ -188,7 +188,7 @@ Por favor, invita a miembros en las próximas 48 horas. <usetemplate canceltext="Cancelar" name="okcancelbuttons" notext="Cancelar" yestext="Crear un grupo por 100 L$"/> </notification> <notification name="LandBuyPass"> - Por [COST] L$ puede entrar a este terreno ('[PARCEL_NAME]') durante [TIME] horas. ¿Comprar un pase? + Por [COST] L$ puedes entrar a este terreno ('[PARCEL_NAME]') durante [TIME] horas. ¿Comprar un pase? <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="SalePriceRestriction"> @@ -208,7 +208,7 @@ El precio de venta será de [SALE_PRICE] L$ y se autoriza la compra a [NAME]. <usetemplate name="okcancelbuttons" notext="Cancelar" yestext="OK"/> </notification> <notification name="ReturnObjectsDeededToGroup"> - ¿Estás seguros de que quieres devolver todos los objetos de esta parcela que estén compartidos con el grupo '[NAME]' al inventario de su propietario anterior? + ¿Estás seguro de que quieres devolver todos los objetos de esta parcela que estén compartidos con el grupo '[NAME]' al inventario de su propietario anterior? *ATENCIÓN* ¡Esto borrará los objetos no transferibles que se hayan cedido al grupo! @@ -304,7 +304,7 @@ debes estar dentro de ella. La carpeta del vestuario contiene partes del cuerpo, u objetos a anexar o que no son ropa. </notification> <notification name="CannotWearTrash"> - No puede vestirte ropas o partes del cuerpo que estén en la Papelera + No puedes vestirte ropas o partes del cuerpo que estén en la Papelera </notification> <notification name="MaxAttachmentsOnOutfit"> No se puede anexar el objeto. @@ -426,7 +426,7 @@ El objeto debe de haber sido borrado o estar fuera de rango ('out of range& Al guardar un script compilado, hubo un problema por: [REASON]. Por favor, vuelve a intentar guardarlo más tarde.. </notification> <notification name="StartRegionEmpty"> - Perdon, no está definida tu Posición inicial. + Perdón, no está definida tu Posición inicial. Por favor, escribe el nombre de la región en el cajetín de Posición inicial, o elige para esa posición Mi Base o Mi última posición. <usetemplate name="okbutton" yestext="OK"/> </notification> @@ -639,22 +639,22 @@ Por favor, inténtalo más tarde. </notification> <notification name="CannotRecompileSelectObjectsNoScripts"> No se pudo 'recompilar'. -Seleccione un objeto con script. +Selecciona un objeto con script. </notification> <notification name="CannotRecompileSelectObjectsNoPermission"> No se pudo 'recompilar'. -Seleccione objetos con scripts en los que usted tenga permiso para modificarlos. +Selecciona objetos con scripts en los que tengas permiso para modificarlos. </notification> <notification name="CannotResetSelectObjectsNoScripts"> No se pudo 'reiniciar'. -Seleccione objetos con scripts. +Selecciona objetos con scripts. </notification> <notification name="CannotResetSelectObjectsNoPermission"> No se pudo 'reiniciar'. -Seleccione objetos con scripts en los que usted tenga permiso para modificarlos. +Selecciona objetos con scripts en los que tengas permiso para modificarlos. </notification> <notification name="CannotOpenScriptObjectNoMod"> Imposible abrir el script del objeto sin modificar los permisos. @@ -662,7 +662,7 @@ Seleccione objetos con scripts en los que usted tenga permiso para modificarlos. <notification name="CannotSetRunningSelectObjectsNoScripts"> No se puede configurar ningún script como 'ejecutándose'. -Seleccione objetos con scripts. +Selecciona objetos con scripts. </notification> <notification name="CannotSetRunningNotSelectObjectsNoScripts"> No se puede configurar ningún script como 'no ejecutándose'. @@ -770,7 +770,7 @@ no se ha seleccionado una parcela. </notification> <notification name="CannotDeedLandNoGroup"> No se ha podido transferir el terreno: -no ha seleccionado un grupo. +no has seleccionado un grupo. </notification> <notification name="CannotDeedLandNoRegion"> No se ha podido transferir el terreno: @@ -800,7 +800,7 @@ Vuelve a intentarlo en unos segundos. </notification> <notification name="CannotReleaseLandSelected"> No se ha podido abandonar el terreno: -no es propietario de todas las parcelas seleccionadas. +no eres propietario de todas las parcelas seleccionadas. Por favor, selecciona una sola parcela. </notification> @@ -903,7 +903,7 @@ Deberás reconfigurar el nombre y las opciones de la nueva parcela. Generalmente, esto es un fallo pasajero. Por favor, personaliza y guarda el ítem de aquí a unos minutos. </notification> <notification name="YouHaveBeenLoggedOut"> - Vaya, se ha cerrado tu sesión en [SECOND_LIFE] + Vaya, se ha cerrado tu sesión en [SECOND_LIFE]. [MESSAGE] <usetemplate name="okcancelbuttons" notext="Salir" yestext="Ver MI y Chat"/> </notification> @@ -1093,9 +1093,9 @@ Si es la primera vez que usas [SECOND_LIFE], debes crear una cuenta antes de pod <usetemplate name="okcancelbuttons" notext="Continuar" yestext="Cuenta nueva..."/> </notification> <notification name="LoginPacketNeverReceived"> - Tenemos problemas de conexión. Puede deberse a un problema de tu conexión a internet o de [SECOND_LIFE_GRID]. + Tenemos problemas de conexión. Puede deberse a un problema de tu conexión a Internet o de [SECOND_LIFE_GRID]. -Puedes revisar tu conexión a internet y volver a intentarlo en unos minutos, pulsar Ayuda para conectarte a [SUPPORT_SITE], o pulsar Teleporte para intentar teleportarte a tu Base. +Puedes revisar tu conexión a Internet y volver a intentarlo en unos minutos, pulsar Ayuda para conectarte a [SUPPORT_SITE], o pulsar Teleporte para intentar teleportarte a tu Base. <url name="url"> http://es.secondlife.com/support/ </url> diff --git a/indra/newview/skins/default/xui/es/panel_edit_classified.xml b/indra/newview/skins/default/xui/es/panel_edit_classified.xml index 7afa50c0a2..6d53b401c0 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_classified.xml @@ -29,7 +29,7 @@ <text name="classified_location"> cargando... </text> - <button label="Configurarlo en esta localización" name="set_to_curr_location_btn"/> + <button label="Configurar en esta posición" name="set_to_curr_location_btn"/> <text name="category_label" value="Categoría:"/> <text name="content_type_label" value="Tipo de contenido:"/> <icons_combo_box label="Contenido general" name="content_type"> diff --git a/indra/newview/skins/default/xui/es/panel_edit_pick.xml b/indra/newview/skins/default/xui/es/panel_edit_pick.xml index bde29f1665..f8a03d2302 100644 --- a/indra/newview/skins/default/xui/es/panel_edit_pick.xml +++ b/indra/newview/skins/default/xui/es/panel_edit_pick.xml @@ -21,11 +21,11 @@ <text name="pick_location"> cargando... </text> - <button label="Configurar en la posición actual" name="set_to_curr_location_btn"/> + <button label="Configurar en mi posición" name="set_to_curr_location_btn"/> </panel> </scroll_container> <panel label="bottom_panel" name="bottom_panel"> - <button label="Guardar el destacado" name="save_changes_btn"/> + <button label="Guardar" name="save_changes_btn"/> <button label="Cancelar" name="cancel_btn"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_notes.xml b/indra/newview/skins/default/xui/es/panel_notes.xml index bf8da4cf73..8de2afa767 100644 --- a/indra/newview/skins/default/xui/es/panel_notes.xml +++ b/indra/newview/skins/default/xui/es/panel_notes.xml @@ -15,7 +15,7 @@ <panel name="notes_buttons_panel"> <button label="Añadir como amigo" name="add_friend" tool_tip="Ofrecer amistad a este Residente"/> <button label="MI" name="im" tool_tip="Abrir un mensaje instantáneo"/> - <button label="Llamada" name="call" tool_tip="Llamar a este Residente"/> + <button label="Llamar" name="call" tool_tip="Llamar a este Residente"/> <button label="Mapa" name="show_on_map_btn" tool_tip="Mostrar al Residente en el mapa"/> <button label="Teleportar" name="teleport" tool_tip="Ofrecer teleporte"/> </panel> diff --git a/indra/newview/skins/default/xui/es/panel_people.xml b/indra/newview/skins/default/xui/es/panel_people.xml index 6008c6a934..376aea5278 100644 --- a/indra/newview/skins/default/xui/es/panel_people.xml +++ b/indra/newview/skins/default/xui/es/panel_people.xml @@ -49,9 +49,9 @@ Si estás buscando gente para pasar el rato, [secondlife:///app/worldmap usa el <panel name="button_bar"> <button label="Perfil" name="view_profile_btn" tool_tip="Mostrar imágenes, grupos y otra información del Residente"/> <button label="MI" name="im_btn" tool_tip="Abrir un mensaje instantáneo"/> - <button label="Llamada" name="call_btn" tool_tip="Llamar a este Residente"/> + <button label="Llamar" name="call_btn" tool_tip="Llamar a este Residente"/> <button label="Compartir" name="share_btn"/> - <button label="Teleportarse" name="teleport_btn" tool_tip="Ofrecer teleporte"/> + <button label="Teleportar" name="teleport_btn" tool_tip="Ofrecer teleporte"/> <button label="Perfil del grupo" name="group_info_btn" tool_tip="Ver la información del grupo"/> <button label="Chat de grupo" name="chat_btn" tool_tip="Abrir el chat"/> <button label="Multiconferencia" name="group_call_btn" tool_tip="Llamar a este grupo"/> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml index 46d8984889..7a65eb32bc 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_chat.xml @@ -49,7 +49,7 @@ Mostrar los MI en: </text> <text name="requires_restart_label"> - (requiere reiniciar) + (requiere reiniciar) </text> <radio_group name="chat_window" tool_tip="Muestra tus mensajes instantáneos en varias ventanas flotantes o en una sola con varias pestañas (requiere que reinicies)"> <radio_item label="Varias ventanas" name="radio" value="0"/> diff --git a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml index 87e7dc1e8a..56d473e872 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_graphics1.xml @@ -52,7 +52,7 @@ m </text> <slider label="Núm. máx. de partículas:" name="MaxParticleCount"/> - <slider label="Calidad de procesamiento:" label_width="142" name="RenderPostProcess"/> + <slider label="Calidad de procesamiento:" name="RenderPostProcess"/> <text name="MeshDetailText"> Detalle de la malla: </text> diff --git a/indra/newview/skins/default/xui/es/panel_region_general.xml b/indra/newview/skins/default/xui/es/panel_region_general.xml index 54b60b276c..fe7f51c74e 100644 --- a/indra/newview/skins/default/xui/es/panel_region_general.xml +++ b/indra/newview/skins/default/xui/es/panel_region_general.xml @@ -24,17 +24,16 @@ <check_box label="Impedir los 'empujones'" name="restrict_pushobject"/> <check_box label="Permitir la reventa del terreno" name="allow_land_resell_check"/> <check_box label="Permitir unir/dividir el terreno" name="allow_parcel_changes_check"/> - <check_box label="Bloquear el mostrar el terreno en -la búsqueda." name="block_parcel_search_check" tool_tip="Permitir que la gente vea esta región y sus parcelas en los resultados de la búsqueda."/> + <check_box label="Bloquear el mostrar el terreno en la búsqueda" name="block_parcel_search_check" tool_tip="Permitir que la gente vea esta región y sus parcelas en los resultados de la búsqueda."/> <spinner label="Nº máximo de avatares" label_width="120" name="agent_limit_spin" width="180"/> <spinner label="Plus de objetos" label_width="120" name="object_bonus_spin" width="180"/> <text label="Calificación" name="access_text"> Calificación: </text> - <icons_combo_box label="'Mature'" name="access_combo"> - <icons_combo_box.item label="'Adult'" name="Adult" value="42"/> - <icons_combo_box.item label="'Mature'" name="Mature" value="21"/> - <icons_combo_box.item label="'PG'" name="PG" value="13"/> + <icons_combo_box label="Moderado" name="access_combo"> + <icons_combo_box.item label="Adulto" name="Adult" value="42"/> + <icons_combo_box.item label="Moderado" name="Mature" value="21"/> + <icons_combo_box.item label="General" name="PG" value="13"/> </icons_combo_box> <button label="Aplicar" name="apply_btn"/> <button label="Teleportar a su Base a un Residente..." name="kick_btn"/> diff --git a/indra/newview/skins/default/xui/es/panel_side_tray.xml b/indra/newview/skins/default/xui/es/panel_side_tray.xml index 4e9834063b..cf5afb3cd1 100644 --- a/indra/newview/skins/default/xui/es/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/es/panel_side_tray.xml @@ -3,27 +3,27 @@ partially on screen to hold tab buttons. --> <side_tray name="sidebar"> <sidetray_tab description="Manejar la barra lateral." name="sidebar_openclose" tab_title="Barra lateral"/> - <sidetray_tab description="Base." name="sidebar_home" tab_title="Home"> - <panel label="base" name="panel_home"/> + <sidetray_tab description="Inicio." name="sidebar_home" tab_title="Inicio"> + <panel label="Inicio" name="panel_home"/> </sidetray_tab> - <sidetray_tab description="Edita tu perfil público y tus destacados." name="sidebar_me" tab_title="My Profile"> + <sidetray_tab description="Edita tu perfil público y tus destacados." name="sidebar_me" tab_title="Mi perfil"> <panel_container name="panel_container"> <panel label="Yo" name="panel_me"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encuentra a tus amigos, contactos y gente que esté cerca." name="sidebar_people" tab_title="People"> + <sidetray_tab description="Encuentra a tus amigos, contactos y gente que esté cerca." name="sidebar_people" tab_title="Gente"> <panel_container name="panel_container"> <panel label="Perfil del grupo" name="panel_group_info_sidetray"/> <panel label="Residentes y objetos ignorados" name="panel_block_list_sidetray"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Encontrar lugares donde ir o que ya visitaste." label="Lugares" name="sidebar_places" tab_title="Places"> + <sidetray_tab description="Encontrar lugares donde ir o que ya visitaste." label="Lugares" name="sidebar_places" tab_title="Lugares"> <panel label="Lugares" name="panel_places"/> </sidetray_tab> - <sidetray_tab description="Mira tu inventario." name="sidebar_inventory" tab_title="My Inventory"> + <sidetray_tab description="Mira tu inventario." name="sidebar_inventory" tab_title="Mi inventario"> <panel label="Modificar el inventario" name="sidepanel_inventory"/> </sidetray_tab> - <sidetray_tab description="Cambia tu apariencia y tu 'look' actual." name="sidebar_appearance" tab_title="My Appearance"> + <sidetray_tab description="Cambia tu apariencia y tu 'look' actual." name="sidebar_appearance" tab_title="Mi apariencia"> <panel label="Modificar la apariencia" name="sidepanel_appearance"/> </sidetray_tab> </side_tray> diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml index a8fc7f6b58..4cee677420 100644 --- a/indra/newview/skins/default/xui/es/strings.xml +++ b/indra/newview/skins/default/xui/es/strings.xml @@ -89,7 +89,7 @@ Descargando la ropa... </string> <string name="LoginFailedNoNetwork"> - Error de red: no se ha podido conectar; por favor, revisa tu conexión a internet. + Error de red: no se ha podido conectar; por favor, revisa tu conexión a Internet. </string> <string name="LoginFailed"> Error en el inicio de sesión. @@ -101,7 +101,7 @@ http://join.secondlife.com/index.php?lang=es-ES </string> <string name="AgentLostConnection"> - Esta región puede estar teniendo problemas. Por favor, comprueba tu conexión a internet. + Esta región puede estar teniendo problemas. Por favor, comprueba tu conexión a Internet. </string> <string name="SavingSettings"> Guardando tus configuraciones... @@ -1543,10 +1543,10 @@ No se ha aportado un contrato para este estado. El terreno de este estado lo vende el propietario del estado, no Linden Lab. Por favor, contacta con ese propietario para informarte sobre la venta. </string> <string name="covenant_last_modified"> - Última modificación: + Última modificación: </string> <string name="none_text" value="(no hay)"/> - <string name="never_text" value="(nunca)"/> + <string name="never_text" value=" (nunca)"/> <string name="GroupOwned"> Propiedad del grupo </string> @@ -2013,7 +2013,7 @@ Si sigues recibiendo este mensaje, contacta con [SUPPORT_SITE]. Puente: ancho </string> <string name="Broad"> - Ancho + Aumentar </string> <string name="Brow Size"> Arco ciliar diff --git a/indra/newview/skins/default/xui/es/teleport_strings.xml b/indra/newview/skins/default/xui/es/teleport_strings.xml index 7e7ed6202f..e0e0061729 100644 --- a/indra/newview/skins/default/xui/es/teleport_strings.xml +++ b/indra/newview/skins/default/xui/es/teleport_strings.xml @@ -10,7 +10,7 @@ Si sigues recibiendo este mensaje, por favor, acude al [SUPPORT_SITE]. Si sigues recibiendo este mensaje, por favor, acude al [SUPPORT_SITE]. </message> <message name="blocked_tport"> - Lo sentimos, en estos momentos los teleportes están bloqueados. Vuelva a intentarlo en un momento. Si sigue sin poder teleportarse, desconéctese y vuelva a iniciar sesión para solucionar el problema. + Lo sentimos, en estos momentos los teleportes están bloqueados. Vuelve a intentarlo en un momento. Si sigues sin poder teleportarte, desconéctate y vuelve a iniciar sesión para solucionar el problema. </message> <message name="nolandmark_tport"> Lo sentimos, pero el sistema no ha podido localizar el destino de este hito. @@ -20,22 +20,22 @@ Si sigues recibiendo este mensaje, por favor, acude al [SUPPORT_SITE]. Vuelva a intentarlo en un momento. </message> <message name="noaccess_tport"> - Lo sentimos, pero usted no tiene acceso al destino de este teleporte. + Lo sentimos, pero no tienes acceso al destino de este teleporte. </message> <message name="missing_attach_tport"> - Aún no han llegado sus objetos anexados. Espere unos segundos más o desconéctese y vuelva a iniciar sesión antes de teleportarse. + Aún no han llegado tus objetos anexados. Espera unos segundos más o desconéctate y vuelve a iniciar sesión antes de teleportarte. </message> <message name="too_many_uploads_tport"> - La cola de espera en esta región está actualmente obstruida, por lo que su petición de teleporte no se atenderá en un tiempo prudencial. Por favor, vuelva a intentarlo en unos minutos o vaya a una zona menos ocupada. + La cola de espera en esta región está actualmente obstruida, por lo que tu petición de teleporte no se atenderá en un tiempo prudencial. Por favor, vuelve a intentarlo en unos minutos o ve a una zona menos ocupada. </message> <message name="expired_tport"> - Lo sentimos, pero el sistema no ha podido atender a su petición de teleporte en un tiempo prudencial. Por favor, vuelva a intentarlo en unos pocos minutos. + Lo sentimos, pero el sistema no ha podido atender a tu petición de teleporte en un tiempo prudencial. Por favor, vuelve a intentarlo en unos minutos. </message> <message name="expired_region_handoff"> - Lo sentimos, pero el sistema no ha podido completar su paso a otra región en un tiempo prudencial. Por favor, vuelva a intentarlo en unos pocos minutos. + Lo sentimos, pero el sistema no ha podido completar tu paso a otra región en un tiempo prudencial. Por favor, vuelve a intentarlo en unos minutos. </message> <message name="no_host"> - Ha sido imposible encontrar el destino del teleporte: o está desactivado temporalmente o ya no existe. Por favor, vuelva a intentarlo en unos pocos minutos. + Ha sido imposible encontrar el destino del teleporte: o está desactivado temporalmente o ya no existe. Por favor, vuelve a intentarlo en unos minutos. </message> <message name="no_inventory_host"> En estos momentos no está disponible el sistema del inventario. diff --git a/indra/newview/skins/default/xui/fr/floater_color_picker.xml b/indra/newview/skins/default/xui/fr/floater_color_picker.xml index 7ead543c78..2bcf567655 100644 --- a/indra/newview/skins/default/xui/fr/floater_color_picker.xml +++ b/indra/newview/skins/default/xui/fr/floater_color_picker.xml @@ -26,6 +26,6 @@ Couleur actuelle : </text> <text left="8" name="(Drag below to save.)" width="220"> - Enreg. : faire glisser dessous + Enr. : faire glisser dessous </text> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_customize.xml b/indra/newview/skins/default/xui/fr/floater_customize.xml index d5ee070dcd..6da010776e 100644 --- a/indra/newview/skins/default/xui/fr/floater_customize.xml +++ b/indra/newview/skins/default/xui/fr/floater_customize.xml @@ -523,7 +523,7 @@ </panel> </tab_container> <scroll_container left="251" name="panel_container"/> - <button label="Infos sur les scripts" label_selected="Infos sur les scripts" name="script_info" tool_tip="Afficher les scripts attachés à votre avatar"/> + <button label="Infos scripts" label_selected="Infos scripts" name="script_info" tool_tip="Afficher les scripts attachés à votre avatar"/> <button label="Créer tenue" label_selected="Créer une tenue..." name="make_outfit_btn"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> <button label="OK" label_selected="OK" name="Ok"/> diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml index a381f64cd9..ec3b246c76 100644 --- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml @@ -57,16 +57,16 @@ <text name="WL12amHash2"> | </text> - <button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey" width="89" bottom="-45" /> - <button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89" bottom="-70" /> - <text name="WLCurKeyFrameText" width="170"> + <button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey"/> + <button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey"/> + <text name="WLCurKeyFrameText"> Réglages des images-clés : </text> - <text name="WLCurKeyTimeText" width="170"> + <text name="WLCurKeyTimeText"> Heure de la clé : </text> - <spinner label="Heure" name="WLCurKeyHour" label_width="80" width="74"/> - <spinner label="Min" name="WLCurKeyMin" label_width="80"/> + <spinner label="Heure" name="WLCurKeyHour"/> + <spinner label="Min" name="WLCurKeyMin"/> <text name="WLCurKeyTimeText2"> Préréglages clés : </text> @@ -78,13 +78,13 @@ <text name="DayCycleText2"> Durée du cycle : </text> - <spinner label="Heure" name="WLLengthOfDayHour" label_width="80" width="74" /> + <spinner label="Heure" name="WLLengthOfDayHour"/> <spinner label="Min" name="WLLengthOfDayMin" /> - <spinner label="S" name="WLLengthOfDaySec" label_width="10" width="50" left_delta="95"/> - <text name="DayCycleText3" left="280" width="200"> + <spinner label="S" name="WLLengthOfDaySec"/> + <text name="DayCycleText3"> Prévisualiser : </text> - <button label="Lire" label_selected="Lire" name="WLAnimSky" left_delta="90"/> + <button label="Lire" label_selected="Lire" name="WLAnimSky"/> <button label="Stop !" label_selected="Stop" name="WLStopAnimSky" /> <button label="Utiliser heure domaine" label_selected="Aller heure domaine" name="WLUseLindenTime" /> diff --git a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml index 6cd886d4b9..1ee85a77ce 100644 --- a/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/fr/floater_inventory_view_finder.xml @@ -11,14 +11,14 @@ <check_box label="Sons" name="check_sound"/> <check_box label="Textures" name="check_texture"/> <check_box label="Photos" name="check_snapshot"/> - <button label="Tout" label_selected="Tout" name="All" width="70"/> - <button bottom_delta="0" label="Aucun" label_selected="Aucun" left="83" name="None" width="70"/> - <check_box bottom_delta="-20" label="Toujours montrer les dossiers" name="check_show_empty"/> - <check_box bottom_delta="-36" label="Depuis la déconnexion" name="check_since_logoff"/> + <button label="Tout" label_selected="Tout" name="All"/> + <button bottom_delta="0" label="Aucun" label_selected="Aucun" name="None"/> + <check_box label="Toujours montrer les dossiers" name="check_show_empty"/> + <check_box label="Depuis la déconnexion" name="check_since_logoff"/> <text name="- OR -"> Ou il y a... </text> <spinner label="Heures" name="spin_hours_ago"/> <spinner label="Jours" name="spin_days_ago"/> - <button bottom_delta="-30" label="Fermer" label_selected="Fermer" name="Close"/> + <button label="Fermer" label_selected="Fermer" name="Close"/> </floater> diff --git a/indra/newview/skins/default/xui/fr/floater_joystick.xml b/indra/newview/skins/default/xui/fr/floater_joystick.xml index e00f9564e8..02ac21bf82 100644 --- a/indra/newview/skins/default/xui/fr/floater_joystick.xml +++ b/indra/newview/skins/default/xui/fr/floater_joystick.xml @@ -26,7 +26,7 @@ <text name="ZScale"> Échelle des Z </text> - <text left="9" name="PitchScale" width="104"> + <text name="PitchScale"> Échelle du tangage </text> <text name="YawScale"> @@ -44,13 +44,13 @@ <text name="ZDeadZone"> Zone neutre Z </text> - <text left="4" name="PitchDeadZone" width="116"> + <text name="PitchDeadZone"> Zone neutre tangage </text> - <text name="YawDeadZone" left="10" width="104"> + <text name="YawDeadZone"> Zone neutre lacet </text> - <text name="RollDeadZone" left="10" width="104"> + <text name="RollDeadZone"> Zone neutre roulis </text> <text name="Feathering"> @@ -59,7 +59,7 @@ <text name="ZoomScale2"> Échelle du zoom </text> - <text left="6" name="ZoomDeadZone" width="120"> + <text name="ZoomDeadZone"> Zone neutre du zoom </text> <button label="Options par défaut du joystick" name="SpaceNavigatorDefaults"/> diff --git a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml index fd569a7f95..36bec80561 100644 --- a/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml +++ b/indra/newview/skins/default/xui/fr/floater_perm_prefs.xml @@ -4,7 +4,7 @@ <button label="?" label_selected="?" name="help"/> <check_box label="Partager avec le groupe" name="share_with_group"/> <check_box label="Autoriser tout le monde à copier" name="everyone_copy"/> - <text name="NextOwnerLabel" width="260"> + <text name="NextOwnerLabel"> Le prochain propriétaire pourra : </text> <check_box label="Modifier" name="next_owner_modify"/> diff --git a/indra/newview/skins/default/xui/fr/floater_preferences.xml b/indra/newview/skins/default/xui/fr/floater_preferences.xml index 406e91a18a..052e43388b 100644 --- a/indra/newview/skins/default/xui/fr/floater_preferences.xml +++ b/indra/newview/skins/default/xui/fr/floater_preferences.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater min_width="330" name="Preferences" title="PRÉFÉRENCES" width="626"> +<floater name="Preferences" title="PRÉFÉRENCES"> <button label="OK" label_selected="OK" name="OK"/> <button label="Annuler" label_selected="Annuler" name="Cancel"/> - <tab_container name="pref core" tab_width="126" width="626"> + <tab_container name="pref core"> <panel label="Général" name="general"/> <panel label="Graphiques" name="display"/> <panel label="Confidentialité" name="im"/> diff --git a/indra/newview/skins/default/xui/fr/floater_tools.xml b/indra/newview/skins/default/xui/fr/floater_tools.xml index 1d9d395960..16d276f8c2 100644 --- a/indra/newview/skins/default/xui/fr/floater_tools.xml +++ b/indra/newview/skins/default/xui/fr/floater_tools.xml @@ -441,9 +441,9 @@ <check_box label="Inverser" name="checkbox flip s"/> <spinner label="Vertical (V)" name="TexScaleV"/> <check_box label="Inverser" name="checkbox flip t"/> - <spinner label="Rotation˚" left="122" name="TexRot" width="58"/> - <spinner label="Répétitions / Mètre" left="122" name="rptctrl" width="58"/> - <button label="Appliquer" label_selected="Appliquer" left_delta="68" name="button apply" width="75"/> + <spinner label="Rotation˚" name="TexRot" /> + <spinner label="Répétitions / Mètre" name="rptctrl"/> + <button label="Appliquer" label_selected="Appliquer" name="button apply"/> <text name="tex offset"> Décalage de la texture </text> diff --git a/indra/newview/skins/default/xui/fr/language_settings.xml b/indra/newview/skins/default/xui/fr/language_settings.xml index 71418d446a..117ae16ee8 100644 --- a/indra/newview/skins/default/xui/fr/language_settings.xml +++ b/indra/newview/skins/default/xui/fr/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">french</string> + <string name="DarwinLocale">fr_FR.UTF-8</string> + <string name="LinuxLocale">fr_FR.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml index 0ea11bb80f..61659d386b 100644 --- a/indra/newview/skins/default/xui/fr/strings.xml +++ b/indra/newview/skins/default/xui/fr/strings.xml @@ -2361,7 +2361,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Gants avec doigts </string> <string name="Glove Length"> - Longueur des gants + Longueur </string> <string name="Hair"> Cheveux @@ -2475,7 +2475,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Angle mâchoire </string> <string name="Jaw Jut"> - Saillie de la mâchoire + Saillie mâchoire </string> <string name="Jaw Shape"> Mâchoire @@ -2826,10 +2826,10 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Largeur du nez </string> <string name="Nostril Division"> - Division des narines + Division narines </string> <string name="Nostril Width"> - Largeur des narines + Largeur narines </string> <string name="Opaque"> Opaque @@ -2919,10 +2919,10 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Plus rose </string> <string name="Platform Height"> - Plateforme (hauteur) + Platef. (hauteur) </string> <string name="Platform Width"> - Plateforme (largeur) + Platef. (largeur) </string> <string name="Pointy"> Pointue @@ -3012,7 +3012,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Vers la gauche </string> <string name="Shift Mouth"> - Déplacer la bouche + Déplacement </string> <string name="Shift Right"> Vers la droite @@ -3210,7 +3210,7 @@ Si ce message persiste, veuillez aller sur la page [SUPPORT_SITE]. Forme de l'orteil </string> <string name="Toe Thickness"> - Épaisseur de l'orteil + Épaisseur orteil </string> <string name="Torso Length"> Longueur du torse diff --git a/indra/newview/skins/default/xui/it/floater_about_land.xml b/indra/newview/skins/default/xui/it/floater_about_land.xml index a61b0584d3..bc23c2e8ff 100644 --- a/indra/newview/skins/default/xui/it/floater_about_land.xml +++ b/indra/newview/skins/default/xui/it/floater_about_land.xml @@ -335,7 +335,7 @@ Solamente terreni più grandi possono essere abilitati nella ricerca. <check_box label="Tutti i residenti" name="check other scripts"/> <check_box label="Gruppo" name="check group scripts"/> <text name="land_options_label"> - Opzioni della terra: + Opzioni per il terreno: </text> <check_box label="Sicuro (senza danno)" name="check safe" tool_tip="Se spuntato, imposta il terreno su 'sicuro', disabilitando i danni da combattimento. Se non spuntato, viene abilitato il combattimento a morte."/> <check_box label="Nessuna spinta" name="PushRestrictCheck" tool_tip="Previeni i colpi. Selezionare questa opzione può essere utile per prevenire comportamenti dannosi sul tuo terreno."/> diff --git a/indra/newview/skins/default/xui/it/floater_buy_land.xml b/indra/newview/skins/default/xui/it/floater_buy_land.xml index f4e7a6c2c5..2e78168209 100644 --- a/indra/newview/skins/default/xui/it/floater_buy_land.xml +++ b/indra/newview/skins/default/xui/it/floater_buy_land.xml @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="buy land" title="ACQUISTA TERRENO"> <floater.string name="can_resell"> - Può essere rivenduta. + Può essere rivenduto. </floater.string> <floater.string name="can_not_resell"> - Può non essere rivenduta. + Può non essere rivenduto. </floater.string> <floater.string name="can_change"> - Può essere unita o suddivisa. + Può essere unito o suddiviso. </floater.string> <floater.string name="can_not_change"> - Non può essere unita o suddivisa. + Non può essere unito o suddiviso. </floater.string> <floater.string name="cant_buy_for_group"> - Non hai il permesso di comprare terra per il tuo gruppo attivo. + Non sei autorizzato ad acquistare terreno per il tuo gruppo attivo. </floater.string> <floater.string name="no_land_selected"> - Nessuna terra selezionata. + Nessun terreno selezionato. </floater.string> <floater.string name="multiple_parcels_selected"> - Hai selezionato appezzamenti diversi. + Hai selezionato lotti diversi. Prova a selezionare un'area più piccola. </floater.string> <floater.string name="no_permission"> - Non hai il permesso di comprare terra per il tuo gruppo attivo. + Non sei autorizzato ad acquistare terreno per il tuo gruppo attivo. </floater.string> <floater.string name="parcel_not_for_sale"> Il terreno selezionato non è in vendita. @@ -32,7 +32,7 @@ Prova a selezionare un'area più piccola. Il gruppo possiede già il terreno. </floater.string> <floater.string name="you_already_own"> - Possiedi già il terreno. + Sei già proprietario del terreno. </floater.string> <floater.string name="set_to_sell_to_other"> Il terreno selezionato è già impostato per la vendita ad un altro gruppo. @@ -41,7 +41,7 @@ Prova a selezionare un'area più piccola. L'area selezionata non è pubblica. </floater.string> <floater.string name="not_owned_by_you"> - È selezionato terreno di proprietà di un altro residente. + Hai selezionato terreno di proprietà di un altro residente. Prova a scegliere una superficie più piccola. </floater.string> <floater.string name="processing"> @@ -50,13 +50,13 @@ Prova a scegliere una superficie più piccola. (Potrebbe volerci un minuto o due.) </floater.string> <floater.string name="fetching_error"> - C'e stato un errore mentre si stavano ottenendo le informazioni sull'acquisto della terra. + Si 'e verificato un errore mentre si stavano ottenendo le informazioni sull'acquisto del terreno. </floater.string> <floater.string name="buying_will"> - Comprando questa terra: + Acuistando il terreno: </floater.string> <floater.string name="buying_for_group"> - Comprare la terra per il gruppo farà: + Acuistando il terreno per il gruppo: </floater.string> <floater.string name="cannot_buy_now"> Non puoi comprare ora: @@ -68,10 +68,10 @@ Prova a scegliere una superficie più piccola. nessuno necessario </floater.string> <floater.string name="must_upgrade"> - Il tuo tipo di account ha bisogno di un upgrade per possedere terra. + Per acquistare terreno devi passare a un livello di abbonamento superiore. </floater.string> <floater.string name="cant_own_land"> - Il tuo account può possedere terra. + Con questo account puoi essere proprietario di terreno. </floater.string> <floater.string name="land_holdings"> Sei proprietario di [BUYER] m² di terreno. @@ -107,12 +107,10 @@ consente [AMOUNT2] oggetti [VENDUTO_CON_OGGETTI] </floater.string> <floater.string name="insufficient_land_credits"> - Il gruppo [GROUP] avrà bisogno di contribuzioni anticipate, mediante crediti d'uso terriero, -sufficienti a coprire l'area del terreno prima che l'acquisto -sia completato. + Il gruppo [GROUP] avrà bisogno di contributi di crediti di utilizzo terreno sufficienti a coprire il terreno prima che l'acquisto sia completato. </floater.string> <floater.string name="have_enough_lindens"> - Hai [AMOUNT] L$, che sono sufficienti per comprare questa terra. + Hai [AMOUNT] L$, che sono sufficienti per comprare questo terreno. </floater.string> <floater.string name="not_enough_lindens"> Hai solo [AMOUNT] L$, ed hai bisogno di altri [AMOUNT2] L$. @@ -209,7 +207,7 @@ venduto con oggetti <combo_box.item label="US$ 6.00 al mese, addebitato annualmente" name="US$6.00/month,billedannually"/> </combo_box> <text name="land_use_action"> - Aumenta il tasso di pagamento mensile delle tasse d'uso della terra a 40 US$/mese. + Aumenta le tariffe mensili di utilizzo del terreno a 40 US$/mese. </text> <text name="land_use_reason"> Tu occupi 1309 m² di terreno. diff --git a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml index 7d50e322c0..98c385d29f 100644 --- a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml @@ -57,9 +57,9 @@ <text name="WL12amHash2"> | </text> - <button font="SansSerifSmall" width="96" left="546" label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/> - <button font="SansSerifSmall" width="96" left="546" label="Cancella voce" label_selected="Cancella voce" name="WLDeleteKey"/> - <text name="WLCurKeyFrameText" width="210" left="17"> + <button label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/> + <button label_selected="Cancella voce" name="WLDeleteKey"/> + <text name="WLCurKeyFrameText"> Impostazioni del fotogramma chiave: </text> <text name="WLCurKeyTimeText"> @@ -84,9 +84,9 @@ <text name="DayCycleText3"> Anteprima: </text> - <button width="55" font="SansSerifSmall" label="Avvia" label_selected="Avvia" name="WLAnimSky"/> - <button width="55" left_delta="60" font="SansSerifSmall" label="Arresta!" label_selected="Arresta" name="WLStopAnimSky"/> - <button left_delta="60" width="150" font="SansSerifSmall" label="Usa l'ora della proprietà" label_selected="Vai all'ora della proprietà" name="WLUseLindenTime"/> + <button label="Avvia" label_selected="Avvia" name="WLAnimSky"/> + <button label="Arresta!" label_selected="Arresta" name="WLStopAnimSky"/> + <button label="Usa l'ora della proprietà" label_selected="Vai all'ora della proprietà" name="WLUseLindenTime"/> <button label="Salva il test del giorno" label_selected="Salva il test del giorno" name="WLSaveDayCycle"/> <button label="Carica il test del giorno" label_selected="Carica il test del giorno" name="WLLoadDayCycle"/> </panel> diff --git a/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml index b5a17b2fc1..49130285f2 100644 --- a/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/it/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="INVENTARIO_COSE_RECENTI" width="165"> +<floater name="Inventory Finder" title="INVENTARIO_COSE_RECENTI"> <check_box label="Animazioni" name="check_animation"/> <check_box label="Biglietti da visita" name="check_calling_card"/> <check_box label="Abiti" name="check_clothing"/> diff --git a/indra/newview/skins/default/xui/it/floater_joystick.xml b/indra/newview/skins/default/xui/it/floater_joystick.xml index 3eff0cfceb..3d60ded7ab 100644 --- a/indra/newview/skins/default/xui/it/floater_joystick.xml +++ b/indra/newview/skins/default/xui/it/floater_joystick.xml @@ -16,7 +16,7 @@ Modalità di controllo: </text> <check_box label="Avatar" name="JoystickAvatarEnabled"/> - <check_box label="Costruire" left="192" name="JoystickBuildEnabled"/> + <check_box label="Costruire" name="JoystickBuildEnabled"/> <check_box label="Camera dall'alto" name="JoystickFlycamEnabled"/> <text name="XScale"> Regolazione X @@ -27,13 +27,13 @@ <text name="ZScale"> Regolazione Z </text> - <text left="3" name="PitchScale" width="112"> + <text name="PitchScale"> Regolazione: Pitch </text> - <text left="3" name="YawScale" width="112"> + <text name="YawScale"> Regolazione: Yaw </text> - <text left="3" name="RollScale" width="112"> + <text name="RollScale"> Regolazione: Roll </text> <text name="XDeadZone"> @@ -45,22 +45,22 @@ <text name="ZDeadZone"> Angolo morto Z </text> - <text left="3" name="PitchDeadZone" width="112"> + <text name="PitchDeadZone"> Angolo morto: Pitch </text> - <text left="3" name="YawDeadZone" width="112"> + <text name="YawDeadZone"> Angolo morto: Yaw </text> - <text left="3" name="RollDeadZone" width="112"> + <text name="RollDeadZone"> Angolo morto: Roll </text> <text name="Feathering"> Smussamento </text> - <text left="6" name="ZoomScale2" width="135"> + <text name="ZoomScale2"> Regolazione dello zoom </text> - <text left="6" name="ZoomDeadZone" width="135"> + <text name="ZoomDeadZone" width="140"> Angolo morto dello zoom </text> <button label="SpaceNavigator Defaults" name="SpaceNavigatorDefaults"/> diff --git a/indra/newview/skins/default/xui/it/floater_preferences.xml b/indra/newview/skins/default/xui/it/floater_preferences.xml index 5ffe7f4802..c5b6654a69 100644 --- a/indra/newview/skins/default/xui/it/floater_preferences.xml +++ b/indra/newview/skins/default/xui/it/floater_preferences.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater min_width="350" name="Preferences" title="PREFERENZE" width="646"> +<floater name="Preferences" title="PREFERENZE"> <button label="OK" label_selected="OK" name="OK"/> <button label="Annulla" label_selected="Annulla" name="Cancel"/> - <tab_container name="pref core" tab_width="146" width="646"> + <tab_container name="pref core" tab_width="100"> <panel label="Generale" name="general"/> <panel label="Grafica" name="display"/> <panel label="Riservatezza" name="im"/> diff --git a/indra/newview/skins/default/xui/it/floater_tools.xml b/indra/newview/skins/default/xui/it/floater_tools.xml index 16ee797ce4..6ad8d68df2 100644 --- a/indra/newview/skins/default/xui/it/floater_tools.xml +++ b/indra/newview/skins/default/xui/it/floater_tools.xml @@ -443,9 +443,9 @@ della texture <check_box label="Inverti" name="checkbox flip s"/> <spinner label="Verticale (V)" name="TexScaleV"/> <check_box label="Inverti" name="checkbox flip t"/> - <spinner label="Rotazione˚" left="120" name="TexRot" width="60"/> - <spinner label="Ripetizioni / Metro" left="120" name="rptctrl" width="60"/> - <button label="Applica" label_selected="Applica" left_delta="72" name="button apply"/> + <spinner label="Rotazione˚" name="TexRot" /> + <spinner label="Ripetizioni / Metro" name="rptctrl" /> + <button label="Applica" label_selected="Applica" name="button apply"/> <text name="tex offset"> Bilanciamento della texture </text> @@ -484,7 +484,7 @@ della texture <button label="Suddividi" label_selected="Suddividi" name="button subdivide land" width="156"/> <button label="Iscriviti" label_selected="Iscriviti" name="button join land" width="156"/> <text name="label_parcel_trans"> - Transazioni del territorio + Transazioni terreno </text> <button label="Acquista terreno" label_selected="Acquista terreno" name="button buy land" width="156"/> <button label="Abbandona il terreno" label_selected="Abbandona il terreno" name="button abandon land" width="156"/> diff --git a/indra/newview/skins/default/xui/it/language_settings.xml b/indra/newview/skins/default/xui/it/language_settings.xml index 71418d446a..82cf789a6b 100644 --- a/indra/newview/skins/default/xui/it/language_settings.xml +++ b/indra/newview/skins/default/xui/it/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">italian</string> + <string name="DarwinLocale">it_IT.UTF-8</string> + <string name="LinuxLocale">it_IT.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/it/menu_viewer.xml b/indra/newview/skins/default/xui/it/menu_viewer.xml index 36b44abf4b..d9b401ea46 100644 --- a/indra/newview/skins/default/xui/it/menu_viewer.xml +++ b/indra/newview/skins/default/xui/it/menu_viewer.xml @@ -118,9 +118,10 @@ </menu> </menu> <menu label="Aiuto" name="Help"> - <menu_item_call label="[SECOND_LIFE] Aiuto" name="Second Life Help"/> + <menu_item_call label="Aiuto di [SECOND_LIFE]" name="Second Life Help"/> <menu_item_call label="Segnala abuso" name="Report Abuse"/> <menu_item_call label="Segnala bug" name="Report Bug"/> + <menu_item_call label="Informazioni su [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avanzate" name="Advanced"> <menu_item_call label="Ferma animazione" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/it/panel_group_invite.xml b/indra/newview/skins/default/xui/it/panel_group_invite.xml index 7874f588a5..e3cb3c1092 100644 --- a/indra/newview/skins/default/xui/it/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/it/panel_group_invite.xml @@ -13,7 +13,7 @@ Puoi selezionare più residenti da invitare nel tuo gruppo. Per iniziare, clicca su Apri il selettore di residenti. </text> <button label="Scelta residenti" name="add_button" tool_tip=""/> - <name_list name="invitee_list" tool_tip="Tieni premuto Ctrl e fai clic sui nomi dei residenti per una selezionare più nomi"/> + <name_list name="invitee_list" tool_tip="Tieni premuto Ctrl e fai clic sui nomi dei residenti per selezionare più nomi"/> <button label="Rimuovi i selezionati dall'elenco" name="remove_button" tool_tip="Rimuove i residenti selezionati dalla lista degli inviti"/> <text name="role_text"> Scegli che ruolo assegnare loro: diff --git a/indra/newview/skins/default/xui/it/panel_group_roles.xml b/indra/newview/skins/default/xui/it/panel_group_roles.xml index ef6f85390a..1769ef748d 100644 --- a/indra/newview/skins/default/xui/it/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/it/panel_group_roles.xml @@ -6,23 +6,23 @@ <panel.string name="want_apply_text"> Vuoi salvare le modifiche? </panel.string> - <tab_container height="164" name="roles_tab_container"> - <panel height="148" label="MEMBRI" name="members_sub_tab" tool_tip="Membri"> + <tab_container name="roles_tab_container"> + <panel label="MEMBRI" name="members_sub_tab" tool_tip="Membri"> <panel.string name="help_text"> Puoi aggiungere o rimuovere i ruoli assegnati ai membri. Seleziona più membri tenendo premuto il tasto Ctrl e cliccando sui loro nomi. </panel.string> <filter_editor label="Filtra Membri" name="filter_input"/> - <name_list bottom_delta="-105" height="104" name="member_list"> + <name_list name="member_list"> <name_list.columns label="Socio" name="name"/> <name_list.columns label="Donazioni" name="donated"/> <name_list.columns label="Stato" name="online"/> </name_list> - <button label="Invita" name="member_invite" width="165"/> + <button label="Invita" name="member_invite"/> <button label="Espelli" name="member_eject"/> </panel> - <panel height="148" label="RUOLI" name="roles_sub_tab"> + <panel label="RUOLI" name="roles_sub_tab"> <panel.string name="help_text"> I ruoli hanno un titolo con un elenco di abilità permesse che i membri possono eseguire. I membri possono avere @@ -36,7 +36,7 @@ fra cui il ruolo base o "Tutti" e il ruolo del Proprietario, ovvero il Inv_FolderClosed </panel.string> <filter_editor label="Filtra i ruoli" name="filter_input"/> - <scroll_list bottom_delta="-104" height="104" name="role_list"> + <scroll_list name="role_list"> <scroll_list.columns label="Ruolo" name="name"/> <scroll_list.columns label="Titolo" name="title"/> <scroll_list.columns label="#" name="members"/> diff --git a/indra/newview/skins/default/xui/it/panel_login.xml b/indra/newview/skins/default/xui/it/panel_login.xml index bbf93ceb87..287e938d57 100644 --- a/indra/newview/skins/default/xui/it/panel_login.xml +++ b/indra/newview/skins/default/xui/it/panel_login.xml @@ -12,13 +12,21 @@ Nome: </text> <line_editor label="Nome" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> + <text name="last_name_text"> + Cognome: + </text> <line_editor label="Cognome" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> + <text name="password_text"> + Password: + </text> <check_box label="Ricorda password" name="remember_check"/> <text name="start_location_text"> Inizia da: </text> <combo_box name="start_location_combo"> + <combo_box.item label="La mia ultima ubicazione" name="MyLastLocation"/> <combo_box.item label="Casa mia" name="MyHome"/> + <combo_box.item label="<Scrivi nome regione>" name="Typeregionname"/> </combo_box> <button label="Accedi" name="connect_btn"/> </layout_panel> @@ -26,6 +34,9 @@ <text name="create_new_account_text"> Iscriviti </text> + <text name="forgot_password_text"> + Hai dimenticato il nome o la password? + </text> <text name="login_help"> Ti serve aiuto con la fase di accesso? </text> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml index d02a794219..5bd0cfb106 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_graphics1.xml @@ -47,12 +47,12 @@ <check_box initial_value="true" label="Avatar bidimensionali (Impostor)" name="AvatarImpostors"/> <check_box initial_value="true" label="Hardware Skinning" name="AvatarVertexProgram"/> <check_box initial_value="true" label="Abiti dell'avatar" name="AvatarCloth"/> - <slider label="Distanza di disegno:" label_width="158" name="DrawDistance" width="255"/> + <slider label="Distanza di disegno:" name="DrawDistance"/> <text name="DrawDistanceMeterText2"> m </text> - <slider label="Conteggio massimo particelle:" label_width="158" name="MaxParticleCount" width="262"/> - <slider label="Qualità in post-produzione:" label_width="158" name="RenderPostProcess" width="223"/> + <slider label="Conteggio massimo particelle:" name="MaxParticleCount"/> + <slider label="Qualità in post-produzione:" name="RenderPostProcess"/> <text name="MeshDetailText"> Dettagli reticolo: </text> @@ -99,7 +99,7 @@ </radio_group> </panel> <button label="Applica" label_selected="Applica" name="Apply"/> - <button label="Reimposta" left="110" name="Defaults" width="190"/> + <button label="Reimposta" name="Defaults"/> <button label="Avanzate" name="Advanced"/> <button label="Hardware" label_selected="Hardware" name="GraphicsHardwareButton"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml index 2842b6a8aa..6936f24a8a 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Suoni" name="Preference Media panel"> - <slider label="Comando volume centrale" name="System Volume"/> - <check_box initial_value="true" label="Disattiva audio quando minimizzato" name="mute_when_minimized"/> + <slider label="Vol. principale" name="System Volume"/> + <check_box initial_value="true" label="Disatt. se a icona" name="mute_when_minimized"/> <slider label="Pulsanti" name="UI Volume"/> <slider label="Ambiente" name="Wind Volume"/> <slider label="Effetti sonori" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/it/panel_region_estate.xml b/indra/newview/skins/default/xui/it/panel_region_estate.xml index 8d3f096c4b..61e3f31024 100644 --- a/indra/newview/skins/default/xui/it/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/it/panel_region_estate.xml @@ -3,7 +3,7 @@ <text name="estate_help_text"> Le modifiche apportate in questa scheda saranno valide per tutte le regioni in questa proprietà. </text> - <text name="estate_text" width="140"> + <text name="estate_text"> Proprietà immobiliari: </text> <text name="estate_name"> diff --git a/indra/newview/skins/default/xui/it/panel_side_tray.xml b/indra/newview/skins/default/xui/it/panel_side_tray.xml index 846dcb69f0..e0143088a5 100644 --- a/indra/newview/skins/default/xui/it/panel_side_tray.xml +++ b/indra/newview/skins/default/xui/it/panel_side_tray.xml @@ -6,24 +6,24 @@ <sidetray_tab description="Casa." name="sidebar_home" tab_title="Home"> <panel label="casa" name="panel_home"/> </sidetray_tab> - <sidetray_tab description="Modifica il tuo profilo pubblico e i preferiti." name="sidebar_me" tab_title="My Profile"> + <sidetray_tab description="Modifica il tuo profilo pubblico e i preferiti." name="sidebar_me" tab_title="Il mio profilo"> <panel_container name="panel_container"> <panel label="Io" name="panel_me"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Trova amici, contatti e persone nelle vicinanze." name="sidebar_people" tab_title="People"> + <sidetray_tab description="Trova amici, contatti e persone nelle vicinanze." name="sidebar_people" tab_title="Persone"> <panel_container name="panel_container"> <panel label="Profilo del gruppo" name="panel_group_info_sidetray"/> <panel label="Residenti e oggetti bloccati" name="panel_block_list_sidetray"/> </panel_container> </sidetray_tab> - <sidetray_tab description="Trova luoghi dove andare e luoghi già visitati." label="Luoghi" name="sidebar_places" tab_title="Places"> + <sidetray_tab description="Trova luoghi dove andare e luoghi già visitati." label="Luoghi" name="sidebar_places" tab_title="Luoghi"> <panel label="Luoghi" name="panel_places"/> </sidetray_tab> - <sidetray_tab description="Sfoglia il tuo inventario." name="sidebar_inventory" tab_title="My Inventory"> + <sidetray_tab description="Sfoglia il tuo inventario." name="sidebar_inventory" tab_title="Il mio inventario"> <panel label="Modifica inventario" name="sidepanel_inventory"/> </sidetray_tab> - <sidetray_tab description="Cambia il tuo aspetto ed il tuo look attuale." name="sidebar_appearance" tab_title="My Appearance"> + <sidetray_tab description="Cambia il tuo aspetto ed il tuo look attuale." name="sidebar_appearance" tab_title="Il mio aspetto"> <panel label="Modifica aspetto fisico" name="sidepanel_appearance"/> </sidetray_tab> </side_tray> diff --git a/indra/newview/skins/default/xui/it/role_actions.xml b/indra/newview/skins/default/xui/it/role_actions.xml index 95f1f662f9..e3f95f7f86 100644 --- a/indra/newview/skins/default/xui/it/role_actions.xml +++ b/indra/newview/skins/default/xui/it/role_actions.xml @@ -20,7 +20,7 @@ <action_set description="Queste Abilità comprendono il potere di intestare, modificare e vendere terreni di proprietà del gruppo. Per aprire la finestra Informazioni sul terreno, fai clic con il pulsante destro del mouse sul terreno e seleziona Informazioni sul terreno, o clicca sull'icona 'i' nella Barra di Navigazione." name="Parcel Management"> <action description="Cessione di terreno e acquisto di terreno per il gruppo" longdescription="Intesta terreno e acquista terreno per il gruppo. Ciò viene fatto in Informazioni sul terreno > scheda Generale." name="land deed"/> <action description="Abbandonare il terreno in favore di Governor Linden" longdescription="Abbandona il terreno in favore di Governor Linden. *ATTENZIONE* Ogni membro con questo ruolo e abilità può abbandonare il terreno di proprietà del gruppo in Informazioni sul terreno > scheda Generale, restituendolo alla proprietà Linden senza effettuare una vendita. Sii sicuro della scelta prima di assegnare questa Abilità." name="land release"/> - <action description="Informazioni su come impostare il terreno come in vendita" longdescription="Imposta le info per la vendita della terra. *ATTENZIONE* Ogni Membro con questo ruolo e abilità può vendere il terreno di proprietà del gruppo nella scheda Informazioni sul terreno > scheda Generale. Pertanto sii sicuro della scelta prima di assegnare questa Abilità." name="land set sale info"/> + <action description="Informazioni su come impostare il terreno come in vendita" longdescription="Imposta le informazioni per la vendita del terreno. *ATTENZIONE* Ogni Membro con questo ruolo e abilità può vendere il terreno di proprietà del gruppo nella scheda Informazioni sul terreno > scheda Generale. Pertanto sii sicuro della scelta prima di assegnare questa Abilità." name="land set sale info"/> <action description="Suddividere e unire lotti" longdescription="Suddividi e unisci lotti. Viene fatto cliccando con il pulsante destro del mouse sul terreno, selezionando Modifica terreno e trascinando il mouse sul terreno per creare una selezione. Per suddividere, seleziona quale parte vuoi dividere e clicca su Suddividi. Per unire, seleziona due o più lotti confinanti e clicca su Unisci." name="land divide join"/> </action_set> <action_set description="Queste abilità permettono di cambiare il nome del lotto, le impostazioni di pubblicazione, la visibilità negli elenchi e il punto di arrivo, nonché opzioni di indirizzamento del Teleport." name="Parcel Identity"> diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml index 93239983a8..a1b570d716 100644 --- a/indra/newview/skins/default/xui/it/strings.xml +++ b/indra/newview/skins/default/xui/it/strings.xml @@ -853,7 +853,7 @@ Offerta di Teleport </string> <string name="StartUpNotifications"> - Nuove notifice sono arrivate mentre eri assente... + Mentre eri assente sono arrivate nuove notifiche... </string> <string name="OverflowInfoChannelString"> Hai ancora [%d] notifiche diff --git a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml index 7bda25e00f..b924af4e67 100644 --- a/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/ja/floater_day_cycle_options.xml @@ -84,10 +84,10 @@ <text name="DayCycleText3"> プレビュー: </text> - <button label="再生" label_selected="再生" name="WLAnimSky" left_delta="70"/> + <button label="再生" label_selected="再生" name="WLAnimSky"/> <button label="停止" label_selected="停止" name="WLStopAnimSky" /> <button label="不動産の時刻を使用" - label_selected="不動産の時刻に変更" name="WLUseLindenTime" width="140"/> + label_selected="不動産の時刻に変更" name="WLUseLindenTime"/> <button label="デイテストを保存" label_selected="デイテストを保存" name="WLSaveDayCycle" /> <button label="デイテストをロード" diff --git a/indra/newview/skins/default/xui/ja/floater_report_abuse.xml b/indra/newview/skins/default/xui/ja/floater_report_abuse.xml index 105e903840..dc34441535 100644 --- a/indra/newview/skins/default/xui/ja/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/ja/floater_report_abuse.xml @@ -92,7 +92,7 @@ <text name="dscr_title"> 詳細: </text> - <text name="bug_aviso" width="210"> + <text name="bug_aviso"> できるだけ具体的に詳しく記入してください。 </text> <text name="incomplete_title"> diff --git a/indra/newview/skins/default/xui/ja/language_settings.xml b/indra/newview/skins/default/xui/ja/language_settings.xml index 71418d446a..72382417d9 100644 --- a/indra/newview/skins/default/xui/ja/language_settings.xml +++ b/indra/newview/skins/default/xui/ja/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">japanese</string> + <string name="DarwinLocale">ja_JP.UTF-8</string> + <string name="LinuxLocale">ja_JP.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml index fe830d864f..abbd29286b 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml @@ -12,7 +12,7 @@ <slider label="ボイスチャット" name="Voice Volume"/> <check_box label="有効" name="enable_voice_check"/> <check_box label="メディアを自動再生する" name="media_auto_play_btn" tool_tip="ここにチェックを入れてメディアの自動再生を許可します" value="true"/> - <check_box label="他のアバターに取り付けられたメディアを再生します" name="media_show_on_others_btn" tool_tip="このチェックを外すと、近くにいる他のアバターに取り付けられたメディアを非表示にします。" value="true"/> + <check_box label="他のアバターに取り付けられたメディアを再生する" name="media_show_on_others_btn" tool_tip="このチェックを外すと、近くにいる他のアバターに取り付けられたメディアを非表示にします" value="true"/> <text name="voice_chat_settings"> ボイスチャットの設定 </text> diff --git a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml index 1fe6ad25ed..a9897c7ae4 100644 --- a/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/ja/panel_prim_media_controls.xml @@ -13,10 +13,10 @@ </layout_stack> <layout_stack name="media_controls"> <layout_panel name="back"> - <button name="back_btn" tool_tip="Navigate back"/> + <button name="back_btn" tool_tip="前へ"/> </layout_panel> <layout_panel name="fwd"> - <button name="fwd_btn" tool_tip="Navigate forward"/> + <button name="fwd_btn" tool_tip="次へ"/> </layout_panel> <layout_panel name="home"> <button name="home_btn" tool_tip="ホームページ"/> @@ -51,10 +51,10 @@ <slider_bar initial_value="0.5" name="media_play_slider" tool_tip="ムービー再生進行"/> </layout_panel> <layout_panel name="skip_back"> - <button name="skip_back_btn" tool_tip="Step back"/> + <button name="skip_back_btn" tool_tip="前にステップ"/> </layout_panel> <layout_panel name="skip_forward"> - <button name="skip_forward_btn" tool_tip="Step forward"/> + <button name="skip_forward_btn" tool_tip="次にステップ"/> </layout_panel> <layout_panel name="media_volume"> <button name="media_mute_button" tool_tip="ミュート"/> @@ -64,7 +64,7 @@ <button name="zoom_frame_btn" tool_tip="メディアにズームイン"/> </layout_panel> <layout_panel name="close"> - <button name="close_btn" tool_tip="Zoom Back"/> + <button name="close_btn" tool_tip="ズームバック"/> </layout_panel> <layout_panel name="new_window"> <button name="new_window_btn" tool_tip="URL をブラウザで開く"/> diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml index b9df82adcd..a54d96061f 100644 --- a/indra/newview/skins/default/xui/ja/strings.xml +++ b/indra/newview/skins/default/xui/ja/strings.xml @@ -3577,4 +3577,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ <string name="Contents"> コンテンツ </string> + <string name="AvatarBirthDateFormat"> + [year,datetime,slt]/[mthnum,datetime,slt]/[day,datetime,slt] + </string> </strings> diff --git a/indra/newview/skins/default/xui/nl/floater_about.xml b/indra/newview/skins/default/xui/nl/floater_about.xml index 10c30eb361..f71f935c24 100644 --- a/indra/newview/skins/default/xui/nl/floater_about.xml +++ b/indra/newview/skins/default/xui/nl/floater_about.xml @@ -1,20 +1,60 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="floater_about" title="OVER [CAPITALIZED_APP_NAME]"> -<tab_container name="about_tab"> - <panel name="credits_panel"> - <text_editor name="credits_editor"> - Second Life wordt u aangeboden door Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl and many others. + <floater.string name="AboutHeader"> + [APP_NAME] [VIEWER_VERSION_0].[VIEWER_VERSION_1].[VIEWER_VERSION_2] ([VIEWER_VERSION_3]) [BUILD_DATE] [BUILD_TIME] ([CHANNEL]) +[[VIEWER_RELEASE_NOTES_URL] [ReleaseNotes]] + </floater.string> + <floater.string name="AboutCompiler"> + Gemaakt met [COMPILER] versie [COMPILER_VERSION] + </floater.string> + <floater.string name="AboutPosition"> + U bent op [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] gelegen op [HOSTNAME] ([HOSTIP]) +[SERVER_VERSION] +[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]] + </floater.string> + <floater.string name="AboutSystem"> + CPU: [CPU] +Geheugen: [MEMORY_MB] MB +OS Versie: [OS_VERSION] +Grafische Kaard Vendor: [GRAPHICS_CARD_VENDOR] +Grafische Kaard: [GRAPHICS_CARD] + </floater.string> + <floater.string name="AboutDriver"> + Windows Grafische Driver Versie: [GRAPHICS_DRIVER_VERSION] + </floater.string> + <floater.string name="AboutLibs"> + OpenGL Versie: [OPENGL_VERSION] + +libcurl Versie: [LIBCURL_VERSION] +J2C Decoder Versie: [J2C_VERSION] +Audio Driver Versie: [AUDIO_DRIVER_VERSION] +Qt Webkit Versie: [QT_WEBKIT_VERSION] +Vivox Versie: [VIVOX_VERSION] + </floater.string> + <floater.string name="none"> + (none) + </floater.string> + <floater.string name="AboutTraffic"> + Pakketten Verloren: [PACKETS_LOST,number,0]/[PACKETS_IN,number,0] ([PACKETS_PCT,number,1]%) + </floater.string> + <tab_container name="about_tab"> + <panel label="Info" name="support_panel"> + <button label="Kopiëren naar Klembord" name="copy_btn"/> + </panel> + <panel label="Credits" name="credits_panel"> + <text_editor name="credits_editor"> + Second Life wordt u aangeboden door Philip, Tessa, Andrew, Cory, James, Ben, Char, Charlie, Colin, Dan, Daniel, Doug, Eric, Hamlet, Haney, Eve, Hunter, Ian, Jeff, Jennifer, Jim, John, Lee, Mark, Peter, Phoenix, Richard, Robin, Xenon, Steve, Tanya, Eddie, Avi, Frank, Bruce, Aaron, Alice, Bob, Debra, Eileen, Helen, Janet, Louie, Leviathania, Stefan, Ray, Kevin, Tom, Mikeb, MikeT, Burgess, Elena, Tracy, Bill, Todd, Ryan, Zach, Sarah, Nova, Tim, Stephanie, Michael, Evan, Nicolas, Catherine, Rachelle, Dave, Holly, Bub, Kelly, Magellan, Ramzi, Don, Sabin, Jill, Rheya, Jeska, Torley, Kona, Callum, Charity, Ventrella, Jack, Vektor, Iris, Chris, Nicole, Mick, Reuben, Blue, Babbage, Yedwab, Deana, Lauren, Brent, Pathfinder, Chadrick, Altruima, Jesse, Teeny, Monroe, Icculus, David, Tess, Lizzie, Patsy, Isaac, Lawrence, Cyn, Bo, Gia, Annette, Marius, Tbone, Jonathan, Karen, Ginsu, Satoko, Yuko, Makiko, Thomas, Harry, Seth, Alexei, Brian, Guy, Runitai, Ethan, Data, Cornelius, Kenny, Swiss, Zero, Natria, Wendy, Stephen, Teeple, Thumper, Lucy, Dee, Mia, Liana, Warren, Branka, Aura, beez, Milo, Hermia, Red, Thrax, Joe, Sally, Magenta, Mogura, Paul, Jose, Rejean, Henrik, Lexie, Amber, Logan, Xan, Nora, Morpheus, Donovan, Leyla, MichaelFrancis, Beast, Cube, Bucky, Joshua, Stryfe, Harmony, Teresa, Claudia, Walker, Glenn, Fritz, Fordak, June, Cleopetra, Jean, Ivy, Betsy, Roosevelt, Spike, Ken, Which, Tofu, Chiyo, Rob, Zee, dustin, George, Del, Matthew, Cat, Jacqui, Lightfoot, Adrian, Viola, Alfred, Noel, Irfan, Sunil, Yool, Rika, Jane, Xtreme, Frontier, a2, Neo, Siobhan, Yoz, Justin, Elle, Qarl, Benjamin, Isabel, Gulliver, Everett, Christopher, Izzy, Stephany, Garry, Sejong, Sean, Tobin, Iridium, Meta, Anthony, Jeremy, JP, Jake, Maurice, Madhavi, Leopard, Kyle, Joon, Kari, Bert, Belinda, Jon, Kristi, Bridie, Pramod, KJ, Socrates, Maria, Ivan, Aric, Yamasaki, Adreanne, Jay, MitchK, Ceren, Coco, Durl, Jenny, Periapse, Kartic, Storrs, Lotte, Sandy, Rohn, Colossus, Zen, BigPapi, Brad, Pastrami, Kurz, Mani, Neuro, Jaime, MJ, Rowan, Sgt, Elvis, Gecko, Samuel, Sardonyx, Leo, Bryan, Niko, Soft, Poppy, Rachel, Aki, Angelo, Banzai, Alexa, Sue, CeeLo, Bender, CG, Gillian, Pelle, Nick, Echo, Zara, Christine, Shamiran, Emma, Blake, Keiko, Plexus, Joppa, Sidewinder, Erica, Ashlei, Twilight, Kristen, Brett, Q, Enus, Simon, Bevis, Kraft, Kip, Chandler, Ron, LauraP, Ram, KyleJM, Scouse, Prospero, Melissa, Marty, Nat, Hamilton, Kend, Lordan, Jimmy, Kosmo, Seraph, Green, Ekim, Wiggo, JT, Rome, Doris, Miz, Benoc, Whump, Trinity, Patch, Kate, TJ, Bao, Joohwan, Christy, Sofia, Matias, Cogsworth, Johan, Oreh, Cheah, Angela, Brandy, Mango, Lan, Aleks, Gloria, Heidy, Mitchell, Space, Colton, Bambers, Einstein, Maggie, Malbers, Rose, Winnie, Stella, Milton, Rothman, Niall, Marin, Allison, Katie, Dawn, Katt, Dusty, Kalpana, Judy, Andrea, Ambroff, Infinity, Gail, Rico, Raymond, Yi, William, Christa, M, Teagan, Scout, Molly, Dante, Corr, Dynamike, Usi, Kaylee, Vidtuts, Lil, Danica, Sascha, Kelv, Jacob, Nya, Rodney, Brandon, Elsie, Blondin, Grant, Katrin, Nyx, Gabriel, Locklainn, Claire, Devin, Minerva, Monty, Austin, Bradford, Si, Keira, H, Caitlin, Dita, Makai, Jenn, Ann, Meredith, Clare, Joy, Praveen, Cody, Edmund, Ruthe, Sirena, Gayathri, Spider, FJ, Davidoff, Tian, Jennie, Louise, Oskar, Landon, Noelle, Jarv, Ingrid, Al, Sommer, Doc, Aria, Huin, Gray, Lili, Vir, DJ, Yang, T, Simone, Maestro, Scott, Charlene, Quixote, Amanda, Susan, Zed, Anne, Enkidu, Esbee, Joroan, Katelin, Roxie, Tay, Scarlet, Kevin, Johnny, Wolfgang, Andren, Bob, Howard, Merov, Rand, Ray, Michon, Newell, Galen, Dessie, Les, Michon, Jenelle, Geo, Siz, Shapiro, Pete, Calyle, Selene, Allen, Phoebe, Goldin, Kimmora, Dakota, Slaton, Lindquist, Zoey, Hari, Othello, Rohit, Sheldon, Petra, Viale, Gordon, Kaye, Pink, Ferny, Emerson, Davy, Bri, Chan, Juan, Robert, Terrence, Nathan, Carl and many others. Een 'Dank u' voor de volgende bewoners voor het helpen zorgdragen dat dit de beste versie tot nu toe is: able whitman, Adeon Writer, adonaira aabye, Aeron Kohime, Agathos Frascati, Aimee Trescothick, Aleric Inglewood, Alissa Sabre, Aminom Marvin, Angela Talamasca, Aralara Rajal, Armin Weatherwax, Ashrilyn Hayashida, Athanasius Skytower, Aura Dirval, Barney Boomslang, Biancaluce Robbiani, Biker Offcourse, Borg Capalini, Bulli Schumann, catherine pfeffer, Chalice Yao, Corre Porta, Court Goodman, Cummere Mayo, Dale Innis, Darien Caldwell, Darjeeling Schoonhoven, Daten Thielt, dimentox travanti, Dirk Talamasca, Drew Dwi, Duckless Vandyke, Elanthius Flagstaff, Electro Burnstein, emiley tomsen, Escort DeFarge, Eva Rau, Ezian Ecksol, Fire Centaur, Fluf Fredriksson, Francisco Koolhoven, Frontera Thor, Frungi Stastny, Gally Young, gearsawe stonecutter, Gigs Taggart, Gordon Wendt, Gudmund Shepherd, Gypsy Paz, Harleen Gretzky, Henri Beauchamp, Inma Rau, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Jessicka Graves, Joeseph Albanese, Joshua Philgarlic, Khyota Wulluf, kirstenlee Cinquetti, Latif Khalifa, Lex Neva, Lilibeth Andree, Lisa Lowe, Lunita Savira, Loosey Demonia, lum pfohl, Marcos Fonzarelli, MartinRJ Fayray, Marusame Arai, Matthew Dowd, Maya Remblai, McCabe Maxsted, Meghan Dench, Melchoir Tokhes, Menos Short, Michelle2 Zenovka, Mimika Oh, Minerva Memel, Mm Alder, Ochi Wolfe, Omei Turnbull, Pesho Replacement, Phantom Ninetails, phoenixflames kukulcan, Polo Gufler, prez pessoa, princess niven, Prokofy Neva, Qie Niangao, Rem Beattie, RodneyLee Jessop, Saijanai Kuhn, Seg Baphomet, Sergen Davies, Shirley Marquez, SignpostMarv Martin, Sindy Tsure, Sira Arbizu, Skips Jigsaw, Sougent Harrop, Spritely Pixel, Squirrel Wood, StarSong Bright, Subversive Writer, Sugarcult Dagger, Sylumm Grigorovich, Tammy Nowotny, Tanooki Darkes, Tayra Dagostino, Theoretical Chemistry, Thickbrick Sleaford, valerie rosewood, Vex Streeter, Vixen Heron, Whoops Babii, Winter Ventura, Xiki Luik, Yann Dufaux, Yina Yao, Yukinoroh Kamachi, Zolute Infinity, Zwagoth Klaar To be a success in business, be daring, be first, be different. --Henry Marchant - </text_editor> - </panel> - <panel name="licenses_panel"> - <text_editor name="credits_editor"> -3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion + </text_editor> + </panel> + <panel label="Licenties" name="licenses_panel"> + <text_editor name="credits_editor"> + 3Dconnexion SDK Copyright (C) 1992-2007 3Dconnexion APR Copyright (C) 2000-2004 The Apache Software Foundation cURL Copyright (C) 1996-2002, Daniel Stenberg, (daniel@haxx.se) DBus/dbus-glib Copyright (C) 2002, 2003 CodeFactory AB / Copyright (C) 2003, 2004 @@ -35,10 +75,7 @@ google-perftools Copyright (c) 2005, Google Inc. All rights reserved. See licenses.txt for details. Voice chat Audio coding: Polycom(R) Siren14(TM) (ITU-T Rec. G.722.1 Annex C) - </text_editor> - </panel> -</tab_container> - <string name="you_are_at"> - U bent op [POSITION] - </string> + </text_editor> + </panel> + </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/nl/floater_joystick.xml b/indra/newview/skins/default/xui/nl/floater_joystick.xml index 505e3cd719..1d590dc1f3 100644 --- a/indra/newview/skins/default/xui/nl/floater_joystick.xml +++ b/indra/newview/skins/default/xui/nl/floater_joystick.xml @@ -45,7 +45,7 @@ <text name="ZDeadZone"> Z dode zone </text> - <text name="PitchDeadZone" left="4" width="110"> + <text name="PitchDeadZone"> Stampen dode zone </text> <text name="YawDeadZone"> diff --git a/indra/newview/skins/default/xui/nl/floater_mute_object.xml b/indra/newview/skins/default/xui/nl/floater_mute_object.xml index 7a34be1bd7..edea63b42c 100644 --- a/indra/newview/skins/default/xui/nl/floater_mute_object.xml +++ b/indra/newview/skins/default/xui/nl/floater_mute_object.xml @@ -1,13 +1,14 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="mute by name" title="NEGEER OBJECT OP NAAM"> - <text name="message" bottom_delta="-40"> - Negeer op naam heeft alleen invloed op object chat -en IM, niet op geluiden. U dient de naam van het object -exact te typen. +<floater name="mute by name" title="BLOKKEER VOORWERP BIJ NAAM"> + <text bottom_delta="-40" name="message"> + Blokkeer een Voorwerp: </text> - <line_editor name="object_name" bottom_delta="-58"> + <line_editor bottom_delta="-58" name="object_name"> Object naam </line_editor> + <text name="note"> + * Blokkeerd alleen object tekst, niet de geluiden + </text> <button label="Ok" name="OK"/> <button label="Annuleren" name="Cancel"/> </floater> diff --git a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml index 19b11ede0a..a50773c2b3 100644 --- a/indra/newview/skins/default/xui/nl/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/nl/floater_report_abuse.xml @@ -1,30 +1,33 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="floater_report_abuse" title="MISBRUIK RAPPORTEREN"> - <check_box label="Voeg schermafbeelding toe" name="screen_check"/> + <floater.string name="Screenshot"> + Schermafbeelding + </floater.string> + <check_box label="Gebruik deze schermafbeelding" name="screen_check"/> <text name="reporter_title" width="110"> Rapporteur: </text> - <text name="reporter_field" left_delta="70"> - Loremipsum Dolorsitamut + <text left_delta="70" name="reporter_field"> + Loremipsum Dolorsitamut Longnamez </text> <text name="sim_title"> Regio: </text> - <text name="sim_field" left_delta="70"> + <text left_delta="70" name="sim_field"> Regionaam </text> <text name="pos_title"> Positie: </text> - <text name="pos_field" left_delta="70"> + <text left_delta="70" name="pos_field"> {128.1, 128.1, 15.4} </text> <text name="select_object_label"> - Klik de knop, daarna het object: + Klik de knop, vervolgens het misbruik voorwerp: </text> <button label="" label_selected="" name="pick_btn" tool_tip="Objectkiezer - Identificeer een object als het onderwerp van dit rapport"/> <text name="object_name_label"> - Naam: + voorwerp: </text> <text name="object_name" width="120"> Consetetur Sadipscing @@ -33,54 +36,53 @@ Eigenaar: </text> <text name="owner_name"> - Hendrerit Vulputate + Hendrerit Vulputate Kamawashi Longname </text> <combo_box name="category_combo" tool_tip="Categorie -- selecteer de categorie die dit rapport het best beschrijft"> - <combo_box.item name="Select_category" label="Selecteer categorie"/> - <combo_box.item name="Age__Age_play" label="Leeftijd > Leeftijd spelen"/> - <combo_box.item name="Age__Adult_resident_on_Teen_Second_Life" label="Leeftijd > Volwassen inwoner in Teen Second Life"/> - <combo_box.item name="Age__Underage_resident_outside_of_Teen_Second_Life" label="Leeftijd > Minderjarige inwoner buiten Teen Second Life"/> - <combo_box.item name="Assault__Combat_sandbox___unsafe_area" label="Aanval > Gevechtszandbak / onveilig gebied"/> - <combo_box.item name="Assault__Safe_area" label="Aanval > Veilig gebied"/> - <combo_box.item name="Assault__Weapons_testing_sandbox" label="Aanval > Zandbak voor het testen van wapens"/> - <combo_box.item name="Commerce__Failure_to_deliver_product_or_service" label="Handel > Product of dienst is niet geleverd"/> - <combo_box.item name="Disclosure__Real_world_information" label="Openbaring > Echte wereld informatie"/> - <combo_box.item name="Disclosure__Remotely_monitoring chat" label="Openbaring > Op afstand chat afluisteren"/> - <combo_box.item name="Disclosure__Second_Life_information_chat_IMs" label="Openbaring > Second Life informatie/chat/IMs"/> - <combo_box.item name="Disturbing_the_peace__Unfair_use_of_region_resources" label="Vredebreuk > Oneerlijk gebruik van regiomiddelen"/> - <combo_box.item name="Disturbing_the_peace__Excessive_scripted_objects" label="Vredebreuk > Excessieve gescripte objecten"/> - <combo_box.item name="Disturbing_the_peace__Object_littering" label="Vredebreuk > Objecten laten rondslingeren"/> - <combo_box.item name="Disturbing_the_peace__Repetitive_spam" label="Vredebreuk > Herhaalde spam"/> - <combo_box.item name="Disturbing_the_peace__Unwanted_advert_spam" label="Vredebreuk > Ongewenste reclame-spam"/> - <combo_box.item name="Fraud__L$" label="Fraude > L$"/> - <combo_box.item name="Fraud__Land" label="Fraude > Land"/> - <combo_box.item name="Fraud__Pyramid_scheme_or_chain_letter" label="Fraude > Piramideschema of kettingbrief"/> - <combo_box.item name="Fraud__US$" label="Fraude > US$"/> - <combo_box.item name="Harassment__Advert_farms___visual_spam" label="Intimidatie > Reclameverzamelingen / visuele spam"/> - <combo_box.item name="Harassment__Defaming_individuals_or_groups" label="Intimidatie > Individuen of groepen in diskrediet brengen"/> - <combo_box.item name="Harassment__Impeding_movement" label="Intimidatie > Beweging verhinderen"/> - <combo_box.item name="Harassment__Sexual_harassment" label="Intimidatie > Seksuele intimidatie"/> - <combo_box.item name="Harassment__Solicting_inciting_others_to_violate_ToS" label="Intimidatie > Anderen uitnodigen/aanzetten tot het schenden van de ToS"/> - <combo_box.item name="Harassment__Verbal_abuse" label="Intimidatie > Verbaal misbruik"/> - <combo_box.item name="Indecency__Broadly_offensive_content_or_conduct" label="Onfatsoenlijkheid > Globaal beledigende inhoud of gedrag"/> - <combo_box.item name="Indecency__Inappropriate_avatar_name" label="Onfatsoenlijkheid > Ongepaste avatar naam"/> - <combo_box.item name="Indecency__Mature_content_in_PG_region" label="Onfatsoenlijkheid > Ongepaste inhoud of gedrag in een PG regio"/> - <combo_box.item name="Indecency__Inappropriate_content_in_Mature_region" label="Onfatsoenlijkheid > Ongepaste inhoud of gedrag in een Mature regio"/> - <combo_box.item name="Intellectual_property_infringement_Content_Removal" label="Inbreuk op intellectueel eigendom > Verwijderen van inhoud"/> - <combo_box.item name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit" label="Inbreuk op intellectueel eigendom > CopyBot of misbruik van permissies"/> - <combo_box.item name="Intolerance" label="Intolerantie"/> - <combo_box.item name="Land__Abuse_of_sandbox_resources" label="Land > Misbruik van zandbakmiddelen"/> - <combo_box.item name="Land__Encroachment__Objects_textures" label="Land > Indringing > Objecten/texturen"/> - <combo_box.item name="Land__Encroachment__Particles" label="Land > Indringing > Particles"/> - <combo_box.item name="Land__Encroachment__Trees_plants" label="Land > Indringing > Bomen/planten"/> - <combo_box.item name="Wagering_gambling" label="Weddenschappen/gokken"/> - <combo_box.item name="Other" label="Anders"/> + <combo_box.item label="Selecteer categorie" name="Select_category"/> + <combo_box.item label="Leeftijd > Leeftijd spelen" name="Age__Age_play"/> + <combo_box.item label="Leeftijd > Volwassen inwoner in Teen Second Life" name="Age__Adult_resident_on_Teen_Second_Life"/> + <combo_box.item label="Leeftijd > Minderjarige inwoner buiten Teen Second Life" name="Age__Underage_resident_outside_of_Teen_Second_Life"/> + <combo_box.item label="Aanval > Gevechtszandbak / onveilig gebied" name="Assault__Combat_sandbox___unsafe_area"/> + <combo_box.item label="Aanval > Veilig gebied" name="Assault__Safe_area"/> + <combo_box.item label="Aanval > Zandbak voor het testen van wapens" name="Assault__Weapons_testing_sandbox"/> + <combo_box.item label="Handel > Product of dienst is niet geleverd" name="Commerce__Failure_to_deliver_product_or_service"/> + <combo_box.item label="Openbaring > Echte wereld informatie" name="Disclosure__Real_world_information"/> + <combo_box.item label="Openbaring > Op afstand chat afluisteren" name="Disclosure__Remotely_monitoring chat"/> + <combo_box.item label="Openbaring > Second Life informatie/chat/IMs" name="Disclosure__Second_Life_information_chat_IMs"/> + <combo_box.item label="Vredebreuk > Oneerlijk gebruik van regiomiddelen" name="Disturbing_the_peace__Unfair_use_of_region_resources"/> + <combo_box.item label="Vredebreuk > Excessieve gescripte objecten" name="Disturbing_the_peace__Excessive_scripted_objects"/> + <combo_box.item label="Vredebreuk > Objecten laten rondslingeren" name="Disturbing_the_peace__Object_littering"/> + <combo_box.item label="Vredebreuk > Herhaalde spam" name="Disturbing_the_peace__Repetitive_spam"/> + <combo_box.item label="Vredebreuk > Ongewenste reclame-spam" name="Disturbing_the_peace__Unwanted_advert_spam"/> + <combo_box.item label="Fraude > L$" name="Fraud__L$"/> + <combo_box.item label="Fraude > Land" name="Fraud__Land"/> + <combo_box.item label="Fraude > Piramideschema of kettingbrief" name="Fraud__Pyramid_scheme_or_chain_letter"/> + <combo_box.item label="Fraude > US$" name="Fraud__US$"/> + <combo_box.item label="Intimidatie > Reclameverzamelingen / visuele spam" name="Harassment__Advert_farms___visual_spam"/> + <combo_box.item label="Intimidatie > Individuen of groepen in diskrediet brengen" name="Harassment__Defaming_individuals_or_groups"/> + <combo_box.item label="Intimidatie > Beweging verhinderen" name="Harassment__Impeding_movement"/> + <combo_box.item label="Intimidatie > Seksuele intimidatie" name="Harassment__Sexual_harassment"/> + <combo_box.item label="Intimidatie > Anderen uitnodigen/aanzetten tot het schenden van de ToS" name="Harassment__Solicting_inciting_others_to_violate_ToS"/> + <combo_box.item label="Intimidatie > Verbaal misbruik" name="Harassment__Verbal_abuse"/> + <combo_box.item label="Onfatsoenlijkheid > Globaal beledigende inhoud of gedrag" name="Indecency__Broadly_offensive_content_or_conduct"/> + <combo_box.item label="Onfatsoenlijkheid > Ongepaste avatar naam" name="Indecency__Inappropriate_avatar_name"/> + <combo_box.item label="Onfatsoenlijkheid > Ongepaste inhoud of gedrag in een PG regio" name="Indecency__Mature_content_in_PG_region"/> + <combo_box.item label="Onfatsoenlijkheid > Ongepaste inhoud of gedrag in een Mature regio" name="Indecency__Inappropriate_content_in_Mature_region"/> + <combo_box.item label="Inbreuk op intellectueel eigendom > Verwijderen van inhoud" name="Intellectual_property_infringement_Content_Removal"/> + <combo_box.item label="Inbreuk op intellectueel eigendom > CopyBot of misbruik van permissies" name="Intellectual_property_infringement_CopyBot_or_Permissions_Exploit"/> + <combo_box.item label="Intolerantie" name="Intolerance"/> + <combo_box.item label="Land > Misbruik van zandbakmiddelen" name="Land__Abuse_of_sandbox_resources"/> + <combo_box.item label="Land > Indringing > Objecten/texturen" name="Land__Encroachment__Objects_textures"/> + <combo_box.item label="Land > Indringing > Particles" name="Land__Encroachment__Particles"/> + <combo_box.item label="Land > Indringing > Bomen/planten" name="Land__Encroachment__Trees_plants"/> + <combo_box.item label="Weddenschappen/gokken" name="Wagering_gambling"/> + <combo_box.item label="Anders" name="Other"/> </combo_box> <text name="abuser_name_title"> Misbruikernaam: </text> <button label="Kies inwoner" label_selected="" name="select_abuser" tool_tip="Selecteer de naam van de misbruiker uit een lijst"/> - <check_box label="Naam van misbruiker onbekend" name="omit_abuser_name" tool_tip="Vink dit aan wanneer u niet in staat bent de naam van de misbruiker te geven"/> <text name="abuser_name_title2"> Locatie van misbruik: </text> @@ -91,13 +93,11 @@ Details: </text> <text name="bug_aviso"> - Wees alstublieft zo specifiek mogelijk m.b.t. datum, locatie, -aard van het misbruik, relevante chat/IM tekst, en selecteer -het object indien mogelijk. + Wees zo specifiek mogelijk </text> <text name="incomplete_title"> - Let op: onvolledige rapporten zullen niet worden onderzocht. + Let Op: Onvolledige verslagen zullen niet worden onderzocht </text> - <button label="Annuleren" label_selected="Annuleren" name="cancel_btn"/> <button label="Misbruik rapporteren" label_selected="Misbruik rapporteren" name="send_btn"/> + <button label="Annuleren" label_selected="Annuleren" name="cancel_btn"/> </floater> diff --git a/indra/newview/skins/default/xui/nl/floater_stats.xml b/indra/newview/skins/default/xui/nl/floater_stats.xml new file mode 100644 index 0000000000..0db3f76735 --- /dev/null +++ b/indra/newview/skins/default/xui/nl/floater_stats.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater name="Statistics" title="STATISTIEKEN"> + <scroll_container name="statistics_scroll"> + <container_view name="statistics_view"> + <stat_view label="Basis" name="basic"> + <stat_bar label="FPS" name="fps"/> + <stat_bar label="Bandbreedte" name="bandwidth"/> + <stat_bar label="Pakket Verlies" name="packet_loss"/> + <stat_bar label="Ping Sim" name="ping"/> + </stat_view> + <stat_view label="Geavanceerd" name="advanced"> + <stat_view label="Weergeven" name="render"> + <stat_bar label="KTris Tekenen" name="ktrisframe"/> + <stat_bar label="KTris Tekenen" name="ktrissec"/> + <stat_bar label="Totaal Voorwerpen" name="objs"/> + <stat_bar label="Nieuwe Voorwerpen" name="newobjs"/> + </stat_view> + <stat_view label="Textuur" name="texture"> + <stat_bar label="Count" name="numimagesstat"/> + <stat_bar label="Raw Count" name="numrawimagesstat"/> + <stat_bar label="GL Mem" name="gltexmemstat"/> + <stat_bar label="Formatted Mem" name="formattedmemstat"/> + <stat_bar label="Raw Mem" name="rawmemstat"/> + <stat_bar label="Bound Mem" name="glboundmemstat"/> + </stat_view> + <stat_view label="Netwerk" name="network"> + <stat_bar label="Pakketten In" name="packetsinstat"/> + <stat_bar label="Pakketten Uit" name="packetsoutstat"/> + <stat_bar label="Voorwerpen" name="objectkbitstat"/> + <stat_bar label="Textuur" name="texturekbitstat"/> + <stat_bar label="Bezit" name="assetkbitstat"/> + <stat_bar label="Lagen" name="layerskbitstat"/> + <stat_bar label="Daadwerkelijk In" name="actualinkbitstat"/> + <stat_bar label="Daadwerkelijk Out" name="actualoutkbitstat"/> + <stat_bar label="VFS Pending Ops" name="vfspendingoperations"/> + </stat_view> + </stat_view> + <stat_view label="Simulator" name="sim"> + <stat_bar label="Tijd Dilatatie" name="simtimedilation"/> + <stat_bar label="Sim FPS" name="simfps"/> + <stat_bar label="Physics FPS" name="simphysicsfps"/> + <stat_view label="Physics Details" name="physicsdetail"> + <stat_bar label="Pinned Objects" name="physicspinnedtasks"/> + <stat_bar label="Low LOD Objects" name="physicslodtasks"/> + <stat_bar label="Memory Allocated" name="physicsmemoryallocated"/> + <stat_bar label="Agent Updates/Sec" name="simagentups"/> + <stat_bar label="Main Agents" name="simmainagents"/> + <stat_bar label="Child Agents" name="simchildagents"/> + <stat_bar label="Voorwerpen" name="simobjects"/> + <stat_bar label="Actieve Voorwerpen" name="simactiveobjects"/> + <stat_bar label="Actieve Scripts" name="simactivescripts"/> + <stat_bar label="Actieve Evenementen" name="simscripteps"/> + <stat_bar label="Pakketten In" name="siminpps"/> + <stat_bar label="Pakketten Uit" name="simoutpps"/> + <stat_bar label="Wachtende Downloads" name="simpendingdownloads"/> + <stat_bar label="Wachtende Uploads" name="simpendinguploads"/> + <stat_bar label="Total Unacked Bytes" name="simtotalunackedbytes"/> + </stat_view> + <stat_view label="Tijd (ms)" name="simperf"> + <stat_bar label="Totale Frame Tijd" name="simframemsec"/> + <stat_bar label="Net Time" name="simnetmsec"/> + <stat_bar label="Physics Time" name="simsimphysicsmsec"/> + <stat_bar label="Simulatie Tijd" name="simsimothermsec"/> + <stat_bar label="Agent Tijd" name="simagentmsec"/> + <stat_bar label="Plaatjes Tijd" name="simimagesmsec"/> + <stat_bar label="Script Tijd" name="simscriptmsec"/> + </stat_view> + </stat_view> + </container_view> + </scroll_container> +</floater> diff --git a/indra/newview/skins/default/xui/nl/language_settings.xml b/indra/newview/skins/default/xui/nl/language_settings.xml index 71418d446a..dc4663705f 100644 --- a/indra/newview/skins/default/xui/nl/language_settings.xml +++ b/indra/newview/skins/default/xui/nl/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">dutch</string> + <string name="DarwinLocale">nl_NL.UTF-8</string> + <string name="LinuxLocale">nl_NL.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/nl/menu_inventory.xml b/indra/newview/skins/default/xui/nl/menu_inventory.xml index 6a514422b9..c3b47cbddb 100644 --- a/indra/newview/skins/default/xui/nl/menu_inventory.xml +++ b/indra/newview/skins/default/xui/nl/menu_inventory.xml @@ -12,7 +12,7 @@ <menu_item_call label="Nieuw script" name="New Script"/> <menu_item_call label="Nieuwe notitie" name="New Note"/> <menu_item_call label="Nieuw gebaar" name="New Gesture"/> - <menu name="New Clothes" label="Nieuwe Kleding"> + <menu label="Nieuwe Kleding" name="New Clothes"> <menu_item_call label="Nieuw shirt" name="New Shirt"/> <menu_item_call label="Nieuwe broek" name="New Pants"/> <menu_item_call label="Nieuwe schoenen" name="New Shoes"/> @@ -22,31 +22,47 @@ <menu_item_call label="Nieuwe handschoenen" name="New Gloves"/> <menu_item_call label="Nieuw onderhemd" name="New Undershirt"/> <menu_item_call label="Nieuwe onderbroek" name="New Underpants"/> + <menu_item_call label="Nieuw Alpha Masker" name="New Alpha Mask"/> + <menu_item_call label="Nieuwe Tattoo" name="New Tattoo"/> </menu> - <menu name="New Body Parts" label="Nieuwe Lichaamsdelen"> + <menu label="Nieuwe Lichaamsdelen" name="New Body Parts"> <menu_item_call label="Nieuwe postuur" name="New Shape"/> <menu_item_call label="Nieuwe huid" name="New Skin"/> <menu_item_call label="Nieuw haar" name="New Hair"/> <menu_item_call label="Nieuwe ogen" name="New Eyes"/> </menu> + <menu label="Change Type" name="Change Type"> + <menu_item_call label="Standaard" name="Default"/> + <menu_item_call label="Handschoenen" name="Gloves"/> + <menu_item_call label="Jas" name="Jacket"/> + <menu_item_call label="Broek" name="Pants"/> + <menu_item_call label="Vorm" name="Shape"/> + <menu_item_call label="Schoenen" name="Shoes"/> + <menu_item_call label="Overhemd" name="Shirt"/> + <menu_item_call label="Rok" name="Skirt"/> + <menu_item_call label="Onderbroek" name="Underpants"/> + <menu_item_call label="Onderhemd" name="Undershirt"/> + </menu> <menu_item_call label="Teleport" name="Landmark Open"/> <menu_item_call label="Open" name="Animation Open"/> <menu_item_call label="Open" name="Sound Open"/> <menu_item_call label="Verwijderen item" name="Purge Item"/> <menu_item_call label="Herstellen item" name="Restore Item"/> + <menu_item_call label="Ga Naar Link" name="Goto Link"/> <menu_item_call label="Open" name="Open"/> <menu_item_call label="Eigenschappen" name="Properties"/> <menu_item_call label="Hernoemen" name="Rename"/> <menu_item_call label="Kopieer asset UUID" name="Copy Asset UUID"/> <menu_item_call label="Kopiëren" name="Copy"/> <menu_item_call label="Plakken" name="Paste"/> + <menu_item_call label="Plak Als Link" name="Paste As Link"/> <menu_item_call label="Verwijderen" name="Delete"/> <menu_item_call label="Items uitdoen" name="Take Off Items"/> <menu_item_call label="Voeg toe aan kleding" name="Add To Outfit"/> <menu_item_call label="Vervang kleding" name="Replace Outfit"/> <menu_item_call label="Start conferentie chat" name="Conference Chat Folder"/> <menu_item_call label="Afspelen" name="Sound Play"/> - <menu_item_call label="Over landmarkering" name="Teleport To Landmark"/> + <menu_item_call label="Over Landmark" name="About Landmark"/> <menu_item_call label="In wereld afspelen" name="Animation Play"/> <menu_item_call label="Lokaal afspelen" name="Animation Audition"/> <menu_item_call label="Stuur instant message" name="Send Instant Message"/> @@ -54,8 +70,8 @@ <menu_item_call label="Start conferentie chat" name="Conference Chat"/> <menu_item_call label="Activeren" name="Activate"/> <menu_item_call label="Deactiveren" name="Deactivate"/> + <menu_item_call label="Opslaan Als" name="Save As"/> <menu_item_call label="Losmaken van jezelf" name="Detach From Yourself"/> - <menu_item_call label="Herstellen naar laatste positie" name="Restore to Last Position"/> <menu_item_call label="Dragen" name="Object Wear"/> <menu label="Bevestigen aan" name="Attach To"/> <menu label="Bevestigen aan HUD" name="Attach To HUD"/> diff --git a/indra/newview/skins/default/xui/nl/menu_inventory_add.xml b/indra/newview/skins/default/xui/nl/menu_inventory_add.xml new file mode 100644 index 0000000000..09330b9597 --- /dev/null +++ b/indra/newview/skins/default/xui/nl/menu_inventory_add.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<menu name="menu_inventory_add"> + <menu label="Upload" name="upload"> + <menu_item_call label="Plaatje (L$[COST])..." name="Upload Image"/> + <menu_item_call label="Geluid (L$[COST])..." name="Upload Sound"/> + <menu_item_call label="Animatie (L$[COST])..." name="Upload Animation"/> + <menu_item_call label="Bulk (L$[COST] per bestand)..." name="Bulk Upload"/> + </menu> + <menu_item_call label="Nieuwe Map" name="New Folder"/> + <menu_item_call label="Nieuw Script" name="New Script"/> + <menu_item_call label="Nieuw Notitie" name="New Note"/> + <menu_item_call label="Nieuw Gebaar" name="New Gesture"/> + <menu label="Nieuwe Kleding" name="New Clothes"> + <menu_item_call label="Nieuw Overhemd" name="New Shirt"/> + <menu_item_call label="Nieuwe Broek" name="New Pants"/> + <menu_item_call label="Nieuwe Schoenen" name="New Shoes"/> + <menu_item_call label="Nieuwe Sokken" name="New Socks"/> + <menu_item_call label="Nieuw Jas" name="New Jacket"/> + <menu_item_call label="Nieuw Rok" name="New Skirt"/> + <menu_item_call label="Nieuwe Handschoenen" name="New Gloves"/> + <menu_item_call label="Nieuw Hemd" name="New Undershirt"/> + <menu_item_call label="Nieuwe Onderbroek" name="New Underpants"/> + <menu_item_call label="Nieuwe Alpha" name="New Alpha"/> + <menu_item_call label="Nieuwe Tattoo" name="New Tattoo"/> + </menu> + <menu label="Nieuwe Lichaamsdelen" name="New Body Parts"> + <menu_item_call label="Nieuwe Vorm" name="New Shape"/> + <menu_item_call label="Nieuwe Huid" name="New Skin"/> + <menu_item_call label="Nieuw Haar" name="New Hair"/> + <menu_item_call label="Nieuwe Ogen" name="New Eyes"/> + </menu> +</menu> diff --git a/indra/newview/skins/default/xui/nl/menu_picks.xml b/indra/newview/skins/default/xui/nl/menu_picks.xml new file mode 100644 index 0000000000..2e53dbda58 --- /dev/null +++ b/indra/newview/skins/default/xui/nl/menu_picks.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<context_menu name="Picks"> + <menu_item_call label="Info" name="pick_info"/> + <menu_item_call label="Bewerken" name="pick_edit"/> + <menu_item_call label="Teleport" name="pick_teleport"/> + <menu_item_call label="Kaart" name="pick_map"/> + <menu_item_call label="Verweideren" name="pick_delete"/> +</context_menu> diff --git a/indra/newview/skins/default/xui/nl/panel_group_roles.xml b/indra/newview/skins/default/xui/nl/panel_group_roles.xml index ffaaa8137a..507906c0d7 100644 --- a/indra/newview/skins/default/xui/nl/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/nl/panel_group_roles.xml @@ -1,92 +1,50 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Leden & Rollen" name="roles_tab"> - <string name="default_needs_apply_text"> - Er zijn niet toegepaste wijzigingen op de huidige sub-tab. - </string> - <string name="want_apply_text"> - Wilt u deze wijzigingen toepassen? - </string> - <button label="?" name="help_button"/> - <panel name="members_header"> - <text name="static"> - Leden & Rollen - </text> - <text name="static2"> - Groepsleden krijgen Rollen met Mogelijkheden toegekend. Deze instellingen -kunnen eenvoudig aangepast worden, zodat meer organisatie en flexibiliteit -mogelijk is. - </text> - </panel> - <panel name="roles_header"> - <text name="static"> - Rollen - </text> - <text name="role_properties_modifiable"> - Selecteer een Rol hieronder. U kunt zijn Naam, Omschrijving en -Lid Titel wijzigen. - </text> - <text name="role_properties_not_modifiable"> - Selecteer een Rol hieronder om zijn eigenschappen, Leden en -toegestane Mogelijkheden te bekijken. - </text> - <text bottom_delta="-28" name="role_actions_modifiable"> - U kunt ook Mogelijkheden aan de Rol toekennen. - </text> - <text name="role_actions_not_modifiable"> - U kunt de toegekende Mogelijkheden bekijken, maar niet wijzigen. - </text> - </panel> - <panel name="actions_header"> - <text name="static"> - Mogelijkheden - </text> - <text name="static2"> - U kunt de Omschrijving van een Mogelijkheid bekijken en welke Rollen en -Leden de Mogelijkheid kunnen uitvoeren. - </text> - </panel> + <panel.string name="default_needs_apply_text"> + Er zijn niet opgeslagen veranderingen op de huidige tab + </panel.string> + <panel.string name="want_apply_text"> + Wilt u deze wijzigingen opslaan? + </panel.string> <tab_container height="164" name="roles_tab_container"> - <panel height="148" label="Leden" name="members_sub_tab" tool_tip="Leden"> - <line_editor bottom="127" name="search_text"/> - <button label="Zoeken" name="search_button"/> - <button label="Alles Tonen" name="show_all_button"/> - <name_list bottom_delta="-105" height="104" name="member_list"> - <column label="Lid Naam" name="name"/> - <column label="Gedoneerde Tier" name="donated"/> - <column label="Laatste Login" name="online"/> - </name_list> - <button label="Nieuw Lid Uitnodigen..." name="member_invite"/> - <button label="Uitwerpen uit de Groep" name="member_eject"/> - <string name="help_text"> + <panel height="148" label="LEDEN" name="members_sub_tab" tool_tip="Leden"> + <panel.string name="help_text"> U kunt Rollen aan Leden toewijzen of van Leden afnemen. Selecteer meerdere Leden door de Ctrl toets ingedrukt te houden en op hun namen te klikken. - </string> + </panel.string> + <filter_editor label="Filter Leden" name="filter_input"/> + <name_list bottom_delta="-105" height="104" name="member_list"> + <name_list.columns label="Lid Naam" name="name"/> + <name_list.columns label="Donaties" name="donated"/> + <name_list.columns label="Laatste Login" name="online"/> + </name_list> + <button label="Uitnodigen" name="member_invite"/> + <button label="Uitwerpen" name="member_eject"/> </panel> - <panel height="148" label="Rollen" name="roles_sub_tab"> - <line_editor bottom="127" name="search_text"/> - <button label="Zoeken" name="search_button"/> - <button label="Alles Tonen" name="show_all_button"/> + <panel height="148" label="ROLLEN" name="roles_sub_tab"> + <panel.string name="help_text"> + Rollen hebben een titel en een toegestane lijst met Vaardigheden die Leden kunnen uitvoeren. Leden kunnen tot 1 of meer Rollen behoren. Een groep kan tot 10 Rollen bevatten, inclusief de Iedereen en Eigenaren Rollen. + </panel.string> + <panel.string name="cant_delete_role"> + De 'Iedereen' en 'Eigenaren' Rollen zijn speciaal en kunnen niet verwijderd worden. + </panel.string> + <panel.string name="power_folder_icon"> + Inv_FolderClosed + </panel.string> + <filter_editor label="Filter Rollen" name="filter_input"/> <scroll_list bottom_delta="-104" height="104" name="role_list"> - <column label="Rol Naam" name="name"/> - <column label="Titel" name="title"/> - <column label="Leden" name="members"/> + <scroll_list.columns label="Rol" name="name"/> + <scroll_list.columns label="Titel" name="title"/> + <scroll_list.columns label="Leden" name="members"/> </scroll_list> - <button label="Nieuwe Rol Maken..." name="role_create"/> + <button label="Nieuwe Rol..." name="role_create"/> <button label="Rol Verwijderen" name="role_delete"/> - <string name="help_text"> - Rollen hebben een titel en een toegestane lijst met Mogelijkheden die Leden kunnen uitvoeren. Leden kunnen tot 1 of meer Rollen behoren. Een groep kan tot 10 Rollen bevatten, inclusief de Iedereen en Eigenaren Rollen. - </string> - <string name="cant_delete_role"> - De 'Iedereen' en 'Eigenaren' Rollen zijn speciaal en kunnen niet verwijderd worden. - </string> </panel> - <panel height="148" label="Mogelijkheden" name="actions_sub_tab"> - <line_editor bottom="127" name="search_text"/> - <button label="Zoeken" name="search_button"/> - <button label="Alles Tonen" name="show_all_button"/> - <scroll_list bottom_delta="-120" height="118" name="action_list" tool_tip="Selecteer een Mogelijkheid om meer details te bekijken."/> - <string name="help_text"> + <panel height="148" label="VAARDIGHEDEN" name="actions_sub_tab" tool_tip="Je kan een vaardigheid's beschrijving en welke Rollen en Leden kunnen uitvoeren van de Vaardigheid."> + <panel.string name="help_text"> Mogelijkheden stellen leden in staat om specifieke dingen in een groep te doen. Er is een brede variëteit aan Mogelijkheden. - </string> + </panel.string> + <filter_editor label="Filter Vaardigheden" name="filter_input"/> + <scroll_list bottom_delta="-120" height="118" name="action_list" tool_tip="Selecteer een Vaardigheid om meer details te bekijken"/> </panel> </tab_container> <panel name="members_footer"> @@ -96,15 +54,12 @@ Leden de Mogelijkheid kunnen uitvoeren. <text name="static2"> Toegestane Mogelijkheden </text> - <scroll_list name="member_allowed_actions" tool_tip="Kijk voor details van elke Toegestane Mogelijkheid in de Mogelijkheden tab."/> + <scroll_list name="member_allowed_actions" tool_tip="Voor details van elke Toegestane Vaardigheid in de Mogelijkheden tab"/> </panel> <panel name="roles_footer"> <text name="static"> Naam </text> - <text name="static2"> - Omschrijving - </text> <line_editor name="role_name"> Werknemers </line_editor> @@ -114,30 +69,33 @@ Leden de Mogelijkheid kunnen uitvoeren. <line_editor name="role_title"> (wachten) </line_editor> + <text name="static2"> + Omschrijving + </text> <text_editor name="role_description"> (wachten) </text_editor> <text name="static4"> - Toegewezen Leden + Toegewezen Rollen </text> + <check_box label="Leden Onthullen" name="role_visible_in_list" tool_tip="Bepaalt of leden van deze rol zichtbaar zijn in de Algemeen tab voor mensen buiten de groep."/> <text name="static5" tool_tip="Een lijst met Mogelijkheden die de geselecteerd rol kan uitvoeren."> Toegestane Mogelijkheden </text> - <check_box label="Leden zijn zichtbaar" name="role_visible_in_list" tool_tip="Bepaalt of leden van deze rol zichtbaar zijn in de Algemeen tab voor mensen buiten de groep."/> - <scroll_list name="role_allowed_actions" tool_tip="Kijk voor details van elke Toegestane Mogelijkheid in de Mogelijkheden tab."/> + <scroll_list name="role_allowed_actions" tool_tip="For details of each allowed ability see the abilities tab"/> </panel> <panel name="actions_footer"> <text name="static"> - Omschrijving + Vaardigheid omschrijving </text> <text_editor name="action_description"> Dit is de Mogelijkheid 'Werp Leden uit deze Groep'. Alleen een Eigenaar kan een andere Eigenaar uitwerpen. </text_editor> <text name="static2"> - Rollen met Mogelijkheid + Rollen met deze vaardigheid </text> <text name="static3"> - Leden met Mogelijkheid + Leden met deze vaardigheid </text> </panel> </panel> diff --git a/indra/newview/skins/default/xui/nl/panel_login.xml b/indra/newview/skins/default/xui/nl/panel_login.xml index 235e15e7fb..bcc888061f 100644 --- a/indra/newview/skins/default/xui/nl/panel_login.xml +++ b/indra/newview/skins/default/xui/nl/panel_login.xml @@ -6,34 +6,36 @@ <panel.string name="forgot_password_url"> http://secondlife.com/account/request.php?lang=nl-NL </panel.string> -<panel name="login_widgets"> - <text name="first_name_text"> - Voornaam: - </text> - <text name="last_name_text"> - Achternaam: - </text> - <text name="password_text"> - Wachtwoord: - </text> - <text name="start_location_text"> - Startlocatie: - </text> - <combo_box name="start_location_combo"> - <combo_box.item name="MyHome" label="Mijn Thuis"/> - <combo_box.item name="MyLastLocation" label="Mijn Laatste Locatie"/> - <combo_box.item name="Typeregionname" label="< Type regio naam >"/> - </combo_box> - <check_box label="Onthoud wachtwoord" name="remember_check"/> - <button label="Inloggen" label_selected="Inloggen" name="connect_btn"/> - <text name="create_new_account_text"> - Nieuw account maken - </text> - <text name="forgot_password_text"> - Naam of wachtwoord vergeten? - </text> - <text name="channel_text"> - [VERSION] - </text> -</panel> + <panel name="login_widgets"> + <text name="first_name_text"> + Voornaam: + </text> + <line_editor name="first_name_edit" tool_tip="[SECOND_LIFE] Voornaam"/> + <text name="last_name_text"> + Achternaam: + </text> + <line_editor name="last_name_edit" tool_tip="[SECOND_LIFE] Achternaam"/> + <text name="password_text"> + Paswoord: + </text> + <button label="Inloggen" label_selected="Inloggen" name="connect_btn"/> + <text name="start_location_text"> + Start locatie: + </text> + <combo_box name="start_location_combo"> + <combo_box.item label="Mijn Laatste Locatie" name="MyLastLocation"/> + <combo_box.item label="Mijn Thuis" name="MyHome"/> + <combo_box.item label="<Tik regio naam>" name="Typeregionname"/> + </combo_box> + <check_box label="Onthoud paswoord" name="remember_check"/> + <text name="create_new_account_text"> + Maak een nieuwe account + </text> + <text name="forgot_password_text"> + Naam of paswoord vergeten? + </text> + <text name="channel_text"> + [VERSION] + </text> + </panel> </panel> diff --git a/indra/newview/skins/default/xui/nl/panel_main_inventory.xml b/indra/newview/skins/default/xui/nl/panel_main_inventory.xml new file mode 100644 index 0000000000..c533cc20c0 --- /dev/null +++ b/indra/newview/skins/default/xui/nl/panel_main_inventory.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<panel label="Dingen" name="main inventory panel"> + <panel.string name="Title"> + Dingen + </panel.string> + <filter_editor label="Filter" name="inventory search editor"/> + <tab_container name="inventory filter tabs"> + <inventory_panel label="Alle Voorwerpen" name="All Items"/> + <inventory_panel label="Recente Voorwerpen" name="Recent Items"/> + </tab_container> + <panel name="bottom_panel"> + <button name="options_gear_btn" tool_tip="Toon extra opties"/> + <button name="add_btn" tool_tip="Voeg nieuw voorwerp toe"/> + <dnd_button name="trash_btn" tool_tip="Remove selected item"/> + </panel> + <menu_bar name="Inventory Menu"> + <menu label="Bestand" name="File"> + <menu_item_call label="Open" name="Open"/> + <menu label="Upload" name="upload"> + <menu_item_call label="Plaatje (L$[COST])..." name="Upload Image"/> + <menu_item_call label="Geluid (L$[COST])..." name="Upload Sound"/> + <menu_item_call label="Animatie (L$[COST])..." name="Upload Animation"/> + <menu_item_call label="Bulk (L$[COST] per bestand)..." name="Bulk Upload"/> + </menu> + <menu_item_call label="Nieuw Venster" name="New Window"/> + <menu_item_call label="Toon Filters" name="Show Filters"/> + <menu_item_call label="Reset Filters" name="Reset Current"/> + <menu_item_call label="Sluit Alle Mappen" name="Close All Folders"/> + <menu_item_call label="Prullenbak Leegmaken" name="Empty Trash"/> + <menu_item_call label="Leeg Verloren En Gevonden" name="Empty Lost And Found"/> + </menu> + <menu label="Maken" name="Create"> + <menu_item_call label="Nieuwe Map" name="New Folder"/> + <menu_item_call label="Nieuw Script" name="New Script"/> + <menu_item_call label="Nieuwe Notitie" name="New Note"/> + <menu_item_call label="Nieuw Gebaar" name="New Gesture"/> + <menu label="Nieuwe Kleding" name="New Clothes"> + <menu_item_call label="Nieuw Overhemd" name="New Shirt"/> + <menu_item_call label="Nieuwe Broek" name="New Pants"/> + <menu_item_call label="Nieuwe Schoenen" name="New Shoes"/> + <menu_item_call label="Nieuwe Sokken" name="New Socks"/> + <menu_item_call label="Nieuwe Jas" name="New Jacket"/> + <menu_item_call label="Nieuwe Rok" name="New Skirt"/> + <menu_item_call label="Nieuwe Handschoenen" name="New Gloves"/> + <menu_item_call label="Nieuw Hemd" name="New Undershirt"/> + <menu_item_call label="Nieuwe Onderbroek" name="New Underpants"/> + <menu_item_call label="Nieuwe Alpha" name="New Alpha"/> + <menu_item_call label="Nieuwe Tattoo" name="New Tattoo"/> + </menu> + <menu label="Nieuwe Lichaamsdelen" name="New Body Parts"> + <menu_item_call label="Nieuwe Vorm" name="New Shape"/> + <menu_item_call label="Nieuwe Huid" name="New Skin"/> + <menu_item_call label="Nieuw Haar" name="New Hair"/> + <menu_item_call label="Nieuwe Ogen" name="New Eyes"/> + </menu> + </menu> + <menu label="Sorteer" name="Sort"> + <menu_item_check label="Bij Naam" name="By Name"/> + <menu_item_check label="Bij Datum" name="By Date"/> + <menu_item_check label="Mappen Altijd Op Naam" name="Folders Always By Name"/> + <menu_item_check label="Syteemmappen Naar Boven" name="System Folders To Top"/> + </menu> + </menu_bar> +</panel> diff --git a/indra/newview/skins/default/xui/nl/panel_region_estate.xml b/indra/newview/skins/default/xui/nl/panel_region_estate.xml index 7a5fa801d9..08b68c8d30 100644 --- a/indra/newview/skins/default/xui/nl/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/nl/panel_region_estate.xml @@ -26,7 +26,7 @@ zullen alle regio's in de estate beïnvloeden. <text name="Only Allow"> Beperk toegang tot: </text> - <check_box label="Inwoners met betalingsinformatie opgeslagen" name="limit_payment" tool_tip="Verban ongeïdentificeerde inwoners."/> + <check_box label="Inwoners met betalingsinformatie opgeslagen" name="limit_payment" tool_tip="Verban ongeïdentificeerde inwoners."/> <check_box label="Leeftijdgeverifieerde volwassenen" name="limit_age_verified" tool_tip="Verban inwoners die hun leeftijd niet geverifieerd hebben. Zie support.secondlife.com voor meer informatie." bottom_delta="-30"/> <check_box label="Voice chat toestaan" name="voice_chat_check"/> <button label="?" name="voice_chat_help"/> diff --git a/indra/newview/skins/default/xui/nl/panel_world_map.xml b/indra/newview/skins/default/xui/nl/panel_world_map.xml index 11855b7fc1..d9a0b66fbc 100644 --- a/indra/newview/skins/default/xui/nl/panel_world_map.xml +++ b/indra/newview/skins/default/xui/nl/panel_world_map.xml @@ -1,5 +1,11 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="world_map"> + <panel.string name="Loading"> + Laden... + </panel.string> + <panel.string name="InvalidLocation"> + Ongeldige Locatie + </panel.string> <panel.string name="world_map_north"> N </panel.string> diff --git a/indra/newview/skins/default/xui/nl/strings.xml b/indra/newview/skins/default/xui/nl/strings.xml index 0be5ec9e86..ae8d3b89dc 100644 --- a/indra/newview/skins/default/xui/nl/strings.xml +++ b/indra/newview/skins/default/xui/nl/strings.xml @@ -4,10 +4,21 @@ For example, the strings used in avatar chat bubbles, and strings that are returned from one component and may appear in many places--> <strings> - <string name="create_account_url">http://join.secondlife.com/index.php?lang=nl-NL</string> + <string name="SUPPORT_SITE"> + Second Life Ondersteunings Portaal + </string> + <string name="StartupDetectingHardware"> + Detecteert hardware... + </string> + <string name="StartupLoading"> + Laden + </string> <string name="LoginInProgress"> Inloggen. Het kan lijken dat [APP_NAME] is vastgelopen. Wacht u alstublieft... . </string> + <string name="LoginInProgressNoFrozen"> + Inloggen... + </string> <string name="LoginAuthenticating"> Authenticeren </string> @@ -26,11 +37,14 @@ <string name="LoginInitializingMultimedia"> Multimedia initialiseren... </string> + <string name="LoginInitializingFonts"> + Lettertypen laden... + </string> <string name="LoginVerifyingCache"> - Cache bestanden verifiëren (kan 60-90 seconden duren)... + Veriveren cache bestanden (kan 60-90 seconden duren)... </string> <string name="LoginProcessingResponse"> - Antwoord verwerken... + Reactie Verwerken... </string> <string name="LoginInitializingWorld"> Wereld initialiseren... @@ -56,9 +70,15 @@ <string name="LoginDownloadingClothing"> Kleding downloaden... </string> + <string name="LoginFailedNoNetwork"> + Netwerk Fout: Kon geen verbinding maken, kijk uw nerwerk connectie na alstublieft. + </string> <string name="Quit"> Afsluiten </string> + <string name="create_account_url"> + http://join.secondlife.com/index.php?lang=nl-NL + </string> <string name="AgentLostConnection"> Deze regio kan problemen ondervinden. Controleer alstublieft uw verbinding met het internet. </string> @@ -77,39 +97,9 @@ <string name="TooltipIsGroup"> (Groep) </string> - <string name="TooltipFlagScript"> - Script - </string> - <string name="TooltipFlagPhysics"> - Fysiek - </string> - <string name="TooltipFlagTouch"> - Aanraken - </string> - <string name="TooltipFlagL$"> - L$ - </string> - <string name="TooltipFlagDropInventory"> - Deponeer inventaris - </string> - <string name="TooltipFlagPhantom"> - Fantoom - </string> - <string name="TooltipFlagTemporary"> - Tijdelijk - </string> - <string name="TooltipFlagRightClickMenu"> - (Rechtsklikken voor menu) - </string> - <string name="TooltipFreeToCopy"> - Vrij te kopiëren - </string> <string name="TooltipForSaleL$"> Te koop: L$[AMOUNT] </string> - <string name="TooltipForSaleMsg"> - Te koop: [MESSAGE] - </string> <string name="TooltipFlagGroupBuild"> Groep bouwen </string> @@ -137,6 +127,76 @@ <string name="TooltipMustSingleDrop"> Slechts een enkel item kan hier naartoe gesleept worden </string> + <string name="TooltipHttpUrl"> + Klik om deze web pagina te bekijken + </string> + <string name="TooltipSLURL"> + Klik om deze locatie informatie te bekijken + </string> + <string name="TooltipAgentUrl"> + Klik om deze inwoner zijn profiel te bekijken + </string> + <string name="TooltipGroupUrl"> + Klik om deze groeps informatie te bekijken + </string> + <string name="TooltipEventUrl"> + Klik om deze evenement informatie te bekijken + </string> + <string name="TooltipClassifiedUrl"> + Klik om deze advertentie te bekijken + </string> + <string name="TooltipParcelUrl"> + Klik om deze perceel informatie te bekijken + </string> + <string name="TooltipTeleportUrl"> + Klik om naar deze lokatie te teleporteren + </string> + <string name="TooltipObjectIMUrl"> + Klik om deze object informatie te bekijken + </string> + <string name="TooltipMapUrl"> + Klik om deze locatie op een map te bekijken + </string> + <string name="TooltipSLAPP"> + Klik om het secondlife:// commando te starten + </string> + <string name="CurrentURL" value="HuidigeURL: [HuidigeURL]"/> + <string name="SLurlLabelTeleport"> + Teleporteer naar + </string> + <string name="SLurlLabelShowOnMap"> + Toon Map voor + </string> + <string name="BUTTON_CLOSE_DARWIN"> + Sluiten (⌘W) + </string> + <string name="BUTTON_CLOSE_WIN"> + Sluiten (Ctrl+W) + </string> + <string name="BUTTON_RESTORE"> + Restore + </string> + <string name="BUTTON_MINIMIZE"> + Minimaliseren + </string> + <string name="BUTTON_TEAR_OFF"> + Afscheuren + </string> + <string name="BUTTON_DOCK"> + Koppelen + </string> + <string name="BUTTON_UNDOCK"> + Loskoppelen + </string> + <string name="BUTTON_HELP"> + Toon Help + </string> + <string name="Searching"> + Zoeken... + </string> + <string name="NoneFound"> + Geen gevonden. + </string> <string name="RetrievingData"> Ophalen... </string> @@ -191,8 +251,77 @@ <string name="AssetErrorUnknownStatus"> Onbekende status </string> - <string name="AvatarEditingApparance"> - (Uiterlijk bewerken) + <string name="texture"> + textuur + </string> + <string name="sound"> + geluid + </string> + <string name="calling card"> + visitekaart + </string> + <string name="landmark"> + landmarkering + </string> + <string name="legacy script"> + legacy script + </string> + <string name="clothing"> + kleding + </string> + <string name="object"> + object + </string> + <string name="note card"> + notecard + </string> + <string name="folder"> + map + </string> + <string name="root"> + root + </string> + <string name="lsl2 script"> + LSL2 script + </string> + <string name="lsl bytecode"> + LSL bytecode + </string> + <string name="tga texture"> + tga textuur + </string> + <string name="body part"> + lichaamsdeel + </string> + <string name="snapshot"> + foto + </string> + <string name="lost and found"> + Verloren en Gevonden + </string> + <string name="targa image"> + targa plaatje + </string> + <string name="trash"> + Prullenbak + </string> + <string name="jpeg image"> + jpeg plaatje + </string> + <string name="animation"> + animatie + </string> + <string name="gesture"> + gebaar + </string> + <string name="simstate"> + simstate + </string> + <string name="favorite"> + favorieten + </string> + <string name="symbolic link"> + link </string> <string name="AvatarAway"> Afwezig @@ -414,7 +543,19 @@ Laden... </string> <string name="worldmap_offline"> - Offline + Off line + </string> + <string name="worldmap_results_none_found"> + Geen gevonden. + </string> + <string name="Ok"> + OK + </string> + <string name="Premature end of file"> + Vroegtijdig eind van bestand + </string> + <string name="ST_NO_JOINT"> + Kan niet ROOT of JOINT vinden. </string> <string name="whisper"> fluistert: @@ -422,6 +563,57 @@ <string name="shout"> schreeuwt: </string> + <string name="ringing"> + Verbinden met in-wereld voice chat... + </string> + <string name="connected"> + Verbonden + </string> + <string name="unavailable"> + Voice is niet beschikbaar op uw huidige locatie + </string> + <string name="hang_up"> + Verbinding met in-wereld voicechat verbroken + </string> + <string name="ScriptQuestionCautionChatGranted"> + '[OBJECTNAME]', een object van '[OWNERNAME]', gevestigd in [REGIONNAME] op [REGIONPOS], is toestemming verleend om te: [PERMISSIONS]. + </string> + <string name="ScriptQuestionCautionChatDenied"> + '[OBJECTNAME]', een object van '[OWNERNAME]', gevestigd in [REGIONNAME] op [REGIONPOS], is toestemming geweigerd om te: [PERMISSIONS]. + </string> + <string name="ScriptTakeMoney"> + Linden dollars (L$) van u wegnemen + </string> + <string name="ActOnControlInputs"> + Acteren op uw bedieningsinvoer + </string> + <string name="RemapControlInputs"> + Uw bedieningsinvoer herdefiniëren + </string> + <string name="AnimateYourAvatar"> + Animeer uw avatar + </string> + <string name="AttachToYourAvatar"> + Bevestig aan uw avatar + </string> + <string name="ReleaseOwnership"> + Eigendom vrijgeven en openbaar worden + </string> + <string name="LinkAndDelink"> + Koppelen met en ontkoppelen van andere objecten + </string> + <string name="AddAndRemoveJoints"> + Toevoegen en verwijderen koppelingen met andere objecten + </string> + <string name="ChangePermissions"> + Wijzig zijn permissies + </string> + <string name="TrackYourCamera"> + Volg uw camera + </string> + <string name="ControlYourCamera"> + Bedien uw camera + </string> <string name="SIM_ACCESS_PG"> PG </string> @@ -440,8 +632,6 @@ <string name="land_type_unknown"> (onbekend) </string> - <string name="covenant_never_modified">Laatst gewijzigd: (nooit)</string> - <string name="covenant_modified">Laatst gewijzigd: </string> <string name="all_files"> Alle bestanden </string> @@ -487,17 +677,739 @@ <string name="choose_the_directory"> Kies folder </string> + <string name="AvatarSetNotAway"> + Niet Afwezig Instellen + </string> + <string name="AvatarSetAway"> + Afwezig Instellen + </string> + <string name="AvatarSetNotBusy"> + Niet Bezig Instellen + </string> + <string name="AvatarSetBusy"> + Bezig Instellen + </string> + <string name="shape"> + Postuur + </string> + <string name="skin"> + Huid + </string> + <string name="hair"> + Haar + </string> + <string name="eyes"> + Ogen + </string> + <string name="shirt"> + Hemd + </string> + <string name="pants"> + Broek + </string> + <string name="shoes"> + Schoenen + </string> + <string name="socks"> + Sokken + </string> + <string name="jacket"> + Jas + </string> + <string name="gloves"> + Handschoenen + </string> + <string name="undershirt"> + onderhemd + </string> + <string name="underpants"> + Onderbroek + </string> + <string name="skirt"> + Rok + </string> + <string name="alpha"> + Alpha + </string> + <string name="tattoo"> + Tattoo + </string> + <string name="invalid"> + ongeldig + </string> + <string name="next"> + Volgende + </string> + <string name="ok"> + OK + </string> + <string name="GroupNotifyGroupNotice"> + Groep Mededeling + </string> + <string name="GroupNotifyGroupNotices"> + Groep Mededelingen + </string> + <string name="GroupNotifySentBy"> + Verzonden Door: + </string> + <string name="GroupNotifyAttached"> + Bijgevoegt: + </string> + <string name="GroupNotifyViewPastNotices"> + Bekijk alle mededelingen en bijlages van verzonden Mededelingen in het verleden + </string> + <string name="GroupNotifyOpenAttachment"> + Open Bijlage + </string> + <string name="GroupNotifySaveAttachment"> + Sla Bijlage Op + </string> + <string name="TeleportOffer"> + Teleporteer Aanbieding + </string> + <string name="StartUpNotification"> + [%d] Nieuwe mededelingen aangekomen terwijl u weg was ... + </string> + <string name="StartUpNotifications"> + [%d] Nieuwe mededelingen aangekomen terwijl u weg was ... + </string> + <string name="OverflowInfoChannelString"> + U heeft [%d] meer mededelingen + </string> + <string name="BodyPartsRightArm"> + Rechter Arm + </string> + <string name="BodyPartsHead"> + Hoofd + </string> + <string name="BodyPartsLeftArm"> + Linker Arm + </string> + <string name="BodyPartsLeftLeg"> + Linker Been + </string> + <string name="BodyPartsTorso"> + Torso + </string> + <string name="BodyPartsRightLeg"> + Rechter Been + </string> + <string name="GraphicsQualityLow"> + Laag + </string> + <string name="GraphicsQualityMid"> + Middel + </string> + <string name="GraphicsQualityHigh"> + Hoog + </string> + <string name="LeaveMouselook"> + Druk op ESC om terug te keren naar Wereld Zicht + </string> + <string name="InventoryNoMatchingItems"> + Geen overeenkomende objecten gevonden in de voorraad. + </string> + <string name="InventoryNoTexture"> + Je hebt geen kopie van deze texture in je inventaris + </string> + <string name="no_transfer" value="(no transfer)"/> + <string name="no_modify" value="(no modify)"/> + <string name="no_copy" value="(no copy)"/> + <string name="worn" value="(worn)"/> + <string name="link" value="(link)"/> + <string name="broken_link" value="(broken_link)""/> + <string name="LoadingContents"> + Loading contents... + </string> + <string name="NoContents"> + No contents + </string> + <string name="WornOnAttachmentPoint" value="(worn on [ATTACHMENT_POINT])"/> + <string name="Chat" value="Chat :"/> + <string name="Sound" value="Geluid :"/> + <string name="Wait" value="--- Wachten :"/> + <string name="AnimFlagStop" value="Stop Animatie :"/> + <string name="AnimFlagStart" value="Start Animatie :"/> + <string name="Wave" value="Wave"/> + <string name="HelloAvatar" value="Hallo, avatar!"/> + <string name="ViewAllGestures" value="Bekijk alles >"/> + <string name="Animations" value="Animaties,"/> + <string name="Calling Cards" value="Calling Cards,"/> + <string name="Clothing" value="Kleding,"/> + <string name="Gestures" value="Gestures,"/> + <string name="Landmarks" value="Landmarks,"/> + <string name="Notecards" value="Notecards,"/> + <string name="Objects" value="Objecten,"/> + <string name="Scripts" value="Scripts,"/> + <string name="Sounds" value="Geluiden,"/> + <string name="Textures" value="Textures,"/> + <string name="Snapshots" value="Snapshots,"/> + <string name="No Filters" value="Nee"/> + <string name="Since Logoff" value="- Sinds Afmelden"/> + <string name="InvFolder My Inventory"> + Mijn Inventaris + </string> + <string name="InvFolder My Favorites"> + Mijn Favorieten + </string> + <string name="InvFolder Library"> + Bibliotheek + </string> + <string name="InvFolder Textures"> + Textures + </string> + <string name="InvFolder Sounds"> + Geluiden + </string> + <string name="InvFolder Calling Cards"> + Calling Cards + </string> + <string name="InvFolder Landmarks"> + Landmarks + </string> + <string name="InvFolder Scripts"> + Scripts + </string> + <string name="InvFolder Clothing"> + Kleding + </string> + <string name="InvFolder Objects"> + Objecten + </string> + <string name="InvFolder Notecards"> + Notecards + </string> + <string name="InvFolder New Folder"> + Nieuwe Map + </string> + <string name="InvFolder Inventory"> + Inventaris + </string> + <string name="InvFolder Uncompressed Images"> + Ongecomprimeerde Afbeeldingen + </string> + <string name="InvFolder Body Parts"> + Lichaams Delen + </string> + <string name="InvFolder Trash"> + Afval + </string> + <string name="InvFolder Photo Album"> + Foto Album + </string> + <string name="InvFolder Lost And Found"> + Verloren en Gevonden + </string> + <string name="InvFolder Uncompressed Sounds"> + Ongecomprimeerde Geluiden + </string> + <string name="InvFolder Animations"> + Animaties + </string> + <string name="InvFolder Gestures"> + Gebaren + </string> + <string name="InvFolder favorite"> + Favoriten + </string> + <string name="InvFolder Current Outfit"> + Huidige Uitrusting + </string> + <string name="InvFolder My Outfits"> + Mijn Uitrustingen + </string> + <string name="InvFolder Friends"> + Vrienden + </string> + <string name="InvFolder All"> + Alles + </string> + <string name="Buy"> + Koop + </string> + <string name="BuyforL$"> + Koop voor L$ + </string> + <string name="Stone"> + Steen + </string> + <string name="Metal"> + Metaal + </string> + <string name="Glass"> + Glas + </string> + <string name="Wood"> + Hout + </string> + <string name="Flesh"> + Vlees + </string> + <string name="Plastic"> + Plastic + </string> + <string name="Rubber"> + Rubber + </string> + <string name="Light"> + Licht + </string> + <string name="KBShift"> + Shift + </string> + <string name="KBCtrl"> + Ctrl + </string> + <string name="Chest"> + Borstkas + </string> + <string name="Skull"> + Schedel + </string> + <string name="Left Shoulder"> + Linker Schouder + </string> + <string name="Right Shoulder"> + Rechter Schouder + </string> + <string name="Left Hand"> + Linker Hand + </string> + <string name="Right Hand"> + Rechter Hand + </string> + <string name="Left Foot"> + Linker Voet + </string> + <string name="Right Foot"> + Rechter Voet + </string> + <string name="Spine"> + Ruggegraat + </string> + <string name="Pelvis"> + Bekken + </string> + <string name="Mouth"> + Mond + </string> + <string name="Chin"> + Kin + </string> + <string name="Left Ear"> + Linker Oor + </string> + <string name="Right Ear"> + Rechter Oor + </string> + <string name="Left Eyeball"> + Linker Oogbal + </string> + <string name="Right Eyeball"> + Rechter Oogbal + </string> + <string name="Nose"> + Neus + </string> + <string name="R Upper Arm"> + R Boven Arm + </string> + <string name="R Forearm"> + R Onder Arm + </string> + <string name="L Upper Arm"> + L Boven Arm + </string> + <string name="L Forearm"> + L Onder Arm + </string> + <string name="Right Hip"> + Rechter Heup + </string> + <string name="R Upper Leg"> + R Boven Been + </string> + <string name="R Lower Leg"> + R Onder Been + </string> + <string name="Left Hip"> + Linker Heub + </string> + <string name="L Upper Leg"> + L Boven Been + </string> + <string name="L Lower Leg"> + L Onder Been + </string> + <string name="Stomach"> + Maag + </string> + <string name="Left Pec"> + Left Pec + </string> + <string name="Right Pec"> + Right Pec + </string> + <string name="YearsMonthsOld"> + [AGEYEARS] [AGEMONTHS] oud + </string> + <string name="YearsOld"> + [AGEYEARS] oud + </string> + <string name="MonthsOld"> + [AGEMONTHS] oud + </string> + <string name="WeeksOld"> + [AGEWEEKS] oud + </string> + <string name="DaysOld"> + [AGEDAYS] oud + </string> + <string name="TodayOld"> + Vandaag toegetreden + </string> + <string name="AgeYearsA"> + [COUNT] jaar + </string> + <string name="AgeYearsB"> + [COUNT] jaar + </string> + <string name="AgeYearsC"> + [COUNT] jaar + </string> + <string name="AgeMonthsA"> + [COUNT] maand + </string> + <string name="AgeMonthsB"> + [COUNT] maanden + </string> + <string name="AgeMonthsC"> + [COUNT] maanden + </string> + <string name="AgeWeeksA"> + [COUNT] week + </string> + <string name="AgeWeeksB"> + [COUNT] weken + </string> + <string name="AgeWeeksC"> + [COUNT] weken + </string> + <string name="AgeDaysA"> + [COUNT] dag + </string> + <string name="AgeDaysB"> + [COUNT] dagen + </string> + <string name="AgeDaysC"> + [COUNT] dagen + </string> + <string name="GroupMembersA"> + [COUNT] lid + </string> + <string name="GroupMembersB"> + [COUNT] leden + </string> + <string name="GroupMembersC"> + [COUNT] leden + </string> + <string name="AcctTypeResident"> + bewoner + </string> + <string name="AcctTypeTrial"> + Trial + </string> + <string name="AcctTypeCharterMember"> + Charter Member + </string> + <string name="AcctTypeEmployee"> + Linden Lab Werknemer + </string> + <string name="PaymentInfoUsed"> + Betalings info gebruikt + </string> + <string name="PaymentInfoOnFile"> + Betalings info op bestand + </string> + <string name="NoPaymentInfoOnFile"> + Geen betalings info op bestand + </string> + <string name="AgeVerified"> + Leeftijd gecontroleerd + </string> + <string name="NotAgeVerified"> + Niet leeftijd gecontroleerd + </string> + <string name="Center 2"> + Centrum 2 + </string> + <string name="Top Right"> + Rechts Boven + </string> + <string name="Top"> + Boven + </string> + <string name="Top Left"> + Links Boven + </string> + <string name="Center"> + Centrum + </string> + <string name="Bottom Left"> + Links beneden + </string> + <string name="Bottom"> + Beneden + </string> + <string name="Bottom Right"> + Rechts beneden + </string> + <string name="CompileQueueDownloadedCompiling"> + Dedownload, nu samenstellen + </string> + <string name="CompileQueueScriptNotFound"> + Script niet gevonden op server. + </string> + <string name="CompileQueueProblemDownloading"> + Problem downloading + </string> + <string name="CompileQueueInsufficientPermDownload"> + Onvoldoende rechten om een script te downloaden. + </string> + <string name="CompileQueueInsufficientPermFor"> + Onvoldoende rechten voor + </string> + <string name="CompileQueueUnknownFailure"> + Onbekende fout te downloaden + </string> + <string name="CompileQueueTitle"> + Hercompilatie vooruitgang + </string> + <string name="CompileQueueStart"> + Hercompilatie + </string> + <string name="ResetQueueTitle"> + Reset Vooruitgang + </string> + <string name="ResetQueueStart"> + reset + </string> + <string name="RunQueueTitle"> + Set Running Progress + </string> + <string name="RunQueueStart"> + set running + </string> + <string name="NotRunQueueTitle"> + Set Not Running Progress + </string> + <string name="NotRunQueueStart"> + set not running + </string> + <string name="CompileSuccessful"> + Compileren succesvol! + </string> + <string name="CompileSuccessfulSaving"> + Compileren succesvol, opslaan... + </string> + <string name="SaveComplete"> + Opslaan gereed. + </string> + <string name="ObjectOutOfRange"> + Script (object buiten het bereik) + </string> + <string name="GodToolsObjectOwnedBy"> + Object [OBJECT] eigendom van [OWNER] + </string> + <string name="GroupsNone"> + geen + </string> + <string name="Group" value="(group)"/> + <string name="Unknown"> + (Unknown) + </string> + <string name="SummaryForTheWeek" value="Samenvatting voor deze week, vanaf"/> + <string name="NextStipendDay" value="The next stipend day is"/> + <string name="GroupIndividualShare" value="Groep Individueel Aandeel"/> + <string name="Balance"> + Banksaldo + </string> + <string name="Credits"> + Credits + </string> + <string name="Debits"> + Debiteert + </string> + <string name="Total"> + Totaal + </string> + <string name="NoGroupDataFound"> + Geen groep gegevens gevonden voor groep + </string> + <string name="IMParentEstate"> + parent estate + </string> + <string name="IMMainland"> + mainland + </string> + <string name="IMTeen"> + tiener + </string> + <string name="RegionInfoError"> + fout + </string> + <string name="RegionInfoAllEstatesOwnedBy"> + all estates owned by [OWNER] + </string> + <string name="RegionInfoAllEstatesYouOwn"> + all estates that you own + </string> + <string name="RegionInfoAllEstatesYouManage"> + all estates that you manage for [OWNER] + </string> + <string name="RegionInfoAllowedResidents"> + Toegestane bewoners: ([ALLOWEDAGENTS], max [MAXACCESS]) + </string> + <string name="RegionInfoAllowedGroups"> + Toegestane groepen: ([ALLOWEDGROUPS], max [MAXACCESS]) + </string> + <string name="CursorPos"> + Lijn [LINE], Column [COLUMN] + </string> + <string name="PanelDirCountFound"> + [COUNT] gevonden + </string> + <string name="PanelContentsNewScript"> + Nieuw Script + </string> + <string name="MuteByName"> + (by name) + </string> + <string name="MuteAgent"> + (resident) + </string> + <string name="MuteObject"> + (object) + </string> + <string name="MuteGroup"> + (group) + </string> + <string name="RegionNoCovenant"> + There is no Covenant provided for this Estate. + </string> + <string name="RegionNoCovenantOtherOwner"> + There is no Covenant provided for this Estate. The land on this estate is being sold by the Estate owner, not Linden Lab. Please contact the Estate Owner for sales details. + </string> + <string name="covenant_last_modified"> + Laatst bewerkt: + </string> + <string name="none_text" value="(none)"/> + <string name="never_text" value="(never)"/> + <string name="GroupOwned"> + Groep Eigendom + </string> + <string name="Public"> + Openbaar + </string> + <string name="ClassifiedClicksTxt"> + Klikken: [TELEPORT] teleport, [MAP] map, [PROFILE] profiel + </string> + <string name="ClassifiedUpdateAfterPublish"> + (zal bijwerken na publiceren) + </string> + <string name="MultiPreviewTitle"> + Preview + </string> + <string name="MultiPropertiesTitle"> + Eigenschappen + </string> + <string name="InvOfferAnObjectNamed"> + Een object genaamd + </string> + <string name="InvOfferOwnedByGroup"> + Eigendom van groep + </string> + <string name="InvOfferOwnedByUnknownGroup"> + Eigendom van een onbekende groep + </string> + <string name="InvOfferOwnedBy"> + Eigendom van + </string> + <string name="InvOfferOwnedByUnknownUser"> + Eigendom van onbekende gebruiker + </string> + <string name="InvOfferGaveYou"> + gaf je + </string> + <string name="InvOfferYouDecline"> + You decline + </string> + <string name="InvOfferFrom"> + van + </string> + <string name="GroupMoneyTotal"> + Totaal + </string> + <string name="GroupMoneyBought"> + kocht + </string> + <string name="GroupMoneyPaidYou"> + betaald u + </string> + <string name="GroupMoneyPaidInto"> + gestort + </string> + <string name="GroupMoneyBoughtPassTo"> + bought pass to + </string> + <string name="GroupMoneyPaidFeeForEvent"> + betaalde vergoeding voor evenement + </string> + <string name="GroupMoneyPaidPrizeForEvent"> + betaalde prijs voor evenement + </string> + <string name="GroupMoneyBalance"> + Banksaldo + </string> + <string name="GroupMoneyCredits"> + Credits + </string> + <string name="GroupMoneyDebits"> + Debiteert + </string> + <string name="ViewerObjectContents"> + Inhoud + </string> + <string name="AcquiredItems"> + Verworven objecten + </string> + <string name="Cancel"> + Annuleren + </string> + <string name="UploadingCosts"> + Uploading [%s] kosten + </string> + <string name="UnknownFileExtension"> + Onbekende extensie [.%s] +Verwacht .wav, .tga, .bmp, .jpg, .jpeg, or .bvh + </string> + <string name="AddLandmarkNavBarMenu"> + Voeg Landmark toe... + </string> + <string name="EditLandmarkNavBarMenu"> + Bewerk Landmark... + </string> <string name="accel-mac-control"> - ⌃ + ⌃ </string> <string name="accel-mac-command"> - ⌘ + ⌘ </string> <string name="accel-mac-option"> - ⌥ + ⌥ </string> <string name="accel-mac-shift"> - ⇧ + ⇧ </string> <string name="accel-win-control"> Ctrl+ @@ -508,82 +1420,1790 @@ <string name="accel-win-shift"> Shift+ </string> - <string name="GraphicsQualityLow"> - Laag + <string name="FileSaved"> + Bestand Opgeslagen </string> - <string name="GraphicsQualityMid"> - Middel + <string name="Receiving"> + Ontvangen </string> - <string name="GraphicsQualityHigh"> + <string name="AM"> + AM + </string> + <string name="PM"> + PM + </string> + <string name="PST"> + PST + </string> + <string name="PDT"> + PDT + </string> + <string name="Forward"> + Vooruit + </string> + <string name="Left"> + Links + </string> + <string name="Right"> + Rechts + </string> + <string name="Back"> + Achteruit + </string> + <string name="North"> + Noord + </string> + <string name="South"> + Zuid + </string> + <string name="West"> + West + </string> + <string name="East"> + Oost + </string> + <string name="Up"> + Omhoog + </string> + <string name="Down"> + Omlaag + </string> + <string name="Any Category"> + Elke Categorie + </string> + <string name="Shopping"> + Boodschappen + </string> + <string name="Land Rental"> + Land Verhuur + </string> + <string name="Property Rental"> + Verhuur van onroerend goed + </string> + <string name="Special Attraction"> + Speciale Attractie + </string> + <string name="New Products"> + Nieuwe Producten + </string> + <string name="Employment"> + Employment + </string> + <string name="Wanted"> + Gezocht + </string> + <string name="Service"> + Service + </string> + <string name="Personal"> + Personal + </string> + <string name="None"> + Geen + </string> + <string name="Linden Location"> + Linden locatie + </string> + <string name="Adult"> + Adult + </string> + <string name="Arts&Culture"> + Kunst & Cultuur + </string> + <string name="Business"> + Zakelijk + </string> + <string name="Educational"> + Educatief + </string> + <string name="Gaming"> + Spelen + </string> + <string name="Hangout"> + Ontmoetingsplaats + </string> + <string name="Newcomer Friendly"> + Nieuwkomervriendelijk + </string> + <string name="Parks&Nature"> + Parken & natuur + </string> + <string name="Residential"> + Woongebied + </string> + <string name="Stage"> + Stage + </string> + <string name="Other"> + Anders + </string> + <string name="Any"> + Any + </string> + <string name="You"> + Jij + </string> + <string name="Multiple Media"> + Meerdere Media + </string> + <string name="Play Media"> + Play/Pause Media + </string> + <string name="MBCmdLineError"> + An error was found parsing the command line. +Please see: http://wiki.secondlife.com/wiki/Client_parameters +Error: + </string> + <string name="MBCmdLineUsg"> + [APP_NAME] Command line usage: + </string> + <string name="MBUnableToAccessFile"> + [APP_NAME] is unable to access a file that it needs. + +This can be because you somehow have multiple copies running, or your system incorrectly thinks a file is open. +If this message persists, restart your computer and try again. +If it continues to persist, you may need to completely uninstall [APP_NAME] and reinstall it. + </string> + <string name="MBFatalError"> + Fatal Error + </string> + <string name="MBRequiresAltiVec"> + [APP_NAME] requires a processor with AltiVec (G4 or later). + </string> + <string name="MBAlreadyRunning"> + [APP_NAME] is already running. +Check your task bar for a minimized copy of the program. +If this message persists, restart your computer. + </string> + <string name="MBFrozenCrashed"> + [APP_NAME] appears to have frozen or crashed on the previous run. +Would you like to send a crash report? + </string> + <string name="MBAlert"> + Alert + </string> + <string name="MBNoDirectX"> + [APP_NAME] is unable to detect DirectX 9.0b or greater. +[APP_NAME] uses DirectX to detect hardware and/or outdated drivers that can cause stability problems, poor performance and crashes. While you can run [APP_NAME] without it, we highly recommend running with DirectX 9.0b. + +Do you wish to continue? + </string> + <string name="MBWarning"> + Warning + </string> + <string name="MBNoAutoUpdate"> + Automatic updating is not yet implemented for Linux. +Please download the latest version from www.secondlife.com. + </string> + <string name="MBRegClassFailed"> + RegisterClass failed + </string> + <string name="MBError"> + Error + </string> + <string name="MBFullScreenErr"> + Unable to run fullscreen at [WIDTH] x [HEIGHT]. +Running in window. + </string> + <string name="MBDestroyWinFailed"> + Shutdown Error while destroying window (DestroyWindow() failed) + </string> + <string name="MBShutdownErr"> + Shutdown Error + </string> + <string name="MBDevContextErr"> + Can't make GL device context + </string> + <string name="MBPixelFmtErr"> + Can't find suitable pixel format + </string> + <string name="MBPixelFmtDescErr"> + Can't get pixel format description + </string> + <string name="MBTrueColorWindow"> + [APP_NAME] requires True Color (32-bit) to run. +Please go to your computer's display settings and set the color mode to 32-bit. + </string> + <string name="MBAlpha"> + [APP_NAME] is unable to run because it can't get an 8 bit alpha channel. Usually this is due to video card driver issues. +Please make sure you have the latest video card drivers installed. +Also be sure your monitor is set to True Color (32-bit) in Control Panels > Display > Settings. +If you continue to receive this message, contact the [SUPPORT_SITE]. + </string> + <string name="MBPixelFmtSetErr"> + Can't set pixel format + </string> + <string name="MBGLContextErr"> + Can't create GL rendering context + </string> + <string name="MBGLContextActErr"> + Can't activate GL rendering context + </string> + <string name="MBVideoDrvErr"> + [APP_NAME] is unable to run because your video card drivers did not install properly, are out of date, or are for unsupported hardware. Please make sure you have the latest video card drivers and even if you do have the latest, try reinstalling them. + +If you continue to receive this message, contact the [SUPPORT_SITE]. + </string> + <string name="5 O'Clock Shadow"> + Stoppels + </string> + <string name="All White"> + Alles Wit + </string> + <string name="Anime Eyes"> + Ogen Animeren + </string> + <string name="Arced"> + Gebogen + </string> + <string name="Arm Length"> + Arm Lengte + </string> + <string name="Attached"> + Bijgevoegt + </string> + <string name="Attached Earlobes"> + Bijgevoegde Oorlellen + </string> + <string name="Back Bangs"> + Achterkant Pony + </string> + <string name="Back Bangs Down"> + Achterkant Pony Neer + </string> + <string name="Back Bangs Up"> + Achterkant Pony Omhoog + </string> + <string name="Back Fringe"> + Achterkant Franje + </string> + <string name="Back Hair"> + Achterkant Haar + </string> + <string name="Back Hair Down"> + Achterkant Haar Neer + </string> + <string name="Back Hair Up"> + Achterkant Haar Omhoog + </string> + <string name="Baggy"> + Oogwallen + </string> + <string name="Bangs"> + Pony + </string> + <string name="Bangs Down"> + Pony Neer + </string> + <string name="Bangs Up"> + Pony Omhoog + </string> + <string name="Beady Eyes"> + Kraaloogjes + </string> + <string name="Belly Size"> + Buik Grootte + </string> + <string name="Big"> + Groot + </string> + <string name="Big Butt"> + Grote Kont + </string> + <string name="Big Eyeball"> + Grote Oogbol + </string> + <string name="Big Hair Back"> + Haar Volume Achter + </string> + <string name="Big Hair Front"> + Haar Volume Voor + </string> + <string name="Big Hair Top"> + Haar Volume Boven + </string> + <string name="Big Head"> + Groot Hoofd + </string> + <string name="Big Pectorals"> + Groote Borstspieren + </string> + <string name="Big Spikes"> + Grote Stekels + </string> + <string name="Black"> + Zwart + </string> + <string name="Blonde"> + Blond + </string> + <string name="Blonde Hair"> + Blond Haar + </string> + <string name="Blush"> + Blozen + </string> + <string name="Blush Color"> + Bloos Kleur + </string> + <string name="Blush Opacity"> + Bloos Opaciteit + </string> + <string name="Body Definition"> + Lichaam Definitie + </string> + <string name="Body Fat"> + Lichaam vet + </string> + <string name="Body Freckles"> + Lichaam Sproeten + </string> + <string name="Body Thick"> + Lichaam Dik + </string> + <string name="Body Thickness"> + Lichaam Dikte + </string> + <string name="Body Thin"> + Lichaam Dun + </string> + <string name="Bow Legged"> + Boog Benen + </string> + <string name="Breast Buoyancy"> + Borst Drijfvermogen + </string> + <string name="Breast Cleavage"> + Borst Splijting + </string> + <string name="Breast Size"> + Borst Grootte + </string> + <string name="Bridge Width"> + Brug Breedte + </string> + <string name="Broad"> + Breed + </string> + <string name="Brow Size"> + Wenkbrauw Grootte + </string> + <string name="Bug Eyes"> + Insect Ogen + </string> + <string name="Bugged Eyes"> + Insect Ogen + </string> + <string name="Bulbous"> + Bolle + </string> + <string name="Bulbous Nose"> + Bolle Neus + </string> + <string name="Bushy Eyebrows"> + Borstelige Wenkbrauwen + </string> + <string name="Bushy Hair"> + Borstelig Haar + </string> + <string name="Butt Size"> + Kont Grootte + </string> + <string name="bustle skirt"> + Bustle Skirt + </string> + <string name="no bustle"> + No Bustle + </string> + <string name="more bustle"> + More Bustle + </string> + <string name="Chaplin"> + Smalle Snor + </string> + <string name="Cheek Bones"> + Jukbeenderen + </string> + <string name="Chest Size"> + Borst Grootte + </string> + <string name="Chin Angle"> + Kin Hoek + </string> + <string name="Chin Cleft"> + Gespleten Kin + </string> + <string name="Chin Curtains"> + Kin Gordijnen + </string> + <string name="Chin Depth"> + Kin Diepte + </string> + <string name="Chin Heavy"> + Kin Zware + </string> + <string name="Chin In"> + Kin In + </string> + <string name="Chin Out"> + Kin uit + </string> + <string name="Chin-Neck"> + Kin-Nek + </string> + <string name="Clear"> + Opschonen + </string> + <string name="Cleft"> + Gespleten + </string> + <string name="Close Set Eyes"> + Close Set Eyes + </string> + <string name="Closed"> + Gesloten + </string> + <string name="Closed Back"> + Gesloten Achterkant + </string> + <string name="Closed Front"> + Gesloten Voorkant + </string> + <string name="Closed Left"> + Gesloten Links + </string> + <string name="Closed Right"> + Gesloten Rechts + </string> + <string name="Coin Purse"> + Verminder Grootte + </string> + <string name="Collar Back"> + Kraag Achterkant + </string> + <string name="Collar Front"> + Kraag Voorkant + </string> + <string name="Corner Down"> + Hoek Omlaag + </string> + <string name="Corner Normal"> + Hoek Normaal + </string> + <string name="Corner Up"> + Hoek Omhoog + </string> + <string name="Creased"> + Gevouwen + </string> + <string name="Crooked Nose"> + Kromte Neus + </string> + <string name="Cropped Hair"> + Bijgesneden Haar + </string> + <string name="Cuff Flare"> + Cuff Flare + </string> + <string name="Dark"> + Donker + </string> + <string name="Dark Green"> + Donker Groen + </string> + <string name="Darker"> + Donkerder + </string> + <string name="Deep"> + Diep + </string> + <string name="Default Heels"> + Standaard Hielen + </string> + <string name="Default Toe"> + Standaard Teen + </string> + <string name="Dense"> + Dicht + </string> + <string name="Dense hair"> + Dicht haar + </string> + <string name="Double Chin"> + Dubbele Kin + </string> + <string name="Downturned"> + Downturned + </string> + <string name="Duffle Bag"> + Vergroot Grootte + </string> + <string name="Ear Angle"> + Oor Hoek + </string> + <string name="Ear Size"> + Oor Grootte + </string> + <string name="Ear Tips"> + Oor Punten + </string> + <string name="Egg Head"> + Ei Hoofd + </string> + <string name="Eye Bags"> + Oog Zakken + </string> + <string name="Eye Color"> + Oog Kleur + </string> + <string name="Eye Depth"> + Oog Diepte + </string> + <string name="Eye Lightness"> + Oog Lichtheid + </string> + <string name="Eye Opening"> + Oog Opening + </string> + <string name="Eye Pop"> + Asymmetrisch + </string> + <string name="Eye Size"> + Oog Grootte + </string> + <string name="Eye Spacing"> + Oog Afstand + </string> + <string name="Eyeball Size"> + Oogbal Grootte + </string> + <string name="Eyebrow Arc"> + Wenkbrauw Boog + </string> + <string name="Eyebrow Density"> + Wenkbrauw Dichtheid + </string> + <string name="Eyebrow Height"> + Wenkbrauw Hoogte + </string> + <string name="Eyebrow Points"> + Wenkbrauw Punten + </string> + <string name="Eyebrow Size"> + Eyebrow Grootte + </string> + <string name="Eyelash Length"> + Eyelash Lengte + </string> + <string name="Eyeliner"> + Eyeliner + </string> + <string name="Eyeliner Color"> + Eyeliner Kleur + </string> + <string name="Eyes Back"> + Ogen Achteruit + </string> + <string name="Eyes Bugged"> + Insect Ogen + </string> + <string name="Eyes Forward"> + Ogen Vooruit + </string> + <string name="Eyes Long Head"> + Eyes Long Head + </string> + <string name="Eyes Shear Left Up"> + Eyes Shear Left Up + </string> + <string name="Eyes Shear Right Up"> + Eyes Shear Right Up + </string> + <string name="Eyes Short Head"> + Eyes Short Head + </string> + <string name="Eyes Spread"> + Eyes Spread + </string> + <string name="Eyes Sunken"> + Ingevallen Ogen + </string> + <string name="Eyes Together"> + Ogen Bij Elkaar + </string> + <string name="Face Shear"> + Gezicht Gelijkheid + </string> + <string name="Facial Definition"> + Gezichts Definitie + </string> + <string name="Far Set Eyes"> + Ogen Uit Elkaar + </string> + <string name="Fat"> + Dik + </string> + <string name="Fat Head"> + Dik Hoofd + </string> + <string name="Fat Lips"> + Dikke Lippen + </string> + <string name="Fat Lower"> + Fat Lower + </string> + <string name="Fat Lower Lip"> + Fat Lower Lip + </string> + <string name="Fat Torso"> + Fat Torso + </string> + <string name="Fat Upper"> + Fat Upper + </string> + <string name="Fat Upper Lip"> + Dikke Boven Lip + </string> + <string name="Female"> + Vrouw + </string> + <string name="Fingerless"> + Vingerloos + </string> + <string name="Fingers"> + Vingers + </string> + <string name="Flared Cuffs"> + Verbrede Vorm + </string> + <string name="Flat"> + Plat + </string> + <string name="Flat Butt"> + Platte Kont + </string> + <string name="Flat Head"> + Plat Hoofd + </string> + <string name="Flat Toe"> + Platte Teen + </string> + <string name="Foot Size"> + Voet Grootte + </string> + <string name="Forehead Angle"> + Voorhoofd Hoek + </string> + <string name="Forehead Heavy"> + Zwaar Voorhoofd + </string> + <string name="Freckles"> + Sproeten + </string> + <string name="Front Bangs Down"> + Voorkant Pony Omlaag + </string> + <string name="Front Bangs Up"> + Voorkant Pony Omhoog + </string> + <string name="Front Fringe"> + Voorste Rand + </string> + <string name="Front Hair"> + Gezichtshaar + </string> + <string name="Front Hair Down"> + Gezichtshaar Omlaag + </string> + <string name="Front Hair Up"> + Gezichtshaar Omhoog + </string> + <string name="Full Back"> + Volle Achterkant + </string> + <string name="Full Eyeliner"> + Volle Eyeliner + </string> + <string name="Full Front"> + Volle Voorkant + </string> + <string name="Full Hair Sides"> + Full Hair Sides + </string> + <string name="Full Sides"> + Volle Zijkanten + </string> + <string name="Glossy"> + Glanzend + </string> + <string name="Glove Fingers"> + Vinger Handschoenen + </string> + <string name="Glove Length"> + Handschoen Lengte + </string> + <string name="Hair"> + Haar + </string> + <string name="Hair Back"> + Haar: Zwart + </string> + <string name="Hair Front"> + Haar: Voorkant + </string> + <string name="Hair Sides"> + Haar: Zijkant + </string> + <string name="Hair Sweep"> + Hair Sweep + </string> + <string name="Hair Thickess"> + Haar Dikheid + </string> + <string name="Hair Thickness"> + Hair Dikheid + </string> + <string name="Hair Tilt"> + Hair Tilt + </string> + <string name="Hair Tilted Left"> + Hair Tilted Left + </string> + <string name="Hair Tilted Right"> + Hair Tilted Right + </string> + <string name="Hair Volume"> + Haar: Volume + </string> + <string name="Hand Size"> + Hand Grootte + </string> + <string name="Handlebars"> + Handlebars + </string> + <string name="Head Length"> + Hoofd Lengte + </string> + <string name="Head Shape"> + Hoofd Vorm + </string> + <string name="Head Size"> + Hooft Grootte + </string> + <string name="Head Stretch"> + Hoofd Uitrekken + </string> + <string name="Heel Height"> + Hiel Hoogte + </string> + <string name="Heel Shape"> + Hiel Vorm + </string> + <string name="Height"> + Hoogte + </string> + <string name="High"> Hoog </string> - - <!-- PARCEL_CATEGORY_UI_STRING --> - <string name="Linden Location">Linden locatie</string> - <string name="Adult">Adult</string> - <string name="Arts&Culture">Kunst & Cultuur</string> - <string name="Business">Zakelijk</string> - <string name="Educational">Educatief</string> - <string name="Gaming">Spelen</string> - <string name="Hangout">Ontmoetingsplaats</string> - <string name="Newcomer Friendly">Nieuwkomervriendelijk</string> - <string name="Parks&Nature">Parken & natuur</string> - <string name="Residential">Woongebied</string> - <string name="Shopping">Winkelen</string> - <string name="Other">Anders</string> - - <string name="ringing"> - Verbinden met in-wereld voice chat... + <string name="High Heels"> + Hoge Hielen </string> - <string name="connected"> - Verbonden + <string name="High Jaw"> + Hoge Kaak </string> - <string name="unavailable"> - Voice is niet beschikbaar op uw huidige locatie + <string name="High Platforms"> + High Platforms </string> - <string name="hang_up"> - Verbinding met in-wereld voicechat verbroken + <string name="High and Tight"> + Hoog en Strak + </string> + <string name="Higher"> + Hoger + </string> + <string name="Hip Length"> + Heup Lengte + </string> + <string name="Hip Width"> + Heup Breedte + </string> + <string name="In"> + Naar Binnen + </string> + <string name="In Shdw Color"> + Binnenste Schaduw Kleur + </string> + <string name="In Shdw Opacity"> + Binnenste Schaduw Opaciteit + </string> + <string name="Inner Eye Corner"> + Binnenste Oog Hoek + </string> + <string name="Inner Eye Shadow"> + Binnenste Oog Schaduw + </string> + <string name="Inner Shadow"> + Binnenste Schaduw + </string> + <string name="Jacket Length"> + Jas Lengte + </string> + <string name="Jacket Wrinkles"> + Jas Rimpels + </string> + <string name="Jaw Angle"> + Kaak Hoek + </string> + <string name="Jaw Jut"> + Jaw Jut + </string> + <string name="Jaw Shape"> + Kaak Vorm + </string> + <string name="Join"> + Samenvoegen + </string> + <string name="Jowls"> + Kaken + </string> + <string name="Knee Angle"> + Knie Hoek + </string> + <string name="Knock Kneed"> + Knieën Naar binnen + </string> + <string name="Large"> + Fors + </string> + <string name="Large Hands"> + Grote Handen + </string> + <string name="Left Part"> + Linker Deel + </string> + <string name="Leg Length"> + Been Lengte + </string> + <string name="Leg Muscles"> + Been Spieren + </string> + <string name="Less"> + Minder + </string> + <string name="Less Body Fat"> + Minder Lichaams Vet + </string> + <string name="Less Curtains"> + Less Curtains + </string> + <string name="Less Freckles"> + Minder Sproeten + </string> + <string name="Less Full"> + Minder Vol + </string> + <string name="Less Gravity"> + Minder Zwaartekracht + </string> + <string name="Less Love"> + Less Love + </string> + <string name="Less Muscles"> + Minder Spieren + </string> + <string name="Less Muscular"> + Minder Spieren + </string> + <string name="Less Rosy"> + Minder Rooskleurig + </string> + <string name="Less Round"> + Minder Rond + </string> + <string name="Less Saddle"> + Minder Heupen + </string> + <string name="Less Square"> + Minder Vierkant + </string> + <string name="Less Volume"> + Minder Volume + </string> + <string name="Less soul"> + Minder Ziel + </string> + <string name="Lighter"> + Lichter + </string> + <string name="Lip Cleft"> + Gespleten Lip + </string> + <string name="Lip Cleft Depth"> + Gespleten Lip Diepte + </string> + <string name="Lip Fullness"> + Lip Volheid + </string> + <string name="Lip Pinkness"> + Rozeheid Lippen + </string> + <string name="Lip Ratio"> + Lip Ratio + </string> + <string name="Lip Thickness"> + Lip Dikheid + </string> + <string name="Lip Width"> + Lip Breedte + </string> + <string name="Lipgloss"> + Lipgloss + </string> + <string name="Lipstick"> + Lipstick + </string> + <string name="Lipstick Color"> + Lipstick Kleur + </string> + <string name="Long"> + Lang + </string> + <string name="Long Head"> + Lang Hoofd + </string> + <string name="Long Hips"> + Lange Heupen + </string> + <string name="Long Legs"> + Lange Benen + </string> + <string name="Long Neck"> + Lange Nek + </string> + <string name="Long Pigtails"> + Long Pigtails + </string> + <string name="Long Ponytail"> + Lange Paardenstaart + </string> + <string name="Long Torso"> + Lang Torso + </string> + <string name="Long arms"> + Lange Armen + </string> + <string name="Longcuffs"> + Longcuffs + </string> + <string name="Loose Pants"> + Losse Broek + </string> + <string name="Loose Shirt"> + Los Shirt + </string> + <string name="Loose Sleeves"> + Losse Mouwen + </string> + <string name="Love Handles"> + Love Handles + </string> + <string name="Low"> + Laag + </string> + <string name="Low Heels"> + Lage Hielen + </string> + <string name="Low Jaw"> + Lage Kaak + </string> + <string name="Low Platforms"> + Lage Platforms + </string> + <string name="Low and Loose"> + Laag en Los + </string> + <string name="Lower"> + Lager + </string> + <string name="Lower Bridge"> + Lagere Brug + </string> + <string name="Lower Cheeks"> + Lagere Wangen + </string> + <string name="Male"> + Man + </string> + <string name="Middle Part"> + Middelste Deel + </string> + <string name="More"> + Meer + </string> + <string name="More Blush"> + Meer Blozen + </string> + <string name="More Body Fat"> + Meer Lichaams Vet + </string> + <string name="More Curtains"> + More Curtains + </string> + <string name="More Eyeshadow"> + Meer Oogshadow + </string> + <string name="More Freckles"> + Meer Sproeten + </string> + <string name="More Full"> + Meer Vol + </string> + <string name="More Gravity"> + Meer Zwaartekracht + </string> + <string name="More Lipstick"> + Meer Lippenstift + </string> + <string name="More Love"> + Meer Lovehandels + </string> + <string name="More Lower Lip"> + Meer Onder Lip + </string> + <string name="More Muscles"> + Meer Spieren + </string> + <string name="More Muscular"> + Meer Spieren + </string> + <string name="More Rosy"> + More Rosy + </string> + <string name="More Round"> + Meer Rond + </string> + <string name="More Saddle"> + Meer Heupen + </string> + <string name="More Sloped"> + Meer Hellend + </string> + <string name="More Square"> + Meer Vierkant + </string> + <string name="More Upper Lip"> + Meer Boven Lip + </string> + <string name="More Vertical"> + Meer Verticaal + </string> + <string name="More Volume"> + Meer Volume + </string> + <string name="More soul"> + Meer ziel + </string> + <string name="Moustache"> + Snor + </string> + <string name="Mouth Corner"> + Mond Hoek + </string> + <string name="Mouth Position"> + Mond Positie + </string> + <string name="Mowhawk"> + Hanekam + </string> + <string name="Muscular"> + Gespiert + </string> + <string name="Mutton Chops"> + Mutton Chops + </string> + <string name="Nail Polish"> + Nagel Lak + </string> + <string name="Nail Polish Color"> + Nagel Lak Kleur + </string> + <string name="Narrow"> + Smal + </string> + <string name="Narrow Back"> + Smalle Achterkant + </string> + <string name="Narrow Front"> + Smalle Voorkant + </string> + <string name="Narrow Lips"> + Smalle Lippen + </string> + <string name="Natural"> + Natural + </string> + <string name="Neck Length"> + Nek Lengte + </string> + <string name="Neck Thickness"> + Nek Dikheid + </string> + <string name="No Blush"> + Geen Bloos + </string> + <string name="No Eyeliner"> + Geen Eyeliner + </string> + <string name="No Eyeshadow"> + Geen Oogschaduw + </string> + <string name="No Heels"> + Geen Hakken + </string> + <string name="No Lipgloss"> + Geen Lipgloss + </string> + <string name="No Lipstick"> + Geen Lippenstift + </string> + <string name="No Part"> + Geen Deel + </string> + <string name="No Polish"> + Geen Glans + </string> + <string name="No Red"> + Geen Rood + </string> + <string name="No Spikes"> + Geen Stekels + </string> + <string name="No White"> + Geen Wit + </string> + <string name="No Wrinkles"> + Geen Rimpels + </string> + <string name="Normal Lower"> + Normaal Onder + </string> + <string name="Normal Upper"> + Normaal Boven + </string> + <string name="Nose Left"> + Neus Links + </string> + <string name="Nose Right"> + Neus Rechts + </string> + <string name="Nose Size"> + Neus Grootte + </string> + <string name="Nose Thickness"> + Neus Dickheid + </string> + <string name="Nose Tip Angle"> + Neus Top Hoek + </string> + <string name="Nose Tip Shape"> + Neus Top Vorm + </string> + <string name="Nose Width"> + Neus Breedte + </string> + <string name="Nostril Division"> + Nostril Division + </string> + <string name="Nostril Width"> + Neusgat Breedte + </string> + <string name="Old"> + Oud + </string> + <string name="Opaque"> + Ondoorzichtig + </string> + <string name="Open"> + Open + </string> + <string name="Open Back"> + Open Achterkant + </string> + <string name="Open Front"> + Open Voorkant + </string> + <string name="Open Left"> + Open Links + </string> + <string name="Open Right"> + Open Rechts + </string> + <string name="Orange"> + Oranje + </string> + <string name="Out"> + Uit + </string> + <string name="Out Shdw Color"> + Buitenste Schaduw Kleur + </string> + <string name="Out Shdw Opacity"> + Buitenste Schaduw Opaciteit + </string> + <string name="Outer Eye Corner"> + Buitenste Oog Hoek + </string> + <string name="Outer Eye Shadow"> + Buitenste Oog Schaduw + </string> + <string name="Outer Shadow"> + Buitenste Schaduw + </string> + <string name="Overbite"> + Overbeet + </string> + <string name="Package"> + Genitaliën + </string> + <string name="Painted Nails"> + Gelakte Nagels + </string> + <string name="Pale"> + Dof + </string> + <string name="Pants Crotch"> + Broek Kruis + </string> + <string name="Pants Fit"> + Broek Passend + </string> + <string name="Pants Length"> + Broek Lengte + </string> + <string name="Pants Waist"> + Broek Teille + </string> + <string name="Pants Wrinkles"> + Broek Rimpels + </string> + <string name="Part"> + Deel + </string> + <string name="Part Bangs"> + Part Bangs + </string> + <string name="Pectorals"> + Borstspieren + </string> + <string name="Pigment"> + Pigment + </string> + <string name="Pigtails"> + Pigtails + </string> + <string name="Pink"> + Roze + </string> + <string name="Pinker"> + Rozer + </string> + <string name="Platform Height"> + Platform Hoogte + </string> + <string name="Platform Width"> + Platform Breedte + </string> + <string name="Pointy"> + Puntig + </string> + <string name="Pointy Heels"> + Puntige Hielen + </string> + <string name="Pointy Toe"> + Puntige Tenen + </string> + <string name="Ponytail"> + Paardenstaard + </string> + <string name="Poofy Skirt"> + Poofy Skirt + </string> + <string name="Pop Left Eye"> + Asymmetrisch Links + </string> + <string name="Pop Right Eye"> + Asymmetrisch Rechts + </string> + <string name="Puffy"> + Opgezwollen + </string> + <string name="Puffy Eyelids"> + Opgezwollen Oogleden + </string> + <string name="Rainbow Color"> + Regenboog Kleur + </string> + <string name="Red Hair"> + Rood Haar + </string> + <string name="Red Skin"> + Rode Huid + </string> + <string name="Regular"> + Normaal + </string> + <string name="Regular Muscles"> + Normale Spieren + </string> + <string name="Right Part"> + Rechter Deel + </string> + <string name="Rosy Complexion"> + Rosy Complexion + </string> + <string name="Round"> + Rond + </string> + <string name="Round Forehead"> + Rond Voorhoofd + </string> + <string name="Ruddiness"> + Rossige kleur + </string> + <string name="Ruddy"> + Rossig + </string> + <string name="Rumpled Hair"> + Rumpled Hair + </string> + <string name="Saddle Bags"> + Saddle Bags + </string> + <string name="Saddlebags"> + Saddlebags + </string> + <string name="Scrawny"> + Magere + </string> + <string name="Scrawny Leg"> + Mager Been + </string> + <string name="Separate"> + Scheiden + </string> + <string name="Shading"> + Shading + </string> + <string name="Shadow hair"> + Schaduw Haar + </string> + <string name="Shallow"> + Ondiep + </string> + <string name="Shear Back"> + Shear Back + </string> + <string name="Shear Face"> + Shear Face + </string> + <string name="Shear Front"> + Shear Front + </string> + <string name="Shear Left"> + Shear Left + </string> + <string name="Shear Left Up"> + Shear Left Up + </string> + <string name="Shear Right"> + Shear Right + </string> + <string name="Shear Right Up"> + Shear Right Up + </string> + <string name="Sheared Back"> + Sheared Back + </string> + <string name="Sheared Front"> + Sheared Front + </string> + <string name="Shift Left"> + Verplaats Links + </string> + <string name="Shift Mouth"> + Verplaats Mond + </string> + <string name="Shift Right"> + Verplaats Rechts + </string> + <string name="Shirt Bottom"> + Hemd Onderkant + </string> + <string name="Shirt Fit"> + Hemd Passend + </string> + <string name="Shirt Wrinkles"> + Hemd Rimpels + </string> + <string name="Shoe Height"> + Schoen Hoogte + </string> + <string name="Short"> + Kort + </string> + <string name="Short Arms"> + Korte Armen + </string> + <string name="Short Legs"> + Korte Benen + </string> + <string name="Short Neck"> + Korte Nek + </string> + <string name="Short Pigtails"> + Short Pigtails + </string> + <string name="Short Ponytail"> + Korte Paardenstaart + </string> + <string name="Short Sideburns"> + Korte Bakkebaarden + </string> + <string name="Short Torso"> + Korte Torso + </string> + <string name="Short hips"> + Korte Heupen + </string> + <string name="Shoulders"> + Shouders + </string> + <string name="Side Bangs"> + Side Bangs + </string> + <string name="Side Bangs Down"> + Side Bangs Down + </string> + <string name="Side Bangs Up"> + Side Bangs Up + </string> + <string name="Side Fringe"> + Side Fringe + </string> + <string name="Sideburns"> + Bakkebaarden + </string> + <string name="Sides Hair"> + Sides Hair + </string> + <string name="Sides Hair Down"> + Sides Hair Down + </string> + <string name="Sides Hair Up"> + Sides Hair Up + </string> + <string name="Skinny"> + Broodmager + </string> + <string name="Skinny Neck"> + Smalle Nek + </string> + <string name="Skirt Fit"> + Skirt Fit + </string> + <string name="Skirt Length"> + Rok Lengte + </string> + <string name="Slanted Forehead"> + Schuin voorhoofd + </string> + <string name="Sleeve Length"> + Mouw Lengte + </string> + <string name="Sleeve Looseness"> + Mouw Losheid + </string> + <string name="Slit Back"> + Spleet: Achter + </string> + <string name="Slit Front"> + Spleet: Voor + </string> + <string name="Slit Left"> + Spleet: Links + </string> + <string name="Slit Right"> + Spleet: Rechts + </string> + <string name="Small"> + Klein + </string> + <string name="Small Hands"> + Kleine Handen + </string> + <string name="Small Head"> + Klein Hoofd + </string> + <string name="Smooth"> + Glad + </string> + <string name="Smooth Hair"> + Glad Haar + </string> + <string name="Socks Length"> + Sok Lengte + </string> + <string name="Some"> + enkele + </string> + <string name="Soulpatch"> + Soulpatch + </string> + <string name="Sparse"> + Schaars + </string> + <string name="Spiked Hair"> + Puntig Haar + </string> + <string name="Square"> + Vierkant + </string> + <string name="Square Toe"> + Vierkante Teen + </string> + <string name="Squash Head"> + Squash Head + </string> + <string name="Squash/Stretch Head"> + Squash/Stretch Head + </string> + <string name="Stretch Head"> + Uitgerekt Hoofd + </string> + <string name="Sunken"> + Verzonken + </string> + <string name="Sunken Chest"> + Verzonken Borstkas + </string> + <string name="Sunken Eyes"> + Verzonken Ogen + </string> + <string name="Sweep Back"> + Sweep Back + </string> + <string name="Sweep Forward"> + Sweep Forward + </string> + <string name="Swept Back"> + Swept Back + </string> + <string name="Swept Back Hair"> + Swept Back Hair + </string> + <string name="Swept Forward"> + Swept Forward + </string> + <string name="Swept Forward Hair"> + Swept Forward Hair + </string> + <string name="Tall"> + Lang + </string> + <string name="Taper Back"> + Spits Achter + </string> + <string name="Taper Front"> + Spits Voor + </string> + <string name="Thick Heels"> + Dikke Hielen + </string> + <string name="Thick Neck"> + Dikke Nek + </string> + <string name="Thick Toe"> + Dikke Teen + </string> + <string name="Thickness"> + Dikheid + </string> + <string name="Thin"> + Dun + </string> + <string name="Thin Eyebrows"> + Dunne Wenkbrouwen + </string> + <string name="Thin Lips"> + Dunne Lippen + </string> + <string name="Thin Nose"> + Dunne Neus + </string> + <string name="Tight Chin"> + Strakke Kin + </string> + <string name="Tight Cuffs"> + Strakke Manchetten + </string> + <string name="Tight Pants"> + Strakke Broek + </string> + <string name="Tight Shirt"> + Strak Hemd + </string> + <string name="Tight Skirt"> + Strakke Rok + </string> + <string name="Tight Sleeves"> + Strakke Mouwen + </string> + <string name="Tilt Left"> + Tilt Left + </string> + <string name="Tilt Right"> + Tilt Right + </string> + <string name="Toe Shape"> + Teen Vorm + </string> + <string name="Toe Thickness"> + Teen Dikheid + </string> + <string name="Torso Length"> + Borstkas Lengte + </string> + <string name="Torso Muscles"> + Borstkas Spieren + </string> + <string name="Torso Scrawny"> + Magere Borstkas + </string> + <string name="Unattached"> + Niet Verbonden + </string> + <string name="Uncreased"> + Uncreased + </string> + <string name="Underbite"> + onderbeet + </string> + <string name="Unnatural"> + Onnatuurlijk + </string> + <string name="Upper Bridge"> + Boven Brug + </string> + <string name="Upper Cheeks"> + Bovenste Wangen + </string> + <string name="Upper Chin Cleft"> + Bovenste Kin Gespleten + </string> + <string name="Upper Eyelid Fold"> + Bovenste Ooglid Gevouwen + </string> + <string name="Upturned"> + Omgekeerde + </string> + <string name="Very Red"> + Erg Rood + </string> + <string name="Waist Height"> + Taille Hoogte + </string> + <string name="Well-Fed"> + Goed Gevoed + </string> + <string name="White Hair"> + Wit Haar + </string> + <string name="Wide"> + Breed + </string> + <string name="Wide Back"> + Breede Achterkant + </string> + <string name="Wide Front"> + Breed Voorkant + </string> + <string name="Wide Lips"> + Breed Lippen + </string> + <string name="Wild"> + Wild + </string> + <string name="Wrinkles"> + Rimpels + </string> + <string name="LocationCtrlAddLandmarkTooltip"> + Add to My Landmarks + </string> + <string name="LocationCtrlEditLandmarkTooltip"> + Edit My Landmark + </string> + <string name="LocationCtrlInfoBtnTooltip"> + See more info about the current location + </string> + <string name="LocationCtrlComboBtnTooltip"> + My location history + </string> + <string name="UpdaterWindowTitle"> + [APP_NAME] Update + </string> + <string name="UpdaterNowUpdating"> + Now updating [APP_NAME]... + </string> + <string name="UpdaterNowInstalling"> + Installing [APP_NAME]... + </string> + <string name="UpdaterUpdatingDescriptive"> + Your [APP_NAME] Viewer is being updated to the latest release. This may take some time, so please be patient. + </string> + <string name="UpdaterProgressBarTextWithEllipses"> + Downloading update... + </string> + <string name="UpdaterProgressBarText"> + Downloading update + </string> + <string name="UpdaterFailDownloadTitle"> + Failed to download update + </string> + <string name="UpdaterFailUpdateDescriptive"> + An error occurred while updating [APP_NAME]. Please download the latest version from www.secondlife.com. + </string> + <string name="UpdaterFailInstallTitle"> + Failed to install update + </string> + <string name="UpdaterFailStartTitle"> + Failed to start viewer + </string> + <string name="IM_logging_string"> + -- Instant message logging enabled -- + </string> + <string name="IM_typing_start_string"> + [NAME] is typing... + </string> + <string name="Unnamed"> + (Unnamed) + </string> + <string name="IM_moderated_chat_label"> + (Moderated: Voices off by default) + </string> + <string name="IM_unavailable_text_label"> + Text chat is not available for this call. + </string> + <string name="IM_muted_text_label"> + Your text chat has been disabled by a Group Moderator. + </string> + <string name="IM_default_text_label"> + Click here to instant message. + </string> + <string name="IM_to_label"> + To + </string> + <string name="IM_moderator_label"> + (Moderator) </string> - <string name="ScriptQuestionCautionChatGranted"> - '[OBJECTNAME]', een object van '[OWNERNAME]', gevestigd in [REGIONNAME] op [REGIONPOS], is toestemming verleend om te: [PERMISSIONS]. - </string> - <string name="ScriptQuestionCautionChatDenied"> - '[OBJECTNAME]', een object van '[OWNERNAME]', gevestigd in [REGIONNAME] op [REGIONPOS], is toestemming geweigerd om te: [PERMISSIONS]. - </string> - <string name="ScriptTakeMoney"> - Linden dollars (L$) van u wegnemen - </string> - <string name="ActOnControlInputs"> - Acteren op uw bedieningsinvoer - </string> - <string name="RemapControlInputs"> - Uw bedieningsinvoer herdefiniëren - </string> - <string name="AnimateYourAvatar"> - Animeer uw avatar - </string> - <string name="AttachToYourAvatar"> - Bevestig aan uw avatar - </string> - <string name="ReleaseOwnership"> - Eigendom vrijgeven en openbaar worden - </string> - <string name="LinkAndDelink"> - Koppelen met en ontkoppelen van andere objecten - </string> - <string name="AddAndRemoveJoints"> - Toevoegen en verwijderen koppelingen met andere objecten - </string> - <string name="ChangePermissions"> - Wijzig zijn permissies - </string> - <string name="TrackYourCamera"> - Volg uw camera - </string> - <string name="ControlYourCamera"> - Bedien uw camera - </string> - <string name="only_user_message"> U bent de enige gebruiker in deze sessie. </string> @@ -626,31 +3246,4 @@ <string name="close_on_no_ability"> U heeft niet langer de mogelijkheid om in deze chatsessie te zijn. </string> - <string name="AcctTypeResident"> - Inwoner - </string> - <string name="AcctTypeTrial"> - Proef - </string> - <string name="AcctTypeCharterMember"> - Charter lid - </string> - <string name="AcctTypeEmployee"> - Linden Lab werknemer - </string> - <string name="PaymentInfoUsed"> - Betalingsinformatie gebruikt - </string> - <string name="PaymentInfoOnFile"> - Betalingsinformatie aanwezig - </string> - <string name="NoPaymentInfoOnFile"> - Geen betalingsinfo aanwezig - </string> - <string name="AgeVerified"> - Leeftijd geverifieerd - </string> - <string name="NotAgeVerified"> - Leeftijd niet geverifieerd - </string> </strings> diff --git a/indra/newview/skins/default/xui/nl/teleport_strings.xml b/indra/newview/skins/default/xui/nl/teleport_strings.xml index ff43e0f32f..12a81447c0 100644 --- a/indra/newview/skins/default/xui/nl/teleport_strings.xml +++ b/indra/newview/skins/default/xui/nl/teleport_strings.xml @@ -2,12 +2,12 @@ <teleport_messages> <message_set name="errors"> <message name="invalid_tport"> - Er is een probleem opgetreden bij het verwerken van uw verzoek voor een teleport. U dient wellicht opnieuw in te loggen voor uw kunt teleporteren. Wanneer u deze boodschap blijft ontvangen, controleert u dan alstublieft de Tech Support FAQ op: -www.secondlife.com/support + Probleem ondervonden bij het verwerken van uw verzoek voor een teleport. Het kan nodig zijn om opnieuw in te loggen voordat u kunt teleporteren. +Als u dit bericht blijft krijgen, controleert u dan alstublieft [SUPPORT_SITE]. </message> <message name="invalid_region_handoff"> - Er is een probleem opgetreden bij het oversteken naar een andere regio. U dient wellicht opnieuw in te loggen voor uw kunt oversteken naar andere regio's. Wanneer u deze boodschap blijft ontvangen, controleert u dan alstublieft de Tech Support FAQ op: -www.secondlife.com/support + Er is een probleem opgetreden bij het oversteken naar een andere regio. U dient wellicht opnieuw in te loggen voor uw kunt oversteken naar andere regio's. +Als u dit bericht blijft krijgen, controleert u dan alstublieft [SUPPORT_SITE]. </message> <message name="blocked_tport"> Sorry, teleport is momenteel geblokkeerd. Probeer het zo meteen opnieuw. Indien u nog steeds niet kunt teleporteren, log dan alstublieft uit en weer in om het probleem te verhelpen. diff --git a/indra/newview/skins/default/xui/pl/floater_joystick.xml b/indra/newview/skins/default/xui/pl/floater_joystick.xml index 78742c39d1..2b1e362b98 100644 --- a/indra/newview/skins/default/xui/pl/floater_joystick.xml +++ b/indra/newview/skins/default/xui/pl/floater_joystick.xml @@ -1,108 +1,108 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="KONFIGURACJA JOYSTICKA" width="590"> +<floater name="Joystick" title="KONFIGURACJA JOYSTICKA"> <check_box label="Aktywuj Joystick:" name="enable_joystick"/> <text left="130" name="joystick_type" width="360"/> <spinner label="Kalibracja Osi X" label_width="130" left="20" name="JoystickAxis1" width="170"/> <spinner label="Kalibracja Osi Y" label_width="130" left="210" name="JoystickAxis2" width="170"/> - <spinner label="Kalibracja Osi Z" label_width="130" left="400" name="JoystickAxis0" width="170"/> + <spinner label="Kalibracja Osi Z" label_width="100" left="400" name="JoystickAxis0" width="140"/> <spinner label="Kalibracja wznoszenia" label_width="130" left="20" name="JoystickAxis4" width="170"/> <spinner label="Kalibracja wychylania" label_width="130" left="210" name="JoystickAxis5" width="170"/> - <spinner label="Kalibracja obrotu" label_width="130" left="400" name="JoystickAxis3" width="170"/> + <spinner label="Kalibracja obrotu" label_width="100" left="400" name="JoystickAxis3" width="140"/> <spinner label="Kalibracja powiększania" label_width="130" name="JoystickAxis6" width="170"/> <check_box label="Bezpośrednie" left="205" name="ZoomDirect"/> <check_box label="Kursor 3D" left="340" name="Cursor3D"/> <check_box label="Automatyczne" left="450" name="AutoLeveling"/> - <text left="22" name="Control Modes:"> + <text name="Control Modes:"> Kontroluj: </text> - <check_box label="Awatara" left="130" name="JoystickAvatarEnabled" width="90"/> - <check_box label="Budowanie" left="205" name="JoystickBuildEnabled" width="90"/> - <check_box label="Kamerę podczas latania" left="282" name="JoystickFlycamEnabled" width="90"/> - <text name="XScale" width="104"> + <check_box label="Awatara" name="JoystickAvatarEnabled" width="90"/> + <check_box label="Budowanie" name="JoystickBuildEnabled" width="90"/> + <check_box label="Kamerę podczas latania" left="300" name="JoystickFlycamEnabled" width="90"/> + <text name="XScale"> Skala X </text> - <spinner left="133" name="AvatarAxisScale1"/> - <spinner left="208" name="BuildAxisScale1"/> - <spinner left="283" name="FlycamAxisScale1"/> - <text name="YScale" width="104"> + <spinner name="AvatarAxisScale1"/> + <spinner name="BuildAxisScale1"/> + <spinner left="300" name="FlycamAxisScale1"/> + <text name="YScale"> Skala Y </text> - <spinner left="133" name="AvatarAxisScale2"/> - <spinner left="208" name="BuildAxisScale2"/> - <spinner left="283" name="FlycamAxisScale2"/> - <text name="ZScale" width="104"> + <spinner name="AvatarAxisScale2"/> + <spinner name="BuildAxisScale2"/> + <spinner left="300" name="FlycamAxisScale2"/> + <text name="ZScale"> Skala Z </text> - <spinner left="133" name="AvatarAxisScale0"/> - <spinner left="208" name="BuildAxisScale0"/> - <spinner left="283" name="FlycamAxisScale0"/> - <text name="PitchScale" width="104"> + <spinner name="AvatarAxisScale0"/> + <spinner name="BuildAxisScale0"/> + <spinner left="300" name="FlycamAxisScale0"/> + <text name="PitchScale"> Skala wznoszenia </text> - <spinner left="133" name="AvatarAxisScale4"/> - <spinner left="208" name="BuildAxisScale4"/> - <spinner left="283" name="FlycamAxisScale4"/> - <text name="YawScale" width="104"> + <spinner name="AvatarAxisScale4"/> + <spinner name="BuildAxisScale4"/> + <spinner left="300" name="FlycamAxisScale4"/> + <text name="YawScale"> Skala odchylania </text> - <spinner left="133" name="AvatarAxisScale5"/> - <spinner left="208" name="BuildAxisScale5"/> - <spinner left="283" name="FlycamAxisScale5"/> - <text name="RollScale" width="104"> + <spinner name="AvatarAxisScale5"/> + <spinner name="BuildAxisScale5"/> + <spinner left="300" name="FlycamAxisScale5"/> + <text name="RollScale"> Skala obrotu </text> - <spinner left="208" name="BuildAxisScale3"/> - <spinner left="283" name="FlycamAxisScale3"/> - <text name="XDeadZone" width="104"> + <spinner name="BuildAxisScale3"/> + <spinner left="300" name="FlycamAxisScale3"/> + <text name="XDeadZone"> Tolerancja osi X </text> - <spinner left="133" name="AvatarAxisDeadZone1"/> - <spinner left="208" name="BuildAxisDeadZone1"/> - <spinner left="283" name="FlycamAxisDeadZone1"/> - <text name="YDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone1"/> + <spinner name="BuildAxisDeadZone1"/> + <spinner left="300" name="FlycamAxisDeadZone1"/> + <text name="YDeadZone"> Tolerancja osi Y </text> - <spinner left="133" name="AvatarAxisDeadZone2"/> - <spinner left="208" name="BuildAxisDeadZone2"/> - <spinner left="283" name="FlycamAxisDeadZone2"/> - <text name="ZDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone2"/> + <spinner name="BuildAxisDeadZone2"/> + <spinner left="300" name="FlycamAxisDeadZone2"/> + <text name="ZDeadZone"> Tolerancja osi Z </text> - <spinner left="133" name="AvatarAxisDeadZone0"/> - <spinner left="208" name="BuildAxisDeadZone0"/> - <spinner left="283" name="FlycamAxisDeadZone0"/> - <text name="PitchDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone0"/> + <spinner name="BuildAxisDeadZone0"/> + <spinner left="300" name="FlycamAxisDeadZone0"/> + <text name="PitchDeadZone"> Tolerancja wznoszenia </text> - <spinner left="133" name="AvatarAxisDeadZone4"/> - <spinner left="208" name="BuildAxisDeadZone4"/> - <spinner left="283" name="FlycamAxisDeadZone4"/> - <text name="YawDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone4"/> + <spinner name="BuildAxisDeadZone4"/> + <spinner left="300" name="FlycamAxisDeadZone4"/> + <text name="YawDeadZone"> Tolerancja odchylania </text> - <spinner left="133" name="AvatarAxisDeadZone5"/> - <spinner left="208" name="BuildAxisDeadZone5"/> - <spinner left="283" name="FlycamAxisDeadZone5"/> - <text name="RollDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone5"/> + <spinner name="BuildAxisDeadZone5"/> + <spinner left="300" name="FlycamAxisDeadZone5"/> + <text name="RollDeadZone"> Tolerancja obrotu </text> - <spinner left="208" name="BuildAxisDeadZone3"/> - <spinner left="283" name="FlycamAxisDeadZone3"/> - <text name="Feathering" width="104"> + <spinner name="BuildAxisDeadZone3"/> + <spinner left="300" name="FlycamAxisDeadZone3"/> + <text name="Feathering"> Przenikanie </text> - <slider label="" left="125" name="AvatarFeathering"/> - <slider label="" left="200" name="BuildFeathering"/> - <slider label="" left="275" name="FlycamFeathering"/> - <text name="ZoomScale2" width="104"> + <slider label="" name="AvatarFeathering"/> + <slider label="" name="BuildFeathering"/> + <slider label="" left_delta="81" name="FlycamFeathering"/> + <text name="ZoomScale2"> Skala powiększania </text> - <spinner label="" left="283" name="FlycamAxisScale6"/> - <text name="ZoomDeadZone" width="104"> + <spinner label="" left="300" name="FlycamAxisScale6"/> + <text name="ZoomDeadZone"> Tolerancja powiększania </text> - <spinner label="" left="283" name="FlycamAxisDeadZone6"/> - <button label="Ustawienia domyślne" left="366" name="SpaceNavigatorDefaults"/> + <spinner label="" left="300" name="FlycamAxisDeadZone6"/> + <button label="Ustawienia domyślne" name="SpaceNavigatorDefaults"/> <button label="OK" label_selected="OK" left="366" name="ok_btn"/> <button label="Anuluj" label_selected="Anuluj" name="cancel_btn"/> <stat_view label="Monitor Joysticka" name="axis_view"> diff --git a/indra/newview/skins/default/xui/pl/language_settings.xml b/indra/newview/skins/default/xui/pl/language_settings.xml index 71418d446a..debc451a33 100644 --- a/indra/newview/skins/default/xui/pl/language_settings.xml +++ b/indra/newview/skins/default/xui/pl/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">polish</string> + <string name="DarwinLocale">pl_PL.UTF-8</string> + <string name="LinuxLocale">pl_PL.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/pl/menu_viewer.xml b/indra/newview/skins/default/xui/pl/menu_viewer.xml index 85ceb9592f..d1f0ac0e5c 100644 --- a/indra/newview/skins/default/xui/pl/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pl/menu_viewer.xml @@ -119,6 +119,7 @@ <menu_item_call label="[SECOND_LIFE] Portal Pomocy" name="Second Life Help"/> <menu_item_call label="Złóż Raport o Nadużyciu" name="Report Abuse"/> <menu_item_call label="Zgłoś Błędy Klienta" name="Report Bug"/> + <menu_item_call label="O [APP_NAME]" name="About Second Life"/> </menu> <menu label="Zaawansowane" name="Advanced"> <menu_item_call label="Zatrzymaj Wszystkie Animacje" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/pl/panel_people.xml b/indra/newview/skins/default/xui/pl/panel_people.xml index 5ea5356c60..09958c84d6 100644 --- a/indra/newview/skins/default/xui/pl/panel_people.xml +++ b/indra/newview/skins/default/xui/pl/panel_people.xml @@ -47,13 +47,13 @@ Jeżeli szukasz ludzi, z którymi można się spotkać, kliknij tutaj [secondlif </panel> </tab_container> <panel name="button_bar"> - <button label="Profil" name="view_profile_btn" tool_tip="Pokaż zdjęcie, grupy i inne informacje o Rezydencie"/> - <button label="IM" name="im_btn" tool_tip="Rozpocznij rozmowę prywatną (IM)"/> - <button label="Zadzwoń" name="call_btn" tool_tip="Zadzwoń do tego Rezydenta"/> - <button label="Podziel się" name="share_btn"/> - <button label="Teleportuj" name="teleport_btn" tool_tip="Zaproponuj teleportację"/> - <button label="Profil grupy" name="group_info_btn" tool_tip="Pokaż informacje o grupie"/> - <button label="Konferencja Grupowa" name="chat_btn" tool_tip="Rozpocznij konferencę"/> - <button label="Rozmowa Głosowa" name="group_call_btn" tool_tip="Rozmowa Głosowa w tej Grupie"/> + <button width="55" label="Profil" name="view_profile_btn" tool_tip="Pokaż zdjęcie, grupy i inne informacje o Rezydencie"/> + <button width="35" label="IM" name="im_btn" tool_tip="Rozpocznij rozmowę prywatną (IM)"/> + <button width="62" label="Zadzwoń" name="call_btn" tool_tip="Zadzwoń do tego Rezydenta"/> + <button width="72" label="Podziel się" name="share_btn"/> + <button width="70" label="Teleportuj" name="teleport_btn" tool_tip="Zaproponuj teleportację"/> + <button width="69" label="Profil grupy" name="group_info_btn" tool_tip="Pokaż informacje o grupie"/> + <button width="124" label="Konferencja Grupowa" name="chat_btn" tool_tip="Rozpocznij konferencę"/> + <button width="108" label="Rozmowa Głosowa" name="group_call_btn" tool_tip="Rozmowa Głosowa w tej Grupie"/> </panel> </panel> diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml index b69efeb77e..04372208d6 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel label="Dźwięki" name="Preference Media panel"> <slider label="Główny" name="System Volume"/> - <check_box initial_value="true" label="Wycisz dzwięk podczas minimalizacji okna" name="mute_when_minimized"/> + <check_box initial_value="true" label="Wycisz podczas minimalizacji" name="mute_when_minimized"/> <slider label="Interfejs" name="UI Volume"/> <slider label="Otoczenie" name="Wind Volume"/> <slider label="Efekty dźwiękowe" name="SFX Volume"/> diff --git a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml index 42f34a3d82..dbca247a2f 100644 --- a/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/pt/floater_day_cycle_options.xml @@ -30,9 +30,9 @@ <text name="WL12am2"> 24:00 </text> - <button font="SansSerifSmall" width="96" left="546" label="Adicionar chave" label_selected="Adicionar chave" name="WLAddKey"/> - <button font="SansSerifSmall" width="96" left="546" label="Apagar chave" label_selected="Apagar chave" name="WLDeleteKey"/> - <text name="WLCurKeyFrameText" width="190" left="17"> + <button label="Adicionar chave" label_selected="Adicionar chave" name="WLAddKey"/> + <button label="Apagar chave" label_selected="Apagar chave" name="WLDeleteKey"/> + <text name="WLCurKeyFrameText"> Configurações de Quadro-chave: </text> <text name="WLCurKeyTimeText"> @@ -47,7 +47,7 @@ <text name="DayCycleText"> Grudar: </text> - <combo_box label="5 minutos" name="WLSnapOptions" width="85"/> + <combo_box label="5 minutos" name="WLSnapOptions"/> <text name="DayCycleText2"> Duração do Ciclo: </text> @@ -59,7 +59,7 @@ </text> <button label="Tocar" label_selected="Tocar" name="WLAnimSky"/> <button label="Pare!" label_selected="Pare" name="WLStopAnimSky"/> - <button width="175" font="SansSerifSmall" label="Usar o horário da Propriedade" label_selected="Ir para o horário da Propriedade" name="WLUseLindenTime"/> + <button label="Usar o horário da Propriedade" label_selected="Ir para o horário da Propriedade" name="WLUseLindenTime"/> <button label="Salvar o Dia teste" label_selected="Salvar o Dia teste" name="WLSaveDayCycle"/> <button label="Carregar o Dia teste" label_selected="Carregar o Dia teste" name="WLLoadDayCycle"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml index 57cdd50dcc..d21e574011 100644 --- a/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/pt/floater_inventory_view_finder.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Inventory Finder" title="ITENS_DE_INVENTÁRIO_RECENTES" width="165"> +<floater name="Inventory Finder" title="ITENS_DE_INVENTÁRIO_RECENTES"> <check_box label="Animação" name="check_animation"/> <check_box label="Cartões de chamadas" name="check_calling_card"/> <check_box label="Roupas" name="check_clothing"/> @@ -13,8 +13,8 @@ <check_box label="Fotos" name="check_snapshot"/> <button label="Tudo" label_selected="Tudo" name="All"/> <button label="Nenhum" label_selected="Nenhum" name="None"/> - <check_box label="Sempre mostrar as pastas" name="check_show_empty" left="3"/> - <check_box label="Desde o Logoff" name="check_since_logoff" left="3"/> + <check_box label="Sempre mostrar as pastas" name="check_show_empty"/> + <check_box label="Desde o Logoff" name="check_since_logoff"/> <text name="- OR -"> - OU - </text> diff --git a/indra/newview/skins/default/xui/pt/floater_joystick.xml b/indra/newview/skins/default/xui/pt/floater_joystick.xml index ecc4fcc9e9..98d8c0e319 100644 --- a/indra/newview/skins/default/xui/pt/floater_joystick.xml +++ b/indra/newview/skins/default/xui/pt/floater_joystick.xml @@ -16,7 +16,7 @@ Modos de Controle: </text> <check_box label="Avatar" name="JoystickAvatarEnabled"/> - <check_box label="Construir" left="192" name="JoystickBuildEnabled"/> + <check_box label="Construir" name="JoystickBuildEnabled"/> <check_box label="Camera aérea" name="JoystickFlycamEnabled"/> <text name="XScale"> Escala X @@ -27,13 +27,13 @@ <text name="ZScale"> Escala Z </text> - <text left="3" name="PitchScale" width="115"> + <text name="PitchScale"> Escala de Elevação </text> - <text left="3" name="YawScale" width="115"> + <text name="YawScale"> Escala da Guinada </text> - <text left="3" name="RollScale" width="115"> + <text name="RollScale"> Escala de Rolagem </text> <text name="XDeadZone"> @@ -45,13 +45,13 @@ <text name="ZDeadZone"> Zona Morta Z </text> - <text left="3" name="PitchDeadZone" width="115"> + <text name="PitchDeadZone"> Zona Morta: Elevação </text> - <text left="3" name="YawDeadZone" width="115"> + <text name="YawDeadZone"> Zona Morta: Guinada </text> - <text left="3" name="RollDeadZone" width="115"> + <text name="RollDeadZone"> Zona Morta: Rolagem </text> <text name="Feathering"> @@ -60,7 +60,7 @@ <text name="ZoomScale2"> Escala de Zoom </text> - <text left="4" name="ZoomDeadZone" width="110"> + <text name="ZoomDeadZone"> Zona Morta de Zoom </text> <button font="SansSerifSmall" label="Padrões do SpaceNavigator" name="SpaceNavigatorDefaults"/> diff --git a/indra/newview/skins/default/xui/pt/floater_preferences.xml b/indra/newview/skins/default/xui/pt/floater_preferences.xml index 2736900d5f..2c76a72ca8 100644 --- a/indra/newview/skins/default/xui/pt/floater_preferences.xml +++ b/indra/newview/skins/default/xui/pt/floater_preferences.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater min_width="332" name="Preferences" title="PREFERÊNCIAS" width="628"> +<floater name="Preferences" title="PREFERÊNCIAS"> <button label="OK" label_selected="OK" name="OK"/> <button label="Cancelar" label_selected="Cancelar" name="Cancel"/> - <tab_container name="pref core" tab_width="128" width="628"> + <tab_container name="pref core"> <panel label="Geral" name="general"/> <panel label="Vídeo" name="display"/> <panel label="Privacidade" name="im"/> diff --git a/indra/newview/skins/default/xui/pt/language_settings.xml b/indra/newview/skins/default/xui/pt/language_settings.xml index 71418d446a..f25e77574d 100644 --- a/indra/newview/skins/default/xui/pt/language_settings.xml +++ b/indra/newview/skins/default/xui/pt/language_settings.xml @@ -3,9 +3,9 @@ <strings> <!-- Locale Information --> - <string name="MicrosoftLocale">english</string> - <string name="DarwinLocale">C</string> - <string name="LinuxLocale">C</string> + <string name="MicrosoftLocale">portuguese</string> + <string name="DarwinLocale">pt_PT.UTF-8</string> + <string name="LinuxLocale">pt_PT.UTF-8</string> <!-- datetimeToCodes["wkday"] = "%a"; // Thu diff --git a/indra/newview/skins/default/xui/pt/menu_viewer.xml b/indra/newview/skins/default/xui/pt/menu_viewer.xml index 45f7ca1424..fe69d228e9 100644 --- a/indra/newview/skins/default/xui/pt/menu_viewer.xml +++ b/indra/newview/skins/default/xui/pt/menu_viewer.xml @@ -121,6 +121,7 @@ <menu_item_call label="[SECOND_LIFE] Ajuda" name="Second Life Help"/> <menu_item_call label="Denunciar abuso" name="Report Abuse"/> <menu_item_call label="Relatar bug" name="Report Bug"/> + <menu_item_call label="Sobre [APP_NAME]" name="About Second Life"/> </menu> <menu label="Avançado" name="Advanced"> <menu_item_call label="Parar minha animação" name="Stop Animating My Avatar"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml index 121272bf6c..eb38323940 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_graphics1.xml @@ -48,12 +48,12 @@ rápido <check_box initial_value="true" label="Atributos do Avatar" name="AvatarImpostors"/> <check_box initial_value="true" label="Melhoria de Hardware" name="AvatarVertexProgram"/> <check_box initial_value="true" label="Vestimenta do Avatar" name="AvatarCloth"/> - <slider label="Distancia de desenho:" label_width="150" name="DrawDistance" width="255"/> + <slider label="Distancia de desenho:" name="DrawDistance"/> <text name="DrawDistanceMeterText2"> m </text> - <slider label="Contador máx. de partículas:" label_width="150" name="MaxParticleCount" width="262"/> - <slider label="Qualidade de Pós-processamento:" label_width="178" name="RenderPostProcess" width="223"/> + <slider label="Contador máx. de partículas:" name="MaxParticleCount"/> + <slider label="Qualidade de Pós-processamento:" name="RenderPostProcess"/> <text name="MeshDetailText"> Detalhes de Malha: </text> @@ -94,13 +94,13 @@ rápido <text name="TerrainDetailText"> Detalhe do Terreno: </text> - <radio_group left_delta="45" name="TerrainDetailRadio" width="276"> + <radio_group left_delta="45" name="TerrainDetailRadio"> <radio_item label="Baixo" name="0"/> <radio_item label="Alto" name="2"/> </radio_group> </panel> <button label="Aplicar" label_selected="Aplicar" name="Apply"/> - <button label="Redefinir" left="110" name="Defaults" width="190"/> + <button label="Redefinir" left="110" name="Defaults"/> <button label="Avançado" name="Advanced"/> <button label="Hardware" label_selected="Hardware" name="GraphicsHardwareButton"/> </panel> |