diff options
-rw-r--r-- | indra/newview/llagentwearables.cpp | 78 | ||||
-rw-r--r-- | indra/newview/llfloatersearch.cpp | 14 | ||||
-rw-r--r-- | indra/newview/llfloatersearch.h | 2 | ||||
-rw-r--r-- | indra/newview/llmediactrl.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llteleporthistory.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_customize.xml | 10 |
8 files changed, 57 insertions, 57 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 79ba3fb51d..dc1598aacd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -100,6 +100,7 @@ public: LLLibraryOutfitsFetch() : mCurrFetchStep(LOFS_FOLDER), mOutfitsPopulated(false) {} ~LLLibraryOutfitsFetch() {} virtual void done(); + void doneIdle(); protected: void folderDone(void); void outfitsDone(void); @@ -2084,51 +2085,50 @@ void LLAgentWearables::populateMyOutfitsFolder(void) { LLLibraryOutfitsFetch* outfits = new LLLibraryOutfitsFetch(); - // What we do here is get the complete information on the items in - // the inventory, and set up an observer that will wait for that to - // happen. + // Get the complete information on the items in the inventory and + // setup an observer that will wait for that to happen. LLInventoryFetchDescendentsObserver::folder_ref_t folders; const LLUUID my_outfits_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS); folders.push_back(my_outfits_id); + gInventory.addObserver(outfits); outfits->fetchDescendents(folders); - if(outfits->isEverythingComplete()) - { - // everything is already here - call done. - outfits->done(); - } - else - { - // it's all on it's way - add an observer, and the inventory - // will call done for us when everything is here. - gInventory.addObserver(outfits); - } } void LLLibraryOutfitsFetch::done() { - switch (mCurrFetchStep){ + // Delay this until idle() routine, since it's a heavy operation and + // we also can't have it run within notifyObservers. + doOnIdle(boost::bind(&LLLibraryOutfitsFetch::doneIdle,this)); + gInventory.removeObserver(this); // Prevent doOnIdle from being added twice. +} + +void LLLibraryOutfitsFetch::doneIdle() +{ + gInventory.addObserver(this); // Add this back in since it was taken out during ::done() + switch (mCurrFetchStep) + { case LOFS_FOLDER: - mCurrFetchStep = LOFS_OUTFITS; folderDone(); break; case LOFS_OUTFITS: - mCurrFetchStep = LOFS_CONTENTS; outfitsDone(); break; case LOFS_CONTENTS: - // No longer need this observer hanging around. - gInventory.removeObserver(this); contentsDone(); break; default: - gInventory.removeObserver(this); - delete this; - return; + llwarns << "Got invalid state for outfit fetch: " << mCurrFetchStep << llendl; + mOutfitsPopulated = TRUE; + break; } + + // We're completely done. Cleanup. if (mOutfitsPopulated) { + gInventory.removeObserver(this); delete this; + return; } } @@ -2142,7 +2142,6 @@ void LLLibraryOutfitsFetch::folderDone(void) if (cat_array.count() > 0 || wearable_array.count() > 0) { mOutfitsPopulated = true; - gInventory.removeObserver(this); return; } @@ -2151,17 +2150,11 @@ void LLLibraryOutfitsFetch::folderDone(void) mCompleteFolders.clear(); - // What we do here is get the complete information on the items in - // the inventory, and set up an observer that will wait for that to - // happen. + // Get the complete information on the items in the inventory. LLInventoryFetchDescendentsObserver::folder_ref_t folders; folders.push_back(library_clothing_id); + mCurrFetchStep = LOFS_OUTFITS; fetchDescendents(folders); - if(isEverythingComplete()) - { - // everything is already here - call done. - outfitsDone(); - } } void LLLibraryOutfitsFetch::outfitsDone(void) @@ -2172,20 +2165,23 @@ void LLLibraryOutfitsFetch::outfitsDone(void) LLInventoryModel::EXCLUDE_TRASH); LLInventoryFetchDescendentsObserver::folder_ref_t folders; - for(S32 i = 0; i < cat_array.count(); ++i) + + llassert(cat_array.count() > 0); + for (LLInventoryModel::cat_array_t::const_iterator iter = cat_array.begin(); + iter != cat_array.end(); + ++iter) { - if (cat_array.get(i)->getName() != "More Outfits" && cat_array.get(i)->getName() != "Ruth"){ - folders.push_back(cat_array.get(i)->getUUID()); - mOutfits.push_back( std::make_pair(cat_array.get(i)->getUUID(), cat_array.get(i)->getName() )); + const LLViewerInventoryCategory *cat = iter->get(); + if (cat->getName() != "More Outfits" && cat->getName() != "Ruth") + { + folders.push_back(cat->getUUID()); + mOutfits.push_back(std::make_pair(cat->getUUID(), cat->getName())); } } mCompleteFolders.clear(); + + mCurrFetchStep = LOFS_CONTENTS; fetchDescendents(folders); - if(isEverythingComplete()) - { - // everything is already here - call done. - contentsDone(); - } } void LLLibraryOutfitsFetch::contentsDone(void) @@ -2197,9 +2193,7 @@ void LLLibraryOutfitsFetch::contentsDone(void) LLUUID folder_id = gInventory.createNewCategory(parent_id, LLFolderType::FT_OUTFIT, mOutfits[i].second); - LLAppearanceManager::getInstance()->shallowCopyCategory(mOutfits[i].first, folder_id, NULL); - gInventory.notifyObservers(); } mOutfitsPopulated = true; } diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 595d84f9f0..c6d9fee630 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -77,6 +77,15 @@ void LLFloaterSearch::onOpen(const LLSD& key) search(key); } +void LLFloaterSearch::onClose(bool app_quitting) +{ + if (! app_quitting) + { + // Show the blank home page ready for the next onOpen() + mBrowser->navigateHome(); + } +} + void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event) { switch (event) @@ -110,6 +119,11 @@ void LLFloaterSearch::search(const LLSD &key) return; } + // display the blank home page first, to clear the display of + // any previous search results while the new results load. + // The home page is set in floater_search.xml as start_url. + mBrowser->navigateHome(); + // reset the god level warning as we're sending the latest state childHide("refresh_search"); mSearchGodLevel = gAgent.getGodLevel(); diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index ba817adf7f..0a8d9bbe36 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -59,6 +59,8 @@ public: /// see search() for details on the key parameter. /*virtual*/ void onOpen(const LLSD& key); + /*virtual*/ void onClose(bool app_quitting); + /// perform a search with the specific search term. /// The key should be a map that can contain the following keys: /// - "id": specifies the text phrase to search for diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 199bd966ef..93f926b5d0 100644 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -39,7 +39,6 @@ #include "llfloaterworldmap.h" #include "lluictrlfactory.h" #include "llurldispatcher.h" -#include "llurlsimstring.h" #include "llviewborder.h" #include "llviewercontrol.h" #include "llviewermedia.h" diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a9c7b908ed..87d101b00f 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -62,7 +62,6 @@ #include "llviewermenu.h" // for handle_preferences() #include "llviewernetwork.h" #include "llviewerwindow.h" // to link into child list -#include "llurlsimstring.h" #include "lluictrlfactory.h" #include "llhttpclient.h" #include "llweb.h" @@ -229,8 +228,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLComboBox* combo = getChild<LLComboBox>("start_location_combo"); - LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); std::string sim_string = LLURLSimString::sInstance.mSimString; + if(sim_string.empty()) + { + LLURLSimString::setString(gSavedSettings.getString("LoginLocation")); + } + if (!sim_string.empty()) { // Replace "<Type region name>" with this region name diff --git a/indra/newview/llteleporthistory.cpp b/indra/newview/llteleporthistory.cpp index 1315887c37..ce00dec802 100644 --- a/indra/newview/llteleporthistory.cpp +++ b/indra/newview/llteleporthistory.cpp @@ -39,7 +39,6 @@ #include "llagent.h" #include "llslurl.h" -#include "llurlsimstring.h" #include "llviewercontrol.h" // for gSavedSettings #include "llviewerparcelmgr.h" #include "llviewerregion.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5c86822787..1400253176 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -182,7 +182,6 @@ #include "llworldmapview.h" #include "pipeline.h" #include "llappviewer.h" -#include "llurlsimstring.h" #include "llviewerdisplay.h" #include "llspatialpartition.h" #include "llviewerjoystick.h" diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 94686f0bb0..0dc7d62b19 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -12,16 +12,6 @@ title="APPEARANCE" top_delta="-185" width="524"> - <check_box - enabled="true" - height="23" - label="Show Attachments in Previews" - layout="topleft" - left="110" - name="show attachments" - tool_tip="Display attachments on your avatar in the preview panels below." - top="20" - width="146" /> <tab_container height="517" layout="topleft" |