From da79eb5545ae0604bad357d71b54e2381fc480e8 Mon Sep 17 00:00:00 2001 From: Palmer Truelson <palmer@lindenlab.com> Date: Tue, 23 Feb 2010 16:48:49 -0800 Subject: Turning on Davep optimizations again. Backed out changeset d89b00b44ab6 --- indra/newview/llagent.cpp | 3 + indra/newview/llappviewer.cpp | 8 +- indra/newview/lldrawable.cpp | 3 - indra/newview/llflexibleobject.cpp | 15 ++- indra/newview/llglsandbox.cpp | 24 +++-- indra/newview/llviewerobject.cpp | 3 + indra/newview/llviewerobjectlist.cpp | 171 ++++++++++++++++++----------------- indra/newview/llviewerobjectlist.h | 31 ++++--- indra/newview/llviewerwindow.cpp | 4 +- indra/newview/llvoclouds.cpp | 4 +- indra/newview/llvotextbubble.cpp | 3 + indra/newview/llvovolume.cpp | 17 +++- indra/newview/llworld.cpp | 3 + indra/newview/pipeline.cpp | 64 +++---------- indra/newview/pipeline.h | 5 +- 15 files changed, 185 insertions(+), 173 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2354323a66..9f2186f7f7 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3017,6 +3017,9 @@ void LLAgent::endAnimationUpdateUI() //----------------------------------------------------------------------------- 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); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2d694eefd3..9eb793783b 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3599,13 +3599,15 @@ void LLAppViewer::idle() { // Handle pending gesture processing + static LLFastTimer::DeclareTimer ftm("Agent Position"); + LLFastTimer t(ftm); LLGestureManager::instance().update(); gAgent.updateAgentPosition(gFrameDTClamped, yaw, current_mouse.mX, current_mouse.mY); } { - LLFastTimer t(FTM_OBJECTLIST_UPDATE); // Actually "object update" + LLFastTimer t(FTM_OBJECTLIST_UPDATE); if (!(logoutRequestSent() && hasSavedFinalSnapshot())) { @@ -3639,6 +3641,8 @@ void LLAppViewer::idle() // { + static LLFastTimer::DeclareTimer ftm("HUD Effects"); + LLFastTimer t(ftm); LLSelectMgr::getInstance()->updateEffects(); LLHUDManager::getInstance()->cleanupEffects(); LLHUDManager::getInstance()->sendEffects(); @@ -3895,7 +3899,7 @@ void LLAppViewer::sendLogoutRequest() static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME; #endif -static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network"); +static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network"); void LLAppViewer::idleNetwork() { diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..244fed791f 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -386,8 +386,6 @@ void LLDrawable::makeActive() mParent->makeActive(); } - gPipeline.setActive(this, TRUE); - //all child objects must also be active llassert_always(mVObjp); @@ -434,7 +432,6 @@ void LLDrawable::makeStatic(BOOL warning_enabled) if (isState(ACTIVE)) { clearState(ACTIVE); - gPipeline.setActive(this, FALSE); if (mParent.notNull() && mParent->isActive() && warning_enabled) { diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index aea2de8e92..561965d021 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -51,6 +51,9 @@ /*static*/ F32 LLVolumeImplFlexible::sUpdateFactor = 1.0f; +static LLFastTimer::DeclareTimer FTM_FLEXIBLE_REBUILD("Rebuild"); +static LLFastTimer::DeclareTimer FTM_DO_FLEXIBLE_UPDATE("Update"); + // LLFlexibleObjectData::pack/unpack now in llprimitive.cpp //----------------------------------------------- @@ -194,7 +197,6 @@ void LLVolumeImplFlexible::remapSections(LLFlexibleObjectSection *source, S32 so } } - //----------------------------------------------------------------------------- void LLVolumeImplFlexible::setAttributesOfAllSections(LLVector3* inScale) { @@ -363,6 +365,7 @@ inline S32 log2(S32 x) void LLVolumeImplFlexible::doFlexibleUpdate() { + LLFastTimer ftm(FTM_DO_FLEXIBLE_UPDATE); LLVolume* volume = mVO->getVolume(); LLPath *path = &volume->getPath(); if (mSimulateRes == 0) @@ -693,7 +696,10 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) } volume->updateRelativeXform(); - doFlexibleUpdate(); + { + LLFastTimer t(FTM_DO_FLEXIBLE_UPDATE); + doFlexibleUpdate(); + } // Object may have been rotated, which means it needs a rebuild. See SL-47220 BOOL rotated = FALSE; @@ -710,7 +716,10 @@ BOOL LLVolumeImplFlexible::doUpdateGeometry(LLDrawable *drawable) volume->regenFaces(); volume->mDrawable->setState(LLDrawable::REBUILD_VOLUME); volume->dirtySpatialGroup(); - doFlexibleRebuild(); + { + LLFastTimer t(FTM_FLEXIBLE_REBUILD); + doFlexibleRebuild(); + } volume->genBBoxes(isVolumeGlobal()); } else if (!mUpdated || rotated) diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index 750a9d478f..8569e208eb 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -897,19 +897,21 @@ void LLViewerObjectList::renderObjectBeacons() S32 last_line_width = -1; // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) - for (S32 i = 0; i < mDebugBeacons.count(); i++) + BOOL flush = FALSE; + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + const LLDebugBeacon &debug_beacon = *iter; LLColor4 color = debug_beacon.mColor; color.mV[3] *= 0.25f; S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - if (i > 0) + if (flush) { gGL.end(); - gGL.flush(); } + flush = TRUE; + gGL.flush(); glLineWidth( (F32)line_width ); last_line_width = line_width; gGL.begin(LLRender::LINES); @@ -936,18 +938,20 @@ void LLViewerObjectList::renderObjectBeacons() S32 last_line_width = -1; // gGL.begin(LLRender::LINES); // Always happens in (line_width != last_line_width) - for (S32 i = 0; i < mDebugBeacons.count(); i++) + BOOL flush = FALSE; + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - const LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + const LLDebugBeacon &debug_beacon = *iter; S32 line_width = debug_beacon.mLineWidth; if (line_width != last_line_width) { - if (i > 0) + if (flush) { gGL.end(); - gGL.flush(); } + flush = TRUE; + gGL.flush(); glLineWidth( (F32)line_width ); last_line_width = line_width; gGL.begin(LLRender::LINES); @@ -969,9 +973,9 @@ void LLViewerObjectList::renderObjectBeacons() gGL.flush(); glLineWidth(1.f); - for (S32 i = 0; i < mDebugBeacons.count(); i++) + for (std::vector<LLDebugBeacon>::iterator iter = mDebugBeacons.begin(); iter != mDebugBeacons.end(); ++iter) { - LLDebugBeacon &debug_beacon = mDebugBeacons[i]; + LLDebugBeacon &debug_beacon = *iter; if (debug_beacon.mString == "") { continue; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 886f1d9ef5..4fdfc37d6c 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2001,6 +2001,9 @@ BOOL LLViewerObject::isActive() const BOOL LLViewerObject::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { + static LLFastTimer::DeclareTimer ftm("Viewer Object"); + LLFastTimer t(ftm); + if (mDead) { // It's dead. Don't update it. diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 96828ee1b6..6347090f71 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -93,7 +93,7 @@ extern LLPipeline gPipeline; // Statics for object lookup tables. U32 LLViewerObjectList::sSimulatorMachineIndex = 1; // Not zero deliberately, to speed up index check. -LLMap<U64, U32> LLViewerObjectList::sIPAndPortToIndex; +std::map<U64, U32> LLViewerObjectList::sIPAndPortToIndex; std::map<U64, LLUUID> LLViewerObjectList::sIndexAndLocalIDToUUID; LLViewerObjectList::LLViewerObjectList() @@ -571,10 +571,9 @@ void LLViewerObjectList::processCachedObjectUpdate(LLMessageSystem *mesgsys, void LLViewerObjectList::dirtyAllObjectInventory() { - S32 count = mObjects.count(); - for(S32 i = 0; i < count; ++i) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - mObjects[i]->dirtyInventory(); + (*iter)->dirtyInventory(); } } @@ -587,14 +586,14 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) S32 num_updates, max_value; if (NUM_BINS - 1 == mCurBin) { - num_updates = mObjects.count() - mCurLazyUpdateIndex; - max_value = mObjects.count(); + num_updates = (S32) mObjects.size() - mCurLazyUpdateIndex; + max_value = (S32) mObjects.size(); gTextureList.setUpdateStats(TRUE); } else { - num_updates = (mObjects.count() / NUM_BINS) + 1; - max_value = llmin(mObjects.count(), mCurLazyUpdateIndex + num_updates); + num_updates = ((S32) mObjects.size() / NUM_BINS) + 1; + max_value = llmin((S32) mObjects.size(), mCurLazyUpdateIndex + num_updates); } @@ -647,7 +646,7 @@ void LLViewerObjectList::updateApparentAngles(LLAgent &agent) } mCurLazyUpdateIndex = max_value; - if (mCurLazyUpdateIndex == mObjects.count()) + if (mCurLazyUpdateIndex == mObjects.size()) { mCurLazyUpdateIndex = 0; } @@ -694,20 +693,26 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) // Make a copy of the list in case something in idleUpdate() messes with it std::vector<LLViewerObject*> idle_list; - idle_list.reserve( mActiveObjects.size() ); + + static LLFastTimer::DeclareTimer idle_copy("Idle Copy"); - for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); - active_iter != mActiveObjects.end(); active_iter++) { - objectp = *active_iter; - if (objectp) + LLFastTimer t(idle_copy); + idle_list.reserve( mActiveObjects.size() ); + + for (std::set<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin(); + active_iter != mActiveObjects.end(); active_iter++) { - idle_list.push_back( objectp ); - } - else - { // There shouldn't be any NULL pointers in the list, but they have caused - // crashes before. This may be idleUpdate() messing with the list. - llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; + objectp = *active_iter; + if (objectp) + { + idle_list.push_back( objectp ); + } + else + { // There shouldn't be any NULL pointers in the list, but they have caused + // crashes before. This may be idleUpdate() messing with the list. + llwarns << "LLViewerObjectList::update has a NULL objectp" << llendl; + } } } @@ -807,7 +812,7 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) } */ - LLViewerStats::getInstance()->mNumObjectsStat.addValue(mObjects.count()); + LLViewerStats::getInstance()->mNumObjectsStat.addValue((S32) mObjects.size()); LLViewerStats::getInstance()->mNumActiveObjectsStat.addValue(num_active_objects); LLViewerStats::getInstance()->mNumSizeCulledStat.addValue(mNumSizeCulled); LLViewerStats::getInstance()->mNumVisCulledStat.addValue(mNumVisCulled); @@ -815,9 +820,9 @@ void LLViewerObjectList::update(LLAgent &agent, LLWorld &world) void LLViewerObjectList::clearDebugText() { - for (S32 i = 0; i < mObjects.count(); i++) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - mObjects[i]->setDebugText(""); + (*iter)->setDebugText(""); } } @@ -856,7 +861,7 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp) if (objectp->isOnMap()) { - mMapObjects.removeObj(objectp); + removeFromMap(objectp); } // Don't clean up mObject references, these will be cleaned up more efficiently later! @@ -913,10 +918,10 @@ void LLViewerObjectList::killObjects(LLViewerRegion *regionp) { LLViewerObject *objectp; - S32 i; - for (i = 0; i < mObjects.count(); i++) + + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - objectp = mObjects[i]; + objectp = *iter; if (objectp->mRegionp == regionp) { @@ -933,10 +938,9 @@ void LLViewerObjectList::killAllObjects() // Used only on global destruction. LLViewerObject *objectp; - for (S32 i = 0; i < mObjects.count(); i++) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - objectp = mObjects[i]; - + objectp = *iter; killObject(objectp); llassert(objectp->isDead()); } @@ -945,7 +949,7 @@ void LLViewerObjectList::killAllObjects() if(!mObjects.empty()) { - llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.count() << llendl; + llwarns << "LLViewerObjectList::killAllObjects still has entries in mObjects: " << mObjects.size() << llendl; mObjects.clear(); } @@ -970,16 +974,15 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer) return; } - S32 i = 0; S32 num_removed = 0; LLViewerObject *objectp; - while (i < mObjects.count()) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ) { // Scan for all of the dead objects and remove any "global" references to them. - objectp = mObjects[i]; + objectp = *iter; if (objectp->isDead()) { - mObjects.remove(i); + iter = mObjects.erase(iter); num_removed++; if (num_removed == mNumDeadObjects) @@ -990,8 +993,7 @@ void LLViewerObjectList::cleanDeadObjects(BOOL use_timer) } else { - // iterate, this isn't a dead object. - i++; + ++iter; } } @@ -1041,12 +1043,11 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) } LLViewerObject *objectp; - S32 i; - for (i = 0; i < mObjects.count(); i++) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - objectp = getObject(i); + objectp = *iter; // There could be dead objects on the object list, so don't update stuff if the object is dead. - if (objectp) + if (!objectp->isDead()) { objectp->updatePositionCaches(); @@ -1076,9 +1077,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius"); - for (S32 i = 0; i < mMapObjects.count(); i++) + for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) { - LLViewerObject* objectp = mMapObjects[i]; + LLViewerObject* objectp = *iter; if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) { continue; @@ -1144,21 +1145,14 @@ void LLViewerObjectList::renderObjectBounds(const LLVector3 ¢er) { } -void LLViewerObjectList::renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent) -{ - generatePickList(camera); - renderPickList(screen_rect, pick_parcel_wall, render_transparent); -} - void LLViewerObjectList::generatePickList(LLCamera &camera) { LLViewerObject *objectp; S32 i; // Reset all of the GL names to zero. - for (i = 0; i < mObjects.count(); i++) + for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - objectp = mObjects[i]; - objectp->mGLName = 0; + (*iter)->mGLName = 0; } mSelectPickList.clear(); @@ -1321,17 +1315,19 @@ void LLViewerObjectList::addDebugBeacon(const LLVector3 &pos_agent, const LLColor4 &text_color, S32 line_width) { - LLDebugBeacon *beaconp = mDebugBeacons.reserve_block(1); - beaconp->mPositionAgent = pos_agent; - beaconp->mString = string; - beaconp->mColor = color; - beaconp->mTextColor = text_color; - beaconp->mLineWidth = line_width; + LLDebugBeacon beacon; + beacon.mPositionAgent = pos_agent; + beacon.mString = string; + beacon.mColor = color; + beacon.mTextColor = text_color; + beacon.mLineWidth = line_width; + + mDebugBeacons.push_back(beacon); } void LLViewerObjectList::resetObjectBeacons() { - mDebugBeacons.reset(); + mDebugBeacons.clear(); } LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLViewerRegion *regionp) @@ -1349,7 +1345,7 @@ LLViewerObject *LLViewerObjectList::createObjectViewer(const LLPCode pcode, LLVi mUUIDObjectMap[fullid] = objectp; - mObjects.put(objectp); + mObjects.push_back(objectp); updateActive(objectp); @@ -1388,7 +1384,7 @@ LLViewerObject *LLViewerObjectList::createObject(const LLPCode pcode, LLViewerRe gMessageSystem->getSenderIP(), gMessageSystem->getSenderPort()); - mObjects.put(objectp); + mObjects.push_back(objectp); updateActive(objectp); @@ -1411,11 +1407,11 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod S32 LLViewerObjectList::findReferences(LLDrawable *drawablep) const { LLViewerObject *objectp; - S32 i; S32 num_refs = 0; - for (i = 0; i < mObjects.count(); i++) + + for (vobj_list_t::const_iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter) { - objectp = mObjects[i]; + objectp = *iter; if (objectp->mDrawable.notNull()) { num_refs += objectp->mDrawable->findReferences(drawablep); @@ -1460,15 +1456,15 @@ void LLViewerObjectList::orphanize(LLViewerObject *childp, U32 parent_id, U32 ip // Unknown parent, add to orpaned child list U64 parent_info = getIndex(parent_id, ip, port); - if (-1 == mOrphanParents.find(parent_info)) + if (std::find(mOrphanParents.begin(), mOrphanParents.end(), parent_info) == mOrphanParents.end()) { - mOrphanParents.put(parent_info); + mOrphanParents.push_back(parent_info); } LLViewerObjectList::OrphanInfo oi(parent_info, childp->mID); - if (-1 == mOrphanChildren.find(oi)) + if (std::find(mOrphanChildren.begin(), mOrphanChildren.end(), oi) == mOrphanChildren.end()) { - mOrphanChildren.put(oi); + mOrphanChildren.push_back(oi); mNumOrphans++; } } @@ -1491,28 +1487,29 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) // See if we are a parent of an orphan. // Note: This code is fairly inefficient but it should happen very rarely. // It can be sped up if this is somehow a performance issue... - if (0 == mOrphanParents.count()) + if (mOrphanParents.empty()) { // no known orphan parents return; } - if (-1 == mOrphanParents.find(getIndex(objectp->mLocalID, ip, port))) + if (std::find(mOrphanParents.begin(), mOrphanParents.end(), getIndex(objectp->mLocalID, ip, port)) == mOrphanParents.end()) { // did not find objectp in OrphanParent list return; } - S32 i; U64 parent_info = getIndex(objectp->mLocalID, ip, port); BOOL orphans_found = FALSE; // Iterate through the orphan list, and set parents of matching children. - for (i = 0; i < mOrphanChildren.count(); i++) - { - if (mOrphanChildren[i].mParentInfo != parent_info) + + for (std::vector<OrphanInfo>::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); ) + { + if (iter->mParentInfo != parent_info) { + ++iter; continue; } - LLViewerObject *childp = findObject(mOrphanChildren[i].mChildInfo); + LLViewerObject *childp = findObject(iter->mChildInfo); if (childp) { if (childp == objectp) @@ -1546,29 +1543,35 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port) objectp->addChild(childp); orphans_found = TRUE; + ++iter; } else { llinfos << "Missing orphan child, removing from list" << llendl; - mOrphanChildren.remove(i); - i--; + + iter = mOrphanChildren.erase(iter); } } // Remove orphan parent and children from lists now that they've been found - mOrphanParents.remove(mOrphanParents.find(parent_info)); - - i = 0; - while (i < mOrphanChildren.count()) { - if (mOrphanChildren[i].mParentInfo == parent_info) + std::vector<U64>::iterator iter = std::find(mOrphanParents.begin(), mOrphanParents.end(), parent_info); + if (iter != mOrphanParents.end()) + { + mOrphanParents.erase(iter); + } + } + + for (std::vector<OrphanInfo>::iterator iter = mOrphanChildren.begin(); iter != mOrphanChildren.end(); ) + { + if (iter->mParentInfo == parent_info) { - mOrphanChildren.remove(i); + iter = mOrphanChildren.erase(iter); mNumOrphans--; } else { - i++; + ++iter; } } diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index ace5c5038e..8d3d2c4b44 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -38,8 +38,6 @@ // common includes #include "llstat.h" -#include "lldarrayptr.h" -#include "llmap.h" // *TODO: switch to std::map #include "llstring.h" // project includes @@ -50,7 +48,7 @@ class LLNetMap; class LLDebugBeacon; const U32 CLOSE_BIN_SIZE = 10; -const U32 NUM_BINS = 16; +const U32 NUM_BINS = 128; // GL name = position in object list + GL_NAME_INDEX_OFFSET so that // we can have special numbers like zero. @@ -111,13 +109,12 @@ public: void updateAvatarVisibility(); // Selection related stuff - void renderObjectsForSelect(LLCamera &camera, const LLRect& screen_rect, BOOL pick_parcel_wall = FALSE, BOOL render_transparent = TRUE); void generatePickList(LLCamera &camera); void renderPickList(const LLRect& screen_rect, BOOL pick_parcel_wall, BOOL render_transparent); LLViewerObject *getSelectedObject(const U32 object_id); - inline S32 getNumObjects() { return mObjects.count(); } + inline S32 getNumObjects() { return (S32) mObjects.size(); } void addToMap(LLViewerObject *objectp); void removeFromMap(LLViewerObject *objectp); @@ -131,7 +128,7 @@ public: S32 findReferences(LLDrawable *drawablep) const; // Find references to drawable in all objects, and return value. - S32 getOrphanParentCount() const { return mOrphanParents.count(); } + S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); } S32 getOrphanCount() const { return mNumOrphans; } void orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port); void findOrphans(LLViewerObject* objectp, U32 ip, U32 port); @@ -179,26 +176,28 @@ public: S32 mNumUnknownKills; S32 mNumDeadObjects; protected: - LLDynamicArray<U64> mOrphanParents; // LocalID/ip,port of orphaned objects - LLDynamicArray<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects + std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects + std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects S32 mNumOrphans; - LLDynamicArrayPtr<LLPointer<LLViewerObject>, 256> mObjects; + typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t; + + vobj_list_t mObjects; std::set<LLPointer<LLViewerObject> > mActiveObjects; - LLDynamicArrayPtr<LLPointer<LLViewerObject> > mMapObjects; + vobj_list_t mMapObjects; typedef std::map<LLUUID, LLPointer<LLViewerObject> > vo_map; vo_map mDeadObjects; // Need to keep multiple entries per UUID std::map<LLUUID, LLPointer<LLViewerObject> > mUUIDObjectMap; - LLDynamicArray<LLDebugBeacon> mDebugBeacons; + std::vector<LLDebugBeacon> mDebugBeacons; S32 mCurLazyUpdateIndex; static U32 sSimulatorMachineIndex; - static LLMap<U64, U32> sIPAndPortToIndex; + static std::map<U64, U32> sIPAndPortToIndex; static std::map<U64, LLUUID> sIndexAndLocalIDToUUID; @@ -260,12 +259,16 @@ inline LLViewerObject *LLViewerObjectList::getObject(const S32 index) inline void LLViewerObjectList::addToMap(LLViewerObject *objectp) { - mMapObjects.put(objectp); + mMapObjects.push_back(objectp); } inline void LLViewerObjectList::removeFromMap(LLViewerObject *objectp) { - mMapObjects.removeObj(objectp); + std::vector<LLPointer<LLViewerObject> >::iterator iter = std::find(mMapObjects.begin(), mMapObjects.end(), objectp); + if (iter != mMapObjects.end()) + { + mMapObjects.erase(iter); + } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cd6b9e2c50..de4317b2de 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2316,6 +2316,9 @@ void append_xui_tooltip(LLView* viewp, LLToolTip::Params& params) // event processing. void LLViewerWindow::updateUI() { + static LLFastTimer::DeclareTimer ftm("Update UI"); + LLFastTimer t(ftm); + static std::string last_handle_msg; // animate layout stacks so we have up to date rect for world view @@ -2895,7 +2898,6 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point) // Must be called after displayObjects is called, which sets the mGLName parameter // NOTE: This function gets called 3 times: // render_ui_3d: FALSE, FALSE, TRUE -// renderObjectsForSelect: TRUE, pick_parcel_wall, FALSE // render_hud_elements: FALSE, FALSE, FALSE void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL for_hud ) { diff --git a/indra/newview/llvoclouds.cpp b/indra/newview/llvoclouds.cpp index 177cb16c50..5153cef709 100644 --- a/indra/newview/llvoclouds.cpp +++ b/indra/newview/llvoclouds.cpp @@ -77,9 +77,11 @@ BOOL LLVOClouds::isActive() const return TRUE; } - BOOL LLVOClouds::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { + static LLFastTimer::DeclareTimer ftm("Idle Clouds"); + LLFastTimer t(ftm); + if (!(gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_CLOUDS))) { return TRUE; diff --git a/indra/newview/llvotextbubble.cpp b/indra/newview/llvotextbubble.cpp index 75beab519e..428ef20006 100644 --- a/indra/newview/llvotextbubble.cpp +++ b/indra/newview/llvotextbubble.cpp @@ -84,6 +84,9 @@ BOOL LLVOTextBubble::isActive() const BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { + static LLFastTimer::DeclareTimer ftm("Text Bubble"); + LLFastTimer t(ftm); + F32 dt = mUpdateTimer.getElapsedTimeF32(); // Die after a few seconds. if (dt > 1.5f) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index bfe38c14ba..3cdf485d7d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -597,6 +597,9 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) { LLViewerObject::idleUpdate(agent, world, time); + static LLFastTimer::DeclareTimer ftm("Volume"); + LLFastTimer t(ftm); + if (mDead || mDrawable.isNull()) { return TRUE; @@ -618,6 +621,18 @@ BOOL LLVOVolume::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) mVolumeImpl->doIdleUpdate(agent, world, time); } + const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40; + + if (mDrawable->isActive()) + { + if (mDrawable->isRoot() && + mDrawable->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && + (!mDrawable->getParent() || !mDrawable->getParent()->isActive())) + { + mDrawable->makeStatic(); + } + } + return TRUE; } @@ -1035,7 +1050,7 @@ BOOL LLVOVolume::calcLOD() S32 cur_detail = 0; F32 radius = getVolume()->mLODScaleBias.scaledVec(getScale()).length(); - F32 distance = llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE); + F32 distance = mDrawable->mDistanceWRTCamera; //llmin(mDrawable->mDistanceWRTCamera, MAX_LOD_DISTANCE); distance *= sDistanceFactor; F32 rampDist = LLVOVolume::sLODFactor * 2; diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 118d7f8d08..d7e5b464a6 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -657,6 +657,9 @@ void LLWorld::updateParticles() void LLWorld::updateClouds(const F32 dt) { + static LLFastTimer::DeclareTimer ftm("World Clouds"); + LLFastTimer t(ftm); + if (gSavedSettings.getBOOL("FreezeTime") || !gSavedSettings.getBOOL("SkyUseClassicClouds")) { diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 4f4fc83819..d5f87b73fe 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -116,7 +116,6 @@ const F32 BACKLIGHT_DAY_MAGNITUDE_AVATAR = 0.2f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_AVATAR = 0.1f; const F32 BACKLIGHT_DAY_MAGNITUDE_OBJECT = 0.1f; const F32 BACKLIGHT_NIGHT_MAGNITUDE_OBJECT = 0.08f; -const S32 MAX_ACTIVE_OBJECT_QUIET_FRAMES = 40; const S32 MAX_OFFSCREEN_GEOMETRY_CHANGES_PER_FRAME = 10; const U32 REFLECTION_MAP_RES = 128; @@ -1411,38 +1410,26 @@ void LLPipeline::updateMove() assertInitialized(); - for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); - iter != mRetexturedList.end(); ++iter) { - LLDrawable* drawablep = *iter; - if (drawablep && !drawablep->isDead()) - { - drawablep->updateTexture(); - } - } - mRetexturedList.clear(); + static LLFastTimer::DeclareTimer ftm("Retexture"); + LLFastTimer t(ftm); - updateMovedList(mMovedList); - - for (LLDrawable::drawable_set_t::iterator iter = mActiveQ.begin(); - iter != mActiveQ.end(); ) - { - LLDrawable::drawable_set_t::iterator curiter = iter++; - LLDrawable* drawablep = *curiter; - if (drawablep && !drawablep->isDead()) + for (LLDrawable::drawable_set_t::iterator iter = mRetexturedList.begin(); + iter != mRetexturedList.end(); ++iter) { - if (drawablep->isRoot() && - drawablep->mQuietCount++ > MAX_ACTIVE_OBJECT_QUIET_FRAMES && - (!drawablep->getParent() || !drawablep->getParent()->isActive())) + LLDrawable* drawablep = *iter; + if (drawablep && !drawablep->isDead()) { - drawablep->makeStatic(); // removes drawable and its children from mActiveQ - iter = mActiveQ.upper_bound(drawablep); // next valid entry + drawablep->updateTexture(); } } - else - { - mActiveQ.erase(curiter); - } + mRetexturedList.clear(); + } + + { + static LLFastTimer::DeclareTimer ftm("Moved List"); + LLFastTimer t(ftm); + updateMovedList(mMovedList); } //balance octrees @@ -3058,12 +3045,6 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) } } - if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_PICKING)) - { - LLAppViewer::instance()->pingMainloopTimeout("Pipeline:RenderForSelect"); - gObjectList.renderObjectsForSelect(camera, gViewerWindow->getWindowRectScaled()); - } - else { LLFastTimer t(FTM_POOLS); @@ -4797,10 +4778,6 @@ void LLPipeline::findReferences(LLDrawable *drawablep) llinfos << "In mRetexturedList" << llendl; } - if (mActiveQ.find(drawablep) != mActiveQ.end()) - { - llinfos << "In mActiveQ" << llendl; - } if (std::find(mBuildQ1.begin(), mBuildQ1.end(), drawablep) != mBuildQ1.end()) { llinfos << "In mBuildQ1" << llendl; @@ -4957,19 +4934,6 @@ void LLPipeline::setLight(LLDrawable *drawablep, BOOL is_light) } } -void LLPipeline::setActive(LLDrawable *drawablep, BOOL active) -{ - assertInitialized(); - if (active) - { - mActiveQ.insert(drawablep); - } - else - { - mActiveQ.erase(drawablep); - } -} - //static void LLPipeline::toggleRenderType(U32 type) { diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 67004a5f2d..c5285943e8 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -270,8 +270,7 @@ public: void shiftObjects(const LLVector3 &offset); void setLight(LLDrawable *drawablep, BOOL is_light); - void setActive(LLDrawable *drawablep, BOOL active); - + BOOL hasRenderBatches(const U32 type) const; LLCullResult::drawinfo_list_t::iterator beginRenderMap(U32 type); LLCullResult::drawinfo_list_t::iterator endRenderMap(U32 type); @@ -589,8 +588,6 @@ protected: LLViewerObject::vobj_list_t mCreateQ; - LLDrawable::drawable_set_t mActiveQ; - LLDrawable::drawable_set_t mRetexturedList; class HighlightItem -- cgit v1.2.3 From 7885748497d8b95f51c65f7f84a40d1405429616 Mon Sep 17 00:00:00 2001 From: Palmer Truelson <palmer@lindenlab.com> Date: Tue, 23 Feb 2010 17:08:06 -0800 Subject: Turning back on Davep's ui optimizations. Backed out changeset 6c161782dba3 --- indra/llrender/llfontgl.cpp | 30 ++++------- indra/llrender/llrender.cpp | 106 ++++++++++++++++++++++++++++++++++-- indra/llrender/llrender.h | 18 ++++++- indra/llui/lltabcontainer.cpp | 12 ++--- indra/llui/llui.cpp | 112 +++++++++++++++++++++++++-------------- indra/llui/llviewborder.cpp | 58 -------------------- indra/llui/llviewborder.h | 3 +- indra/newview/llhudrender.cpp | 12 ++--- indra/newview/llhudtext.cpp | 2 +- indra/newview/llmediactrl.cpp | 8 +-- indra/newview/llnetmap.cpp | 15 ++++++ indra/newview/llviewerwindow.cpp | 14 ++++- 12 files changed, 249 insertions(+), 141 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 1de1d6ded4..129f3e7999 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -151,14 +151,16 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons } } - gGL.pushMatrix(); - glLoadIdentity(); - gGL.translatef(floorf(sCurOrigin.mX*sScaleX), floorf(sCurOrigin.mY*sScaleY), sCurOrigin.mZ); + gGL.pushUIMatrix(); + + gGL.loadUIIdentity(); + + gGL.translateUI(floorf(sCurOrigin.mX*sScaleX), floorf(sCurOrigin.mY*sScaleY), sCurOrigin.mZ); // this code snaps the text origin to a pixel grid to start with F32 pixel_offset_x = llround((F32)sCurOrigin.mX) - (sCurOrigin.mX); F32 pixel_offset_y = llround((F32)sCurOrigin.mY) - (sCurOrigin.mY); - gGL.translatef(-pixel_offset_x, -pixel_offset_y, 0.f); + gGL.translateUI(-pixel_offset_x, -pixel_offset_y, 0.f); LLFastTimer t(FTM_RENDER_FONTS); @@ -246,9 +248,6 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons } - // Remember last-used texture to avoid unnecesssary bind calls. - LLImageGL *last_bound_texture = NULL; - for (i = begin_offset; i < begin_offset + length; i++) { llwchar wch = wstr[i]; @@ -261,12 +260,8 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons } // Per-glyph bitmap texture. LLImageGL *image_gl = mFontFreetype->getFontBitmapCache()->getImageGL(fgi->mBitmapNum); - if (last_bound_texture != image_gl) - { - gGL.getTexUnit(0)->bind(image_gl); - last_bound_texture = image_gl; - } - + gGL.getTexUnit(0)->bind(image_gl); + if ((start_x + scaled_max_pixels) < (cur_x + fgi->mXBearing + fgi->mWidth)) { // Not enough room for this character. @@ -330,10 +325,7 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons // recursively render ellipses at end of string // we've already reserved enough room - gGL.pushMatrix(); - //glLoadIdentity(); - //gGL.translatef(sCurOrigin.mX, sCurOrigin.mY, 0.0f); - //glScalef(sScaleX, sScaleY, 1.f); + gGL.pushUIMatrix(); renderUTF8(std::string("..."), 0, cur_x / sScaleX, (F32)y, @@ -344,10 +336,10 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons S32_MAX, max_pixels, right_x, FALSE); - gGL.popMatrix(); + gGL.popUIMatrix(); } - gGL.popMatrix(); + gGL.popUIMatrix(); return chars_drawn; } diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index f97d81126e..cde60b7e25 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -49,6 +49,9 @@ F64 gGLLastProjection[16]; F64 gGLProjection[16]; S32 gGLViewport[4]; +U32 LLRender::sUICalls = 0; +U32 LLRender::sUIVerts = 0; + static const U32 LL_NUM_TEXTURE_LAYERS = 16; static GLenum sGLTextureType[] = @@ -255,10 +258,9 @@ bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind) return false ; } - gGL.flush(); - if ((mCurrTexture != texture->getTexName()) || forceBind) { + gGL.flush(); activate(); enable(texture->getTarget()); mCurrTexture = texture->getTexName(); @@ -445,6 +447,8 @@ void LLTexUnit::setTextureBlendType(eTextureBlendType type) return; } + gGL.flush(); + activate(); mCurrBlendType = type; S32 scale_amount = 1; @@ -756,6 +760,7 @@ LLRender::LLRender() mCurrAlphaFunc = CF_DEFAULT; mCurrAlphaFuncVal = 0.01f; + mCurrSceneBlendType = BT_ALPHA; } LLRender::~LLRender() @@ -818,6 +823,80 @@ void LLRender::popMatrix() glPopMatrix(); } +void LLRender::translateUI(F32 x, F32 y, F32 z) +{ + if (mUIOffset.empty()) + { + llerrs << "Need to push a UI translation frame before offsetting" << llendl; + } + + mUIOffset.front().mV[0] += x; + mUIOffset.front().mV[1] += y; + mUIOffset.front().mV[2] += z; +} + +void LLRender::scaleUI(F32 x, F32 y, F32 z) +{ + if (mUIScale.empty()) + { + llerrs << "Need to push a UI transformation frame before scaling." << llendl; + } + + mUIScale.front().scaleVec(LLVector3(x,y,z)); +} + +void LLRender::pushUIMatrix() +{ + mUIOffset.push_front(mUIOffset.front()); + if (mUIScale.empty()) + { + mUIScale.push_front(LLVector3(1,1,1)); + } + else + { + mUIScale.push_front(mUIScale.front()); + } +} + +void LLRender::popUIMatrix() +{ + if (mUIOffset.empty()) + { + llerrs << "UI offset stack blown." << llendl; + } + mUIOffset.pop_front(); + mUIScale.pop_front(); +} + +LLVector3 LLRender::getUITranslation() +{ + if (mUIOffset.empty()) + { + llerrs << "UI offset stack empty." << llendl; + } + return mUIOffset.front(); +} + +LLVector3 LLRender::getUIScale() +{ + if (mUIScale.empty()) + { + llerrs << "UI scale stack empty." << llendl; + } + return mUIScale.front(); +} + + +void LLRender::loadUIIdentity() +{ + if (mUIOffset.empty()) + { + llerrs << "Need to push UI translation frame before clearing offset." << llendl; + } + mUIOffset.front().setVec(0,0,0); + mUIScale.front().setVec(1,1,1); +} + void LLRender::setColorMask(bool writeColor, bool writeAlpha) { setColorMask(writeColor, writeColor, writeColor, writeAlpha); @@ -840,6 +919,11 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB void LLRender::setSceneBlendType(eBlendType type) { + if (mCurrSceneBlendType == type) + { + return; + } + flush(); switch (type) { @@ -868,6 +952,7 @@ void LLRender::setSceneBlendType(eBlendType type) llerrs << "Unknown Scene Blend Type: " << type << llendl; break; } + mCurrSceneBlendType = type; } void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) @@ -1009,6 +1094,12 @@ void LLRender::flush() } #endif + if (!mUIOffset.empty()) + { + sUICalls++; + sUIVerts += mCount; + } + mBuffer->setBuffer(immediate_mask); mBuffer->drawArrays(mMode, 0, mCount); @@ -1028,7 +1119,16 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z) return; } - mVerticesp[mCount] = LLVector3(x,y,z); + if (mUIOffset.empty()) + { + mVerticesp[mCount] = LLVector3(x,y,z); + } + else + { + LLVector3 vert = (LLVector3(x,y,z)+mUIOffset.front()).scaledVec(mUIScale.front()); + mVerticesp[mCount] = vert; + } + mCount++; if (mCount < 4096) { diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 0121a190ee..6e38fac67b 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -286,6 +286,14 @@ public: void pushMatrix(); void popMatrix(); + void translateUI(F32 x, F32 y, F32 z); + void scaleUI(F32 x, F32 y, F32 z); + void pushUIMatrix(); + void popUIMatrix(); + void loadUIIdentity(); + LLVector3 getUITranslation(); + LLVector3 getUIScale(); + void flush(); void begin(const GLuint& mode); @@ -333,7 +341,9 @@ public: }; public: - + static U32 sUICalls; + static U32 sUIVerts; + private: bool mDirty; U32 mCount; @@ -350,7 +360,13 @@ private: std::vector<LLTexUnit*> mTexUnits; LLTexUnit* mDummyTexUnit; + U32 mCurrSceneBlendType; + F32 mMaxAnisotropy; + + std::list<LLVector3> mUIOffset; + std::list<LLVector3> mUIScale; + }; extern F64 gGLModelView[16]; diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 6be76605fd..f11bc2173c 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -402,15 +402,15 @@ void LLTabContainer::draw() if( mIsVertical && has_scroll_arrows ) { // Redraw the arrows so that they appears on top. - gGL.pushMatrix(); - gGL.translatef((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f); + gGL.pushUIMatrix(); + gGL.translateUI((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f); mPrevArrowBtn->draw(); - gGL.popMatrix(); + gGL.popUIMatrix(); - gGL.pushMatrix(); - gGL.translatef((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f); + gGL.pushUIMatrix(); + gGL.translateUI((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f); mNextArrowBtn->draw(); - gGL.popMatrix(); + gGL.popUIMatrix(); } } diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index d0ed3b6fca..0e2e8bf8ed 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -39,6 +39,7 @@ // Linden library includes #include "v2math.h" +#include "m3math.h" #include "v4color.h" #include "llrender.h" #include "llrect.h" @@ -180,19 +181,19 @@ void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, const LL void gl_rect_2d_offset_local( S32 left, S32 top, S32 right, S32 bottom, S32 pixel_offset, BOOL filled) { - gGL.pushMatrix(); + gGL.pushUIMatrix(); left += LLFontGL::sCurOrigin.mX; right += LLFontGL::sCurOrigin.mX; bottom += LLFontGL::sCurOrigin.mY; top += LLFontGL::sCurOrigin.mY; - glLoadIdentity(); + gGL.loadUIIdentity(); gl_rect_2d(llfloor((F32)left * LLUI::sGLScaleFactor.mV[VX]) - pixel_offset, llfloor((F32)top * LLUI::sGLScaleFactor.mV[VY]) + pixel_offset, llfloor((F32)right * LLUI::sGLScaleFactor.mV[VX]) + pixel_offset, llfloor((F32)bottom * LLUI::sGLScaleFactor.mV[VY]) - pixel_offset, filled); - gGL.popMatrix(); + gGL.popUIMatrix(); } @@ -508,9 +509,9 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex gGL.getTexUnit(0)->setTextureAlphaBlend(LLTexUnit::TBO_MULT, LLTexUnit::TBS_TEX_ALPHA, LLTexUnit::TBS_VERT_ALPHA); } - gGL.pushMatrix(); + gGL.pushUIMatrix(); { - gGL.translatef((F32)x, (F32)y, 0.f); + gGL.translateUI((F32)x, (F32)y, 0.f); gGL.getTexUnit(0)->bind(image); @@ -637,7 +638,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex } gGL.end(); } - gGL.popMatrix(); + gGL.popUIMatrix(); if (solid_color) { @@ -660,39 +661,72 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre LLGLSUIDefault gls_ui; - gGL.pushMatrix(); + + gGL.getTexUnit(0)->bind(image); + + gGL.color4fv(color.mV); + + if (degrees == 0.f) { - gGL.translatef((F32)x, (F32)y, 0.f); - if( degrees ) + gGL.pushUIMatrix(); + gGL.translateUI((F32)x, (F32)y, 0.f); + + gGL.begin(LLRender::QUADS); { - F32 offset_x = F32(width/2); - F32 offset_y = F32(height/2); - gGL.translatef( offset_x, offset_y, 0.f); - glRotatef( degrees, 0.f, 0.f, 1.f ); - gGL.translatef( -offset_x, -offset_y, 0.f ); + gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); + gGL.vertex2i(width, height ); + + gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop); + gGL.vertex2i(0, height ); + + gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); + gGL.vertex2i(0, 0); + + gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); + gGL.vertex2i(width, 0); } + gGL.end(); + gGL.popUIMatrix(); + } + else + { + gGL.pushUIMatrix(); + gGL.translateUI((F32)x, (F32)y, 0.f); + + F32 offset_x = F32(width/2); + F32 offset_y = F32(height/2); + + gGL.translateUI(offset_x, offset_y, 0.f); + LLMatrix3 quat(0.f, 0.f, degrees*DEG_TO_RAD); + gGL.getTexUnit(0)->bind(image); gGL.color4fv(color.mV); gGL.begin(LLRender::QUADS); { + LLVector3 v; + + v = LLVector3(offset_x, offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); - gGL.vertex2i(width, height ); + gGL.vertex2i(v.mV[0], v.mV[1] ); + v = LLVector3(-offset_x, offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop); - gGL.vertex2i(0, height ); + gGL.vertex2i(v.mV[0], v.mV[1] ); + v = LLVector3(-offset_x, -offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); - gGL.vertex2i(0, 0); + gGL.vertex2i(v.mV[0], v.mV[1] ); + v = LLVector3(offset_x, -offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); - gGL.vertex2i(width, 0); + gGL.vertex2i(v.mV[0], v.mV[1] ); } gGL.end(); + gGL.popUIMatrix(); } - gGL.popMatrix(); } @@ -747,9 +781,9 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F end_angle += F_TWO_PI; } - gGL.pushMatrix(); + gGL.pushUIMatrix(); { - gGL.translatef(center_x, center_y, 0.f); + gGL.translateUI(center_x, center_y, 0.f); // Inexact, but reasonably fast. F32 delta = (end_angle - start_angle) / steps; @@ -780,15 +814,15 @@ void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled, F } gGL.end(); } - gGL.popMatrix(); + gGL.popUIMatrix(); } void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled) { - gGL.pushMatrix(); + gGL.pushUIMatrix(); { gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.translatef(center_x, center_y, 0.f); + gGL.translateUI(center_x, center_y, 0.f); // Inexact, but reasonably fast. F32 delta = F_TWO_PI / steps; @@ -819,7 +853,7 @@ void gl_circle_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, BOOL filled } gGL.end(); } - gGL.popMatrix(); + gGL.popUIMatrix(); } // Renders a ring with sides (tube shape) @@ -846,9 +880,9 @@ void gl_deep_circle( F32 radius, F32 depth, S32 steps ) void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor4& side_color, S32 steps, BOOL render_center ) { - gGL.pushMatrix(); + gGL.pushUIMatrix(); { - gGL.translatef(0.f, 0.f, -width / 2); + gGL.translateUI(0.f, 0.f, -width / 2); if( render_center ) { gGL.color4fv(center_color.mV); @@ -857,11 +891,11 @@ void gl_ring( F32 radius, F32 width, const LLColor4& center_color, const LLColor else { gl_washer_2d(radius, radius - width, steps, side_color, side_color); - gGL.translatef(0.f, 0.f, width); + gGL.translateUI(0.f, 0.f, width); gl_washer_2d(radius - width, radius, steps, side_color, side_color); } } - gGL.popMatrix(); + gGL.popUIMatrix(); } // Draw gray and white checkerboard with black border @@ -1050,9 +1084,9 @@ void gl_segmented_rect_2d_tex(const S32 left, S32 width = llabs(right - left); S32 height = llabs(top - bottom); - gGL.pushMatrix(); + gGL.pushUIMatrix(); - gGL.translatef((F32)left, (F32)bottom, 0.f); + gGL.translateUI((F32)left, (F32)bottom, 0.f); LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height); if (border_uv_scale.mV[VX] > 0.5f) @@ -1193,7 +1227,7 @@ void gl_segmented_rect_2d_tex(const S32 left, } gGL.end(); - gGL.popMatrix(); + gGL.popUIMatrix(); } void gl_segmented_rect_2d_fragment_tex(const S32 left, @@ -1210,9 +1244,9 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left, S32 width = llabs(right - left); S32 height = llabs(top - bottom); - gGL.pushMatrix(); + gGL.pushUIMatrix(); - gGL.translatef((F32)left, (F32)bottom, 0.f); + gGL.translateUI((F32)left, (F32)bottom, 0.f); LLVector2 border_uv_scale((F32)border_size / (F32)texture_width, (F32)border_size / (F32)texture_height); if (border_uv_scale.mV[VX] > 0.5f) @@ -1383,7 +1417,7 @@ void gl_segmented_rect_2d_fragment_tex(const S32 left, } gGL.end(); - gGL.popMatrix(); + gGL.popUIMatrix(); } void gl_segmented_rect_3d_tex(const LLVector2& border_scale, const LLVector3& border_width, @@ -1591,7 +1625,7 @@ void LLUI::dirtyRect(LLRect rect) //static void LLUI::translate(F32 x, F32 y, F32 z) { - gGL.translatef(x,y,z); + gGL.translateUI(x,y,z); LLFontGL::sCurOrigin.mX += (S32) x; LLFontGL::sCurOrigin.mY += (S32) y; LLFontGL::sCurOrigin.mZ += z; @@ -1600,14 +1634,14 @@ void LLUI::translate(F32 x, F32 y, F32 z) //static void LLUI::pushMatrix() { - gGL.pushMatrix(); + gGL.pushUIMatrix(); LLFontGL::sOriginStack.push_back(LLFontGL::sCurOrigin); } //static void LLUI::popMatrix() { - gGL.popMatrix(); + gGL.popUIMatrix(); LLFontGL::sCurOrigin = *LLFontGL::sOriginStack.rbegin(); LLFontGL::sOriginStack.pop_back(); } @@ -1615,7 +1649,7 @@ void LLUI::popMatrix() //static void LLUI::loadIdentity() { - glLoadIdentity(); + gGL.loadUIIdentity(); LLFontGL::sCurOrigin.mX = 0; LLFontGL::sCurOrigin.mY = 0; LLFontGL::sCurOrigin.mZ = 0; diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp index 30717f87de..bd9c43c97f 100644 --- a/indra/llui/llviewborder.cpp +++ b/indra/llui/llviewborder.cpp @@ -125,14 +125,6 @@ void LLViewBorder::draw() llassert( FALSE ); // not implemented } } - else - if( STYLE_TEXTURE == mStyle ) - { - if( mTexture ) - { - drawTextures(); - } - } LLView::draw(); } @@ -255,56 +247,6 @@ void LLViewBorder::drawTwoPixelLines() gl_line_2d(left+1, bottom+1, right-1, bottom+1); } -void LLViewBorder::drawTextures() -{ - //LLGLSUIDefault gls_ui; - - //llassert( FALSE ); // TODO: finish implementing - - //gGL.color4fv(UI_VERTEX_COLOR.mV); - - //gGL.getTexUnit(0)->bind(mTexture); - //gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_WRAP); - - //drawTextureTrapezoid( 0.f, mBorderWidth, getRect().getWidth(), 0, 0 ); - //drawTextureTrapezoid( 90.f, mBorderWidth, getRect().getHeight(), (F32)getRect().getWidth(),0 ); - //drawTextureTrapezoid( 180.f, mBorderWidth, getRect().getWidth(), (F32)getRect().getWidth(),(F32)getRect().getHeight() ); - //drawTextureTrapezoid( 270.f, mBorderWidth, getRect().getHeight(), 0, (F32)getRect().getHeight() ); -} - - -void LLViewBorder::drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y ) -{ - gGL.pushMatrix(); - { - gGL.translatef(start_x, start_y, 0.f); - glRotatef( degrees, 0, 0, 1 ); - - gGL.begin(LLRender::QUADS); - { - // width, width /---------\ length-width, width // - // / \ // - // / \ // - // /---------------\ // - // 0,0 length, 0 // - - gGL.texCoord2f( 0, 0 ); - gGL.vertex2i( 0, 0 ); - - gGL.texCoord2f( (GLfloat)length, 0 ); - gGL.vertex2i( length, 0 ); - - gGL.texCoord2f( (GLfloat)(length - width), (GLfloat)width ); - gGL.vertex2i( length - width, width ); - - gGL.texCoord2f( (GLfloat)width, (GLfloat)width ); - gGL.vertex2i( width, width ); - } - gGL.end(); - } - gGL.popMatrix(); -} - BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style) { if (node->hasAttribute("bevel_style")) diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h index 92fd569325..342e84fd93 100644 --- a/indra/llui/llviewborder.h +++ b/indra/llui/llviewborder.h @@ -99,8 +99,7 @@ private: void drawOnePixelLines(); void drawTwoPixelLines(); void drawTextures(); - void drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y ); - + EBevel mBevel; EStyle mStyle; LLUIColor mHighlightLight; diff --git a/indra/newview/llhudrender.cpp b/indra/newview/llhudrender.cpp index a02dc3355b..325c9c260c 100644 --- a/indra/newview/llhudrender.cpp +++ b/indra/newview/llhudrender.cpp @@ -121,24 +121,24 @@ void hud_render_text(const LLWString &wstr, const LLVector3 &pos_agent, glMatrixMode(GL_PROJECTION); glPushMatrix(); glMatrixMode(GL_MODELVIEW); - + gGL.pushMatrix(); LLUI::pushMatrix(); gl_state_for_2d(world_view_rect.getWidth(), world_view_rect.getHeight()); gViewerWindow->setup3DViewport(); - //gViewerWindow->setup2DRender(); - + winX -= world_view_rect.mLeft; winY -= world_view_rect.mBottom; LLUI::loadIdentity(); + glLoadIdentity(); LLUI::translate((F32) winX*1.0f/LLFontGL::sScaleX, (F32) winY*1.0f/(LLFontGL::sScaleY), -(((F32) winZ*2.f)-1.f)); - //glRotatef(angle * RAD_TO_DEG, axis.mV[VX], axis.mV[VY], axis.mV[VZ]); - //glScalef(right_scale, up_scale, 1.f); F32 right_x; font.render(wstr, 0, 0, 0, color, LLFontGL::LEFT, LLFontGL::BASELINE, style, shadow, wstr.length(), 1000, &right_x); + LLUI::popMatrix(); - + gGL.popMatrix(); + glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 8ad94b957d..8d1d27444b 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -555,7 +555,7 @@ void LLHUDText::renderText(BOOL for_select) } } /// Reset the default color to white. The renderer expects this to be the default. - glColor4f(1.0f, 1.0f, 1.0f, 1.0f); + gGL.color4f(1.0f, 1.0f, 1.0f, 1.0f); if (for_select) { gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE); diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index d464862eed..6fd6958d2e 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -724,14 +724,14 @@ void LLMediaCtrl::draw() LLGLSUIDefault gls_ui; LLGLDisable gls_alphaTest( GL_ALPHA_TEST ); - gGL.pushMatrix(); + gGL.pushUIMatrix(); { if (mIgnoreUIScale) { - glLoadIdentity(); + gGL.loadUIIdentity(); // font system stores true screen origin, need to scale this by UI scale factor // to get render origin for this view (with unit scale) - gGL.translatef(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]), + gGL.translateUI(floorf(LLFontGL::sCurOrigin.mX * LLUI::sGLScaleFactor.mV[VX]), floorf(LLFontGL::sCurOrigin.mY * LLUI::sGLScaleFactor.mV[VY]), LLFontGL::sCurOrigin.mZ); } @@ -825,7 +825,7 @@ void LLMediaCtrl::draw() gGL.end(); gGL.setSceneBlendType(LLRender::BT_ALPHA); } - gGL.popMatrix(); + gGL.popUIMatrix(); } else diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 234fe13217..05623198ab 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -153,6 +153,18 @@ void LLNetMap::draw() // Prepare a scissor region F32 rotation = 0; + gGL.pushMatrix(); + gGL.pushUIMatrix(); + + LLVector3 offset = gGL.getUITranslation(); + LLVector3 scale = gGL.getUIScale(); + + glLoadIdentity(); + gGL.loadUIIdentity(); + + glScalef(scale.mV[0], scale.mV[1], scale.mV[2]); + gGL.translatef(offset.mV[0], offset.mV[1], offset.mV[2]); + { LLLocalClipRect clip(getLocalRect()); { @@ -435,6 +447,9 @@ void LLNetMap::draw() } } + gGL.popMatrix(); + gGL.popUIMatrix(); + LLUICtrl::draw(); } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index de4317b2de..f6227c2dd6 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -476,6 +476,10 @@ public: } ypos += y_inc; + addText(xpos, ypos, llformat("UI Verts/Calls: %d/%d", LLRender::sUIVerts, LLRender::sUICalls)); + LLRender::sUICalls = LLRender::sUIVerts = 0; + ypos += y_inc; + addText(xpos,ypos, llformat("%d/%d Nodes visible", gPipeline.mNumVisibleNodes, LLSpatialGroup::sNodeCount)); ypos += y_inc; @@ -1843,12 +1847,15 @@ void LLViewerWindow::drawDebugText() { gGL.color4f(1,1,1,1); gGL.pushMatrix(); + gGL.pushUIMatrix(); { // scale view by UI global scale factor and aspect ratio correction factor - glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); + gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); mDebugText->draw(); } + gGL.popUIMatrix(); gGL.popMatrix(); + gGL.flush(); } @@ -1896,9 +1903,11 @@ void LLViewerWindow::draw() // No translation needed, this view is glued to 0,0 gGL.pushMatrix(); + LLUI::pushMatrix(); { + // scale view by UI global scale factor and aspect ratio correction factor - glScalef(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); + gGL.scaleUI(mDisplayScale.mV[VX], mDisplayScale.mV[VY], 1.f); LLVector2 old_scale_factor = LLUI::sGLScaleFactor; // apply camera zoom transform (for high res screenshots) @@ -1964,6 +1973,7 @@ void LLViewerWindow::draw() LLUI::sGLScaleFactor = old_scale_factor; } + LLUI::popMatrix(); gGL.popMatrix(); #if LL_DEBUG -- cgit v1.2.3 From adf601ef1f46e5728988a08068cb2a8b16c7a056 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Sat, 6 Feb 2010 17:33:12 -0600 Subject: Draw prims using triangle strips instead of triangle lists. --- indra/llmath/llvolume.cpp | 201 +++++++++++++++++++++++++------- indra/llmath/llvolume.h | 4 +- indra/newview/app_settings/settings.xml | 11 ++ indra/newview/lldrawpool.cpp | 4 +- indra/newview/lldrawpoolalpha.cpp | 8 +- indra/newview/lldrawpoolbump.cpp | 8 +- indra/newview/lldrawpooltree.cpp | 4 +- indra/newview/llface.cpp | 25 +++- indra/newview/llspatialpartition.cpp | 3 +- indra/newview/llspatialpartition.h | 1 + indra/newview/llviewercontrol.cpp | 1 + indra/newview/llviewerjointmesh.cpp | 2 +- indra/newview/llvotree.cpp | 6 +- indra/newview/llvovolume.cpp | 16 ++- indra/newview/llvowlsky.cpp | 2 +- indra/newview/pipeline.cpp | 15 ++- indra/newview/pipeline.h | 4 +- 17 files changed, 242 insertions(+), 73 deletions(-) (limited to 'indra') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 192c6157a8..cc1549925b 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4521,15 +4521,65 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build) if (!partial_build) { - int idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0}; - for(int gx = 0;gx<grid_size;gx++){ - for(int gy = 0;gy<grid_size;gy++){ - if (mTypeMask & TOP_MASK){ - for(int i=5;i>=0;i--)mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]); - }else{ - for(int i=0;i<6;i++)mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]); + mTriStrip.clear(); + S32 idxs[] = {0,1,(grid_size+1)+1,(grid_size+1)+1,(grid_size+1),0}; + for(S32 gx = 0;gx<grid_size;gx++) + { + + for(S32 gy = 0;gy<grid_size;gy++) + { + if (mTypeMask & TOP_MASK) + { + for(S32 i=5;i>=0;i--) + { + mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]); + } + + if (gy == 0) + { + mTriStrip.push_back((gx+1)*(grid_size+1)); + mTriStrip.push_back((gx+1)*(grid_size+1)); + mTriStrip.push_back(gx*(grid_size+1)); + } + + mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1)); + mTriStrip.push_back(gy+1+gx*(grid_size+1)); + + + if (gy == grid_size-1) + { + mTriStrip.push_back(gy+1+gx*(grid_size+1)); + } + } + else + { + for(S32 i=0;i<6;i++) + { + mIndices.push_back(vtop+(gy*(grid_size+1))+gx+idxs[i]); + } + + if (gy == 0) + { + mTriStrip.push_back(gx*(grid_size+1)); + mTriStrip.push_back(gx*(grid_size+1)); + mTriStrip.push_back((gx+1)*(grid_size+1)); + } + + mTriStrip.push_back(gy+1+gx*(grid_size+1)); + mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1)); + + if (gy == grid_size-1) + { + mTriStrip.push_back(gy+1+(gx+1)*(grid_size+1)); + } } } + + } + + if (mTriStrip.size()%2 == 1) + { + mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]); } } @@ -4771,6 +4821,8 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) pt2--; } } + + makeTriStrip(); } else { @@ -4875,67 +4927,108 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) pt2--; } } + + makeTriStrip(); } } else { // Not hollow, generate the triangle fan. + U16 v1 = 2; + U16 v2 = 1; + if (mTypeMask & TOP_MASK) { - if (mTypeMask & OPEN_MASK) - { - // SOLID OPEN TOP - // Generate indices - // This is a tri-fan, so we reuse the same first point for all triangles. - for (S32 i = 0; i < (num_vertices - 2); i++) - { - mIndices[3*i] = num_vertices - 1; - mIndices[3*i+1] = i; - mIndices[3*i+2] = i + 1; - } - } - else - { - // SOLID CLOSED TOP - for (S32 i = 0; i < (num_vertices - 2); i++) - { - //MSMSM fix these caps but only for the un-cut case - mIndices[3*i] = num_vertices - 1; - mIndices[3*i+1] = i; - mIndices[3*i+2] = i + 1; - } - } + v1 = 1; + v2 = 2; + } + + for (S32 i = 0; i < (num_vertices - 2); i++) + { + mIndices[3*i] = num_vertices - 1; + mIndices[3*i+v1] = i; + mIndices[3*i+v2] = i + 1; + } + + //make tri strip + if (mTypeMask & OPEN_MASK) + { + makeTriStrip(); } else { - if (mTypeMask & OPEN_MASK) + S32 j = num_vertices-2; + if (mTypeMask & TOP_MASK) { - // SOLID OPEN BOTTOM - // Generate indices - // This is a tri-fan, so we reuse the same first point for all triangles. - for (S32 i = 0; i < (num_vertices - 2); i++) + mTriStrip.push_back(0); + for (S32 i = 1; i <= j; ++i) { - mIndices[3*i] = num_vertices - 1; - mIndices[3*i+1] = i + 1; - mIndices[3*i+2] = i; + mTriStrip.push_back(i); + if (i != j) + { + mTriStrip.push_back(j); + } + --j; } } else { - // SOLID CLOSED BOTTOM - for (S32 i = 0; i < (num_vertices - 2); i++) + mTriStrip.push_back(j); + for (S32 i = 1; i <= j; ++i) { - //MSMSM fix these caps but only for the un-cut case - mIndices[3*i] = num_vertices - 1; - mIndices[3*i+1] = i + 1; - mIndices[3*i+2] = i; + if (i != j) + { + mTriStrip.push_back(j); + } + mTriStrip.push_back(i); + --j; } } + + mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]); + + if (mTriStrip.size()%2 == 1) + { + mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]); + } } } + return TRUE; } +void LLVolumeFace::makeTriStrip() +{ + for (U32 i = 0; i < mIndices.size(); i+=3) + { + U16 i0 = mIndices[i]; + U16 i1 = mIndices[i+1]; + U16 i2 = mIndices[i+2]; + + if ((i/3)%2 == 1) + { + mTriStrip.push_back(i0); + mTriStrip.push_back(i0); + mTriStrip.push_back(i1); + mTriStrip.push_back(i2); + mTriStrip.push_back(i2); + } + else + { + mTriStrip.push_back(i2); + mTriStrip.push_back(i2); + mTriStrip.push_back(i1); + mTriStrip.push_back(i0); + mTriStrip.push_back(i0); + } + } + + if (mTriStrip.size()%2 == 1) + { + mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]); + } +} + void LLVolumeFace::createBinormals() { LLMemType m1(LLMemType::MTYPE_VOLUME); @@ -5136,9 +5229,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) if (!partial_build) { + mTriStrip.clear(); + // Now we generate the indices. for (t = 0; t < (mNumT-1); t++) { + //prepend terminating index to strip + mTriStrip.push_back(mNumS*t); + for (s = 0; s < (mNumS-1); s++) { mIndices[cur_index++] = s + mNumS*t; //bottom left @@ -5148,6 +5246,14 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) mIndices[cur_index++] = s+1 + mNumS*t; //bottom right mIndices[cur_index++] = s+1 + mNumS*(t+1); //top right + if (s == 0) + { + mTriStrip.push_back(s+mNumS*t); + mTriStrip.push_back(s+mNumS*(t+1)); + } + mTriStrip.push_back(s+1+mNumS*t); + mTriStrip.push_back(s+1+mNumS*(t+1)); + mEdge[cur_edge++] = (mNumS-1)*2*t+s*2+1; //bottom left/top right neighbor face if (t < mNumT-2) { //top right/top left neighbor face mEdge[cur_edge++] = (mNumS-1)*2*(t+1)+s*2+1; @@ -5188,6 +5294,13 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) } mEdge[cur_edge++] = (mNumS-1)*2*t+s*2; //top right/bottom left neighbor face } + //append terminating vertex to strip + mTriStrip.push_back(mNumS-1+mNumS*(t+1)); + } + + if (mTriStrip.size()%2 == 1) + { + mTriStrip.push_back(mTriStrip[mTriStrip.size()-1]); } } diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 871b334452..d9f80f0e30 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -798,7 +798,8 @@ public: BOOL create(LLVolume* volume, BOOL partial_build = FALSE); void createBinormals(); - + void makeTriStrip(); + class VertexData { public: @@ -839,6 +840,7 @@ public: std::vector<VertexData> mVertices; std::vector<U16> mIndices; + std::vector<U16> mTriStrip; std::vector<S32> mEdge; private: diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 73c08c4867..7e4ab1a872 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7443,6 +7443,17 @@ <key>Value</key> <integer>0</integer> </map> + <key>RenderUseTriStrips</key> + <map> + <key>Comment</key> + <string>Use triangle strips for rendering prims.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>RenderUseFarClip</key> <map> <key>Comment</key> diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 95ddacb722..ef946ac49e 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -496,8 +496,8 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) params.mGroup->rebuildMesh(); } params.mVertexBuffer->setBuffer(mask); - params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount/3); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } if (params.mTextureMatrix && texture && params.mTexture.notNull()) diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 7be6e82251..875c9ac6a9 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -251,8 +251,8 @@ void LLDrawPoolAlpha::renderAlphaHighlight(U32 mask) params.mGroup->rebuildMesh(); } params.mVertexBuffer->setBuffer(mask); - params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount/3); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } } } @@ -381,8 +381,8 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) } params.mVertexBuffer->setBuffer(mask); - params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount/3); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); if (params.mTextureMatrix && params.mTexture.notNull()) { diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 03a8b108e2..d09d4a412f 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -560,8 +560,8 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL params.mGroup->rebuildMesh(); } params.mVertexBuffer->setBuffer(mask); - params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount/3); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); } } @@ -1231,8 +1231,8 @@ void LLDrawPoolBump::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) params.mGroup->rebuildMesh(); } params.mVertexBuffer->setBuffer(mask); - params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); - gPipeline.addTrianglesDrawn(params.mCount/3); + params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset); + gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode); if (params.mTextureMatrix) { if (mShiny) diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp index 5521fb05a8..1a5d55d793 100644 --- a/indra/newview/lldrawpooltree.cpp +++ b/indra/newview/lldrawpooltree.cpp @@ -115,7 +115,7 @@ void LLDrawPoolTree::render(S32 pass) LLFace *face = *iter; face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()/3); + gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); } } } @@ -237,7 +237,7 @@ void LLDrawPoolTree::renderForSelect() face->mVertexBuffer->setBuffer(LLDrawPoolTree::VERTEX_DATA_MASK); face->mVertexBuffer->drawRange(LLRender::TRIANGLES, 0, face->mVertexBuffer->getRequestedVerts()-1, face->mVertexBuffer->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()/3); + gPipeline.addTrianglesDrawn(face->mVertexBuffer->getRequestedIndices()); } } } diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 80acc71a41..ebebd485d2 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -870,7 +870,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, llpushcallstacks ; const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); - S32 num_indices = (S32)vf.mIndices.size(); + S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size(); if (mVertexBuffer.notNull()) { @@ -1063,9 +1063,19 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (full_rebuild) { mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex); - for (U16 i = 0; i < num_indices; i++) + if (LLPipeline::sUseTriStrips) { - *indicesp++ = vf.mIndices[i] + index_offset; + for (U16 i = 0; i < num_indices; i++) + { + *indicesp++ = vf.mTriStrip[i] + index_offset; + } + } + else + { + for (U16 i = 0; i < num_indices; i++) + { + *indicesp++ = vf.mIndices[i] + index_offset; + } } } @@ -1617,8 +1627,13 @@ S32 LLFace::pushVertices(const U16* index_array) const { if (mIndicesCount) { - mVertexBuffer->drawRange(LLRender::TRIANGLES, mGeomIndex, mGeomIndex+mGeomCount-1, mIndicesCount, mIndicesIndex); - gPipeline.addTrianglesDrawn(mIndicesCount/3); + U32 render_type = LLRender::TRIANGLES; + if (mDrawInfo) + { + render_type = mDrawInfo->mDrawMode; + } + mVertexBuffer->drawRange(render_type, mGeomIndex, mGeomIndex+mGeomCount-1, mIndicesCount, mIndicesIndex); + gPipeline.addTrianglesDrawn(mIndicesCount, render_type); } return mIndicesCount; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 2a57d48f16..d6e9256fee 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3380,7 +3380,8 @@ LLDrawInfo::LLDrawInfo(U16 start, U16 end, U32 count, U32 offset, mVSize(0.f), mGroup(NULL), mFace(NULL), - mDistance(0.f) + mDistance(0.f), + mDrawMode(LLRender::TRIANGLES) { mDebugColor = (rand() << 16) + rand(); if (mStart >= mVertexBuffer->getRequestedVerts() || diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index 64c2a9acbc..7896488379 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -93,6 +93,7 @@ public: LLFace* mFace; //associated face F32 mDistance; LLVector3 mExtents[2]; + U32 mDrawMode; struct CompareTexture { diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 64eabe65cf..5daea96123 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -510,6 +510,7 @@ void settings_setup_listeners() gSavedSettings.getControl("FirstPersonAvatarVisible")->getSignal()->connect(boost::bind(&handleRenderAvatarMouselookChanged, _2)); gSavedSettings.getControl("RenderFarClip")->getSignal()->connect(boost::bind(&handleRenderFarClipChanged, _2)); gSavedSettings.getControl("RenderTerrainDetail")->getSignal()->connect(boost::bind(&handleTerrainDetailChanged, _2)); + gSavedSettings.getControl("RenderUseTriStrips")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAnimateTrees")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderAvatarVP")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("VertexShaderEnable")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 1a67fc0966..7225aa1523 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -626,7 +626,7 @@ U32 LLViewerJointMesh::drawShape( F32 pixelArea, BOOL first_pass, BOOL is_dummy) mFace->mVertexBuffer->drawRange(LLRender::TRIANGLES, start, end, count, offset); glPopMatrix(); } - gPipeline.addTrianglesDrawn(count/3); + gPipeline.addTrianglesDrawn(count); triangle_count += count; diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp index 24f1c4bd24..55e2c58a52 100644 --- a/indra/newview/llvotree.cpp +++ b/indra/newview/llvotree.cpp @@ -1141,7 +1141,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD glLoadMatrixf((F32*) scale_mat.mMatrix); glDrawElements(GL_TRIANGLES, sLODIndexCount[trunk_LOD], GL_UNSIGNED_SHORT, indicesp + sLODIndexOffset[trunk_LOD]); - gPipeline.addTrianglesDrawn(LEAF_INDICES/3); + gPipeline.addTrianglesDrawn(LEAF_INDICES); stop_glerror(); ret += sLODIndexCount[trunk_LOD]; } @@ -1191,7 +1191,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD glLoadMatrixf((F32*) scale_mat.mMatrix); glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp); - gPipeline.addTrianglesDrawn(LEAF_INDICES/3); + gPipeline.addTrianglesDrawn(LEAF_INDICES); stop_glerror(); ret += LEAF_INDICES; } @@ -1216,7 +1216,7 @@ U32 LLVOTree::drawBranchPipeline(LLMatrix4& matrix, U16* indicesp, S32 trunk_LOD glLoadMatrixf((F32*) scale_mat.mMatrix); glDrawElements(GL_TRIANGLES, LEAF_INDICES, GL_UNSIGNED_SHORT, indicesp); - gPipeline.addTrianglesDrawn(LEAF_INDICES/3); + gPipeline.addTrianglesDrawn(LEAF_INDICES); stop_glerror(); ret += LEAF_INDICES; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index fbb44c8e76..f1b27fb4df 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1515,7 +1515,14 @@ void LLVOVolume::updateFaceSize(S32 idx) else { const LLVolumeFace& vol_face = getVolume()->getVolumeFace(idx); - facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size()); + if (LLPipeline::sUseTriStrips) + { + facep->setSize(vol_face.mVertices.size(), vol_face.mTriStrip.size()); + } + else + { + facep->setSize(vol_face.mVertices.size(), vol_face.mIndices.size()); + } } } @@ -3265,6 +3272,11 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, draw_info->mExtents[0] = facep->mExtents[0]; draw_info->mExtents[1] = facep->mExtents[1]; validate_draw_info(*draw_info); + + if (LLPipeline::sUseTriStrips) + { + draw_info->mDrawMode = LLRender::TRIANGLE_STRIP; + } } } @@ -3349,7 +3361,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) drawablep->updateFaceSize(i); LLFace* facep = drawablep->getFace(i); - if (cur_total > max_total) + if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0) { facep->mVertexBuffer = NULL; facep->mLastVertexBuffer = NULL; diff --git a/indra/newview/llvowlsky.cpp b/indra/newview/llvowlsky.cpp index 0272a2ab34..1749ccef94 100644 --- a/indra/newview/llvowlsky.cpp +++ b/indra/newview/llvowlsky.cpp @@ -519,7 +519,7 @@ void LLVOWLSky::drawDome(void) LLRender::TRIANGLE_STRIP, 0, strips_segment->getRequestedVerts()-1, strips_segment->getRequestedIndices(), 0); - gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices() - 2); + gPipeline.addTrianglesDrawn(strips_segment->getRequestedIndices(), LLRender::TRIANGLE_STRIP); } #else diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e2179fb257..259ca21e93 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -270,6 +270,7 @@ BOOL LLPipeline::sDelayVBUpdate = TRUE; BOOL LLPipeline::sFastAlpha = TRUE; BOOL LLPipeline::sDisableShaders = FALSE; BOOL LLPipeline::sRenderBump = TRUE; +BOOL LLPipeline::sUseTriStrips = TRUE; BOOL LLPipeline::sUseFarClip = TRUE; BOOL LLPipeline::sShadowRender = FALSE; BOOL LLPipeline::sWaterReflections = FALSE; @@ -358,6 +359,7 @@ void LLPipeline::init() sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD"); sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); + sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights"); sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -3490,9 +3492,19 @@ void LLPipeline::renderGeomShadow(LLCamera& camera) } -void LLPipeline::addTrianglesDrawn(S32 count) +void LLPipeline::addTrianglesDrawn(S32 index_count, U32 render_type) { assertInitialized(); + S32 count = 0; + if (render_type == LLRender::TRIANGLE_STRIP) + { + count = index_count-2; + } + else + { + count = index_count/3; + } + mTrianglesDrawn += count; mBatchCount++; mMaxBatchSize = llmax(mMaxBatchSize, count); @@ -5344,6 +5356,7 @@ void LLPipeline::resetVertexBuffers(LLDrawable* drawable) void LLPipeline::resetVertexBuffers() { sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); + sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin(); iter != LLWorld::getInstance()->getRegionList().end(); ++iter) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 46231048e8..6aecc23aac 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -277,7 +277,7 @@ public: LLCullResult::sg_list_t::iterator beginAlphaGroups(); LLCullResult::sg_list_t::iterator endAlphaGroups(); - void addTrianglesDrawn(S32 count); + void addTrianglesDrawn(S32 index_count, U32 render_type = LLRender::TRIANGLES); BOOL hasRenderType(const U32 type) const { return (type && (mRenderTypeMask & (1<<type))) ? TRUE : FALSE; } BOOL hasRenderDebugFeatureMask(const U32 mask) const { return (mRenderDebugFeatureMask & mask) ? TRUE : FALSE; } BOOL hasRenderDebugMask(const U32 mask) const { return (mRenderDebugMask & mask) ? TRUE : FALSE; } @@ -447,7 +447,7 @@ public: static BOOL sFastAlpha; static BOOL sDisableShaders; // if TRUE, rendering will be done without shaders static BOOL sRenderBump; - static BOOL sUseFBO; + static BOOL sUseTriStrips; static BOOL sUseFarClip; static BOOL sShadowRender; static BOOL sWaterReflections; -- cgit v1.2.3 From 4538bdd8e9c0aaecec918fe9e9f784d7cae23387 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Sat, 6 Feb 2010 20:50:49 -0600 Subject: Fix for bad GL blend function caching. --- indra/llrender/llrender.cpp | 33 ++++++++++++++++----------------- indra/llrender/llrender.h | 3 ++- indra/newview/llselectmgr.cpp | 19 +++++++++++++------ 3 files changed, 31 insertions(+), 24 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index d2dc1104a8..c11675fa48 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -763,7 +763,8 @@ LLRender::LLRender() mCurrAlphaFunc = CF_DEFAULT; mCurrAlphaFuncVal = 0.01f; - mCurrSceneBlendType = BT_ALPHA; + mCurrBlendSFactor = BF_SOURCE_ALPHA; + mCurrBlendDFactor = BF_ONE_MINUS_SOURCE_ALPHA; } LLRender::~LLRender() @@ -922,40 +923,33 @@ void LLRender::setColorMask(bool writeColorR, bool writeColorG, bool writeColorB void LLRender::setSceneBlendType(eBlendType type) { - if (mCurrSceneBlendType == type) - { - return; - } - - flush(); switch (type) { case BT_ALPHA: - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + blendFunc(BF_SOURCE_ALPHA, BF_ONE_MINUS_SOURCE_ALPHA); break; case BT_ADD: - glBlendFunc(GL_ONE, GL_ONE); + blendFunc(BF_ONE, BF_ONE); break; case BT_ADD_WITH_ALPHA: - glBlendFunc(GL_SRC_ALPHA, GL_ONE); + blendFunc(BF_SOURCE_ALPHA, BF_ONE); break; case BT_MULT: - glBlendFunc(GL_DST_COLOR, GL_ZERO); + blendFunc(BF_DEST_COLOR, BF_ZERO); break; case BT_MULT_ALPHA: - glBlendFunc(GL_DST_ALPHA, GL_ZERO); + blendFunc(BF_DEST_ALPHA, BF_ZERO); break; case BT_MULT_X2: - glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR); + blendFunc(BF_DEST_COLOR, BF_SOURCE_COLOR); break; case BT_REPLACE: - glBlendFunc(GL_ONE, GL_ZERO); + blendFunc(BF_ONE, BF_ZERO); break; default: llerrs << "Unknown Scene Blend Type: " << type << llendl; break; } - mCurrSceneBlendType = type; } void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) @@ -976,8 +970,13 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor) { - flush(); - glBlendFunc(sGLBlendFactor[sfactor], sGLBlendFactor[dfactor]); + if (mCurrBlendSFactor != sfactor || mCurrBlendDFactor != dfactor) + { + mCurrBlendSFactor = sfactor; + mCurrBlendDFactor = dfactor; + flush(); + glBlendFunc(sGLBlendFactor[sfactor], sGLBlendFactor[dfactor]); + } } LLTexUnit* LLRender::getTexUnit(U32 index) diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 6e38fac67b..a70ccf4d80 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -360,7 +360,8 @@ private: std::vector<LLTexUnit*> mTexUnits; LLTexUnit* mDummyTexUnit; - U32 mCurrSceneBlendType; + U32 mCurrBlendSFactor; + U32 mCurrBlendDFactor; F32 mMaxAnisotropy; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 9540894646..d733574a9d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -4919,13 +4919,15 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) // set up transform to encompass bounding box of HUD glMatrixMode(GL_PROJECTION); - glPushMatrix(); + gGL.pushMatrix(); glLoadIdentity(); F32 depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f); glOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, depth); glMatrixMode(GL_MODELVIEW); - glPushMatrix(); + gGL.pushMatrix(); + gGL.pushUIMatrix(); + gGL.loadUIIdentity(); glLoadIdentity(); glLoadMatrixf(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame glTranslatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f); @@ -5022,10 +5024,11 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) if (for_hud && avatar) { glMatrixMode(GL_PROJECTION); - glPopMatrix(); + gGL.popMatrix(); glMatrixMode(GL_MODELVIEW); - glPopMatrix(); + gGL.popMatrix(); + gGL.popUIMatrix(); stop_glerror(); } @@ -5374,7 +5377,10 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) } glMatrixMode(GL_MODELVIEW); - glPushMatrix(); + gGL.pushMatrix(); + gGL.pushUIMatrix(); + gGL.loadUIIdentity(); + if (!is_hud_object) { glLoadIdentity(); @@ -5493,7 +5499,8 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) gGL.end(); gGL.flush(); } - glPopMatrix(); + gGL.popMatrix(); + gGL.popUIMatrix(); } // -- cgit v1.2.3 From bd10ded1daa87195b06e96d112108bbd832b3cfd Mon Sep 17 00:00:00 2001 From: Palmer Truelson <palmer@lindenlab.com> Date: Tue, 23 Feb 2010 18:03:37 -0800 Subject: index off for tristrip fix on davep's tristrip optimization --- indra/llmath/llvolume.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index cc1549925b..34348230b6 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -4961,7 +4961,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) if (mTypeMask & TOP_MASK) { mTriStrip.push_back(0); - for (S32 i = 1; i <= j; ++i) + for (S32 i = 0; i <= j; ++i) { mTriStrip.push_back(i); if (i != j) @@ -4974,7 +4974,7 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build) else { mTriStrip.push_back(j); - for (S32 i = 1; i <= j; ++i) + for (S32 i = 0; i <= j; ++i) { if (i != j) { -- cgit v1.2.3 From b8739946be195d54f5b6a6ddc29c1bb9deea01be Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Mon, 8 Feb 2010 19:15:43 -0600 Subject: Fix for blend func being screwed up at init. Fix for avatar appearance editor drawing hair in the background. --- indra/llrender/llrender.cpp | 4 ++-- indra/llui/llui.cpp | 8 ++++---- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloaterimagepreview.cpp | 5 +++++ indra/newview/lltoolmorph.cpp | 12 ++++++++---- 5 files changed, 20 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index c11675fa48..55c5b4531b 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -763,8 +763,8 @@ LLRender::LLRender() mCurrAlphaFunc = CF_DEFAULT; mCurrAlphaFuncVal = 0.01f; - mCurrBlendSFactor = BF_SOURCE_ALPHA; - mCurrBlendDFactor = BF_ONE_MINUS_SOURCE_ALPHA; + mCurrBlendSFactor = BF_ONE; + mCurrBlendDFactor = BF_ZERO; } LLRender::~LLRender() diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 2ba4478376..b348ec2d29 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -710,19 +710,19 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre v = LLVector3(offset_x, offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); - gGL.vertex2i(v.mV[0], v.mV[1] ); + gGL.vertex2f(v.mV[0], v.mV[1] ); v = LLVector3(-offset_x, offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop); - gGL.vertex2i(v.mV[0], v.mV[1] ); + gGL.vertex2f(v.mV[0], v.mV[1] ); v = LLVector3(-offset_x, -offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); - gGL.vertex2i(v.mV[0], v.mV[1] ); + gGL.vertex2f(v.mV[0], v.mV[1] ); v = LLVector3(offset_x, -offset_y, 0.f) * quat; gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); - gGL.vertex2i(v.mV[0], v.mV[1] ); + gGL.vertex2f(v.mV[0], v.mV[1] ); } gGL.end(); gGL.popUIMatrix(); diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 7e4ab1a872..4210760223 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -7452,7 +7452,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>RenderUseFarClip</key> <map> diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 61568df12e..9917593c91 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -688,6 +688,9 @@ BOOL LLImagePreviewAvatar::render() mNeedsUpdate = FALSE; LLVOAvatar* avatarp = mDummyAvatar; + gGL.pushUIMatrix(); + gGL.loadUIIdentity(); + glMatrixMode(GL_PROJECTION); gGL.pushMatrix(); glLoadIdentity(); @@ -696,6 +699,7 @@ BOOL LLImagePreviewAvatar::render() glMatrixMode(GL_MODELVIEW); gGL.pushMatrix(); glLoadIdentity(); + LLGLSUIDefault def; gGL.color4f(0.15f, 0.2f, 0.3f, 1.f); @@ -741,6 +745,7 @@ BOOL LLImagePreviewAvatar::render() avatarPoolp->renderAvatars(avatarp); // renders only one avatar } + gGL.popUIMatrix(); gGL.color4f(1,1,1,1); return TRUE; } diff --git a/indra/newview/lltoolmorph.cpp b/indra/newview/lltoolmorph.cpp index 4fb75f7a49..5f825b461e 100644 --- a/indra/newview/lltoolmorph.cpp +++ b/indra/newview/lltoolmorph.cpp @@ -167,13 +167,16 @@ BOOL LLVisualParamHint::render() LLVisualParamReset::sDirty = TRUE; LLVOAvatar* avatarp = gAgent.getAvatarObject(); + gGL.pushUIMatrix(); + gGL.loadUIIdentity(); + glMatrixMode(GL_PROJECTION); - glPushMatrix(); + gGL.pushMatrix(); glLoadIdentity(); glOrtho(0.0f, mFullWidth, 0.0f, mFullHeight, -1.0f, 1.0f); glMatrixMode(GL_MODELVIEW); - glPushMatrix(); + gGL.pushMatrix(); glLoadIdentity(); LLGLSUIDefault gls_ui; @@ -181,10 +184,10 @@ BOOL LLVisualParamHint::render() mBackgroundp->draw(0, 0, mFullWidth, mFullHeight); glMatrixMode(GL_PROJECTION); - glPopMatrix(); + gGL.popMatrix(); glMatrixMode(GL_MODELVIEW); - glPopMatrix(); + gGL.popMatrix(); mNeedsUpdate = FALSE; mIsVisible = TRUE; @@ -247,6 +250,7 @@ BOOL LLVisualParamHint::render() mVisualParam->setWeight(mLastParamWeight, FALSE); gGL.color4f(1,1,1,1); mGLTexturep->setGLTextureCreated(true); + gGL.popUIMatrix(); return TRUE; } -- cgit v1.2.3 From b1099e21600c8d2c4584ef8f3696ddc5f42c936b Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Tue, 9 Feb 2010 17:19:26 -0800 Subject: fix for invalid param 'name' warnings --- indra/llui/llui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/llui.h b/indra/llui/llui.h index 5840e76f5c..af8d4ea03b 100644 --- a/indra/llui/llui.h +++ b/indra/llui/llui.h @@ -426,8 +426,8 @@ namespace LLInitParam { typedef BlockValue<const LLFontGL*> super_t; public: - Mandatory<std::string> name; - Optional<std::string> size, + Optional<std::string> name, + size, style; TypedParam(BlockDescriptor& descriptor, const char* name, const LLFontGL* const value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count); -- cgit v1.2.3 From 7c86d4434822d7a3172bed82c3812032089c1518 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Fri, 12 Feb 2010 17:08:10 -0800 Subject: potential fix for bad font names --- indra/llui/llui.cpp | 10 ++++++++-- indra/llui/lluiimage.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 76f07373b4..9d5953e380 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1894,7 +1894,9 @@ namespace LLInitParam blue("blue"), alpha("alpha"), control("") - {} + { + setBlockFromValue(); + } void TypedParam<LLUIColor>::setValueFromBlock() const { @@ -1940,6 +1942,7 @@ namespace LLInitParam style("style") { addSynonym(name, ""); + setBlockFromValue(); } void TypedParam<const LLFontGL*>::setValueFromBlock() const @@ -1979,7 +1982,9 @@ namespace LLInitParam bottom("bottom"), width("width"), height("height") - {} + { + setBlockFromValue(); + } void TypedParam<LLRect>::setValueFromBlock() const { @@ -2064,6 +2069,7 @@ namespace LLInitParam x("x"), y("y") { + setBlockFromValue(); } void TypedParam<LLCoordGL>::setValueFromBlock() const diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index bdfc44262d..4ea0738026 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -109,6 +109,7 @@ namespace LLInitParam TypedParam(BlockDescriptor& descriptor, const char* name, super_t::value_assignment_t value, ParamDescriptor::validation_func_t func, S32 min_count, S32 max_count) : super_t(descriptor, name, value, func, min_count, max_count) { + setBlockFromValue(); } void setValueFromBlock() const; -- cgit v1.2.3 From 98a0c11da9e1c7ee8351cb9ab6d9cd5345a4e002 Mon Sep 17 00:00:00 2001 From: angela <angela@lindenlab.com> Date: Mon, 22 Feb 2010 17:34:28 +0800 Subject: EXT-5410 Streaming audio does ignores preference setting. --- indra/newview/llpanelnearbymedia.cpp | 47 +++++++++++++++++----- indra/newview/llviewermedia.cpp | 14 +++++-- .../skins/default/xui/en/panel_nearby_media.xml | 2 + .../default/xui/en/panel_preferences_sound.xml | 2 +- 4 files changed, 50 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 8ad5389566..6d6edcc9ee 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -568,11 +568,20 @@ void LLPanelNearByMedia::refreshParcelItems() tooltip = name + " : " + url; } LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia(); + bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); + if(is_enabled) + { + mParcelMediaName = getString("parcel_media_name"); + } + else + { + mParcelMediaName = getString("parcel_media_name_disabled"); + } updateListItem(mParcelMediaItem, mParcelMediaName, tooltip, -2, // Proximity closer than anything else, before Parcel Audio - impl == NULL || impl->isMediaDisabled(), + impl == NULL || impl->isMediaDisabled() || (!is_enabled), impl != NULL && !LLViewerParcelMedia::getURL().empty(), impl != NULL && impl->isMediaTimeBased() && impl->isMediaPlaying(), MEDIA_CLASS_ALL, @@ -601,11 +610,20 @@ void LLPanelNearByMedia::refreshParcelItems() if (NULL != mParcelAudioItem) { bool is_playing = LLViewerMedia::isParcelAudioPlaying(); + bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMusic"); + if(is_enabled) + { + mParcelAudioName = getString("parcel_audio_name"); + } + else + { + mParcelAudioName = getString("parcel_audio_name_disabled"); + } updateListItem(mParcelAudioItem, mParcelAudioName, LLViewerMedia::getParcelAudioURL(), -1, // Proximity after Parcel Media, but closer than anything else - !is_playing, + (!is_playing) && is_enabled, is_playing, is_playing, MEDIA_CLASS_ALL, @@ -824,7 +842,10 @@ void LLPanelNearByMedia::onZoomMedia(void* user_data) void LLPanelNearByMedia::onClickParcelMediaPlay() { - LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); + if (gSavedSettings.getBOOL("AudioStreamingMedia")) + { + LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); + } } void LLPanelNearByMedia::onClickParcelMediaStop() @@ -844,14 +865,18 @@ void LLPanelNearByMedia::onClickParcelMediaPause() void LLPanelNearByMedia::onClickParcelAudioStart() { - // User *explicitly* started the internet stream, so keep the stream - // playing and updated as they cross to other parcels etc. - mParcelAudioAutoStart = true; - - if (!gAudiop) - return; + //only do this when it's audio streaming is enabled + if (gSavedSettings.getBOOL("AudioStreamingMusic")) + { + // User *explicitly* started the internet stream, so keep the stream + // playing and updated as they cross to other parcels etc. + mParcelAudioAutoStart = true; + + if (!gAudiop) + return; - gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); + gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); + } } void LLPanelNearByMedia::onClickParcelAudioPlay() @@ -1081,7 +1106,7 @@ void LLPanelNearByMedia::onClickSelectedMediaPlay() impl->play(); return; } - else if (impl->isParcelMedia()) + else if (NULL != impl && impl->isParcelMedia()) { LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 395467dffb..0d16a3c2cb 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -722,6 +722,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) std::vector<LLViewerMediaImpl*> proximity_order; bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); + bool inworld_audio_enabled = gSavedSettings.getBOOL("AudioStreamingMusic"); U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal"); U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal"); U32 max_low = gSavedSettings.getU32("PluginInstancesLow"); @@ -849,7 +850,14 @@ void LLViewerMedia::updateMedia(void *dummy_arg) new_priority = LLPluginClassMedia::PRIORITY_UNLOADED; } } - + // update the audio stream here as well + if(!inworld_audio_enabled) + { + if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) + { + gAudiop->stopInternetStream(); + } + } pimpl->setPriority(new_priority); if(pimpl->getUsedInUI()) @@ -939,12 +947,12 @@ void LLViewerMedia::setAllMediaEnabled(bool val) // Also do Parcel Media and Parcel Audio if (val) { - if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()) + if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()&& gSavedSettings.getBOOL("AudioStreamingMedia")) { LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) + if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()&& gSavedSettings.getBOOL("AudioStreamingMusic")) { gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); } 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 0f911f789e..f3dfd56fbe 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -14,7 +14,9 @@ <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_media_name_disabled">Parcel Streaming Media (Disabled)</string> <string name="parcel_audio_name">Parcel Streaming Audio</string> + <string name="parcel_audio_name_disabled">Parcel Streaming Audio (Disabled)</string> <string name="playing_suffix">(playing)</string> <panel bevel_style="in" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index c9752cf913..8fa7f75f6b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -17,7 +17,7 @@ increment="0.05" initial_value="0.5" label="Master volume" - label_width="120" + label_width="120" layout="topleft" left="0" name="System Volume" -- cgit v1.2.3 From 0eea585ef13426bf343fb5bcc3642cdfc769c022 Mon Sep 17 00:00:00 2001 From: angela <angela@lindenlab.com> Date: Tue, 23 Feb 2010 11:30:12 +0800 Subject: revert some changed from EXT-5410 but keep the changes for disabling streaming audio when music or media is disabled. reviewed by rick --- indra/newview/llpanelnearbymedia.cpp | 41 ++++++---------------- indra/newview/llviewermedia.cpp | 7 ++-- .../skins/default/xui/en/panel_nearby_media.xml | 2 -- .../default/xui/en/panel_preferences_sound.xml | 14 ++++---- 4 files changed, 20 insertions(+), 44 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 6d6edcc9ee..e1676d2299 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -568,20 +568,11 @@ void LLPanelNearByMedia::refreshParcelItems() tooltip = name + " : " + url; } LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia(); - bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMedia"); - if(is_enabled) - { - mParcelMediaName = getString("parcel_media_name"); - } - else - { - mParcelMediaName = getString("parcel_media_name_disabled"); - } updateListItem(mParcelMediaItem, mParcelMediaName, tooltip, -2, // Proximity closer than anything else, before Parcel Audio - impl == NULL || impl->isMediaDisabled() || (!is_enabled), + impl == NULL || impl->isMediaDisabled(), impl != NULL && !LLViewerParcelMedia::getURL().empty(), impl != NULL && impl->isMediaTimeBased() && impl->isMediaPlaying(), MEDIA_CLASS_ALL, @@ -610,20 +601,12 @@ void LLPanelNearByMedia::refreshParcelItems() if (NULL != mParcelAudioItem) { bool is_playing = LLViewerMedia::isParcelAudioPlaying(); - bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMusic"); - if(is_enabled) - { - mParcelAudioName = getString("parcel_audio_name"); - } - else - { - mParcelAudioName = getString("parcel_audio_name_disabled"); - } + updateListItem(mParcelAudioItem, mParcelAudioName, LLViewerMedia::getParcelAudioURL(), -1, // Proximity after Parcel Media, but closer than anything else - (!is_playing) && is_enabled, + (!is_playing), is_playing, is_playing, MEDIA_CLASS_ALL, @@ -865,18 +848,14 @@ void LLPanelNearByMedia::onClickParcelMediaPause() void LLPanelNearByMedia::onClickParcelAudioStart() { - //only do this when it's audio streaming is enabled - if (gSavedSettings.getBOOL("AudioStreamingMusic")) - { - // User *explicitly* started the internet stream, so keep the stream - // playing and updated as they cross to other parcels etc. - mParcelAudioAutoStart = true; + // User *explicitly* started the internet stream, so keep the stream + // playing and updated as they cross to other parcels etc. + mParcelAudioAutoStart = true; - if (!gAudiop) - return; - - gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); - } + if (!gAudiop) + return; + gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); + } void LLPanelNearByMedia::onClickParcelAudioPlay() diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0d16a3c2cb..f1ca56a8ae 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -851,7 +851,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg) } } // update the audio stream here as well - if(!inworld_audio_enabled) + if(!inworld_media_enabled || !inworld_audio_enabled) { if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) { @@ -947,12 +947,12 @@ void LLViewerMedia::setAllMediaEnabled(bool val) // Also do Parcel Media and Parcel Audio if (val) { - if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()&& gSavedSettings.getBOOL("AudioStreamingMedia")) + if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()) { LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()&& gSavedSettings.getBOOL("AudioStreamingMusic")) + if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) { gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); } @@ -980,7 +980,6 @@ bool LLViewerMedia::isParcelAudioPlaying() bool LLViewerMedia::hasInWorldMedia() { - if (! gSavedSettings.getBOOL("AudioStreamingMedia")) return false; if (sInWorldMediaDisabled) return false; impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); 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 f3dfd56fbe..0f911f789e 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -14,9 +14,7 @@ <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_media_name_disabled">Parcel Streaming Media (Disabled)</string> <string name="parcel_audio_name">Parcel Streaming Audio</string> - <string name="parcel_audio_name_disabled">Parcel Streaming Audio (Disabled)</string> <string name="playing_suffix">(playing)</string> <panel bevel_style="in" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 8fa7f75f6b..a7cdd241c5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -38,7 +38,7 @@ image_unselected="Audio_Off" is_toggle="true" layout="topleft" - left_pad="5" + left_pad="5" name="mute_audio" tab_stop="false" width="16" /> @@ -49,7 +49,7 @@ label="Mute when minimized" layout="topleft" name="mute_when_minimized" - top_delta="3" + top_delta="3" left_pad="5" width="215" /> <slider @@ -177,14 +177,14 @@ </slider> <button control_name="MuteMusic" - disabled_control="MuteAudio" + disabled_control="MuteAudio" follows="top|left" height="16" image_selected="AudioMute_Off" image_unselected="Audio_Off" is_toggle="true" layout="topleft" - left_pad="5" + left_pad="5" name="mute_audio" tab_stop="false" width="16" /> @@ -326,8 +326,8 @@ length="1" follows="left|top" layout="topleft" - left="80" - top_delta="16" + left="80" + top_delta="16" name="Listen from" width="80"> Listen from: @@ -521,7 +521,7 @@ visible="true" width="22" /> <text - font.style="BOLD" + font.style="BOLD" type="string" length="1" follows="left|top" -- cgit v1.2.3 From 43a9699de16c85d1c1a599fbe14512fbb6cbada1 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Tue, 23 Feb 2010 13:11:38 +0000 Subject: slightly reduce the overhead of 'EXT-5601: Linux: volume adjustment of web-based media / Flash' --- indra/media_plugins/webkit/linux_volume_catcher.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/media_plugins/webkit/linux_volume_catcher.cpp b/indra/media_plugins/webkit/linux_volume_catcher.cpp index 2ba28bd4bf..52ab766f7f 100644 --- a/indra/media_plugins/webkit/linux_volume_catcher.cpp +++ b/indra/media_plugins/webkit/linux_volume_catcher.cpp @@ -398,7 +398,8 @@ void callback_subscription_alert(pa_context *context, pa_subscription_event_type impl->mSinkInputIndices.erase(index); impl->mSinkInputNumChannels.erase(index); } - else + else if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == + PA_SUBSCRIPTION_EVENT_NEW) { // ask for more info about this new sinkinput pa_operation *op; @@ -407,6 +408,10 @@ void callback_subscription_alert(pa_context *context, pa_subscription_event_type llpa_operation_unref(op); } } + else + { + // property change on this sinkinput - we don't care. + } break; default:; -- cgit v1.2.3 From 902c415595387f361db81d61589e56e5404172ae Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Tue, 23 Feb 2010 18:49:06 +0000 Subject: gah, more dos line-endings in PE diffs. --- indra/llui/llscrolllistctrl.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'indra') diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index bfff85315d..1983891649 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -74,31 +74,31 @@ public: // *TODO: Add callbacks to Params typedef boost::function<void (void)> callback_t; - template<typename T> struct maximum - { - typedef T result_type; - - template<typename InputIterator> - T operator()(InputIterator first, InputIterator last) const - { - // If there are no slots to call, just return the - // default-constructed value - if(first == last ) return T(); - T max_value = *first++; - while (first != last) { - if (max_value < *first) - max_value = *first; - ++first; - } - - return max_value; - } - }; + template<typename T> struct maximum + { + typedef T result_type; + + template<typename InputIterator> + T operator()(InputIterator first, InputIterator last) const + { + // If there are no slots to call, just return the + // default-constructed value + if(first == last ) return T(); + T max_value = *first++; + while (first != last) { + if (max_value < *first) + max_value = *first; + ++first; + } + + return max_value; + } + }; //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*)> sort_signal_t; - typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; + typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32> > sort_signal_t; struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { -- cgit v1.2.3 From 3ce1d98046289f416b95b6c63b8e2560527358f0 Mon Sep 17 00:00:00 2001 From: Richard Linden <none@none> Date: Tue, 23 Feb 2010 14:07:31 -0800 Subject: EXT-5451 - HUD attachment points offset, when extending the right UI panel reviewed by Callum --- indra/newview/llvoavatarself.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 00998b300a..4347dec805 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -211,6 +211,8 @@ BOOL LLVOAvatarSelf::buildSkeletonSelf(const LLVOAvatarSkeletonInfo *info) LLVector3 scale(1.f, aspect, 1.f); mScreenp->setScale(scale); mScreenp->setWorldPosition(LLVector3::zero); + // need to update screen agressively when sidebar opens/closes, for example + mScreenp->mUpdateXform = TRUE; return TRUE; } -- cgit v1.2.3 From 64d97be34c0df9d771bf021c8282b61743445e19 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Tue, 23 Feb 2010 15:28:36 -0800 Subject: DEV-46346 A few missing strings from cycle3 for JA FR. This didn't make the 2/23 public beta cut. --- indra/newview/skins/default/xui/fr/menu_viewer.xml | 17 ++++++++++------- indra/newview/skins/default/xui/ja/menu_viewer.xml | 21 ++++++++++++--------- 2 files changed, 22 insertions(+), 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/fr/menu_viewer.xml b/indra/newview/skins/default/xui/fr/menu_viewer.xml index 21f39682ba..1b360b3007 100644 --- a/indra/newview/skins/default/xui/fr/menu_viewer.xml +++ b/indra/newview/skins/default/xui/fr/menu_viewer.xml @@ -9,8 +9,8 @@ <menu_item_call label="Mon profil" name="Profile"/> <menu_item_call label="Mon apparence" name="Appearance"/> <menu_item_check label="Mon inventaire" name="Inventory"/> - <menu_item_call label="Mon inventaire" name="ShowSidetrayInventory"/> - <menu_item_call label="Mes gestes" name="Gestures"/> + <menu_item_check label="Mon inventaire" name="ShowSidetrayInventory"/> + <menu_item_check label="Mes gestes" name="Gestures"/> <menu label="Mon statut" name="Status"> <menu_item_call label="Absent" name="Set Away"/> <menu_item_call label="Occupé" name="Set Busy"/> @@ -24,7 +24,6 @@ <menu_item_call label="Mes groupes" name="My Groups"/> <menu_item_check label="Chat près de vous" name="Nearby Chat"/> <menu_item_call label="Personnes près de vous" name="Active Speakers"/> - <menu_item_check label="Média près de vous" name="Nearby Media"/> </menu> <menu label="Monde" name="World"> <menu_item_check label="Mini-carte" name="Mini-Map"/> @@ -39,7 +38,11 @@ <menu_item_call label="Mes terrains" name="My Land"/> <menu label="Afficher" name="LandShow"> <menu_item_check label="Contrôles de mouvement" name="Movement Controls"/> - <menu_item_check label="Contrôles d'affichage" name="Camera Controls"/> + <menu_item_check label="Contrôles d’affichage" name="Camera Controls"/> + <menu_item_check label="Lignes d'interdiction" name="Ban Lines"/> + <menu_item_check label="Balises" name="beacons"/> + <menu_item_check label="Limites du terrain" name="Property Lines"/> + <menu_item_check label="Propriétaires de terrains" name="Land Owners"/> </menu> <menu_item_call label="Me téléporter chez moi" name="Teleport Home"/> <menu_item_call label="Définir le domicile ici" name="Set Home to Here"/> @@ -100,7 +103,7 @@ <menu_item_check label="Afficher le rayon lumineux pour la sélection" name="Show Light Radius for Selection"/> <menu_item_check label="Afficher le faisceau de sélection lumineux" name="Show Selection Beam"/> <menu_item_check label="Fixer sur la grille" name="Snap to Grid"/> - <menu_item_call label="Fixer les coordonnées XY de l’objet sur la grille" name="Snap Object XY to Grid"/> + <menu_item_call label="Fixer les coordonnées XY de l'objet sur la grille" name="Snap Object XY to Grid"/> <menu_item_call label="Utiliser la sélection pour la grille" name="Use Selection for Grid"/> <menu_item_call label="Options de la grille" name="Grid Options"/> </menu> @@ -121,7 +124,7 @@ <menu_item_call label="Arrêter mon animation" name="Stop Animating My Avatar"/> <menu_item_call label="Refixer les textures" name="Rebake Texture"/> <menu_item_call label="Taille de l'interface par défaut" name="Set UI Size to Default"/> - <menu_item_call label="Définir la taille de la fenêtre..." name="Set Window Size..."/> + <menu_item_call label="Définir la taille de la fenêtre…" name="Set Window Size..."/> <menu_item_check label="Limiter la distance de sélection" name="Limit Select Distance"/> <menu_item_check label="Désactiver les contraintes de la caméra" name="Disable Camera Distance"/> <menu_item_check label="Photo haute résolution" name="HighResSnapshot"/> @@ -170,7 +173,7 @@ <menu_item_call label="Effacer le cache du groupe" name="ClearGroupCache"/> <menu_item_check label="Effet de lissage de la souris" name="Mouse Smoothing"/> <menu label="Raccourcis" name="Shortcuts"> - <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/> + <menu_item_call label="Image ([COST] L$)..." name="Upload Image"/> <menu_item_check label="Rechercher" name="Search"/> <menu_item_call label="Relâcher les touches" name="Release Keys"/> <menu_item_call label="Taille de l'interface par défaut" name="Set UI Size to Default"/> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index 85fb23d5b7..ff5f68c867 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -9,8 +9,8 @@ <menu_item_call label="マイ プロフィール" name="Profile"/> <menu_item_call label="マイ 容姿" name="Appearance"/> <menu_item_check label="マイ 持ち物" name="Inventory"/> - <menu_item_call label="持ち物をサイドトレイに表示" name="ShowSidetrayInventory"/> - <menu_item_call label="マイ ジェスチャー" name="Gestures"/> + <menu_item_check label="持ち物" name="ShowSidetrayInventory"/> + <menu_item_check label="マイ ジェスチャー" name="Gestures"/> <menu label="マイ ログイン状態" name="Status"> <menu_item_call label="一時退席中" name="Set Away"/> <menu_item_call label="取り込み中" name="Set Busy"/> @@ -24,7 +24,6 @@ <menu_item_call label="所属グループ" name="My Groups"/> <menu_item_check label="近くのチャット" name="Nearby Chat"/> <menu_item_call label="近くにいる人" name="Active Speakers"/> - <menu_item_check label="近くのメディア" name="Nearby Media"/> </menu> <menu label="世界" name="World"> <menu_item_check label="ミニマップ" name="Mini-Map"/> @@ -40,6 +39,10 @@ <menu label="表示" name="LandShow"> <menu_item_check label="移動コントロール" name="Movement Controls"/> <menu_item_check label="コントロールを表示" name="Camera Controls"/> + <menu_item_check label="立入禁止ライン" name="Ban Lines"/> + <menu_item_check label="ビーコン(標識)" name="beacons"/> + <menu_item_check label="プロパティ境界線" name="Property Lines"/> + <menu_item_check label="土地所有者" name="Land Owners"/> </menu> <menu_item_call label="ホームにテレポート" name="Teleport Home"/> <menu_item_call label="現在地をホームに設定" name="Set Home to Here"/> @@ -95,12 +98,12 @@ <menu_item_check label="権限の詳細を表示" name="DebugPermissions"/> <menu_item_check label="私のオブジェクトだけを選択" name="Select Only My Objects"/> <menu_item_check label="動的オブジェクトのみ選択" name="Select Only Movable Objects"/> - <menu_item_check label="環境で選択" name="Select By Surrounding"/> - <menu_item_check label="非表示の選択を表示" name="Show Hidden Selection"/> + <menu_item_check label="範囲内を選択" name="Select By Surrounding"/> + <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/> <menu_item_check label="選択した光の半径範囲を表示" name="Show Light Radius for Selection"/> - <menu_item_check label="選択したビームを表示" name="Show Selection Beam"/> + <menu_item_check label="選択ビームを表示" name="Show Selection Beam"/> <menu_item_check label="グリッドポイントにスナップ" name="Snap to Grid"/> - <menu_item_call label="オブジェクトのXY軸をグリッドにスナップ" name="Snap Object XY to Grid"/> + <menu_item_call label="オブジェクトの XY 軸をグリッドにスナップ" name="Snap Object XY to Grid"/> <menu_item_call label="選択をグリッドに使用" name="Use Selection for Grid"/> <menu_item_call label="グリッドオプション" name="Grid Options"/> </menu> @@ -121,7 +124,7 @@ <menu_item_call label="私のアニメーションを停止する" name="Stop Animating My Avatar"/> <menu_item_call label="テクスチャのリベーク" name="Rebake Texture"/> <menu_item_call label="UI のサイズをデフォルトに設定する" name="Set UI Size to Default"/> - <menu_item_call label="ウィンドウのサイズの設定:" name="Set Window Size..."/> + <menu_item_call label="ウィンドウのサイズを設定..." name="Set Window Size..."/> <menu_item_check label="遠くのオブジェクトを選択しない" name="Limit Select Distance"/> <menu_item_check label="カメラの距離移動を制限しない" name="Disable Camera Distance"/> <menu_item_check label="高解像度スナップショット" name="HighResSnapshot"/> @@ -353,7 +356,7 @@ <menu_item_call label="アバターテクスチャをデバッグ" name="Debug Avatar Textures"/> <menu_item_call label="ローカルテクスチャをダンプ" name="Dump Local Textures"/> </menu> - <menu_item_check label="HTTP Texture" name="HTTP Textures"/> + <menu_item_check label="HTTP テクスチャ" name="HTTP Textures"/> <menu_item_call label="圧縮画像" name="Compress Images"/> <menu_item_check label="Output Debug Minidump" name="Output Debug Minidump"/> <menu_item_check label="次回の起動時にコンソールウィンドウを表示" name="Console Window"/> -- cgit v1.2.3 From 89c38f1f08b39bc07520624c5dd4f86f32b56091 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Tue, 23 Feb 2010 15:55:52 -0800 Subject: EXT-5575 DE linguistic fix --- indra/newview/skins/default/xui/de/floater_beacons.xml | 2 +- indra/newview/skins/default/xui/de/floater_god_tools.xml | 4 ++-- indra/newview/skins/default/xui/de/floater_report_abuse.xml | 2 +- indra/newview/skins/default/xui/de/floater_sell_land.xml | 4 ++-- indra/newview/skins/default/xui/de/floater_telehub.xml | 2 +- indra/newview/skins/default/xui/de/floater_texture_ctrl.xml | 2 +- indra/newview/skins/default/xui/de/floater_tools.xml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/de/floater_beacons.xml b/indra/newview/skins/default/xui/de/floater_beacons.xml index 50a4555ae0..6e83e0419b 100644 --- a/indra/newview/skins/default/xui/de/floater_beacons.xml +++ b/indra/newview/skins/default/xui/de/floater_beacons.xml @@ -5,7 +5,7 @@ Anzeigen: </text> <check_box label="Strahlen" name="beacons"/> - <check_box label="Glanzlichter" name="highlights"/> + <check_box label="Hervorhebung" name="highlights"/> <text name="beacon_width_label" tool_tip="Strahlbreite"> Breite: </text> diff --git a/indra/newview/skins/default/xui/de/floater_god_tools.xml b/indra/newview/skins/default/xui/de/floater_god_tools.xml index 30b151ca58..2bb123ad51 100644 --- a/indra/newview/skins/default/xui/de/floater_god_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_god_tools.xml @@ -7,7 +7,7 @@ </panel> <panel label="Region" name="region"> <text name="Sim Name:" width="55"> - Sim-Name: + Sim: </text> <check_box label="Startbereich Einleitung" name="check prelude" tool_tip="Diese Region zu einem Startbereich machen."/> <check_box label="Sonne fest" name="check fixed sun" tool_tip="Fixiert den Sonnenstand (wie in „Region/Grundstück“ > „Terrain“."/> @@ -41,7 +41,7 @@ Abrechnungsfaktor: </text> <text name="land cost text"> - L$ pro qm: + L$ pro m²: </text> <button label="Aktualisieren" label_selected="Aktualisieren" name="Refresh" tool_tip="Klicken Sie hier, um die obigen Informationen zu aktualisieren."/> <button label="Übernehmen" label_selected="Übernehmen" name="Apply" tool_tip="Klicken Sie hier, um die obigen Änderungen zu übernehmen."/> diff --git a/indra/newview/skins/default/xui/de/floater_report_abuse.xml b/indra/newview/skins/default/xui/de/floater_report_abuse.xml index 02be3b3ed9..49e6d031d6 100644 --- a/indra/newview/skins/default/xui/de/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/de/floater_report_abuse.xml @@ -23,7 +23,7 @@ {128.1, 128.1, 15.4} </text> <text bottom_delta="-38" height="32" name="select_object_label"> - Klicken Sie auf die Schaltfläche, dann auf das entsprechende + Klicken Sie die Schaltfläche, dann das entsprechende Objekt: </text> <button label="" label_selected="" name="pick_btn" tool_tip="Objektauswahl – Wählen Sie ein Objekt als Thema dieses Berichts aus"/> diff --git a/indra/newview/skins/default/xui/de/floater_sell_land.xml b/indra/newview/skins/default/xui/de/floater_sell_land.xml index 09eae40477..8f67fae464 100644 --- a/indra/newview/skins/default/xui/de/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/de/floater_sell_land.xml @@ -21,7 +21,7 @@ 1. Preis festlegen: </text> <text name="price_text" > - Prei angeben + Preis eingeben </text> <text name="price_ld"> L$ @@ -58,7 +58,7 @@ <text name="nag_message_label"> ACHTUNG: Verkäufe sind endgültig. </text> - <button label="Land zum Verkauf freigeben" name="sell_btn" width="180"/> + <button label="Zum Verkauf freigeben" name="sell_btn" width="180"/> <button label="Abbrechen" name="cancel_btn"/> </panel> </scroll_container> diff --git a/indra/newview/skins/default/xui/de/floater_telehub.xml b/indra/newview/skins/default/xui/de/floater_telehub.xml index 4d3c96bc87..83d37b2ce4 100644 --- a/indra/newview/skins/default/xui/de/floater_telehub.xml +++ b/indra/newview/skins/default/xui/de/floater_telehub.xml @@ -21,7 +21,7 @@ <button label="Spawn hinzufügen" name="add_spawn_point_btn"/> <button label="Spawn entfernen" name="remove_spawn_point_btn"/> <text name="spawn_point_help"> - Wählen Sie ein Objekt und klicken zur Positionsangabe auf Spawn hinzufügen. + Wählen Sie ein Objekt und klicken Sie zur Positionsangabe auf Spawn hinzufügen. Anschließend können Sie das Objekt verschieben oder löschen. Positionsangaben sind relativ zum Telehub-Mittelpunkt. Wählen Sie ein Objekt aus der Liste aus, um dieses inworld zu markieren. diff --git a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml index 4e2d8a9274..d20ab8d1c3 100644 --- a/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml +++ b/indra/newview/skins/default/xui/de/floater_texture_ctrl.xml @@ -4,7 +4,7 @@ Zum Auswählen eines Bildes hier klicken </string> <text name="Multiple"> - Mehrer Texturen + Mehrere Texturen </text> <text name="unknown"> Größe: [DIMENSIONS] diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index b5c02cce0b..34f97af04f 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -64,7 +64,7 @@ <radio_item label="Fläche auswählen" name="radio select face"/> </radio_group> <check_box label="Verknüpfte Teile bearbeiten" name="checkbox edit linked parts"/> - <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für diesen Objekt"> + <text name="RenderingCost" tool_tip="Zeigt die errechneten Wiedergabekosten für dieses Objekt"> þ: [COUNT] </text> <check_box label="Beide Seiten dehnen" name="checkbox uniform"/> -- cgit v1.2.3 From 8a6e78ea29860ca549ce46b13fb719ab99cf1f7d Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Tue, 23 Feb 2010 17:29:34 -0800 Subject: DEV-46346 Cycle5 JA change --- .../skins/default/xui/ja/floater_about_land.xml | 44 +++++++++++----------- .../skins/default/xui/ja/floater_buy_contents.xml | 12 +++--- .../skins/default/xui/ja/floater_buy_object.xml | 8 ++-- .../skins/default/xui/ja/floater_customize.xml | 14 +++---- indra/newview/skins/default/xui/ja/floater_pay.xml | 2 +- .../newview/skins/default/xui/ja/floater_tools.xml | 2 +- .../skins/default/xui/ja/menu_inventory.xml | 10 ++--- indra/newview/skins/default/xui/ja/menu_viewer.xml | 30 +++++++-------- 8 files changed, 61 insertions(+), 61 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index d57a81c770..f363c2d85d 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -73,7 +73,7 @@ Adult </text> <text name="Owner:"> - オーナー: + 所有者: </text> <text name="OwnerText"> Leyla Linden @@ -86,8 +86,8 @@ </text> <button label="設定" label_selected="設定..." name="Set..."/> <check_box label="グループへの譲渡を許可" name="check deed" tool_tip="グループのオフィサーはこの土地をグループに譲渡できます。そうするとグループの土地割り当てによってサポートされます。"/> - <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択されたグループのオフィサーであるときのみ、土地を譲渡できます。"/> - <check_box label="オーナーが譲渡と共に寄付" name="check contrib" tool_tip="土地がグループに譲渡されるとき、前の所有者は譲渡が成立するよう、十分な土地を寄付します。"/> + <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択したグループのオフィサーであるときのみ、土地を譲渡できます。"/> + <check_box label="所有者が譲渡と共に寄付" name="check contrib" tool_tip="土地がグループに譲渡されるとき、前の所有者は譲渡が成立するよう、十分な土地を寄付します。"/> <text name="For Sale:"> 販売の有無: </text> @@ -136,16 +136,16 @@ </panel> <panel label="約款" name="land_covenant_panel"> <panel.string name="can_resell"> - この地域で購入した土地は、再販できます。 + このリージョン(地域)で購入した土地は、再販できます。 </panel.string> <panel.string name="can_not_resell"> - この地域で購入した土地は、再販できないことがあります。 + このリージョン(地域)で購入した土地は、再販できないことがあります。 </panel.string> <panel.string name="can_change"> - この地域で購入した土地は、統合または再分割できます。 + このリージョン(地域)で購入した土地は、統合または再分割できます。 </panel.string> <panel.string name="can_not_change"> - この地域で購入した土地は、統合/再分割できないことが + このリージョン(地域)で購入した土地は、統合・再分割できないことがあります。 あります。 </panel.string> <text font="SansSerifLarge" name="estate_section_lbl"> @@ -194,7 +194,7 @@ 再分割: </text> <text name="changeable_clause"> - この地域(リージョン)にある土地は統合または分割ができ + このリージョン(地域)にある土地は統合または分割ができないことがあります。 ません。 </text> </panel> @@ -233,7 +233,7 @@ [COUNT] </text> <button label="表示" label_selected="表示" name="ShowOwner" right="-145"/> - <button label="返却" label_selected="返却..." name="ReturnOwner..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/> + <button label="返却" label_selected="返却..." name="ReturnOwner..." right="-15" tool_tip="オブジェクトを所有者に返却します"/> <text name="Set to group:"> グループに設定: </text> @@ -241,7 +241,7 @@ [COUNT] </text> <button label="表示" label_selected="表示" name="ShowGroup" right="-145"/> - <button label="返却" label_selected="返却..." name="ReturnGroup..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/> + <button label="返却" label_selected="返却..." name="ReturnGroup..." right="-15" tool_tip="オブジェクトを所有者に返却します"/> <text name="Owned by others:"> 他人の所有物: </text> @@ -249,7 +249,7 @@ [COUNT] </text> <button label="表示" label_selected="表示" name="ShowOther" right="-145"/> - <button label="返却" label_selected="返却..." name="ReturnOther..." right="-15" tool_tip="オブジェクトをオーナーに返却します"/> + <button label="返却" label_selected="返却..." name="ReturnOther..." right="-15" tool_tip="オブジェクトを所有者に返却します"/> <text name="Selected / sat upon:"> 選択済み・決定済み: </text> @@ -269,7 +269,7 @@ <name_list.columns label="タイプ" name="type"/> <name_list.columns name="online_status"/> <name_list.columns label="名前" name="name"/> - <name_list.columns label="カウント" name="count"/> + <name_list.columns label="数" name="count"/> <name_list.columns label="最新" name="mostrecent"/> </name_list> </panel> @@ -288,13 +288,13 @@ 控えめコンテンツ </panel.string> <panel.string name="mature_check_adult"> - Adultコンテンツ + アダルトコンテンツ </panel.string> <panel.string name="mature_check_mature_tooltip"> - あなたの区画情報及びコンテンツは控えめとされています。 + あなたの区画情報及びコンテンツは「控えめ」とされています。 </panel.string> <panel.string name="mature_check_adult_tooltip"> - あなたの区画情報及びコンテンツはAdultとされています。 + あなたの区画情報及びコンテンツは「アダルト」とされています。 </panel.string> <panel.string name="landing_point_none"> (なし) @@ -303,7 +303,7 @@ プッシングを制限 </panel.string> <panel.string name="push_restrict_region_text"> - プッシングを制限 (地域優先) + プッシングを制限 (地域設定優先) </panel.string> <text name="allow_label"> 他の住人への許可: @@ -383,7 +383,7 @@ <text name="with media:"> 種類: </text> - <combo_box name="media type" tool_tip="URL が動画、Webページ、その他のメディアの場合に指定します"/> + <combo_box name="media type" tool_tip="URL が動画、Web ページ、その他のメディアかを指定します"/> <text name="at URL:"> ホームページ: </text> @@ -391,7 +391,7 @@ <text name="CurrentURL:"> 現在のページ: </text> - <button label="リセット..." label_selected="リセット..." name="reset_media_url" tool_tip="URLを更新"/> + <button label="リセット..." label_selected="リセット..." name="reset_media_url" tool_tip="URL を更新"/> <check_box label="URL を非表示" name="hide_media_url" tool_tip="このオプションをオンにすると、許可なしでこの区画情報にアクセスしているユーザーにはメディア URL が表示されません。 これは HTML タイプには使用できませんのでご注意ください。"/> <text name="Description:"> 説明: @@ -404,12 +404,12 @@ <text name="replace_texture_help" width="290"> このテクスチャを使用するオブジェクトの「再生」をクリックすると、動画や Web ページを表示します。 テクスチャを変更するにはサムネイルを選択してください。 </text> - <check_box label="スケールを自動設定" name="media_auto_scale" tool_tip="このオプションをチェックすると、この区画のコンテンツのスケールが自動的に設定されます。 動作速度と画質が少し低下することがありますが、他のテクスチャーのスケーリングや整列が必要になることはありません。"/> - <text name="media_size" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。"> + <check_box label="スケールを自動設定" name="media_auto_scale" tool_tip="このオプションをチェックすると、この区画のコンテンツのスケールが自動的に設定されます。 動作速度と画質が少し低下することがありますが、他のテクスチャのスケーリングや整列が必要になることはありません。"/> + <text name="media_size" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。"> サイズ: </text> - <spinner name="media_size_width" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。"/> - <spinner name="media_size_height" tool_tip="レンダリングするWebメディアのサイズです。デフォルトの 0 のままにします。"/> + <spinner name="media_size_width" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。"/> + <spinner name="media_size_height" tool_tip="レンダリングする Web メディアのサイズです。デフォルトの 0 のままにします。"/> <text name="pixels"> ピクセル </text> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml index 69d4faf5b8..eda71c3575 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater min_width="340" name="floater_buy_contents" title="中身の購入" width="340"> <text name="contains_text" width="320"> - [NAME]の中身: + [NAME] の中身: </text> <scroll_list name="item_list" width="310"/> <text name="buy_text" width="320"> - 中身を[NAME]からL$[AMOUNT]で購入しますか? + 中身を[NAME] から L$[AMOUNT] で購入しますか? </text> <button label="取り消し" label_selected="取り消し" name="cancel_btn" width="73"/> <button label="購入" label_selected="購入" left_delta="-77" name="buy_btn" width="73"/> - <check_box label="今すぐ服を着る" left_delta="-125" name="wear_check"/> + <check_box label="今すぐ着る" left_delta="-125" name="wear_check"/> <text name="no_copy_text"> - (コピー不可) + (コピー不可) </text> <text name="no_modify_text"> - (修正不可) + (修正不可) </text> <text name="no_transfer_text"> - (再販・プレゼント不可) + (再販・プレゼント不可) </text> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_object.xml b/indra/newview/skins/default/xui/ja/floater_buy_object.xml index 7a5b7dc140..ddec8c2e69 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_object.xml @@ -4,7 +4,7 @@ 中身: </text> <text name="buy_text"> - [NAME]からL$[AMOUNT]で購入しますか? + [NAME]から L$[AMOUNT] で購入しますか? </text> <button label="取消" label_selected="取消" name="cancel_btn"/> <button label="購入" label_selected="購入" name="buy_btn"/> @@ -15,12 +15,12 @@ 次のものを購入 </string> <text name="no_copy_text"> - (コピー不可) + (コピー不可) </text> <text name="no_modify_text"> - (修正不可) + (修正不可) </text> <text name="no_transfer_text"> - (再販・プレゼント不可) + (再販・プレゼント不可) </text> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_customize.xml b/indra/newview/skins/default/xui/ja/floater_customize.xml index 4d8b91ff99..bd8535353d 100644 --- a/indra/newview/skins/default/xui/ja/floater_customize.xml +++ b/indra/newview/skins/default/xui/ja/floater_customize.xml @@ -35,7 +35,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しいシェイプをつけます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しいシェイプをつけます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <text name="no modify instructions"> あなたはこの服の修正を許されていません。 @@ -68,7 +68,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しいスキンをつけます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しいスキンをつけます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <text name="no modify instructions"> あなたはこの服の修正を許されていません。 @@ -105,7 +105,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しい髪をつけます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しい髪をつけます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <text name="no modify instructions"> あなたはこの服の修正を許されていません。 @@ -113,7 +113,7 @@ <text name="Item Action Label"> 髪型: </text> - <texture_picker label="テクスチャー" name="Texture" tool_tip="写真をクリックして選択"/> + <texture_picker label="テクスチャ" name="Texture" tool_tip="写真をクリックして選択"/> <button label="新しい髪を作成" label_selected="新しい髪を作成" name="Create New"/> <button label="保存" label_selected="保存" name="Save"/> <button label="別名で保存..." label_selected="別名で保存..." name="Save As"/> @@ -177,7 +177,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しいシャツを着ます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しいシャツを着ます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <text name="no modify instructions"> あなたはこの服の修正を許されていません。 @@ -302,7 +302,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しいジャケットを着ます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しいジャケットを着ます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <button label="新しい上着を作成" label_selected="新しい上着を作成" name="Create New"/> <text name="no modify instructions"> @@ -435,7 +435,7 @@ [PATH] に所在 </text> <text name="not worn instructions"> - 持ち物からあなたのアバターに1つドラッグして、新しいスカートを履きます。 代わりに、はじめから新しく作成して着用することもできます。 + 持ち物からあなたのアバターに 1 つドラッグして、新しいスカートを履きます。 代わりに、はじめから新しく作成して着用することもできます。 </text> <button label="スカートを作成" label_selected="スカートを作成" name="Create New"/> <text name="no modify instructions"> diff --git a/indra/newview/skins/default/xui/ja/floater_pay.xml b/indra/newview/skins/default/xui/ja/floater_pay.xml index 4564354899..aa67c78aea 100644 --- a/indra/newview/skins/default/xui/ja/floater_pay.xml +++ b/indra/newview/skins/default/xui/ja/floater_pay.xml @@ -7,7 +7,7 @@ 住人に支払う </string> <text name="payee_label"> - 支払い: + 支払う: </text> <icon name="icon_person" tool_tip="住人"/> <text name="payee_name"> diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index 24bb5b614c..e154f5af83 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -386,7 +386,7 @@ <panel.string name="string repeats per face"> 面ごとに繰り返す </panel.string> - <texture_picker label="テクスチャー" name="texture control" tool_tip="写真をクリックして選択"/> + <texture_picker label="テクスチャ" name="texture control" tool_tip="写真をクリックして選択"/> <color_swatch label="色" name="colorswatch" tool_tip="クリックしてカラーピッカーを開きます"/> <text name="color trans"> 透過度 % diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml index a2dbc34270..17b059c5d6 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml @@ -6,8 +6,8 @@ <menu_item_call label="プロパティ" name="Task Properties"/> <menu_item_call label="名前の変更" name="Task Rename"/> <menu_item_call label="削除" name="Task Remove"/> - <menu_item_call label="ゴミ箱を空にする" name="Empty Trash"/> - <menu_item_call label="遺失物フォルダを空にする" name="Empty Lost And Found"/> + <menu_item_call label="ごみ箱を空にする" name="Empty Trash"/> + <menu_item_call label="紛失物フォルダを空にする" name="Empty Lost And Found"/> <menu_item_call label="新しいフォルダ" name="New Folder"/> <menu_item_call label="新しいスクリプト" name="New Script"/> <menu_item_call label="新しいノートカード" name="New Note"/> @@ -55,7 +55,7 @@ <menu_item_call label="開く" name="Open"/> <menu_item_call label="プロパティ" name="Properties"/> <menu_item_call label="名前の変更" name="Rename"/> - <menu_item_call label="UUIDをコピー" name="Copy Asset UUID"/> + <menu_item_call label="UUID をコピー" name="Copy Asset UUID"/> <menu_item_call label="コピー" name="Copy"/> <menu_item_call label="貼り付け" name="Paste"/> <menu_item_call label="リンクの貼り付け" name="Paste As Link"/> @@ -69,14 +69,14 @@ <menu_item_call label="ローカル再生" name="Animation Audition"/> <menu_item_call label="インスタントメッセージを送信" name="Send Instant Message"/> <menu_item_call label="テレポートを送る..." name="Offer Teleport..."/> - <menu_item_call label="会議チャット開始" name="Conference Chat"/> + <menu_item_call label="コンファレンスチャットを開始" name="Conference Chat"/> <menu_item_call label="アクティブ" name="Activate"/> <menu_item_call label="非アクティブ" name="Deactivate"/> <menu_item_call label="別名で保存" name="Save As"/> <menu_item_call label="自分から取り外す" name="Detach From Yourself"/> <menu_item_call label="装着" name="Object Wear"/> <menu label="装着先" name="Attach To"/> - <menu label="HUD装着先" name="Attach To HUD"/> + <menu label="HUD 装着先" name="Attach To HUD"/> <menu_item_call label="編集" name="Wearable Edit"/> <menu_item_call label="装着" name="Wearable Wear"/> <menu_item_call label="取り外す" name="Take Off"/> diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index ff5f68c867..a9af96ab0c 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -61,7 +61,7 @@ <menu_item_call label="フォーカスツール" name="Focus"/> <menu_item_call label="移動ツール" name="Move"/> <menu_item_call label="編集ツール" name="Edit"/> - <menu_item_call label="クリエーションツール" name="Create"/> + <menu_item_call label="作成ツール" name="Create"/> <menu_item_call label="土地ツール" name="Land"/> </menu> <menu label="編集" name="Edit"> @@ -97,7 +97,7 @@ <menu_item_call label="デフォルトのアップロード権限を設定" name="perm prefs"/> <menu_item_check label="権限の詳細を表示" name="DebugPermissions"/> <menu_item_check label="私のオブジェクトだけを選択" name="Select Only My Objects"/> - <menu_item_check label="動的オブジェクトのみ選択" name="Select Only Movable Objects"/> + <menu_item_check label="動的オブジェクトだけを選択" name="Select Only Movable Objects"/> <menu_item_check label="範囲内を選択" name="Select By Surrounding"/> <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/> <menu_item_check label="選択した光の半径範囲を表示" name="Show Light Radius for Selection"/> @@ -108,10 +108,10 @@ <menu_item_call label="グリッドオプション" name="Grid Options"/> </menu> <menu label="リンクした部分を選択" name="Select Linked Parts"> - <menu_item_call label="次の部位を選択" name="Select Next Part"/> - <menu_item_call label="前回の部位を選択" name="Select Previous Part"/> - <menu_item_call label="次の部位を含める" name="Include Next Part"/> - <menu_item_call label="前回の部位を含める" name="Include Previous Part"/> + <menu_item_call label="次の部分を選択" name="Select Next Part"/> + <menu_item_call label="前回の部分を選択" name="Select Previous Part"/> + <menu_item_call label="次の部分を含める" name="Include Next Part"/> + <menu_item_call label="前回の部分を含める" name="Include Previous Part"/> </menu> </menu> <menu label="ヘルプ" name="Help"> @@ -124,7 +124,7 @@ <menu_item_call label="私のアニメーションを停止する" name="Stop Animating My Avatar"/> <menu_item_call label="テクスチャのリベーク" name="Rebake Texture"/> <menu_item_call label="UI のサイズをデフォルトに設定する" name="Set UI Size to Default"/> - <menu_item_call label="ウィンドウのサイズを設定..." name="Set Window Size..."/> + <menu_item_call label="ウィンドウのサイズの設定:" name="Set Window Size..."/> <menu_item_check label="遠くのオブジェクトを選択しない" name="Limit Select Distance"/> <menu_item_check label="カメラの距離移動を制限しない" name="Disable Camera Distance"/> <menu_item_check label="高解像度スナップショット" name="HighResSnapshot"/> @@ -183,7 +183,7 @@ <menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/> <menu_item_call label="スナップショットをディスクに保存" name="Snapshot to Disk"/> <menu_item_call label="一人称視点" name="Mouselook"/> - <menu_item_check label="ジョイスティック・フライカム" name="Joystick Flycam"/> + <menu_item_check label="ジョイスティックフライカム" name="Joystick Flycam"/> <menu_item_call label="表示をリセット" name="Reset View"/> <menu_item_call label="最後の発言者を見る" name="Look at Last Chatter"/> <menu label="制作ツールを選択" name="Select Tool"> @@ -194,12 +194,12 @@ <menu_item_call label="土地ツール" name="Land"/> </menu> <menu_item_call label="ズームイン" name="Zoom In"/> - <menu_item_call label="ズーム・デフォルト" name="Zoom Default"/> + <menu_item_call label="ズーム(デフォルト)" name="Zoom Default"/> <menu_item_call label="ズームアウト" name="Zoom Out"/> <menu_item_call label="全画面表示" name="Toggle Fullscreen"/> </menu> <menu_item_call label="デバッグ設定を表示する" name="Debug Settings"/> - <menu_item_check label="開発メニューを表示" name="Debug Mode"/> + <menu_item_check label="開発メニューを表示する" name="Debug Mode"/> </menu> <menu label="開発" name="Develop"> <menu label="コンソール" name="Consoles"> @@ -207,7 +207,7 @@ <menu_item_check label="デバッグコンソール" name="Debug Console"/> <menu_item_call label="通知コンソール" name="Notifications"/> <menu_item_check label="テクスチャサイズのコンソール" name="Texture Size"/> - <menu_item_check label="テクスチャカテゴリ・コンソール" name="Texture Category"/> + <menu_item_check label="テクスチャカテゴリのコンソール" name="Texture Category"/> <menu_item_check label="ファーストタイマー" name="Fast Timers"/> <menu_item_check label="メモリ" name="Memory"/> <menu_item_call label="リージョン情報をデバッグコンソールへ" name="Region Info to Debug Console"/> @@ -250,10 +250,10 @@ <menu_item_check label="アニメーション部分をテクスチャで表示" name="Texture Anim"/> <menu_item_check label="テクスチャ優先度" name="Texture Priority"/> <menu_item_check label="テクスチャの範囲" name="Texture Area"/> - <menu_item_check label="Face Area" name="Face Area"/> + <menu_item_check label="側面" name="Face Area"/> <menu_item_check label="光" name="Lights"/> <menu_item_check label="骨組みの衝突判定" name="Collision Skeleton"/> - <menu_item_check label="Raycast" name="Raycast"/> + <menu_item_check label="レイキャスト" name="Raycast"/> </menu> <menu label="レンダリング" name="Rendering"> <menu_item_check label="軸" name="Axes"/> @@ -264,7 +264,7 @@ <menu_item_check label="フレームバッファ・オブジェクト" name="Framebuffer Objects"/> <menu_item_check label="遅延レンダリング" name="Deferred Rendering"/> <menu_item_check label="グローバルイルミネーション" name="Global Illumination"/> - <menu_item_check label="GLデバッグ" name="Debug GL"/> + <menu_item_check label="GL デバッグ" name="Debug GL"/> <menu_item_check label="経路をデバッグ" name="Debug Pipeline"/> <menu_item_check label="ファーストアルファ" name="Fast Alpha"/> <menu_item_check label="アニメーションテクスチャ" name="Animation Textures"/> @@ -356,7 +356,7 @@ <menu_item_call label="アバターテクスチャをデバッグ" name="Debug Avatar Textures"/> <menu_item_call label="ローカルテクスチャをダンプ" name="Dump Local Textures"/> </menu> - <menu_item_check label="HTTP テクスチャ" name="HTTP Textures"/> + <menu_item_check label="HTTP Texture" name="HTTP Textures"/> <menu_item_call label="圧縮画像" name="Compress Images"/> <menu_item_check label="Output Debug Minidump" name="Output Debug Minidump"/> <menu_item_check label="次回の起動時にコンソールウィンドウを表示" name="Console Window"/> -- cgit v1.2.3 From 8cf7dad209fd97c1ab822ef183e8a74faceeb3d8 Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Tue, 23 Feb 2010 17:36:25 -0800 Subject: =?UTF-8?q?FIX=20EXT-5680:=20Get=20rid=20of=20unnecessary=20code?= =?UTF-8?q?=20that=20formats=20the=20media=20item=20count=20Review=20#139?= =?UTF-8?q?=20The=20crash=20was=20happening=20because=20the=20German=20(lo?= =?UTF-8?q?cale=20"de")=20version=20of=20the=20format=20string=20had=20an?= =?UTF-8?q?=20=E2=80=8B%ls=20in=20it,=20which=20was=20causing=20the=20cras?= =?UTF-8?q?h.=20Getting=20rid=20of=20the=20widget=20and=20the=20string=20s?= =?UTF-8?q?ince=20it=20is=20no=20longer=20desired=20in=20the=20design.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/llpanelnearbymedia.cpp | 3 --- indra/newview/llpanelnearbymedia.h | 1 - .../skins/default/xui/de/panel_nearby_media.xml | 3 --- .../skins/default/xui/en/panel_nearby_media.xml | 23 ++++------------------ .../skins/default/xui/fr/panel_nearby_media.xml | 3 --- .../skins/default/xui/ja/panel_nearby_media.xml | 3 --- 6 files changed, 4 insertions(+), 32 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index b73d7db770..3b5192b07f 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -135,7 +135,6 @@ BOOL LLPanelNearByMedia::postBuild() mMediaList = getChild<LLScrollListCtrl>("media_list"); mEnableAllCtrl = getChild<LLUICtrl>("all_nearby_media_enable_btn"); mDisableAllCtrl = getChild<LLUICtrl>("all_nearby_media_disable_btn"); - mItemCountText = getChild<LLTextBox>("media_item_count"); mShowCtrl = getChild<LLComboBox>("show_combo"); // Dynamic (selection-dependent) controls @@ -250,8 +249,6 @@ void LLPanelNearByMedia::draw() setShape(new_rect); } - mItemCountText->setValue(llformat(getString("media_item_count_format").c_str(), mMediaList->getItemCount())); - refreshList(); updateControls(); diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index 6fe724266b..551e2419c4 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -149,7 +149,6 @@ private: void onClickSelectedMediaUnzoom(); LLUICtrl* mNearbyMediaPanel; - LLTextBox* mItemCountText; LLScrollListCtrl* mMediaList; LLUICtrl* mEnableAllCtrl; LLUICtrl* mDisableAllCtrl; diff --git a/indra/newview/skins/default/xui/de/panel_nearby_media.xml b/indra/newview/skins/default/xui/de/panel_nearby_media.xml index ec2ad42fa1..2d97a25fa9 100644 --- a/indra/newview/skins/default/xui/de/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/de/panel_nearby_media.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> - <string name="media_item_count_format"> - (%ls Medien-Objekte) - </string> <string name="empty_item_text"> <leer> </string> 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 0f911f789e..aba1589eae 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -2,23 +2,22 @@ <panel can_resize="true" can_close="false" - 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" 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" @@ -98,20 +97,6 @@ width="100"> Nearby Media </text> - <!-- nix for now - <text - bottom_delta="1" - type="string" - follows="top|left|right" - font="SansSerif" - font.style="ITALIC" - font.size="Small" - name="media_item_count" - left="115" - right="-10"> - (?? media items) - </text> - --> <text type="string" length="1" diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml index 53b9bc6f82..71e65232aa 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_media.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> - <string name="media_item_count_format"> - (%ld articles de média) - </string> <string name="empty_item_text"> <vide> </string> diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml index ca93d46e4d..a670975dda 100644 --- a/indra/newview/skins/default/xui/ja/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/ja/panel_nearby_media.xml @@ -1,8 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="nearby_media"> - <string name="media_item_count_format"> - (メディアアイテム %ld ) - </string> <string name="empty_item_text"> <空> </string> -- cgit v1.2.3 From 262f34b25dbdde7940ef28ff02058f4ef12d92f1 Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Tue, 23 Feb 2010 18:13:50 -0800 Subject: FIX EXT-5517: clear hover face when cursor hovers over Nearby Media panel Review #140 This isn't the most generalized solution, but it fixes the proximal problem of selecting items in the Nearby Media panel, and is low risk because the code change is isolated to that panel. --- indra/newview/llpanelnearbymedia.cpp | 16 ++++++++++++++++ indra/newview/llpanelnearbymedia.h | 1 + .../newview/skins/default/xui/en/panel_nearby_media.xml | 14 +++----------- 3 files changed, 20 insertions(+), 11 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 3b5192b07f..1d720ceb25 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -231,6 +231,7 @@ void LLPanelNearByMedia::reshape(S32 width, S32 height, BOOL called_from_parent) const F32 AUTO_CLOSE_FADE_TIME_START= 4.0f; const F32 AUTO_CLOSE_FADE_TIME_END = 5.0f; +/*virtual*/ void LLPanelNearByMedia::draw() { //LLUICtrl* new_top = gFocusMgr.getTopCtrl(); @@ -265,6 +266,21 @@ void LLPanelNearByMedia::draw() } } +/*virtual*/ +BOOL LLPanelNearByMedia::handleHover(S32 x, S32 y, MASK mask) +{ + LLPanel::handleHover(x, y, mask); + + // If we are hovering over this panel, make sure to clear any hovered media + // ID. Note that the more general solution would be to clear this ID when + // the mouse leaves the in-scene view, but that proved to be problematic. + // See EXT-5517 + LLViewerMediaFocus::getInstance()->clearHover(); + + // Always handle + return true; +} + bool LLPanelNearByMedia::getParcelAudioAutoStart() { return mParcelAudioAutoStart; diff --git a/indra/newview/llpanelnearbymedia.h b/indra/newview/llpanelnearbymedia.h index 551e2419c4..4f864519f5 100644 --- a/indra/newview/llpanelnearbymedia.h +++ b/indra/newview/llpanelnearbymedia.h @@ -56,6 +56,7 @@ public: /*virtual*/ void handleVisibilityChange ( BOOL new_visibility ); /*virtual*/ void onTopLost (); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent); + /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); // this is part of the nearby media *dialog* so we can track whether // the user *implicitly* wants audio on or off via their *explicit* 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 aba1589eae..7c0ce9e62e 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml @@ -2,6 +2,7 @@ <panel can_resize="true" can_close="false" + mouse_opaque="true" bg_opaque_image="Volume_Background" bg_alpha_image="Volume_Background" background_opaque="true" @@ -132,6 +133,7 @@ ame="OnOthers" /> </combo_box> <scroll_list + name="media_list" follows="left|top|bottom|right" column_padding="0" height="105" @@ -140,8 +142,7 @@ bg_stripe_color="0.25 0.25 0.25 0.25" top_pad="8" left="10" - right="-10" - name="media_list"> + right="-10"> <scroll_list.columns type="checkbox" width="-1" @@ -189,11 +190,9 @@ left="10" 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" @@ -221,7 +220,6 @@ </layout_panel> <layout_panel name="play" - mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -249,7 +247,6 @@ </layout_panel> <layout_panel name="pause" - mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -276,7 +273,6 @@ </layout_panel> <layout_panel name="volume_slider_ctrl" - mouse_opaque="false" auto_resize="true" user_resize="false" follows="left|right" @@ -301,7 +297,6 @@ </layout_panel> <layout_panel name="mute" - mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -330,7 +325,6 @@ </layout_panel> <layout_panel name="zoom" - mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -358,7 +352,6 @@ </layout_panel> <layout_panel name="unzoom" - mouse_opaque="false" auto_resize="false" user_resize="false" layout="topleft" @@ -387,7 +380,6 @@ <layout_panel name="right_bookend" width="0" - mouse_opaque="false" user_resize="false" /> </layout_stack> </panel> -- cgit v1.2.3 From b214180ac189f6c6347347c5d3a5dc7035e0c039 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Sat, 13 Feb 2010 13:55:41 +0000 Subject: a better fix for the blend-factor init problem. I think. --- indra/llrender/llrender.cpp | 10 +++++++--- indra/llrender/llrender.h | 8 +++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 55c5b4531b..656f690db5 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -93,7 +93,9 @@ static GLenum sGLBlendFactor[] = GL_DST_ALPHA, GL_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA, - GL_ONE_MINUS_SRC_ALPHA + GL_ONE_MINUS_SRC_ALPHA, + + GL_ZERO // 'BF_UNDEF' }; LLTexUnit::LLTexUnit(S32 index) @@ -763,8 +765,8 @@ LLRender::LLRender() mCurrAlphaFunc = CF_DEFAULT; mCurrAlphaFuncVal = 0.01f; - mCurrBlendSFactor = BF_ONE; - mCurrBlendDFactor = BF_ZERO; + mCurrBlendSFactor = BF_UNDEF; + mCurrBlendDFactor = BF_UNDEF; } LLRender::~LLRender() @@ -970,6 +972,8 @@ void LLRender::setAlphaRejectSettings(eCompareFunc func, F32 value) void LLRender::blendFunc(eBlendFactor sfactor, eBlendFactor dfactor) { + llassert(sfactor < BF_UNDEF); + llassert(dfactor < BF_UNDEF); if (mCurrBlendSFactor != sfactor || mCurrBlendDFactor != dfactor) { mCurrBlendSFactor = sfactor; diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index a70ccf4d80..a90fbd4a5c 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -270,7 +270,9 @@ public: BF_DEST_ALPHA, BF_SOURCE_ALPHA, BF_ONE_MINUS_DEST_ALPHA, - BF_ONE_MINUS_SOURCE_ALPHA + BF_ONE_MINUS_SOURCE_ALPHA, + + BF_UNDEF } eBlendFactor; LLRender(); @@ -360,8 +362,8 @@ private: std::vector<LLTexUnit*> mTexUnits; LLTexUnit* mDummyTexUnit; - U32 mCurrBlendSFactor; - U32 mCurrBlendDFactor; + eBlendFactor mCurrBlendSFactor; + eBlendFactor mCurrBlendDFactor; F32 mMaxAnisotropy; -- cgit v1.2.3 From fb248e7ad01ad0ffe74e4f9c3297ebf9f12bd797 Mon Sep 17 00:00:00 2001 From: Dave Parks <davep@lindenlab.com> Date: Wed, 10 Feb 2010 14:47:53 -0600 Subject: Fix for U16 dumbness (can have > 64K indices) --- indra/newview/llface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index ebebd485d2..c473be852d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1065,14 +1065,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex); if (LLPipeline::sUseTriStrips) { - for (U16 i = 0; i < num_indices; i++) + for (U32 i = 0; i < num_indices; i++) { *indicesp++ = vf.mTriStrip[i] + index_offset; } } else { - for (U16 i = 0; i < num_indices; i++) + for (U32 i = 0; i < num_indices; i++) { *indicesp++ = vf.mIndices[i] + index_offset; } -- cgit v1.2.3 From 09053688c3b35b7c4e33ed831b806220a77ce662 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Mon, 22 Feb 2010 16:50:31 +0200 Subject: fixed low Bug EXT-5194 SLURL field dropdown should display empty menu rather than do nothing when empty --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 9 +++++++++ indra/newview/lllocationinputctrl.h | 7 +++++++ 2 files changed, 16 insertions(+) (limited to 'indra') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 04c684b240..a9ead36a70 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -674,6 +674,15 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) _1, filter)); } } + if(mList->isEmpty()) + { + /** + * Add a couple of empty items for a better view. + * EXT-5194 + */ + for(int i = 0; i < NUMBER_OF_EMPTY_ITEMS; i++ ) + add("", LLSD()); + } sortByName(); mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item. diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 4bb41f3bf4..ee128a5cf7 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -120,6 +120,13 @@ private: ICON_COUNT }; + /** + * This constant holds number of empty dropdown items, which will be displayed instead of doing nothing when the list is empty. + * Added due to EXT-5194 + */ + static const S32 NUMBER_OF_EMPTY_ITEMS = 3; + + friend class LLUICtrlFactory; LLLocationInputCtrl(const Params&); virtual ~LLLocationInputCtrl(); -- cgit v1.2.3 From 25078eb1f9cc2ecc1414e1e54dad55e76d372f34 Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Mon, 22 Feb 2010 17:09:03 +0200 Subject: fixed EXT-5292 'i' btn is visible through inspector --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 76 +++++++++++++--------- .../skins/default/xui/en/inspector_info_ctrl.xml | 9 +++ 2 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/inspector_info_ctrl.xml (limited to 'indra') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6180b880b5..5e8d5a63d0 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -116,34 +116,6 @@ public: return LLPanel::handleMouseUp(x,y,mask); } - //*TODO remake it using mouse enter/leave and static LLHandle<LLIconCtrl> to add/remove as a child - BOOL handleToolTip(S32 x, S32 y, MASK mask) - { - LLTextBase* name = getChild<LLTextBase>("user_name"); - if (name && name->parentPointInView(x, y) && mAvatarID.notNull() && mFrom.size() && SYSTEM_FROM != mFrom) - { - - // Spawn at right side of the name textbox. - LLRect sticky_rect = name->calcScreenRect(); - S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3); - - LLToolTip::Params params; - params.background_visible(false); - params.click_callback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, 0, 0, 0)); - params.delay_time(0.0f); // spawn instantly on hover - params.image(LLUI::getUIImage("Info_Small")); - params.message(""); - params.padding(0); - params.pos(LLCoordGL(icon_x, sticky_rect.mTop - 2)); - params.sticky_rect(sticky_rect); - - LLToolTipMgr::getInstance()->show(params); - return TRUE; - } - - return LLPanel::handleToolTip(x, y, mask); - } - void onObjectIconContextMenuItemClicked(const LLSD& userdata) { std::string level = userdata.asString(); @@ -198,7 +170,10 @@ public: menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleObject = menu->getHandle(); - setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); + setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::showInspector, this)); + + setMouseEnterCallback(boost::bind(&LLChatHistoryHeader::showInfoCtrl, this)); + setMouseLeaveCallback(boost::bind(&LLChatHistoryHeader::hideInfoCtrl, this)); return LLPanel::postBuild(); } @@ -232,7 +207,7 @@ public: return LLPanel::handleRightMouseDown(x,y,mask); } - void onHeaderPanelClick(S32 x, S32 y, MASK mask) + void showInspector() { if (mSourceType == CHAT_SOURCE_OBJECT) { @@ -245,6 +220,17 @@ public: //if chat source is system, you may add "else" here to define behaviour. } + static void onClickInfoCtrl(LLUICtrl* info_ctrl) + { + if (!info_ctrl) return; + + LLChatHistoryHeader* header = dynamic_cast<LLChatHistoryHeader*>(info_ctrl->getParent()); + if (!header) return; + + header->showInspector(); + } + + const LLUUID& getAvatarId () const { return mAvatarID;} void setup(const LLChat& chat,const LLStyle::Params& style_params) @@ -385,6 +371,33 @@ protected: } } + void showInfoCtrl() + { + if (mAvatarID.isNull() || mFrom.empty() || SYSTEM_FROM == mFrom) return; + + if (!sInfoCtrl) + { + sInfoCtrl = LLUICtrlFactory::createFromFile<LLUICtrl>("inspector_info_ctrl.xml", NULL, LLPanel::child_registry_t::instance()); + sInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, sInfoCtrl)); + } + + LLTextBase* name = getChild<LLTextBase>("user_name"); + LLRect sticky_rect = name->getRect(); + S32 icon_x = llmin(sticky_rect.mLeft + name->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3); + sInfoCtrl->setOrigin(icon_x, sticky_rect.getCenterY() - sInfoCtrl->getRect().getHeight() / 2 ) ; + addChild(sInfoCtrl); + } + + void hideInfoCtrl() + { + if (!sInfoCtrl) return; + + if (sInfoCtrl->getParent() == this) + { + removeChild(sInfoCtrl); + } + } + private: void setTimeField(const LLChat& chat) { @@ -413,6 +426,8 @@ protected: LLHandle<LLView> mPopupMenuHandleAvatar; LLHandle<LLView> mPopupMenuHandleObject; + static LLUICtrl* sInfoCtrl; + LLUUID mAvatarID; EChatSourceType mSourceType; std::string mFrom; @@ -421,6 +436,7 @@ protected: S32 mMinUserNameWidth; }; +LLUICtrl* LLChatHistoryHeader::sInfoCtrl = NULL; LLChatHistory::LLChatHistory(const LLChatHistory::Params& p) : LLUICtrl(p), diff --git a/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml new file mode 100644 index 0000000000..39fb54d513 --- /dev/null +++ b/indra/newview/skins/default/xui/en/inspector_info_ctrl.xml @@ -0,0 +1,9 @@ +<button + chrome="true" + image_selected="Info_Small" + image_unselected="Info_Small" + image_pressed="Info_Small" + height="12" + name="inspector_info_ctrl" + width="12" /> + \ No newline at end of file -- cgit v1.2.3 From f15151428c16d6358fb22446c0fb626c0e9ad2db Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Mon, 22 Feb 2010 17:29:39 +0200 Subject: fixed Normal bug EXT-5583 Favorites bar watermark text should be unbolded --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') 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 d484564e0d..a314cedc21 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -151,7 +151,6 @@ width="590"> <label follows="left|top" - font.style="BOLD" height="15" layout="topleft" left="10" -- cgit v1.2.3 From a7d716c35e57881a016c69752fa5f46dfd314ad9 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Mon, 22 Feb 2010 18:23:04 +0200 Subject: =?UTF-8?q?fixed=20EXT-5418=20=E2=80=9CWhen=20UI=20scale=20is=20se?= =?UTF-8?q?t=20to=201.40=20I=20see=20notices=20off=20the=20edge=20of=20the?= =?UTF-8?q?=20screen.=E2=80=9D,=20corrected=20emitting=20of=20world=20view?= =?UTF-8?q?=20update=20signal;=20replaced=20getWorldViewRectRaw=20with=20g?= =?UTF-8?q?etWorldViewRectScaled=20LLIMFloater::getAllowedRect;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 2 +- indra/newview/llviewerwindow.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 9c0e7a158d..098e540678 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -442,7 +442,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) void LLIMFloater::getAllowedRect(LLRect& rect) { - rect = gViewerWindow->getWorldViewRectRaw(); + rect = gViewerWindow->getWorldViewRectScaled(); static S32 right_padding = 0; if (right_padding == 0) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1669ce6312..1acf114b12 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3008,17 +3008,16 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window) if (mWorldViewRectRaw != new_world_rect) { - LLRect old_world_rect = mWorldViewRectRaw; mWorldViewRectRaw = new_world_rect; gResizeScreenTexture = TRUE; LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() ); LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() ); + LLRect old_world_rect_scaled = mWorldViewRectScaled; mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); // sending a signal with a new WorldView rect - old_world_rect = calcScaledRect(old_world_rect, mDisplayScale); - mOnWorldViewRectUpdated(old_world_rect, mWorldViewRectScaled); + mOnWorldViewRectUpdated(old_world_rect_scaled, mWorldViewRectScaled); } } -- cgit v1.2.3 From 16b284971ebb6ecb41ba65d5fd9da87bc08bcba3 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Mon, 22 Feb 2010 19:22:43 +0200 Subject: Fixed normal bug EXT-4964 (Invalid SLURL detection does not detect invalid slurls). - Added new static method LLSLURL::isValidSLURL() whic uses LLUrlRegistry::isUrl() to validate SLURLs and not just chek prefixes as LLSLURL::isSLURL() does. - Used it in slurl DnD check in LLViewerWindow. - LLUrlEntrySLURL regexp was changed not to pass non-valid SLURLS (such as one from the bug description). --HG-- branch : product-engine --- indra/llui/llurlentry.cpp | 2 +- indra/newview/llslurl.cpp | 16 ++++++++++++++++ indra/newview/llslurl.h | 5 +++++ indra/newview/llviewerwindow.cpp | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 3c73ae9b0c..20c939874b 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -232,7 +232,7 @@ std::string LLUrlEntryHTTPNoProtocol::getUrl(const std::string &string) const LLUrlEntrySLURL::LLUrlEntrySLURL() { // see http://slurl.com/about.php for details on the SLURL format - mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/\\S+/?(\\d+)?/?(\\d+)?/?(\\d+)?/?\\S*", + mPattern = boost::regex("http://(maps.secondlife.com|slurl.com)/secondlife/[^ /]+(/\\d+){0,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?", boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_slurl.xml"; mTooltip = LLTrans::getString("TooltipSLURL"); diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index e4773f99c5..5d20e280b5 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -36,6 +36,8 @@ #include "llweb.h" +#include "llurlregistry.h" + const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app."; const std::string LLSLURL::PREFIX_SL = "sl://"; const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://"; @@ -95,6 +97,20 @@ bool LLSLURL::isSLURL(const std::string& url) return false; } +bool LLSLURL::isValidSLURL(const std::string& url) +{ + std::string temp_url(url); + //"www." may appear in DnD- see description of PREFIX_SLURL_WWW. + // If it is found, we remove it because it isn't expected in regexp. + if (matchPrefix(url, PREFIX_SLURL_WWW)) + { + size_t position = url.find("www."); + temp_url.erase(position,4); + } + + return LLUrlRegistry::getInstance()->isUrl(temp_url); +} + // static bool LLSLURL::isSLURLCommand(const std::string& url) { diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 6a695e84f3..a79a8fc97c 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -60,6 +60,11 @@ public: */ static bool isSLURL(const std::string& url); + /** + * Returns true if url is proven valid by regexp check from LLUrlRegistry + */ + static bool isValidSLURL(const std::string& url); + /** * Is this a special secondlife://app/ URL? */ diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 1acf114b12..591b1de509 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -826,6 +826,8 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (slurl_dnd_enabled) { + // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964) + if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) ) // special case SLURLs if ( LLSLURL::isSLURL( data ) ) { -- cgit v1.2.3 From dcc39faab49bcb9b8784ce57447f92f9e8dbc777 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Mon, 22 Feb 2010 19:52:28 +0200 Subject: Fixed normal bug (EXT-5330) No way to collapse/expand accordions on My Landmarks panel. - "Expand All" and "Collapse All" now affect all accordions in "My Landmarks". --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 248 +++++++++++++++------ .../default/xui/en/menu_places_gear_folder.xml | 9 + 2 files changed, 189 insertions(+), 68 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 40ea75ea7a..01fbf6f7fc 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -69,6 +69,10 @@ static const std::string TRASH_BUTTON_NAME = "trash_btn"; // helper functions static void filter_list(LLPlacesInventoryPanel* inventory_list, const std::string& string); static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list); +static void collapse_all_folders(LLFolderView* root_folder); +static void expand_all_folders(LLFolderView* root_folder); +static bool has_expanded_folders(LLFolderView* root_folder); +static bool has_collapsed_folders(LLFolderView* root_folder); /** * Functor counting expanded and collapsed folders in folder view tree to know @@ -683,31 +687,29 @@ void LLLandmarksPanel::updateListCommands() // keep Options & Add Landmark buttons always enabled mListCommands->childSetEnabled(ADD_FOLDER_BUTTON_NAME, add_folder_enabled); mListCommands->childSetEnabled(TRASH_BUTTON_NAME, trash_enabled); - mListCommands->childSetEnabled(OPTIONS_BUTTON_NAME,getCurSelectedItem() != NULL); } void LLLandmarksPanel::onActionsButtonClick() { + LLMenuGL* menu = mGearFolderMenu; + LLFolderViewItem* cur_item = NULL; if(mCurrentSelectedList) - cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem(); - - if(!cur_item) - return; - - LLFolderViewEventListener* listenerp = cur_item->getListener(); - - LLMenuGL* menu =NULL; - if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) - { - menu = mGearLandmarkMenu; - } - else if (listenerp->getInventoryType() == LLInventoryType::IT_CATEGORY) { - mGearFolderMenu->getChild<LLMenuItemCallGL>("expand")->setVisible(!cur_item->isOpen()); - mGearFolderMenu->getChild<LLMenuItemCallGL>("collapse")->setVisible(cur_item->isOpen()); - menu = mGearFolderMenu; + cur_item = mCurrentSelectedList->getRootFolder()->getCurSelectedItem(); + if(!cur_item) + return; + + LLFolderViewEventListener* listenerp = cur_item->getListener(); + if(!listenerp) + return; + + if (listenerp->getInventoryType() == LLInventoryType::IT_LANDMARK) + { + menu = mGearLandmarkMenu; + } } + showActionMenu(menu,OPTIONS_BUTTON_NAME); } @@ -805,26 +807,33 @@ void LLLandmarksPanel::onClipboardAction(const LLSD& userdata) const void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) { - if(!mCurrentSelectedList) return; - - LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); std::string command_name = userdata.asString(); if ("expand_all" == command_name) { - root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); - root_folder->arrangeAll(); + expand_all_folders(mFavoritesInventoryPanel->getRootFolder()); + expand_all_folders(mLandmarksInventoryPanel->getRootFolder()); + expand_all_folders(mMyInventoryPanel->getRootFolder()); + expand_all_folders(mLibraryInventoryPanel->getRootFolder()); + + for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + { + (*iter)->changeOpenClose(false); + } } else if ("collapse_all" == command_name) { - root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + collapse_all_folders(mFavoritesInventoryPanel->getRootFolder()); + collapse_all_folders(mLandmarksInventoryPanel->getRootFolder()); + collapse_all_folders(mMyInventoryPanel->getRootFolder()); + collapse_all_folders(mLibraryInventoryPanel->getRootFolder()); - // The top level folder is invisible, it must be open to - // display its sub-folders. - root_folder->openTopLevelFolders(); - root_folder->arrangeAll(); + for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + { + (*iter)->changeOpenClose(true); + } } - else if ( "sort_by_date" == command_name) + else if ("sort_by_date" == command_name) { mSortByDate = !mSortByDate; updateSortOrder(mLandmarksInventoryPanel, mSortByDate); @@ -833,7 +842,10 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata) } else { - root_folder->doToSelected(&gInventory, userdata); + if(mCurrentSelectedList) + { + mCurrentSelectedList->getRootFolder()->doToSelected(&gInventory, userdata); + } } } @@ -853,53 +865,87 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { std::string command_name = userdata.asString(); - LLPlacesFolderView* rootFolderView = mCurrentSelectedList ? static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL; - if (NULL == rootFolderView) return false; - - // disable some commands for multi-selection. EXT-1757 - if (rootFolderView->getSelectedCount() > 1) + if ("collapse_all" == command_name) { - if ( "teleport" == command_name - || "more_info" == command_name - || "rename" == command_name - || "show_on_map" == command_name - || "copy_slurl" == command_name - ) + bool disable_collapse_all = !has_expanded_folders(mFavoritesInventoryPanel->getRootFolder()) + && !has_expanded_folders(mLandmarksInventoryPanel->getRootFolder()) + && !has_expanded_folders(mMyInventoryPanel->getRootFolder()) + && !has_expanded_folders(mLibraryInventoryPanel->getRootFolder()); + if (disable_collapse_all) { - return false; + for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + { + if ((*iter)->isExpanded()) + { + disable_collapse_all = false; + break; + } + } } + return !disable_collapse_all; } + else if ("expand_all" == command_name) + { + bool disable_expand_all = !has_collapsed_folders(mFavoritesInventoryPanel->getRootFolder()) + && !has_collapsed_folders(mLandmarksInventoryPanel->getRootFolder()) + && !has_collapsed_folders(mMyInventoryPanel->getRootFolder()) + && !has_collapsed_folders(mLibraryInventoryPanel->getRootFolder()); + if (disable_expand_all) + { + for (accordion_tabs_t::const_iterator iter = mAccordionTabs.begin(); iter != mAccordionTabs.end(); ++iter) + { + if (!(*iter)->isExpanded()) + { + disable_expand_all = false; + break; + } + } + } - // disable some commands for Favorites accordion. EXT-1758 - if (mCurrentSelectedList == mFavoritesInventoryPanel) + return !disable_expand_all; + } + else if ("sort_by_date" == command_name) { - if ( "expand_all" == command_name - || "collapse_all" == command_name - || "sort_by_date" == command_name - ) + // disable "sort_by_date" for Favorites accordion because + // it has its own items order. EXT-1758 + if (mCurrentSelectedList == mFavoritesInventoryPanel) + { return false; + } } - - LLCheckFolderState checker; - rootFolderView->applyFunctorRecursively(checker); - - // We assume that the root folder is always expanded so we enable "collapse_all" - // command when we have at least one more expanded folder. - if (checker.getExpandedFolders() < 2 && "collapse_all" == command_name) + else if (!rootFolderView) { return false; } - - if (checker.getCollapsedFolders() < 1 && "expand_all" == command_name) + else if ( "paste" == command_name + || "rename" == command_name + || "cut" == command_name + || "copy" == command_name + || "delete" == command_name + || "collapse" == command_name + || "expand" == command_name + ) { - return false; + return canSelectedBeModified(command_name); } - - if("category" == command_name) + 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 (rootFolderView->getSelectedCount() > 1) + { + return false; + } + } + else if("category" == command_name) { // we can add folder only in Landmarks Accordion if (mCurrentSelectedList == mLandmarksInventoryPanel) @@ -909,10 +955,6 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const } else return false; } - else if("paste" == command_name || "rename" == command_name || "cut" == command_name || "delete" == command_name) - { - return canSelectedBeModified(command_name); - } else if("create_pick" == command_name) { std::set<LLUUID> selection; @@ -970,6 +1012,9 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co { // validate own rules first + LLFolderViewItem* selected = getCurSelectedItem(); + if (!selected) return false; + // nothing can be modified in Library if (mLibraryInventoryPanel == mCurrentSelectedList) return false; @@ -996,24 +1041,41 @@ bool LLLandmarksPanel::canSelectedBeModified(const std::string& command_name) co } // then ask LLFolderView permissions + + LLFolderView* root_folder = mCurrentSelectedList->getRootFolder(); + + if ("copy" == command_name) + { + return root_folder->canCopy(); + } + else if ("collapse" == command_name) + { + return selected->isOpen(); + } + else if ("expand" == command_name) + { + return !selected->isOpen(); + } + if (can_be_modified) { - LLFolderViewItem* selected = getCurSelectedItem(); + LLFolderViewEventListener* listenerp = selected->getListener(); + if ("cut" == command_name) { - can_be_modified = mCurrentSelectedList->getRootFolder()->canCut(); + can_be_modified = root_folder->canCut(); } else if ("rename" == command_name) { - can_be_modified = selected ? selected->getListener()->isItemRenameable() : false; + can_be_modified = listenerp ? listenerp->isItemRenameable() : false; } else if ("delete" == command_name) { - can_be_modified = selected ? selected->getListener()->isItemRemovable(): false; + can_be_modified = listenerp ? listenerp->isItemRemovable() : false; } else if("paste" == command_name) { - return mCurrentSelectedList->getRootFolder()->canPaste(); + can_be_modified = root_folder->canPaste(); } else { @@ -1197,4 +1259,54 @@ static bool category_has_descendents(LLPlacesInventoryPanel* inventory_list) return false; } + +static void collapse_all_folders(LLFolderView* root_folder) +{ + if (!root_folder) + return; + + root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN); + + // The top level folder is invisible, it must be open to + // display its sub-folders. + root_folder->openTopLevelFolders(); + root_folder->arrangeAll(); +} + +static void expand_all_folders(LLFolderView* root_folder) +{ + if (!root_folder) + return; + + root_folder->setOpenArrangeRecursively(TRUE, LLFolderViewFolder::RECURSE_DOWN); + root_folder->arrangeAll(); +} + +static bool has_expanded_folders(LLFolderView* root_folder) +{ + LLCheckFolderState checker; + root_folder->applyFunctorRecursively(checker); + + // We assume that the root folder is always expanded so we enable "collapse_all" + // command when we have at least one more expanded folder. + if (checker.getExpandedFolders() < 2) + { + return false; + } + + return true; +} + +static bool has_collapsed_folders(LLFolderView* root_folder) +{ + LLCheckFolderState checker; + root_folder->applyFunctorRecursively(checker); + + if (checker.getCollapsedFolders() < 1) + { + return false; + } + + return true; +} // EOF diff --git a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml index 9b3948b29b..3e38503e43 100644 --- a/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml +++ b/indra/newview/skins/default/xui/en/menu_places_gear_folder.xml @@ -45,6 +45,9 @@ <on_click function="Places.LandmarksGear.CopyPaste.Action" parameter="copy" /> + <on_enable + function="Places.LandmarksGear.Enable" + parameter="copy" /> </menu_item_call> <menu_item_call label="Paste" @@ -88,6 +91,9 @@ <on_click function="Places.LandmarksGear.Folding.Action" parameter="expand" /> + <on_enable + function="Places.LandmarksGear.Enable" + parameter="expand" /> </menu_item_call> <menu_item_call label="Collapse" @@ -96,6 +102,9 @@ <on_click function="Places.LandmarksGear.Folding.Action" parameter="collapse" /> + <on_enable + function="Places.LandmarksGear.Enable" + parameter="collapse" /> </menu_item_call> <menu_item_call label="Expand all folders" -- cgit v1.2.3 From 79b6eea163d4426e20ad1e71bb31805fbfe67fee Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Mon, 22 Feb 2010 20:01:44 +0200 Subject: No ticket. Removed unnecessary string which was occasionally left in 5e7ce89a4c9e. --HG-- branch : product-engine --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 591b1de509..eba6463d84 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -826,10 +826,10 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi if (slurl_dnd_enabled) { + + // special case SLURLs // isValidSLURL() call was added here to make sure that dragged SLURL is valid (EXT-4964) if ( LLSLURL::isSLURL( data ) && LLSLURL::isValidSLURL( data ) ) - // special case SLURLs - if ( LLSLURL::isSLURL( data ) ) { if (drop) { -- cgit v1.2.3 From 311f5ff209f1784630fc3b95c34adc47d0e85148 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Mon, 22 Feb 2010 20:54:11 +0200 Subject: Fixed normal bug (EXT-5558) "Close" button on the Create Landmark panel is out of panel. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_places.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 57535649de..ff5d89470c 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -129,7 +129,8 @@ background_visible="true" label="Close" layout="topleft" name="close_btn" - left_pad="3" + right="-10" + top="1" width="60" /> </panel> </panel> -- cgit v1.2.3 From 56578ae0b08e03dffcf4d9a8fadccb6ee9ad6a05 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Mon, 22 Feb 2010 20:58:50 +0200 Subject: Minor code cleanup. --HG-- branch : product-engine --- indra/newview/llpanellandmarks.cpp | 6 +++--- indra/newview/llpanellandmarks.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 01fbf6f7fc..45a8dc4cbe 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -865,7 +865,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const { std::string command_name = userdata.asString(); - LLPlacesFolderView* rootFolderView = mCurrentSelectedList ? + LLPlacesFolderView* root_folder_view = mCurrentSelectedList ? static_cast<LLPlacesFolderView*>(mCurrentSelectedList->getRootFolder()) : NULL; if ("collapse_all" == command_name) @@ -917,7 +917,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const return false; } } - else if (!rootFolderView) + else if (!root_folder_view) { return false; } @@ -940,7 +940,7 @@ bool LLLandmarksPanel::isActionEnabled(const LLSD& userdata) const ) { // disable some commands for multi-selection. EXT-1757 - if (rootFolderView->getSelectedCount() > 1) + if (root_folder_view->getSelectedCount() > 1) { return false; } diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 6358bd6f23..f1ce1a18b5 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -155,14 +155,14 @@ private: void doCreatePick(LLLandmark* landmark); private: - LLPlacesInventoryPanel* mFavoritesInventoryPanel; - LLPlacesInventoryPanel* mLandmarksInventoryPanel; - LLPlacesInventoryPanel* mMyInventoryPanel; - LLPlacesInventoryPanel* mLibraryInventoryPanel; + LLPlacesInventoryPanel* mFavoritesInventoryPanel; + LLPlacesInventoryPanel* mLandmarksInventoryPanel; + LLPlacesInventoryPanel* mMyInventoryPanel; + LLPlacesInventoryPanel* mLibraryInventoryPanel; LLMenuGL* mGearLandmarkMenu; LLMenuGL* mGearFolderMenu; LLMenuGL* mMenuAdd; - LLPlacesInventoryPanel* mCurrentSelectedList; + LLPlacesInventoryPanel* mCurrentSelectedList; LLInventoryObserver* mInventoryObserver; LLPanel* mListCommands; -- cgit v1.2.3 From f8299e28b92b06e4cd346ea134ce317b59617785 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Mon, 22 Feb 2010 23:20:34 +0200 Subject: Fixed low bug (EXT-5136) Add the "Map" item to the people context menu. --HG-- branch : product-engine --- indra/newview/llavataractions.cpp | 15 +++++++++++++++ indra/newview/llavataractions.h | 5 +++++ indra/newview/llpanelavatar.cpp | 6 +----- indra/newview/llpanelpeoplemenus.cpp | 10 +++++++++- indra/newview/skins/default/xui/en/menu_people_nearby.xml | 10 ++++++++++ 5 files changed, 40 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 1d75374930..e6666c7f83 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -50,6 +50,7 @@ #include "llfloatergroups.h" #include "llfloaterreg.h" #include "llfloaterpay.h" +#include "llfloaterworldmap.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llimview.h" // for gIMMgr #include "llmutelist.h" @@ -316,6 +317,20 @@ void LLAvatarActions::showProfile(const LLUUID& id) } } +// static +void LLAvatarActions::showOnMap(const LLUUID& id) +{ + std::string name; + if (!gCacheName->getFullName(id, name)) + { + gCacheName->get(id, FALSE, boost::bind(&LLAvatarActions::showOnMap, id)); + return; + } + + gFloaterWorldMap->trackAvatar(id, name); + LLFloaterReg::showInstance("world_map"); +} + // static void LLAvatarActions::pay(const LLUUID& id) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 16a58718a2..a7f3acad4f 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -98,6 +98,11 @@ public: */ static void showProfile(const LLUUID& id); + /** + * Show avatar on world map. + */ + static void showOnMap(const LLUUID& id); + /** * Give money to the avatar. */ diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index 6b07409676..b61d3ef371 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -48,7 +48,6 @@ #include "llscrollcontainer.h" #include "llavatariconctrl.h" #include "llweb.h" -#include "llfloaterworldmap.h" #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "llvoiceclient.h" @@ -449,10 +448,7 @@ void LLPanelProfileTab::scrollToTop() void LLPanelProfileTab::onMapButtonClick() { - std::string name; - gCacheName->getFullName(getAvatarId(), name); - gFloaterWorldMap->trackAvatar(getAvatarId(), name); - LLFloaterReg::showInstance("world_map"); + LLAvatarActions::showOnMap(getAvatarId()); } void LLPanelProfileTab::updateButtons() diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 900d28adca..854651cd01 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -39,6 +39,7 @@ #include "llpanelpeoplemenus.h" // newview +#include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavataractions.h" #include "llviewermenu.h" // for gMenuHolder @@ -125,7 +126,7 @@ LLContextMenu* NearbyMenu::createMenu() registrar.add("Avatar.IM", boost::bind(&LLAvatarActions::startIM, id)); registrar.add("Avatar.Call", boost::bind(&LLAvatarActions::startCall, id)); registrar.add("Avatar.OfferTeleport", boost::bind(&NearbyMenu::offerTeleport, this)); - registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::startIM, id)); // *TODO: unimplemented + registrar.add("Avatar.ShowOnMap", boost::bind(&LLAvatarActions::showOnMap, id)); registrar.add("Avatar.Share", boost::bind(&LLAvatarActions::share, id)); registrar.add("Avatar.Pay", boost::bind(&LLAvatarActions::pay, id)); registrar.add("Avatar.BlockUnblock", boost::bind(&LLAvatarActions::toggleBlock, id)); @@ -218,6 +219,13 @@ bool NearbyMenu::enableContextMenuItem(const LLSD& userdata) { return LLAvatarActions::canCall(); } + else if (item == std::string("can_show_on_map")) + { + const LLUUID& id = mUUIDs.front(); + + return (LLAvatarTracker::instance().isBuddyOnline(id) && is_agent_mappable(id)) + || gAgent.isGodlike(); + } return false; } 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 9d2ccba4da..014a52bb4f 100644 --- a/indra/newview/skins/default/xui/en/menu_people_nearby.xml +++ b/indra/newview/skins/default/xui/en/menu_people_nearby.xml @@ -46,6 +46,16 @@ function="Avatar.EnableItem" parameter="can_call" /> </menu_item_call> + <menu_item_call + label="Map" + layout="topleft" + name="Map"> + <menu_item_call.on_click + function="Avatar.ShowOnMap" /> + <menu_item_call.on_enable + function="Avatar.EnableItem" + parameter="can_show_on_map" /> + </menu_item_call> <menu_item_call label="Share" layout="topleft" -- cgit v1.2.3 From e55bb59a785b67ad9267d71789b08821f0a991ae Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 15:39:22 -0800 Subject: EXT-5633: Fix crash pressing PLAY on parcel media when media is disabled Good catch, Leyla --- indra/newview/llpanelnearbymedia.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 8ad5389566..52cdd386c9 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -1075,15 +1075,18 @@ void LLPanelNearByMedia::onClickSelectedMediaPlay() { LLViewerMediaImpl *impl = (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) ? ((LLViewerMediaImpl*)LLViewerParcelMedia::getParcelMedia()) : LLViewerMedia::getMediaImplFromTextureID(selected_media_id); - if (NULL != impl && impl->isMediaTimeBased() && impl->isMediaPaused()) + if (NULL != impl) { - // Aha! It's really time-based media that's paused, so unpause - impl->play(); - return; - } - else if (impl->isParcelMedia()) - { - LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); + if (impl->isMediaTimeBased() && impl->isMediaPaused()) + { + // Aha! It's really time-based media that's paused, so unpause + impl->play(); + return; + } + else if (impl->isParcelMedia()) + { + LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); + } } } } -- cgit v1.2.3 From 615e2a05777d34a2b784a518f42ad5798484ffab Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 17:42:15 -0800 Subject: EXT-5645 Change tooltip for media affordance --- indra/newview/skins/default/xui/en/panel_status_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 96c61b69f5..4167401338 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -102,7 +102,7 @@ left_pad="15" top="2" name="media_toggle_btn" - tool_tip="Click to toggle media" + tool_tip="Start/Stop All Media (Music, Video, Web pages)" width="16" > </button> <button -- cgit v1.2.3 From dcfcf50d40685ccc4c092ee0f15297df059da70f Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 17:46:34 -0800 Subject: Fix (unposted bug): media "affordance" was not properly being disabled when media was disabled --- indra/newview/llstatusbar.cpp | 12 ++++++------ indra/newview/llviewermedia.cpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index e83c882866..d90a019697 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -359,7 +359,7 @@ void LLStatusBar::refresh() mBtnVolume->setToggleState(mute_audio); // Don't show media toggle if there's no media, parcel media, and no parcel audio - mMediaToggle->setVisible(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio()); + mMediaToggle->setEnabled(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio()); // Note the "sense" of the toggle is opposite whether media is playing or not mMediaToggle->setValue(! (LLViewerMedia::isAnyMediaShowing() || LLViewerMedia::isParcelMediaPlaying() || @@ -547,13 +547,13 @@ void LLStatusBar::onMouseEnterNearbyMedia() LLButton* nearby_media_btn = getChild<LLButton>( "media_toggle_btn" ); LLRect nearby_media_btn_rect = nearby_media_btn->calcScreenRect(); nearby_media_rect.setLeftTopAndSize(nearby_media_btn_rect.mLeft - - (nearby_media_rect.getWidth() - nearby_media_btn_rect.getWidth())/2, - nearby_media_btn_rect.mBottom, - nearby_media_rect.getWidth(), - nearby_media_rect.getHeight()); + (nearby_media_rect.getWidth() - nearby_media_btn_rect.getWidth())/2, + nearby_media_btn_rect.mBottom, + nearby_media_rect.getWidth(), + nearby_media_rect.getHeight()); // force onscreen nearby_media_rect.translate(popup_holder->getRect().getWidth() - nearby_media_rect.mRight, 0); - + // show the master volume pull-down mPanelNearByMedia->setShape(nearby_media_rect); mPanelNearByMedia->setVisible(TRUE); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 395467dffb..b066db6307 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -993,14 +993,14 @@ bool LLViewerMedia::hasInWorldMedia() // static bool LLViewerMedia::hasParcelMedia() { - return !LLViewerParcelMedia::getURL().empty(); + return gSavedSettings.getBOOL("AudioStreamingMedia") && !LLViewerParcelMedia::getURL().empty(); } ////////////////////////////////////////////////////////////////////////////////////////// // static bool LLViewerMedia::hasParcelAudio() { - return !LLViewerMedia::getParcelAudioURL().empty(); + return gSavedSettings.getBOOL("AudioStreamingMedia") && !LLViewerMedia::getParcelAudioURL().empty(); } ////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From ea2e72f4502fe58b01a00f8e6b0ae3e47c269e8b Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 17:47:19 -0800 Subject: FIX (unposted bug): Nearby media "dynamic" controls not disabled properly when media disabled --- indra/newview/llpanelnearbymedia.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 52cdd386c9..877b31513a 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -953,15 +953,29 @@ void LLPanelNearByMedia::onMoreLess() void LLPanelNearByMedia::updateControls() { + if (! gSavedSettings.getBOOL("AudioStreamingMedia")) + { + // Just show disabled controls + showDisabledControls(); + return; + } + LLUUID selected_media_id = mMediaList->getValue().asUUID(); if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID) { - showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(), + if (!LLViewerMedia::hasParcelAudio()) + { + // Shouldn't happen, but do this anyway + showDisabledControls(); + } + else { + showTimeBasedControls(LLViewerMedia::isParcelAudioPlaying(), false, // include_zoom false, // is_zoomed gSavedSettings.getBOOL("MuteMusic"), gSavedSettings.getF32("AudioLevelMusic") ); + } } else if (selected_media_id == PARCEL_MEDIA_LIST_ITEM_UUID) { -- cgit v1.2.3 From 50a99d5419cd0ea9fe3375726bdc6a34e8102824 Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 19:04:27 -0800 Subject: FIX (unposted bug): "hasMedia" and "hasAudio" no longer checks preferences: it's now up to callers to decide to do that Review #137 --- indra/newview/llpanelnearbymedia.cpp | 28 ++++++++++++++++------------ indra/newview/llstatusbar.cpp | 6 ++++-- indra/newview/llviewermedia.cpp | 5 ++--- 3 files changed, 22 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 877b31513a..b73d7db770 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -535,7 +535,9 @@ void LLPanelNearByMedia::refreshParcelItems() const LLSD &choice_llsd = mShowCtrl->getSelectedValue(); MediaClass choice = (MediaClass)choice_llsd.asInteger(); // Only show "special parcel items" if "All" or "Within" filter - bool should_include = choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL; + // (and if media is "enabled") + bool should_include = gSavedSettings.getBOOL("AudioStreamingMedia") && + (choice == MEDIA_CLASS_ALL || choice == MEDIA_CLASS_WITHIN_PARCEL); // First Parcel Media: add or remove it as necessary if (should_include && LLViewerMedia::hasParcelMedia()) @@ -579,8 +581,8 @@ void LLPanelNearByMedia::refreshParcelItems() "parcel media"); } - // Next Parcel Audio: add or remove it as necessary - if (should_include && LLViewerMedia::hasParcelAudio()) + // Next Parcel Audio: add or remove it as necessary (don't show if disabled in prefs) + if (should_include && LLViewerMedia::hasParcelAudio() && gSavedSettings.getBOOL("AudioStreamingMusic")) { // Yes, there is parcel audio. if (NULL == mParcelAudioItem) @@ -692,14 +694,16 @@ void LLPanelNearByMedia::refreshList() } } } - mDisableAllCtrl->setEnabled(LLViewerMedia::isAnyMediaShowing() || - LLViewerMedia::isParcelMediaPlaying() || - LLViewerMedia::isParcelAudioPlaying()); - mEnableAllCtrl->setEnabled(disabled_count > 0 || - // parcel media (if we have it, and it isn't playing, enable "start") - (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) || - // parcel audio (if we have it, and it isn't playing, enable "start") - (LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying())); + mDisableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") && + (LLViewerMedia::isAnyMediaShowing() || + LLViewerMedia::isParcelMediaPlaying() || + LLViewerMedia::isParcelAudioPlaying())); + mEnableAllCtrl->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") && + (disabled_count > 0 || + // parcel media (if we have it, and it isn't playing, enable "start") + (LLViewerMedia::hasParcelMedia() && ! LLViewerMedia::isParcelMediaPlaying()) || + // parcel audio (if we have it, and it isn't playing, enable "start") + (LLViewerMedia::hasParcelAudio() && ! LLViewerMedia::isParcelAudioPlaying()))); // Iterate over the rows in the control, updating ones whose impl exists, and deleting ones whose impl has gone away. std::vector<LLScrollListItem*> items = mMediaList->getAllData(); @@ -964,7 +968,7 @@ void LLPanelNearByMedia::updateControls() if (selected_media_id == PARCEL_AUDIO_LIST_ITEM_UUID) { - if (!LLViewerMedia::hasParcelAudio()) + if (!LLViewerMedia::hasParcelAudio() || !gSavedSettings.getBOOL("AudioStreamingMusic")) { // Shouldn't happen, but do this anyway showDisabledControls(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index d90a019697..732c23982b 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -358,8 +358,10 @@ void LLStatusBar::refresh() bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); - // Don't show media toggle if there's no media, parcel media, and no parcel audio - mMediaToggle->setEnabled(LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio()); + // Disable media toggle if there's no media, parcel media, and no parcel audio + // (or if media is disabled) + mMediaToggle->setEnabled(gSavedSettings.getBOOL("AudioStreamingMedia") && + (LLViewerMedia::hasInWorldMedia() || LLViewerMedia::hasParcelMedia() || LLViewerMedia::hasParcelAudio())); // Note the "sense" of the toggle is opposite whether media is playing or not mMediaToggle->setValue(! (LLViewerMedia::isAnyMediaShowing() || LLViewerMedia::isParcelMediaPlaying() || diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index b066db6307..0f785079a6 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -972,7 +972,6 @@ bool LLViewerMedia::isParcelAudioPlaying() bool LLViewerMedia::hasInWorldMedia() { - if (! gSavedSettings.getBOOL("AudioStreamingMedia")) return false; if (sInWorldMediaDisabled) return false; impl_list::iterator iter = sViewerMediaImplList.begin(); impl_list::iterator end = sViewerMediaImplList.end(); @@ -993,14 +992,14 @@ bool LLViewerMedia::hasInWorldMedia() // static bool LLViewerMedia::hasParcelMedia() { - return gSavedSettings.getBOOL("AudioStreamingMedia") && !LLViewerParcelMedia::getURL().empty(); + return !LLViewerParcelMedia::getURL().empty(); } ////////////////////////////////////////////////////////////////////////////////////////// // static bool LLViewerMedia::hasParcelAudio() { - return gSavedSettings.getBOOL("AudioStreamingMedia") && !LLViewerMedia::getParcelAudioURL().empty(); + return !LLViewerMedia::getParcelAudioURL().empty(); } ////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 37291bea8d9b5a626b449d984856e280e159ac5c Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Mon, 22 Feb 2010 19:25:51 -0800 Subject: Follow-up from previous change based on code review #137 --- indra/newview/llviewermedia.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 0f785079a6..0948afee8b 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -944,7 +944,10 @@ void LLViewerMedia::setAllMediaEnabled(bool val) LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel()); } - if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) + if (gSavedSettings.getBOOL("AudioStreamingMusic") && + !LLViewerMedia::isParcelAudioPlaying() && + gAudiop && + LLViewerMedia::hasParcelAudio()) { gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL()); } -- cgit v1.2.3 From d47ca7a671255adf6c4f16114516effde507ae3a Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Tue, 23 Feb 2010 07:51:05 +0200 Subject: No ticket. Set correct tag name for tab label attrbute in tabbed IM floater. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_im_container.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 964713adbf..65a05f3ec5 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -24,7 +24,7 @@ tab_height="16" use_custom_icon_ctrl="true" tab_icon_ctrl_pad="2" - font_halign="left" + halign="left" use_ellipses="true" top="0" width="390" /> -- cgit v1.2.3 From b9ed40255857fba7c58ae054796f308871c5e6d9 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Tue, 23 Feb 2010 09:45:16 +0200 Subject: Fxed normal bug EXT - 5465 (Invalid ellipsis usage for resident names in the IM tabs) - Added reshaping procedure for tabs with LLIconCtrl --HG-- branch : product-engine --- indra/llui/lltabcontainer.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 07e4cc22e0..46d2f92ad0 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -172,6 +172,10 @@ public: } } + LLIconCtrl* getIconCtrl() const + { + return mIcon; + } private: LLIconCtrl* mIcon; @@ -1629,6 +1633,7 @@ void LLTabContainer::setTabImage(LLPanel* child, LLIconCtrl* icon) if(button) { button->setIcon(icon); + reshapeTuple(tuple); } } } @@ -1639,12 +1644,22 @@ void LLTabContainer::reshapeTuple(LLTabTuple* tuple) if (!mIsVertical) { + S32 image_overlay_width = 0; + + if(mCustomIconCtrlUsed) + { + LLCustomButtonIconCtrl* button = dynamic_cast<LLCustomButtonIconCtrl*>(tuple->mButton); + LLIconCtrl* icon_ctrl = button->getIconCtrl(); + image_overlay_width = icon_ctrl ? icon_ctrl->getRect().getWidth() : 0; + } + else + { + image_overlay_width = tuple->mButton->getImageOverlay().notNull() ? + tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0; + } // remove current width from total tab strip width mTotalTabWidth -= tuple->mButton->getRect().getWidth(); - S32 image_overlay_width = tuple->mButton->getImageOverlay().notNull() ? - tuple->mButton->getImageOverlay()->getImage()->getWidth(0) : 0; - tuple->mPadding = image_overlay_width; tuple->mButton->reshape(llclamp(mFont->getWidth(tuple->mButton->getLabelSelected()) + tab_padding + tuple->mPadding, mMinTabWidth, mMaxTabWidth), -- cgit v1.2.3 From d5a0fd7997352c80273ccb172a40250204ee0b34 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 23 Feb 2010 13:20:43 +0200 Subject: Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only) - updated interfaces of LLSpeakingIndicatorManager::registerSpeakingIndicator & LLOutputMonitorCtrl::setSpeakerId to take a target session id for which registered indicator should be shown. --HG-- branch : product-engine --- indra/newview/lloutputmonitorctrl.cpp | 2 +- indra/newview/lloutputmonitorctrl.h | 10 +++++++++- indra/newview/llspeakingindicatormanager.cpp | 14 ++++++++++---- indra/newview/llspeakingindicatormanager.h | 6 +++++- 4 files changed, 25 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 9857e37bc3..f2253f89aa 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -247,7 +247,7 @@ void LLOutputMonitorCtrl::draw() gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE); } -void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) +void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id/* = LLUUID::null*/) { if (speaker_id.isNull() && mSpeakerId.notNull()) { diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 2bbfa251e9..b7454a5066 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -86,7 +86,15 @@ public: void setIsTalking(bool val) { mIsTalking = val; } - void setSpeakerId(const LLUUID& speaker_id); + /** + * Sets avatar UUID to interact with voice channel. + * + * @param speaker_id LLUUID of an avatar whose voice level is displayed. + * @param session_id session UUID for which indicator should be shown only. Passed to LLSpeakingIndicatorManager + * If this parameter is set registered indicator will be shown only in voice channel + * which has the same session id (EXT-5562). + */ + void setSpeakerId(const LLUUID& speaker_id, const LLUUID& session_id = LLUUID::null); //called by mute list virtual void onChange(); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index d33c050ee4..74b45217d3 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -65,8 +65,12 @@ public: * * @param speaker_id LLUUID of an avatar whose speaking indicator is registered. * @param speaking_indicator instance of the speaking indicator to be registered. + * @param session_id session UUID for which indicator should be shown only. + * If this parameter is set registered indicator will be shown only in voice channel + * which has the same session id (EXT-5562). */ - void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator); + void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, + const LLUUID& session_id = LLUUID::null); /** * Removes passed speaking indicator from observing. @@ -138,7 +142,8 @@ private: ////////////////////////////////////////////////////////////////////////// // PUBLIC SECTION ////////////////////////////////////////////////////////////////////////// -void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator) +void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, + const LLUUID& session_id) { // do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889. @@ -274,9 +279,10 @@ void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* c /* LLSpeakingIndicatorManager namespace implementation */ /************************************************************************/ -void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator) +void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, + const LLUUID& session_id/* = LLUUID::null*/) { - SpeakingIndicatorManager::instance().registerSpeakingIndicator(speaker_id, speaking_indicator); + SpeakingIndicatorManager::instance().registerSpeakingIndicator(speaker_id, speaking_indicator, session_id); } void LLSpeakingIndicatorManager::unregisterSpeakingIndicator(const LLUUID& speaker_id, const LLSpeakingIndicator* const speaking_indicator) diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h index ce0158f7d8..cd72b85bfd 100644 --- a/indra/newview/llspeakingindicatormanager.h +++ b/indra/newview/llspeakingindicatormanager.h @@ -52,8 +52,12 @@ namespace LLSpeakingIndicatorManager * * @param speaker_id LLUUID of an avatar whose speaker indicator is registered. * @param speaking_indicator instance of the speaker indicator to be registered. + * @param session_id session UUID for which indicator should be shown only. + * If this parameter is set registered indicator will be shown only in voice channel + * which has the same session id (EXT-5562). */ - void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator); + void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, + const LLUUID& session_id = LLUUID::null); /** * Removes passed speaking indicator from observing. -- cgit v1.2.3 From 1f8fb3f3bae92b9e632b8793ce4d8f59f9dfc1aa Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 23 Feb 2010 15:33:10 +0200 Subject: Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only) - updated code to store target session id for which registered indicator should be shown and process it while switching indicators on. --HG-- branch : product-engine --- indra/newview/llspeakingindicatormanager.cpp | 22 +++++++++++++++++++++- indra/newview/llspeakingindicatormanager.h | 11 +++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 74b45217d3..012e092a7f 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -152,6 +152,8 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i ensureInstanceDoesNotExist(speaking_indicator); + speaking_indicator->setTargetSessionID(session_id); + speaking_indicator_value_t value_type(speaker_id, speaking_indicator); mSpeakingIndicators.insert(value_type); @@ -222,6 +224,13 @@ void SpeakingIndicatorManager::onChange() void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& speakers_uuids, BOOL switch_on) { + LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); + LLUUID session_id; + if (voice_channel) + { + session_id = voice_channel->getSessionID(); + } + speaker_ids_t::const_iterator it_uuid = speakers_uuids.begin(); for (; it_uuid != speakers_uuids.end(); ++it_uuid) { @@ -233,13 +242,24 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea { was_found = true; LLSpeakingIndicator* indicator = (*it_indicator).second; - indicator->switchIndicator(switch_on); + + BOOL switch_current_on = switch_on; + + // we should show indicator for specified voice session only if this is current channel. EXT-5562. + if (switch_current_on && indicator->getTargetSessionID().notNull()) + { + switch_current_on = indicator->getTargetSessionID() == session_id; + } + + indicator->switchIndicator(switch_current_on); } if (was_found) { LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators where found" << LL_ENDL; + // *TODO: it is possible non of the registered indicators are in the target session + // we can avoid of storing such UUID in the mSwitchedIndicatorsOn map in this case. if (switch_on) { // store switched on indicator to be able switch it off diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h index cd72b85bfd..b75c65c064 100644 --- a/indra/newview/llspeakingindicatormanager.h +++ b/indra/newview/llspeakingindicatormanager.h @@ -38,7 +38,18 @@ class LLSpeakingIndicator { public: + virtual ~LLSpeakingIndicator(){} virtual void switchIndicator(bool switch_on) = 0; + void setTargetSessionID(const LLUUID& session_id) { mTargetSessionID = session_id; } + const LLUUID& getTargetSessionID() { return mTargetSessionID; } + +private: + /** + * session UUID for which indicator should be shown only. + * If it is set, registered indicator will be shown only in voice channel + * which has the same session id (EXT-5562). + */ + LLUUID mTargetSessionID; }; // See EXT-3976. -- cgit v1.2.3 From ef5e9472d3e767b32d807cb178e99d7117455b24 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Tue, 23 Feb 2010 16:57:39 +0200 Subject: Fixed normal bug (EXT-5554) 'Land for Sale' icon should always be visible. - Made 'Land for Sale' icon visible in Navigation bar even if "Show Parcel Properties" is off. --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a9ead36a70..f8f9ea7379 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -788,15 +788,19 @@ void LLLocationInputCtrl::refreshParcelIcons() // Our "cursor" moving right to left S32 x = mAddLandmarkBtn->getRect().mLeft; - if (gSavedSettings.getBOOL("NavBarShowParcelProperties")) - { - LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + + LLViewerRegion* agent_region = gAgent.getRegion(); + LLParcel* agent_parcel = vpm->getAgentParcel(); + if (!agent_region || !agent_parcel) + return; + + mForSaleBtn->setVisible(vpm->canAgentBuyParcel(agent_parcel, false)); - LLViewerRegion* agent_region = gAgent.getRegion(); - LLParcel* agent_parcel = vpm->getAgentParcel(); - if (!agent_region || !agent_parcel) - return; + x = layout_widget(mForSaleBtn, x); + if (gSavedSettings.getBOOL("NavBarShowParcelProperties")) + { LLParcel* current_parcel; LLViewerRegion* selection_region = vpm->getSelectionRegion(); LLParcel* selected_parcel = vpm->getParcelSelection()->getParcel(); @@ -816,7 +820,6 @@ void LLLocationInputCtrl::refreshParcelIcons() current_parcel = agent_parcel; } - bool allow_buy = vpm->canAgentBuyParcel(current_parcel, false); bool allow_voice = vpm->allowAgentVoice(agent_region, current_parcel); bool allow_fly = vpm->allowAgentFly(agent_region, current_parcel); bool allow_push = vpm->allowAgentPush(agent_region, current_parcel); @@ -825,7 +828,6 @@ void LLLocationInputCtrl::refreshParcelIcons() bool allow_damage = vpm->allowAgentDamage(agent_region, current_parcel); // Most icons are "block this ability" - mForSaleBtn->setVisible(allow_buy); mParcelIcon[VOICE_ICON]->setVisible( !allow_voice ); mParcelIcon[FLY_ICON]->setVisible( !allow_fly ); mParcelIcon[PUSH_ICON]->setVisible( !allow_push ); @@ -833,11 +835,10 @@ void LLLocationInputCtrl::refreshParcelIcons() mParcelIcon[SCRIPTS_ICON]->setVisible( !allow_scripts ); mParcelIcon[DAMAGE_ICON]->setVisible( allow_damage ); mDamageText->setVisible(allow_damage); - - x = layout_widget(mForSaleBtn, x); + // Padding goes to left of both landmark star and for sale btn x -= mAddLandmarkHPad; - + // Slide the parcel icons rect from right to left, adjusting rectangles for (S32 i = 0; i < ICON_COUNT; ++i) { @@ -849,7 +850,6 @@ void LLLocationInputCtrl::refreshParcelIcons() } else { - mForSaleBtn->setVisible(false); for (S32 i = 0; i < ICON_COUNT; ++i) { mParcelIcon[i]->setVisible(false); -- cgit v1.2.3 From a8165dfe59771962963e8a807b129c04a74f6d59 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine <ychebotarev@productengine.com> Date: Tue, 23 Feb 2010 18:05:00 +0200 Subject: fix for normal EXT-5598 Group member status list is sorted by name instead of date --HG-- branch : product-engine --- indra/llui/llscrolllistctrl.cpp | 26 ++++++++++++++++++++------ indra/llui/llscrolllistctrl.h | 35 +++++++++++++++++++++++++++++++++++ indra/newview/llgroupmgr.cpp | 3 ++- indra/newview/llpanelgroupgeneral.cpp | 16 ++++++++++++++++ indra/newview/llpanelgroupgeneral.h | 3 +++ 5 files changed, 76 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index ac4811210b..77caaaa425 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -71,8 +71,9 @@ static LLDefaultChildRegistry::Register<LLScrollListCtrl> r("scroll_list"); // local structures & classes. struct SortScrollListItem { - SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders) + SortScrollListItem(const std::vector<std::pair<S32, BOOL> >& sort_orders,const LLScrollListCtrl::sort_signal_t* sort_signal) : mSortOrders(sort_orders) + , mSortSignal(sort_signal) {} bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2) @@ -85,12 +86,20 @@ struct SortScrollListItem S32 col_idx = it->first; BOOL sort_ascending = it->second; + S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column? + const LLScrollListCell *cell1 = i1->getColumn(col_idx); const LLScrollListCell *cell2 = i2->getColumn(col_idx); - S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column? if (cell1 && cell2) { - sort_result = order * LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); + if(mSortSignal) + { + sort_result = order * (*mSortSignal)(col_idx,i1, i2); + } + else + { + sort_result = order * LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); + } if (sort_result != 0) { break; // we have a sort order! @@ -100,8 +109,10 @@ struct SortScrollListItem return sort_result < 0; } + typedef std::vector<std::pair<S32, BOOL> > sort_order_t; + const LLScrollListCtrl::sort_signal_t* mSortSignal; const sort_order_t& mSortOrders; }; @@ -169,6 +180,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) mOnSortChangedCallback( NULL ), mHighlightedItem(-1), mBorder(NULL), + mSortCallback(NULL), mPopupMenu(NULL), mNumDynamicWidthColumns(0), mTotalStaticColumnWidth(0), @@ -309,6 +321,8 @@ bool LLScrollListCtrl::preProcessChildNode(LLXMLNodePtr child) LLScrollListCtrl::~LLScrollListCtrl() { + delete mSortCallback; + std::for_each(mItemList.begin(), mItemList.end(), DeletePointer()); if( gEditMenuHandler == this ) @@ -540,7 +554,7 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r std::stable_sort( mItemList.begin(), mItemList.end(), - SortScrollListItem(single_sort_column)); + SortScrollListItem(single_sort_column,mSortCallback)); // ADD_SORTED just sorts by first column... // this might not match user sort criteria, so flag list as being in unsorted state @@ -2395,7 +2409,7 @@ void LLScrollListCtrl::updateSort() const std::stable_sort( mItemList.begin(), mItemList.end(), - SortScrollListItem(mSortColumns)); + SortScrollListItem(mSortColumns,mSortCallback)); mSorted = true; } @@ -2411,7 +2425,7 @@ void LLScrollListCtrl::sortOnce(S32 column, BOOL ascending) std::stable_sort( mItemList.begin(), mItemList.end(), - SortScrollListItem(sort_column)); + SortScrollListItem(sort_column,mSortCallback)); } void LLScrollListCtrl::dirtyColumns() diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index d2d2379328..bfff85315d 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -73,6 +73,32 @@ public: // *TODO: Add callbacks to Params typedef boost::function<void (void)> callback_t; + + template<typename T> struct maximum + { + typedef T result_type; + + template<typename InputIterator> + T operator()(InputIterator first, InputIterator last) const + { + // If there are no slots to call, just return the + // default-constructed value + if(first == last ) return T(); + T max_value = *first++; + while (first != last) { + if (max_value < *first) + max_value = *first; + ++first; + } + + return max_value; + } + }; + + + //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; + //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*)> sort_signal_t; + typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { @@ -362,6 +388,13 @@ public: void setNeedsSort(bool val = true) { mSorted = !val; } void dirtyColumns(); // some operation has potentially affected column layout or ordering + boost::signals2::connection setSortCallback(sort_signal_t::slot_type cb ) + { + if (!mSortCallback) mSortCallback = new sort_signal_t(); + return mSortCallback->connect(cb); + } + + protected: // "Full" interface: use this when you're creating a list that has one or more of the following: // * contains icons @@ -474,6 +507,8 @@ private: typedef std::pair<S32, BOOL> sort_column_t; std::vector<sort_column_t> mSortColumns; + + sort_signal_t* mSortCallback; }; // end class LLScrollListCtrl #endif // LL_SCROLLLISTCTRL_H diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 6e7321f739..ea5462a3e3 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -838,7 +838,8 @@ static void formatDateString(std::string &date_string) std::string day = result[2]; // ISO 8601 date format - date_string = llformat("%02s/%02s/%04s", month.c_str(), day.c_str(), year.c_str()); + //date_string = llformat("%02s/%02s/%04s", month.c_str(), day.c_str(), year.c_str()); + date_string = llformat("%04s/%02s/%04s", year.c_str(), month.c_str(), day.c_str()); } } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 555e277ce5..517204b232 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -111,6 +111,8 @@ BOOL LLPanelGroupGeneral::postBuild() { mListVisibleMembers->setDoubleClickCallback(openProfile, this); mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR); + + mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3)); } // Options @@ -944,4 +946,18 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id) activate(); } +S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,const LLScrollListItem* i2) +{ + const LLScrollListCell *cell1 = i1->getColumn(col_idx); + const LLScrollListCell *cell2 = i2->getColumn(col_idx); + + if(col_idx == 2) + { + if(LLStringUtil::compareDict(cell1->getValue().asString(),"Online") == 0 ) + return 1; + if(LLStringUtil::compareDict(cell2->getValue().asString(),"Online") == 0 ) + return -1; + } + return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); +} diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index 7e90e43cf9..cc3101539a 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -83,6 +83,9 @@ private: static void onReceiveNotices(LLUICtrl* ctrl, void* data); static void openProfile(void* data); + S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); + //void sortMembersList(S32 column); + static bool joinDlgCB(const LLSD& notification, const LLSD& response); void updateMembers(); -- cgit v1.2.3 From 6b6d8cee77bc236036d5d3cc47d9aa562d034827 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Tue, 23 Feb 2010 18:10:08 +0200 Subject: Fixed low priority bug EXT-5653 (View Profile: Hand-pointer is shown when hovering mouse above homepage that isn't a valid URL). Removed an unnecessary on-click callback (that caused the cursor change) from the textbox. --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 16 ---------------- indra/newview/llpanelavatar.h | 2 -- 2 files changed, 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index b61d3ef371..57b478ffef 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -47,7 +47,6 @@ #include "lltooldraganddrop.h" #include "llscrollcontainer.h" #include "llavatariconctrl.h" -#include "llweb.h" #include "llfloaterreg.h" #include "llnotificationsutil.h" #include "llvoiceclient.h" @@ -486,7 +485,6 @@ LLPanelAvatarProfile::LLPanelAvatarProfile() BOOL LLPanelAvatarProfile::postBuild() { - childSetActionTextbox("homepage_edit", boost::bind(&LLPanelAvatarProfile::onHomepageTextboxClicked, this)); childSetCommitCallback("add_friend",(boost::bind(&LLPanelAvatarProfile::onAddFriendButtonClick,this)),NULL); childSetCommitCallback("im",(boost::bind(&LLPanelAvatarProfile::onIMButtonClick,this)),NULL); childSetCommitCallback("call",(boost::bind(&LLPanelAvatarProfile::onCallButtonClick,this)),NULL); @@ -732,20 +730,6 @@ void LLPanelAvatarProfile::csr() LLAvatarActions::csr(getAvatarId(), name); } -void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url) -{ - LLWeb::loadURL(url); -} - -void LLPanelAvatarProfile::onHomepageTextboxClicked() -{ - std::string url = childGetValue("homepage_edit").asString(); - if(!url.empty()) - { - onUrlTextboxClicked(url); - } -} - void LLPanelAvatarProfile::onAddFriendButtonClick() { LLAvatarActions::requestFriendshipDialog(getAvatarId()); diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index babbe534b4..2bd23b6e9c 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -207,8 +207,6 @@ protected: bool enableGod(); - void onUrlTextboxClicked(const std::string& url); - void onHomepageTextboxClicked(); void onAddFriendButtonClick(); void onIMButtonClick(); void onCallButtonClick(); -- cgit v1.2.3 From 8bf9bc2dc7e7af3e229ba6c02bdabdf1aa82ba71 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Tue, 23 Feb 2010 18:10:35 +0200 Subject: Removed an unnecessary include. --HG-- branch : product-engine --- indra/newview/llstartup.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 83f773fadc..025dd6029a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -121,7 +121,6 @@ #include "lllogininstance.h" // Host the login module. #include "llpanellogin.h" #include "llmutelist.h" -#include "llpanelavatar.h" #include "llavatarpropertiesprocessor.h" #include "llfloaterevent.h" #include "llpanelclassified.h" -- cgit v1.2.3 From 57a81ed44da18beb26f18d16b0dde6f5a0c538e0 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Tue, 23 Feb 2010 18:32:55 +0200 Subject: No ticket. Fixed Windows Release build (warning treated as error) Warning: c:\slbuild\viewer-2-0\libraries\include\boost\lexical_cast.hpp(1159) : warning C4702: unreachable code Reason: additional boost lib dependence after changes (EXT-5215) for EXT-5215 (Disable showing full yyyy/mm/dd timestamp for messages (nearby chat/im) --HG-- branch : product-engine --- indra/newview/lllogchat.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra') diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index 16b13d9218..be8b2363ad 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -46,7 +46,17 @@ #include <boost/regex.hpp> #include <boost/regex/v4/match_results.hpp> +#if LL_MSVC +// disable warning about boost::lexical_cast unreachable code +// when it fails to parse the string +#pragma warning (disable:4702) +#endif + #include <boost/date_time/gregorian/gregorian.hpp> +#if LL_MSVC +#pragma warning(pop) // Restore all warnings to the previous state +#endif + #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/date_time/local_time_adjustor.hpp> -- cgit v1.2.3 From a17f39ee1d537b61e9e24f0aeb0fc52138302322 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine <ychebotarev@productengine.com> Date: Tue, 23 Feb 2010 18:38:26 +0200 Subject: cleanup --HG-- branch : product-engine --- indra/newview/llpanelgroupgeneral.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index cc3101539a..6245018871 100644 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -84,7 +84,6 @@ private: static void openProfile(void* data); S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*); - //void sortMembersList(S32 column); static bool joinDlgCB(const LLSD& notification, const LLSD& response); -- cgit v1.2.3 From 1bd720eefbd37fc123bf8d24f1134c0cb6d00b82 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine <ychebotarev@productengine.com> Date: Tue, 23 Feb 2010 18:45:51 +0200 Subject: cleanup and fix build --HG-- branch : product-engine --- indra/llui/llscrolllistctrl.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index bfff85315d..50999993b5 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -96,9 +96,7 @@ public: }; - //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; - //typedef boost::signals2::signal<void (S32,const LLScrollListItem*,const LLScrollListItem*)> sort_signal_t; - typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32>> sort_signal_t; + typedef boost::signals2::signal<S32 (S32,const LLScrollListItem*,const LLScrollListItem*),maximum<S32> > sort_signal_t; struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> { -- cgit v1.2.3 From bbb6a7efb01623eab72c4d06cc2965f31cceeeac Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Tue, 23 Feb 2010 18:48:30 +0200 Subject: Implemented major sub-task EXT-5556 (hard-coded: menu Build > Object > Take. The word "Take" is hard-coded) --HG-- branch : product-engine --- indra/newview/llviewermenu.cpp | 38 +++++++--------------- indra/newview/skins/default/xui/en/menu_object.xml | 28 +++++++++++----- indra/newview/skins/default/xui/en/menu_viewer.xml | 30 +++++++++++------ 3 files changed, 52 insertions(+), 44 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 02bde51fb6..15c72fdef1 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4422,35 +4422,22 @@ bool visible_take_object() return !is_selection_buy_not_take() && enable_take(); } +bool tools_visible_buy_object() +{ + return is_selection_buy_not_take(); +} + +bool tools_visible_take_object() +{ + return !is_selection_buy_not_take(); +} + class LLToolsEnableBuyOrTake : public view_listener_t { bool handleEvent(const LLSD& userdata) { bool is_buy = is_selection_buy_not_take(); bool new_value = is_buy ? enable_buy_object() : enable_take(); - - // Update label - std::string label; - std::string buy_text; - std::string take_text; - std::string param = userdata.asString(); - std::string::size_type offset = param.find(","); - if (offset != param.npos) - { - buy_text = param.substr(0, offset); - take_text = param.substr(offset+1); - } - if (is_buy) - { - label = buy_text; - } - else - { - label = take_text; - } - gMenuHolder->childSetText("Pie Object Take", label); - gMenuHolder->childSetText("Menu Object Take", label); - return new_value; } }; @@ -7802,12 +7789,11 @@ void initialize_menus() view_listener_t::addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); view_listener_t::addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); enable.add("Tools.EnableTakeCopy", boost::bind(&enable_object_take_copy)); + enable.add("Tools.VisibleBuyObject", boost::bind(&tools_visible_buy_object)); + enable.add("Tools.VisibleTakeObject", boost::bind(&tools_visible_take_object)); view_listener_t::addMenu(new LLToolsEnableSaveToInventory(), "Tools.EnableSaveToInventory"); view_listener_t::addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.EnableSaveToObjectInventory"); - /*view_listener_t::addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject"); - view_listener_t::addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/ - // Help menu // most items use the ShowFloater method diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index d66818e91a..9436b2cd73 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -124,16 +124,28 @@ </menu_item_call> </context_menu> <menu_item_separator layout="topleft" /> - <menu_item_call - enabled="false" + <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_enable - function="Tools.EnableBuyOrTake" - parameter="Buy,Take" /> - </menu_item_call> + <menu_item_call.on_click + function="Tools.BuyOrTake"/> + <menu_item_call.on_visible + function="Tools.VisibleTakeObject"/> + <menu_item_call.on_enable + function="Tools.EnableBuyOrTake"/> + </menu_item_call> <menu_item_call enabled="false" label="Take Copy" diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 4c4867b862..158e764eae 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -719,16 +719,26 @@ name="Object" tear_off="true"> <menu_item_call - label="Buy" - layout="topleft" - name="Menu Object Take" - visible="true"> - <menu_item_call.on_click - function="Tools.BuyOrTake" /> - <menu_item_call.on_enable - function="Tools.EnableBuyOrTake" - name="EnableBuyOrTake" - parameter="Buy,Take" /> + label="Buy" + layout="topleft" + name="Menu Object Buy"> + <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="Menu Object Take"> + <menu_item_call.on_click + function="Tools.BuyOrTake"/> + <menu_item_call.on_visible + function="Tools.VisibleTakeObject"/> + <menu_item_call.on_enable + function="Tools.EnableBuyOrTake"/> </menu_item_call> <menu_item_call label="Take Copy" -- cgit v1.2.3 From 83712555cf330e7ae84b31e9f54031a56c3a85e2 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Tue, 23 Feb 2010 19:49:44 +0200 Subject: fixed Low bug EXT-5126 Not enough padding on left edge of Nearby Chat toasts Solution: Nearby Chat toasts has been aligned with the chat input field --HG-- branch : product-engine --- indra/newview/llnearbychathandler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index 3c390c0281..a211adc79d 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -34,6 +34,7 @@ #include "llnearbychathandler.h" +#include "llbottomtray.h" #include "llchatitemscontainerctrl.h" #include "llnearbychat.h" #include "llrecentpeople.h" @@ -319,9 +320,9 @@ LLNearbyChatHandler::~LLNearbyChatHandler() void LLNearbyChatHandler::initChannel() { LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); + LLView* chat_box = LLBottomTray::getInstance()->getChildView("chat_box"); S32 channel_right_bound = nearby_chat->getRect().mRight; - S32 channel_width = nearby_chat->getRect().mRight; - mChannel->init(channel_right_bound - channel_width, channel_right_bound); + mChannel->init(chat_box->getRect().mLeft, channel_right_bound); } -- cgit v1.2.3 From 8ae07481a4adefd7111754e2456c498c17f90e96 Mon Sep 17 00:00:00 2001 From: Palmer Truelson <palmer@lindenlab.com> Date: Tue, 23 Feb 2010 22:57:54 -0800 Subject: EXT-5684 - Added some more gpus to gpu table. no code changed --- indra/newview/gpu_table.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index 887dab66d1..aa0e21ea8f 100644 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -47,8 +47,10 @@ ATI ASUS EAH26xx .*ATI.*ASUS.*EAH26.* 3 1 ATI ASUS EAH34xx .*ATI.*ASUS.*EAH34.* 1 1 ATI ASUS EAH36xx .*ATI.*ASUS.*EAH36.* 3 1 ATI ASUS EAH38xx .*ATI.*ASUS.*EAH38.* 3 1 +ATI ASUS EAH45xx .*ATI.*ASUS.*EAH45.* 1 1 ATI ASUS EAH48xx .*ATI.*ASUS.*EAH48.* 3 1 -ATI Radeon X1xxx .*ATI.*ASUS.*X1.* 2 1 +ATI ASUS EAH57xx .*ATI.*ASUS.*EAH57.* 3 1 +ATI Radeon X1xxx .*ATI.*ASUS.*X1.* 3 1 ATI Radeon X7xx .*ATI.*ASUS.*X7.* 1 1 ATI Radeon X500 .*ATI.*Diamond X5.* 1 1 ATI Radeon X13xx .*ATI.*Diamond X13.* 1 1 @@ -95,10 +97,16 @@ ATI Radeon HD 3300 .*ATI.*Radeon HD.*33.* 1 1 ATI Radeon HD 3400 .*ATI.*Radeon HD.*34.* 1 1 ATI Radeon HD 3600 .*ATI.*Radeon HD.*36.* 3 1 ATI Radeon HD 3800 .*ATI.*Radeon HD.*38.* 3 1 +ATI Radeon HD 4200 .*ATI.*Radeon HD 42.* 1 1 ATI Radeon HD 4300 .*ATI.*Radeon HD 43.* 1 1 -ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 2 1 -ATI Radeon HD 4600 .*ATI.*Radeon HD 46.* 3 1 +ATI Radeon HD 4500 .*ATI.*Radeon HD 45.* 3 1 +ATI Radeon HD 4600 .*ATI.*Radeon HD.*46.* 3 1 +ATI Radeon HD 4700 .*ATI.*Radeon HD 47.* 3 1 ATI Radeon HD 4800 .*ATI.*Radeon.*HD.*48.* 3 1 +ATI Radeon HD 5600 .*ATI.*Radeon.*HD.*56.* 3 1 +ATI Radeon HD 5700 .*ATI.*Radeon.*HD.*57.* 3 1 +ATI Radeon HD 5800 .*ATI.*Radeon.*HD.*58.* 3 1 +ATI Radeon HD 5900 .*ATI.*Radeon.*HD.*59.* 3 1 ATI Radeon OpenGL .*ATI.*Radeon OpenGL.* 0 0 ATI Radeon 2100 .*ATI.*Radeon 21.* 0 1 ATI Radeon 3100 .*ATI.*Radeon 31.* 1 1 @@ -152,13 +160,17 @@ Intel 945G .*Intel.*945G.* 0 1 Intel 950 .*Intel.*950.* 0 1 Intel 965 .*Intel.*965.* 0 1 Intel G33 .*Intel.*G33.* 0 0 +Intel G41 .*Intel.*G41.* 0 1 Intel G45 .*Intel.*G45.* 0 1 Intel Bear Lake .*Intel.*Bear Lake.* 0 0 Intel Broadwater .*Intel.*Broadwater.* 0 0 Intel Brookdale .*Intel.*Brookdale.* 0 0 Intel Cantiga .*Intel.*Cantiga.* 0 0 Intel Eaglelake .*Intel.*Eaglelake.* 0 1 +Intel Mobile 4 Series .*Intel.*Mobile.*4 Series.* 0 1 +Intel Media Graphics HD .*Intel.*Media.*Graphics.*HD.* 0 1 Intel Montara .*Intel.*Montara.* 0 0 +Intel Pineview .*Intel.*Pineview.* 0 1 Intel Springdale .*Intel.*Springdale.* 0 0 Matrox .*Matrox.* 0 0 Mesa .*Mesa.* 0 0 -- cgit v1.2.3 From 245fe3edc6fa7333c16efcc90a4a52db8450a828 Mon Sep 17 00:00:00 2001 From: Palmer Truelson <palmer@lindenlab.com> Date: Tue, 23 Feb 2010 23:02:20 -0800 Subject: Fix compiler complaints about signed/unsigned mismatch --- indra/newview/llface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index c473be852d..9de69a8173 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1065,14 +1065,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, mVertexBuffer->getIndexStrider(indicesp, mIndicesIndex); if (LLPipeline::sUseTriStrips) { - for (U32 i = 0; i < num_indices; i++) + for (U32 i = 0; i < (U32) num_indices; i++) { *indicesp++ = vf.mTriStrip[i] + index_offset; } } else { - for (U32 i = 0; i < num_indices; i++) + for (U32 i = 0; i < (U32) num_indices; i++) { *indicesp++ = vf.mIndices[i] + index_offset; } -- cgit v1.2.3 From 1d45b1edcd3570b27622c0e99cf0bd5aee331cc1 Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Wed, 24 Feb 2010 10:16:35 +0200 Subject: Fixed normal but EXT - 5108 (Preferences vertical tabs don't align to tab container) - Added offset in TabContainer between Tab and TabPanel in case of VERTICAL Tabs orientation. --HG-- branch : product-engine --- indra/llui/lltabcontainer.cpp | 2 +- indra/newview/skins/default/xui/en/floater_preferences.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 46d2f92ad0..284e3e5e26 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -955,7 +955,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) LLRect tab_panel_rect; if (!getTabsHidden() && mIsVertical) { - tab_panel_rect = LLRect(mMinTabWidth + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad, + tab_panel_rect = LLRect(mMinTabWidth + mRightTabBtnOffset + (LLPANEL_BORDER_WIDTH * 2) + tabcntrv_pad, getRect().getHeight() - LLPANEL_BORDER_WIDTH, getRect().getWidth() - LLPANEL_BORDER_WIDTH, LLPANEL_BORDER_WIDTH); diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index 7aa8e23e76..d7a7daf30c 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -46,6 +46,7 @@ tab_group="1" tab_position="left" tab_width="115" + tab_padding_right="5" top="21" width="620"> <panel -- cgit v1.2.3 From 022c433d53538350d840125de2733c639261cd4d Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 10:59:52 +0200 Subject: Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only) - implemented passing of target session UUID for which registered indicator should be shown only. --HG-- branch : product-engine --- indra/newview/llavatarlist.cpp | 2 +- indra/newview/llavatarlist.h | 3 +++ indra/newview/llavatarlistitem.cpp | 4 ++-- indra/newview/llavatarlistitem.h | 2 +- indra/newview/lloutputmonitorctrl.cpp | 2 +- indra/newview/llparticipantlist.cpp | 2 ++ 6 files changed, 10 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 6784e6693b..50d8672083 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -329,7 +329,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is { LLAvatarListItem* item = new LLAvatarListItem(); item->setName(name); - item->setAvatarId(id, mIgnoreOnlineStatus); + item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus); item->setOnline(mIgnoreOnlineStatus ? true : is_online); item->showLastInteractionTime(mShowLastInteractionTime); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index aeed4fee08..0e4215e91a 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -78,6 +78,8 @@ public: bool contains(const LLUUID& id); void setContextMenu(LLAvatarListItem::ContextMenu* menu) { mContextMenu = menu; } + void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } + const LLUUID& getSessionID() { return mSessionID; } void toggleIcons(); void setSpeakingIndicatorsVisible(bool visible); @@ -119,6 +121,7 @@ private: std::string mIconParamName; std::string mNameFilter; uuid_vector_t mIDs; + LLUUID mSessionID; LLAvatarListItem::ContextMenu* mContextMenu; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 5011b191f4..9645e75e60 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -211,14 +211,14 @@ void LLAvatarListItem::setState(EItemState item_style) mAvatarIcon->setColor(item_icon_color_map[item_style]); } -void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) +void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes) { if (mAvatarId.notNull()) LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this); mAvatarId = id; mAvatarIcon->setValue(id); - mSpeakingIndicator->setSpeakerId(id); + mSpeakingIndicator->setSpeakerId(id, session_id); // We'll be notified on avatar online status changes if (!ignore_status_changes && mAvatarId.notNull()) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 426d80e0a8..cecb64add7 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -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, bool ignore_status_changes = false); + void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false); 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/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index f2253f89aa..28d24f80fd 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -263,7 +263,7 @@ void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id, const LLUUID& s } mSpeakerId = speaker_id; - LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this); + LLSpeakingIndicatorManager::registerSpeakingIndicator(mSpeakerId, this, session_id); //mute management if (mAutoUpdate) diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 1c4004c37a..2748daaffa 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -70,6 +70,8 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mSpeakerMgr->addListener(mSpeakerModeratorListener, "update_moderator"); mAvatarList->setNoItemsCommentText(LLTrans::getString("LoadingData")); + LL_DEBUGS("SpeakingIndicator") << "Set session for speaking indicators: " << mSpeakerMgr->getSessionID() << LL_ENDL; + mAvatarList->setSessionID(mSpeakerMgr->getSessionID()); mAvatarListDoubleClickConnection = mAvatarList->setItemDoubleClickCallback(boost::bind(&LLParticipantList::onAvatarListDoubleClicked, this, _1)); mAvatarListRefreshConnection = mAvatarList->setRefreshCompleteCallback(boost::bind(&LLParticipantList::onAvatarListRefreshed, this, _1, _2)); // Set onAvatarListDoubleClicked as default on_return action. -- cgit v1.2.3 From 2fc5956d9d65b0139549d471b48464090843fdee Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 11:13:52 +0200 Subject: Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only) -- added more log information -- session uuid can now be set only from SpeakingIndicatorManager to ensure target session is the same indicator was registered with. -- comments cleanup --HG-- branch : product-engine --- indra/newview/lloutputmonitorctrl.cpp | 2 +- indra/newview/llspeakingindicatormanager.cpp | 5 +++-- indra/newview/llspeakingindicatormanager.h | 11 +++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 28d24f80fd..9ab943de9c 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -303,7 +303,7 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on) } // otherwise remember necessary state and mark itself as dirty. - // State will be applied i next draw when parents chain became visible. + // State will be applied in next draw when parents chain becomes visible. else { LL_DEBUGS("SpeakingIndicator") << "Indicator is not in visible chain, parent won't be notified: " << mSpeakerId << LL_ENDL; diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 012e092a7f..3c660f4d6a 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -147,7 +147,7 @@ void SpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_i { // do not exclude agent's indicators. They should be processed in the same way as others. See EXT-3889. - LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << LL_ENDL; + LL_DEBUGS("SpeakingIndicator") << "Registering indicator: " << speaker_id << "|"<< speaking_indicator << ", session: " << session_id << LL_ENDL; ensureInstanceDoesNotExist(speaking_indicator); @@ -249,6 +249,7 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea if (switch_current_on && indicator->getTargetSessionID().notNull()) { switch_current_on = indicator->getTargetSessionID() == session_id; + LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL; } indicator->switchIndicator(switch_current_on); @@ -300,7 +301,7 @@ void SpeakingIndicatorManager::ensureInstanceDoesNotExist(LLSpeakingIndicator* c /************************************************************************/ void LLSpeakingIndicatorManager::registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, - const LLUUID& session_id/* = LLUUID::null*/) + const LLUUID& session_id) { SpeakingIndicatorManager::instance().registerSpeakingIndicator(speaker_id, speaking_indicator, session_id); } diff --git a/indra/newview/llspeakingindicatormanager.h b/indra/newview/llspeakingindicatormanager.h index b75c65c064..8d7aba1d6c 100644 --- a/indra/newview/llspeakingindicatormanager.h +++ b/indra/newview/llspeakingindicatormanager.h @@ -35,15 +35,22 @@ #ifndef LL_LLSPEAKINGINDICATORMANAGER_H #define LL_LLSPEAKINGINDICATORMANAGER_H +class SpeakingIndicatorManager; + class LLSpeakingIndicator { public: virtual ~LLSpeakingIndicator(){} virtual void switchIndicator(bool switch_on) = 0; + +private: + friend class SpeakingIndicatorManager; + // Accessors for target voice session UUID. + // They are intended to be used only from SpeakingIndicatorManager to ensure target session is + // the same indicator was registered with. void setTargetSessionID(const LLUUID& session_id) { mTargetSessionID = session_id; } const LLUUID& getTargetSessionID() { return mTargetSessionID; } -private: /** * session UUID for which indicator should be shown only. * If it is set, registered indicator will be shown only in voice channel @@ -68,7 +75,7 @@ namespace LLSpeakingIndicatorManager * which has the same session id (EXT-5562). */ void registerSpeakingIndicator(const LLUUID& speaker_id, LLSpeakingIndicator* const speaking_indicator, - const LLUUID& session_id = LLUUID::null); + const LLUUID& session_id); /** * Removes passed speaking indicator from observing. -- cgit v1.2.3 From 2ad421cef67b12fad0f854b252f9d4d4e9025fd4 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 11:53:10 +0200 Subject: Work on major bug EXT-5562 (Misleading Active Voice Indicators in Group Chat Window, when Speakers are in Spatial Chat Only) Completed -- code improvements: updated condition to store really switched on indicators for future switching off. --HG-- branch : product-engine --- indra/newview/lloutputmonitorctrl.cpp | 2 +- indra/newview/llspeakingindicatormanager.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 9ab943de9c..d6d48a4ead 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -317,7 +317,7 @@ void LLOutputMonitorCtrl::switchIndicator(bool switch_on) ////////////////////////////////////////////////////////////////////////// void LLOutputMonitorCtrl::notifyParentVisibilityChanged() { - LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << " ,new_visibility: " << getVisible() << LL_ENDL; + LL_DEBUGS("SpeakingIndicator") << "Notify parent that visibility was changed: " << mSpeakerId << ", new_visibility: " << getVisible() << LL_ENDL; LLSD params = LLSD().with("visibility_changed", getVisible()); diff --git a/indra/newview/llspeakingindicatormanager.cpp b/indra/newview/llspeakingindicatormanager.cpp index 3c660f4d6a..cc06179481 100644 --- a/indra/newview/llspeakingindicatormanager.cpp +++ b/indra/newview/llspeakingindicatormanager.cpp @@ -238,6 +238,7 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea indicator_range_t it_range = mSpeakingIndicators.equal_range(*it_uuid); indicator_const_iterator it_indicator = it_range.first; bool was_found = false; + bool was_switched_on = false; for (; it_indicator != it_range.second; ++it_indicator) { was_found = true; @@ -251,17 +252,22 @@ void SpeakingIndicatorManager::switchSpeakerIndicators(const speaker_ids_t& spea switch_current_on = indicator->getTargetSessionID() == session_id; LL_DEBUGS("SpeakingIndicator") << "Session: " << session_id << ", target: " << indicator->getTargetSessionID() << ", the same? = " << switch_current_on << LL_ENDL; } + was_switched_on = was_switched_on || switch_current_on; indicator->switchIndicator(switch_current_on); + } if (was_found) { LL_DEBUGS("SpeakingIndicator") << mSpeakingIndicators.count(*it_uuid) << " indicators where found" << LL_ENDL; - // *TODO: it is possible non of the registered indicators are in the target session - // we can avoid of storing such UUID in the mSwitchedIndicatorsOn map in this case. - if (switch_on) + if (switch_on && !was_switched_on) + { + LL_DEBUGS("SpeakingIndicator") << "but non of them where switched on" << LL_ENDL; + } + + if (was_switched_on) { // store switched on indicator to be able switch it off mSwitchedIndicatorsOn.insert(*it_uuid); -- cgit v1.2.3 From d7945e5d31f3cf8da0e21d417ad07459b12e8711 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Wed, 24 Feb 2010 12:43:27 +0200 Subject: =?UTF-8?q?implemented=20EXT-4641=20=E2=80=9C[BSI]=20Undocked=20ca?= =?UTF-8?q?mera=20and=20movement=20floaters=20position=20should=20persist?= =?UTF-8?q?=20across=20the=20sessions=E2=80=9D,=20made=20move=20and=20came?= =?UTF-8?q?ra=20floaters=20save=20dock=20state;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/llui/lldockablefloater.cpp | 8 ++------ indra/llui/lldockablefloater.h | 2 +- indra/newview/llimfloater.cpp | 2 ++ indra/newview/llscriptfloater.cpp | 4 +++- indra/newview/skins/default/xui/en/floater_camera.xml | 1 + indra/newview/skins/default/xui/en/floater_moveview.xml | 1 + 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp index 0492ab0f25..3d8670fef2 100644 --- a/indra/llui/lldockablefloater.cpp +++ b/indra/llui/lldockablefloater.cpp @@ -202,10 +202,6 @@ void LLDockableFloater::setDocked(bool docked, bool pop_on_undock) translate(0, UNDOCK_LEAP_HEIGHT); } } - else - { - docked = false; - } LLFloater::setDocked(docked, pop_on_undock); } @@ -223,10 +219,10 @@ void LLDockableFloater::draw() LLFloater::draw(); } -void LLDockableFloater::setDockControl(LLDockControl* dockControl, bool docked /* = true */) +void LLDockableFloater::setDockControl(LLDockControl* dockControl) { mDockControl.reset(dockControl); - setDocked(docked && mDockControl.get() != NULL && mDockControl.get()->isDockVisible()); + setDocked(isDocked()); } const LLUIImagePtr& LLDockableFloater::getDockTongue() diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 4d747390af..2b1ce99ae2 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -127,7 +127,7 @@ private: void resetInstance(); protected: - void setDockControl(LLDockControl* dockControl, bool docked = true); + void setDockControl(LLDockControl* dockControl); const LLUIImagePtr& getDockTongue(); private: diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 098e540678..8cdc50eb70 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -112,6 +112,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id) setOverlapsScreenChannel(true); LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this); + + setDocked(true); } void LLIMFloater::onFocusLost() diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp index a88a242fbe..32fd42aded 100644 --- a/indra/newview/llscriptfloater.cpp +++ b/indra/newview/llscriptfloater.cpp @@ -283,7 +283,9 @@ void LLScriptFloater::dockToChiclet(bool dock) setSavePosition(false); setDockControl(new LLDockControl(chiclet, this, getDockTongue(), - LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1)), dock); + LLDockControl::TOP, boost::bind(&LLScriptFloater::getAllowedRect, this, _1))); + + setDocked(dock); // Restore saving setSavePosition(save); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 2bd8420925..1b8bbe42d2 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -12,6 +12,7 @@ help_topic="camera_floater" save_rect="true" save_visibility="true" + save_dock_state="true" single_instance="true" width="150"> <floater.string diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 851a689d42..0a5820ce73 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -12,6 +12,7 @@ help_topic="move_floater" save_rect="true" save_visibility="true" + save_dock_state="true" width="115"> <string name="walk_forward_tooltip"> -- cgit v1.2.3 From 887d03e55fe0a2086b21f401f74908c395749660 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Wed, 24 Feb 2010 15:02:18 +0200 Subject: back out a fix for EXT-5194 at changeset a577d1cad9ff --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 9 --------- indra/newview/lllocationinputctrl.h | 7 ------- 2 files changed, 16 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index a9ead36a70..04c684b240 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -674,15 +674,6 @@ void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) _1, filter)); } } - if(mList->isEmpty()) - { - /** - * Add a couple of empty items for a better view. - * EXT-5194 - */ - for(int i = 0; i < NUMBER_OF_EMPTY_ITEMS; i++ ) - add("", LLSD()); - } sortByName(); mList->mouseOverHighlightNthItem(-1); // Clear highlight on the last selected item. diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index ee128a5cf7..4bb41f3bf4 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -120,13 +120,6 @@ private: ICON_COUNT }; - /** - * This constant holds number of empty dropdown items, which will be displayed instead of doing nothing when the list is empty. - * Added due to EXT-5194 - */ - static const S32 NUMBER_OF_EMPTY_ITEMS = 3; - - friend class LLUICtrlFactory; LLLocationInputCtrl(const Params&); virtual ~LLLocationInputCtrl(); -- cgit v1.2.3 From 7bb3d971100f3d061de1b63fc13af3fdb3a5d03a Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Wed, 24 Feb 2010 16:34:55 +0200 Subject: Fixed bug EXT-5688 (Strange date format in group members table). * Removed the excessive zeroes from day format. * Fixed padding with spaces instead of zeroes on Linux. --HG-- branch : product-engine --- indra/newview/llgroupmgr.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index ea5462a3e3..aeac3841f9 100644 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -56,6 +56,16 @@ #include "lluictrlfactory.h" #include <boost/regex.hpp> +#if LL_MSVC +// disable boost::lexical_cast warning +#pragma warning (disable:4702) +#endif + +#include <boost/lexical_cast.hpp> + +#if LL_MSVC +#pragma warning(pop) // Restore all warnings to the previous state +#endif const U32 MAX_CACHED_GROUPS = 10; @@ -833,13 +843,13 @@ static void formatDateString(std::string &date_string) const regex expression("([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})"); if (regex_match(date_string.c_str(), result, expression)) { - std::string year = result[3]; - std::string month = result[1]; - std::string day = result[2]; + // convert matches to integers so that we can pad them with zeroes on Linux + S32 year = boost::lexical_cast<S32>(result[3]); + S32 month = boost::lexical_cast<S32>(result[1]); + S32 day = boost::lexical_cast<S32>(result[2]); // ISO 8601 date format - //date_string = llformat("%02s/%02s/%04s", month.c_str(), day.c_str(), year.c_str()); - date_string = llformat("%04s/%02s/%04s", year.c_str(), month.c_str(), day.c_str()); + date_string = llformat("%04d/%02d/%02d", year, month, day); } } -- cgit v1.2.3 From acc97bd55fbdaecb16f47ae53e896eb0ca7d53c5 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 16:41:28 +0200 Subject: Work on major bug EXT-5589 (Notifications button falls under side panel) Applayed Eugene Mutavchi's patch: -- removed min/max width params from xml <string> tags -- "min_width" for nearby chat bar now is got from the an appropriate layout panel params -- "max_width" for nearby chat bar is moved to constant. --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 12 +++++----- indra/newview/llnearbychatbar.cpp | 26 ---------------------- indra/newview/llnearbychatbar.h | 3 --- .../skins/default/xui/da/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/de/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/en/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/es/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/fr/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/it/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/ja/panel_nearby_chat_bar.xml | 6 ----- .../skins/default/xui/pt/panel_nearby_chat_bar.xml | 6 ----- 11 files changed, 6 insertions(+), 83 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 24b8ef3320..3511328161 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -60,6 +60,7 @@ namespace const std::string& PANEL_MOVEMENT_NAME = "movement_panel"; const std::string& PANEL_CAMERA_NAME = "cam_panel"; const std::string& PANEL_GESTURE_NAME = "gesture_panel"; + const S32 MAX_CHAT_BAR_WIDTH = 320; S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel) { @@ -672,7 +673,7 @@ S32 LLBottomTray::processWidthDecreased(S32 delta_width) } const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) { // we have some space to decrease chatbar panel @@ -748,8 +749,7 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); - const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth(); + const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); const S32 chatbar_available_shrink_width = chatbar_panel_width - chatbar_panel_min_width; const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; @@ -826,9 +826,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) // how many space can nearby chatbar take? S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth(); - if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width) + if (delta_width > 0 && chatbar_panel_width_ < MAX_CHAT_BAR_WIDTH) { - S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; + S32 delta_panel_max = MAX_CHAT_BAR_WIDTH - chatbar_panel_width_; S32 delta_panel = llmin(delta_width, delta_panel_max); lldebugs << "Unprocesed delta width: " << delta_width << ", can be applied to chatbar: " << delta_panel_max @@ -1186,7 +1186,7 @@ bool LLBottomTray::setVisibleAndFitWidths(EResizeState object_type, bool visible { // Calculate the possible shrunk width as difference between current and minimal widths const S32 chatbar_shrunk_width = - mNearbyChatBar->getRect().getWidth() - mNearbyChatBar->getMinWidth(); + mNearbyChatBar->getRect().getWidth() - get_panel_min_width(mToolbarStack, mNearbyChatBar); const S32 sum_of_min_widths = get_panel_min_width(mToolbarStack, mStateProcessedObjectMap[RS_BUTTON_CAMERA]) + diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index ad98a29fb2..483756b16e 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -407,32 +407,6 @@ BOOL LLNearbyChatBar::handleKeyHere( KEY key, MASK mask ) return handled; } -S32 LLNearbyChatBar::getMinWidth() const -{ - static S32 min_width = -1; - - if (min_width < 0) - { - const std::string& s = getString("min_width"); - min_width = !s.empty() ? atoi(s.c_str()) : 300; - } - - return min_width; -} - -S32 LLNearbyChatBar::getMaxWidth() const -{ - static S32 max_width = -1; - - if (max_width < 0) - { - const std::string& s = getString("max_width"); - max_width = !s.empty() ? atoi(s.c_str()) : 510; - } - - return max_width; -} - BOOL LLNearbyChatBar::matchChatTypeTrigger(const std::string& in_str, std::string* out_str) { U32 in_len = in_str.length(); diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index d9a7403611..559c1ee091 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -117,9 +117,6 @@ public: static void sendChatFromViewer(const std::string &utf8text, EChatType type, BOOL animate); static void sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL animate); - S32 getMinWidth() const; - S32 getMaxWidth() const; - protected: static BOOL matchChatTypeTrigger(const std::string& in_str, std::string* out_str); static void onChatBoxKeystroke(LLLineEditor* caller, void* userdata); diff --git a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml index 2aa7ed7c6c..949cbcbd7b 100644 --- a/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/da/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Klik her for at chatte." name="chat_box" tool_tip="Tryk på enter for at tale, Ctrl-Enter for at råbe."/> <button name="show_nearby_chat" tool_tip="Viser/skjuler log for chat nærved"/> </panel> diff --git a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml index 5e6e460c65..08cc0b0ec8 100644 --- a/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/de/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Zum Chatten hier klicken." name="chat_box" tool_tip="Eingabe drücken, um zu sprechen, Strg-Eingabe drücken, um zu Rufen."/> <button name="show_nearby_chat" tool_tip="Protokoll des Chats in der Nähe anzeigen/ausblenden"/> </panel> 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 088f098f85..1d99de1fa7 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 @@ -8,12 +8,6 @@ name="chat_bar" top="21" width="310"> - <string name="min_width"> - 216 - </string> - <string name="max_width"> - 320 - </string> <line_editor border_style="line" border_thickness="1" diff --git a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml index 1df45108ab..af2b6e920b 100644 --- a/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/es/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Pulsa aquí para chatear." name="chat_box" tool_tip="Pulsa Enter para decirlo o Ctrl+Enter para gritarlo"/> <button name="show_nearby_chat" tool_tip="Muestra o esconde el registro del chat"/> </panel> diff --git a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml index 8ed441cbae..82cdf292ab 100644 --- a/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/fr/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Cliquer ici pour chatter." name="chat_box" tool_tip="Appuyer sur Entrée pour dire, Ctrl-Entrée pour crier"/> <button name="show_nearby_chat" tool_tip="Affiche/Masque le journal de chats près de vous"/> </panel> diff --git a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml index 0361eb49ed..f7a58581d4 100644 --- a/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/it/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Clicca qui per la chat." name="chat_box" tool_tip="Premi Invio per dire, Ctrl+Invio per gridare"/> <button name="show_nearby_chat" tool_tip="Mostra/Nasconde la chat log nei dintorni"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml index 3dbabc62be..5998206f27 100644 --- a/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/ja/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="ここをクリックしてチャットを開始します。" name="chat_box" tool_tip="Enter キーを押して発言し、Ctrl + Enter キーで叫びます。"/> <button name="show_nearby_chat" tool_tip="近くのチャットログを表示・非表示"/> </panel> diff --git a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml index a8c74d50e4..9b993488be 100644 --- a/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/pt/panel_nearby_chat_bar.xml @@ -1,11 +1,5 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <panel name="chat_bar"> - <string name="min_width"> - 192 - </string> - <string name="max_width"> - 320 - </string> <line_editor label="Clique aqui para bater papo." name="chat_box" tool_tip="Tecle Enter para falar, Ctrl+Enter para gritar"/> <button name="show_nearby_chat" tool_tip="Mostra/oculta o histórico do bate-papo local"/> </panel> -- cgit v1.2.3 From 08ede585ce33b2551d8e22bec5c5b3a5e345051f Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 17:13:56 +0200 Subject: Work on major bug EXT-5589 (Notifications button falls under side panel) -- updated LLLayoutStack to process "max_width" & "max_height" attributes for layout_panel. --HG-- branch : product-engine --- indra/llui/lllayoutstack.cpp | 38 +++++++++++++++++++++---- indra/llui/lllayoutstack.h | 10 ++++++- indra/newview/llchathistory.cpp | 4 +-- indra/newview/llfloaternotificationsconsole.cpp | 2 +- 4 files changed, 45 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index dc79550eb4..4512091371 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -49,9 +49,11 @@ static LLDefaultChildRegistry::Register<LLLayoutStack> register_layout_stack("la // struct LLLayoutStack::LayoutPanel { - LayoutPanel(LLPanel* panelp, ELayoutOrientation orientation, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize) : mPanel(panelp), + LayoutPanel(LLPanel* panelp, ELayoutOrientation orientation, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize) : mPanel(panelp), mMinWidth(min_width), mMinHeight(min_height), + mMaxWidth(max_width), + mMaxHeight(max_height), mAutoResize(auto_resize), mUserResize(user_resize), mOrientation(orientation), @@ -112,6 +114,11 @@ struct LLLayoutStack::LayoutPanel LLPanel* mPanel; S32 mMinWidth; S32 mMinHeight; + + // mMaxWidth & mMaxHeight are added to make configurable max width of the nearby chat bar. EXT-5589 + // they are not processed by LLLayoutStack but they can be if necessary + S32 mMaxWidth; + S32 mMaxHeight; BOOL mAutoResize; BOOL mUserResize; BOOL mCollapsed; @@ -261,10 +268,14 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o { const S32 DEFAULT_MIN_WIDTH = 0; const S32 DEFAULT_MIN_HEIGHT = 0; + const S32 DEFAULT_MAX_WIDTH = S32_MAX; + const S32 DEFAULT_MAX_HEIGHT = S32_MAX; const BOOL DEFAULT_AUTO_RESIZE = TRUE; S32 min_width = DEFAULT_MIN_WIDTH; S32 min_height = DEFAULT_MIN_HEIGHT; + S32 max_width = DEFAULT_MAX_WIDTH; + S32 max_height = DEFAULT_MAX_HEIGHT; BOOL auto_resize = DEFAULT_AUTO_RESIZE; LLXMLNodePtr output_child; @@ -281,6 +292,10 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o DEFAULT_MIN_WIDTH, output_child); get_attribute_s32_and_write(child_node, "min_height", &min_height, DEFAULT_MIN_HEIGHT, output_child); + get_attribute_s32_and_write(child_node, "max_width", &max_width, + DEFAULT_MAX_WIDTH, output_child); + get_attribute_s32_and_write(child_node, "max_height", &max_height, + DEFAULT_MAX_HEIGHT, output_child); get_attribute_bool_and_write(child_node, "auto_resize", &auto_resize, DEFAULT_AUTO_RESIZE, output_child); @@ -293,7 +308,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o if (panelp) { panelp->setFollowsNone(); - layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize); + layout_stackp->addPanel(panelp, min_width, min_height, max_width, max_height, auto_resize, user_resize); } } else @@ -309,7 +324,7 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr o if (new_child) { // put child in new embedded panel - layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize); + layout_stackp->addPanel(panelp, min_width, min_height, max_width, max_height, auto_resize, user_resize); // resize panel to contain widget and move widget to be contained in panel panelp->setRect(new_child->getRect()); new_child->setOrigin(0, 0); @@ -359,14 +374,14 @@ S32 LLLayoutStack::getDefaultWidth(S32 cur_width) return cur_width; } -void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate, S32 index) +void LLLayoutStack::addPanel(LLPanel* panel, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize, EAnimate animate, S32 index) { // panel starts off invisible (collapsed) if (animate == ANIMATE) { panel->setVisible(FALSE); } - LayoutPanel* embedded_panel = new LayoutPanel(panel, mOrientation, min_width, min_height, auto_resize, user_resize); + LayoutPanel* embedded_panel = new LayoutPanel(panel, mOrientation, min_width, min_height, max_width, max_height, auto_resize, user_resize); mPanels.insert(mPanels.begin() + llclamp(index, 0, (S32)mPanels.size()), embedded_panel); @@ -437,6 +452,19 @@ bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widt return NULL != panel; } +bool LLLayoutStack::getPanelMaxSize(const std::string& panel_name, S32* max_widthp, S32* max_heightp) +{ + LayoutPanel* panel = findEmbeddedPanelByName(panel_name); + + if (panel) + { + if (max_widthp) *max_widthp = panel->mMaxWidth; + if (max_heightp) *max_heightp = panel->mMaxHeight; + } + + return NULL != panel; +} + static LLFastTimer::DeclareTimer FTM_UPDATE_LAYOUT("Update LayoutStacks"); void LLLayoutStack::updateLayout(BOOL force_resize) { diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h index c4f10038f8..e454454fe2 100644 --- a/indra/llui/lllayoutstack.h +++ b/indra/llui/lllayoutstack.h @@ -74,7 +74,7 @@ public: ANIMATE } EAnimate; - void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, EAnimate animate = NO_ANIMATE, S32 index = S32_MAX); + void addPanel(LLPanel* panel, S32 min_width, S32 min_height, S32 max_width, S32 max_height, BOOL auto_resize, BOOL user_resize, EAnimate animate = NO_ANIMATE, S32 index = S32_MAX); void removePanel(LLPanel* panel); void collapsePanel(LLPanel* panel, BOOL collapsed = TRUE); S32 getNumPanels() { return mPanels.size(); } @@ -89,6 +89,14 @@ public: * @returns true if specified by panel_name internal panel exists, false otherwise. */ bool getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp); + + /** + * Gets maximal width and/or height of the specified by name panel. + * + * If it is necessary to get only the one dimension pass NULL for another one. + * @returns true if specified by panel_name internal panel exists, false otherwise. + */ + bool getPanelMaxSize(const std::string& panel_name, S32* max_width, S32* max_height); void updateLayout(BOOL force_resize = FALSE); diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 45c2d26fde..e1c96d4a16 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -491,7 +491,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) panel_p.background_visible = false; panel_p.has_border = false; panel_p.mouse_opaque = false; - stackp->addPanel(LLUICtrlFactory::create<LLPanel>(panel_p), 0, 30, true, false, LLLayoutStack::ANIMATE); + stackp->addPanel(LLUICtrlFactory::create<LLPanel>(panel_p), 0, 30, S32_MAX, S32_MAX, true, false, LLLayoutStack::ANIMATE); panel_p.name = "new_text_notice_holder"; LLRect new_text_notice_rect = getLocalRect(); @@ -509,7 +509,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p) mMoreChatText = LLUICtrlFactory::create<LLTextBox>(text_p, mMoreChatPanel); mMoreChatText->setClickedCallback(boost::bind(&LLChatHistory::onClickMoreText, this)); - stackp->addPanel(mMoreChatPanel, 0, 0, false, false, LLLayoutStack::ANIMATE); + stackp->addPanel(mMoreChatPanel, 0, 0, S32_MAX, S32_MAX, false, false, LLLayoutStack::ANIMATE); } diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 94b5ebba00..b744bff084 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -210,7 +210,7 @@ void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open { LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels"); LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(name); - stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, TRUE, TRUE, LLLayoutStack::ANIMATE); + stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, S32_MAX, S32_MAX, TRUE, TRUE, LLLayoutStack::ANIMATE); LLButton& header_button = panelp->getChildRef<LLButton>("header"); header_button.setToggleState(!open); -- cgit v1.2.3 From 6575b685e91d334198789c88dec2efab7e5a1ac9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Wed, 24 Feb 2010 17:18:05 +0200 Subject: fixed EXT-5526 Objects are shown as persons in the chat history from previous sessions - new chat source type CHAT_SOURCE_UNKNOWN for avatar names not in cache and object names consisting of two words (avatar names like) - new icon (unknown_icon.png) for message headers () of nearby chat messagses coming from CHAT_SOURCE_UNKNOWN - context menu no longer displayed for object names from chat history (no UUIDs) - double click on message headers in nearby chat no longer opens Inspector (no UUIDs) - object names (loaded from chat history) in nearby chat are no longer SLURLed (no UUIDs for them) --HG-- branch : product-engine --- indra/llcommon/llchat.h | 3 ++- indra/newview/llchathistory.cpp | 11 ++++++++--- indra/newview/llnearbychat.cpp | 19 +++++++++++++++++++ .../skins/default/textures/icons/unknown_icon.png | Bin 0 -> 884 bytes indra/newview/skins/default/textures/textures.xml | 1 + 5 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/unknown_icon.png (limited to 'indra') diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index 52238d4533..f1b9091298 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -43,7 +43,8 @@ typedef enum e_chat_source_type { CHAT_SOURCE_SYSTEM = 0, CHAT_SOURCE_AGENT = 1, - CHAT_SOURCE_OBJECT = 2 + CHAT_SOURCE_OBJECT = 2, + CHAT_SOURCE_UNKNOWN = 3 } EChatSourceType; typedef enum e_chat_type diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5e8d5a63d0..45c2d26fde 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -209,6 +209,8 @@ public: void showInspector() { + if (mAvatarID.isNull() && CHAT_SOURCE_SYSTEM != mSourceType) return; + if (mSourceType == CHAT_SOURCE_OBJECT) { LLFloaterReg::showInstance("inspect_object", LLSD().with("object_id", mAvatarID)); @@ -279,6 +281,9 @@ public: break; case CHAT_SOURCE_SYSTEM: icon->setValue(LLSD("SL_Logo")); + break; + case CHAT_SOURCE_UNKNOWN: + icon->setValue(LLSD("Unknown_Icon")); } } @@ -325,9 +330,9 @@ protected: { if(mSourceType == CHAT_SOURCE_SYSTEM) showSystemContextMenu(x,y); - if(mSourceType == CHAT_SOURCE_AGENT) + if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_AGENT) showAvatarContextMenu(x,y); - if(mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom) + if(mAvatarID.notNull() && mSourceType == CHAT_SOURCE_OBJECT && SYSTEM_FROM != mFrom) showObjectContextMenu(x,y); } @@ -632,7 +637,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL if (utf8str_trim(chat.mFromName).size() != 0) { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. - if ( chat.mSourceType == CHAT_SOURCE_OBJECT ) + if ( chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mFromID.notNull()) { // for object IMs, create a secondlife:///app/objectim SLapp std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 16384ef6e0..c8d5d782b7 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -278,6 +278,13 @@ void LLNearbyChat::processChatHistoryStyleUpdate(const LLSD& newvalue) nearby_chat->updateChatHistoryStyle(); } +bool isTwoWordsName(const std::string& name) +{ + //checking for a single space + S32 pos = name.find(' ', 0); + return std::string::npos != pos && name.rfind(' ', name.length()) == pos && 0 != pos && name.length()-1 != pos; +} + void LLNearbyChat::loadHistory() { LLSD do_not_log; @@ -304,6 +311,18 @@ void LLNearbyChat::loadHistory() chat.mText = msg[IM_TEXT].asString(); chat.mTimeStr = msg[IM_TIME].asString(); chat.mChatStyle = CHAT_STYLE_HISTORY; + + chat.mSourceType = CHAT_SOURCE_AGENT; + if (from_id.isNull() && SYSTEM_FROM == from) + { + chat.mSourceType = CHAT_SOURCE_SYSTEM; + + } + else if (from_id.isNull()) + { + chat.mSourceType = isTwoWordsName(from) ? CHAT_SOURCE_UNKNOWN : CHAT_SOURCE_OBJECT; + } + addMessage(chat, true, do_not_log); it++; diff --git a/indra/newview/skins/default/textures/icons/unknown_icon.png b/indra/newview/skins/default/textures/icons/unknown_icon.png new file mode 100644 index 0000000000..8441d86596 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/unknown_icon.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index f200566c0e..4768cf14fb 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -516,6 +516,7 @@ with the same filename but different name <texture name="SL_Logo" file_name="icons/SL_Logo.png" preload="true" /> <texture name="OBJECT_Icon" file_name="icons/object_icon.png" preload="true" /> + <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" /> -- cgit v1.2.3 From e40f22116762ddc629a8efb2057c81e6ffde3a99 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Wed, 24 Feb 2010 17:27:40 +0200 Subject: Fixed major bug EXT-5589 (Notifications button falls under side panel) -- added usage of max_width from layout_panel xml param instead of hardcoded in code. --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 21 ++++++++++++++++----- .../skins/default/xui/en/panel_bottomtray.xml | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 3511328161..b88be53d79 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -60,7 +60,6 @@ namespace const std::string& PANEL_MOVEMENT_NAME = "movement_panel"; const std::string& PANEL_CAMERA_NAME = "cam_panel"; const std::string& PANEL_GESTURE_NAME = "gesture_panel"; - const S32 MAX_CHAT_BAR_WIDTH = 320; S32 get_panel_min_width(LLLayoutStack* stack, LLPanel* panel) { @@ -73,6 +72,17 @@ namespace return minimal_width; } + S32 get_panel_max_width(LLLayoutStack* stack, LLPanel* panel) + { + S32 max_width = 0; + llassert(stack); + if ( stack && panel && panel->getVisible() ) + { + stack->getPanelMaxSize(panel->getName(), &max_width, NULL); + } + return max_width; + } + S32 get_curr_width(LLUICtrl* ctrl) { S32 cur_width = 0; @@ -746,10 +756,11 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) if (delta_width <= 0) return; const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); + static const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); + static const S32 chatbar_panel_min_width = get_panel_min_width(mToolbarStack, mNearbyChatBar); + static const S32 chatbar_panel_max_width = get_panel_max_width(mToolbarStack, mNearbyChatBar); const S32 chatbar_available_shrink_width = chatbar_panel_width - chatbar_panel_min_width; const S32 available_width_chiclet = chiclet_panel_width - chiclet_panel_min_width; @@ -826,9 +837,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) // how many space can nearby chatbar take? S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth(); - if (delta_width > 0 && chatbar_panel_width_ < MAX_CHAT_BAR_WIDTH) + if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width) { - S32 delta_panel_max = MAX_CHAT_BAR_WIDTH - chatbar_panel_width_; + S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; S32 delta_panel = llmin(delta_width, delta_panel_max); lldebugs << "Unprocesed delta width: " << delta_width << ", can be applied to chatbar: " << delta_panel_max diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 4c5d5a1b96..015a2e91ff 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -47,6 +47,7 @@ min_height="23" width="310" top="4" + max_width="320" min_width="216" name="chat_bar" user_resize="false" -- cgit v1.2.3 From 280671ce4ad1d2a352acdcd91746dd6382be5ff2 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 24 Feb 2010 18:26:16 +0200 Subject: Fixed major bug (EXT-5657) Location input becomes empty if press Ctrl+C. - Added check for pressed Ctrl button. --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index bdd4426636..5f233bece0 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -473,6 +473,7 @@ BOOL LLLocationInputCtrl::handleKeyHere(KEY key, MASK mask) void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) { KEY key = gKeyboard->currentKey(); + MASK mask = gKeyboard->currentMask(TRUE); if (line_editor->getText().empty()) { @@ -480,7 +481,7 @@ void LLLocationInputCtrl::onTextEntry(LLLineEditor* line_editor) hideList(); } // Typing? (moving cursor should not affect showing the list) - else if (key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) + else if (mask != MASK_CONTROL && key != KEY_LEFT && key != KEY_RIGHT && key != KEY_HOME && key != KEY_END) { prearrangeList(line_editor->getText()); if (mList->getItemCount() != 0) -- cgit v1.2.3 From 5e65a2de6789f3fb80db948109e3a9377dba512e Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 24 Feb 2010 18:38:04 +0200 Subject: Fixed major bug (EXT-5666) Attachment name in the group notice toast becomes empty if click on it. - Changed color that is set to attachment after it was clicked. --HG-- branch : product-engine --- indra/newview/skins/default/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 45050de044..c617dacec5 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -359,7 +359,7 @@ reference="White"/> <color name="GroupNotifyDimmedTextColor" - reference="DkGray" /> + reference="LtGray" /> <color name="GroupOverTierColor" value="0.43 0.06 0.06 1" /> -- cgit v1.2.3 From e8c52502c351e6b96486adcd4b2d1cd103ac122e Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Wed, 24 Feb 2010 18:45:09 +0200 Subject: Fixed normal bug EXT-5512 (Change in text size for already written chat is not updated. Only affects new chat) --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 853693b927..fb7e757c43 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -335,6 +335,10 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("PlainTextChatHistory")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLIMFloater::processChatHistoryStyleUpdate, _2)); + + gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); + LLTabContainer* tabcontainer = getChild<LLTabContainer>("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); -- cgit v1.2.3 From 1852382e45f3f1ce97686dcbe72300cab8eff465 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi <emutavchi@productengine.com> Date: Wed, 24 Feb 2010 20:11:33 +0200 Subject: Related to low bug EXT-5523 (Bottom part of "Create classfield dialog" is overlapped by unnecessary scroller) - changed the height of content panel --HG-- branch : product-engine --- indra/newview/llpanelclassified.cpp | 2 ++ indra/newview/skins/default/xui/en/panel_edit_classified.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 2a794a06b5..b4c13da91e 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -1153,6 +1153,8 @@ void LLPanelClassified::setDefaultAccessCombo() LLPanelClassifiedInfo::LLPanelClassifiedInfo() : LLPanel() , mInfoLoaded(false) + , mScrollingPanel(NULL) + , mScrollContainer(NULL) { } diff --git a/indra/newview/skins/default/xui/en/panel_edit_classified.xml b/indra/newview/skins/default/xui/en/panel_edit_classified.xml index d31e7d2ed8..66d5389d9b 100644 --- a/indra/newview/skins/default/xui/en/panel_edit_classified.xml +++ b/indra/newview/skins/default/xui/en/panel_edit_classified.xml @@ -59,7 +59,7 @@ layout="topleft" top="0" background_visible="false" - height="600" + height="610" left="0" width="285"> <texture_picker -- cgit v1.2.3 From aada63efee348131393242346f5e5d00d78b13ca Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Wed, 24 Feb 2010 10:57:39 -0800 Subject: DEV-46346 Cycle5 JA change --- .../skins/default/xui/ja/floater_about_land.xml | 9 ++++---- .../skins/default/xui/ja/floater_buy_contents.xml | 2 +- .../skins/default/xui/ja/floater_buy_object.xml | 2 +- .../skins/default/xui/ja/floater_customize.xml | 2 +- indra/newview/skins/default/xui/ja/floater_pay.xml | 2 +- .../newview/skins/default/xui/ja/floater_tools.xml | 26 +++++++++++----------- .../skins/default/xui/ja/menu_inventory.xml | 22 +++++++++--------- 7 files changed, 32 insertions(+), 33 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/ja/floater_about_land.xml b/indra/newview/skins/default/xui/ja/floater_about_land.xml index f363c2d85d..42f3211ada 100644 --- a/indra/newview/skins/default/xui/ja/floater_about_land.xml +++ b/indra/newview/skins/default/xui/ja/floater_about_land.xml @@ -85,8 +85,8 @@ Leyla Linden </text> <button label="設定" label_selected="設定..." name="Set..."/> - <check_box label="グループへの譲渡を許可" name="check deed" tool_tip="グループのオフィサーはこの土地をグループに譲渡できます。そうするとグループの土地割り当てによってサポートされます。"/> - <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択したグループのオフィサーであるときのみ、土地を譲渡できます。"/> + <check_box label="グループへの譲渡を許可" name="check deed" tool_tip="グループのオフィサーはこの土地をグループに譲渡できます。グループの土地割り当てによってサポートされます。"/> + <button label="譲渡" label_selected="譲渡..." name="Deed..." tool_tip="選択したグループのオフィサーのみ、土地を譲渡できます。"/> <check_box label="所有者が譲渡と共に寄付" name="check contrib" tool_tip="土地がグループに譲渡されるとき、前の所有者は譲渡が成立するよう、十分な土地を寄付します。"/> <text name="For Sale:"> 販売の有無: @@ -195,7 +195,6 @@ </text> <text name="changeable_clause"> このリージョン(地域)にある土地は統合または分割ができないことがあります。 -ません。 </text> </panel> <panel label="オブジェクト" name="land_objects_panel"> @@ -422,7 +421,7 @@ <text name="MusicURL:"> 音楽 URL: </text> - <check_box label="URL を非表示にする" name="hide_music_url" tool_tip="このオプションにチェックを入れると、権限のない人が区画情報を見たときに音楽のURLが隠れます。"/> + <check_box label="URL を非表示にする" name="hide_music_url" tool_tip="このオプションにチェックを入れると、権限のない人が区画情報を見たときに音楽の URL が隠れます。"/> <text name="Sound:"> サウンド: </text> @@ -451,7 +450,7 @@ <check_box label="支払情報登録済 [ESTATE_PAYMENT_LIMIT]" name="limit_payment" tool_tip="未確認の住人の立入を禁止します。"/> <check_box label="年齢確認 [ESTATE_AGE_LIMIT]" name="limit_age_verified" tool_tip="年齢確認を済ませていない住人の立入を禁止します。 詳しい情報は [SUPPORT_SITE] をご覧下さい。"/> <check_box label="グループのアクセスを許可:[GROUP]" name="GroupCheck" tool_tip="「一般」タブで、グループを選択してください。"/> - <check_box label="入場許可を販売:" name="PassCheck" tool_tip="この区画への一時的なアクセスを許可します"/> + <check_box label="入場許可を販売:" name="PassCheck" tool_tip="この区画への一時的なアクセスを許可します。"/> <combo_box name="pass_combo"> <combo_box.item label="誰でも" name="Anyone"/> <combo_box.item label="グループ" name="Group"/> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml index eda71c3575..ed17736eb3 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_contents.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_contents.xml @@ -5,7 +5,7 @@ </text> <scroll_list name="item_list" width="310"/> <text name="buy_text" width="320"> - 中身を[NAME] から L$[AMOUNT] で購入しますか? + 中身を [NAME] から L$[AMOUNT] で購入しますか? </text> <button label="取り消し" label_selected="取り消し" name="cancel_btn" width="73"/> <button label="購入" label_selected="購入" left_delta="-77" name="buy_btn" width="73"/> diff --git a/indra/newview/skins/default/xui/ja/floater_buy_object.xml b/indra/newview/skins/default/xui/ja/floater_buy_object.xml index ddec8c2e69..f323263699 100644 --- a/indra/newview/skins/default/xui/ja/floater_buy_object.xml +++ b/indra/newview/skins/default/xui/ja/floater_buy_object.xml @@ -4,7 +4,7 @@ 中身: </text> <text name="buy_text"> - [NAME]から L$[AMOUNT] で購入しますか? + [NAME] から L$[AMOUNT] で購入しますか? </text> <button label="取消" label_selected="取消" name="cancel_btn"/> <button label="購入" label_selected="購入" name="buy_btn"/> diff --git a/indra/newview/skins/default/xui/ja/floater_customize.xml b/indra/newview/skins/default/xui/ja/floater_customize.xml index bd8535353d..cc0032e1ab 100644 --- a/indra/newview/skins/default/xui/ja/floater_customize.xml +++ b/indra/newview/skins/default/xui/ja/floater_customize.xml @@ -522,7 +522,7 @@ <button label="元に戻す" label_selected="元に戻す" name="Revert"/> </panel> </tab_container> - <button label="スクリプト情報" label_selected="スクリプト情報" name="script_info" tool_tip="あなたのアバターに付いているスクリプトを表示する"/> + <button label="スクリプト情報" label_selected="スクリプト情報" name="script_info" tool_tip="あなたのアバターに付いているスクリプトを表示します"/> <button label="アウトフィット作成" label_selected="アウトフィット作成" name="make_outfit_btn"/> <button label="キャンセル" label_selected="キャンセル" name="Cancel"/> <button label="OK" label_selected="OK" name="Ok"/> diff --git a/indra/newview/skins/default/xui/ja/floater_pay.xml b/indra/newview/skins/default/xui/ja/floater_pay.xml index aa67c78aea..39bc37bc6c 100644 --- a/indra/newview/skins/default/xui/ja/floater_pay.xml +++ b/indra/newview/skins/default/xui/ja/floater_pay.xml @@ -20,6 +20,6 @@ <text name="amount text"> 金額を指定: </text> - <button label="支払い" label_selected="支払い" name="pay btn"/> + <button label="支払う" label_selected="支払う" name="pay btn"/> <button label="取り消し" label_selected="取り消し" name="cancel btn"/> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_tools.xml b/indra/newview/skins/default/xui/ja/floater_tools.xml index e154f5af83..e9de43189c 100644 --- a/indra/newview/skins/default/xui/ja/floater_tools.xml +++ b/indra/newview/skins/default/xui/ja/floater_tools.xml @@ -4,7 +4,7 @@ 色の付いたバンドをドラッグしてオブジェクトを回転 </floater.string> <floater.string name="status_scale"> - 選択した側をクリックし、ドラッグして引き伸ばす + 選択した側をクリックし、ドラッグで引き伸ばす </floater.string> <floater.string name="status_move"> 移動:ドラッグ、コピー:Shift + ドラッグ @@ -70,7 +70,7 @@ <check_box label="両側を引伸ばす" left="116" name="checkbox uniform"/> <check_box initial_value="true" label="テクスチャを引伸ばす" name="checkbox stretch textures"/> <check_box initial_value="true" label="グリッドポイントにスナップ" left_delta="27" name="checkbox snap to grid"/> - <combo_box left_delta="60" name="combobox grid mode" tool_tip="オブジェクトの配置に使うグリッドルーラを選択" width="76"> + <combo_box left_delta="60" name="combobox grid mode" tool_tip="オブジェクトの配置に使うグリッドルーラを選択します" width="76"> <combo_box.item label="インワールドグリッド" name="World"/> <combo_box.item label="ローカルグリッド" name="Local"/> <combo_box.item label="リファレンスグリッド" name="Reference"/> @@ -113,7 +113,7 @@ <text name="Strength:"> 強度 </text> - <button label="適用" label_selected="適用" name="button apply to selection" tool_tip="選択した土地を修正"/> + <button label="適用" label_selected="適用" name="button apply to selection" tool_tip="選択した土地を修正します"/> <text name="obj_count"> オブジェクト: [COUNT] </text> @@ -179,20 +179,20 @@ <text name="Group:"> グループ: </text> - <button label="設定..." label_selected="設定..." name="button set group" tool_tip="このオブジェクト権限を共有するグループを選択"/> + <button label="設定..." label_selected="設定..." name="button set group" tool_tip="このオブジェクト権限を共有するグループを選択します"/> <name_box initial_value="ローディング..." name="Group Name Proxy"/> - <button label="譲渡" label_selected="譲渡" name="button deed" tool_tip="このアイテムを譲渡すると「次の所有者」の権限が適用されます。 グループ共有オブジェクトは、グループのオフィサーが譲渡できます。"/> - <check_box label="共有" name="checkbox share with group" tool_tip="設定したグループのメンバー全員にこのオブジェクトの修正権限を与えます。 譲渡しない限り、役割制限を有効にはできません。"/> + <button label="譲渡" label_selected="譲渡" name="button deed" tool_tip="このアイテムを譲渡すると「次の所有者」の権限が適用されます。 グループ共有オブジェクトは、グループのオフィサーが譲渡できます"/> + <check_box label="共有" name="checkbox share with group" tool_tip="設定したグループのメンバー全員にこのオブジェクトの修正権限を与えます。 譲渡しない限り、役割制限を有効にはできません"/> <text name="label click action"> クリックで: </text> <combo_box name="clickaction"> <combo_box.item label="触る(デフォルト)" name="Touch/grab(default)"/> <combo_box.item label="オブジェクトに座る" name="Sitonobject"/> - <combo_box.item label="オブジェクトを購入" name="Buyobject"/> - <combo_box.item label="オブジェクトへの支払い" name="Payobject"/> + <combo_box.item label="オブジェクトを購入する" name="Buyobject"/> + <combo_box.item label="オブジェクトに支払う" name="Payobject"/> <combo_box.item label="開く" name="Open"/> - <combo_box.item label="ズーム" name="Zoom"/> + <combo_box.item label="ズームする" name="Zoom"/> </combo_box> <check_box label="販売対象:" name="checkbox for sale"/> <combo_box name="sale type"> @@ -216,7 +216,7 @@ </text> <check_box label="修正" name="checkbox next owner can modify"/> <check_box label="コピー" name="checkbox next owner can copy"/> - <check_box label="再販・プレゼント" name="checkbox next owner can transfer" tool_tip="次の所有者はこのオブジェクトを他人にあげたり再販できます"/> + <check_box label="再販・プレゼント" name="checkbox next owner can transfer" tool_tip="次に所有する人は、このオブジェクトを他人にあげたり再販できます"/> <text name="B:"> B: </text> @@ -238,7 +238,7 @@ </panel> </panel> <panel label="形状" name="Object"> - <check_box label="ロック済み" name="checkbox locked" tool_tip="オブジェクトの移動と削除を禁止します。 この機能を使うと、制作中の意図せぬ編集を防ぐことができます。"/> + <check_box label="ロック" name="checkbox locked" tool_tip="オブジェクトの移動と削除を禁止します。 この機能を使うと、制作中の意図せぬ編集を防ぐことができます"/> <check_box label="物理" name="Physical Checkbox Ctrl" tool_tip="オブジェクトに対する重力の作用と影響を有効にします"/> <check_box label="臨時" name="Temporary Checkbox Ctrl" tool_tip="制作後 1 分でオブジェクトは削除されます"/> <check_box label="ファントム" name="Phantom Checkbox Ctrl" tool_tip="オブジェクト同士の衝突またはオブジェクトとアバターの衝突を回避します"/> @@ -339,7 +339,7 @@ <text name="text revolutions"> 回転体 </text> - <texture_picker label="スカルプトテクスチャ" name="sculpt texture control" tool_tip="クリックして写真を選択してください。"/> + <texture_picker label="スカルプトテクスチャ" name="sculpt texture control" tool_tip="クリックして写真を選択してください"/> <check_box label="ミラー" name="sculpt mirror control" tool_tip="スカルプトプリムを X 軸上で反転させます"/> <check_box label="裏返し" name="sculpt invert control" tool_tip="スカルプトプリムを反転させて裏返します"/> <text name="label sculpt type"> @@ -386,7 +386,7 @@ <panel.string name="string repeats per face"> 面ごとに繰り返す </panel.string> - <texture_picker label="テクスチャ" name="texture control" tool_tip="写真をクリックして選択"/> + <texture_picker label="テクスチャ" name="texture control" tool_tip="写真をクリックして選択します"/> <color_swatch label="色" name="colorswatch" tool_tip="クリックしてカラーピッカーを開きます"/> <text name="color trans"> 透過度 % diff --git a/indra/newview/skins/default/xui/ja/menu_inventory.xml b/indra/newview/skins/default/xui/ja/menu_inventory.xml index 17b059c5d6..1607b2647e 100644 --- a/indra/newview/skins/default/xui/ja/menu_inventory.xml +++ b/indra/newview/skins/default/xui/ja/menu_inventory.xml @@ -49,30 +49,30 @@ <menu_item_call label="着用中のアウトフィットを入れ替える" name="Replace Outfit"/> <menu_item_call label="着用中のアウトフィットに追加する" name="Add To Outfit"/> <menu_item_call label="着用中のアウトフィットから取り除く" name="Remove From Outfit"/> - <menu_item_call label="アイテムを除外" name="Purge Item"/> - <menu_item_call label="アイテムを復元" name="Restore Item"/> + <menu_item_call label="アイテムを除外する" name="Purge Item"/> + <menu_item_call label="アイテムを復元する" name="Restore Item"/> <menu_item_call label="オリジナルを探す" name="Find Original"/> <menu_item_call label="開く" name="Open"/> <menu_item_call label="プロパティ" name="Properties"/> - <menu_item_call label="名前の変更" name="Rename"/> - <menu_item_call label="UUID をコピー" name="Copy Asset UUID"/> + <menu_item_call label="名前を変更する" name="Rename"/> + <menu_item_call label="UUID をコピーする" name="Copy Asset UUID"/> <menu_item_call label="コピー" name="Copy"/> <menu_item_call label="貼り付け" name="Paste"/> - <menu_item_call label="リンクの貼り付け" name="Paste As Link"/> + <menu_item_call label="リンクを貼り付ける" name="Paste As Link"/> <menu_item_call label="リンクを外す" name="Remove Link"/> <menu_item_call label="削除" name="Delete"/> <menu_item_call label="システムフォルダを削除する" name="Delete System Folder"/> - <menu_item_call label="コンファレンスチャットを開始" name="Conference Chat Folder"/> - <menu_item_call label="再生" name="Sound Play"/> + <menu_item_call label="コンファレンスチャットを開始する" name="Conference Chat Folder"/> + <menu_item_call label="再生する" name="Sound Play"/> <menu_item_call label="ランドマークの情報" name="About Landmark"/> <menu_item_call label="インワールドで再生する" name="Animation Play"/> - <menu_item_call label="ローカル再生" name="Animation Audition"/> - <menu_item_call label="インスタントメッセージを送信" name="Send Instant Message"/> + <menu_item_call label="ローカルで再生する" name="Animation Audition"/> + <menu_item_call label="インスタントメッセージを送信する" name="Send Instant Message"/> <menu_item_call label="テレポートを送る..." name="Offer Teleport..."/> - <menu_item_call label="コンファレンスチャットを開始" name="Conference Chat"/> + <menu_item_call label="コンファレンスチャットを開始する" name="Conference Chat"/> <menu_item_call label="アクティブ" name="Activate"/> <menu_item_call label="非アクティブ" name="Deactivate"/> - <menu_item_call label="別名で保存" name="Save As"/> + <menu_item_call label="別名で保存する" name="Save As"/> <menu_item_call label="自分から取り外す" name="Detach From Yourself"/> <menu_item_call label="装着" name="Object Wear"/> <menu label="装着先" name="Attach To"/> -- cgit v1.2.3 From 254db516c5db2bd2eda3329c1fae59df2e0510aa Mon Sep 17 00:00:00 2001 From: Xiaohong Bao <bao@lindenlab.com> Date: Wed, 24 Feb 2010 12:09:22 -0700 Subject: fix for EXT-5710: improve the raw image reloading process in the texture pipeline; EXT-4612: failing assert LLViewerTexture::setDecodePriority: ASSERT (!mInImageList); EXT-4912: Texture alpha mask is not applied on the first frame after decode. --- indra/newview/lltexturefetch.cpp | 2 +- indra/newview/llviewertexture.cpp | 273 ++++++++++++++-------------------- indra/newview/llviewertexture.h | 5 +- indra/newview/llviewertexturelist.cpp | 12 +- 4 files changed, 120 insertions(+), 172 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 6c35464a51..0053ce8df8 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -491,7 +491,7 @@ U32 LLTextureFetchWorker::calcWorkPriority() //llassert_always(mImagePriority >= 0 && mImagePriority <= LLViewerFetchedTexture::maxDecodePriority()); static const F32 PRIORITY_SCALE = (F32)LLWorkerThread::PRIORITY_LOWBITS / LLViewerFetchedTexture::maxDecodePriority(); - mWorkPriority = (U32)(mImagePriority * PRIORITY_SCALE); + mWorkPriority = llmin((U32)LLWorkerThread::PRIORITY_LOWBITS, (U32)(mImagePriority * PRIORITY_SCALE)); return mWorkPriority; } diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6add8a7e92..01d437f9eb 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1257,20 +1257,30 @@ void LLViewerFetchedTexture::destroyTexture() mFullyLoaded = FALSE ; } -// -//do not change the discard level of the loaded texture image. -BOOL LLViewerFetchedTexture::keepReuestedDiscardLevel() +void LLViewerFetchedTexture::addToCreateTexture() { - if (!mLoadedCallbackList.empty()) + bool force_update = false ; + if (getComponents() != mRawImage->getComponents()) { - return TRUE ; - } + // We've changed the number of components, so we need to move any + // objects using this pool to a different pool. + mComponents = mRawImage->getComponents(); + mGLTexturep->setComponents(mComponents) ; + force_update = true ; - return FALSE ; -} + for(U32 i = 0 ; i < mNumFaces ; i++) + { + mFaceList[i]->dirtyTexture() ; + } + + //discard the cached raw image and the saved raw image + mCachedRawImageReady = FALSE ; + mCachedRawDiscardLevel = -1 ; + mCachedRawImage = NULL ; + mSavedRawDiscardLevel = -1 ; + mSavedRawImage = NULL ; + } -void LLViewerFetchedTexture::addToCreateTexture() -{ if(isForSculptOnly()) { //just update some variables, not to create a real GL texture. @@ -1278,6 +1288,11 @@ void LLViewerFetchedTexture::addToCreateTexture() mNeedsCreateTexture = FALSE ; destroyRawImage(); } + else if(!force_update && getDiscardLevel() > -1 && getDiscardLevel() <= mRawDiscardLevel) + { + mNeedsCreateTexture = FALSE ; + destroyRawImage(); + } else { #if 1 @@ -1286,7 +1301,7 @@ void LLViewerFetchedTexture::addToCreateTexture() //so do not scale down the over qualified image. //Note: scaling down image is expensensive. Do it only when very necessary. // - if(mRequestedDiscardLevel <= mDesiredDiscardLevel && !keepReuestedDiscardLevel()) + if(mRequestedDiscardLevel <= mDesiredDiscardLevel && !mForceToSaveRawImage) { S32 w = mFullWidth >> mRawDiscardLevel; S32 h = mFullHeight >> mRawDiscardLevel; @@ -1399,28 +1414,12 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) setActive() ; } - // - // Iterate through the list of image loading callbacks to see - // what sort of data they need. - // - // *TODO: Fix image callback code - BOOL imageraw_callbacks = FALSE; - for(callback_list_t::iterator iter = mLoadedCallbackList.begin(); - iter != mLoadedCallbackList.end(); ) - { - LLLoadedCallbackEntry *entryp = *iter++; - if (entryp->mNeedsImageRaw) - { - imageraw_callbacks = TRUE; - break; - } - } - - if (!imageraw_callbacks) + if (!mForceToSaveRawImage) { mNeedsAux = FALSE; - destroyRawImage(); } + destroyRawImage(); + return res; } @@ -1503,21 +1502,16 @@ F32 LLViewerFetchedTexture::calcDecodePriority() } #endif - if(mFullyLoaded)//already loaded for static texture - { - return -4.0f ; //alreay fetched - } - if (mNeedsCreateTexture) { return mDecodePriority; // no change while waiting to create } - if(mForceToSaveRawImage) + if(mFullyLoaded && !mForceToSaveRawImage)//already loaded for static texture { - return maxDecodePriority() ; + return -4.0f ; //alreay fetched } - - S32 cur_discard = getDiscardLevel(); + + S32 cur_discard = getCurrentDiscardLevelForFetching(); bool have_all_data = (cur_discard >= 0 && (cur_discard <= mDesiredDiscardLevel)); F32 pixel_priority = fsqrtf(mMaxVirtualSize); @@ -1642,11 +1636,8 @@ F32 LLViewerFetchedTexture::maxDecodePriority() void LLViewerFetchedTexture::setDecodePriority(F32 priority) { - //llassert(!mInImageList); // firing a lot, figure out why - if (mInImageList) // above llassert() softened to a warning - { - llwarns << "BAD STUFF! mInImageList" << llendl; - } + llassert(!mInImageList); + mDecodePriority = priority; } @@ -1666,6 +1657,11 @@ void LLViewerFetchedTexture::updateVirtualSize() addTextureStats(0.f, FALSE) ;//reset } + if(mForceToSaveRawImage) + { + setAdditionalDecodePriority(0.75f) ; //boost the fetching priority + } + for(U32 i = 0 ; i < mNumFaces ; i++) { LLFace* facep = mFaceList[i] ; @@ -1680,6 +1676,24 @@ void LLViewerFetchedTexture::updateVirtualSize() reorganizeVolumeList(); } +S32 LLViewerFetchedTexture::getCurrentDiscardLevelForFetching() +{ + S32 current_discard = getDiscardLevel() ; + if(mForceToSaveRawImage) + { + if(mSavedRawDiscardLevel < 0 || current_discard < 0) + { + current_discard = -1 ; + } + else + { + current_discard = llmax(current_discard, mSavedRawDiscardLevel) ; + } + } + + return current_discard ; +} + bool LLViewerFetchedTexture::updateFetch() { static LLCachedControl<bool> textures_decode_disabled(gSavedSettings,"TextureDecodeDisabled"); @@ -1716,7 +1730,7 @@ bool LLViewerFetchedTexture::updateFetch() return false; // process any raw image data in callbacks before replacing } - S32 current_discard = getDiscardLevel() ; + S32 current_discard = getCurrentDiscardLevelForFetching() ; S32 desired_discard = getDesiredDiscardLevel(); F32 decode_priority = getDecodePriority(); decode_priority = llmax(decode_priority, 0.0f); @@ -1726,14 +1740,6 @@ bool LLViewerFetchedTexture::updateFetch() // Sets mRawDiscardLevel, mRawImage, mAuxRawImage S32 fetch_discard = current_discard; - if(mForceToSaveRawImage) - { - if(fetch_discard >= 0) - { - fetch_discard = llmax(fetch_discard, mSavedRawDiscardLevel) ; - } - } - if (mRawImage.notNull()) sRawCount--; if (mAuxRawImage.notNull()) sAuxCount--; bool finished = LLAppViewer::getTextureFetch()->getRequestFinished(getID(), fetch_discard, mRawImage, mAuxRawImage); @@ -1761,18 +1767,6 @@ bool LLViewerFetchedTexture::updateFetch() if ((mRawImage->getDataSize() > 0 && mRawDiscardLevel >= 0) && (current_discard < 0 || mRawDiscardLevel < current_discard)) { - if (getComponents() != mRawImage->getComponents()) - { - // We've changed the number of components, so we need to move any - // objects using this pool to a different pool. - mComponents = mRawImage->getComponents(); - mGLTexturep->setComponents(mComponents) ; - - for(U32 i = 0 ; i < mNumFaces ; i++) - { - mFaceList[i]->dirtyTexture() ; - } - } mFullWidth = mRawImage->getWidth() << mRawDiscardLevel; mFullHeight = mRawImage->getHeight() << mRawDiscardLevel; @@ -1838,18 +1832,6 @@ bool LLViewerFetchedTexture::updateFetch() } } - if (!mDontDiscard) - { - if (mBoostLevel == 0) - { - desired_discard = llmax(desired_discard, current_discard-1); - } - else - { - desired_discard = llmax(desired_discard, current_discard-2); - } - } - bool make_request = true; if (decode_priority <= 0) { @@ -1867,8 +1849,20 @@ bool LLViewerFetchedTexture::updateFetch() //{ // make_request = false; //} - else + + if(make_request) { + //load the texture progressively. + S32 delta_level = (mBoostLevel > LLViewerTexture::BOOST_NONE) ? 2 : 1 ; + if(current_discard < 0) + { + desired_discard = llmax(desired_discard, getMaxDiscardLevel() - delta_level); + } + else + { + desired_discard = llmax(desired_discard, current_discard - delta_level); + } + if (mIsFetching) { if (mRequestedDiscardLevel <= desired_discard) @@ -1888,7 +1882,7 @@ bool LLViewerFetchedTexture::updateFetch() if (make_request) { S32 w=0, h=0, c=0; - if (current_discard >= 0) + if (getDiscardLevel() >= 0) { w = mGLTexturep->getWidth(0); h = mGLTexturep->getHeight(0); @@ -1929,73 +1923,6 @@ bool LLViewerFetchedTexture::updateFetch() return mIsFetching ? true : false; } -// -//force to fetch a new raw image for this texture -// -BOOL LLViewerFetchedTexture::forceFetch() -{ - if(!mForceToSaveRawImage) - { - return false ; - } - //if(mDesiredSavedRawDiscardLevel < getDiscardLevel()) - { - //no need to force fetching. normal fetching flow will do the work. - //return false ; - } - //if (mNeedsCreateTexture) - { - // We may be fetching still (e.g. waiting on write) - // but don't check until we've processed the raw data we have - //return false; - } - if(mIsFetching) - { - return false ; - } - if (mIsMissingAsset) - { - mForceToSaveRawImage = false ; - llassert_always(!mHasFetcher); - return false; // skip - } - if (!mLoadedCallbackList.empty() && mRawImage.notNull()) - { - return false; // process any raw image data in callbacks before replacing - } - if(mRawImage.notNull() && mRawDiscardLevel <= mDesiredSavedRawDiscardLevel) - { - return false ; // mRawImage is enough - } - - S32 desired_discard = mDesiredSavedRawDiscardLevel ; - S32 current_discard = getDiscardLevel(); - - bool fetch_request_created = false; - S32 w=0, h=0, c=0; - if (current_discard >= 0) - { - w = getWidth(0); - h = getHeight(0); - c = getComponents(); - } - setDecodePriority(maxDecodePriority()) ; - fetch_request_created = LLAppViewer::getTextureFetch()->createRequest(mUrl, getID(),getTargetHost(), getDecodePriority(), - w, h, c, desired_discard, needsAux()); - - if (fetch_request_created) - { - mHasFetcher = TRUE; - mIsFetching = TRUE; - mRequestedDiscardLevel = desired_discard ; - - mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority, - mFetchPriority, mFetchDeltaTime, mRequestDeltaTime); - } - - return mIsFetching ? true : false; -} - void LLViewerFetchedTexture::setIsMissingAsset() { if (mUrl.empty()) @@ -2037,6 +1964,10 @@ void LLViewerFetchedTexture::setLoadedCallback( loaded_callback_func loaded_call LLLoadedCallbackEntry* entryp = new LLLoadedCallbackEntry(loaded_callback, discard_level, keep_imageraw, userdata); mLoadedCallbackList.push_back(entryp); mNeedsAux |= needs_aux; + if(keep_imageraw) + { + forceToSaveRawImage(discard_level) ; + } if (mNeedsAux && mAuxRawImage.isNull() && getDiscardLevel() >= 0) { // We need aux data, but we've already loaded the image, and it didn't have any @@ -2285,8 +2216,15 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) if(mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= discard_level) { - mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; - mRawImage->copy(getSavedRawImage()) ; + if(mSavedRawDiscardLevel != discard_level) + { + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; + mRawImage->copy(getSavedRawImage()) ; + } + else + { + mRawImage = getSavedRawImage() ; + } mRawDiscardLevel = discard_level ; } else @@ -2296,13 +2234,18 @@ LLImageRaw* LLViewerFetchedTexture::reloadRawImage(S8 discard_level) { mRawImage = mCachedRawImage ; mRawDiscardLevel = mCachedRawDiscardLevel; - - forceToSaveRawImage(discard_level) ; } else //cached raw image is good enough, copy it. { - mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; - mRawImage->copy(mCachedRawImage) ; + if(mCachedRawDiscardLevel != discard_level) + { + mRawImage = new LLImageRaw(getWidth(discard_level), getHeight(discard_level), getComponents()) ; + mRawImage->copy(mCachedRawImage) ; + } + else + { + mRawImage = mCachedRawImage ; + } mRawDiscardLevel = discard_level ; } } @@ -2331,11 +2274,6 @@ void LLViewerFetchedTexture::destroyRawImage() mAuxRawImage = NULL; mIsRawImageValid = FALSE; mRawDiscardLevel = INVALID_DISCARD_LEVEL; - - if(mForceToSaveRawImage) - { - forceFetch() ; - } } //use the mCachedRawImage to (re)generate the gl texture. @@ -2448,7 +2386,7 @@ void LLViewerFetchedTexture::checkCachedRawSculptImage() void LLViewerFetchedTexture::saveRawImage() { - if(mRawImage.isNull() || mSavedRawDiscardLevel == mRawDiscardLevel) + if(mRawImage.isNull() || mRawImage == mSavedRawImage || (mSavedRawDiscardLevel >= 0 && mSavedRawDiscardLevel <= mRawDiscardLevel)) { return ; } @@ -2466,12 +2404,22 @@ void LLViewerFetchedTexture::saveRawImage() void LLViewerFetchedTexture::forceToSaveRawImage(S32 desired_discard) { - if(!mForceToSaveRawImage && (mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard)) + if(!mForceToSaveRawImage || mDesiredSavedRawDiscardLevel < 0 || mDesiredSavedRawDiscardLevel > desired_discard) { mForceToSaveRawImage = TRUE ; mDesiredSavedRawDiscardLevel = desired_discard ; - forceFetch() ; + //copy from the cached raw image if exists. + if(mCachedRawImage.notNull() && mRawImage.isNull() ) + { + mRawImage = mCachedRawImage ; + mRawDiscardLevel = mCachedRawDiscardLevel ; + + saveRawImage() ; + + mRawImage = NULL ; + mRawDiscardLevel = INVALID_DISCARD_LEVEL ; + } } } void LLViewerFetchedTexture::destroySavedRawImage() @@ -2838,6 +2786,11 @@ void LLViewerLODTexture::processTextureStats() } } } + + if(mForceToSaveRawImage && mDesiredSavedRawDiscardLevel >= 0) + { + mDesiredDiscardLevel = llmin(mDesiredDiscardLevel, (S8)mDesiredSavedRawDiscardLevel) ; + } } void LLViewerLODTexture::scaleDown() diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 79db754072..84377198eb 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -424,7 +424,6 @@ public: LLImageRaw* reloadRawImage(S8 discard_level) ; void destroyRawImage(); - /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ; const std::string& getUrl() const {return mUrl;} //--------------- @@ -449,6 +448,7 @@ public: BOOL isCachedRawImageReady() const {return mCachedRawImageReady ;} BOOL isRawImageValid()const { return mIsRawImageValid ; } void forceToSaveRawImage(S32 desired_discard = 0) ; + /*virtual*/ void setCachedRawImage(S32 discard_level, LLImageRaw* imageraw) ; void destroySavedRawImage() ; LLImageRaw* getSavedRawImage() ; BOOL hasSavedRawImage() const ; @@ -457,15 +457,14 @@ public: protected: /*virtual*/ void switchToCachedImage(); + S32 getCurrentDiscardLevelForFetching() ; private: void init(bool firstinit) ; void cleanup() ; void saveRawImage() ; - BOOL forceFetch() ; void setCachedRawImage() ; - BOOL keepReuestedDiscardLevel(); //for atlas void resetFaceAtlas() ; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index ee934ab9c5..eaef93a81d 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -502,10 +502,8 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image) { llerrs << "LLViewerTextureList::addImageToList - Image already in list" << llendl; } - if ((mImageList.insert(image)).second != true) - { - llwarns << "BAD STUFF! (mImageList.insert(image)).second != true" << llendl; - } + llassert((mImageList.insert(image)).second == true) ; + image->setInImageList(TRUE) ; } @@ -522,10 +520,8 @@ void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image) } llerrs << "LLViewerTextureList::removeImageFromList - Image not in list" << llendl; } - if (mImageList.erase(image) != 1) - { - llwarns << "BAD STUFF! mImageList.erase(image) != 1" << llendl; - } + llassert(mImageList.erase(image) == 1) ; + image->setInImageList(FALSE) ; } -- cgit v1.2.3 From f3083790798e5cf66f38e90b3fa223f923844770 Mon Sep 17 00:00:00 2001 From: Rick Pasetto <rick@lindenlab.com> Date: Wed, 24 Feb 2010 11:34:49 -0800 Subject: EXT-5682 - Honor "Hide URL" for Parcel Media and Parcel Audio Review #141 --- indra/newview/llpanelnearbymedia.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp index 75b25b6a40..c02f154dc8 100644 --- a/indra/newview/llpanelnearbymedia.cpp +++ b/indra/newview/llpanelnearbymedia.cpp @@ -574,13 +574,16 @@ void LLPanelNearByMedia::refreshParcelItems() if (NULL != mParcelMediaItem) { std::string name, url, tooltip; - getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, ""); - if (name.empty() || name == url) + if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMedia()) { - tooltip = url; - } - else { - tooltip = name + " : " + url; + getNameAndUrlHelper(LLViewerParcelMedia::getParcelMedia(), name, url, ""); + if (name.empty() || name == url) + { + tooltip = url; + } + else { + tooltip = name + " : " + url; + } } LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia(); updateListItem(mParcelMediaItem, @@ -617,9 +620,14 @@ void LLPanelNearByMedia::refreshParcelItems() { bool is_playing = LLViewerMedia::isParcelAudioPlaying(); + std::string url; + if (!LLViewerParcelMgr::getInstance()->getAgentParcel()->getObscureMusic()) + { + url = LLViewerMedia::getParcelAudioURL(); + } updateListItem(mParcelAudioItem, mParcelAudioName, - LLViewerMedia::getParcelAudioURL(), + url, -1, // Proximity after Parcel Media, but closer than anything else (!is_playing), is_playing, -- cgit v1.2.3 From 4dafa322f381515f901dffaf314f792620192f46 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Wed, 24 Feb 2010 22:05:25 +0200 Subject: Fixed bug EXT-5158 (View/preset camera icons are gray-scale when selected should show color version). --HG-- branch : product-engine --- indra/newview/llfloatercamera.cpp | 15 +++++++++++++++ indra/newview/llfloatercamera.h | 3 +++ indra/newview/skins/default/xui/en/floater_camera.xml | 4 ++++ 3 files changed, 22 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index ecb6254f8a..abf60a29b4 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -354,6 +354,8 @@ void LLFloaterCamera::updateState() childSetVisible(ZOOM, CAMERA_CTRL_MODE_AVATAR_VIEW != mCurrMode); childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); + updateCameraPresetButtons(); + //hiding or showing the panel with controls by reshaping the floater bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; if (showControls == childIsVisible(CONTROLS)) return; @@ -384,6 +386,16 @@ void LLFloaterCamera::updateState() } } +void LLFloaterCamera::updateCameraPresetButtons() +{ + ECameraPreset preset = (ECameraPreset) gSavedSettings.getU32("CameraPreset"); + + 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()); +} + void LLFloaterCamera::onClickCameraPresets(const LLSD& param) { std::string name = param.asString(); @@ -405,4 +417,7 @@ void LLFloaterCamera::onClickCameraPresets(const LLSD& param) gAgent.changeCameraToMouselook(); } + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + if (camera_floater) + camera_floater->updateCameraPresetButtons(); } diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index 45d5e9a845..f908ad08be 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -103,6 +103,9 @@ private: /* updates the state (UI) according to the current mode */ void updateState(); + /* update camera preset buttons toggle state according to the currently selected preset */ + void updateCameraPresetButtons(); + void onClickBtn(ECameraControlMode mode); void assignButton2Mode(ECameraControlMode mode, const std::string& button_name); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 1b8bbe42d2..f69c763f78 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -132,6 +132,7 @@ height="40" image_selected="Cam_Preset_Back_On" image_unselected="Cam_Preset_Back_Off" + is_toggle="true" layout="topleft" left="0" name="rear_view" @@ -146,6 +147,7 @@ height="40" image_selected="Cam_Preset_Side_On" image_unselected="Cam_Preset_Side_Off" + is_toggle="true" layout="topleft" left_pad="5" name="group_view" @@ -160,6 +162,7 @@ height="40" image_selected="Cam_Preset_Front_On" image_unselected="Cam_Preset_Front_Off" + is_toggle="true" layout="topleft" left="0" name="front_view" @@ -174,6 +177,7 @@ height="40" image_selected="Cam_Preset_Eye_Off" image_unselected="Cam_Preset_Eye_Off" + is_toggle="true" layout="topleft" left_pad="5" name="mouselook_view" -- cgit v1.2.3 From 70d31b4516a823d8b687d388e3a9e9e18b7b7bc5 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Wed, 24 Feb 2010 22:06:04 +0200 Subject: Minor cleanup --HG-- branch : product-engine --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index afd9d7b3f9..25f504c785 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3062,7 +3062,7 @@ void LLAgent::updateCamera() } // Update UI with our camera inputs - LLFloaterCamera* camera_floater = LLFloaterReg::findTypedInstance<LLFloaterCamera>("camera"); + LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); if (camera_floater) { camera_floater->mRotate->setToggleState( -- cgit v1.2.3 From a31cb50d467815af7231e9e81f10b960af383f50 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Wed, 24 Feb 2010 12:17:53 -0800 Subject: DEV-46346 JA linguistic fix --- indra/newview/skins/default/xui/ja/menu_viewer.xml | 130 ++++++++++----------- .../default/xui/ja/panel_preferences_advanced.xml | 2 +- 2 files changed, 66 insertions(+), 66 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/ja/menu_viewer.xml b/indra/newview/skins/default/xui/ja/menu_viewer.xml index a9af96ab0c..a97e7f2f5d 100644 --- a/indra/newview/skins/default/xui/ja/menu_viewer.xml +++ b/indra/newview/skins/default/xui/ja/menu_viewer.xml @@ -38,7 +38,7 @@ <menu_item_call label="自分の土地" name="My Land"/> <menu label="表示" name="LandShow"> <menu_item_check label="移動コントロール" name="Movement Controls"/> - <menu_item_check label="コントロールを表示" name="Camera Controls"/> + <menu_item_check label="カメラコントロール" name="Camera Controls"/> <menu_item_check label="立入禁止ライン" name="Ban Lines"/> <menu_item_check label="ビーコン(標識)" name="beacons"/> <menu_item_check label="プロパティ境界線" name="Property Lines"/> @@ -94,22 +94,22 @@ <menu_item_call label="スクリプトを実行停止にする" name="Set Scripts to Not Running"/> </menu> <menu label="オプション" name="Options"> - <menu_item_call label="デフォルトのアップロード権限を設定" name="perm prefs"/> - <menu_item_check label="権限の詳細を表示" name="DebugPermissions"/> - <menu_item_check label="私のオブジェクトだけを選択" name="Select Only My Objects"/> - <menu_item_check label="動的オブジェクトだけを選択" name="Select Only Movable Objects"/> - <menu_item_check label="範囲内を選択" name="Select By Surrounding"/> - <menu_item_check label="隠れた位置の選択も表示" name="Show Hidden Selection"/> - <menu_item_check label="選択した光の半径範囲を表示" name="Show Light Radius for Selection"/> - <menu_item_check label="選択ビームを表示" name="Show Selection Beam"/> - <menu_item_check label="グリッドポイントにスナップ" name="Snap to Grid"/> - <menu_item_call label="オブジェクトの XY 軸をグリッドにスナップ" name="Snap Object XY to Grid"/> - <menu_item_call label="選択をグリッドに使用" name="Use Selection for Grid"/> + <menu_item_call label="デフォルトのアップロード権限を設定する" name="perm prefs"/> + <menu_item_check label="権限の詳細を表示する" name="DebugPermissions"/> + <menu_item_check label="私のオブジェクトだけを選択する" name="Select Only My Objects"/> + <menu_item_check label="動的オブジェクトだけを選択する" name="Select Only Movable Objects"/> + <menu_item_check label="範囲内を選択する" name="Select By Surrounding"/> + <menu_item_check label="隠れた位置の選択も表示する" name="Show Hidden Selection"/> + <menu_item_check label="選択した光の半径範囲を表示する" name="Show Light Radius for Selection"/> + <menu_item_check label="選択ビームを表示する" name="Show Selection Beam"/> + <menu_item_check label="グリッドポイントにスナップする" name="Snap to Grid"/> + <menu_item_call label="オブジェクトの XY 軸をグリッドにスナップする" name="Snap Object XY to Grid"/> + <menu_item_call label="選択をグリッドに使用する" name="Use Selection for Grid"/> <menu_item_call label="グリッドオプション" name="Grid Options"/> </menu> - <menu label="リンクした部分を選択" name="Select Linked Parts"> - <menu_item_call label="次の部分を選択" name="Select Next Part"/> - <menu_item_call label="前回の部分を選択" name="Select Previous Part"/> + <menu label="リンクした部分を選択する" name="Select Linked Parts"> + <menu_item_call label="次の部分を選択する" name="Select Next Part"/> + <menu_item_call label="前回の部分を選択する" name="Select Previous Part"/> <menu_item_call label="次の部分を含める" name="Include Next Part"/> <menu_item_call label="前回の部分を含める" name="Include Previous Part"/> </menu> @@ -121,28 +121,28 @@ <menu_item_call label="[APP_NAME] について" name="About Second Life"/> </menu> <menu label="アドバンス" name="Advanced"> - <menu_item_call label="私のアニメーションを停止する" name="Stop Animating My Avatar"/> - <menu_item_call label="テクスチャのリベーク" name="Rebake Texture"/> + <menu_item_call label="自分のアニメーションを停止する" name="Stop Animating My Avatar"/> + <menu_item_call label="テクスチャのリベークをする" name="Rebake Texture"/> <menu_item_call label="UI のサイズをデフォルトに設定する" name="Set UI Size to Default"/> - <menu_item_call label="ウィンドウのサイズの設定:" name="Set Window Size..."/> + <menu_item_call label="ウィンドウのサイズを設定する" name="Set Window Size..."/> <menu_item_check label="遠くのオブジェクトを選択しない" name="Limit Select Distance"/> <menu_item_check label="カメラの距離移動を制限しない" name="Disable Camera Distance"/> <menu_item_check label="高解像度スナップショット" name="HighResSnapshot"/> - <menu_item_check label="シャッター音とアニメーションなしでスナップショットをディスクに保存" name="QuietSnapshotsToDisk"/> + <menu_item_check label="シャッター音とアニメーションなしでスナップショットをディスクに保存する" name="QuietSnapshotsToDisk"/> <menu_item_check label="圧縮してスナップショットをディスクに保存する" name="CompressSnapshotsToDisk"/> <menu label="パフォーマンスツール" name="Performance Tools"> <menu_item_call label="ラグ計測器" name="Lag Meter"/> <menu_item_check label="統計バー" name="Statistics Bar"/> - <menu_item_check label="アバターのレンダリングコストを表示" name="Avatar Rendering Cost"/> + <menu_item_check label="アバターのレンダリングコストを表示する" name="Avatar Rendering Cost"/> </menu> <menu label="ハイライトと目に見えるもの" name="Highlighting and Visibility"> <menu_item_check label="チージービーコン" name="Cheesy Beacon"/> <menu_item_check label="パーティクルを非表示にする" name="Hide Particles"/> <menu_item_check label="選択したものを非表示にする" name="Hide Selected"/> - <menu_item_check label="透明部分をハイライト" name="Highlight Transparent"/> - <menu_item_check label="HUD を表示" name="Show HUD Attachments"/> - <menu_item_check label="一人称視点のときに十字線を表示" name="ShowCrosshairs"/> - <menu_item_check label="土地のツールチップを表示" name="Land Tips"/> + <menu_item_check label="透明部分をハイライトする" name="Highlight Transparent"/> + <menu_item_check label="HUD を表示する" name="Show HUD Attachments"/> + <menu_item_check label="一人称視点のときに十字線を表示する" name="ShowCrosshairs"/> + <menu_item_check label="土地のツールチップを表示する" name="Land Tips"/> </menu> <menu label="レンダリング(種類)" name="Rendering Types"> <menu_item_check label="シンプル" name="Simple"/> @@ -176,17 +176,17 @@ <menu_item_call label="画像 (L$ [COST] )..." name="Upload Image"/> <menu_item_check label="検索" name="Search"/> <menu_item_call label="キーをリリース" name="Release Keys"/> - <menu_item_call label="UI のサイズをデフォルトに設定" name="Set UI Size to Default"/> + <menu_item_call label="UI のサイズをデフォルトに設定する" name="Set UI Size to Default"/> <menu_item_check label="常に走る" name="Always Run"/> - <menu_item_check label="飛行" name="Fly"/> + <menu_item_check label="飛行する" name="Fly"/> <menu_item_call label="ウィンドウを閉じる" name="Close Window"/> <menu_item_call label="全てのウィンドウを閉じる" name="Close All Windows"/> - <menu_item_call label="スナップショットをディスクに保存" name="Snapshot to Disk"/> + <menu_item_call label="スナップショットをディスクに保存する" name="Snapshot to Disk"/> <menu_item_call label="一人称視点" name="Mouselook"/> <menu_item_check label="ジョイスティックフライカム" name="Joystick Flycam"/> - <menu_item_call label="表示をリセット" name="Reset View"/> + <menu_item_call label="表示をリセットする" name="Reset View"/> <menu_item_call label="最後の発言者を見る" name="Look at Last Chatter"/> - <menu label="制作ツールを選択" name="Select Tool"> + <menu label="制作ツールを選択する" name="Select Tool"> <menu_item_call label="焦点ツール" name="Focus"/> <menu_item_call label="移動ツール" name="Move"/> <menu_item_call label="編集ツール" name="Edit"/> @@ -219,21 +219,21 @@ <menu_item_check label="バッジ" name="Badge"/> </menu> <menu label="情報を表示" name="Display Info"> - <menu_item_check label="時間を表示" name="Show Time"/> - <menu_item_check label="描画情報を表示" name="Show Render Info"/> - <menu_item_check label="マトリックスを表示" name="Show Matrices"/> - <menu_item_check label="カーソルを乗せた場所の色を表示" name="Show Color Under Cursor"/> - <menu_item_check label="オブジェクトのアップデートを表示" name="Show Updates"/> + <menu_item_check label="時間を表示する" name="Show Time"/> + <menu_item_check label="描画情報を表示する" name="Show Render Info"/> + <menu_item_check label="マトリックスを表示する" name="Show Matrices"/> + <menu_item_check label="カーソルを乗せた場所の色を表示する" name="Show Color Under Cursor"/> + <menu_item_check label="オブジェクトのアップデートを表示する" name="Show Updates"/> </menu> - <menu label="エラーを実行" name="Force Errors"> + <menu label="エラー実行" name="Force Errors"> <menu_item_call label="ブレークポイント" name="Force Breakpoint"/> - <menu_item_call label="LLError とクラッシュを実行" name="Force LLError And Crash"/> - <menu_item_call label="バッドメモリアクセスを実行" name="Force Bad Memory Access"/> + <menu_item_call label="LLError とクラッシュを実行する" name="Force LLError And Crash"/> + <menu_item_call label="バッドメモリアクセスを実行する" name="Force Bad Memory Access"/> <menu_item_call label="無限ループ" name="Force Infinite Loop"/> - <menu_item_call label="ドライバのクラッシュを実行" name="Force Driver Carsh"/> - <menu_item_call label="ソフトウェア例外エラーの実行" name="Force Software Exception"/> - <menu_item_call label="ビューワの接続遮断を実行" name="Force Disconnect Viewer"/> - <menu_item_call label="メモリリークのシミュレート" name="Memory Leaking Simulation"/> + <menu_item_call label="ドライバのクラッシュを実行する" name="Force Driver Carsh"/> + <menu_item_call label="ソフトウェア例外エラーの実行する" name="Force Software Exception"/> + <menu_item_call label="ビューワの接続遮断を実行する" name="Force Disconnect Viewer"/> + <menu_item_call label="メモリリークをシミュレートする" name="Memory Leaking Simulation"/> </menu> <menu label="レンダーテスト" name="Render Tests"> <menu_item_check label="カメラオフセット" name="Camera Offset"/> @@ -261,7 +261,7 @@ <menu_item_call label="選択したテクスチャ情報基底" name="Selected Texture Info Basis"/> <menu_item_check label="ワイヤーフレーム" name="Wireframe"/> <menu_item_check label="オブジェクト間オクルージョン" name="Object-Object Occlusion"/> - <menu_item_check label="フレームバッファ・オブジェクト" name="Framebuffer Objects"/> + <menu_item_check label="フレームバッファオブジェクト" name="Framebuffer Objects"/> <menu_item_check label="遅延レンダリング" name="Deferred Rendering"/> <menu_item_check label="グローバルイルミネーション" name="Global Illumination"/> <menu_item_check label="GL デバッグ" name="Debug GL"/> @@ -274,10 +274,10 @@ <menu_item_check label="テクスチャアトラス" name="Texture Atlas"/> <menu_item_check label="装着された光源を描画する" name="Render Attached Lights"/> <menu_item_check label="取り付けられたパーティクルを描画する" name="Render Attached Particles"/> - <menu_item_check label="マウスオーバーで強調表示" name="Hover Glow Objects"/> + <menu_item_check label="マウスオーバーで強調表示する" name="Hover Glow Objects"/> </menu> <menu label="ネットワーク" name="Network"> - <menu_item_check label="エージェントを一時停止" name="AgentPause"/> + <menu_item_check label="エージェントを一時停止する" name="AgentPause"/> <menu_item_call label="メッセージログを有効にする" name="Enable Message Log"/> <menu_item_call label="メッセージログを使用不可にする" name="Disable Message Log"/> <menu_item_check label="速力が挿入されたオブジェクト" name="Velocity Interpolate Objects"/> @@ -295,9 +295,9 @@ </menu> <menu label="世界" name="World"> <menu_item_check label="シムの太陽の設定を無視する" name="Sim Sun Override"/> - <menu_item_check label="ビーコンの強調表示" name="Cheesy Beacon"/> + <menu_item_check label="ビーコンを強調表示する" name="Cheesy Beacon"/> <menu_item_check label="固定された天気" name="Fixed Weather"/> - <menu_item_call label="リージョンオブジェクトのキャッシュをダンプ" name="Dump Region Object Cache"/> + <menu_item_call label="リージョンオブジェクトのキャッシュをダンプする" name="Dump Region Object Cache"/> </menu> <menu label="UI" name="UI"> <menu_item_call label="Web ブラウザのテスト" name="Web Browser Test"/> @@ -308,7 +308,7 @@ <menu_item_call label="選択したオブジェクト情報をプリント" name="Print Selected Object Info"/> <menu_item_call label="エージェント情報をプリント" name="Print Agent Info"/> <menu_item_call label="メモリ使用状況" name="Memory Stats"/> - <menu_item_check label="ダブルクリックした場所に自動操作で移動" name="Double-ClickAuto-Pilot"/> + <menu_item_check label="ダブルクリックした場所に自動操作で移動する" name="Double-ClickAuto-Pilot"/> <menu_item_check label="SelectMgr のデバッグ" name="Debug SelectMgr"/> <menu_item_check label="ダブルクリック" name="Debug Clicks"/> <menu_item_check label="デバッグ表示" name="Debug Views"/> @@ -318,15 +318,15 @@ <menu_item_check label="WindowProc のデバッグ" name="Debug WindowProc"/> </menu> <menu label="XUI" name="XUI"> - <menu_item_call label="色の設定を更新" name="Reload Color Settings"/> - <menu_item_call label="フォントテストを表示" name="Show Font Test"/> + <menu_item_call label="色の設定を更新する" name="Reload Color Settings"/> + <menu_item_call label="フォントテストを表示する" name="Show Font Test"/> <menu_item_call label="XML から読み込む" name="Load from XML"/> - <menu_item_call label="XML で保存" name="Save to XML"/> - <menu_item_check label="XUI ネームを表示" name="Show XUI Names"/> - <menu_item_call label="テスト用 IM を送信" name="Send Test IMs"/> + <menu_item_call label="XML で保存する" name="Save to XML"/> + <menu_item_check label="XUI ネームを表示する" name="Show XUI Names"/> + <menu_item_call label="テスト用 IM を送信する" name="Send Test IMs"/> </menu> <menu label="アバター" name="Character"> - <menu label="ベークドテクスチャを取得" name="Grab Baked Texture"> + <menu label="ベークドテクスチャを取得する" name="Grab Baked Texture"> <menu_item_call label="瞳" name="Iris"/> <menu_item_call label="頭" name="Head"/> <menu_item_call label="上半身" name="Upper Body"/> @@ -334,23 +334,23 @@ <menu_item_call label="スカート" name="Skirt"/> </menu> <menu label="キャラクターテスト" name="Character Tests"> - <menu_item_call label="容姿を XML に保存" name="Appearance To XML"/> + <menu_item_call label="容姿を XML に保存する" name="Appearance To XML"/> <menu_item_call label="キャラクタジオメトリの切り替え" name="Toggle Character Geometry"/> <menu_item_call label="男性アバターのテスト" name="Test Male"/> <menu_item_call label="女性アバターのテスト" name="Test Female"/> <menu_item_call label="PG のトグル" name="Toggle PG"/> <menu_item_check label="選択アバター許可" name="Allow Select Avatar"/> </menu> - <menu_item_call label="Params をデフォルトに実行" name="Force Params to Default"/> + <menu_item_call label="Params をデフォルトで実行する" name="Force Params to Default"/> <menu_item_check label="アニメーション情報" name="Animation Info"/> - <menu_item_check label="アニメーションをスローモーション" name="Slow Motion Animations"/> + <menu_item_check label="スローモーションのアニメーション" name="Slow Motion Animations"/> <menu_item_check label="見ているものを表示する" name="Show Look At"/> <menu_item_check label="クリックした場所を表示する" name="Show Point At"/> <menu_item_check label="結合部のアップデートのデバッグ" name="Debug Joint Updates"/> <menu_item_check label="LOD を無効にする" name="Disable LOD"/> <menu_item_check label="キャラクター Vis のデバッグ" name="Debug Character Vis"/> - <menu_item_check label="骨組みの衝突判定を表示" name="Show Collision Skeleton"/> - <menu_item_check label="エージェントのターゲットを表示" name="Display Agent Target"/> + <menu_item_check label="骨組みの衝突判定を表示する" name="Show Collision Skeleton"/> + <menu_item_check label="エージェントのターゲットを表示する" name="Display Agent Target"/> --> <menu_item_call label="アタッチメントをダンプ" name="Dump Attachments"/> <menu_item_call label="アバターテクスチャをデバッグ" name="Debug Avatar Textures"/> @@ -359,8 +359,8 @@ <menu_item_check label="HTTP Texture" name="HTTP Textures"/> <menu_item_call label="圧縮画像" name="Compress Images"/> <menu_item_check label="Output Debug Minidump" name="Output Debug Minidump"/> - <menu_item_check label="次回の起動時にコンソールウィンドウを表示" name="Console Window"/> - <menu_item_check label="管理者メニューを表示" name="View Admin Options"/> + <menu_item_check label="次回の起動時にコンソールウィンドウを表示する" name="Console Window"/> + <menu_item_check label="管理者メニューを表示する" name="View Admin Options"/> <menu_item_call label="管理者ステータスの呼び出し" name="Request Admin Options"/> <menu_item_call label="管理者ステータス解除" name="Leave Admin Options"/> </menu> @@ -368,19 +368,19 @@ <menu label="Object"> <menu_item_call label="コピーを取る" name="Take Copy"/> <menu_item_call label="私を所有者にする" name="Force Owner To Me"/> - <menu_item_call label="所有者権限の実行" name="Force Owner Permissive"/> + <menu_item_call label="所有者権限を実行する" name="Force Owner Permissive"/> <menu_item_call label="削除" name="Delete"/> <menu_item_call label="ロック" name="Lock"/> - <menu_item_call label="アセット ID を取得" name="Get Assets IDs"/> + <menu_item_call label="アセット ID を取得する" name="Get Assets IDs"/> </menu> <menu label="区画" name="Parcel"> <menu_item_call label="私を所有者にする" name="Owner To Me"/> - <menu_item_call label="リンデンコンテンツに設定" name="Set to Linden Content"/> - <menu_item_call label="パブリックの土地を取得" name="Claim Public Land"/> + <menu_item_call label="リンデンコンテンツに設定する" name="Set to Linden Content"/> + <menu_item_call label="パブリックの土地を取得する" name="Claim Public Land"/> </menu> <menu label="リージョン/地域" name="Region"> <menu_item_call label="一時アセットデータをダンプ" name="Dump Temp Asset Data"/> - <menu_item_call label="リージョンの状態を保存" name="Save Region State"/> + <menu_item_call label="リージョンの状態を保存する" name="Save Region State"/> </menu> <menu_item_call label="グリッドツール" name="God Tools"/> </menu> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml index e0c25c35a1..87cd772143 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_advanced.xml @@ -22,7 +22,7 @@ <radio_item label="近くのチャット" name="0"/> <radio_item label="別々のウィンドウ" name="1"/> </radio_group> - <check_box label="押すとボイスのオン・オフを切り替えます:" name="push_to_talk_toggle_check" tool_tip="トグルモードの時にトリガーキーを1度押して放すと、マイクのオン・オフ設定を切り替えます。 トグルモードではないときは、トリガーキーを押した状態の時のみあなたの声が相手に聞こえます。"/> + <check_box label="ボイスのオン・オフ切り替えに使用するトリガーキー:" name="push_to_talk_toggle_check" tool_tip="トグルモードの時にトリガーキーを 1 度押して放すと、マイクのオン・オフ設定を切り替えます。 トグルモードではないときは、トリガーキーを押した状態の時のみあなたの声が相手に聞こえます。"/> <line_editor label="プッシュ・トゥ・スピークのトリガー" name="modifier_combo"/> <button label="キー設定" name="set_voice_hotkey_button"/> <button label="マウスの中央ボタン" name="set_voice_middlemouse_button" tool_tip="マウスの中央ボタンにリセットします"/> -- cgit v1.2.3 From 59b82f8185247638a5fb294881ffc0c0558952b3 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 24 Feb 2010 23:38:50 +0200 Subject: Backed out of changeset 9941:57eb2dba6641 --HG-- branch : product-engine --- indra/newview/llagent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 25f504c785..afd9d7b3f9 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3062,7 +3062,7 @@ void LLAgent::updateCamera() } // Update UI with our camera inputs - LLFloaterCamera* camera_floater = LLFloaterCamera::findInstance(); + LLFloaterCamera* camera_floater = LLFloaterReg::findTypedInstance<LLFloaterCamera>("camera"); if (camera_floater) { camera_floater->mRotate->setToggleState( -- cgit v1.2.3 From c4277e421ca8934e405d778f3c86f21760c55c9d Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Wed, 24 Feb 2010 23:41:04 +0200 Subject: Implemented (EXT-4704) Add maturity icons to Prefs -> General. --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 18 ++++++++++++++- indra/newview/llfloaterpreference.h | 3 ++- .../default/xui/en/panel_preferences_general.xml | 27 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index fb7e757c43..780393a9c0 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -323,7 +323,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); - + mCommitCallbackRegistrar.add("Pref.MaturitySettings", boost::bind(&LLFloaterPreference::onChangeMaturity, this)); + sSkin = gSavedSettings.getString("SkinCurrent"); gSavedSettings.getControl("AvatarNameTagMode")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2)); @@ -536,6 +537,9 @@ void LLFloaterPreference::onOpen(const LLSD& key) { childSetText("maturity_desired_textbox", maturity_combo->getSelectedItemLabel()); childSetVisible("maturity_desired_combobox", false); + + // Display selected maturity icons. + onChangeMaturity(); } // Enabled/disabled popups, might have been changed by user actions @@ -1212,7 +1216,19 @@ void LLFloaterPreference::applyResolution() refresh(); } +void LLFloaterPreference::onChangeMaturity() +{ + U8 sim_access = gSavedSettings.getU32("PreferredMaturity"); + getChild<LLIconCtrl>("rating_icon_general")->setVisible(sim_access == SIM_ACCESS_PG + || sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_moderate")->setVisible(sim_access == SIM_ACCESS_MATURE + || sim_access == SIM_ACCESS_ADULT); + + getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT); +} void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 93b39d72bc..71aa5d3189 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -134,8 +134,9 @@ public: void onCommitMediaEnabled(); void onCommitMusicEnabled(); void applyResolution(); + void onChangeMaturity(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); - void getUIColor(LLUICtrl* ctrl, const LLSD& param); + void getUIColor(LLUICtrl* ctrl, const LLSD& param); void buildPopupLists(); static void refreshSkin(void* data); 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 099c789e4b..d11aebe943 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -141,7 +141,34 @@ label="General" name="Desired_PG" value="13" /> + <combo_box.commit_callback + function="Pref.MaturitySettings"/> </combo_box> + <icon + follows="left|top" + height="16" + image_name="Parcel_PG_Dark" + layout="topleft" + left_pad="5" + name="rating_icon_general" + top_delta="3" + width="18"/> + <icon + follows="left|top" + height="16" + image_name="Parcel_M_Dark" + layout="topleft" + left_pad="2" + name="rating_icon_moderate" + width="18"/> + <icon + follows="left|top" + height="16" + image_name="Parcel_R_Dark" + layout="topleft" + left_pad="2" + name="rating_icon_adult" + width="18"/> <text type="string" length="1" -- cgit v1.2.3 From f2a64ad572147245552a3424c55d0821f7b0bfa9 Mon Sep 17 00:00:00 2001 From: Chuck Linden <chuck@lindenlab.com> Date: Wed, 24 Feb 2010 17:52:45 -0500 Subject: Reworked layout of Advanced Permissions flags. https://jira.secondlife.com/browse/EXT-922 --- .../newview/skins/default/xui/en/floater_tools.xml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index d989282b9f..4e59a9b1ca 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2,7 +2,7 @@ <floater legacy_header_height="18" follows="left|top|right" - height="570" + height="580" layout="topleft" bg_opaque_image="Window_NoTitle_Foreground" bg_alpha_image="Window_NoTitle_Background" @@ -737,7 +737,7 @@ </text> <tab_container follows="left|top" - height="400" + height="410" halign="center" left="0" name="Object Info Tabs" @@ -1054,7 +1054,7 @@ even though the user gets a free copy. name="perms_build" left="0" top="241" - height="120" + height="130" width="278"> <text type="string" @@ -1135,7 +1135,7 @@ even though the user gets a free copy. left="10" name="B:" height="10" - width="45"> + width="80"> B: </text> <text @@ -1147,7 +1147,7 @@ even though the user gets a free copy. left_pad="0" name="O:" height="10" - width="44"> + width="80"> O: </text> <text @@ -1159,7 +1159,7 @@ even though the user gets a free copy. left_pad="0" name="G:" height="10" - width="43"> + width="80"> G: </text> <text @@ -1167,11 +1167,12 @@ even though the user gets a free copy. text_color="White" length="1" follows="left|top" - left_pad="0" + left="10" + top_pad="2" layout="topleft" name="E:" height="10" - width="43"> + width="80"> E: </text> <text @@ -1183,7 +1184,7 @@ even though the user gets a free copy. left_pad="0" name="N:" height="10" - width="48"> + width="80"> N: </text> <text @@ -1195,7 +1196,7 @@ even though the user gets a free copy. left_pad="0" name="F:" height="10" - width="50"> + width="80"> F: </text> </panel> -- cgit v1.2.3 From 7745b0e1c32ba6019cdc483c8b8013c0da0f6d5d Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Wed, 24 Feb 2010 16:16:31 -0800 Subject: EXT-2237 Preferences > Alerts shows "$ignoretext" in the list reviewed by Richard - CC#142 --- indra/newview/skins/default/xui/en/notifications.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8f1812830f..9d2c7b8bcc 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5850,7 +5850,8 @@ Are you sure you want to close all IMs? <usetemplate name="okcancelignore" notext="Cancel" - yestext="OK"/> + yestext="OK" + ignoretext="Confirm before I close all IMs"/> </notification> <notification icon="notifytip.tga" -- cgit v1.2.3 From 66d2bd3de30b77301d200c7449d33bb5b81b94ec Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Wed, 24 Feb 2010 16:16:58 -0800 Subject: EXT-5362 clicking an AutoZoom web prim twice will focus camera on your avatar reviewed by Richard - CC#142 --- indra/newview/llviewermediafocus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 88e7cfec86..b8179f7fc2 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -126,7 +126,7 @@ void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 fac if(face_auto_zoom && ! parcel->getMediaPreventCameraZoom()) { // Zoom in on this face - mMediaControls.get()->resetZoomLevel(); + mMediaControls.get()->resetZoomLevel(false); mMediaControls.get()->nextZoomLevel(); } else -- cgit v1.2.3 From cea0bac85cf360f7e2818796585dc9ec49359adc Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Wed, 24 Feb 2010 18:45:47 -0800 Subject: EXT-5575 DE xui fix by me, plus JA linguistic fixes by Rika. --- .../skins/default/xui/de/floater_avatar_picker.xml | 20 +++++++++++++-- .../skins/default/xui/de/floater_bulk_perms.xml | 2 +- .../newview/skins/default/xui/de/floater_tools.xml | 18 ++++++------- .../default/xui/de/panel_preferences_advanced.xml | 2 +- .../skins/default/xui/ja/floater_im_container.xml | 2 +- .../skins/default/xui/ja/floater_snapshot.xml | 30 +++++++++++----------- .../skins/default/xui/ja/floater_sys_well.xml | 2 +- indra/newview/skins/default/xui/ja/menu_object.xml | 2 +- .../skins/default/xui/ja/teleport_strings.xml | 22 ++++++++-------- 9 files changed, 58 insertions(+), 42 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/de/floater_avatar_picker.xml b/indra/newview/skins/default/xui/de/floater_avatar_picker.xml index f1281bfb9b..6eb99f8b42 100644 --- a/indra/newview/skins/default/xui/de/floater_avatar_picker.xml +++ b/indra/newview/skins/default/xui/de/floater_avatar_picker.xml @@ -41,8 +41,24 @@ Person ein: <text name="meters"> Meter </text> - <button font="SansSerifSmall" label="Liste aktualisieren" label_selected="Liste aktualisieren" left_delta="10" name="Refresh" width="105"/> - <scroll_list bottom_delta="-169" height="159" name="NearMe"/> + <button + follows="top|left" + layout="topleft" + left_pad="0" + height="28" + width="28" + name="Refresh" + image_overlay="Refresh_Off" /> + <scroll_list + follows="all" + height="100" + border="false" + layout="topleft" + left="0" + name="NearMe" + sort_column="0" + top="50" + width="132" /> </panel> </tab_container> <button label="OK" label_selected="OK" name="ok_btn"/> diff --git a/indra/newview/skins/default/xui/de/floater_bulk_perms.xml b/indra/newview/skins/default/xui/de/floater_bulk_perms.xml index 1d766ac07b..a434b3a2fa 100644 --- a/indra/newview/skins/default/xui/de/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/de/floater_bulk_perms.xml @@ -43,7 +43,7 @@ Jeder: </text> <check_box label="Kopieren" name="everyone_copy"/> - <text name="NextOwnerLabel" top="160" left="10"> + <text name="NextOwnerLabel" top="160" left="10" width="200"> Nächster Eigentümer: </text> <check_box label="Bearbeiten" name="next_owner_modify"/> diff --git a/indra/newview/skins/default/xui/de/floater_tools.xml b/indra/newview/skins/default/xui/de/floater_tools.xml index 34f97af04f..7646efccd4 100644 --- a/indra/newview/skins/default/xui/de/floater_tools.xml +++ b/indra/newview/skins/default/xui/de/floater_tools.xml @@ -69,7 +69,7 @@ </text> <check_box label="Beide Seiten dehnen" name="checkbox uniform"/> <check_box initial_value="true" label="Texturen dehnen" name="checkbox stretch textures"/> - <check_box initial_value="true" label="An Raster ausrichten" name="checkbox snap to grid"/> + <check_box initial_value="true" label="An Raster ausrichten" name="checkbox snap to grid" top_pad="10"/> <combo_box name="combobox grid mode" tool_tip="Wählen Sie das Rasterlineal aus, um das Objekt zu positionieren."> <combo_box.item label="Globales Raster" name="World"/> <combo_box.item label="Lokales Raster" name="Local"/> @@ -364,14 +364,14 @@ Objekteigenschaften bearbeiten: </text> <check_box label="Flexibler Pfad" name="Flexible1D Checkbox Ctrl" tool_tip="Bewirkt, dass sich das Objekt um die Z-Achse biegen kann. (Nur Client-Seite)"/> - <spinner label="Weichheit" name="FlexNumSections"/> - <spinner label="Schwerkraft" name="FlexGravity"/> - <spinner label="Ziehen" name="FlexFriction"/> - <spinner label="Wind" name="FlexWind"/> - <spinner label="Spannung" name="FlexTension"/> - <spinner label="Erzwingen X" name="FlexForceX"/> - <spinner label="Erzwingen Y" name="FlexForceY"/> - <spinner label="Erzwingen Z" name="FlexForceZ"/> + <spinner label="Weichheit" name="FlexNumSections" width="140"/> + <spinner label="Schwerkraft" name="FlexGravity" width="140"/> + <spinner label="Ziehen" name="FlexFriction" width="140"/> + <spinner label="Wind" name="FlexWind" width="140"/> + <spinner label="Spannung" name="FlexTension" width="140"/> + <spinner label="Erzwingen X" name="FlexForceX" width="140"/> + <spinner label="Erzwingen Y" name="FlexForceY" width="140"/> + <spinner label="Erzwingen Z" name="FlexForceZ" width="140"/> <check_box label="Licht" name="Light Checkbox Ctrl" tool_tip="Verursacht, dass Objekt Licht emittiert"/> <color_swatch label="" name="colorswatch" tool_tip="Klicken Sie hier, um die Farbauswahl zu öffnen"/> <texture_picker label="" name="light texture control" tool_tip="Klicken, um eine Bild auszuwählen (dieser Effekt funktioniert nur, wenn zeitversetzte Wiedergabe aktiviert ist)"/> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml index df1bbd5d52..78c495e377 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml @@ -16,7 +16,7 @@ <check_box label="Avatarlippen beim Sprechen bewegen" name="enable_lip_sync"/> <check_box label="Blasen-Chat" name="bubble_text_chat"/> <slider label="Deckkraft" label_width="66" name="bubble_chat_opacity"/> - <color_swatch name="background" tool_tip="Farbe für Blasen-Chat auswählen"/> + <color_swatch name="background" tool_tip="Farbe für Blasen-Chat auswählen" left_pad="35"/> <check_box label="Skript-Fehler anzeigen:" name="show_script_errors"/> <radio_group name="show_location"> <radio_item label="Chat in der Nähe" name="0"/> diff --git a/indra/newview/skins/default/xui/ja/floater_im_container.xml b/indra/newview/skins/default/xui/ja/floater_im_container.xml index 1d028258ec..06b65e27f0 100644 --- a/indra/newview/skins/default/xui/ja/floater_im_container.xml +++ b/indra/newview/skins/default/xui/ja/floater_im_container.xml @@ -1,2 +1,2 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<multi_floater name="floater_im_box" title="換算"/> +<multi_floater name="floater_im_box" title="会話"/> diff --git a/indra/newview/skins/default/xui/ja/floater_snapshot.xml b/indra/newview/skins/default/xui/ja/floater_snapshot.xml index 53384aca90..e51e63999a 100644 --- a/indra/newview/skins/default/xui/ja/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/ja/floater_snapshot.xml @@ -3,9 +3,9 @@ <text name="type_label"> スナップショットの送り先 </text> - <radio_group label="スナップショット・タイプ" name="snapshot_type_radio"> + <radio_group label="スナップショットの種類" name="snapshot_type_radio"> <radio_item label="メール" name="postcard"/> - <radio_item label="私の持ち物(L$[AMOUNT])" name="texture"/> + <radio_item label="「持ち物」に保存(L$ [AMOUNT])" name="texture"/> <radio_item label="コンピューターに保存" name="local"/> </radio_group> <text name="file_size_label"> @@ -29,26 +29,26 @@ </text> <combo_box label="解像度" name="postcard_size_combo"> <combo_box.item label="現在のウィンドウ" name="CurrentWindow"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> + <combo_box.item label="640 x 480" name="640x480"/> + <combo_box.item label="800 x 600" name="800x600"/> + <combo_box.item label="1024 x 768" name="1024x768"/> <combo_box.item label="カスタム" name="Custom"/> </combo_box> <combo_box label="解像度" name="texture_size_combo"> <combo_box.item label="現在のウィンドウ" name="CurrentWindow"/> - <combo_box.item label="小(128x128)" name="Small(128x128)"/> - <combo_box.item label="中(256x256)" name="Medium(256x256)"/> - <combo_box.item label="大(512x512)" name="Large(512x512)"/> + <combo_box.item label="小(128 x 128)" name="Small(128x128)"/> + <combo_box.item label="中(256 x 256)" name="Medium(256x256)"/> + <combo_box.item label="大(512 x5 12)" name="Large(512x512)"/> <combo_box.item label="カスタム" name="Custom"/> </combo_box> <combo_box label="解像度" name="local_size_combo"> <combo_box.item label="現在のウィンドウ" name="CurrentWindow"/> - <combo_box.item label="320x240" name="320x240"/> - <combo_box.item label="640x480" name="640x480"/> - <combo_box.item label="800x600" name="800x600"/> - <combo_box.item label="1024x768" name="1024x768"/> - <combo_box.item label="1280x1024" name="1280x1024"/> - <combo_box.item label="1600x1200" name="1600x1200"/> + <combo_box.item label="320 x 240" name="320x240"/> + <combo_box.item label="640 x 480" name="640x480"/> + <combo_box.item label="800 x 600" name="800x600"/> + <combo_box.item label="1024 x 768" name="1024x768"/> + <combo_box.item label="1280 x 1024" name="1280x1024"/> + <combo_box.item label="1600 x 1200" name="1600x1200"/> <combo_box.item label="カスタム" name="Custom"/> </combo_box> <combo_box label="形式" name="local_format_combo"> @@ -74,6 +74,6 @@ <check_box label="画面全体を静止" name="freeze_frame_check"/> <check_box label="自動更新" name="auto_snapshot_check"/> <string name="unknown"> - 未知 + 不明 </string> </floater> diff --git a/indra/newview/skins/default/xui/ja/floater_sys_well.xml b/indra/newview/skins/default/xui/ja/floater_sys_well.xml index 3ac2a11a97..6536eb253c 100644 --- a/indra/newview/skins/default/xui/ja/floater_sys_well.xml +++ b/indra/newview/skins/default/xui/ja/floater_sys_well.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> <floater name="notification_chiclet" title="通知"> <string name="title_im_well_window"> - 換算 + 会話 </string> <string name="title_notification_well_window"> 通知 diff --git a/indra/newview/skins/default/xui/ja/menu_object.xml b/indra/newview/skins/default/xui/ja/menu_object.xml index 888d382e7e..1ff2dfec7b 100644 --- a/indra/newview/skins/default/xui/ja/menu_object.xml +++ b/indra/newview/skins/default/xui/ja/menu_object.xml @@ -12,7 +12,7 @@ <context_menu label="取り付ける ▶" name="Object Attach"/> <context_menu label="HUD を取り付ける ▶" name="Object Attach HUD"/> </context_menu> - <context_menu label="取り外す ▶" name="Remove"> + <context_menu label="取り除く ▶" name="Remove"> <menu_item_call label="嫌がらせの報告" name="Report Abuse..."/> <menu_item_call label="ブロック" name="Object Mute"/> <menu_item_call label="返却" name="Return..."/> diff --git a/indra/newview/skins/default/xui/ja/teleport_strings.xml b/indra/newview/skins/default/xui/ja/teleport_strings.xml index 72c183d03b..adcf0e42c3 100644 --- a/indra/newview/skins/default/xui/ja/teleport_strings.xml +++ b/indra/newview/skins/default/xui/ja/teleport_strings.xml @@ -10,14 +10,14 @@ このメッセージが何度も出る場合は、[SUPPORT_SITE] をご確認ください。 </message> <message name="blocked_tport"> - 申し訳ございません。テレポートは現在、ブロックされています。もう少し後でやり直してください。 + 申し訳ございませんが、テレポートは現在、ブロックされています。もう少し後でやり直してください。 やり直してもテレポートできない場合は、いったんログアウトし、再度ログインして問題を解決してください。 </message> <message name="nolandmark_tport"> - 残念ながら、システムはランドマーク目的地を探せませんでした。 + 残念ながら、システムはランドマークの目的地を探せませんでした。 </message> <message name="timeout_tport"> - 申し訳ございません。システムはテレポート接続を完了できませんでした。 + 申し訳ございませんが、システムはテレポートの接続を完了できませんでした。 もう少し後でやり直してください。 </message> <message name="noaccess_tport"> @@ -27,18 +27,18 @@ 添付物は、まだ到着していません。あと数秒間お待ちいただくか、いったんログアウトし、再度ログインしてからテレポートをやり直してださい。 </message> <message name="too_many_uploads_tport"> - この地域の資産キューが現在込み合っているため、テレポート・リクエストを時間通りに処理することが難しい状況です。 + この地域の資産キューが現在込み合っているため、要求されたテレポートを処理することが難しい状況です。 数分後にやり直すか、または混雑していない他の地域をお試しください。 </message> <message name="expired_tport"> - 申し訳ございません。システムはテレポート・リクエストを時間どおりに完了できませんでした。数分後にやり直してください。 + 申し訳ございませんが、システムは要求されたテレポートを完了できませんでした。数分後にやり直してください。 </message> <message name="expired_region_handoff"> - 申し訳ございません。システムは地域間の移動を時間どおりに完了できませんでした。 + 申し訳ございませんが、システムは地域間の移動を時間どおりに完了できませんでした。 数分後にやり直してください。 </message> <message name="no_host"> - テレポート目的地を見つけられません。目的地が一時的に利用できない状態か、またはすでに消滅している可能性があります。数分後にやり直してください。 + テレポートの目的地を見つけられません。目的地が一時的に利用できない状態か、またはすでに消滅している可能性があります。数分後にやり直してください。 </message> <message name="no_inventory_host"> 持ち物システムは現在利用できません。 @@ -49,19 +49,19 @@ 目的地に送信しています。 </message> <message name="redirecting"> - 別の目的地に再案内しています。 + 別の目的地にリダイレクトしています。 </message> <message name="relaying"> 目的地に中継しています。 </message> <message name="sending_home"> - ホーム位置リクエストを送信しています。 + ホーム位置のリクエストを送信しています。 </message> <message name="sending_landmark"> - ランドマーク位置リクエストを送信しています。 + ランドマーク位置のリクエストを送信しています。 </message> <message name="completing"> - テレポートを完了しています。 + テレポートを完了します。 </message> <message name="resolving"> 目的地を解決しています。 -- cgit v1.2.3 From 0faa004aa11cca9b60dfe8c176a0f407e880d809 Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Thu, 25 Feb 2010 09:53:38 +0000 Subject: EXT-5480: Support secondlife:///app/region SLapps. This is defined to work exactly like the classic secondlife://{REGION} Slurl. However, the later syntax cannot support spaces in the region name because spaces (and %20 chars) are illegal in the hostname of an http URL. Some browsers let you get away with this, but some do not (such as Qt's Webkit). Hence we have decided to introduce the newer secondlife:///app/region alternative. --- indra/newview/llviewerregion.cpp | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 77d2d493bd..ce627494c8 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -49,6 +49,7 @@ #include "llagent.h" #include "llcallingcard.h" #include "llcaphttpsender.h" +#include "llcommandhandler.h" #include "lldir.h" #include "lleventpoll.h" #include "llfloatergodtools.h" @@ -58,6 +59,7 @@ #include "llsdutil.h" #include "llstartup.h" #include "lltrans.h" +#include "llurldispatcher.h" #include "llviewerobjectlist.h" #include "llviewerparceloverlay.h" #include "llvlmanager.h" @@ -82,6 +84,45 @@ extern BOOL gNoRender; const F32 WATER_TEXTURE_SCALE = 8.f; // Number of times to repeat the water texture across a region const S16 MAX_MAP_DIST = 10; +// support for secondlife:///app/region/{REGION} SLapps +// N.B. this is defined to work exactly like the classic secondlife://{REGION} +// However, the later syntax cannot support spaces in the region name because +// spaces (and %20 chars) are illegal in the hostname of an http URL. Some +// browsers let you get away with this, but some do not (such as Qt's Webkit). +// Hence we introduced the newer secondlife:///app/region alternative. +class LLRegionHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLRegionHandler() : LLCommandHandler("region", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + // make sure that we at least have a region name + int num_params = params.size(); + if (num_params < 1) + { + return false; + } + + // build a secondlife://{PLACE} SLurl from this SLapp + std::string url = "secondlife://"; + for (int i = 0; i < num_params; i++) + { + if (i > 0) + { + url += "/"; + } + url += params[i].asString(); + } + + // Process the SLapp as if it was a secondlife://{PLACE} SLurl + LLURLDispatcher::dispatch(url, web, true); + return true; + } +}; +LLRegionHandler gRegionHandler; + class BaseCapabilitiesComplete : public LLHTTPClient::Responder { LOG_CLASS(BaseCapabilitiesComplete); -- cgit v1.2.3 From 765b9a0a8eace57564fe2725d0377963b4c82bda Mon Sep 17 00:00:00 2001 From: Paul Guslisty <pguslisty@productengine.com> Date: Thu, 25 Feb 2010 15:06:04 +0200 Subject: Fixed major EXT - 5670 (Resident name tabs are blocked in the Conversation window) - Removed the profile pictures in the tabs and swiched to the use of simple LLButton instead of LLCustomButtonIconCtrl --HG-- branch : product-engine --- indra/newview/llimfloatercontainer.cpp | 25 ++-------------------- .../skins/default/xui/en/floater_im_container.xml | 4 +--- 2 files changed, 3 insertions(+), 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index db7998fe6e..d518318b0e 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -96,29 +96,8 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, LLUUID session_id = floaterp->getKey(); - LLIconCtrl* icon = 0; - - if(gAgent.isInGroup(session_id, TRUE)) - { - LLGroupIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLGroupIconCtrl>(); - icon_params.group_id = session_id; - icon = LLUICtrlFactory::instance().createWidget<LLGroupIconCtrl>(icon_params); - - mSessions[session_id] = floaterp; - floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - } - else - { - LLUUID avatar_id = LLIMModel::getInstance()->getOtherParticipantID(session_id); - - LLAvatarIconCtrl::Params icon_params = LLUICtrlFactory::instance().getDefaultParams<LLAvatarIconCtrl>(); - icon_params.avatar_id = avatar_id; - icon = LLUICtrlFactory::instance().createWidget<LLAvatarIconCtrl>(icon_params); - - mSessions[session_id] = floaterp; - floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); - } - mTabContainer->setTabImage(floaterp, icon); + floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); + mSessions[session_id] = floaterp; } void LLIMFloaterContainer::onCloseFloater(LLUUID& id) diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 65a05f3ec5..0f098bbb52 100644 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -22,9 +22,7 @@ tab_width="64" tab_max_width = "134" tab_height="16" - use_custom_icon_ctrl="true" - tab_icon_ctrl_pad="2" - halign="left" + halign="center" use_ellipses="true" top="0" width="390" /> -- cgit v1.2.3 From f864d74a477d4fbeeef1c6e88f0ba499d6acb1ae Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Thu, 25 Feb 2010 16:14:26 +0200 Subject: fixed EXT-5742 IM history: font color isn't applied for 'user not online/offline' system notifications --HG-- branch : product-engine --- indra/newview/llviewerchat.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 8de87eb602..320456e1e2 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -37,6 +37,7 @@ #include "llagent.h" // gAgent #include "lluicolortable.h" #include "llviewercontrol.h" // gSavedSettings +#include "llinstantmessage.h" //SYSTEM_FROM // LLViewerChat @@ -55,7 +56,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) r_color = LLUIColorTable::instance().getColor("SystemChatColor"); break; case CHAT_SOURCE_AGENT: - if (chat.mFromID.isNull()) + if (chat.mFromID.isNull() || SYSTEM_FROM == chat.mFromName) { r_color = LLUIColorTable::instance().getColor("SystemChatColor"); } -- cgit v1.2.3 From bf25f3fd00c836a1ac3e6d160aa3d97634da084f Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 25 Feb 2010 16:37:31 +0200 Subject: Work on normal bug EXT-4518 (movement & camera floaters should have window titles) -- done for Move floater. -- deprecated comments cleaned up --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 27 +++++++++++++++++++--- indra/newview/llmoveview.h | 2 +- .../skins/default/xui/en/floater_moveview.xml | 12 ++++++++++ 3 files changed, 37 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 97e2b5b86e..ac4b98734b 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -87,6 +87,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) BOOL LLFloaterMove::postBuild() { setIsChrome(TRUE); + setTitleVisible(TRUE); // restore title visibility after chrome applying LLDockableFloater::postBuild(); @@ -353,6 +354,7 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) showFlyControls(MM_FLY == newMode); setModeTooltip(newMode); setModeButtonToggleState(newMode); + setModeTitle(newMode); } void LLFloaterMove::showFlyControls(bool bShow) @@ -420,11 +422,30 @@ void LLFloaterMove::setModeTooltip(const EMovementMode mode) } } +void LLFloaterMove::setModeTitle(const EMovementMode mode) +{ + std::string title; + switch(mode) + { + case MM_WALK: + title = getString("walk_title"); + break; + case MM_RUN: + title = getString("run_title"); + break; + case MM_FLY: + title = getString("fly_title"); + break; + default: + // title should be provided for all modes + llassert(false); + break; + } + setTitle(title); +} + /** * Updates position of the floater to be center aligned with Move button. - * - * Because Tip floater created as dependent floater this method - * must be called before "showQuickTips()" to get Tip floater be positioned at the right side of the floater */ void LLFloaterMove::updatePosition() { diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 06463f02af..1bd36e4d74 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -92,7 +92,7 @@ private: void showFlyControls(bool bShow); void initModeTooltips(); void setModeTooltip(const EMovementMode mode); - void showQuickTips(const EMovementMode mode); + void setModeTitle(const EMovementMode mode); void initModeButtonMap(); void setModeButtonToggleState(const EMovementMode mode); void updateButtonsWithMovementMode(const EMovementMode newMode); diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 0a5820ce73..520741186e 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -38,6 +38,18 @@ name="fly_back_tooltip"> Fly Backwards (press Down Arrow or S) </string> + <string + name="walk_title"> + Walk + </string> + <string + name="run_title"> + Run + </string> + <string + name="fly_title"> + Fly + </string> <panel border="false" height="83" -- cgit v1.2.3 From 55f1a96dbf59b0bf1d0d87f358392f31b24741bf Mon Sep 17 00:00:00 2001 From: Igor Borovkov <iborovkov@productengine.com> Date: Thu, 25 Feb 2010 17:40:40 +0200 Subject: fixed EXT-5731 Viewer 2: New chat format doesn't recognise scripted object name changes --HG-- branch : product-engine --- indra/newview/llchatitemscontainerctrl.cpp | 1 + indra/newview/llchatitemscontainerctrl.h | 3 +++ indra/newview/llnearbychathandler.cpp | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index e164aa8fc4..81edb55f93 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -144,6 +144,7 @@ void LLNearbyChatToastPanel::init(LLSD& notification) std::string messageText = notification["message"].asString(); // UTF-8 line of text std::string fromName = notification["from"].asString(); // agent or object name mFromID = notification["from_id"].asUUID(); // agent id or object id + mFromName = fromName; int sType = notification["source"].asInteger(); mSourceType = (EChatSourceType)sType; diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index 4d730573d9..b28c9dbc4b 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -60,6 +60,7 @@ public: static LLNearbyChatToastPanel* createInstance(); const LLUUID& getFromID() const { return mFromID;} + const std::string& getFromName() const { return mFromName; } //void addText (const std::string& message , const LLStyle::Params& input_params = LLStyle::Params()); //void setMessage (const LLChat& msg); @@ -84,9 +85,11 @@ public: virtual void draw(); + //*TODO REMOVE, why a dup of getFromID? const LLUUID& messageID() const { return mFromID;} private: LLUUID mFromID; // agent id or object id + std::string mFromName; EChatSourceType mSourceType; diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index a211adc79d..08ae93c3a6 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -176,10 +176,11 @@ void LLNearbyChatScreenChannel::addNotification(LLSD& notification) if(m_active_toasts.size()) { LLUUID fromID = notification["from_id"].asUUID(); // agent id or object id + std::string from = notification["from"].asString(); LLToast* toast = m_active_toasts[0]; LLNearbyChatToastPanel* panel = dynamic_cast<LLNearbyChatToastPanel*>(toast->getPanel()); - if(panel && panel->messageID() == fromID && panel->canAddText()) + if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText()) { panel->addMessage(notification); toast->reshapeToPanel(); -- cgit v1.2.3 From f7916bb6ca7aa6513981c9ebbd2e2491145f8f0c Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 25 Feb 2010 17:43:51 +0200 Subject: Work on normal bug EXT-4518 (movement & camera floaters should have window titles) -- done for Camera floater. -- also updated tooltip for Presets button --HG-- branch : product-engine --- indra/newview/llfloatercamera.cpp | 28 ++++++++++++++++++++++ indra/newview/llfloatercamera.h | 3 +++ .../skins/default/xui/en/floater_camera.xml | 18 +++++++++++++- 3 files changed, 48 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index abf60a29b4..d0188352c7 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -241,6 +241,7 @@ LLFloaterCamera::LLFloaterCamera(const LLSD& val) BOOL LLFloaterCamera::postBuild() { setIsChrome(TRUE); + setTitleVisible(TRUE); // restore title visibility after chrome applying mRotate = getChild<LLJoystickCameraRotate>(ORBIT); mZoom = getChild<LLPanelCameraZoom>(ZOOM); @@ -295,6 +296,31 @@ void LLFloaterCamera::setMode(ECameraControlMode mode) updateState(); } +void LLFloaterCamera::setModeTitle(const ECameraControlMode mode) +{ + std::string title; + switch(mode) + { + case CAMERA_CTRL_MODE_ORBIT: + title = getString("orbit_mode_title"); + break; + case CAMERA_CTRL_MODE_PAN: + title = getString("pan_mode_title"); + break; + case CAMERA_CTRL_MODE_AVATAR_VIEW: + title = getString("avatar_view_mode_title"); + break; + case CAMERA_CTRL_MODE_FREE_CAMERA: + title = getString("free_mode_title"); + break; + default: + // title should be provided for all modes + llassert(false); + break; + } + setTitle(title); +} + void LLFloaterCamera::switchMode(ECameraControlMode mode) { setMode(mode); @@ -355,6 +381,8 @@ void LLFloaterCamera::updateState() childSetVisible(PRESETS, CAMERA_CTRL_MODE_AVATAR_VIEW == mCurrMode); updateCameraPresetButtons(); + setModeTitle(mCurrMode); + //hiding or showing the panel with controls by reshaping the floater bool showControls = CAMERA_CTRL_MODE_FREE_CAMERA != mCurrMode; diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h index f908ad08be..b268839165 100644 --- a/indra/newview/llfloatercamera.h +++ b/indra/newview/llfloatercamera.h @@ -100,6 +100,9 @@ private: /* sets a new mode preserving previous one and updates ui*/ void setMode(ECameraControlMode mode); + /** set title appropriate to passed mode */ + void setModeTitle(const ECameraControlMode mode); + /* updates the state (UI) according to the current mode */ void updateState(); diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index f69c763f78..b45e39a111 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -27,6 +27,22 @@ name="move_tooltip"> Move Camera Up and Down, Left and Right </floater.string> + <floater.string + name="orbit_mode_title"> + Orbit + </floater.string> + <floater.string + name="pan_mode_title"> + Pan + </floater.string> + <floater.string + name="avatar_view_mode_title"> + Presets + </floater.string> + <floater.string + name="free_mode_title"> + View Object + </floater.string> <panel border="false" height="110" @@ -232,7 +248,7 @@ image_selected="PushButton_Selected_Press" name="avatarview_btn" tab_stop="false" - tool_tip="See as avatar" + tool_tip="Presets" width="25"> </button> <button -- cgit v1.2.3 From 4d978eaf0a5f09e4758956cf41f4dcf2bafb9b42 Mon Sep 17 00:00:00 2001 From: Mike Antipov <mantipov@productengine.com> Date: Thu, 25 Feb 2010 17:53:45 +0200 Subject: No ticket. Code cleanup: remove deprecated StopFlying button from the Move Floater. It uses separate button from Stand/Stop Flying panel --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 16 ---------------- indra/newview/llmoveview.h | 2 -- indra/newview/skins/default/xui/en/floater_moveview.xml | 11 ----------- 3 files changed, 29 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index ac4b98734b..1853b511be 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -77,7 +77,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) mTurnRightButton(NULL), mMoveUpButton(NULL), mMoveDownButton(NULL), - mStopFlyingButton(NULL), mModeActionsPanel(NULL), mCurrentMode(MM_WALK) { @@ -113,8 +112,6 @@ BOOL LLFloaterMove::postBuild() mMoveDownButton->setHeldDownCallback(boost::bind(&LLFloaterMove::moveDown, this)); - mStopFlyingButton = getChild<LLButton>("stop_fly_btn"); - mModeActionsPanel = getChild<LLPanel>("panel_modes"); LLButton* btn; @@ -127,11 +124,6 @@ BOOL LLFloaterMove::postBuild() btn = getChild<LLButton>("mode_fly_btn"); btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this)); - btn = getChild<LLButton>("stop_fly_btn"); - btn->setCommitCallback(boost::bind(&LLFloaterMove::onStopFlyingButtonClick, this)); - - - showFlyControls(false); initModeTooltips(); @@ -305,10 +297,6 @@ void LLFloaterMove::onFlyButtonClick() { setMovementMode(MM_FLY); } -void LLFloaterMove::onStopFlyingButtonClick() -{ - setMovementMode(gAgent.getAlwaysRun() ? MM_RUN : MM_WALK); -} void LLFloaterMove::setMovementMode(const EMovementMode mode) { @@ -361,10 +349,6 @@ void LLFloaterMove::showFlyControls(bool bShow) { mMoveUpButton->setVisible(bShow); mMoveDownButton->setVisible(bShow); - - // *TODO: mantipov: mStopFlyingButton from the FloaterMove is not used now. - // It was not completly removed until functionality is reviewed by LL - mStopFlyingButton->setVisible(FALSE); } void LLFloaterMove::initModeTooltips() diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h index 1bd36e4d74..dcca8308d9 100644 --- a/indra/newview/llmoveview.h +++ b/indra/newview/llmoveview.h @@ -86,7 +86,6 @@ private: void onWalkButtonClick(); void onRunButtonClick(); void onFlyButtonClick(); - void onStopFlyingButtonClick(); void initMovementMode(); void setMovementMode(const EMovementMode mode); void showFlyControls(bool bShow); @@ -108,7 +107,6 @@ public: LLButton* mMoveUpButton; LLButton* mMoveDownButton; private: - LLButton* mStopFlyingButton; LLPanel* mModeActionsPanel; typedef std::map<LLView*, std::string> control_tooltip_map_t; diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml index 520741186e..8e2c57764b 100644 --- a/indra/newview/skins/default/xui/en/floater_moveview.xml +++ b/indra/newview/skins/default/xui/en/floater_moveview.xml @@ -191,16 +191,5 @@ tool_tip="Flying mode" top="2" width="31" /> - <button - visible="false" - follows="left|bottom" - height="20" - label="Stop Flying" - layout="topleft" - left="0" - name="stop_fly_btn" - tool_tip="Stop flying" - top="2" - width="115" /> </panel> </floater> -- cgit v1.2.3 From 087ea1cef62d383821e8e340551e757cb604b553 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Thu, 25 Feb 2010 18:47:28 +0200 Subject: Fixed normal bug (EXT-5748) Useless area on Place Profile panel. - Reduced unused size in Place Profile and Landmark Info panels. --HG-- branch : product-engine --- indra/newview/llpanelplaceinfo.cpp | 2 +- indra/newview/skins/default/xui/en/panel_landmark_info.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_place_profile.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 9ebc8ca2b9..f6133d4446 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -256,7 +256,7 @@ void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) static LLUICachedControl<S32> scrollbar_size ("UIScrollbarSize", 0); S32 scroll_height = mScrollContainer->getRect().getHeight(); - if (mScrollingPanelMinHeight >= scroll_height) + if (mScrollingPanelMinHeight > scroll_height) { mScrollingPanel->reshape(mScrollingPanelWidth, mScrollingPanelMinHeight); } 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 66070c028d..befeb182f9 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -89,13 +89,13 @@ <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="700" + height="630" layout="topleft" left="0" min_height="300" name="scrolling_panel" top="0" - width="285"> + width="310"> <texture_picker enabled="false" follows="left|top|right" 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 b22dad5841..7672bd0799 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -174,13 +174,13 @@ <panel bg_alpha_color="DkGray2" follows="left|top|right" - height="700" + height="532" layout="topleft" left="0" min_height="300" name="scrolling_panel" top="0" - width="285"> + width="310"> <texture_picker enabled="false" follows="left|top|right" -- cgit v1.2.3 From e235e71b907d7fa4d6bd15852e0a3eae3cbd07c5 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Thu, 25 Feb 2010 19:15:59 +0200 Subject: Bug Low EXT-5194 SLURL field dropdown should display empty menu rather than do nothing when empty Solution: Button of dropdown list will be disabled if there are no items in location history --HG-- branch : product-engine --- indra/newview/lllocationhistory.cpp | 8 +++++--- indra/newview/lllocationhistory.h | 17 ++++++++++++----- indra/newview/lllocationinputctrl.cpp | 18 +++++++++++------- indra/newview/lllocationinputctrl.h | 5 +++-- indra/newview/llnavigationbar.cpp | 6 ++++++ 5 files changed, 37 insertions(+), 17 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index df93930d33..7906d9b20f 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -63,6 +63,7 @@ void LLLocationHistory::addItem(const LLLocationHistoryItem& item) { mItems.erase(mItems.begin(), mItems.end()-max_items); } llassert((S32)mItems.size() <= max_items); + mChangedSignal(ADD); } /* @@ -87,9 +88,10 @@ bool LLLocationHistory::touchItem(const LLLocationHistoryItem& item) { void LLLocationHistory::removeItems() { mItems.clear(); + mChangedSignal(CLEAR); } -bool LLLocationHistory::getMatchingItems(std::string substring, location_list_t& result) const +bool LLLocationHistory::getMatchingItems(const std::string& substring, location_list_t& result) const { // *TODO: an STL algorithm would look nicer result.clear(); @@ -160,7 +162,7 @@ void LLLocationHistory::load() return; } - removeItems(); + mItems.clear();// need to use a direct call of clear() method to avoid signal invocation // add each line in the file to the list std::string line; @@ -179,5 +181,5 @@ void LLLocationHistory::load() file.close(); - mLoadedSignal(); + mChangedSignal(LOAD); } diff --git a/indra/newview/lllocationhistory.h b/indra/newview/lllocationhistory.h index 65f0dd2e1b..fb71fbaa0f 100644 --- a/indra/newview/lllocationhistory.h +++ b/indra/newview/lllocationhistory.h @@ -111,9 +111,16 @@ class LLLocationHistory: public LLSingleton<LLLocationHistory> LOG_CLASS(LLLocationHistory); public: + enum EChangeType + { + ADD + ,CLEAR + ,LOAD + }; + typedef std::vector<LLLocationHistoryItem> location_list_t; - typedef boost::function<void()> loaded_callback_t; - typedef boost::signals2::signal<void()> loaded_signal_t; + typedef boost::function<void(EChangeType event)> history_changed_callback_t; + typedef boost::signals2::signal<void(EChangeType event)> history_changed_signal_t; LLLocationHistory(); @@ -122,8 +129,8 @@ public: void removeItems(); size_t getItemCount() const { return mItems.size(); } const location_list_t& getItems() const { return mItems; } - bool getMatchingItems(std::string substring, location_list_t& result) const; - boost::signals2::connection setLoadedCallback(loaded_callback_t cb) { return mLoadedSignal.connect(cb); } + bool getMatchingItems(const std::string& substring, location_list_t& result) const; + boost::signals2::connection setChangedCallback(history_changed_callback_t cb) { return mChangedSignal.connect(cb); } void save() const; void load(); @@ -133,7 +140,7 @@ private: location_list_t mItems; std::string mFilename; /// File to store the history to. - loaded_signal_t mLoadedSignal; + history_changed_signal_t mChangedSignal; }; #endif diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 5f233bece0..0ea4b1f6da 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -52,7 +52,6 @@ #include "llinventoryobserver.h" #include "lllandmarkactions.h" #include "lllandmarklist.h" -#include "lllocationhistory.h" #include "llteleporthistory.h" #include "llsidetray.h" #include "llslurl.h" @@ -377,9 +376,10 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) // - Update the location string on parcel change. mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback( boost::bind(&LLLocationInputCtrl::onAgentParcelChange, this)); - - mLocationHistoryConnection = LLLocationHistory::getInstance()->setLoadedCallback( - boost::bind(&LLLocationInputCtrl::onLocationHistoryLoaded, this)); + // LLLocationHistory instance is being created before the location input control, so we have to update initial state of button manually. + mButton->setEnabled(LLLocationHistory::instance().getItemCount() > 0); + mLocationHistoryConnection = LLLocationHistory::getInstance()->setChangedCallback( + boost::bind(&LLLocationInputCtrl::onLocationHistoryChanged, this,_1)); mRemoveLandmarkObserver = new LLRemoveLandmarkObserver(this); mAddLandmarkObserver = new LLAddLandmarkObserver(this); @@ -620,9 +620,13 @@ void LLLocationInputCtrl::onLandmarkLoaded(LLLandmark* lm) updateAddLandmarkButton(); } -void LLLocationInputCtrl::onLocationHistoryLoaded() +void LLLocationInputCtrl::onLocationHistoryChanged(LLLocationHistory::EChangeType event) { - rebuildLocationHistory(); + if(event == LLLocationHistory::LOAD) + { + rebuildLocationHistory(); + } + mButton->setEnabled(LLLocationHistory::instance().getItemCount() > 0); } void LLLocationInputCtrl::onLocationPrearrange(const LLSD& data) @@ -893,7 +897,7 @@ void LLLocationInputCtrl::positionMaturityIcon() mMaturityIcon->setVisible(rect.mRight < mTextEntry->getRect().getWidth() - right_pad); } -void LLLocationInputCtrl::rebuildLocationHistory(std::string filter) +void LLLocationInputCtrl::rebuildLocationHistory(const std::string& filter) { LLLocationHistory::location_list_t filtered_items; const LLLocationHistory::location_list_t* itemsp = NULL; diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index 4bb41f3bf4..dac6be2a24 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -36,6 +36,7 @@ #include "llcombobox.h" #include "lliconctrl.h" // Params #include "lltextbox.h" // Params +#include "lllocationhistory.h" class LLLandmark; @@ -137,7 +138,7 @@ private: void refreshHealth(); void positionMaturityIcon(); - void rebuildLocationHistory(std::string filter = ""); + void rebuildLocationHistory(const std::string& filter = LLStringUtil::null); bool findTeleportItemsByTitle(const LLTeleportHistoryItem& item, const std::string& filter); void setText(const LLStringExplicit& text); void updateAddLandmarkButton(); @@ -147,7 +148,7 @@ private: void changeLocationPresentation(); void onInfoButtonClicked(); - void onLocationHistoryLoaded(); + void onLocationHistoryChanged(LLLocationHistory::EChangeType event); void onLocationPrearrange(const LLSD& data); void onTextEditorRightClicked(S32 x, S32 y, MASK mask); void onLandmarkLoaded(LLLandmark* lm); diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index d42e4bc250..e11df06d86 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -451,6 +451,12 @@ void LLNavigationBar::onLocationSelection() return; //get selected item from combobox item LLSD value = mCmbLocation->getSelectedValue(); + if(value.isUndefined() && !mCmbLocation->getTextEntry()->isDirty()) + { + // At this point we know that: there is no selected item in list and text field has NOT been changed + // So there is no sense to try to change the location + return; + } /* since navbar list support autocompletion it contains several types of item: landmark, teleport hystory item, * typed by user slurl or region name. Let's find out which type of item the user has selected * to make decision about adding this location into typed history. see mSaveToLocationHistory -- cgit v1.2.3 From a325df08987636b00a5e81f08ee1d2a532636d72 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 25 Feb 2010 19:39:16 +0200 Subject: Fixed bug EXT-5580 (Characters in Inventory Filter appear behind X). Added configurable text right padding support to search_filter: * When the Clear button is enabled (i.e. search_editor.clear_button_visible set to "true") the search_editor.clear_button.pad_left parameter determines the padding. * Otherwise search_editor.text_pad_right is used. --HG-- branch : product-engine --- indra/llui/llsearcheditor.cpp | 15 +++++++++++---- .../skins/default/xui/en/widgets/search_editor.xml | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index 8075575bab..ec2ad5e5fa 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -44,17 +44,28 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) S32 srch_btn_top = p.search_button.top_pad + p.search_button.rect.height; S32 srch_btn_right = p.search_button.rect.width + p.search_button.left_pad; LLRect srch_btn_rect(p.search_button.left_pad, srch_btn_top, srch_btn_right, p.search_button.top_pad); + + S32 clr_btn_top = p.clear_button.rect.bottom + p.clear_button.rect.height; + S32 clr_btn_right = getRect().getWidth() - p.clear_button.pad_right; + S32 clr_btn_left = clr_btn_right - p.clear_button.rect.width; + LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom); + S32 text_pad_left = p.text_pad_left; + S32 text_pad_right = p.text_pad_right; if (p.search_button_visible) text_pad_left += srch_btn_rect.getWidth(); + if (p.clear_button_visible) + text_pad_right = getRect().getWidth() - clr_btn_left + p.clear_button.pad_left; + // Set up line editor. LLLineEditor::Params line_editor_params(p); line_editor_params.name("filter edit box"); line_editor_params.rect(getLocalRect()); line_editor_params.follows.flags(FOLLOWS_ALL); line_editor_params.text_pad_left(text_pad_left); + line_editor_params.text_pad_right(text_pad_right); line_editor_params.revert_on_esc(false); line_editor_params.commit_callback.function(boost::bind(&LLUICtrl::onCommit, this)); line_editor_params.keystroke_callback(boost::bind(&LLSearchEditor::handleKeystroke, this)); @@ -82,10 +93,6 @@ LLSearchEditor::LLSearchEditor(const LLSearchEditor::Params& p) // Set up clear button. LLButton::Params clr_btn_params(p.clear_button); clr_btn_params.name(std::string("clear button")); - S32 clr_btn_top = clr_btn_params.rect.bottom + clr_btn_params.rect.height; - S32 clr_btn_right = getRect().getWidth() - clr_btn_params.pad_right; - S32 clr_btn_left = clr_btn_right - clr_btn_params.rect.width; - LLRect clear_btn_rect(clr_btn_left, clr_btn_top, clr_btn_right, p.clear_button.rect.bottom); clr_btn_params.rect(clear_btn_rect) ; clr_btn_params.follows.flags(FOLLOWS_RIGHT|FOLLOWS_TOP); clr_btn_params.tab_stop(false); diff --git a/indra/newview/skins/default/xui/en/widgets/search_editor.xml b/indra/newview/skins/default/xui/en/widgets/search_editor.xml index a9a760b3a4..32e443a058 100644 --- a/indra/newview/skins/default/xui/en/widgets/search_editor.xml +++ b/indra/newview/skins/default/xui/en/widgets/search_editor.xml @@ -3,6 +3,7 @@ clear_button_visible="false" search_button_visible="true" text_pad_left="6" + text_pad_right="6" select_on_focus="true" text_tentative_color="TextFgTentativeColor" background_image="TextField_Search_Off" @@ -21,5 +22,6 @@ image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" pad_right="4" + pad_left="4" width="16" /> </search_editor> -- cgit v1.2.3 From fa3dbae2cceffa8cdf8038d56eba3fac1bb67838 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Thu, 25 Feb 2010 20:07:47 +0200 Subject: fixed Normal Bug EXT-5675 Empty friends list mentions \"click\" where it should specify \"right-click\" --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index daab52f06a..2a475142d4 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -222,7 +222,7 @@ top="10" width="293" wrap="true"> - To add friends try [secondlife:///app/search/people global search] or click on a user to add them as a friend. + To add friends try [secondlife:///app/search/people global search] or use right click on a user in world to add them as a friend. If you're looking for people to hang out with, [secondlife:///app/worldmap try the Map]. </text> </panel> -- cgit v1.2.3 From 3a9923bb87b8308257a428744ea1123977155767 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 25 Feb 2010 20:52:26 +0200 Subject: Fixed bug EXT-5578 (My Inventory Filter entries are ALL CAP). --HG-- branch : product-engine --- indra/newview/llpanelmaininventory.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 2d3401966b..bca18ae345 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -420,10 +420,8 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) gInventory.startBackgroundFetch(); - std::string uppercase_search_string = search_string; - LLStringUtil::toUpper(uppercase_search_string); - mFilterSubString = uppercase_search_string; - if (mActivePanel->getFilterSubString().empty() && uppercase_search_string.empty()) + mFilterSubString = search_string; + if (mActivePanel->getFilterSubString().empty() && mFilterSubString.empty()) { // current filter and new filter empty, do nothing return; -- cgit v1.2.3 From 94bbaa43cc7bfc82ce1cb366deaabc868b8537c5 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk <vsavchuk@productengine.com> Date: Thu, 25 Feb 2010 20:53:11 +0200 Subject: Less code duplication. --HG-- branch : product-engine --- indra/newview/llpanelmaininventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index bca18ae345..50cfc7d177 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -435,7 +435,7 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string ) } // set new filter string - mActivePanel->setFilterSubString(mFilterSubString); + setFilterSubString(mFilterSubString); } -- cgit v1.2.3 From 272c42d7cfc88026d5326943845fd3a2cef68e25 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov <adyukov@productengine.com> Date: Thu, 25 Feb 2010 22:05:55 +0200 Subject: Fixed normal bug EXT-4313 (Should not be able to start a call when voice is disabled). - Added constant holding maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in LLVoiceClient::stateMachine() which is treated as normal. They are counted using member added to LLVoiceClient. If this number is exceeded we suspect there is a problem with connection to voice server. Check of current number against maximum was added to LLVoiceClient::voiceWorking(). --HG-- branch : product-engine --- indra/newview/llvoiceclient.cpp | 33 ++++++++++++++++++++++++++++++++- indra/newview/llvoiceclient.h | 4 ++++ 2 files changed, 36 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 59606f17b2..5ba13efca2 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -102,6 +102,13 @@ const F32 UPDATE_THROTTLE_SECONDS = 0.1f; const F32 LOGIN_RETRY_SECONDS = 10.0f; const int MAX_LOGIN_RETRIES = 12; +// Defines the maximum number of times(in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine() +// which is treated as normal. If this number is exceeded we suspect there is a problem with connection +// to voice server (EXT-4313). When voice works correctly, there is from 1 to 15 times. 50 was chosen +// to make sure we don't make mistake when slight connection problems happen- situation when connection to server is +// blocked is VERY rare and it's better to sacrifice response time in this situation for the sake of stability. +const int MAX_NORMAL_JOINING_SPATIAL_NUM = 50; + static void setUUIDFromStringHash(LLUUID &uuid, const std::string &str) { LLMD5 md5_uuid; @@ -1221,6 +1228,7 @@ LLVoiceClient::LLVoiceClient() : mRelogRequested(false), mConnected(false), mPump(NULL), + mSpatialJoiningNum(0), mTuningMode(false), mTuningEnergy(0.0f), @@ -2223,6 +2231,8 @@ void LLVoiceClient::stateMachine() //MARK: stateNoChannel case stateNoChannel: + + mSpatialJoiningNum = 0; // Do this here as well as inside sendPositionalUpdate(). // Otherwise, if you log in but don't join a proximal channel (such as when your login location has voice disabled), your friends list won't sync. sendFriendsListUpdates(); @@ -2279,6 +2289,23 @@ void LLVoiceClient::stateMachine() //MARK: stateJoiningSession case stateJoiningSession: // waiting for session handle + + // If this is true we have problem with connection to voice server (EXT-4313). + // See descriptions of mSpatialJoiningNum and MAX_NORMAL_JOINING_SPATIAL_NUM. + if(mSpatialJoiningNum == MAX_NORMAL_JOINING_SPATIAL_NUM) + { + // Notify observers to let them know there is problem with voice + notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED); + llwarns << "There seems to be problem with connection to voice server. Disabling voice chat abilities." << llendl; + } + + // Increase mSpatialJoiningNum only for spatial sessions- it's normal to reach this case for + // example for p2p many times while waiting for response, so it can't be used to detect errors + if(mAudioSession && mAudioSession->mIsSpatial) + { + mSpatialJoiningNum++; + } + // joinedAudioSession() will transition from here to stateSessionJoined. if(!mVoiceEnabled) { @@ -2302,6 +2329,8 @@ void LLVoiceClient::stateMachine() //MARK: stateSessionJoined case stateSessionJoined: // session handle received + + mSpatialJoiningNum = 0; // It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4 // before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck. // For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined. @@ -5992,7 +6021,9 @@ bool LLVoiceClient::voiceEnabled() bool LLVoiceClient::voiceWorking() { //Added stateSessionTerminated state to avoid problems with call in parcels with disabled voice (EXT-4758) - return (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); + // Condition with joining spatial num was added to take into account possible problems with connection to voice + // server(EXT-4313). See bug descriptions and comments for MAX_NORMAL_JOINING_SPATIAL_NUM for more info. + return (mSpatialJoiningNum < MAX_NORMAL_JOINING_SPATIAL_NUM) && (stateLoggedIn <= mState) && (mState <= stateSessionTerminated); } void LLVoiceClient::setLipSyncEnabled(BOOL enabled) diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h index a96cf18e27..aaacab69e0 100644 --- a/indra/newview/llvoiceclient.h +++ b/indra/newview/llvoiceclient.h @@ -586,6 +586,10 @@ static void updatePosition(void); state mState; bool mSessionTerminateRequested; bool mRelogRequested; + // Number of times (in a row) "stateJoiningSession" case for spatial channel is reached in stateMachine(). + // The larger it is the greater is possibility there is a problem with connection to voice server. + // Introduced while fixing EXT-4313. + int mSpatialJoiningNum; void setState(state inState); state getState(void) { return mState; }; -- cgit v1.2.3 From b0885eb52ac9e3051696f28f5ebf71e6002fe38a Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 12:28:58 -0800 Subject: fix obvious typo --- indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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 ecf7252a11..a628e76bc0 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -154,7 +154,7 @@ width="380"> <button follows="bottom|left" - tool_tip="Show additional optioins" + tool_tip="Show additional options" height="18" image_disabled="OptionsMenu_Disabled" image_selected="OptionsMenu_Press" -- cgit v1.2.3 From a3e549639130eec752d99db767eb1992cc3a0661 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk <slitovchuk@productengine.com> Date: Thu, 25 Feb 2010 22:49:37 +0200 Subject: Fixed normal bug (EXT-5729) My Landmarks search doesn't auto expand folders of found terms. --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 7d527fa98a..e50753c1c5 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2163,6 +2163,15 @@ void LLFolderView::doIdle() LLSelectFirstFilteredItem filter; applyFunctorRecursively(filter); } + + // Open filtered folders for folder views with mAutoSelectOverride=TRUE. + // Used by LLPlacesFolderView. + if (mAutoSelectOverride && mFilter->getFilterSubString() != "") + { + LLOpenFilteredFolders filter; + applyFunctorRecursively(filter); + } + scrollToShowSelection(); } -- cgit v1.2.3 From 52164706054b44bd2de29bb3413856ce19706be9 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 13:00:57 -0800 Subject: fix obvious typo --- indra/newview/skins/default/xui/en/floater_voice_controls.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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 c4411db8c5..114b9a84e3 100644 --- a/indra/newview/skins/default/xui/en/floater_voice_controls.xml +++ b/indra/newview/skins/default/xui/en/floater_voice_controls.xml @@ -70,7 +70,7 @@ text_color="white" top="4" use_ellipses="true" - value="Mya Avatar:" + value="My Avatar:" width="210" /> <output_monitor auto_update="true" -- cgit v1.2.3 From e10722c3efabcb63b47705834d80579512f6bc8f Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 17:19:57 -0800 Subject: test file-level translate="false" functionality --- indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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 a628e76bc0..1816716d1a 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel name="Teleport History" bottom="0" height="400" left="0" width="380" help_topic="panel_teleport_history" - border="false" follows="left|top|right|bottom"> + border="false" follows="left|top|right|bottom" translate="false"> <accordion follows="left|top|right|bottom" height="368" -- cgit v1.2.3 From 99bd01b8aaa9901dfdedaa01a13a107d22d18716 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 17:36:40 -0800 Subject: undo. testing done. --- indra/newview/skins/default/xui/en/panel_teleport_history.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') 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 1816716d1a..a628e76bc0 100644 --- a/indra/newview/skins/default/xui/en/panel_teleport_history.xml +++ b/indra/newview/skins/default/xui/en/panel_teleport_history.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel name="Teleport History" bottom="0" height="400" left="0" width="380" help_topic="panel_teleport_history" - border="false" follows="left|top|right|bottom" translate="false"> + border="false" follows="left|top|right|bottom"> <accordion follows="left|top|right|bottom" height="368" -- cgit v1.2.3 From 70afa40d571788df5f79149c34d1c43f06210072 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 17:52:26 -0800 Subject: test translate="false" on whole file --- indra/newview/skins/default/xui/en/panel_online_status_toast.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') 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..ba7384f74c 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 @@ -7,7 +7,8 @@ left="0" name="friend_online_status" top="0" - width="305"> + width="305" + translate="false"> <avatar_icon follows="top|left" height="18" -- cgit v1.2.3 From 9f079954af9ca80498bf6953d65cc7e77e956f26 Mon Sep 17 00:00:00 2001 From: Eli Linden <eli@lindenlab.com> Date: Thu, 25 Feb 2010 17:59:01 -0800 Subject: undo change. test finished. --- indra/newview/skins/default/xui/en/panel_online_status_toast.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra') 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 ba7384f74c..14cb5fffee 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 @@ -7,8 +7,7 @@ left="0" name="friend_online_status" top="0" - width="305" - translate="false"> + width="305"> <avatar_icon follows="top|left" height="18" -- cgit v1.2.3 From 7b2b36ec7813ba7536b1d2940e993c8d86fc99f9 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji <aarabadji@productengine.com> Date: Fri, 26 Feb 2010 10:08:03 +0200 Subject: =?UTF-8?q?fixed=20major=20EXT-5746=20=E2=80=9CVoice=20notificatio?= =?UTF-8?q?ns=20appear=20undocked=20in=20the=20top=20left=20corner=20of=20?= =?UTF-8?q?viewport=E2=80=9D,=20made=20LLCallFloater=20and=20LLCallDialog?= =?UTF-8?q?=20force=20docked=20state=20when=20created;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 3 +++ indra/newview/llimview.cpp | 2 ++ 2 files changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 76e058a1c3..c8552de66a 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -115,6 +115,9 @@ LLCallFloater::LLCallFloater(const LLSD& key) mFactoryMap["non_avatar_caller"] = LLCallbackMap(create_non_avatar_caller, NULL); LLVoiceClient::getInstance()->addObserver(this); LLTransientFloaterMgr::getInstance()->addControlView(this); + + // force docked state since this floater doesn't save it between recreations + setDocked(true); } LLCallFloater::~LLCallFloater() diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index faddffe0fc..e87399abab 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1473,6 +1473,8 @@ LLCallDialog::LLCallDialog(const LLSD& payload) mLifetime(DEFAULT_LIFETIME) { setAutoFocus(FALSE); + // force docked state since this floater doesn't save it between recreations + setDocked(true); } void LLCallDialog::getAllowedRect(LLRect& rect) -- cgit v1.2.3 From 92facf86d6bf1a7acecdc6e536ac2ad7bcdfdd96 Mon Sep 17 00:00:00 2001 From: Denis Serdjuk <dserduk@productengine.com> Date: Fri, 26 Feb 2010 11:42:59 +0200 Subject: Additional commit for EXT-5675. "in world" part of message has been removed to avoid misunderstanding. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 2a475142d4..f0186a46bb 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -222,7 +222,7 @@ top="10" width="293" wrap="true"> - To add friends try [secondlife:///app/search/people global search] or use right click on a user in world to add them as a friend. + To add friends try [secondlife:///app/search/people global search] or use right click on a user to add them as a friend. If you're looking for people to hang out with, [secondlife:///app/worldmap try the Map]. </text> </panel> -- cgit v1.2.3 From de50759e367cd693997c89edcea66041e434e455 Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 26 Feb 2010 11:12:27 +0000 Subject: Follow-up to EXT-5675 - 'right-click' instead of 'right click' seems the de-facto standard in our phrasing. --- indra/newview/skins/default/xui/en/floater_ui_preview.xml | 2 +- indra/newview/skins/default/xui/en/panel_people.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') 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 e86cb23c1e..3a981adfdf 100644 --- a/indra/newview/skins/default/xui/en/floater_ui_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_ui_preview.xml @@ -112,7 +112,7 @@ layout="topleft" left_pad="15" name="toggle_overlap_panel" - tool_tip="Toggle highlighting and display panel for overlapping elements; right click an element to select it for this feature. The selected element is marked by a red rectangle." + tool_tip="Toggle highlighting and display panel for overlapping elements; right-click an element to select it for this feature. The selected element is marked by a red rectangle." top_delta="0" width="30" /> <text diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index f0186a46bb..8b33a1f054 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -222,7 +222,7 @@ top="10" width="293" wrap="true"> - To add friends try [secondlife:///app/search/people global search] or use right click on a user to add them as a friend. + To add friends try [secondlife:///app/search/people global search] or use right-click on a user to add them as a friend. If you're looking for people to hang out with, [secondlife:///app/worldmap try the Map]. </text> </panel> -- cgit v1.2.3 From f3c49d3b7c4bc47c1c3aabde1b8c9c19441abaec Mon Sep 17 00:00:00 2001 From: Tofu Linden <tofu.linden@lindenlab.com> Date: Fri, 26 Feb 2010 11:16:14 +0000 Subject: minor stylistic tweak for code in EXT-5729 --- indra/newview/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index e50753c1c5..23f19a38a6 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2166,7 +2166,7 @@ void LLFolderView::doIdle() // Open filtered folders for folder views with mAutoSelectOverride=TRUE. // Used by LLPlacesFolderView. - if (mAutoSelectOverride && mFilter->getFilterSubString() != "") + if (mAutoSelectOverride && !mFilter->getFilterSubString().empty()) { LLOpenFilteredFolders filter; applyFunctorRecursively(filter); -- cgit v1.2.3 From 31d4813a95fa731baec31ecc62da7d135e4a054f Mon Sep 17 00:00:00 2001 From: Lynx Linden <lynx@lindenlab.com> Date: Fri, 26 Feb 2010 11:29:54 +0000 Subject: EXT-5480: Send viewer version info to Search server. Added the following query parameters to the URL that is sent to the search web server. This will allow them to do version-specific content if necessary (such as using secondlife:///app/region for viewer's that support it). * channel = the viewer channel name, e.g. "Second Life Beta Viewer" * version = the full version string, e.g. "2.0.0.2001234" * major = the viewer major version number, e.g., "2" * minor = the viewer major version number, e.g., "0" * patch = the viewer major version number, e.g., "0" * build = the viewer major version number, e.g., "2001234" --- indra/newview/app_settings/settings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 4210760223..f87cdbc43e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3607,7 +3607,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>https://viewer-sidebar.secondlife.com/sidebar.html?p=[AUTH_TOKEN]&lang=[LANGUAGE]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&firstlogin=[FIRST_LOGIN]</string> + <string>https://viewer-sidebar.secondlife.com/sidebar.html?p=[AUTH_TOKEN]&lang=[LANGUAGE]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD]&firstlogin=[FIRST_LOGIN]</string> </map> <key>SearchURL</key> <map> @@ -3618,7 +3618,7 @@ <key>Type</key> <string>String</string> <key>Value</key> - <string>http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]</string> + <string>http://search.secondlife.com/viewer/[CATEGORY]?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&g=[GODLIKE]&sid=[SESSION_ID]&rid=[REGION_ID]&pid=[PARCEL_ID]&channel=[CHANNEL]&version=[VERSION]&major=[VERSION_MAJOR]&minor=[VERSION_MINOR]&patch=[VERSION_PATCH]&build=[VERSION_BUILD]</string> </map> <key>HighResSnapshot</key> <map> -- cgit v1.2.3