summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorEli Linden <eli@lindenlab.com>2010-04-14 14:49:52 -0700
committerEli Linden <eli@lindenlab.com>2010-04-14 14:49:52 -0700
commit9312f2f4744d75179e8ff392071cc1af99c0b57e (patch)
tree6c362ebf03ee68c93124272ba5632b6a05b5f3b8 /indra
parentc7fa24ea86ca2a02b4797328cbb9f2c03d8c6ee2 (diff)
parent8dd62863092b10e012db20e818e72b53fd2ed84a (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/llmessage/llcachename.cpp4
-rw-r--r--indra/llwindow/llwindowwin32.cpp6
-rw-r--r--indra/media_plugins/webkit/mac_volume_catcher.cpp100
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/app_settings/settings.xml63
-rw-r--r--indra/newview/llagentwearables.cpp21
-rw-r--r--indra/newview/llagentwearablesfetch.cpp45
-rw-r--r--indra/newview/llagentwearablesfetch.h4
-rw-r--r--indra/newview/llappearancemgr.cpp37
-rw-r--r--indra/newview/llappearancemgr.h26
-rw-r--r--indra/newview/llbottomtray.cpp19
-rw-r--r--indra/newview/llbottomtray.h2
-rw-r--r--indra/newview/llcallfloater.cpp2
-rw-r--r--indra/newview/llfloateravatartextures.cpp45
-rw-r--r--indra/newview/llfloatergesture.cpp6
-rw-r--r--indra/newview/llfloaterproperties.cpp6
-rw-r--r--indra/newview/llfriendcard.cpp17
-rw-r--r--indra/newview/llgesturemgr.cpp8
-rw-r--r--indra/newview/llgesturemgr.h2
-rw-r--r--indra/newview/llimview.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp41
-rw-r--r--indra/newview/llinventoryobserver.cpp335
-rw-r--r--indra/newview/llinventoryobserver.h152
-rw-r--r--indra/newview/llinventorypanel.cpp2
-rw-r--r--indra/newview/llpaneloutfitedit.cpp93
-rw-r--r--indra/newview/llpaneloutfitedit.h6
-rw-r--r--indra/newview/llparticipantlist.cpp12
-rw-r--r--indra/newview/llparticipantlist.h3
-rw-r--r--indra/newview/llpreview.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp4
-rw-r--r--indra/newview/llpreviewscript.cpp2
-rw-r--r--indra/newview/llsidepanelappearance.cpp14
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp6
-rw-r--r--indra/newview/llstartup.cpp3
-rw-r--r--indra/newview/lltexlayer.cpp8
-rw-r--r--indra/newview/lltooldraganddrop.cpp63
-rw-r--r--indra/newview/llviewerfloaterreg.cpp3
-rw-r--r--indra/newview/llviewerinventory.h2
-rw-r--r--indra/newview/llviewermedia.cpp5
-rw-r--r--indra/newview/llviewermenu.cpp16
-rw-r--r--indra/newview/llviewermessage.cpp52
-rw-r--r--indra/newview/llvoiceclient.cpp2
-rw-r--r--indra/newview/res/toolbuy.curbin4286 -> 0 bytes
-rw-r--r--indra/newview/res/toolopen.curbin4286 -> 0 bytes
-rw-r--r--indra/newview/res/toolsit.curbin4286 -> 0 bytes
-rw-r--r--indra/newview/res/viewerRes.rc3
-rw-r--r--indra/newview/skins/default/textures/textures.xml20
-rw-r--r--indra/newview/skins/default/xui/en/floater_avatar_textures.xml4
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_other.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_attachment_self.xml9
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_other.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_avatar_self.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml8
-rw-r--r--indra/newview/skins/default/xui/en/menu_object.xml17
-rw-r--r--indra/newview/skins/default/xui/en/menu_participant_list.xml17
-rw-r--r--indra/newview/skins/default/xui/en/panel_outfit_edit.xml2
57 files changed, 684 insertions, 653 deletions
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 9363b3a8d5..9871c922f1 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -486,7 +486,7 @@ BOOL LLCacheName::getName(const LLUUID& id, std::string& first, std::string& las
{
first = sCacheName["nobody"];
last.clear();
- return FALSE;
+ return TRUE;
}
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache, id );
@@ -530,7 +530,7 @@ BOOL LLCacheName::getGroupName(const LLUUID& id, std::string& group)
if(id.isNull())
{
group = sCacheName["none"];
- return FALSE;
+ return TRUE;
}
LLCacheNameEntry* entry = get_ptr_in_map(impl.mCache,id);
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 95c1980dd6..5ee56a2a99 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -1548,9 +1548,9 @@ void LLWindowWin32::initCursors()
// Color cursors
gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "res", "toolbuy.cur");
- mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolsit.cur").c_str());
- mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolbuy.cur").c_str());
- mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->getWorkingDir() + gDirUtilp->getDirDelimiter() + "res" + gDirUtilp->getDirDelimiter() + "toolopen.cur").c_str());
+ mCursor[UI_CURSOR_TOOLSIT] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolsit.cur")).c_str());
+ mCursor[UI_CURSOR_TOOLBUY] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolbuy.cur")).c_str());
+ mCursor[UI_CURSOR_TOOLOPEN] = LoadCursorFromFile(utf8str_to_utf16str(gDirUtilp->findSkinnedFilename("textures", "toolopen.cur")).c_str());
mCursor[UI_CURSOR_TOOLPLAY] = loadColorCursor(TEXT("TOOLPLAY"));
mCursor[UI_CURSOR_TOOLPAUSE] = loadColorCursor(TEXT("TOOLPAUSE"));
mCursor[UI_CURSOR_TOOLMEDIAOPEN] = loadColorCursor(TEXT("TOOLMEDIAOPEN"));
diff --git a/indra/media_plugins/webkit/mac_volume_catcher.cpp b/indra/media_plugins/webkit/mac_volume_catcher.cpp
index 03249f9e83..9788f10a58 100644
--- a/indra/media_plugins/webkit/mac_volume_catcher.cpp
+++ b/indra/media_plugins/webkit/mac_volume_catcher.cpp
@@ -52,9 +52,8 @@ public:
void setVolume(F32 volume);
void setPan(F32 pan);
- void pump(void);
- void setDelegateVolume(ComponentInstance delegate);
+ void setInstanceVolume(VolumeCatcherStorage *instance);
std::list<VolumeCatcherStorage*> mComponentInstances;
Component mOriginalDefaultOutput;
@@ -62,12 +61,14 @@ public:
static VolumeCatcherImpl *getInstance();
private:
+ // This is a singleton class -- both callers and the component implementation should use getInstance() to find the instance.
VolumeCatcherImpl();
- ~VolumeCatcherImpl();
-
- // The component entry point needs to be able to find the instance.
static VolumeCatcherImpl *sInstance;
+ // The singlar instance of this class is expected to last until the process exits.
+ // To ensure this, we declare the destructor here but never define it, so any code which attempts to destroy the instance will not link.
+ ~VolumeCatcherImpl();
+
F32 mVolume;
F32 mPan;
};
@@ -88,8 +89,7 @@ VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
{
if(!sInstance)
{
- // The constructor will set up the instance pointer.
- new VolumeCatcherImpl;
+ sInstance = new VolumeCatcherImpl;
}
return sInstance;
@@ -97,14 +97,9 @@ VolumeCatcherImpl *VolumeCatcherImpl::getInstance()
VolumeCatcherImpl::VolumeCatcherImpl()
{
- sInstance = this;
-
mVolume = 1.0; // default to full volume
mPan = 0.5; // and center pan
-
- // Register a component which can delegate
-
- // Capture the default audio output component.
+
ComponentDescription desc;
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_DefaultOutput;
@@ -153,23 +148,33 @@ static ComponentResult volume_catcher_component_entry(ComponentParameters *cp, H
static ComponentResult volume_catcher_component_open(VolumeCatcherStorage *storage, ComponentInstance self)
{
ComponentResult result = noErr;
+ VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();
storage = new VolumeCatcherStorage;
- SetComponentInstanceStorage(self, (Handle)storage);
-
- VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();
-
- impl->mComponentInstances.push_back(storage);
-
storage->self = self;
storage->delegate = NULL;
result = OpenAComponent(impl->mOriginalDefaultOutput, &(storage->delegate));
-// std::cerr << "OpenAComponent result = " << result << ", component ref = " << storage->delegate << std::endl;
+ if(result != noErr)
+ {
+// std::cerr << "OpenAComponent result = " << result << ", component ref = " << storage->delegate << std::endl;
+
+ // If we failed to open the delagate component, our open is going to fail. Clean things up.
+ delete storage;
+ }
+ else
+ {
+ // Success -- set up this component's storage
+ SetComponentInstanceStorage(self, (Handle)storage);
- impl->setDelegateVolume(storage->delegate);
+ // add this instance to the global list
+ impl->mComponentInstances.push_back(storage);
+
+ // and set up the initial volume
+ impl->setInstanceVolume(storage);
+ }
return result;
}
@@ -194,22 +199,15 @@ static ComponentResult volume_catcher_component_close(VolumeCatcherStorage *stor
return result;
}
-VolumeCatcherImpl::~VolumeCatcherImpl()
-{
- // We expect to persist until the process exits. This should never be called.
- abort();
-}
-
void VolumeCatcherImpl::setVolume(F32 volume)
{
VolumeCatcherImpl *impl = VolumeCatcherImpl::getInstance();
impl->mVolume = volume;
-
- std::list<VolumeCatcherStorage*>::iterator iter;
-
- for(iter = mComponentInstances.begin(); iter != mComponentInstances.end(); ++iter)
+
+ // Iterate through all known instances, setting the volume on each.
+ for(std::list<VolumeCatcherStorage*>::iterator iter = mComponentInstances.begin(); iter != mComponentInstances.end(); ++iter)
{
- impl->setDelegateVolume((*iter)->delegate);
+ impl->setInstanceVolume(*iter);
}
}
@@ -223,23 +221,23 @@ void VolumeCatcherImpl::setPan(F32 pan)
// There's also a "3d mixer" component that we might be able to use...
}
-void VolumeCatcherImpl::pump(void)
-{
-}
-
-void VolumeCatcherImpl::setDelegateVolume(ComponentInstance delegate)
+void VolumeCatcherImpl::setInstanceVolume(VolumeCatcherStorage *instance)
{
-// std::cerr << "Setting volume on component instance: " << (delegate) << " to " << mVolume << std::endl;
-
- OSStatus err;
- err = AudioUnitSetParameter(
- delegate,
- kHALOutputParam_Volume,
- kAudioUnitScope_Global,
- 0,
- mVolume,
- 0);
-
+// std::cerr << "Setting volume on component instance: " << (instance->delegate) << " to " << mVolume << std::endl;
+
+ OSStatus err = noErr;
+
+ if(instance && instance->delegate)
+ {
+ err = AudioUnitSetParameter(
+ instance->delegate,
+ kHALOutputParam_Volume,
+ kAudioUnitScope_Global,
+ 0,
+ mVolume,
+ 0);
+ }
+
if(err)
{
// std::cerr << " AudioUnitSetParameter returned " << err << std::endl;
@@ -260,16 +258,16 @@ VolumeCatcher::~VolumeCatcher()
void VolumeCatcher::setVolume(F32 volume)
{
- VolumeCatcherImpl::getInstance()->setVolume(volume);
+ pimpl->setVolume(volume);
}
void VolumeCatcher::setPan(F32 pan)
{
- VolumeCatcherImpl::getInstance()->setPan(pan);
+ pimpl->setPan(pan);
}
void VolumeCatcher::pump()
{
- VolumeCatcherImpl::getInstance()->pump();
+ // No periodic tasks are necessary for this implementation.
}
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index b3f7a64efb..73e83b9793 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -145,7 +145,6 @@ set(viewer_SOURCE_FILES
llfirstuse.cpp
llflexibleobject.cpp
llfloaterabout.cpp
- llfloateractivespeakers.cpp
llfloateranimpreview.cpp
llfloaterauction.cpp
llfloateravatarpicker.cpp
@@ -650,7 +649,6 @@ set(viewer_HEADER_FILES
llfirstuse.h
llflexibleobject.h
llfloaterabout.h
- llfloateractivespeakers.h
llfloateranimpreview.h
llfloaterauction.h
llfloateravatarpicker.h
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 3197064281..f76b471c9c 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5395,6 +5395,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>ParticipantListShowIcons</key>
+ <map>
+ <key>Comment</key>
+ <string>Show/hide people icons in participant list</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>1</integer>
+ </map>
<key>PerAccountSettingsFile</key>
<map>
<key>Comment</key>
@@ -8535,17 +8546,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowVoiceChannelPopup</key>
- <map>
- <key>Comment</key>
- <string>Controls visibility of the current voice channel popup above the voice tab</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowVoiceVisualizersInCalls</key>
<map>
<key>Comment</key>
@@ -8557,17 +8557,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowVolumeSettingsPopup</key>
- <map>
- <key>Comment</key>
- <string>Show individual volume slider for voice, sound effects, etc</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>SkinCurrent</key>
<map>
<key>Comment</key>
@@ -10954,5 +10943,35 @@
<key>Value</key>
<integer>1</integer>
</map>
+
+ <!-- Settings below are for back compatibility only.
+ They are not used in current viewer anymore. But they can't be removed to avoid
+ influence on previous versions of the viewer in case of settings are not used or default value
+ should be changed. See also EXT-6661. -->
+ <!-- 1.23 settings -->
+ <key>ShowVoiceChannelPopup</key>
+ <map>
+ <key>Comment</key>
+ <string>Controls visibility of the current voice channel popup above the voice tab</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+ <key>ShowVolumeSettingsPopup</key>
+ <map>
+ <key>Comment</key>
+ <string>Show individual volume slider for voice, sound effects, etc</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
+
+ <!-- End of back compatibility settings -->
</map>
</llsd>
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 9d3b5763e8..7f248eee30 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -905,8 +905,7 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
// Get the UUID of the current outfit folder (will be created if it doesn't exist)
const LLUUID current_outfit_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CURRENT_OUTFIT);
-
- LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch();
+ LLInitialWearablesFetch* outfit = new LLInitialWearablesFetch(current_outfit_id);
//lldebugs << "processAgentInitialWearablesUpdate()" << llendl;
// Add wearables
@@ -952,10 +951,8 @@ void LLAgentWearables::processAgentInitialWearablesUpdate(LLMessageSystem* mesgs
// Get the complete information on the items in the inventory and set up an observer
// that will trigger when the complete information is fetched.
- uuid_vec_t folders;
- folders.push_back(current_outfit_id);
- outfit->fetch(folders);
- if(outfit->isEverythingComplete())
+ outfit->startFetch();
+ if(outfit->isFinished())
{
// everything is already here - call done.
outfit->done();
@@ -2061,17 +2058,15 @@ void LLAgentWearables::populateMyOutfitsFolder(void)
{
llinfos << "starting outfit population" << llendl;
- LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch();
+ const LLUUID& my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
+ LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(my_outfits_id);
+ outfits->mMyOutfitsID = my_outfits_id;
// Get the complete information on the items in the inventory and
// setup an observer that will wait for that to happen.
- uuid_vec_t folders;
- outfits->mMyOutfitsID = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
-
- folders.push_back(outfits->mMyOutfitsID);
gInventory.addObserver(outfits);
- outfits->fetch(folders);
- if (outfits->isEverythingComplete())
+ outfits->startFetch();
+ if (outfits->isFinished())
{
outfits->done();
}
diff --git a/indra/newview/llagentwearablesfetch.cpp b/indra/newview/llagentwearablesfetch.cpp
index 3d6740f5a1..08d8ccfd23 100644
--- a/indra/newview/llagentwearablesfetch.cpp
+++ b/indra/newview/llagentwearablesfetch.cpp
@@ -39,7 +39,8 @@
#include "llinventoryfunctions.h"
#include "llvoavatarself.h"
-LLInitialWearablesFetch::LLInitialWearablesFetch()
+LLInitialWearablesFetch::LLInitialWearablesFetch(const LLUUID& cof_id) :
+ LLInventoryFetchDescendentsObserver(cof_id)
{
}
@@ -86,12 +87,11 @@ void LLInitialWearablesFetch::processContents()
delete this;
}
-class LLFetchAndLinkObserver: public LLInventoryFetchObserver
+class LLFetchAndLinkObserver: public LLInventoryFetchItemsObserver
{
public:
LLFetchAndLinkObserver(uuid_vec_t& ids):
- m_ids(ids),
- LLInventoryFetchObserver(true) // retry for missing items
+ LLInventoryFetchItemsObserver(ids)
{
}
~LLFetchAndLinkObserver()
@@ -103,8 +103,8 @@ public:
// Link to all fetched items in COF.
LLPointer<LLInventoryCallback> link_waiter = new LLUpdateAppearanceOnDestroy;
- for (uuid_vec_t::iterator it = m_ids.begin();
- it != m_ids.end();
+ for (uuid_vec_t::iterator it = mIDs.begin();
+ it != mIDs.end();
++it)
{
LLUUID id = *it;
@@ -123,8 +123,6 @@ public:
link_waiter);
}
}
-private:
- uuid_vec_t m_ids;
};
void LLInitialWearablesFetch::processWearablesMessage()
@@ -173,10 +171,10 @@ void LLInitialWearablesFetch::processWearablesMessage()
// Need to fetch the inventory items for ids, then create links to them after they arrive.
LLFetchAndLinkObserver *fetcher = new LLFetchAndLinkObserver(ids);
- fetcher->fetch(ids);
+ fetcher->startFetch();
// If no items to be fetched, done will never be triggered.
- // TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
- if (fetcher->isEverythingComplete())
+ // TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
+ if (fetcher->isFinished())
{
fetcher->done();
}
@@ -191,7 +189,8 @@ void LLInitialWearablesFetch::processWearablesMessage()
}
}
-LLLibraryOutfitsFetch::LLLibraryOutfitsFetch() :
+LLLibraryOutfitsFetch::LLLibraryOutfitsFetch(const LLUUID& my_outfits_id) :
+ LLInventoryFetchDescendentsObserver(my_outfits_id),
mCurrFetchStep(LOFS_FOLDER),
mOutfitsPopulated(false)
{
@@ -288,8 +287,9 @@ void LLLibraryOutfitsFetch::folderDone()
uuid_vec_t folders;
folders.push_back(mClothingID);
folders.push_back(mLibraryClothingID);
- fetch(folders);
- if (isEverythingComplete())
+ setFetchIDs(folders);
+ startFetch();
+ if (isFinished())
{
done();
}
@@ -337,9 +337,9 @@ void LLLibraryOutfitsFetch::outfitsDone()
}
mComplete.clear();
-
- fetch(folders);
- if (isEverythingComplete())
+ setFetchIDs(folders);
+ startFetch();
+ if (isFinished())
{
done();
}
@@ -434,9 +434,9 @@ void LLLibraryOutfitsFetch::importedFolderFetch()
folders.push_back(mImportedClothingID);
mComplete.clear();
-
- fetch(folders);
- if (isEverythingComplete())
+ setFetchIDs(folders);
+ startFetch();
+ if (isFinished())
{
done();
}
@@ -464,8 +464,9 @@ void LLLibraryOutfitsFetch::importedFolderDone()
}
mComplete.clear();
- fetch(folders);
- if (isEverythingComplete())
+ setFetchIDs(folders);
+ startFetch();
+ if (isFinished())
{
done();
}
diff --git a/indra/newview/llagentwearablesfetch.h b/indra/newview/llagentwearablesfetch.h
index 1d0c6739ba..6695727d46 100644
--- a/indra/newview/llagentwearablesfetch.h
+++ b/indra/newview/llagentwearablesfetch.h
@@ -47,7 +47,7 @@
class LLInitialWearablesFetch : public LLInventoryFetchDescendentsObserver
{
public:
- LLInitialWearablesFetch();
+ LLInitialWearablesFetch(const LLUUID& cof_id);
~LLInitialWearablesFetch();
virtual void done();
@@ -92,7 +92,7 @@ public:
LOFS_CONTENTS
};
- LLLibraryOutfitsFetch();
+ LLLibraryOutfitsFetch(const LLUUID& my_outfits_id);
~LLLibraryOutfitsFetch();
virtual void done();
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4a30ba3066..4d18ff57fe 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -42,14 +42,16 @@
#include "llinventoryfunctions.h"
#include "llinventoryobserver.h"
#include "llnotificationsutil.h"
+#include "llselectmgr.h"
#include "llsidepanelappearance.h"
#include "llsidetray.h"
+#include "llviewerobjectlist.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
#include "llviewerregion.h"
#include "llwearablelist.h"
-LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id,const std::string& name)
+LLUUID findDescendentCategoryIDByName(const LLUUID& parent_id, const std::string& name)
{
LLInventoryModel::cat_array_t cat_array;
LLInventoryModel::item_array_t item_array;
@@ -1587,6 +1589,39 @@ void LLAppearanceMgr::wearBaseOutfit()
updateCOF(base_outfit_id);
}
+void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove)
+{
+ LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove);
+ if (!item_to_remove) return;
+
+ switch (item_to_remove->getType())
+ {
+ case LLAssetType::AT_CLOTHING:
+ if (get_is_item_worn(id_to_remove))
+ {
+ //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future
+ LLWearableBridge::removeItemFromAvatar(item_to_remove);
+ }
+ break;
+ case LLAssetType::AT_OBJECT:
+ gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv);
+ gMessageSystem->nextBlockFast(_PREHASH_ObjectData);
+ gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_to_remove->getLinkedUUID());
+ gMessageSystem->sendReliable( gAgent.getRegion()->getHost());
+
+ {
+ // this object might have been selected, so let the selection manager know it's gone now
+ LLViewerObject *found_obj = gObjectList.findObject(item_to_remove->getLinkedUUID());
+ if (found_obj)
+ {
+ LLSelectMgr::getInstance()->remove(found_obj);
+ };
+ }
+ default: break;
+ }
+}
+
//#define DUMP_CAT_VERBOSE
void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg)
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index dffd421898..7e35919892 100644
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -135,6 +135,9 @@ public:
// @return false if there is no base outfit
bool updateBaseOutfit();
+ //Remove clothing or detach an object from the agent (a bodypart cannot be removed)
+ void removeItemFromAvatar(const LLUUID& item_id);
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
@@ -256,10 +259,12 @@ void doOnIdleRepeating(T callable)
}
template <class T>
-class CallAfterCategoryFetchStage2: public LLInventoryFetchObserver
+class CallAfterCategoryFetchStage2: public LLInventoryFetchItemsObserver
{
public:
- CallAfterCategoryFetchStage2(T callable):
+ CallAfterCategoryFetchStage2(const uuid_vec_t& ids,
+ T callable) :
+ LLInventoryFetchItemsObserver(ids),
mCallable(callable)
{
}
@@ -280,7 +285,8 @@ template <class T>
class CallAfterCategoryFetchStage1: public LLInventoryFetchDescendentsObserver
{
public:
- CallAfterCategoryFetchStage1(T callable):
+ CallAfterCategoryFetchStage1(const LLUUID& cat_id, T callable) :
+ LLInventoryFetchDescendentsObserver(cat_id),
mCallable(callable)
{
}
@@ -309,7 +315,6 @@ public:
return;
}
- CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable);
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
@@ -319,8 +324,9 @@ public:
gInventory.removeObserver(this);
// do the fetch
- stage2->fetch(ids);
- if(stage2->isEverythingComplete())
+ CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(ids, mCallable);
+ stage2->startFetch();
+ if(stage2->isFinished())
{
// everything is already here - call done.
stage2->done();
@@ -340,11 +346,9 @@ protected:
template <class T>
void callAfterCategoryFetch(const LLUUID& cat_id, T callable)
{
- CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(callable);
- uuid_vec_t folders;
- folders.push_back(cat_id);
- stage1->fetch(folders);
- if (stage1->isEverythingComplete())
+ CallAfterCategoryFetchStage1<T> *stage1 = new CallAfterCategoryFetchStage1<T>(cat_id, callable);
+ stage1->startFetch();
+ if (stage1->isFinished())
{
stage1->done();
}
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 41bee540fc..4ebccbe731 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -185,24 +185,6 @@ LLBottomTray::~LLBottomTray()
}
}
-void LLBottomTray::onChicletClick(LLUICtrl* ctrl)
-{
- LLIMChiclet* chiclet = dynamic_cast<LLIMChiclet*>(ctrl);
- if (chiclet)
- {
- // Until you can type into an IM Window and have a conversation,
- // still show the old communicate window
- //LLFloaterReg::showInstance("communicate", chiclet->getSessionId());
-
- // Show after comm window so it is frontmost (and hence will not
- // auto-hide)
-
-// this logic has been moved to LLIMChiclet::handleMouseDown
-// LLIMFloater::show(chiclet->getSessionId());
-// chiclet->setCounter(0);
- }
-}
-
// *TODO Vadim: why void* ?
void* LLBottomTray::createNearbyChatBar(void* userdata)
{
@@ -499,7 +481,6 @@ BOOL LLBottomTray::postBuild()
mNearbyChatBar->getChatBox()->setContextMenu(NULL);
mChicletPanel = getChild<LLChicletPanel>("chiclet_list");
- mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
initStateProcessedObjectMap();
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 3c45777645..8395b484cf 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -212,8 +212,6 @@ protected:
LLBottomTray(const LLSD& key = LLSD());
- void onChicletClick(LLUICtrl* ctrl);
-
static void* createNearbyChatBar(void* userdata);
void updateContextMenu(S32 x, S32 y, MASK mask);
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 0b58c8f476..d15c5f9bf4 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -334,7 +334,7 @@ void LLCallFloater::refreshParticipantList()
if (!non_avatar_caller)
{
- mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT);
+ mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false);
mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1));
mParticipants->setSortOrder(LLParticipantList::E_SORT_BY_RECENT_SPEAKERS);
diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp
index 18db60705b..deef85cc6c 100644
--- a/indra/newview/llfloateravatartextures.cpp
+++ b/indra/newview/llfloateravatartextures.cpp
@@ -38,7 +38,7 @@
#include "lltexturectrl.h"
#include "lluictrlfactory.h"
#include "llviewerobjectlist.h"
-#include "llvoavatar.h"
+#include "llvoavatarself.h"
using namespace LLVOAvatarDefines;
@@ -82,14 +82,17 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture(te);
if (tex_entry->mIsLocalTexture)
{
- const EWearableType wearable_type = tex_entry->mWearableType;
- LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
- if (wearable)
+ if (avatarp->isSelf())
{
- LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
- if (lto)
+ const EWearableType wearable_type = tex_entry->mWearableType;
+ LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+ if (wearable)
{
- id = lto->getID();
+ LLLocalTextureObject *lto = wearable->getLocalTextureObject(te);
+ if (lto)
+ {
+ id = lto->getID();
+ }
}
}
}
@@ -101,12 +104,12 @@ static void update_texture_ctrl(LLVOAvatar* avatarp,
if (id == IMG_DEFAULT_AVATAR)
{
ctrl->setImageAssetID(LLUUID::null);
- ctrl->setToolTip(std::string("IMG_DEFAULT_AVATAR"));
+ ctrl->setToolTip(tex_entry->mName + " : " + std::string("IMG_DEFAULT_AVATAR"));
}
else
{
ctrl->setImageAssetID(id);
- ctrl->setToolTip(id.asString());
+ ctrl->setToolTip(tex_entry->mName + " : " + id.asString());
}
}
@@ -160,37 +163,43 @@ void LLFloaterAvatarTextures::onClickDump(void* data)
LLFloaterAvatarTextures* self = (LLFloaterAvatarTextures*)data;
LLVOAvatar* avatarp = find_avatar(self->mID);
if (!avatarp) return;
-
for (S32 i = 0; i < avatarp->getNumTEs(); i++)
{
const LLTextureEntry* te = avatarp->getTE(i);
if (!te) continue;
+ const LLVOAvatarDictionary::TextureEntry* tex_entry = LLVOAvatarDictionary::getInstance()->getTexture((ETextureIndex)(i));
+ if (!tex_entry)
+ continue;
+
if (LLVOAvatar::isIndexLocalTexture((ETextureIndex)i))
{
LLUUID id = IMG_DEFAULT_AVATAR;
EWearableType wearable_type = LLVOAvatarDictionary::getInstance()->getTEWearableType((ETextureIndex)i);
- LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
- if (wearable)
+ if (avatarp->isSelf())
{
- LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
- if (lto)
+ LLWearable *wearable = gAgentWearables.getWearable(wearable_type, 0);
+ if (wearable)
{
- id = lto->getID();
+ LLLocalTextureObject *lto = wearable->getLocalTextureObject(i);
+ if (lto)
+ {
+ id = lto->getID();
+ }
}
}
if (id != IMG_DEFAULT_AVATAR)
{
- llinfos << "Avatar TE " << i << " id " << id << llendl;
+ llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << id << llendl;
}
else
{
- llinfos << "Avatar TE " << i << " id " << "<DEFAULT>" << llendl;
+ llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << "<DEFAULT>" << llendl;
}
}
else
{
- llinfos << "Avatar TE " << i << " id " << te->getID() << llendl;
+ llinfos << "TE " << i << " name:" << tex_entry->mName << " id:" << te->getID() << llendl;
}
}
}
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 8ee8d13a9c..eff7131145 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -148,7 +148,8 @@ void LLFloaterGesture::done()
if (!unloaded_folders.empty())
{
LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL;
- fetch(unloaded_folders);
+ setFetchIDs(unloaded_folders);
+ startFetch();
}
else
{
@@ -202,7 +203,8 @@ BOOL LLFloaterGesture::postBuild()
folders.push_back(mGestureFolderID);
//perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details.
gInventory.addObserver(this);
- fetch(folders);
+ setFetchIDs(folders);
+ startFetch();
if (mGestureList)
{
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index bb9d151cd2..30b654de24 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -237,7 +237,7 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
// do not enable the UI for incomplete items.
LLViewerInventoryItem* i = (LLViewerInventoryItem*)item;
- BOOL is_complete = i->isComplete();
+ BOOL is_complete = i->isFinished();
const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(i->getInventoryType());
const BOOL is_calling_card = (i->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const LLPermissions& perm = item->getPermissions();
@@ -683,7 +683,7 @@ void LLFloaterProperties::onCommitPermissions()
CheckNextOwnerTransfer->get(), PERM_TRANSFER);
}
if(perm != item->getPermissions()
- && item->isComplete())
+ && item->isFinished())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setPermissions(perm);
@@ -813,7 +813,7 @@ void LLFloaterProperties::updateSaleInfo()
sale_info.setSaleType(LLSaleInfo::FS_NOT);
}
if(sale_info != item->getSaleInfo()
- && item->isComplete())
+ && item->isFinished())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 6f069cca17..7f28e09933 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -111,8 +111,11 @@ class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver
public:
typedef boost::function<void()> callback_t;
- LLInitialFriendCardsFetch(callback_t cb)
- : mCheckFolderCallback(cb) {}
+ LLInitialFriendCardsFetch(const LLUUID& folder_id,
+ callback_t cb) :
+ LLInventoryFetchDescendentsObserver(folder_id),
+ mCheckFolderCallback(cb)
+ {}
/* virtual */ void done();
@@ -408,13 +411,9 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb)
{
// This instance will be deleted in LLInitialFriendCardsFetch::done().
- LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb);
-
- uuid_vec_t folders;
- folders.push_back(folder_id);
-
- fetch->fetch(folders);
- if(fetch->isEverythingComplete())
+ LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(folder_id, cb);
+ fetch->startFetch();
+ if(fetch->isFinished())
{
// everything is already here - call done.
fetch->done();
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index a4342a4bc9..0996d09e25 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -73,7 +73,6 @@ LLGestureMgr::LLGestureMgr()
mActive(),
mLoadingCount(0)
{
- mRetryIfMissing = true;
gInventory.addObserver(this);
}
@@ -100,7 +99,7 @@ void LLGestureMgr::init()
void LLGestureMgr::changed(U32 mask)
{
- LLInventoryFetchObserver::changed(mask);
+ LLInventoryFetchItemsObserver::changed(mask);
if (mask & LLInventoryObserver::GESTURE)
{
@@ -1031,9 +1030,8 @@ void LLGestureMgr::onLoadComplete(LLVFS *vfs,
else
{
// Watch this item and set gesture name when item exists in inventory
- uuid_vec_t ids;
- ids.push_back(item_id);
- self.fetch(ids);
+ self.setFetchID(item_id);
+ self.startFetch();
}
self.mActive[item_id] = gesture;
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 081ca983a9..5f2c3e2d61 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -54,7 +54,7 @@ public:
virtual void changed() = 0;
};
-class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchObserver
+class LLGestureMgr : public LLSingleton<LLGestureMgr>, public LLInventoryFetchItemsObserver
{
public:
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 92b994ad67..10146ee9d3 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3077,7 +3077,7 @@ public:
return;
}
- if(!LLVoiceClient::voiceEnabled())
+ if(!LLVoiceClient::voiceEnabled() || !LLVoiceClient::getInstance()->voiceWorking())
{
// Don't display voice invites unless the user has voice enabled.
return;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 76c0d69dda..3071ef3b71 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1170,7 +1170,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
void LLItemBridge::selectItem()
{
LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
- if(item && !item->isComplete())
+ if(item && !item->isFinished())
{
item->fetchFromServer();
}
@@ -1970,13 +1970,17 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id,
}
//Used by LLFolderBridge as callback for directory recursion.
-class LLRightClickInventoryFetchObserver : public LLInventoryFetchObserver
+class LLRightClickInventoryFetchObserver : public LLInventoryFetchItemsObserver
{
public:
- LLRightClickInventoryFetchObserver() :
+ LLRightClickInventoryFetchObserver(const uuid_vec_t& ids) :
+ LLInventoryFetchItemsObserver(ids),
mCopyItems(false)
{ };
- LLRightClickInventoryFetchObserver(const LLUUID& cat_id, bool copy_items) :
+ LLRightClickInventoryFetchObserver(const uuid_vec_t& ids,
+ const LLUUID& cat_id,
+ bool copy_items) :
+ LLInventoryFetchItemsObserver(ids),
mCatID(cat_id),
mCopyItems(copy_items)
{ };
@@ -2000,7 +2004,11 @@ protected:
class LLRightClickInventoryFetchDescendentsObserver : public LLInventoryFetchDescendentsObserver
{
public:
- LLRightClickInventoryFetchDescendentsObserver(bool copy_items) : mCopyItems(copy_items) {}
+ LLRightClickInventoryFetchDescendentsObserver(const uuid_vec_t& ids,
+ bool copy_items) :
+ LLInventoryFetchDescendentsObserver(ids),
+ mCopyItems(copy_items)
+ {}
~LLRightClickInventoryFetchDescendentsObserver() {}
virtual void done();
protected:
@@ -2043,14 +2051,14 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
}
#endif
- LLRightClickInventoryFetchObserver* outfit;
- outfit = new LLRightClickInventoryFetchObserver(mComplete.front(), mCopyItems);
uuid_vec_t ids;
for(S32 i = 0; i < count; ++i)
{
ids.push_back(item_array.get(i)->getUUID());
}
+ LLRightClickInventoryFetchObserver* outfit = new LLRightClickInventoryFetchObserver(ids, mComplete.front(), mCopyItems);
+
// clean up, and remove this as an observer since the call to the
// outfit could notify observers and throw us into an infinite
// loop.
@@ -2063,10 +2071,10 @@ void LLRightClickInventoryFetchDescendentsObserver::done()
inc_busy_count();
// do the fetch
- outfit->fetch(ids);
+ outfit->startFetch();
outfit->done(); //Not interested in waiting and this will be right 99% of the time.
//Uncomment the following code for laggy Inventory UI.
-/* if(outfit->isEverythingComplete())
+/* if(outfit->isFinished())
{
// everything is already here - call done.
outfit->done();
@@ -2752,7 +2760,7 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
mMenu = &menu;
sSelf = this;
- LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(FALSE);
+
uuid_vec_t folders;
LLViewerInventoryCategory* category = (LLViewerInventoryCategory*)model->getCategory(mUUID);
@@ -2760,9 +2768,10 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
{
folders.push_back(category->getUUID());
}
- fetch->fetch(folders);
+ LLRightClickInventoryFetchDescendentsObserver* fetch = new LLRightClickInventoryFetchDescendentsObserver(folders, FALSE);
+ fetch->startFetch();
inc_busy_count();
- if(fetch->isEverythingComplete())
+ if(fetch->isFinished())
{
// everything is already here - call done.
fetch->done();
@@ -3232,7 +3241,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
else if(LLToolDragAndDrop::SOURCE_LIBRARY == source)
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)inv_item;
- if(item && item->isComplete())
+ if(item && item->isFinished())
{
accept = TRUE;
if(drop)
@@ -4122,7 +4131,7 @@ void LLObjectBridge::performAction(LLInventoryModel* model, std::string action)
{
rez_attachment(item, NULL);
}
- else if(item && item->isComplete())
+ else if(item && item->isFinished())
{
// must be in library. copy it to our inventory and put it on.
LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(0);
@@ -4765,7 +4774,7 @@ BOOL LLWearableBridge::canWearOnAvatar(void* user_data)
if(!self->isAgentInventory())
{
LLViewerInventoryItem* item = (LLViewerInventoryItem*)self->getItem();
- if(!item || !item->isComplete()) return FALSE;
+ if(!item || !item->isFinished()) return FALSE;
}
return (!get_is_item_worn(self->mUUID));
}
@@ -5385,7 +5394,7 @@ public:
// must be in the inventory library. copy it to our inventory
// and put it on right away.
LLViewerInventoryItem* item = getItem();
- if(item && item->isComplete())
+ if(item && item->isFinished())
{
LLPointer<LLInventoryCallback> cb = new WearOnAvatarCallback();
copy_inventory_item(
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 922fcc16c0..544a815896 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -62,6 +62,14 @@
#include "llsdutil.h"
#include <deque>
+// If the viewer gets a notification, your observer assumes
+// that that notification is for itself and then tries to process
+// the results. The notification could be for something else (e.g.
+// you're fetching an item and a notification gets triggered because
+// you renamed some other item). This counter is to specify how many
+// notification to wait for before giving up.
+static const U32 MAX_NUM_NOTIFICATIONS_TO_PROCESS = 20;
+
LLInventoryObserver::LLInventoryObserver()
{
}
@@ -71,21 +79,51 @@ LLInventoryObserver::~LLInventoryObserver()
{
}
+LLInventoryFetchObserver::LLInventoryFetchObserver(const LLUUID& id)
+{
+ mIDs.clear();
+ if (id != LLUUID::null)
+ {
+ setFetchID(id);
+ }
+}
+
+LLInventoryFetchObserver::LLInventoryFetchObserver(const uuid_vec_t& ids)
+{
+ setFetchIDs(ids);
+}
+
+BOOL LLInventoryFetchObserver::isFinished() const
+{
+ return mIncomplete.empty();
+}
+
+void LLInventoryFetchObserver::setFetchIDs(const uuid_vec_t& ids)
+{
+ mIDs = ids;
+}
+void LLInventoryFetchObserver::setFetchID(const LLUUID& id)
+{
+ mIDs.clear();
+ mIDs.push_back(id);
+}
+
+
void LLInventoryCompletionObserver::changed(U32 mask)
{
// scan through the incomplete items and move or erase them as
// appropriate.
- if(!mIncomplete.empty())
+ if (!mIncomplete.empty())
{
- for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
+ for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
{
- LLViewerInventoryItem* item = gInventory.getItem(*it);
- if(!item)
+ const LLViewerInventoryItem* item = gInventory.getItem(*it);
+ if (!item)
{
it = mIncomplete.erase(it);
continue;
}
- if(item->isComplete())
+ if (item->isFinished())
{
mComplete.push_back(*it);
it = mIncomplete.erase(it);
@@ -93,7 +131,7 @@ void LLInventoryCompletionObserver::changed(U32 mask)
}
++it;
}
- if(mIncomplete.empty())
+ if (mIncomplete.empty())
{
done();
}
@@ -102,64 +140,74 @@ void LLInventoryCompletionObserver::changed(U32 mask)
void LLInventoryCompletionObserver::watchItem(const LLUUID& id)
{
- if(id.notNull())
+ if (id.notNull())
{
mIncomplete.push_back(id);
}
}
-LLInventoryFetchObserver::LLInventoryFetchObserver(bool retry_if_missing) :
- mRetryIfMissing(retry_if_missing)
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const LLUUID& item_id) :
+ LLInventoryFetchObserver(item_id),
+ mNumTries(MAX_NUM_NOTIFICATIONS_TO_PROCESS)
{
+ mIDs.clear();
+ mIDs.push_back(item_id);
}
-void LLInventoryFetchObserver::changed(U32 mask)
+LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) :
+ LLInventoryFetchObserver(item_ids)
{
+}
+
+void LLInventoryFetchItemsObserver::changed(U32 mask)
+{
+ BOOL any_items_missing = FALSE;
+
// scan through the incomplete items and move or erase them as
// appropriate.
- if(!mIncomplete.empty())
+ if (!mIncomplete.empty())
{
- for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
+ for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end(); )
{
- LLViewerInventoryItem* item = gInventory.getItem(*it);
- if(!item)
+ const LLUUID& item_id = (*it);
+ LLViewerInventoryItem* item = gInventory.getItem(item_id);
+ if (!item)
{
- if (mRetryIfMissing)
+ any_items_missing = TRUE;
+ if (mNumTries > 0)
{
- // BAP changed to skip these items, so we should keep retrying until they arrive.
- // Did not make this the default behavior because of uncertainty about impact -
- // could cause some observers that currently complete to wait forever.
+ // Keep trying.
++it;
}
else
{
- // BUG: This can cause done() to get called prematurely below.
- // This happens with the LLGestureInventoryFetchObserver that
- // loads gestures at startup. JC
+ // Just concede that this item hasn't arrived in reasonable time and continue on.
+ llwarns << "Fetcher timed out when fetching inventory item assetID:" << item_id << llendl;
it = mIncomplete.erase(it);
}
continue;
}
- if(item->isComplete())
+ if (item->isFinished())
{
- mComplete.push_back(*it);
+ mComplete.push_back(item_id);
it = mIncomplete.erase(it);
continue;
}
++it;
}
- if(mIncomplete.empty())
+ if (any_items_missing)
{
+ mNumTries--;
+ }
+
+ if (mIncomplete.empty())
+ {
+ mNumTries = MAX_NUM_NOTIFICATIONS_TO_PROCESS;
done();
}
}
- //llinfos << "LLInventoryFetchObserver::changed() mComplete size " << mComplete.size() << llendl;
- //llinfos << "LLInventoryFetchObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
-}
-
-bool LLInventoryFetchObserver::isEverythingComplete() const
-{
- return mIncomplete.empty();
+ //llinfos << "LLInventoryFetchItemsObserver::changed() mComplete size " << mComplete.size() << llendl;
+ //llinfos << "LLInventoryFetchItemsObserver::changed() mIncomplete size " << mIncomplete.size() << llendl;
}
void fetch_items_from_llsd(const LLSD& items_llsd)
@@ -199,7 +247,7 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
for (S32 j=0; j<body[i]["items"].size(); j++)
{
LLSD item_entry = body[i]["items"][j];
- if(start_new_message)
+ if (start_new_message)
{
start_new_message = FALSE;
msg->newMessageFast(_PREHASH_FetchInventory);
@@ -210,29 +258,29 @@ void fetch_items_from_llsd(const LLSD& items_llsd)
msg->nextBlockFast(_PREHASH_InventoryData);
msg->addUUIDFast(_PREHASH_OwnerID, item_entry["owner_id"].asUUID());
msg->addUUIDFast(_PREHASH_ItemID, item_entry["item_id"].asUUID());
- if(msg->isSendFull(NULL))
+ if (msg->isSendFull(NULL))
{
start_new_message = TRUE;
gAgent.sendReliableMessage();
}
}
- if(!start_new_message)
+ if (!start_new_message)
{
gAgent.sendReliableMessage();
}
}
}
-void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids)
+void LLInventoryFetchItemsObserver::startFetch()
{
LLUUID owner_id;
LLSD items_llsd;
- for(uuid_vec_t::const_iterator it = ids.begin(); it < ids.end(); ++it)
+ for (uuid_vec_t::const_iterator it = mIDs.begin(); it < mIDs.end(); ++it)
{
LLViewerInventoryItem* item = gInventory.getItem(*it);
- if(item)
+ if (item)
{
- if(item->isComplete())
+ if (item->isFinished())
{
// It's complete, so put it on the complete container.
mComplete.push_back(*it);
@@ -262,18 +310,28 @@ void LLInventoryFetchObserver::fetch(const uuid_vec_t& ids)
fetch_items_from_llsd(items_llsd);
}
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const LLUUID& cat_id) :
+ LLInventoryFetchObserver(cat_id)
+{
+}
+
+LLInventoryFetchDescendentsObserver::LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids) :
+ LLInventoryFetchObserver(cat_ids)
+{
+}
+
// virtual
void LLInventoryFetchDescendentsObserver::changed(U32 mask)
{
- for(uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
+ for (uuid_vec_t::iterator it = mIncomplete.begin(); it < mIncomplete.end();)
{
- LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
- if(!cat)
+ const LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
+ if (!cat)
{
it = mIncomplete.erase(it);
continue;
}
- if(isComplete(cat))
+ if (isCategoryComplete(cat))
{
mComplete.push_back(*it);
it = mIncomplete.erase(it);
@@ -281,19 +339,19 @@ void LLInventoryFetchDescendentsObserver::changed(U32 mask)
}
++it;
}
- if(mIncomplete.empty())
+ if (mIncomplete.empty())
{
done();
}
}
-void LLInventoryFetchDescendentsObserver::fetch(const uuid_vec_t& ids)
+void LLInventoryFetchDescendentsObserver::startFetch()
{
- for(uuid_vec_t::const_iterator it = ids.begin(); it != ids.end(); ++it)
+ for (uuid_vec_t::const_iterator it = mIDs.begin(); it != mIDs.end(); ++it)
{
LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
- if(!cat) continue;
- if(!isComplete(cat))
+ if (!cat) continue;
+ if (!isCategoryComplete(cat))
{
cat->fetch(); //blindly fetch it without seeing if anything else is fetching it.
mIncomplete.push_back(*it); //Add to list of things being downloaded for this observer.
@@ -305,40 +363,35 @@ void LLInventoryFetchDescendentsObserver::fetch(const uuid_vec_t& ids)
}
}
-bool LLInventoryFetchDescendentsObserver::isEverythingComplete() const
-{
- return mIncomplete.empty();
-}
-
-bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory* cat)
+BOOL LLInventoryFetchDescendentsObserver::isCategoryComplete(const LLViewerInventoryCategory* cat) const
{
const S32 version = cat->getVersion();
const S32 expected_num_descendents = cat->getDescendentCount();
if ((version == LLViewerInventoryCategory::VERSION_UNKNOWN) ||
(expected_num_descendents == LLViewerInventoryCategory::DESCENDENT_COUNT_UNKNOWN))
{
- return false;
+ return FALSE;
}
// it might be complete - check known descendents against
// currently available.
LLInventoryModel::cat_array_t* cats;
LLInventoryModel::item_array_t* items;
gInventory.getDirectDescendentsOf(cat->getUUID(), cats, items);
- if(!cats || !items)
+ if (!cats || !items)
{
llwarns << "Category '" << cat->getName() << "' descendents corrupted, fetch failed." << llendl;
// NULL means the call failed -- cats/items map doesn't exist (note: this does NOT mean
// that the cat just doesn't have any items or subfolders).
// Unrecoverable, so just return done so that this observer can be cleared
// from memory.
- return true;
+ return TRUE;
}
const S32 current_num_known_descendents = cats->count() + items->count();
// Got the number of descendents that we were expecting, so we're done.
if (current_num_known_descendents == expected_num_descendents)
{
- return true;
+ return TRUE;
}
// Error condition, but recoverable. This happens if something was added to the
@@ -347,125 +400,62 @@ bool LLInventoryFetchDescendentsObserver::isComplete(LLViewerInventoryCategory*
if (current_num_known_descendents >= expected_num_descendents)
{
llwarns << "Category '" << cat->getName() << "' expected descendentcount:" << expected_num_descendents << " descendents but got descendentcount:" << current_num_known_descendents << llendl;
- cat->setDescendentCount(current_num_known_descendents);
- return true;
+ const_cast<LLViewerInventoryCategory *>(cat)->setDescendentCount(current_num_known_descendents);
+ return TRUE;
}
- return false;
+ return FALSE;
}
-void LLInventoryFetchComboObserver::changed(U32 mask)
+LLInventoryFetchComboObserver::LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
+ const uuid_vec_t& item_ids)
{
- if(!mIncompleteItems.empty())
- {
- for(uuid_vec_t::iterator it = mIncompleteItems.begin(); it < mIncompleteItems.end(); )
- {
- LLViewerInventoryItem* item = gInventory.getItem(*it);
- if(!item)
- {
- it = mIncompleteItems.erase(it);
- continue;
- }
- if(item->isComplete())
- {
- mCompleteItems.push_back(*it);
- it = mIncompleteItems.erase(it);
- continue;
- }
- ++it;
- }
- }
- if(!mIncompleteFolders.empty())
+ mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);
+
+ uuid_vec_t pruned_item_ids;
+ for (uuid_vec_t::const_iterator item_iter = item_ids.begin();
+ item_iter != item_ids.end();
+ ++item_iter)
{
- for(uuid_vec_t::iterator it = mIncompleteFolders.begin(); it < mIncompleteFolders.end();)
+ const LLUUID& item_id = (*item_iter);
+ const LLViewerInventoryItem* item = gInventory.getItem(item_id);
+ if (item && std::find(folder_ids.begin(), folder_ids.end(), item->getParentUUID()) == folder_ids.end())
{
- LLViewerInventoryCategory* cat = gInventory.getCategory(*it);
- if(!cat)
- {
- it = mIncompleteFolders.erase(it);
- continue;
- }
- if(gInventory.isCategoryComplete(*it))
- {
- mCompleteFolders.push_back(*it);
- it = mIncompleteFolders.erase(it);
- continue;
- }
- ++it;
+ continue;
}
+ pruned_item_ids.push_back(item_id);
}
- if(!mDone && mIncompleteItems.empty() && mIncompleteFolders.empty())
- {
- mDone = true;
- done();
- }
+
+ mFetchItems = new LLInventoryFetchItemsObserver(pruned_item_ids);
+ mFetchDescendents = new LLInventoryFetchDescendentsObserver(folder_ids);
}
-void LLInventoryFetchComboObserver::fetch(
- const uuid_vec_t& folder_ids,
- const uuid_vec_t& item_ids)
+LLInventoryFetchComboObserver::~LLInventoryFetchComboObserver()
{
- lldebugs << "LLInventoryFetchComboObserver::fetch()" << llendl;
- for(uuid_vec_t::const_iterator fit = folder_ids.begin(); fit != folder_ids.end(); ++fit)
- {
- LLViewerInventoryCategory* cat = gInventory.getCategory(*fit);
- if(!cat) continue;
- if(!gInventory.isCategoryComplete(*fit))
- {
- cat->fetch();
- lldebugs << "fetching folder " << *fit <<llendl;
- mIncompleteFolders.push_back(*fit);
- }
- else
- {
- mCompleteFolders.push_back(*fit);
- lldebugs << "completing folder " << *fit <<llendl;
- }
- }
+ mFetchItems->done();
+ mFetchDescendents->done();
+ delete mFetchItems;
+ delete mFetchDescendents;
+}
- // Now for the items - we fetch everything which is not a direct
- // descendent of an incomplete folder because the item will show
- // up in an inventory descendents message soon enough so we do not
- // have to fetch it individually.
- LLSD items_llsd;
- LLUUID owner_id;
- for(uuid_vec_t::const_iterator iit = item_ids.begin(); iit != item_ids.end(); ++iit)
+void LLInventoryFetchComboObserver::changed(U32 mask)
+{
+ mFetchItems->changed(mask);
+ mFetchDescendents->changed(mask);
+ if (mFetchItems->isFinished() && mFetchDescendents->isFinished())
{
- LLViewerInventoryItem* item = gInventory.getItem(*iit);
- if(!item)
- {
- lldebugs << "uanble to find item " << *iit << llendl;
- continue;
- }
- if(item->isComplete())
- {
- // It's complete, so put it on the complete container.
- mCompleteItems.push_back(*iit);
- lldebugs << "completing item " << *iit << llendl;
- continue;
- }
- else
- {
- mIncompleteItems.push_back(*iit);
- owner_id = item->getPermissions().getOwner();
- }
- if(std::find(mIncompleteFolders.begin(), mIncompleteFolders.end(), item->getParentUUID()) == mIncompleteFolders.end())
- {
- LLSD item_entry;
- item_entry["owner_id"] = owner_id;
- item_entry["item_id"] = (*iit);
- items_llsd.append(item_entry);
- }
- else
- {
- lldebugs << "not worrying about " << *iit << llendl;
- }
+ done();
}
- fetch_items_from_llsd(items_llsd);
+}
+
+void LLInventoryFetchComboObserver::startFetch()
+{
+ mFetchItems->startFetch();
+ mFetchDescendents->startFetch();
}
void LLInventoryExistenceObserver::watchItem(const LLUUID& id)
{
- if(id.notNull())
+ if (id.notNull())
{
mMIA.push_back(id);
}
@@ -475,12 +465,12 @@ void LLInventoryExistenceObserver::changed(U32 mask)
{
// scan through the incomplete items and move or erase them as
// appropriate.
- if(!mMIA.empty())
+ if (!mMIA.empty())
{
- for(uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); )
+ for (uuid_vec_t::iterator it = mMIA.begin(); it < mMIA.end(); )
{
LLViewerInventoryItem* item = gInventory.getItem(*it);
- if(!item)
+ if (!item)
{
++it;
continue;
@@ -488,7 +478,7 @@ void LLInventoryExistenceObserver::changed(U32 mask)
mExist.push_back(*it);
it = mMIA.erase(it);
}
- if(mMIA.empty())
+ if (mMIA.empty())
{
done();
}
@@ -560,7 +550,7 @@ bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id )
void LLInventoryAddedObserver::changed(U32 mask)
{
- if(!(mask & LLInventoryObserver::ADD))
+ if (!(mask & LLInventoryObserver::ADD))
{
return;
}
@@ -592,7 +582,7 @@ void LLInventoryAddedObserver::changed(U32 mask)
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData);
- for(S32 i = 0; i < num_blocks; ++i)
+ for (S32 i = 0; i < num_blocks; ++i)
{
titem->unpackMessage(msg, _PREHASH_InventoryData, i);
if (!(titem->getUUID().isNull()))
@@ -607,26 +597,25 @@ void LLInventoryAddedObserver::changed(U32 mask)
}
}
-LLInventoryTransactionObserver::LLInventoryTransactionObserver(
- const LLTransactionID& transaction_id) :
+LLInventoryTransactionObserver::LLInventoryTransactionObserver(const LLTransactionID& transaction_id) :
mTransactionID(transaction_id)
{
}
void LLInventoryTransactionObserver::changed(U32 mask)
{
- if(mask & LLInventoryObserver::ADD)
+ if (mask & LLInventoryObserver::ADD)
{
// This could be it - see if we are processing a bulk update
LLMessageSystem* msg = gMessageSystem;
- if(msg->getMessageName()
+ if (msg->getMessageName()
&& (0 == strcmp(msg->getMessageName(), "BulkUpdateInventory")))
{
// we have a match for the message - now check the
// transaction id.
LLUUID id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_TransactionID, id);
- if(id == mTransactionID)
+ if (id == mTransactionID)
{
// woo hoo, we found it
uuid_vec_t folders;
@@ -634,19 +623,19 @@ void LLInventoryTransactionObserver::changed(U32 mask)
S32 count;
count = msg->getNumberOfBlocksFast(_PREHASH_FolderData);
S32 i;
- for(i = 0; i < count; ++i)
+ for (i = 0; i < count; ++i)
{
msg->getUUIDFast(_PREHASH_FolderData, _PREHASH_FolderID, id, i);
- if(id.notNull())
+ if (id.notNull())
{
folders.push_back(id);
}
}
count = msg->getNumberOfBlocksFast(_PREHASH_ItemData);
- for(i = 0; i < count; ++i)
+ for (i = 0; i < count; ++i)
{
msg->getUUIDFast(_PREHASH_ItemData, _PREHASH_ItemID, id, i);
- if(id.notNull())
+ if (id.notNull())
{
items.push_back(id);
}
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index b710a9d326..c48ffaa55d 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -45,7 +45,6 @@ class LLViewerInventoryCategory;
// A simple abstract base class that can relay messages when the inventory
// changes.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryObserver
{
public:
@@ -60,7 +59,7 @@ public:
ADD = 4, // Something added
REMOVE = 8, // Something deleted
STRUCTURE = 16, // Structural change (e.g. item or folder moved)
- CALLING_CARD = 32, // Calling card change (e.g. online, grant status, cancel)
+ CALLING_CARD = 32, // Calling card change (e.g. online, grant status, cancel)
GESTURE = 64,
REBUILD = 128, // Item UI changed (e.g. item type different)
SORT = 256, // Folder needs to be resorted.
@@ -73,120 +72,100 @@ public:
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryCompletionObserver
+// Class LLInventoryFetchObserver
//
-// Base class for doing something when when all observed items are locally
-// complete. Implements the changed() method of LLInventoryObserver
-// and declares a new method named done() which is called when all watched items
-// have complete information in the inventory model.
+// Abstract class to handle fetching items, folders, etc.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLInventoryCompletionObserver : public LLInventoryObserver
+class LLInventoryFetchObserver : public LLInventoryObserver
{
public:
- LLInventoryCompletionObserver() {}
- virtual void changed(U32 mask);
+ LLInventoryFetchObserver(const LLUUID& id = LLUUID::null); // single item
+ LLInventoryFetchObserver(const uuid_vec_t& ids); // multiple items
+ void setFetchID(const LLUUID& id);
+ void setFetchIDs(const uuid_vec_t& ids);
- void watchItem(const LLUUID& id);
+ BOOL isFinished() const;
+ virtual void startFetch() = 0;
+ virtual void changed(U32 mask) = 0;
+ virtual void done() {};
protected:
- virtual void done() = 0;
-
uuid_vec_t mComplete;
uuid_vec_t mIncomplete;
+ uuid_vec_t mIDs;
};
-
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-// Class LLInventoryFetchObserver
+// Class LLInventoryFetchItemsObserver
//
-// This class is much like the LLInventoryCompletionObserver, except
-// that it handles all the the fetching necessary. Override the done()
-// method to do the thing you want.
+// Fetches inventory items, calls done() when all inventory has arrived.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-class LLInventoryFetchObserver : public LLInventoryObserver
+class LLInventoryFetchItemsObserver : public LLInventoryFetchObserver
{
public:
- LLInventoryFetchObserver(bool retry_if_missing = false);
- virtual void changed(U32 mask);
+ LLInventoryFetchItemsObserver(const LLUUID& item_id = LLUUID::null);
+ LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids);
- bool isEverythingComplete() const;
- void fetch(const uuid_vec_t& ids);
- virtual void done() {};
-
-protected:
- bool mRetryIfMissing;
- uuid_vec_t mComplete;
- uuid_vec_t mIncomplete;
+ /*virtual*/ void startFetch();
+ /*virtual*/ void changed(U32 mask);
+private:
+ S8 mNumTries; // Number of times changed() was called without success
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryFetchDescendentsObserver
//
-// This class is much like the LLInventoryCompletionObserver, except
-// that it handles fetching based on category. Override the done()
-// method to do the thing you want.
+// Fetches children of a category/folder, calls done() when all
+// inventory has arrived.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLInventoryFetchDescendentsObserver : public LLInventoryObserver
+class LLInventoryFetchDescendentsObserver : public LLInventoryFetchObserver
{
public:
- LLInventoryFetchDescendentsObserver() {}
- virtual void changed(U32 mask);
-
- void fetch(const uuid_vec_t& ids);
- bool isEverythingComplete() const;
- virtual void done() = 0;
+ LLInventoryFetchDescendentsObserver(const LLUUID& cat_id = LLUUID::null);
+ LLInventoryFetchDescendentsObserver(const uuid_vec_t& cat_ids);
+ /*virtual*/ void startFetch();
+ /*virtual*/ void changed(U32 mask);
protected:
- bool isComplete(LLViewerInventoryCategory* cat);
- uuid_vec_t mIncomplete;
- uuid_vec_t mComplete;
+ BOOL isCategoryComplete(const LLViewerInventoryCategory* cat) const;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryFetchComboObserver
//
-// This class does an appropriate combination of fetch descendents and
-// item fetches based on completion of categories and items. Much like
-// the fetch and fetch descendents, this will call done() when everything
-// has arrived.
+// Does an appropriate combination of fetch descendents and
+// item fetches based on completion of categories and items. This is optimized
+// to not fetch item_ids that are descendents of any of the folder_ids.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryFetchComboObserver : public LLInventoryObserver
{
public:
- LLInventoryFetchComboObserver() : mDone(false) {}
- virtual void changed(U32 mask);
-
- void fetch(const uuid_vec_t& folder_ids, const uuid_vec_t& item_ids);
+ LLInventoryFetchComboObserver(const uuid_vec_t& folder_ids,
+ const uuid_vec_t& item_ids);
+ ~LLInventoryFetchComboObserver();
+ /*virtual*/ void changed(U32 mask);
+ void startFetch();
virtual void done() = 0;
-
protected:
- bool mDone;
- uuid_vec_t mCompleteFolders;
- uuid_vec_t mIncompleteFolders;
- uuid_vec_t mCompleteItems;
- uuid_vec_t mIncompleteItems;
+ BOOL mDone;
+ LLInventoryFetchItemsObserver *mFetchItems;
+ LLInventoryFetchDescendentsObserver *mFetchDescendents;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryExistenceObserver
//
-// This class is used as a base class for doing somethign when all the
-// observed item ids exist in the inventory somewhere. You can derive
-// a class from this class and implement the done() method to do
-// something useful.
+// Used as a base class for doing something when all the
+// observed item ids exist in the inventory somewhere.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryExistenceObserver : public LLInventoryObserver
{
public:
LLInventoryExistenceObserver() {}
- virtual void changed(U32 mask);
+ /*virtual*/ void changed(U32 mask);
void watchItem(const LLUUID& id);
-
protected:
virtual void done() = 0;
uuid_vec_t mExist;
@@ -226,18 +205,14 @@ private:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryAddedObserver
//
-// This class is used as a base class for doing something when
-// a new item arrives in inventory.
-// It does not watch for a certain UUID, rather it acts when anything is added
-// Derive a class from this class and implement the done() method to do
-// something useful.
+// Base class for doing something when a new item arrives in inventory.
+// It does not watch for a certain UUID, rather it acts when anything is added
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryAddedObserver : public LLInventoryObserver
{
public:
LLInventoryAddedObserver() : mAdded() {}
- virtual void changed(U32 mask);
+ /*virtual*/ void changed(U32 mask);
protected:
virtual void done() = 0;
@@ -248,18 +223,15 @@ protected:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryTransactionObserver
//
-// Class which can be used as a base class for doing something when an
-// inventory transaction completes.
-//
-// *NOTE: This class is not quite complete. Avoid using unless you fix up it's
-// functionality gaps.
+// Base class for doing something when an inventory transaction completes.
+// NOTE: This class is not quite complete. Avoid using unless you fix up its
+// functionality gaps.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
class LLInventoryTransactionObserver : public LLInventoryObserver
{
public:
LLInventoryTransactionObserver(const LLTransactionID& transaction_id);
- virtual void changed(U32 mask);
+ /*virtual*/ void changed(U32 mask);
protected:
virtual void done(const uuid_vec_t& folders, const uuid_vec_t& items) = 0;
@@ -267,6 +239,28 @@ protected:
LLTransactionID mTransactionID;
};
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// Class LLInventoryCompletionObserver
+//
+// Base class for doing something when when all observed items are locally
+// complete. Implements the changed() method of LLInventoryObserver
+// and declares a new method named done() which is called when all watched items
+// have complete information in the inventory model.
+//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+class LLInventoryCompletionObserver : public LLInventoryObserver
+{
+public:
+ LLInventoryCompletionObserver() {}
+ /*virtual*/ void changed(U32 mask);
+
+ void watchItem(const LLUUID& id);
+
+protected:
+ virtual void done() = 0;
+
+ uuid_vec_t mComplete;
+ uuid_vec_t mIncomplete;
+};
#endif // LL_LLINVENTORYOBSERVERS_H
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6ed7723aff..15c872a7c4 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -904,7 +904,7 @@ bool LLInventoryPanel::attachObject(const LLSD& userdata)
{
rez_attachment(item, attachmentp);
}
- else if(item && item->isComplete())
+ else if(item && item->isFinished())
{
// must be in library. copy it to our inventory and put it on.
LLPointer<LLInventoryCallback> cb = new RezAttachmentCallback(attachmentp);
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index d1e6d7de42..d78a448acb 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -118,7 +118,7 @@ private:
LLPanelOutfitEdit::LLPanelOutfitEdit()
: LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL),
mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL),
-mRemoveFromLookBtn(NULL), mLookObserver(NULL)
+mRemoveFromOutfitBtn(NULL), mLookObserver(NULL)
{
mSavedFolderState = new LLSaveFolderState();
mSavedFolderState->setApply(FALSE);
@@ -164,14 +164,10 @@ BOOL LLPanelOutfitEdit::postBuild()
childSetCommitCallback("add_btn", boost::bind(&LLPanelOutfitEdit::showAddWearablesPanel, this), NULL);
- /*
- mLookContents->setDoubleClickCallback(onDoubleClickSpeaker, this);
- mLookContents->setCommitOnSelectionChange(TRUE);
- mLookContents->setCommitCallback(boost::bind(&LLPanelActiveSpeakers::handleSpeakerSelect, this, _2));
- mLookContents->setSortChangedCallback(boost::bind(&LLPanelActiveSpeakers::onSortChanged, this));
- mLookContents->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
- */
-
+ mLookContents = getChild<LLScrollListCtrl>("look_items_list");
+ mLookContents->sortByColumn("look_item_sort", TRUE);
+ mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+
mInventoryItemsPanel = getChild<LLInventoryPanel>("inventory_items");
mInventoryItemsPanel->setFilterTypes(ALL_ITEMS_MASK);
mInventoryItemsPanel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
@@ -207,31 +203,20 @@ BOOL LLPanelOutfitEdit::postBuild()
mUpBtn->setEnabled(TRUE);
mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this));
+ //*TODO rename mLookContents to mOutfitContents
mLookContents = getChild<LLScrollListCtrl>("look_items_list");
mLookContents->sortByColumn("look_item_sort", TRUE);
- mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onLookItemSelectionChange, this));
+ mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onOutfitItemSelectionChange, this));
+
+ mRemoveFromOutfitBtn = getChild<LLButton>("remove_from_outfit_btn");
+ mRemoveFromOutfitBtn->setEnabled(FALSE);
+ mRemoveFromOutfitBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromOutfitClicked, this));
- /*
- LLButton::Params remove_params;
- remove_params.name("remove_from_look");
- remove_params.click_callback.function(boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this));
- remove_params.label("-"); */
-
- //mRemoveFromLookBtn = LLUICtrlFactory::create<LLButton>(remove_params);
- mRemoveFromLookBtn = getChild<LLButton>("remove_from_look_btn");
- mRemoveFromLookBtn->setEnabled(FALSE);
- mRemoveFromLookBtn->setVisible(FALSE);
- //childSetAction("remove_from_look_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
- mRemoveFromLookBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this));
- //getChild<LLPanel>("look_info_group_bar")->addChild(mRemoveFromLookBtn); remove_item_btn
-
mEditWearableBtn = getChild<LLButton>("edit_wearable_btn");
mEditWearableBtn->setEnabled(FALSE);
mEditWearableBtn->setVisible(FALSE);
mEditWearableBtn->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onEditWearableClicked, this));
- childSetAction("remove_item_btn", boost::bind(&LLPanelOutfitEdit::onRemoveFromLookClicked, this), this);
-
childSetAction("revert_btn", boost::bind(&LLAppearanceMgr::wearBaseOutfit, LLAppearanceMgr::getInstance()));
childSetAction("save_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false));
@@ -353,27 +338,15 @@ void LLPanelOutfitEdit::onAddToOutfitClicked(void)
}
-void LLPanelOutfitEdit::onRemoveFromLookClicked(void)
+void LLPanelOutfitEdit::onRemoveFromOutfitClicked(void)
{
LLUUID id_to_remove = mLookContents->getSelectionInterface()->getCurrentID();
- LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove);
-
- if (item_to_remove)
- {
- // returns null if not a wearable (attachment, etc).
- const LLWearable* wearable_to_remove = gAgentWearables.getWearableFromAssetID(item_to_remove->getAssetUUID());
- if (!wearable_to_remove || gAgentWearables.canWearableBeRemoved( wearable_to_remove ))
- {
- gInventory.purgeObject( id_to_remove );
- updateLookInfo();
- mRemoveFromLookBtn->setEnabled(FALSE);
- if (mRemoveFromLookBtn->getVisible())
- {
- mRemoveFromLookBtn->setVisible(FALSE);
- }
- }
- }
+ LLAppearanceMgr::getInstance()->removeItemFromAvatar(id_to_remove);
+
+ updateLookInfo();
+
+ mRemoveFromOutfitBtn->setEnabled(FALSE);
}
@@ -421,14 +394,14 @@ void LLPanelOutfitEdit::onEditWearableClicked(void)
if(wearable_to_edit)
{
bool can_modify = false;
- bool is_complete = item_to_edit->isComplete();
+ bool is_complete = item_to_edit->isFinished();
// if item_to_edit is a link, its properties are not appropriate,
// lets get original item with actual properties
LLViewerInventoryItem* original_item = gInventory.getItem(wearable_to_edit->getItemID());
if(original_item)
{
can_modify = original_item->getPermissions().allowModifyBy(gAgentID);
- is_complete = original_item->isComplete();
+ is_complete = original_item->isFinished();
}
if (can_modify && is_complete)
@@ -482,7 +455,7 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView
current_item->addChild(mAddToLookBtn); */
}
-void LLPanelOutfitEdit::onLookItemSelectionChange(void)
+void LLPanelOutfitEdit::onOutfitItemSelectionChange(void)
{
S32 left_offset = -4;
S32 top_offset = -10;
@@ -504,7 +477,22 @@ void LLPanelOutfitEdit::onLookItemSelectionChange(void)
{
mEditWearableBtn->setVisible(TRUE);
}
- //mLookContents->addChild(mRemoveFromLookBtn);
+
+
+ const LLUUID& id_item_to_remove = item->getUUID();
+ LLViewerInventoryItem* item_to_remove = gInventory.getItem(id_item_to_remove);
+ if (!item_to_remove) return;
+
+ switch (item_to_remove->getType())
+ {
+ case LLAssetType::AT_CLOTHING:
+ case LLAssetType::AT_OBJECT:
+ mRemoveFromOutfitBtn->setEnabled(TRUE);
+ break;
+ default:
+ mRemoveFromOutfitBtn->setEnabled(FALSE);
+ break;
+ }
}
void LLPanelOutfitEdit::changed(U32 mask)
@@ -548,11 +536,10 @@ void LLPanelOutfitEdit::updateLookInfo()
if (getVisible())
{
mLookContents->clearRows();
-
- uuid_vec_t folders;
- folders.push_back(mCurrentOutfitID);
- mFetchLook->fetch(folders);
- if (mFetchLook->isEverythingComplete())
+
+ mFetchLook->setFetchID(mCurrentOutfitID);
+ mFetchLook->startFetch();
+ if (mFetchLook->isFinished())
{
mFetchLook->done();
}
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index 1a8d7d2bef..fa92d4c314 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -94,8 +94,8 @@ public:
void onSearchEdit(const std::string& string);
void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
void onAddToOutfitClicked(void);
- void onLookItemSelectionChange(void);
- void onRemoveFromLookClicked(void);
+ void onOutfitItemSelectionChange(void);
+ void onRemoveFromOutfitClicked(void);
void onEditWearableClicked(void);
void onUpClicked(void);
@@ -117,7 +117,7 @@ private:
LLSaveFolderState* mSavedFolderState;
std::string mSearchString;
LLButton* mAddToOutfitBtn;
- LLButton* mRemoveFromLookBtn;
+ LLButton* mRemoveFromOutfitBtn;
LLButton* mUpBtn;
LLButton* mEditWearableBtn;
LLToggleableMenu* mSaveMenu;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index dbb8e962bd..026be882ed 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -39,6 +39,7 @@
#include "llparticipantlist.h"
#include "llspeakers.h"
+#include "llviewercontrol.h"
#include "llviewermenu.h"
#include "llvoiceclient.h"
@@ -50,7 +51,7 @@
static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR;
LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/,
- bool exclude_agent /*= true*/):
+ bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/):
mSpeakerMgr(data_source),
mAvatarList(avatar_list),
mSortOrder(E_SORT_BY_NAME)
@@ -87,6 +88,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av
mAvatarList->setContextMenu(NULL);
}
+ if (use_context_menu && can_toggle_icons)
+ {
+ mAvatarList->setShowIcons("ParticipantListShowIcons");
+ mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList));
+ }
+
//Lets fill avatarList with existing speakers
LLSpeakerMgr::speaker_list_t speaker_list;
mSpeakerMgr->getSpeakerList(&speaker_list, true);
@@ -113,6 +120,7 @@ LLParticipantList::~LLParticipantList()
mAvatarListDoubleClickConnection.disconnect();
mAvatarListRefreshConnection.disconnect();
mAvatarListReturnConnection.disconnect();
+ mAvatarListToggleIconsConnection.disconnect();
// It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged()
// See ticket EXT-3427
@@ -440,6 +448,8 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu()
main_menu->setItemVisible("SortByName", is_sort_visible);
main_menu->setItemVisible("SortByRecentSpeakers", is_sort_visible);
main_menu->setItemVisible("Moderator Options", isGroupModerator());
+ main_menu->setItemVisible("View Icons Separator", mParent.mAvatarListToggleIconsConnection.connected());
+ main_menu->setItemVisible("View Icons", mParent.mAvatarListToggleIconsConnection.connected());
main_menu->arrangeAndClear();
return main_menu;
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index d9ca4230a9..953dff4551 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -46,7 +46,7 @@ class LLParticipantList
typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t;
- LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true);
+ LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true);
~LLParticipantList();
void setSpeakingIndicatorsVisible(BOOL visible);
@@ -268,6 +268,7 @@ class LLParticipantList
boost::signals2::connection mAvatarListDoubleClickConnection;
boost::signals2::connection mAvatarListRefreshConnection;
boost::signals2::connection mAvatarListReturnConnection;
+ boost::signals2::connection mAvatarListToggleIconsConnection;
LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers;
validate_speaker_callback_t mValidateSpeakerCallback;
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index d0db77dcbe..dd31a62642 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -138,7 +138,7 @@ void LLPreview::onCommit()
const LLViewerInventoryItem *item = dynamic_cast<const LLViewerInventoryItem*>(getItem());
if(item)
{
- if (!item->isComplete())
+ if (!item->isFinished())
{
// We are attempting to save an item that was never loaded
llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index fce90e4c44..2e061b235d 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -141,7 +141,7 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob
// this will call refresh when we have everything.
LLViewerInventoryItem* item = (LLViewerInventoryItem*)preview->getItem();
- if (item && !item->isComplete())
+ if (item && !item->isFinished())
{
LLInventoryGestureAvailable* observer;
observer = new LLInventoryGestureAvailable();
@@ -648,7 +648,7 @@ void LLPreviewGesture::refresh()
LLPreview::refresh();
// If previewing or item is incomplete, all controls are disabled
LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
- bool is_complete = (item && item->isComplete()) ? true : false;
+ bool is_complete = (item && item->isFinished()) ? true : false;
if (mPreviewGesture || !is_complete)
{
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 6b0e524f8c..7b926f468d 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1823,7 +1823,7 @@ void LLLiveLSLEditor::saveIfNeeded()
return;
}
- if(mItem.isNull() || !mItem->isComplete())
+ if(mItem.isNull() || !mItem->isFinished())
{
// $NOTE: While the error message may not be exactly correct,
// it's pretty close.
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 4dbedd6295..abef47d4be 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -52,10 +52,12 @@
static LLRegisterPanelClassWrapper<LLSidepanelAppearance> t_appearance("sidepanel_appearance");
-class LLCurrentlyWornFetchObserver : public LLInventoryFetchObserver
+class LLCurrentlyWornFetchObserver : public LLInventoryFetchItemsObserver
{
public:
- LLCurrentlyWornFetchObserver(LLSidepanelAppearance *panel) :
+ LLCurrentlyWornFetchObserver(const uuid_vec_t &ids,
+ LLSidepanelAppearance *panel) :
+ LLInventoryFetchItemsObserver(ids),
mPanel(panel)
{}
~LLCurrentlyWornFetchObserver() {}
@@ -406,11 +408,11 @@ void LLSidepanelAppearance::fetchInventory()
}
}
- LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(this);
- fetch_worn->fetch(ids);
+ LLCurrentlyWornFetchObserver *fetch_worn = new LLCurrentlyWornFetchObserver(ids, this);
+ fetch_worn->startFetch();
// If no items to be fetched, done will never be triggered.
- // TODO: Change LLInventoryFetchObserver::fetchItems to trigger done() on this condition.
- if (fetch_worn->isEverythingComplete())
+ // TODO: Change LLInventoryFetchItemsObserver::fetchItems to trigger done() on this condition.
+ if (fetch_worn->isFinished())
{
fetch_worn->done();
}
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 9b073943b4..0ec351965a 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -236,7 +236,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
if (!item) return;
// do not enable the UI for incomplete items.
- BOOL is_complete = item->isComplete();
+ BOOL is_complete = item->isFinished();
const BOOL cannot_restrict_permissions = LLInventoryType::cannotRestrictPermissions(item->getInventoryType());
const BOOL is_calling_card = (item->getInventoryType() == LLInventoryType::IT_CALLINGCARD);
const LLPermissions& perm = item->getPermissions();
@@ -743,7 +743,7 @@ void LLSidepanelItemInfo::onCommitPermissions()
CheckNextOwnerTransfer->get(), PERM_TRANSFER);
}
if(perm != item->getPermissions()
- && item->isComplete())
+ && item->isFinished())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
new_item->setPermissions(perm);
@@ -873,7 +873,7 @@ void LLSidepanelItemInfo::updateSaleInfo()
sale_info.setSaleType(LLSaleInfo::FS_NOT);
}
if(sale_info != item->getSaleInfo()
- && item->isComplete())
+ && item->isFinished())
{
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index c7eb9320e4..27b8ff0628 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1770,7 +1770,8 @@ bool idle_startup()
}
}
// no need to add gesture to inventory observer, it's already made in constructor
- LLGestureMgr::instance().fetch(item_ids);
+ LLGestureMgr::instance().setFetchIDs(item_ids);
+ LLGestureMgr::instance().startFetch();
}
}
gDisplaySwapBuffers = TRUE;
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp
index 492fb2ad52..4262264a1d 100644
--- a/indra/newview/lltexlayer.cpp
+++ b/indra/newview/lltexlayer.cpp
@@ -172,12 +172,13 @@ void LLTexLayerSetBuffer::popProjection() const
BOOL LLTexLayerSetBuffer::needsRender()
{
- const LLVOAvatarSelf* avatar = mTexLayerSet->getAvatar();
+ llassert(mTexLayerSet->getAvatar() == gAgentAvatarp);
+ if (!isAgentAvatarValid()) return FALSE;
BOOL upload_now = mNeedsUpload && mTexLayerSet->isLocalTextureDataFinal() && gAgentQueryManager.hasNoPendingQueries();
- BOOL needs_update = (mNeedsUpdate || upload_now) && !avatar->mAppearanceAnimating;
+ BOOL needs_update = (mNeedsUpdate || upload_now) && !gAgentAvatarp->mAppearanceAnimating;
if (needs_update)
{
- BOOL invalid_skirt = avatar->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !avatar->isWearingWearableType(WT_SKIRT);
+ BOOL invalid_skirt = gAgentAvatarp->getBakedTE(mTexLayerSet) == LLVOAvatarDefines::TEX_SKIRT_BAKED && !gAgentAvatarp->isWearingWearableType(WT_SKIRT);
if (invalid_skirt)
{
// we were trying to create a skirt texture
@@ -187,7 +188,6 @@ BOOL LLTexLayerSetBuffer::needsRender()
}
else
{
- needs_update &= (avatar->isSelf() || (avatar->isVisible() && !avatar->isCulled()));
needs_update &= mTexLayerSet->isLocalTextureDataAvailable();
}
}
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 1e81e675e6..774626f19d 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -232,10 +232,16 @@ bool LLGiveable::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
return allowed;
}
+// Starts a fetch on folders and items. This is really not used
+// as an observer in the traditional sense; we're just using it to
+// request a fetch and we don't care about when/if the response arrives.
class LLCategoryFireAndForget : public LLInventoryFetchComboObserver
{
public:
- LLCategoryFireAndForget() {}
+ LLCategoryFireAndForget(const uuid_vec_t& folder_ids,
+ const uuid_vec_t& item_ids) :
+ LLInventoryFetchComboObserver(folder_ids, item_ids)
+ {}
~LLCategoryFireAndForget() {}
virtual void done()
{
@@ -244,11 +250,13 @@ public:
}
};
-class LLCategoryDropObserver : public LLInventoryFetchObserver
+class LLCategoryDropObserver : public LLInventoryFetchItemsObserver
{
public:
LLCategoryDropObserver(
+ const uuid_vec_t& ids,
const LLUUID& obj_id, LLToolDragAndDrop::ESource src) :
+ LLInventoryFetchItemsObserver(ids),
mObjectID(obj_id),
mSource(src)
{}
@@ -285,7 +293,7 @@ void LLCategoryDropObserver::done()
}
delete this;
}
-
+/* Doesn't seem to be used anymore.
class LLCategoryDropDescendentsObserver : public LLInventoryFetchDescendentsObserver
{
public:
@@ -331,9 +339,9 @@ void LLCategoryDropDescendentsObserver::done()
std::back_insert_iterator<uuid_vec_t> copier(ids);
std::copy(unique_ids.begin(), unique_ids.end(), copier);
LLCategoryDropObserver* dropper;
- dropper = new LLCategoryDropObserver(mObjectID, mSource);
- dropper->fetch(ids);
- if (dropper->isEverythingComplete())
+ dropper = new LLCategoryDropObserver(ids, mObjectID, mSource);
+ dropper->startFetch();
+ if (dropper->isDone())
{
dropper->done();
}
@@ -344,6 +352,7 @@ void LLCategoryDropDescendentsObserver::done()
}
delete this;
}
+*/
LLToolDragAndDrop::DragAndDropEntry::DragAndDropEntry(dragOrDrop3dImpl f_none,
dragOrDrop3dImpl f_self,
@@ -479,8 +488,9 @@ void LLToolDragAndDrop::beginDrag(EDragAndDropType type,
}
if (!folder_ids.empty() || !item_ids.empty())
{
- LLCategoryFireAndForget fetcher;
- fetcher.fetch(folder_ids, item_ids);
+ LLCategoryFireAndForget *fetcher = new LLCategoryFireAndForget(folder_ids, item_ids);
+ fetcher->startFetch();
+ delete fetcher;
}
}
}
@@ -549,8 +559,7 @@ void LLToolDragAndDrop::beginMultiDrag(
uuid_vec_t item_ids;
std::back_insert_iterator<uuid_vec_t> copier(folder_ids);
std::copy(cat_ids.begin(), cat_ids.end(), copier);
- LLCategoryFireAndForget fetcher;
- fetcher.fetch(folder_ids, item_ids);
+ LLCategoryFireAndForget fetcher(folder_ids, item_ids);
}
}
}
@@ -1203,7 +1212,7 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return;
+ if (!item || !item->isFinished()) return;
//if (regionp
// && (regionp->getRegionFlags() & REGION_FLAGS_SANDBOX))
@@ -1834,7 +1843,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
if (!item || !obj) return ACCEPT_NO;
// HACK: downcast
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
- if (!vitem->isComplete()) return ACCEPT_NO;
+ if (!vitem->isFinished()) return ACCEPT_NO;
if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links
// deny attempts to drop from an object onto itself. This is to
@@ -1994,7 +2003,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
// must not be in the trash
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
@@ -2043,7 +2052,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
@@ -2105,7 +2114,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (!isAgentAvatarValid() || gAgentAvatarp->isWearingAttachment(item->getUUID()))
{
return ACCEPT_NO;
@@ -2184,7 +2193,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezScript(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
EAcceptance rv = willObjectAcceptInventory(obj, item);
if (drop && (ACCEPT_YES_SINGLE <= rv))
{
@@ -2222,7 +2231,7 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
EAcceptance rv = willObjectAcceptInventory(obj, item);
if ((mask & MASK_CONTROL))
{
@@ -2287,7 +2296,7 @@ EAcceptance LLToolDragAndDrop::dad3dWearItem(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY)
{
@@ -2342,7 +2351,7 @@ EAcceptance LLToolDragAndDrop::dad3dActivateGesture(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (mSource == SOURCE_AGENT || mSource == SOURCE_LIBRARY)
{
@@ -2450,7 +2459,7 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
LLViewerObject* root_object = obj;
if (obj && obj->getParent())
{
@@ -2576,9 +2585,9 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
const LLViewerInventoryItem *item = (*item_iter);
ids.push_back(item->getUUID());
}
- LLCategoryDropObserver* dropper = new LLCategoryDropObserver(obj->getID(), mSource);
- dropper->fetch(ids);
- if (dropper->isEverythingComplete())
+ LLCategoryDropObserver* dropper = new LLCategoryDropObserver(ids, obj->getID(), mSource);
+ dropper->startFetch();
+ if (dropper->isFinished())
{
dropper->done();
}
@@ -2609,7 +2618,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventoryObject(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
// cannot give away no-transfer objects
@@ -2643,7 +2652,7 @@ EAcceptance LLToolDragAndDrop::dad3dGiveInventory(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (!isInventoryGiveAcceptable(item))
{
return ACCEPT_NO;
@@ -2682,7 +2691,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
LLViewerInventoryItem* item = NULL;
LLViewerInventoryCategory* cat = NULL;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if (!gAgent.allowOperation(PERM_COPY, item->getPermissions())
|| !item->getPermissions().allowTransferTo(LLUUID::null))
@@ -2703,7 +2712,7 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isComplete()) return ACCEPT_NO;
+ if (!item || !item->isFinished()) return ACCEPT_NO;
if ((mask & MASK_CONTROL))
{
// *HACK: In order to resolve SL-22177, we need to block drags
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 65e9d8971a..506cebfe73 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -40,7 +40,6 @@
#include "llcompilequeue.h"
#include "llcallfloater.h"
#include "llfloaterabout.h"
-#include "llfloateractivespeakers.h"
#include "llfloateranimpreview.h"
#include "llfloaterauction.h"
#include "llfloateravatarpicker.h"
@@ -135,7 +134,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterAboutUtil::registerFloater();
LLFloaterReg::add("about_land", "floater_about_land.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterLand>);
- LLFloaterReg::add("active_speakers", "floater_active_speakers.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterActiveSpeakers>);
LLFloaterReg::add("auction", "floater_auction.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAuction>);
LLFloaterReg::add("avatar_picker", "floater_avatar_picker.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarPicker>);
LLFloaterReg::add("avatar_textures", "floater_avatar_textures.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAvatarTextures>);
@@ -151,7 +149,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
- //LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 2db88c2ff8..9d449399e8 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -138,7 +138,7 @@ public:
bool importFileLocal(LLFILE* fp);
// new methods
- BOOL isComplete() const { return mIsComplete; }
+ BOOL isFinished() const { return mIsComplete; }
void setComplete(BOOL complete) { mIsComplete = complete; }
//void updateAssetOnServer() const;
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 170eb7ae86..dd4192f270 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3252,8 +3252,9 @@ bool LLViewerMediaImpl::shouldShowBasedOnClass() const
// " outside = " << (!inside_parcel && gSavedSettings.getBOOL(LLViewerMedia::SHOW_MEDIA_OUTSIDE_PARCEL_SETTING)) << llendl;
// If it has focus, we should show it
- if (hasFocus())
- return true;
+ // This is incorrect, and causes EXT-6750 (disabled attachment media still plays)
+// if (hasFocus())
+// return true;
// If it is attached to an avatar and the pref is off, we shouldn't show it
if (attached_to_another_avatar)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 64967466fb..7c439d7200 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6106,10 +6106,12 @@ class LLAttachmentDetach : public view_listener_t
//Adding an observer for a Jira 2422 and needs to be a fetch observer
//for Jira 3119
-class LLWornItemFetchedObserver : public LLInventoryFetchObserver
+class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver
{
public:
- LLWornItemFetchedObserver() {}
+ LLWornItemFetchedObserver(const LLUUID& worn_item_id) :
+ LLInventoryFetchItemsObserver(worn_item_id)
+ {}
virtual ~LLWornItemFetchedObserver() {}
protected:
@@ -6163,13 +6165,9 @@ class LLAttachmentEnableDrop : public view_listener_t
// when the item finishes fetching worst case scenario
// if a fetch is already out there (being sent from a slow sim)
// we refetch and there are 2 fetches
- LLWornItemFetchedObserver* wornItemFetched = new LLWornItemFetchedObserver();
- uuid_vec_t items; //add item to the inventory item to be fetched
-
- items.push_back((*attachment_iter)->getItemID());
-
- wornItemFetched->fetch(items);
- gInventory.addObserver(wornItemFetched);
+ LLWornItemFetchedObserver* worn_item_fetched = new LLWornItemFetchedObserver((*attachment_iter)->getItemID());
+ worn_item_fetched->startFetch();
+ gInventory.addObserver(worn_item_fetched);
}
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 32df7d8410..9542bebde5 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -745,10 +745,13 @@ static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_
//-----------------------------------------------------------------------------
// Instant Message
//-----------------------------------------------------------------------------
-class LLOpenAgentOffer : public LLInventoryFetchObserver
+class LLOpenAgentOffer : public LLInventoryFetchItemsObserver
{
public:
- LLOpenAgentOffer(const std::string& from_name) : mFromName(from_name) {}
+ LLOpenAgentOffer(const LLUUID& object_id,
+ const std::string& from_name) :
+ LLInventoryFetchItemsObserver(object_id),
+ mFromName(from_name) {}
/*virtual*/ void done()
{
open_inventory_offer(mComplete, mFromName);
@@ -935,11 +938,12 @@ void start_new_inventory_observer()
}
}
-class LLDiscardAgentOffer : public LLInventoryFetchComboObserver
+class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver
{
LOG_CLASS(LLDiscardAgentOffer);
public:
LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) :
+ LLInventoryFetchItemsObserver(object_id),
mFolderID(folder_id),
mObjectID(object_id) {}
virtual ~LLDiscardAgentOffer() {}
@@ -1366,11 +1370,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// This is an offer from an agent. In this case, the back
// end has already copied the items into your inventory,
// so we can fetch it out of our inventory.
- uuid_vec_t items;
- items.push_back(mObjectID);
- LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(from_string);
- open_agent_offer->fetch(items);
- if(catp || (itemp && itemp->isComplete()))
+ LLOpenAgentOffer* open_agent_offer = new LLOpenAgentOffer(mObjectID, from_string);
+ open_agent_offer->startFetch();
+ if(catp || (itemp && itemp->isFinished()))
{
open_agent_offer->done();
}
@@ -1427,13 +1429,9 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// Disabled logging to old chat floater to fix crash in group notices - EXT-4149
// LLFloaterChat::addChatHistory(chat);
- uuid_vec_t folders;
- uuid_vec_t items;
- items.push_back(mObjectID);
- LLDiscardAgentOffer* discard_agent_offer;
- discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
- discard_agent_offer->fetch(folders, items);
- if(catp || (itemp && itemp->isComplete()))
+ LLDiscardAgentOffer* discard_agent_offer = new LLDiscardAgentOffer(mFolderID, mObjectID);
+ discard_agent_offer->startFetch();
+ if (catp || (itemp && itemp->isFinished()))
{
discard_agent_offer->done();
}
@@ -1764,11 +1762,9 @@ void inventory_offer_handler(LLOfferInfo* info)
p.name = "UserGiveItem";
// Prefetch the item into your local inventory.
- uuid_vec_t items;
- items.push_back(info->mObjectID);
- LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
- fetch_item->fetch(items);
- if(fetch_item->isEverythingComplete())
+ LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
+ fetch_item->startFetch();
+ if(fetch_item->isFinished())
{
fetch_item->done();
}
@@ -2283,10 +2279,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (is_muted)
{
// Prefetch the offered item so that it can be discarded by the appropriate observer. (EXT-4331)
- uuid_vec_t items;
- items.push_back(info->mObjectID);
- LLInventoryFetchObserver* fetch_item = new LLInventoryFetchObserver();
- fetch_item->fetch(items);
+ LLInventoryFetchItemsObserver* fetch_item = new LLInventoryFetchItemsObserver(info->mObjectID);
+ fetch_item->startFetch();
delete fetch_item;
// Same as closing window
@@ -3011,7 +3005,9 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
class LLFetchInWelcomeArea : public LLInventoryFetchDescendentsObserver
{
public:
- LLFetchInWelcomeArea() {}
+ LLFetchInWelcomeArea(const uuid_vec_t &ids) :
+ LLInventoryFetchDescendentsObserver(ids)
+ {}
virtual void done()
{
LLIsType is_landmark(LLAssetType::AT_LANDMARK);
@@ -3093,9 +3089,9 @@ BOOL LLPostTeleportNotifiers::tick()
folders.push_back(folder_id);
if(!folders.empty())
{
- LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea;
- fetcher->fetch(folders);
- if(fetcher->isEverythingComplete())
+ LLFetchInWelcomeArea* fetcher = new LLFetchInWelcomeArea(folders);
+ fetcher->startFetch();
+ if(fetcher->isFinished())
{
fetcher->done();
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 2238acd643..298ce3fcec 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5150,7 +5150,7 @@ LLVoiceClient::participantState *LLVoiceClient::sessionState::addParticipant(con
else
{
// Create a UUID by hashing the URI, but do NOT set mAvatarIDValid.
- // This tells both code in LLVoiceClient and code in llfloateractivespeakers.cpp that the ID will not be in the name cache.
+ // This tells code in LLVoiceClient that the ID will not be in the name cache.
setUUIDFromStringHash(result->mAvatarID, uri);
}
}
diff --git a/indra/newview/res/toolbuy.cur b/indra/newview/res/toolbuy.cur
deleted file mode 100644
index 7fd552a78e..0000000000
--- a/indra/newview/res/toolbuy.cur
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/toolopen.cur b/indra/newview/res/toolopen.cur
deleted file mode 100644
index 1562f5bc95..0000000000
--- a/indra/newview/res/toolopen.cur
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/toolsit.cur b/indra/newview/res/toolsit.cur
deleted file mode 100644
index a1f99cfe6d..0000000000
--- a/indra/newview/res/toolsit.cur
+++ /dev/null
Binary files differ
diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc
index ecdcacec46..6a1c1cb377 100644
--- a/indra/newview/res/viewerRes.rc
+++ b/indra/newview/res/viewerRes.rc
@@ -119,9 +119,6 @@ TOOLPIPETTE CURSOR "toolpipette.cur"
TOOLPLAY CURSOR "toolplay.cur"
TOOLPAUSE CURSOR "toolpause.cur"
TOOLMEDIAOPEN CURSOR "toolmediaopen.cur"
-TOOLOPEN CURSOR "toolopen.cur"
-TOOLSIT CURSOR "toolsit.cur"
-TOOLBUY CURSOR "toolbuy.cur"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 41bcc62220..84a99ba92a 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -522,8 +522,6 @@ with the same filename but different name
<!--WARNING OLD ART BELOW *do not use*-->
<texture name="icn_media_web.tga" preload="true" />
<texture name="icn_media_movie.tga" preload="true" />
- <texture name="icn_speaker-muted_dark.tga" />
- <texture name="icn_speaker_dark.tga" />
<texture name="icn_voice-localchat.tga" />
<texture name="icn_voice-groupfocus.tga" />
<texture name="icn_voice-pvtfocus.tga" />
@@ -545,10 +543,6 @@ with the same filename but different name
<texture name="tearoffbox.tga" />
<texture name="tearoff_pressed.tga" />
- <texture name="icn_label_music.tga" />
- <texture name="icn_label_media.tga" />
- <texture name="icn_rounded-text-field.tga" scale.left="14" scale.bottom="16" scale.top="16" scale.right="114" />
-
<texture name="color_swatch_alpha.tga" preload="true" />
<texture name="button_anim_pause.tga" />
@@ -582,20 +576,6 @@ with the same filename but different name
<texture name="notify_caution_icon.tga" />
- <texture name="icn_active-speakers-dot-lvl0.tga" />
- <texture name="icn_active-speakers-dot-lvl1.tga" />
- <texture name="icn_active-speakers-dot-lvl2.tga" />
-
- <texture name="icn_voice_ptt-off.tga" />
- <texture name="icn_voice_ptt-on.tga" />
- <texture name="icn_voice_ptt-on-lvl1.tga" />
- <texture name="icn_voice_ptt-on-lvl2.tga" />
- <texture name="icn_voice_ptt-on-lvl3.tga" />
- <texture name="icn_voice-call-end.tga" />
- <texture name="icn_voice-call-start.tga" />
-
- <texture name="mute_icon.tga" />
-
<texture name="default_land_picture.j2c" />
<texture name="default_profile_picture.j2c" />
<texture name="locked_image.j2c" />
diff --git a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
index 54b6edb0ec..e30e958543 100644
--- a/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
+++ b/indra/newview/skins/default/xui/en/floater_avatar_textures.xml
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater
legacy_header_height="18"
- height="650"
+ height="660"
layout="topleft"
name="avatar_texture_debug"
help_topic="avatar_texture_debug"
title="AVATAR TEXTURES"
- width="1250">
+ width="1253">
<floater.string
name="InvalidAvatar">
INVALID AVATAR
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
index c5b31c7f63..b46b62ec4d 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml
@@ -72,7 +72,7 @@
function="Avatar.EnableFreezeEject"/>
</menu_item_call>
<menu_item_call
- label="Debug"
+ label="Debug Textures"
name="Debug...">
<menu_item_call.on_click
function="Avatar.Debug" />
diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
index 281ec5a7c3..5c30b9ee94 100644
--- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml
@@ -99,5 +99,12 @@
function="ShowAgentProfile"
parameter="agent" />
</menu_item_call>
-
+ <menu_item_call
+ label="Debug Textures"
+ name="Debug...">
+ <menu_item_call.on_click
+ function="Avatar.Debug" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
index ac9101cfd9..276b5f106f 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml
@@ -72,7 +72,7 @@
function="Avatar.EnableFreezeEject"/>
</menu_item_call>
<menu_item_call
- label="Debug"
+ label="Debug Textures"
name="Debug...">
<menu_item_call.on_click
function="Avatar.Debug" />
diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
index 1e32cfd9df..a21c1ac44b 100644
--- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml
+++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml
@@ -215,4 +215,12 @@
function="ShowAgentProfile"
parameter="agent" />
</menu_item_call>
+ <menu_item_call
+ label="Debug Textures"
+ name="Debug...">
+ <menu_item_call.on_click
+ function="Avatar.Debug" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
index a5ac5f76e1..334decdf58 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_avatar_gear.xml
@@ -89,7 +89,7 @@
function="InspectAvatar.VisibleFreezeEject"/>
</menu_item_call>
<menu_item_call
- label="Debug"
+ label="Debug Textures"
name="debug">
<menu_item_call.on_click
function="Avatar.Debug"/>
diff --git a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
index 9dc2611663..03bd93e271 100644
--- a/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_inspect_self_gear.xml
@@ -45,4 +45,12 @@
function="SideTray.PanelPeopleTab"
parameter="groups_panel" />
</menu_item_call>
+ <menu_item_call
+ label="Debug Textures"
+ name="Debug...">
+ <menu_item_call.on_click
+ function="Avatar.Debug" />
+ <menu_item_call.on_visible
+ function="IsGodCustomerService"/>
+ </menu_item_call>
</menu>
diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml
index 2c97112e38..8b10c7b049 100644
--- a/indra/newview/skins/default/xui/en/menu_object.xml
+++ b/indra/newview/skins/default/xui/en/menu_object.xml
@@ -138,26 +138,13 @@
</context_menu>
<menu_item_separator layout="topleft" />
<menu_item_call
- label="Buy"
- layout="topleft"
- name="Pie Object Bye">
- <menu_item_call.on_click
- function="Tools.BuyOrTake"/>
- <menu_item_call.on_visible
- function="Tools.VisibleBuyObject"/>
- <menu_item_call.on_enable
- function="Tools.EnableBuyOrTake"/>
- </menu_item_call>
- <menu_item_call
label="Take"
layout="topleft"
name="Pie Object Take">
<menu_item_call.on_click
- function="Tools.BuyOrTake"/>
- <menu_item_call.on_visible
- function="Tools.VisibleTakeObject"/>
+ function="Object.Take"/>
<menu_item_call.on_enable
- function="Tools.EnableBuyOrTake"/>
+ function="Object.VisibleTake"/>
</menu_item_call>
<menu_item_call
enabled="false"
diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml
index d03a7e3d41..59c7f4ed85 100644
--- a/indra/newview/skins/default/xui/en/menu_participant_list.xml
+++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml
@@ -82,8 +82,21 @@
function="ParticipantList.EnableItem"
parameter="can_pay" />
</menu_item_call>
- <menu_item_separator
- layout="topleft" />
+ <menu_item_separator
+ layout="topleft"
+ name="View Icons Separator" />
+ <menu_item_check
+ label="View People Icons"
+ name="View Icons">
+ <on_click
+ function="ToggleControl"
+ parameter="ParticipantListShowIcons"/>
+ <on_check
+ function="CheckControl"
+ parameter="ParticipantListShowIcons" />
+ </menu_item_check>
+ <menu_item_separator
+ layout="topleft" />
<menu_item_check
label="Block Voice"
layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
index a5e6506463..9ece4aead8 100644
--- a/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
+++ b/indra/newview/skins/default/xui/en/panel_outfit_edit.xml
@@ -211,7 +211,7 @@
image_selected="Toolbar_Middle_Selected"
image_unselected="Toolbar_Middle_Off"
layout="topleft"
- name="trash_btn"
+ name="remove_from_outfit_btn"
right="-1"
top="1"
width="31" />