diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 10:50:28 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-04-15 10:50:28 +0100 |
commit | 6690cd65c4e9bf6680f4f0b9ea2d38a80eb3d268 (patch) | |
tree | 41c7d5fbcbd875152db63e4fa1137e7d8dd67588 /indra/newview | |
parent | 5c29fa93838b4904fb236190bfe621cdfd33503c (diff) | |
parent | 9f0f610682e0bcceb88eaddcb7a02acfcf3d05ce (diff) |
merge from viewer-trunk
Diffstat (limited to 'indra/newview')
118 files changed, 3115 insertions, 1977 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 47fde08a9d..4158899446 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 @@ -438,6 +437,7 @@ set(viewer_SOURCE_FILES lltracker.cpp lltransientdockablefloater.cpp lltransientfloatermgr.cpp + llpanelgenerictip.cpp lluilistener.cpp lluploaddialog.cpp llurl.cpp @@ -649,7 +649,6 @@ set(viewer_HEADER_FILES llfirstuse.h llflexibleobject.h llfloaterabout.h - llfloateractivespeakers.h llfloateranimpreview.h llfloaterauction.h llfloateravatarpicker.h @@ -940,6 +939,7 @@ set(viewer_HEADER_FILES lltracker.h lltransientdockablefloater.h lltransientfloatermgr.h + llpanelgenerictip.h lluiconstants.h lluilistener.h lluploaddialog.h @@ -1162,6 +1162,9 @@ if (WINDOWS) res/toolpickobject2.cur res/toolpickobject3.cur res/toolpipette.cur + res/toolbuy.cur + res/toolopen.cur + res/toolsit.cur ) set_source_files_properties(${viewer_RESOURCE_FILES} diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 893162e189..3c0a0efcbe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4,13 +4,14 @@ <key>AFKTimeout</key> <map> <key>Comment</key> - <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never)</string> + <string>Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never). + Valid values are: 0, 120, 300, 600, 1800</string> <key>Persist</key> <integer>1</integer> <key>Type</key> <string>S32</string> <key>Value</key> - <real>0</real> + <real>300</real> </map> <key>AdvanceSnapshot</key> <map> @@ -5395,6 +5396,17 @@ <key>Value</key> <integer>1</integer> </map> + <key>ParticipantListShowIcons</key> + <map> + <key>Comment</key> + <string>Show/hide people icons in participant list</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>1</integer> + </map> <key>PerAccountSettingsFile</key> <map> <key>Comment</key> @@ -8568,17 +8580,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> @@ -8590,17 +8591,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> @@ -10679,6 +10669,28 @@ <key>Value</key> <real>50.0</real> </map> + <key>WellIconFlashCount</key> + <map> + <key>Comment</key> + <string>Number of flashes of IM Well and Notification Well icons after which flashing buttons stay lit up. Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>S32</string> + <key>Value</key> + <integer>3</integer> + </map> + <key>WellIconFlashPeriod</key> + <map> + <key>Comment</key> + <string>Period at which IM Well and Notification Well icons flash (seconds). Requires restart.</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>F32</string> + <key>Value</key> + <real>0.25</real> + </map> <key>WindLightUseAtmosShaders</key> <map> <key>Comment</key> @@ -10965,5 +10977,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 e0f1d5348d..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; @@ -593,6 +595,55 @@ bool LLAppearanceMgr::getBaseOutfitName(std::string& name) return false; } +const LLUUID LLAppearanceMgr::getBaseOutfitUUID() +{ + const LLViewerInventoryItem* outfit_link = getBaseOutfitLink(); + if (!outfit_link || !outfit_link->getIsLinkType()) return LLUUID::null; + + const LLViewerInventoryCategory* outfit_cat = outfit_link->getLinkedCategory(); + if (!outfit_cat) return LLUUID::null; + + if (outfit_cat->getPreferredType() != LLFolderType::FT_OUTFIT) + { + llwarns << "Expected outfit type:" << LLFolderType::FT_OUTFIT << " but got type:" << outfit_cat->getType() << " for folder name:" << outfit_cat->getName() << llendl; + return LLUUID::null; + } + + return outfit_cat->getUUID(); +} + +bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_update) +{ + if (item_id_to_wear.isNull()) return false; + + //only the item from a user's inventory is allowed + if (!gInventory.isObjectDescendentOf(item_id_to_wear, gInventory.getRootFolderID())) return false; + + LLViewerInventoryItem* item_to_wear = gInventory.getItem(item_id_to_wear); + if (!item_to_wear) return false; + + switch (item_to_wear->getType()) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + // Don't wear anything until initial wearables are loaded, can + // destroy clothing items. + if (!gAgentWearables.areWearablesLoaded()) + { + LLNotificationsUtil::add("CanNotChangeAppearanceUntilLoaded"); + return false; + } + addCOFItemLink(item_to_wear, do_update); + break; + case LLAssetType::AT_OBJECT: + rez_attachment(item_to_wear, NULL); + break; + default: return false;; + } + + return true; +} + // Update appearance from outfit folder. void LLAppearanceMgr::changeOutfit(bool proceed, const LLUUID& category, bool append) { @@ -1516,6 +1567,61 @@ void LLAppearanceMgr::onFirstFullyVisible() autopopulateOutfits(); } +bool LLAppearanceMgr::updateBaseOutfit() +{ + const LLUUID base_outfit_id = getBaseOutfitUUID(); + if (base_outfit_id.isNull()) return false; + + // in a Base Outfit we do not remove items, only links + purgeCategory(base_outfit_id, false); + + //COF contains only links so we copy to the Base Outfit only links + shallowCopyCategoryContents(getCOF(), base_outfit_id, NULL); + + return true; +} + +void LLAppearanceMgr::wearBaseOutfit() +{ + const LLUUID& base_outfit_id = getBaseOutfitUUID(); + if (base_outfit_id.isNull()) return; + + updateCOF(base_outfit_id); +} + +void LLAppearanceMgr::removeItemFromAvatar(const LLUUID& id_to_remove) +{ + LLViewerInventoryItem * item_to_remove = gInventory.getItem(id_to_remove); + if (!item_to_remove) return; + + switch (item_to_remove->getType()) + { + case LLAssetType::AT_CLOTHING: + if (get_is_item_worn(id_to_remove)) + { + //*TODO move here the exact removing code from LLWearableBridge::removeItemFromAvatar in the future + LLWearableBridge::removeItemFromAvatar(item_to_remove); + } + break; + case LLAssetType::AT_OBJECT: + gMessageSystem->newMessageFast(_PREHASH_DetachAttachmentIntoInv); + gMessageSystem->nextBlockFast(_PREHASH_ObjectData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, item_to_remove->getLinkedUUID()); + gMessageSystem->sendReliable( gAgent.getRegion()->getHost()); + + { + // this object might have been selected, so let the selection manager know it's gone now + LLViewerObject *found_obj = gObjectList.findObject(item_to_remove->getLinkedUUID()); + if (found_obj) + { + LLSelectMgr::getInstance()->remove(found_obj); + }; + } + default: break; + } +} + //#define DUMP_CAT_VERBOSE void LLAppearanceMgr::dumpCat(const LLUUID& cat_id, const std::string& msg) diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 40b8844731..7e35919892 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -75,6 +75,12 @@ public: const LLViewerInventoryItem *getBaseOutfitLink(); bool getBaseOutfitName(std::string &name); + // find the UUID of the currently worn outfit (Base Outfit) + const LLUUID getBaseOutfitUUID(); + + // Wear/attach an item (from a user's inventory) on the agent + bool wearItemOnAvatar(const LLUUID& item_to_wear, bool do_update = true); + // Update the displayed outfit name in UI. void updatePanelOutfitName(const std::string& name); @@ -123,6 +129,15 @@ public: // Create initial outfits from library. void autopopulateOutfits(); + void wearBaseOutfit(); + + // Overrides the base outfit with the content from COF + // @return false if there is no base outfit + bool updateBaseOutfit(); + + //Remove clothing or detach an object from the agent (a bodypart cannot be removed) + void removeItemFromAvatar(const LLUUID& item_id); + protected: LLAppearanceMgr(); ~LLAppearanceMgr(); @@ -244,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) { } @@ -268,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) { } @@ -297,7 +315,6 @@ public: return; } - CallAfterCategoryFetchStage2<T> *stage2 = new CallAfterCategoryFetchStage2<T>(mCallable); uuid_vec_t ids; for(S32 i = 0; i < count; ++i) { @@ -307,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(); @@ -328,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/llavataractions.cpp b/indra/newview/llavataractions.cpp index c85c72837c..764d54a987 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -35,6 +35,8 @@ #include "llavataractions.h" +#include "boost/lambda/lambda.hpp" // for lambda::constant + #include "llsd.h" #include "lldarray.h" #include "llnotifications.h" @@ -46,6 +48,7 @@ #include "llappviewer.h" // for gLastVersionChannel #include "llcachename.h" #include "llcallingcard.h" // for LLAvatarTracker +#include "llfloateravatarpicker.h" // for LLFloaterAvatarPicker #include "llfloatergroupinvite.h" #include "llfloatergroups.h" #include "llfloaterreg.h" @@ -54,6 +57,7 @@ #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llimview.h" // for gIMMgr #include "llmutelist.h" +#include "llnotificationsutil.h" // for LLNotificationsUtil #include "llrecentpeople.h" #include "llsidetray.h" #include "lltrans.h" @@ -425,6 +429,16 @@ void LLAvatarActions::share(const LLUUID& id) } } +//static +void LLAvatarActions::shareWithAvatars() +{ + LLFloaterAvatarPicker* picker = + LLFloaterAvatarPicker::show(NULL, FALSE, TRUE); + picker->setOkBtnEnableCb(boost::lambda::constant(false)); + + LLNotificationsUtil::add("ShareNotification"); +} + // static void LLAvatarActions::toggleBlock(const LLUUID& id) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 9d8b4b4e23..d106a83eea 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -114,6 +114,11 @@ public: static void share(const LLUUID& id); /** + * Share items with the picked avatars. + */ + static void shareWithAvatars(); + + /** * Block/unblock the avatar. */ static void toggleBlock(const LLUUID& id); diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 407c5b6153..c7a5691d70 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -32,13 +32,18 @@ #include "llviewerprecompiledheaders.h" +// common +#include "lltrans.h" + #include "llavatarlist.h" #include "llagentdata.h" // for comparator // newview +#include "llavatariconctrl.h" #include "llcallingcard.h" // for LLAvatarTracker #include "llcachename.h" #include "llrecentpeople.h" +#include "lltextutil.h" #include "lluuid.h" #include "llvoiceclient.h" #include "llviewercontrol.h" // for gSavedSettings @@ -193,6 +198,18 @@ void LLAvatarList::setDirty(bool val /*= true*/, bool force_refresh /*= false*/) } } +void LLAvatarList::addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name) +{ + LL_DEBUGS("Avaline") << "Adding avaline item into the list: " << item_name << "|" << item_id << ", session: " << session_id << LL_ENDL; + LLAvalineListItem* item = new LLAvalineListItem; + item->setAvatarId(item_id, session_id, true, false); + item->setName(item_name); + + addItem(item, item_id); + mIDs.push_back(item_id); + sort(); +} + ////////////////////////////////////////////////////////////////////////// // PROTECTED SECTION ////////////////////////////////////////////////////////////////////////// @@ -471,3 +488,61 @@ bool LLAvatarItemAgentOnTopComparator::doCompare(const LLAvatarListItem* avatar_ } return LLAvatarItemNameComparator::doCompare(avatar_item1,avatar_item2); } + +/************************************************************************/ +/* class LLAvalineListItem */ +/************************************************************************/ +LLAvalineListItem::LLAvalineListItem(bool hide_number/* = true*/) : LLAvatarListItem(false) +, mIsHideNumber(hide_number) +{ + // should not use buildPanel from the base class to ensure LLAvalineListItem::postBuild is called. + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml"); +} + +BOOL LLAvalineListItem::postBuild() +{ + BOOL rv = LLAvatarListItem::postBuild(); + + if (rv) + { + setOnline(true); + showLastInteractionTime(false); + setShowProfileBtn(false); + setShowInfoBtn(false); + mAvatarIcon->setValue("Avaline_Icon"); + mAvatarIcon->setToolTip(std::string("")); + } + return rv; +} + +// to work correctly this method should be called AFTER setAvatarId for avaline callers with hidden phone number +void LLAvalineListItem::setName(const std::string& name) +{ + if (mIsHideNumber) + { + static U32 order = 0; + typedef std::map<LLUUID, U32> avaline_callers_nums_t; + static avaline_callers_nums_t mAvalineCallersNums; + + llassert(getAvatarId() != LLUUID::null); + + const LLUUID &uuid = getAvatarId(); + + if (mAvalineCallersNums.find(uuid) == mAvalineCallersNums.end()) + { + mAvalineCallersNums[uuid] = ++order; + LL_DEBUGS("Avaline") << "Set name for new avaline caller: " << uuid << ", order: " << order << LL_ENDL; + } + LLStringUtil::format_map_t args; + args["[ORDER]"] = llformat("%u", mAvalineCallersNums[uuid]); + std::string hidden_name = LLTrans::getString("AvalineCaller", args); + + LL_DEBUGS("Avaline") << "Avaline caller: " << uuid << ", name: " << hidden_name << LL_ENDL; + LLAvatarListItem::setName(hidden_name); + } + else + { + const std::string& formatted_phone = LLTextUtil::formatPhoneNumber(name); + LLAvatarListItem::setName(formatted_phone); + } +} diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 0203617867..528f796b8b 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -96,6 +96,8 @@ public: virtual S32 notifyParent(const LLSD& info); + void addAvalineItem(const LLUUID& item_id, const LLUUID& session_id, const std::string& item_name); + protected: void refresh(); @@ -175,4 +177,27 @@ protected: virtual bool doCompare(const LLAvatarListItem* avatar_item1, const LLAvatarListItem* avatar_item2) const; }; +/** + * Represents Avaline caller in Avatar list in Voice Control Panel and group chats. + */ +class LLAvalineListItem : public LLAvatarListItem +{ +public: + + /** + * Constructor + * + * @param hide_number - flag indicating if number should be hidden. + * In this case It will be shown as "Avaline Caller 1", "Avaline Caller 1", etc. + */ + LLAvalineListItem(bool hide_number = true); + + /*virtual*/ BOOL postBuild(); + + /*virtual*/ void setName(const std::string& name); + +private: + bool mIsHideNumber; +}; + #endif // LL_LLAVATARLIST_H diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 44f88cce29..2a51eeacfc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -212,21 +212,25 @@ void LLAvatarListItem::setState(EItemState item_style) mAvatarIcon->setColor(item_icon_color_map[item_style]); } -void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes) +void LLAvatarListItem::setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes/* = false*/, bool is_resident/* = true*/) { if (mAvatarId.notNull()) LLAvatarTracker::instance().removeParticularFriendObserver(mAvatarId, this); mAvatarId = id; - mAvatarIcon->setValue(id); mSpeakingIndicator->setSpeakerId(id, session_id); // We'll be notified on avatar online status changes if (!ignore_status_changes && mAvatarId.notNull()) LLAvatarTracker::instance().addParticularFriendObserver(mAvatarId, this); - // Set avatar name. - gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3)); + if (is_resident) + { + mAvatarIcon->setValue(id); + + // Set avatar name. + gCacheName->get(id, FALSE, boost::bind(&LLAvatarListItem::onNameCache, this, _2, _3)); + } } void LLAvatarListItem::showLastInteractionTime(bool show) diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 2db6484a30..3ba2c7a3e3 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -100,7 +100,7 @@ public: void setName(const std::string& name); void setHighlight(const std::string& highlight); void setState(EItemState item_style); - void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false); + void setAvatarId(const LLUUID& id, const LLUUID& session_id, bool ignore_status_changes = false, bool is_resident = true); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly void setShowProfileBtn(bool show); diff --git a/indra/newview/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 bed5c01d7a..d15c5f9bf4 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -189,7 +189,7 @@ void LLCallFloater::draw() // Seems this is a problem somewhere in Voice Client (LLVoiceClient::participantAddedEvent) // onChange(); - bool is_moderator_muted = gVoiceClient->getIsModeratorMuted(gAgentID); + bool is_moderator_muted = LLVoiceClient::getInstance()->getIsModeratorMuted(gAgentID); if (mIsModeratorMutedVoice != is_moderator_muted) { @@ -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); @@ -470,7 +470,7 @@ void LLCallFloater::updateAgentModeratorState() static void get_voice_participants_uuids(uuid_vec_t& speakers_uuids) { // Get a list of participants from VoiceClient - LLVoiceClient::participantMap *voice_map = gVoiceClient->getParticipantList(); + LLVoiceClient::participantMap *voice_map = LLVoiceClient::getInstance()->getParticipantList(); if (voice_map) { for (LLVoiceClient::participantMap::const_iterator iter = voice_map->begin(); @@ -601,10 +601,13 @@ void LLCallFloater::updateNotInVoiceParticipantState(LLAvatarListItem* item) } } break; - case STATE_INVITED: case STATE_LEFT: // nothing to do. These states should not be changed. break; + case STATE_INVITED: + // If avatar was invited into group chat and went offline it is still exists in mSpeakerStateMap + // If it goes online it will be rendered as JOINED via LAvatarListItem. + // Lets update its visual representation. See EXT-6660 case STATE_UNKNOWN: // If an avatarID is not found in a speakers list from VoiceClient and // a panel with this ID has an UNKNOWN status this means that this person @@ -725,7 +728,7 @@ void LLCallFloater::connectToChannel(LLVoiceChannel* channel) void LLCallFloater::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state) { // check is voice operational and if it doesn't work hide VCP (EXT-4397) - if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + if(LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking()) { updateState(new_state); } diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 67b7ac5383..aef36b677c 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -2,25 +2,31 @@ * @file llchatitemscontainer.cpp * @brief chat history scrolling panel implementation * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -38,8 +44,6 @@ #include "llviewercontrol.h" #include "llagentdata.h" -#include "llslurl.h" - static const S32 msg_left_offset = 10; static const S32 msg_right_offset = 10; static const S32 msg_height_pad = 5; @@ -186,8 +190,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification) style_params_name.font.name(font_name); style_params_name.font.size(font_style_size); - style_params_name.link_href = LLSLURL("agent",mFromID,"about").getSLURLString(); - msg_text->appendText(str_sender, FALSE, style_params_name); } @@ -320,14 +322,12 @@ void LLNearbyChatToastPanel::draw() if(icon) { icon->setDrawTooltip(mSourceType == CHAT_SOURCE_AGENT); - if(mSourceType == CHAT_SOURCE_OBJECT) - icon->setValue(LLSD("OBJECT_Icon")); + if(mSourceType == CHAT_SOURCE_AGENT) + icon->setValue(mFromID); else if(mSourceType == CHAT_SOURCE_SYSTEM) icon->setValue(LLSD("SL_Logo")); - else if(mSourceType == CHAT_SOURCE_AGENT) - icon->setValue(mFromID); - else if(!mFromID.isNull()) - icon->setValue(mFromID); + else + icon->setValue(LLSD("OBJECT_Icon")); } mIsDirty = false; } diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index e39384b7b2..05d3d70c74 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -131,8 +131,6 @@ LLSysWellChiclet::Params::Params() : button("button") , unread_notifications("unread_notifications") , max_displayed_count("max_displayed_count", 99) -, flash_to_lit_count("flash_to_lit_count", 3) -, flash_period("flash_period", 0.5F) { button.name("button"); button.tab_stop(FALSE); @@ -152,7 +150,13 @@ LLSysWellChiclet::LLSysWellChiclet(const Params& p) mButton = LLUICtrlFactory::create<LLButton>(button_params); addChild(mButton); - mFlashToLitTimer = new FlashToLitTimer(p.flash_to_lit_count, p.flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); + // use settings from settings.xml to be able change them via Debug settings. See EXT-5973. + // Due to Timer is implemented as derived class from EventTimer it is impossible to change period + // in runtime. So, both settings are made as required restart. + static S32 flash_to_lit_count = gSavedSettings.getS32("WellIconFlashCount"); + static F32 flash_period = gSavedSettings.getF32("WellIconFlashPeriod"); + + mFlashToLitTimer = new FlashToLitTimer(flash_to_lit_count, flash_period, boost::bind(&LLSysWellChiclet::changeLitState, this)); } LLSysWellChiclet::~LLSysWellChiclet() diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index a6e12006a1..97f494b817 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -2,25 +2,31 @@ * @file llchiclet.h * @brief LLChiclet class header file * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -422,31 +428,12 @@ public: virtual void setToggleState(bool toggle); - /** - * Displays popup menu. - */ - virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - protected: LLIMChiclet(const LLIMChiclet::Params& p); protected: - /** - * Creates chiclet popup menu. - */ - virtual void createPopupMenu() = 0; - - /** - * Enables/disables menus. - */ - virtual void updateMenuItems() {}; - - bool canCreateMenu(); - - LLMenuGL* mPopupMenu; - bool mShowSpeaker; bool mCounterEnabled; /* initial width of chiclet, should not include counter or speaker width */ @@ -532,6 +519,11 @@ protected: */ virtual void onMenuItemClicked(const LLSD& user_data); + /** + * Displays popup menu. + */ + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + /** * Enables/disables menus based on relationship with other participant. * Enables/disables "show session" menu item depending on visible IM floater existence. @@ -541,6 +533,7 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; + LLMenuGL* mPopupMenu; }; /** @@ -605,6 +598,11 @@ protected: virtual void onMenuItemClicked(const LLSD& user_data); /** + * Displays popup menu. + */ + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + /** * Finds a current speaker and resets the SpeakerControl with speaker's ID */ /*virtual*/ void switchToCurrentSpeaker(); @@ -612,6 +610,7 @@ protected: private: LLChicletAvatarIconCtrl* mChicletIconCtrl; + LLMenuGL* mPopupMenu; }; /** @@ -648,16 +647,6 @@ protected: LLScriptChiclet(const Params&); friend class LLUICtrlFactory; - /** - * Creates chiclet popup menu. - */ - virtual void createPopupMenu(); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - private: LLIconCtrl* mChicletIconCtrl; @@ -696,16 +685,6 @@ protected: LLInvOfferChiclet(const Params&); friend class LLUICtrlFactory; - /** - * Creates chiclet popup menu. - */ - virtual void createPopupMenu(); - - /** - * Processes clicks on chiclet popup menu. - */ - virtual void onMenuItemClicked(const LLSD& user_data); - private: LLChicletInvOfferIconCtrl* mChicletIconCtrl; }; @@ -788,9 +767,15 @@ protected: */ virtual void updateMenuItems(); + /** + * Displays popup menu. + */ + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + private: LLChicletGroupIconCtrl* mChicletIconCtrl; + LLMenuGL* mPopupMenu; }; /** @@ -915,9 +900,6 @@ protected: class LLNotificationChiclet : public LLSysWellChiclet { friend class LLUICtrlFactory; -public: - struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{}; - protected: LLNotificationChiclet(const Params& p); diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 2cb0cdf368..d1e99fbd61 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -38,6 +38,8 @@ #include "llcallingcard.h" #include "llfocusmgr.h" #include "llfloaterreg.h" +#include "llimview.h" // for gIMMgr +#include "lltooldraganddrop.h" // for LLToolDragAndDrop #include "llviewercontrol.h" #include "llworld.h" @@ -370,6 +372,68 @@ void LLFloaterAvatarPicker::setAllowMultiple(BOOL allow_multiple) getChild<LLScrollListCtrl>("Friends")->setAllowMultipleSelection(allow_multiple); } +LLScrollListCtrl* LLFloaterAvatarPicker::getActiveList() +{ + std::string acvtive_panel_name; + LLScrollListCtrl* list = NULL; + LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs"); + if(active_panel) + { + acvtive_panel_name = active_panel->getName(); + } + if(acvtive_panel_name == "SearchPanel") + { + list = getChild<LLScrollListCtrl>("SearchResults"); + } + else if(acvtive_panel_name == "NearMePanel") + { + list = getChild<LLScrollListCtrl>("NearMe"); + } + else if (acvtive_panel_name == "FriendsPanel") + { + list = getChild<LLScrollListCtrl>("Friends"); + } + return list; +} + +BOOL LLFloaterAvatarPicker::handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, EDragAndDropType cargo_type, + void *cargo_data, EAcceptance *accept, + std::string& tooltip_msg) +{ + LLScrollListCtrl* list = getActiveList(); + if(list) + { + LLRect rc_list; + LLRect rc_point(x,y,x,y); + if (localRectToOtherView(rc_point, &rc_list, list)) + { + // Keep selected only one item + list->deselectAllItems(TRUE); + list->selectItemAt(rc_list.mLeft, rc_list.mBottom, mask); + LLScrollListItem* selection = list->getFirstSelected(); + if (selection) + { + LLUUID session_id = LLUUID::null; + LLUUID dest_agent_id = selection->getUUID(); + std::string avatar_name = selection->getColumn(0)->getValue().asString(); + if (dest_agent_id.notNull() && dest_agent_id != gAgentID) + { + if (drop) + { + // Start up IM before give the item + session_id = gIMMgr->addSession(avatar_name, IM_NOTHING_SPECIAL, dest_agent_id); + } + return LLToolDragAndDrop::handleGiveDragAndDrop(dest_agent_id, session_id, drop, + cargo_type, cargo_data, accept); + } + } + } + } + *accept = ACCEPT_NO; + return TRUE; +} + // static void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void**) { @@ -387,8 +451,8 @@ void LLFloaterAvatarPicker::processAvatarPickerReply(LLMessageSystem* msg, void* LLFloaterAvatarPicker* floater = LLFloaterReg::findTypedInstance<LLFloaterAvatarPicker>("avatar_picker"); - // these are not results from our last request - if (query_id != floater->mQueryID) + // floater is closed or these are not results from our last request + if (NULL == floater || query_id != floater->mQueryID) { return; } diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index 860f3930ef..e69b814f9f 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -37,6 +37,8 @@ #include <vector> +class LLScrollListCtrl; + class LLFloaterAvatarPicker : public LLFloater { public: @@ -59,6 +61,11 @@ public: static void processAvatarPickerReply(class LLMessageSystem* msg, void**); + BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, + BOOL drop, EDragAndDropType cargo_type, + void *cargo_data, EAcceptance *accept, + std::string& tooltip_msg); + private: void editKeystroke(class LLLineEditor* caller, void* user_data); @@ -77,6 +84,7 @@ private: void find(); void setAllowMultiple(BOOL allow_multiple); + LLScrollListCtrl* getActiveList(); virtual void draw(); virtual BOOL handleKeyHere(KEY key, MASK mask); diff --git a/indra/newview/llfloateravatartextures.cpp b/indra/newview/llfloateravatartextures.cpp index 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/llfloaterevent.cpp b/indra/newview/llfloaterevent.cpp index 97ebab3425..560cc29080 100644 --- a/indra/newview/llfloaterevent.cpp +++ b/indra/newview/llfloaterevent.cpp @@ -113,7 +113,6 @@ BOOL LLFloaterEvent::postBuild() mTBDuration = getChild<LLTextBox>("event_duration"); mTBDesc = getChild<LLExpandableTextBox>("event_desc"); - mTBDesc->setEnabled(FALSE); mTBRunBy = getChild<LLTextBox>("event_runby"); mTBLocation = getChild<LLTextBox>("event_location"); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 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/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 03389e62d7..a6a8194685 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -168,6 +168,8 @@ public: void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); LLFloaterPostcard* savePostcard(); + void confirmSavingTexture(bool set_as_profile_pic = false); + bool onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic); void saveTexture(bool set_as_profile_pic = false); BOOL saveLocal(); void saveWeb(std::string url); @@ -983,6 +985,26 @@ void profile_pic_upload_callback(const LLUUID& uuid) floater->setAsProfilePic(uuid); } +void LLSnapshotLivePreview::confirmSavingTexture(bool set_as_profile_pic) +{ + LLSD args; + args["AMOUNT"] = "10"; // *TODO: there's currently no way to avoid hardcoding the upload price + LLNotificationsUtil::add("UploadConfirmation", args, LLSD(), + boost::bind(&LLSnapshotLivePreview::onSavingTextureConfirmed, this, _1, _2, set_as_profile_pic)); +} + +bool LLSnapshotLivePreview::onSavingTextureConfirmed(const LLSD& notification, const LLSD& response, bool set_as_profile_pic) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + if (option == 0) + { + saveTexture(set_as_profile_pic); + } + + return false; +} + void LLSnapshotLivePreview::saveTexture(bool set_as_profile_pic) { @@ -1746,7 +1768,7 @@ void LLFloaterSnapshot::Impl::onCommitProfilePic(LLFloaterSnapshot* view) if(previewp) { - previewp->saveTexture(true); + previewp->confirmSavingTexture(true); } } @@ -1768,7 +1790,7 @@ void LLFloaterSnapshot::Impl::onCommitSnapshot(LLFloaterSnapshot* view, LLSnapsh } else if (type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE) { - previewp->saveTexture(); + previewp->confirmSavingTexture(); } else if (type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD) { 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/llimfloater.cpp b/indra/newview/llimfloater.cpp index 3ec8d11fb0..19dbc564d1 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -499,8 +499,8 @@ void LLIMFloater::setVisible(BOOL visible) { //only if floater was construced and initialized from xml updateMessages(); - //prevent steal focus when IM opened in multitab mode - if (!isChatMultiTab()) + //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781) + if (!isChatMultiTab() || hasFocus()) { mInputEditor->setFocus(TRUE); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index e0f155a6a9..10146ee9d3 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -297,7 +297,7 @@ void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::ES LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); break; case LLVoiceChannel::STATE_CONNECTED : - message = other_avatar_name + " " + joined_call; + message = LLTrans::getString("answered_call"); LLIMModel::getInstance()->addMessage(mSessionID, SYSTEM_FROM, LLUUID::null, message); default: break; @@ -1713,7 +1713,6 @@ void LLOutgoingCallDialog::show(const LLSD& key) channel_name = LLTextUtil::formatPhoneNumber(channel_name); } childSetTextArg("nearby", "[VOICE_CHANNEL_NAME]", channel_name); - childSetTextArg("nearby_P2P_by_other", "[VOICE_CHANNEL_NAME]", mPayload["disconnected_channel_name"].asString()); // skipping "You will now be reconnected to nearby" in notification when call is ended by disabling voice, // so no reconnection to nearby chat happens (EXT-4397) @@ -3078,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 b552b5ac07..3071ef3b71 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -672,6 +672,11 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -1031,6 +1036,38 @@ bool LLInvFVBridge::isInOutfitsSidePanel() const return outfit_panel->isTabPanel(my_panel); } +bool LLInvFVBridge::canShare() +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return false; + } + + LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + bool allowed = false; + allowed = LLInventoryCollectFunctor::itemTransferCommonlyAllowed(item); + if (allowed && + !item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + { + allowed = false; + } + if (allowed && + !item->getPermissions().allowCopyBy(gAgent.getID())) + { + allowed = false; + } + return allowed; + } + + LLViewerInventoryCategory* cat = model->getCategory(mUUID); + + // All categories can be given. + return cat != NULL; +} + // +=================================================+ // | InventoryFVBridgeBuilder | // +=================================================+ @@ -1133,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(); } @@ -1933,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) { }; @@ -1963,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: @@ -2006,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. @@ -2026,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(); @@ -2715,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); @@ -2723,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(); @@ -2748,7 +2794,13 @@ void LLFolderBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { mDisabledItems.push_back(std::string("Delete System Folder")); } - + + mItems.push_back(std::string("Share")); + if (!canShare()) + { + mDisabledItems.push_back(std::string("Share")); + } + hide_context_entries(menu, mItems, mDisabledItems); } @@ -3167,6 +3219,9 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else { + // store dad inventory item to select added one later. See EXT-4347 + set_dad_inventory_item(inv_item, mUUID); + LLNotification::Params params("MoveInventoryFromObject"); params.functor.function(boost::bind(move_task_inventory_callback, _1, _2, move_inv)); LLNotifications::instance().forceResponse(params, 0); @@ -3186,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) @@ -3263,6 +3318,12 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -3351,6 +3412,11 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Sound Open")); items.push_back(std::string("Properties")); @@ -3397,6 +3463,11 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Landmark Open")); items.push_back(std::string("Properties")); @@ -3614,6 +3685,11 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Open")); items.push_back(std::string("Properties")); @@ -3884,6 +3960,11 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (!is_sidepanel) @@ -3942,6 +4023,11 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } items.push_back(std::string("Animation Open")); items.push_back(std::string("Properties")); @@ -4045,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); @@ -4218,6 +4304,11 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (!is_sidepanel) @@ -4607,6 +4698,11 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) can_open = FALSE; } + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } bool is_sidepanel = isInOutfitsSidePanel(); if (can_open && !is_sidepanel) @@ -4678,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)); } @@ -5298,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/llinventorybridge.h b/indra/newview/llinventorybridge.h index e7b3785a48..f378d219f6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -125,6 +125,8 @@ public: // Allow context menus to be customized for side panel. bool isInOutfitsSidePanel() const; + bool canShare(); + //-------------------------------------------------------------------- // Convenience functions for adding various common menu options. //-------------------------------------------------------------------- diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp index 83e1bbd5a0..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); +} + +LLInventoryFetchItemsObserver::LLInventoryFetchItemsObserver(const uuid_vec_t& item_ids) : + LLInventoryFetchObserver(item_ids) { } -void LLInventoryFetchObserver::changed(U32 mask) +void LLInventoryFetchItemsObserver::changed(U32 mask) { + BOOL any_items_missing = FALSE; + // scan through the incomplete items and move or erase them as // appropriate. - if(!mIncomplete.empty()) + if (!mIncomplete.empty()) { - for(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,20 +478,83 @@ void LLInventoryExistenceObserver::changed(U32 mask) mExist.push_back(*it); it = mMIA.erase(it); } - if(mMIA.empty()) + if (mMIA.empty()) { done(); } } } -void LLInventoryAddedObserver::changed(U32 mask) +void LLInventoryMoveFromWorldObserver::changed(U32 mask) { if(!(mask & LLInventoryObserver::ADD)) { return; } + // nothing is watched + if (mWatchedAssets.size() == 0) + { + return; + } + + LLPointer<LLViewerInventoryItem> item = new LLViewerInventoryItem; + LLMessageSystem* msg = gMessageSystem; + S32 num_blocks = msg->getNumberOfBlocksFast(_PREHASH_InventoryData); + for(S32 i = 0; i < num_blocks; ++i) + { + item->unpackMessage(msg, _PREHASH_InventoryData, i); + const LLUUID& asset_uuid = item->getAssetUUID(); + if (item->getUUID().notNull() && asset_uuid.notNull()) + { + if (isAssetWatched(asset_uuid)) + { + LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL; + mAddedItems.push_back(item->getUUID()); + } + } + } + + if (mAddedItems.size() == mWatchedAssets.size()) + { + done(); + LL_DEBUGS("Inventory_Move") << "All watched items are added & processed." << LL_ENDL; + mAddedItems.clear(); + + // Unable to clean watched items here due to somebody can require to check them in current frame. + // set dirty state to clean them while next watch cycle. + mIsDirty = true; + } +} + +void LLInventoryMoveFromWorldObserver::watchAsset(const LLUUID& asset_id) +{ + if(asset_id.notNull()) + { + if (mIsDirty) + { + LL_DEBUGS("Inventory_Move") << "Watched items are dirty. Clean them." << LL_ENDL; + mWatchedAssets.clear(); + mIsDirty = false; + } + + mWatchedAssets.push_back(asset_id); + onAssetAdded(asset_id); + } +} + +bool LLInventoryMoveFromWorldObserver::isAssetWatched( const LLUUID& asset_id ) +{ + return std::find(mWatchedAssets.begin(), mWatchedAssets.end(), asset_id) != mWatchedAssets.end(); +} + +void LLInventoryAddedObserver::changed(U32 mask) +{ + if (!(mask & LLInventoryObserver::ADD)) + { + return; + } + // *HACK: If this was in response to a packet off // the network, figure out which item was updated. LLMessageSystem* msg = gMessageSystem; @@ -529,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())) @@ -544,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; @@ -571,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 ba70552ebc..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; @@ -194,20 +173,46 @@ protected: }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// Class LLInventoryAddedObserver +// Class LLInventoryMovedObserver // -// 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 +// This class is used as a base class for doing something when all the +// item for observed asset ids were added into the inventory. // Derive a class from this class and implement the done() method to do // something useful. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class LLInventoryMoveFromWorldObserver : public LLInventoryObserver +{ +public: + LLInventoryMoveFromWorldObserver() : mIsDirty(false) {} + virtual void changed(U32 mask); + + void watchAsset(const LLUUID& asset_id); + bool isAssetWatched(const LLUUID& asset_id); + +protected: + virtual void onAssetAdded(const LLUUID& asset_id) {} + virtual void done() = 0; + + typedef std::vector<LLUUID> item_ref_t; + item_ref_t mAddedItems; + item_ref_t mWatchedAssets; + +private: + bool mIsDirty; +}; + +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// Class LLInventoryAddedObserver +// +// 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; @@ -218,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; @@ -237,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 c6c2d23a4b..15c872a7c4 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -38,6 +38,7 @@ #include "llagent.h" #include "llagentwearables.h" #include "llappearancemgr.h" +#include "llavataractions.h" #include "llfloaterinventory.h" #include "llfloaterreg.h" #include "llimfloater.h" @@ -99,6 +100,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) : mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); if (mStartFolderString != "") { @@ -669,7 +671,8 @@ BOOL LLInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // If folder view is empty the (x, y) point won't be in its rect // so the handler must be called explicitly. - if (!mFolderRoot->hasVisibleChildren()) + // but only if was not handled before. See EXT-6746. + if (!handled && !mFolderRoot->hasVisibleChildren()) { handled = mFolderRoot->handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg); } @@ -901,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/llmoveview.cpp b/indra/newview/llmoveview.cpp index 0f22a50093..4ccf5e1c7b 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -200,7 +200,8 @@ void LLFloaterMove::setFlyingMode(BOOL fly) if (instance) { instance->setFlyingModeImpl(fly); - instance->showModeButtons(!fly); + BOOL is_sitting = isAgentAvatarValid() && gAgentAvatarp->isSitting(); + instance->showModeButtons(!fly && !is_sitting); } if (fly) { diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index a747c228a6..9824517ed1 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -2,36 +2,40 @@ * @file LLNearbyChatHandler.cpp * @brief Nearby chat notification managment * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ #include "llviewerprecompiledheaders.h" -#include "llagentdata.h" // for gAgentID #include "llnearbychathandler.h" #include "llbottomtray.h" #include "llchatitemscontainerctrl.h" -#include "llfloaterscriptdebug.h" #include "llnearbychat.h" #include "llrecentpeople.h" @@ -283,7 +287,7 @@ void LLNearbyChatScreenChannel::showToastsBottom() toast_rect.setLeftTopAndSize(getRect().mLeft , bottom + toast_rect.getHeight(), toast_rect.getWidth() ,toast_rect.getHeight()); toast->setRect(toast_rect); - bottom += toast_rect.getHeight() - toast->getTopPad() + margin; + bottom += toast_rect.getHeight() + margin; } // use reverse order to provide correct z-order and avoid toast blinking @@ -354,36 +358,6 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } - - // don't show toast and add message to chat history on receive debug message - // with disabled setting showing script errors or enabled setting to show script - // errors in separate window. - if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) - { - if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) - return; - - // don't process debug messages from not owned objects, see EXT-7762 - if (gAgentID != chat_msg.mOwnerID) - { - return; - } - - if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) - { - - LLColor4 txt_color; - - LLViewerChat::getChatColor(chat_msg,txt_color); - - LLFloaterScriptDebug::addScriptLine(chat_msg.mText, - chat_msg.mFromName, - txt_color, - chat_msg.mFromID); - return; - } - } - nearby_chat->addMessage(chat_msg, true, args); if( nearby_chat->getVisible() || ( chat_msg.mSourceType == CHAT_SOURCE_AGENT diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index afc00bf7ef..407de79c89 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -157,6 +157,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) } LLToastPanel* notify_box = NULL; + // TODO: this should be implemented in LLToastPanel::buidPanelFromNotification if("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) { LLOnlineStatusToast::Params p; @@ -167,6 +168,14 @@ bool LLTipHandler::processNotification(const LLSD& notify) } else { + notify_box = LLToastPanel::buidPanelFromNotification(notification); + } + + // TODO: this if statement should be removed after modification of + // LLToastPanel::buidPanelFromNotification() to allow create generic tip panel + // for all tip notifications except FriendOnline and FriendOffline + if (notify_box == NULL) + { notify_box = new LLToastNotifyPanel(notification); } diff --git a/indra/newview/llpanelgenerictip.cpp b/indra/newview/llpanelgenerictip.cpp index e71e57130f..2e977faf09 100644 --- a/indra/newview/llpanelgenerictip.cpp +++ b/indra/newview/llpanelgenerictip.cpp @@ -3,25 +3,31 @@ * @brief Represents a generic panel for a notifytip notifications. As example: * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone". * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -29,19 +35,22 @@ #include "llpanelgenerictip.h" #include "llnotifications.h" -#include "llviewercontrol.h" // for gSavedSettings - +/** + * Generic toast tip panel. + * This is particular case of toast panel that decoupled from LLToastNotifyPanel. + * From now LLToastNotifyPanel is deprecated and will be removed after all panel + * types are represented in separate classes. + */ LLPanelGenericTip::LLPanelGenericTip( const LLNotificationPtr& notification) : - LLPanelTipToast(notification) + LLToastPanel(notification) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_generic_tip.xml"); childSetValue("message", notification->getMessage()); - - S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount"); - snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count); + // set line max count to 3 in case of a very long name + snapToMessageHeight(getChild<LLTextBox> ("message"), 3); } diff --git a/indra/newview/llpanelgenerictip.h b/indra/newview/llpanelgenerictip.h index f8a3413fe4..0eb502498a 100644 --- a/indra/newview/llpanelgenerictip.h +++ b/indra/newview/llpanelgenerictip.h @@ -3,49 +3,45 @@ * @brief Represents a generic panel for a notifytip notifications. As example: * "SystemMessageTip", "Cancelled", "UploadWebSnapshotDone". * - * $LicenseInfo:firstyear=2010&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2010&license=viewergpl$ + * + * Copyright (c) 2010, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ #ifndef LL_PANELGENERICTIP_H #define LL_PANELGENERICTIP_H -#include "llpaneltiptoast.h" +#include "lltoastpanel.h" -/** - * Represents tip toast panel that contains only one child element - message text. - * This panel can be used for different cases of tip notifications. - */ -class LLPanelGenericTip: public LLPanelTipToast +class LLPanelGenericTip: public LLToastPanel { // disallow instantiation of this class private: // grant privileges to instantiate this class to LLToastPanel friend class LLToastPanel; - /** - * Generic toast tip panel. - * This is particular case of toast panel that decoupled from LLToastNotifyPanel. - * From now LLToastNotifyPanel is deprecated and will be removed after all panel - * types are represented in separate classes. - */ LLPanelGenericTip(const LLNotificationPtr& notification); }; #endif /* LL_PANELGENERICTIP_H */ diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index a1cdbdad59..67d40a39b1 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -675,6 +675,7 @@ void LLLandmarksPanel::initListCommandsHandlers() trash_btn->setDragAndDropHandler(boost::bind(&LLLandmarksPanel::handleDragAndDropToTrash, this , _4 // BOOL drop , _5 // EDragAndDropType cargo_type + , _6 // void* cargo_data , _7 // EAcceptance* accept )); @@ -1109,7 +1110,7 @@ void LLLandmarksPanel::onPickPanelExit( LLPanelPickEdit* pick_panel, LLView* own pick_panel = NULL; } -bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept) +bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data , EAcceptance* accept) { *accept = ACCEPT_NO; @@ -1125,7 +1126,21 @@ bool LLLandmarksPanel::handleDragAndDropToTrash(BOOL drop, EDragAndDropType carg if (is_enabled && drop) { - onClipboardAction("delete"); + // don't call onClipboardAction("delete") + // this lead to removing (N * 2 - 1) items if drag N>1 items into trash. EXT-6757 + // So, let remove items one by one. + LLInventoryItem* item = static_cast<LLInventoryItem*>(cargo_data); + if (item) + { + LLFolderViewItem* fv_item = (mCurrentSelectedList && mCurrentSelectedList->getRootFolder()) ? + mCurrentSelectedList->getRootFolder()->getItemByID(item->getUUID()) : NULL; + + if (fv_item) + { + // is Item Removable checked inside of remove() + fv_item->remove(); + } + } } } break; diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index da5d683cfc..2d1eb0f091 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -142,7 +142,7 @@ private: /** * Processes drag-n-drop of the Landmarks and folders into trash button. */ - bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept); + bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept); /** * Landmark actions callbacks. Fire when a landmark is loaded from the list. diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 8be4c8402c..0ba373c51b 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,6 +34,7 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llavataractions.h" #include "lldndbutton.h" #include "lleconomy.h" #include "llfilepicker.h" @@ -116,6 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory() mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this)); mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this)); mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); // Controls // *TODO: Just use persistant settings for each of these diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index df74c5dd47..3a82cf6f8b 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -46,6 +46,7 @@ #include "roles_constants.h" #include "llagent.h" +#include "llavataractions.h" #include "llcallbacklist.h" #include "llfloaterbuycurrency.h" #include "llfloaterreg.h" @@ -1528,6 +1529,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing)); mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&do_nothing)); + mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); } // Destroys the object diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index cf04ab378f..d78a448acb 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -45,6 +45,7 @@ #include "llfloaterreg.h" #include "llinventoryfunctions.h" #include "llinventorypanel.h" +#include "llviewermenu.h" #include "llviewerwindow.h" #include "llviewerinventory.h" #include "llbutton.h" @@ -54,12 +55,14 @@ #include "llinventorybridge.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" +#include "llpaneloutfitsinventory.h" #include "lluiconstants.h" #include "llscrolllistctrl.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "llsdutil.h" #include "llsidepanelappearance.h" +#include "lltoggleablemenu.h" #include "llwearablelist.h" static LLRegisterPanelClassWrapper<LLPanelOutfitEdit> t_outfit_edit("panel_outfit_edit"); @@ -114,8 +117,8 @@ private: LLPanelOutfitEdit::LLPanelOutfitEdit() : LLPanel(), mCurrentOutfitID(), mFetchLook(NULL), mSearchFilter(NULL), -mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToLookBtn(NULL), -mRemoveFromLookBtn(NULL), mLookObserver(NULL) +mLookContents(NULL), mInventoryItemsPanel(NULL), mAddToOutfitBtn(NULL), +mRemoveFromOutfitBtn(NULL), mLookObserver(NULL) { mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); @@ -161,19 +164,15 @@ 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); - // mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); - // mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + mInventoryItemsPanel->setSelectCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); + mInventoryItemsPanel->getRootFolder()->setReshapeCallback(boost::bind(&LLPanelOutfitEdit::onInventorySelectionChange, this, _1, _2)); LLComboBox* type_filter = getChild<LLComboBox>("inventory_filter"); type_filter->setCommitCallback(boost::bind(&LLPanelOutfitEdit::onTypeFilterChanged, this, _1)); @@ -197,37 +196,38 @@ BOOL LLPanelOutfitEdit::postBuild() mAddToLookBtn->setEnabled(FALSE); mAddToLookBtn->setVisible(FALSE); */ - childSetAction("add_item_btn", boost::bind(&LLPanelOutfitEdit::onAddToLookClicked, this), this); + childSetAction("add_to_outfit_btn", boost::bind(&LLPanelOutfitEdit::onAddToOutfitClicked, this)); + childSetEnabled("add_to_outfit_btn", false); mUpBtn = getChild<LLButton>("up_btn"); mUpBtn->setEnabled(TRUE); mUpBtn->setClickedCallback(boost::bind(&LLPanelOutfitEdit::onUpClicked, this)); + //*TODO rename mLookContents to mOutfitContents mLookContents = getChild<LLScrollListCtrl>("look_items_list"); mLookContents->sortByColumn("look_item_sort", TRUE); - mLookContents->setCommitCallback(boost::bind(&LLPanelOutfitEdit::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)); + childSetAction("save_as_btn", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); + childSetAction("save_flyout_btn", boost::bind(&LLPanelOutfitEdit::showSaveMenu, this)); + + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar save_registar; + save_registar.add("Outfit.Save.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, false)); + save_registar.add("Outfit.SaveAsNew.Action", boost::bind(&LLPanelOutfitEdit::saveOutfit, this, true)); + mSaveMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_save_outfit.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + return TRUE; } @@ -236,6 +236,31 @@ void LLPanelOutfitEdit::showAddWearablesPanel() childSetVisible("add_wearables_panel", childGetValue("add_btn")); } +void LLPanelOutfitEdit::saveOutfit(bool as_new) +{ + if (!as_new && LLAppearanceMgr::getInstance()->updateBaseOutfit()) + { + // we don't need to ask for an outfit name, and updateBaseOutfit() successfully saved. + // If updateBaseOutfit fails, ask for an outfit name anyways + return; + } + + LLPanelOutfitsInventory* panel_outfits_inventory = LLPanelOutfitsInventory::findInstance(); + if (panel_outfits_inventory) + { + panel_outfits_inventory->onSave(); + } +} + +void LLPanelOutfitEdit::showSaveMenu() +{ + S32 x, y; + LLUI::getMousePositionLocal(this, &x, &y); + + mSaveMenu->updateParent(LLMenuGL::sMenuContainer); + LLMenuGL::showPopup(this, mSaveMenu, x, y); +} + void LLPanelOutfitEdit::onTypeFilterChanged(LLUICtrl* ctrl) { LLComboBox* type_filter = dynamic_cast<LLComboBox*>(ctrl); @@ -298,37 +323,30 @@ void LLPanelOutfitEdit::onSearchEdit(const std::string& string) mInventoryItemsPanel->setFilterSubString(mSearchString); } -void LLPanelOutfitEdit::onAddToLookClicked(void) +void LLPanelOutfitEdit::onAddToOutfitClicked(void) { LLFolderViewItem* curr_item = mInventoryItemsPanel->getRootFolder()->getCurSelectedItem(); + if (!curr_item) return; + LLFolderViewEventListener* listenerp = curr_item->getListener(); - link_inventory_item(gAgent.getID(), listenerp->getUUID(), mCurrentOutfitID, listenerp->getName(), - LLAssetType::AT_LINK, LLPointer<LLInventoryCallback>(NULL)); - updateLookInfo(); + if (!listenerp) return; + + if (LLAppearanceMgr::getInstance()->wearItemOnAvatar(listenerp->getUUID())) + { + updateLookInfo(); + } } -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); } @@ -376,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) @@ -405,6 +423,21 @@ void LLPanelOutfitEdit::onInventorySelectionChange(const std::deque<LLFolderView { return; } + + LLViewerInventoryItem* item = current_item->getInventoryItem(); + if (!item) return; + + switch (item->getType()) + { + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_OBJECT: + childSetEnabled("add_to_outfit_btn", true); + break; + default: + childSetEnabled("add_to_outfit_btn", false); + break; + } /* Removing add to look inline button (not part of mvp for viewer 2) LLRect btn_rect(current_item->getLocalRect().mRight - 50, @@ -422,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; @@ -444,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) @@ -488,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 ba382d7320..fa92d4c314 100644 --- a/indra/newview/llpaneloutfitedit.h +++ b/indra/newview/llpaneloutfitedit.h @@ -52,6 +52,7 @@ class LLInventoryPanel; class LLSaveFolderState; class LLFolderViewItem; class LLScrollListCtrl; +class LLToggleableMenu; class LLLookFetchObserver; class LLFilterEditor; @@ -86,13 +87,15 @@ public: // only update the location if there is none already available. void showAddWearablesPanel(); + void saveOutfit(bool as_new = false); + void showSaveMenu(); void onTypeFilterChanged(LLUICtrl* ctrl); void onSearchEdit(const std::string& string); void onInventorySelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); - void onAddToLookClicked(void); - void onLookItemSelectionChange(void); - void onRemoveFromLookClicked(void); + void onAddToOutfitClicked(void); + void onOutfitItemSelectionChange(void); + void onRemoveFromOutfitClicked(void); void onEditWearableClicked(void); void onUpClicked(void); @@ -113,10 +116,11 @@ private: LLFilterEditor* mSearchFilter; LLSaveFolderState* mSavedFolderState; std::string mSearchString; - LLButton* mAddToLookBtn; - LLButton* mRemoveFromLookBtn; + LLButton* mAddToOutfitBtn; + LLButton* mRemoveFromOutfitBtn; LLButton* mUpBtn; LLButton* mEditWearableBtn; + LLToggleableMenu* mSaveMenu; LLLookFetchObserver* mFetchLook; LLInventoryLookObserver* mLookObserver; diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index 7d8b1dea0e..b78268da7b 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -217,8 +217,13 @@ bool LLPanelOutfitsInventory::onSaveCommit(const LLSD& notification, const LLSD& if( !outfit_name.empty() ) { LLUUID outfit_folder = gAgentWearables.makeNewOutfitLinks(outfit_name); - LLSD key; - LLSideTray::getInstance()->showPanel("panel_outfits_inventory", key); + + LLSidepanelAppearance* panel_appearance = + dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance")); + if (panel_appearance) + { + panel_appearance->showOutfitsInventoryPanel(); + } if (mAppearanceTabs) { @@ -309,6 +314,12 @@ LLFolderView *LLPanelOutfitsInventory::getRootFolder() return mActivePanel->getRootFolder(); } +//static +LLPanelOutfitsInventory* LLPanelOutfitsInventory::findInstance() +{ + return dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory")); +} + ////////////////////////////////////////////////////////////////////////////////// // List Commands // diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h index 41afc2f372..5d0d27ee4f 100644 --- a/indra/newview/llpaneloutfitsinventory.h +++ b/indra/newview/llpaneloutfitsinventory.h @@ -73,6 +73,8 @@ public: LLFolderView* getRootFolder(); + static LLPanelOutfitsInventory* findInstance(); + protected: void updateVerbs(); bool getIsCorrectType(const LLFolderViewEventListener *listenerp) const; diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index ab2f9284f7..83244edb8e 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -31,7 +31,6 @@ #include "llviewerprecompiledheaders.h" -//LLPanelPrimMediaControls #include "llagent.h" #include "llagentcamera.h" #include "llparcel.h" @@ -65,9 +64,12 @@ #include "llvovolume.h" #include "llweb.h" #include "llwindow.h" - #include "llfloatertools.h" // to enable hide if build tools are up +#if defined(LL_DARWIN) || (defined(LL_WINDOW) && (! defined(LL_RELEASE_FOR_DOWNLOAD)) ) +#define PER_MEDIA_VOLUME +#endif + // Functions pulled from pipeline.cpp glh::matrix4f glh_get_current_modelview(); glh::matrix4f glh_get_current_projection(); @@ -464,11 +466,18 @@ void LLPanelPrimMediaControls::updateShape() mSkipBackCtrl->setVisible(FALSE); mSkipBackCtrl->setEnabled(FALSE); +#ifdef PER_MEDIA_VOLUME + mVolumeCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + mVolumeSliderCtrl->setEnabled(has_focus && shouldVolumeSliderBeVisible()); + mVolumeSliderCtrl->setVisible(has_focus && shouldVolumeSliderBeVisible()); +#else mVolumeCtrl->setVisible(FALSE); mVolumeSliderCtrl->setVisible(FALSE); mVolumeCtrl->setEnabled(FALSE); mVolumeSliderCtrl->setEnabled(FALSE); - +#endif + if (mMediaPanelScroll) { mMediaPanelScroll->setVisible(has_focus); diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index eb245453db..53f92f7ad1 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -39,6 +39,7 @@ #include "llparticipantlist.h" #include "llspeakers.h" +#include "llviewercontrol.h" #include "llviewermenu.h" #include "llvoiceclient.h" @@ -49,8 +50,147 @@ static const LLAvatarItemAgentOnTopComparator AGENT_ON_TOP_NAME_COMPARATOR; +// See EXT-4301. +/** + * class LLAvalineUpdater - observe the list of voice participants in session and check + * presence of Avaline Callers among them. + * + * LLAvalineUpdater is a LLVoiceClientParticipantObserver. It provides two kinds of validation: + * - whether Avaline caller presence among participants; + * - whether watched Avaline caller still exists in voice channel. + * Both validations have callbacks which will notify subscriber if any of event occur. + * + * @see findAvalineCaller() + * @see checkIfAvalineCallersExist() + */ +class LLAvalineUpdater : public LLVoiceClientParticipantObserver +{ +public: + typedef boost::function<void(const LLUUID& speaker_id)> process_avaline_callback_t; + + LLAvalineUpdater(process_avaline_callback_t found_cb, process_avaline_callback_t removed_cb) + : mAvalineFoundCallback(found_cb) + , mAvalineRemovedCallback(removed_cb) + { + LLVoiceClient::getInstance()->addObserver(this); + } + ~LLAvalineUpdater() + { + if (LLVoiceClient::instanceExists()) + { + LLVoiceClient::getInstance()->removeObserver(this); + } + } + + /** + * Adds UUID of Avaline caller to watch. + * + * @see checkIfAvalineCallersExist(). + */ + void watchAvalineCaller(const LLUUID& avaline_caller_id) + { + mAvalineCallers.insert(avaline_caller_id); + } + + void onChange() + { + uuid_set_t participant_uuids; + LLVoiceClient::getInstance()->getParticipantsUUIDSet(participant_uuids); + + + // check whether Avaline caller exists among voice participants + // and notify Participant List + findAvalineCaller(participant_uuids); + + // check whether watched Avaline callers still present among voice participant + // and remove if absents. + checkIfAvalineCallersExist(participant_uuids); + } + +private: + typedef std::set<LLUUID> uuid_set_t; + + /** + * Finds Avaline callers among voice participants and calls mAvalineFoundCallback. + * + * When Avatar is in group call with Avaline caller and then ends call Avaline caller stays + * in Group Chat floater (exists in LLSpeakerMgr). If Avatar starts call with that group again + * Avaline caller is added to voice channel AFTER Avatar is connected to group call. + * But Voice Control Panel (VCP) is filled from session LLSpeakerMgr and there is no information + * if a speaker is Avaline caller. + * + * In this case this speaker is created as avatar and will be recreated when it appears in + * Avatar's Voice session. + * + * @see LLParticipantList::onAvalineCallerFound() + */ + void findAvalineCaller(const uuid_set_t& participant_uuids) + { + uuid_set_t::const_iterator it = participant_uuids.begin(), it_end = participant_uuids.end(); + + for(; it != it_end; ++it) + { + const LLUUID& participant_id = *it; + if (!LLVoiceClient::getInstance()->isParticipantAvatar(participant_id)) + { + LL_DEBUGS("Avaline") << "Avaline caller found among voice participants: " << participant_id << LL_ENDL; + + if (mAvalineFoundCallback) + { + mAvalineFoundCallback(participant_id); + } + } + } + } + + /** + * Finds Avaline callers which are not anymore among voice participants and calls mAvalineRemovedCallback. + * + * The problem is when Avaline caller ends a call it is removed from Voice Client session but + * still exists in LLSpeakerMgr. Server does not send such information. + * This method implements a HUCK to notify subscribers that watched Avaline callers by class + * are not anymore in the call. + * + * @see LLParticipantList::onAvalineCallerRemoved() + */ + void checkIfAvalineCallersExist(const uuid_set_t& participant_uuids) + { + uuid_set_t::iterator it = mAvalineCallers.begin(); + uuid_set_t::const_iterator participants_it_end = participant_uuids.end(); + + while (it != mAvalineCallers.end()) + { + const LLUUID participant_id = *it; + LL_DEBUGS("Avaline") << "Check avaline caller: " << participant_id << LL_ENDL; + bool not_found = participant_uuids.find(participant_id) == participants_it_end; + if (not_found) + { + LL_DEBUGS("Avaline") << "Watched Avaline caller is not found among voice participants: " << participant_id << LL_ENDL; + + // notify Participant List + if (mAvalineRemovedCallback) + { + mAvalineRemovedCallback(participant_id); + } + + // remove from the watch list + mAvalineCallers.erase(it++); + } + else + { + ++it; + } + } + } + + process_avaline_callback_t mAvalineFoundCallback; + process_avaline_callback_t mAvalineRemovedCallback; + + uuid_set_t mAvalineCallers; +}; + LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/, - bool exclude_agent /*= true*/): + bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), mSortOrder(E_SORT_BY_NAME) @@ -58,6 +198,9 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av , mExcludeAgent(exclude_agent) , mValidateSpeakerCallback(NULL) { + mAvalineUpdater = new LLAvalineUpdater(boost::bind(&LLParticipantList::onAvalineCallerFound, this, _1), + boost::bind(&LLParticipantList::onAvalineCallerRemoved, this, _1)); + mSpeakerAddListener = new SpeakerAddListener(*this); mSpeakerRemoveListener = new SpeakerRemoveListener(*this); mSpeakerClearListener = new SpeakerClearListener(*this); @@ -87,6 +230,12 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mAvatarList->setContextMenu(NULL); } + if (use_context_menu && can_toggle_icons) + { + mAvatarList->setShowIcons("ParticipantListShowIcons"); + mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); + } + //Lets fill avatarList with existing speakers LLSpeakerMgr::speaker_list_t speaker_list; mSpeakerMgr->getSpeakerList(&speaker_list, true); @@ -113,6 +262,7 @@ LLParticipantList::~LLParticipantList() mAvatarListDoubleClickConnection.disconnect(); mAvatarListRefreshConnection.disconnect(); mAvatarListReturnConnection.disconnect(); + mAvatarListToggleIconsConnection.disconnect(); // It is possible Participant List will be re-created from LLCallFloater::onCurrentChannelChanged() // See ticket EXT-3427 @@ -129,6 +279,9 @@ LLParticipantList::~LLParticipantList() } mAvatarList->setContextMenu(NULL); + mAvatarList->setComparator(NULL); + + delete mAvalineUpdater; } void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible) @@ -202,6 +355,55 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) } } +/* +Seems this method is not necessary after onAvalineCallerRemoved was implemented; + +It does nothing because list item is always created with correct class type for Avaline caller. +For now Avaline Caller is removed from the LLSpeakerMgr List when it is removed from the Voice Client +session. +This happens in two cases: if Avaline Caller ends call itself or if Resident ends group call. + +Probably Avaline caller should be removed from the LLSpeakerMgr list ONLY if it ends call itself. +Asked in EXT-4301. +*/ +void LLParticipantList::onAvalineCallerFound(const LLUUID& participant_id) +{ + LLPanel* item = mAvatarList->getItemByValue(participant_id); + + if (NULL == item) + { + LL_WARNS("Avaline") << "Something wrong. Unable to find item for: " << participant_id << LL_ENDL; + return; + } + + if (typeid(*item) == typeid(LLAvalineListItem)) + { + LL_DEBUGS("Avaline") << "Avaline caller has already correct class type for: " << participant_id << LL_ENDL; + // item representing an Avaline caller has a correct type already. + return; + } + + LL_DEBUGS("Avaline") << "remove item from the list and re-add it: " << participant_id << LL_ENDL; + + // remove UUID from LLAvatarList::mIDs to be able add it again. + uuid_vec_t& ids = mAvatarList->getIDs(); + uuid_vec_t::iterator pos = std::find(ids.begin(), ids.end(), participant_id); + ids.erase(pos); + + // remove item directly + mAvatarList->removeItem(item); + + // re-add avaline caller with a correct class instance. + addAvatarIDExceptAgent(participant_id); +} + +void LLParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id) +{ + LL_DEBUGS("Avaline") << "Removing avaline caller from the list: " << participant_id << LL_ENDL; + + mSpeakerMgr->removeAvalineSpeaker(participant_id); +} + void LLParticipantList::setSortOrder(EParticipantSortOrder order) { if ( mSortOrder != order ) @@ -347,8 +549,20 @@ void LLParticipantList::addAvatarIDExceptAgent(const LLUUID& avatar_id) if (mExcludeAgent && gAgent.getID() == avatar_id) return; if (mAvatarList->contains(avatar_id)) return; - mAvatarList->getIDs().push_back(avatar_id); - mAvatarList->setDirty(); + bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(avatar_id); + + if (is_avatar) + { + mAvatarList->getIDs().push_back(avatar_id); + mAvatarList->setDirty(); + } + else + { + LLVoiceClient::participantState *participant = LLVoiceClient::getInstance()->findParticipantByID(avatar_id); + + mAvatarList->addAvalineItem(avatar_id, mSpeakerMgr->getSessionID(), participant ? participant->mAccountName : LLTrans::getString("AvatarNameWaiting")); + mAvalineUpdater->watchAvalineCaller(avatar_id); + } adjustParticipant(avatar_id); } @@ -440,6 +654,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; @@ -632,7 +848,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_call") { bool not_agent = mUUIDs.front() != gAgentID; - bool can_call = not_agent && LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); + bool can_call = not_agent && LLVoiceClient::voiceEnabled() && LLVoiceClient::getInstance()->voiceWorking(); return can_call; } diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index d9ca4230a9..9e5a2cbc1f 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -38,6 +38,7 @@ class LLSpeakerMgr; class LLAvatarList; class LLUICtrl; +class LLAvalineUpdater; class LLParticipantList { @@ -46,7 +47,7 @@ class LLParticipantList typedef boost::function<bool (const LLUUID& speaker_id)> validate_speaker_callback_t; - LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true); + LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); ~LLParticipantList(); void setSpeakingIndicatorsVisible(BOOL visible); @@ -235,6 +236,9 @@ class LLParticipantList void onAvatarListDoubleClicked(LLUICtrl* ctrl); void onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param); + void onAvalineCallerFound(const LLUUID& participant_id); + void onAvalineCallerRemoved(const LLUUID& participant_id); + /** * Adjusts passed participant to work properly. * @@ -268,7 +272,9 @@ class LLParticipantList boost::signals2::connection mAvatarListDoubleClickConnection; boost::signals2::connection mAvatarListRefreshConnection; boost::signals2::connection mAvatarListReturnConnection; + boost::signals2::connection mAvatarListToggleIconsConnection; LLPointer<LLAvatarItemRecentSpeakerComparator> mSortByRecentSpeakers; validate_speaker_callback_t mValidateSpeakerCallback; + LLAvalineUpdater* mAvalineUpdater; }; diff --git a/indra/newview/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/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp index 7980fe1945..a5518d87d4 100644 --- a/indra/newview/llscrollingpanelparam.cpp +++ b/indra/newview/llscrollingpanelparam.cpp @@ -42,17 +42,14 @@ #include "llbutton.h" #include "llsliderctrl.h" #include "llagent.h" +#include "llviewborder.h" #include "llvoavatarself.h" // Constants for LLPanelVisualParam const F32 LLScrollingPanelParam::PARAM_STEP_TIME_THRESHOLD = 0.25f; -const S32 LLScrollingPanelParam::BTN_BORDER = 2; const S32 LLScrollingPanelParam::PARAM_HINT_WIDTH = 128; const S32 LLScrollingPanelParam::PARAM_HINT_HEIGHT = 128; -const S32 LLScrollingPanelParam::PARAM_HINT_LABEL_HEIGHT = 16; -const S32 LLScrollingPanelParam::PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH + LLPANEL_BORDER_WIDTH); -const S32 LLScrollingPanelParam::PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH; // LLScrollingPanelParam //static @@ -67,14 +64,17 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLPanel::Params& panel_param { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml"); + // *HACK To avoid hard coding texture position, lets use border's position for texture. + LLViewBorder* left_border = getChild<LLViewBorder>("left_border"); + static LLUICachedControl<S32> slider_ctrl_height ("UISliderctrlHeight", 0); - S32 pos_x = 2 * LLPANEL_BORDER_WIDTH; - S32 pos_y = 3 * LLPANEL_BORDER_WIDTH + slider_ctrl_height; + S32 pos_x = left_border->getRect().mLeft + left_border->getBorderWidth(); + S32 pos_y = left_border->getRect().mBottom + left_border->getBorderWidth(); F32 min_weight = param->getMinWeight(); F32 max_weight = param->getMaxWeight(); mHintMin = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), min_weight); - pos_x += PARAM_HINT_WIDTH + 3 * BTN_BORDER; + pos_x = getChild<LLViewBorder>("right_border")->getRect().mLeft + left_border->getBorderWidth(); mHintMax = new LLVisualParamHint( pos_x, pos_y, PARAM_HINT_WIDTH, PARAM_HINT_HEIGHT, mesh, (LLViewerVisualParam*) wearable->getVisualParam(param->getID()), max_weight ); mHintMin->setAllowsUpdates( FALSE ); @@ -162,6 +162,10 @@ void LLScrollingPanelParam::draw() childSetVisible("less", mHintMin->getVisible()); childSetVisible("more", mHintMax->getVisible()); + // hide borders if texture has been loaded + childSetVisible("left_border", !mHintMin->getVisible()); + childSetVisible("right_border", !mHintMax->getVisible()); + // Draw all the children except for the labels childSetVisible( "min param text", FALSE ); childSetVisible( "max param text", FALSE ); @@ -171,9 +175,7 @@ void LLScrollingPanelParam::draw() gGL.pushUIMatrix(); { const LLRect& r = mHintMin->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - gGL.translateUI(left, bot, 0.f); + gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); mHintMin->draw(); } gGL.popUIMatrix(); @@ -181,9 +183,7 @@ void LLScrollingPanelParam::draw() gGL.pushUIMatrix(); { const LLRect& r = mHintMax->getRect(); - F32 left = (F32)(r.mLeft + BTN_BORDER); - F32 bot = (F32)(r.mBottom + BTN_BORDER); - gGL.translateUI(left, bot, 0.f); + gGL.translateUI((F32)r.mLeft, (F32)r.mBottom, 0.f); mHintMax->draw(); } gGL.popUIMatrix(); @@ -191,10 +191,10 @@ void LLScrollingPanelParam::draw() // Draw labels on top of the buttons childSetVisible( "min param text", TRUE ); - drawChild(getChild<LLView>("min param text"), BTN_BORDER, BTN_BORDER); + drawChild(getChild<LLView>("min param text")); childSetVisible( "max param text", TRUE ); - drawChild(getChild<LLView>("max param text"), BTN_BORDER, BTN_BORDER); + drawChild(getChild<LLView>("max param text")); } // static diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h index 1cbc64f45a..fe4ce07166 100644 --- a/indra/newview/llscrollingpanelparam.h +++ b/indra/newview/llscrollingpanelparam.h @@ -3,25 +3,31 @@ * @brief the scrolling panel containing a list of visual param * panels * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -36,13 +42,12 @@ class LLViewerVisualParam; class LLWearable; class LLVisualParamHint; class LLViewerVisualParam; -class LLJoint; class LLScrollingPanelParam : public LLScrollingPanel { public: LLScrollingPanelParam( const LLPanel::Params& panel_params, - LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, LLJoint* jointp ); + LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable ); virtual ~LLScrollingPanelParam(); virtual void draw(); diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp index a084c93786..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() {} @@ -135,7 +137,7 @@ BOOL LLSidepanelAppearance::postBuild() LLButton* back_btn = mOutfitEdit->getChild<LLButton>("back_btn"); if (back_btn) { - back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::onBackButtonClicked, this)); + back_btn->setClickedCallback(boost::bind(&LLSidepanelAppearance::showOutfitsInventoryPanel, this)); } } @@ -176,7 +178,7 @@ void LLSidepanelAppearance::onOpen(const LLSD& key) if(key.size() == 0) return; - + toggleOutfitEditPanel(TRUE); updateVerbs(); @@ -258,12 +260,6 @@ void LLSidepanelAppearance::onNewOutfitButtonClicked() } } - -void LLSidepanelAppearance::onBackButtonClicked() -{ - toggleOutfitEditPanel(FALSE); -} - void LLSidepanelAppearance::onEditWearBackClicked() { mEditWearable->saveChanges(); @@ -271,6 +267,30 @@ void LLSidepanelAppearance::onEditWearBackClicked() toggleOutfitEditPanel(TRUE); } +void LLSidepanelAppearance::showOutfitsInventoryPanel() +{ + mOutfitEdit->setVisible(FALSE); + + mPanelOutfitsInventory->setVisible(TRUE); + + mFilterEditor->setVisible(TRUE); + mEditBtn->setVisible(TRUE); + mNewOutfitBtn->setVisible(TRUE); + mCurrOutfitPanel->setVisible(TRUE); +} + +void LLSidepanelAppearance::showOutfitEditPanel() +{ + mOutfitEdit->setVisible(TRUE); + + mPanelOutfitsInventory->setVisible(FALSE); + + mFilterEditor->setVisible(FALSE); + mEditBtn->setVisible(FALSE); + mNewOutfitBtn->setVisible(FALSE); + mCurrOutfitPanel->setVisible(FALSE); +} + void LLSidepanelAppearance::toggleOutfitEditPanel(BOOL visible) { if (!mOutfitEdit) @@ -388,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/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h index 1d78e92a84..0a609797fb 100644 --- a/indra/newview/llsidepanelappearance.h +++ b/indra/newview/llsidepanelappearance.h @@ -63,14 +63,18 @@ public: void updateVerbs(); void onNewOutfitButtonClicked(); + void showOutfitsInventoryPanel(); + void showOutfitEditPanel(); + private: void onFilterEdit(const std::string& search_string); void onOpenOutfitButtonClicked(); void onEditAppearanceButtonClicked(); void onEditButtonClicked(); - void onBackButtonClicked(); void onEditWearBackClicked(); + + //@deprecated use showXXX() methods instead void toggleOutfitEditPanel(BOOL visible); void toggleWearableEditPanel(BOOL visible, LLWearable* wearable); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 18e56a9c01..fa543f1371 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -33,6 +33,7 @@ #include "llsidepanelinventory.h" #include "llagent.h" +#include "llavataractions.h" #include "llbutton.h" #include "llinventorybridge.h" #include "llinventorypanel.h" @@ -151,6 +152,7 @@ void LLSidepanelInventory::onInfoButtonClicked() void LLSidepanelInventory::onShareButtonClicked() { + LLAvatarActions::shareWithAvatars(); } void LLSidepanelInventory::performActionOnSelection(const std::string &action) @@ -252,7 +254,9 @@ void LLSidepanelInventory::updateVerbs() mPlayBtn->setEnabled(FALSE); mTeleportBtn->setVisible(FALSE); mTeleportBtn->setEnabled(FALSE); - + + mShareBtn->setEnabled(canShare()); + const LLInventoryItem *item = getSelectedItem(); if (!item) return; @@ -260,7 +264,6 @@ void LLSidepanelInventory::updateVerbs() bool is_single_selection = getSelectedCount() == 1; mInfoBtn->setEnabled(is_single_selection); - mShareBtn->setEnabled(is_single_selection); switch(item->getInventoryType()) { @@ -285,6 +288,25 @@ void LLSidepanelInventory::updateVerbs() } } +bool LLSidepanelInventory::canShare() +{ + LLPanelMainInventory* panel_main_inventory = + mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); + + LLFolderView* root_folder = + panel_main_inventory->getActivePanel()->getRootFolder(); + + LLFolderViewItem* current_item = root_folder->hasVisibleChildren() + ? root_folder->getCurSelectedItem() + : NULL; + + LLInvFVBridge* bridge = current_item + ? dynamic_cast <LLInvFVBridge*> (current_item->getListener()) + : NULL; + + return bridge ? bridge->canShare() : false; +} + LLInventoryItem *LLSidepanelInventory::getSelectedItem() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory"); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 4776dd7530..95eab3571c 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -2,25 +2,30 @@ * @file LLSidepanelInventory.h * @brief Side Bar "Inventory" panel * - * $LicenseInfo:firstyear=2009&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2004-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -46,16 +51,8 @@ public: /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any. - LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; } BOOL isMainInventoryPanelActive() const; - void showItemInfoPanel(); - void showTaskInfoPanel(); - void showInventoryPanel(); - - // checks can share selected item(s) - bool canShare(); - protected: // Tracks highlighted (selected) item in inventory panel. LLInventoryItem *getSelectedItem(); @@ -63,6 +60,11 @@ protected: void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action); // "wear", "teleport", etc. void performActionOnSelection(const std::string &action); + bool canShare(); + + void showItemInfoPanel(); + void showTaskInfoPanel(); + void showInventoryPanel(); void updateVerbs(); // @@ -77,7 +79,6 @@ private: protected: void onInfoButtonClicked(); void onShareButtonClicked(); - void onShopButtonClicked(); void onWearButtonClicked(); void onPlayButtonClicked(); void onTeleportButtonClicked(); @@ -90,7 +91,6 @@ private: LLButton* mPlayBtn; LLButton* mTeleportBtn; LLButton* mOverflowBtn; - LLButton* mShopBtn; }; 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/llspeakers.h b/indra/newview/llspeakers.h index 08fb405265..2bb160b7ce 100644 --- a/indra/newview/llspeakers.h +++ b/indra/newview/llspeakers.h @@ -2,25 +2,31 @@ * @file llspeakers.h * @brief Management interface for muting and controlling volume of residents currently speaking * - * $LicenseInfo:firstyear=2005&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2005&license=viewergpl$ + * + * Copyright (c) 2005-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -236,13 +242,6 @@ public: */ bool removeAvalineSpeaker(const LLUUID& speaker_id) { return removeSpeaker(speaker_id); } - /** - * Initializes mVoiceModerated depend on LLSpeaker::mModeratorMutedVoice of agent's participant. - * - * Is used only to implement workaround to initialize mVoiceModerated on first join to group chat. See EXT-6937 - */ - void initVoiceModerateMode(); - protected: virtual void updateSpeakerList(); void setSpeakerNotInChannel(LLSpeaker* speackerp); @@ -259,14 +258,6 @@ protected: * time out speakers when they are not part of current session */ LLSpeakersDelayActionsStorage* mSpeakerDelayRemover; - - // *TODO: should be moved back into LLIMSpeakerMgr when a way to request the current voice channel - // moderation mode is implemented: See EXT-6937 - bool mVoiceModerated; - - // *TODO: To be removed when a way to request the current voice channel - // moderation mode is implemented: See EXT-6937 - bool mModerateModeHandledFirstTime; }; class LLIMSpeakerMgr : public LLSpeakerMgr @@ -288,21 +279,22 @@ public: * @param[in] avatar_id UUID of avatar to be processed * @param[in] unmute if false - specified avatar will be muted, otherwise - unmuted. * - * @see moderateVoiceAllParticipants() + * @see moderateVoiceOtherParticipants() */ void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); /** - * Mutes/Unmutes all avatars for current group voice chat. + * Mutes/Unmutes all avatars except specified for current group voice chat. * * It only marks avatars as muted for session and does not use local Agent's Block list. - * It calls forceVoiceModeratedMode() in case of session is already in requested state. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. * - * @param[in] unmute_everyone if false - avatars will be muted, otherwise - unmuted. + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute_everyone_else if false - avatars will be muted, otherwise - unmuted. * * @see moderateVoiceParticipant() */ - void moderateVoiceAllParticipants(bool unmute_everyone); + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute_everyone_else); void processSessionUpdate(const LLSD& session_update); @@ -311,11 +303,7 @@ protected: void moderateVoiceSession(const LLUUID& session_id, bool disallow_voice); - /** - * Process all participants to mute/unmute them according to passed voice session state. - */ - void forceVoiceModeratedMode(bool should_be_muted); - + LLUUID mReverseVoiceModeratedAvatarID; }; class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr> 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/lltoast.cpp b/indra/newview/lltoast.cpp index 60657d3fa7..911ed6ade7 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -285,6 +285,12 @@ void LLToast::setVisible(BOOL show) } LLModalDialog::setFrontmost(FALSE); } + else + { + //hide "hide" button in case toast was hidden without mouse_leave + if(mHideBtn) + mHideBtn->setVisible(show); + } LLFloater::setVisible(show); if(mPanel) { diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 20198a9398..bd07ff9fb1 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -63,6 +63,8 @@ public: void start() { mEventTimer.start(); } void restart() {mEventTimer.reset(); } BOOL getStarted() { return mEventTimer.getStarted(); } + + LLTimer& getEventTimer() { return mEventTimer;} private : LLToast* mToast; }; @@ -132,6 +134,8 @@ public: // void stopTimer() { mTimer->stop(); } // + LLToastLifeTimer* getTimer() { return mTimer.get();} + // virtual void draw(); // virtual void setVisible(BOOL show); diff --git a/indra/newview/lltoastnotifypanel.h b/indra/newview/lltoastnotifypanel.h index 1c68e4c6b3..a6644c0a7a 100644 --- a/indra/newview/lltoastnotifypanel.h +++ b/indra/newview/lltoastnotifypanel.h @@ -49,6 +49,9 @@ class LLNotificationForm; * Notification panel should be used for notifications that require a response from the user. * * Replaces class LLNotifyBox. + * + * @deprecated this class will be removed after all toast panel types are + * implemented in separate classes. */ class LLToastNotifyPanel: public LLToastPanel { @@ -60,6 +63,8 @@ public: * @param rect an initial rectangle of the toast panel. * If it is null then a loaded from xml rectangle will be used. * @see LLNotification + * @deprecated if you intend to instantiate LLToastNotifyPanel - it's point to + * implement right class for desired toast panel. @see LLGenericTipPanel as example. */ LLToastNotifyPanel(LLNotificationPtr& pNotification, const LLRect& rect = LLRect::null); virtual ~LLToastNotifyPanel(); diff --git a/indra/newview/lltoastpanel.cpp b/indra/newview/lltoastpanel.cpp index fc69157a40..d142a0665b 100644 --- a/indra/newview/lltoastpanel.cpp +++ b/indra/newview/lltoastpanel.cpp @@ -2,32 +2,37 @@ * @file lltoastpanel.cpp * @brief Creates a panel of a specific kind for a toast * - * $LicenseInfo:firstyear=2000&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2000&license=viewergpl$ + * + * Copyright (c) 2000-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ #include "llviewerprecompiledheaders.h" #include "llpanelgenerictip.h" -#include "llpanelonlinestatus.h" #include "llnotifications.h" #include "lltoastpanel.h" @@ -92,19 +97,9 @@ LLToastPanel* LLToastPanel::buidPanelFromNotification( { LLToastPanel* res = NULL; - //process tip toast panels - if ("notifytip" == notification->getType()) + if (notification->getName() == "SystemMessageTip") { - // if it is online/offline notification - if ("FriendOffline" == notification->getName() || "FriendOnline" == notification->getName()) - { - res = new LLPanelOnlineStatus(notification); - } - // in all other case we use generic tip panel - else - { - res = new LLPanelGenericTip(notification); - } + res = new LLPanelGenericTip(notification); } /* else if(...) diff --git a/indra/newview/lltoastpanel.h b/indra/newview/lltoastpanel.h index 346e014d73..54243e52fa 100644 --- a/indra/newview/lltoastpanel.h +++ b/indra/newview/lltoastpanel.h @@ -2,25 +2,31 @@ * @file lltoastpanel.h * @brief Creates a panel of a specific kind for a toast. * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2003&license=viewergpl$ + * + * Copyright (c) 2003-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ 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 2cc8f233e4..506cebfe73 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -2,25 +2,31 @@ * @file llviewerfloaterreg.cpp * @brief LLViewerFloaterReg class registers floaters used in the viewer * - * $LicenseInfo:firstyear=2007&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2007&license=viewergpl$ + * + * Copyright (c) 2007-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ @@ -43,7 +49,6 @@ #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" -#include "llfloaterbuycurrencyhtml.h" #include "llfloaterbuyland.h" #include "llfloaterbulkpermission.h" #include "llfloaterbump.h" @@ -97,7 +102,6 @@ #include "llfloateruipreview.h" #include "llfloaterurldisplay.h" #include "llfloatervoicedevicesettings.h" -#include "llfloatervoiceeffect.h" #include "llfloaterwater.h" #include "llfloaterwhitelistentry.h" #include "llfloaterwindlight.h" @@ -137,7 +141,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("beacons", "floater_beacons.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBeacons>); LLFloaterReg::add("bulk_perms", "floater_bulk_perms.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBulkPermission>); LLFloaterReg::add("buy_currency", "floater_buy_currency.xml", &LLFloaterBuyCurrency::buildFloater); - LLFloaterReg::add("buy_currency_html", "floater_buy_currency_html.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyCurrencyHTML>); LLFloaterReg::add("buy_land", "floater_buy_land.xml", &LLFloaterBuyLand::buildFloater); LLFloaterReg::add("buy_object", "floater_buy_object.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuy>); LLFloaterReg::add("buy_object_contents", "floater_buy_contents.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuyContents>); @@ -250,8 +253,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>); - LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); - + LLFloaterReg::add("whitelist_entry", "floater_whitelist_entry.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWhiteListEntry>); LLFloaterWindowSizeUtil::registerFloater(); LLFloaterReg::add("world_map", "floater_world_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterWorldMap>); 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..58138d9917 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1286,7 +1286,30 @@ void LLViewerMedia::setOpenIDCookie() { if(!sOpenIDCookie.empty()) { - getCookieStore()->setCookiesFromHost(sOpenIDCookie, sOpenIDURL.mAuthority); + // The LLURL can give me the 'authority', which is of the form: [username[:password]@]hostname[:port] + // We want just the hostname for the cookie code, but LLURL doesn't seem to have a way to extract that. + // We therefore do it here. + std::string authority = sOpenIDURL.mAuthority; + std::string::size_type host_start = authority.find('@'); + if(host_start == std::string::npos) + { + // no username/password + host_start = 0; + } + else + { + // Hostname starts after the @. + // (If the hostname part is empty, this may put host_start at the end of the string. In that case, it will end up passing through an empty hostname, which is correct.) + ++host_start; + } + std::string::size_type host_end = authority.rfind(':'); + if((host_end == std::string::npos) || (host_end < host_start)) + { + // no port + host_end = authority.size(); + } + + getCookieStore()->setCookiesFromHost(sOpenIDCookie, authority.substr(host_start, host_end - host_start)); } } @@ -3252,8 +3275,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 cb3f3c8edd..0cd69d892f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -32,6 +32,7 @@ #include "llviewerprecompiledheaders.h" #include "llviewermessage.h" +#include "boost/lexical_cast.hpp" #include "llanimationstates.h" #include "llaudioengine.h" @@ -71,7 +72,6 @@ #include "llnotifications.h" #include "llnotificationsutil.h" #include "llpanelgrouplandmoney.h" -#include "llpanelplaces.h" #include "llrecentpeople.h" #include "llscriptfloater.h" #include "llselectmgr.h" @@ -692,6 +692,52 @@ bool join_group_response(const LLSD& notification, const LLSD& response) return false; } + +static void highlight_inventory_items_in_panel(const std::vector<LLUUID>& items, LLInventoryPanel *inventory_panel) +{ + if (NULL == inventory_panel) return; + + for (std::vector<LLUUID>::const_iterator item_iter = items.begin(); + item_iter != items.end(); + ++item_iter) + { + const LLUUID& item_id = (*item_iter); + if(!highlight_offered_item(item_id)) + { + continue; + } + + LLInventoryItem* item = gInventory.getItem(item_id); + llassert(item); + if (!item) { + continue; + } + + LL_DEBUGS("Inventory_Move") << "Highlighting inventory item: " << item->getName() << ", " << item_id << LL_ENDL; + LLFolderView* fv = inventory_panel->getRootFolder(); + if (fv) + { + LLFolderViewItem* fv_item = fv->getItemByID(item_id); + if (fv_item) + { + LLFolderViewItem* fv_folder = fv_item->getParentFolder(); + if (fv_folder) + { + // Parent folders can be different in case of 2 consecutive drag and drop + // operations when the second one is started before the first one completes. + LL_DEBUGS("Inventory_Move") << "Open folder: " << fv_folder->getName() << LL_ENDL; + fv_folder->setOpen(TRUE); + if (fv_folder->isSelected()) + { + fv->changeSelection(fv_folder, FALSE); + } + } + fv->changeSelection(fv_item, TRUE); + } + } + } +} + static LLNotificationFunctorRegistration jgr_1("JoinGroup", join_group_response); static LLNotificationFunctorRegistration jgr_2("JoinedTooManyGroupsMember", join_group_response); static LLNotificationFunctorRegistration jgr_3("JoinGroupCanAfford", join_group_response); @@ -700,10 +746,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); @@ -714,6 +763,108 @@ private: std::string mFromName; }; +/** + * Class to observe adding of new items moved from the world to user's inventory to select them in inventory. + * + * We can't create it each time items are moved because "drop" event is sent separately for each + * element even while multi-dragging. We have to have the only instance of the observer. See EXT-4347. + */ +class LLViewerInventoryMoveFromWorldObserver : public LLInventoryMoveFromWorldObserver +{ +public: + LLViewerInventoryMoveFromWorldObserver() + : LLInventoryMoveFromWorldObserver() + , mActivePanel(NULL) + { + + } + + void setMoveIntoFolderID(const LLUUID& into_folder_uuid) {mMoveIntoFolderID = into_folder_uuid; } + +private: + /*virtual */void onAssetAdded(const LLUUID& asset_id) + { + // Store active Inventory panel. + mActivePanel = LLInventoryPanel::getActiveInventoryPanel(); + + // Store selected items (without destination folder) + mSelectedItems.clear(); + mActivePanel->getRootFolder()->getSelectionList(mSelectedItems); + mSelectedItems.erase(mMoveIntoFolderID); + } + + /** + * Selects added inventory items watched by their Asset UUIDs if selection was not changed since + * all items were started to watch (dropped into a folder). + */ + void done() + { + // if selection is not changed since watch started lets hightlight new items. + if (mActivePanel && !isSelectionChanged()) + { + LL_DEBUGS("Inventory_Move") << "Selecting new items..." << LL_ENDL; + mActivePanel->clearSelection(); + highlight_inventory_items_in_panel(mAddedItems, mActivePanel); + } + } + + /** + * Returns true if selected inventory items were changed since moved inventory items were started to watch. + */ + bool isSelectionChanged() + { + const LLInventoryPanel * const current_active_panel = LLInventoryPanel::getActiveInventoryPanel(); + + if (NULL == mActivePanel || current_active_panel != mActivePanel) + { + return true; + } + + // get selected items (without destination folder) + selected_items_t selected_items; + mActivePanel->getRootFolder()->getSelectionList(selected_items); + selected_items.erase(mMoveIntoFolderID); + + // compare stored & current sets of selected items + selected_items_t different_items; + std::set_symmetric_difference(mSelectedItems.begin(), mSelectedItems.end(), + selected_items.begin(), selected_items.end(), std::inserter(different_items, different_items.begin())); + + LL_DEBUGS("Inventory_Move") << "Selected firstly: " << mSelectedItems.size() + << ", now: " << selected_items.size() << ", difference: " << different_items.size() << LL_ENDL; + + return different_items.size() > 0; + } + + LLInventoryPanel *mActivePanel; + typedef std::set<LLUUID> selected_items_t; + selected_items_t mSelectedItems; + + /** + * UUID of FolderViewFolder into which watched items are moved. + * + * Destination FolderViewFolder becomes selected while mouse hovering (when dragged items are dropped). + * + * If mouse is moved out it set unselected and number of selected items is changed + * even if selected items in Inventory stay the same. + * So, it is used to update stored selection list. + * + * @see onAssetAdded() + * @see isSelectionChanged() + */ + LLUUID mMoveIntoFolderID; +}; + +LLViewerInventoryMoveFromWorldObserver* gInventoryMoveObserver = NULL; + +void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid) +{ + start_new_inventory_observer(); + + gInventoryMoveObserver->setMoveIntoFolderID(into_folder_uuid); + gInventoryMoveObserver->watchAsset(inv_item->getAssetUUID()); +} + //unlike the FetchObserver for AgentOffer, we only make one //instance of the AddedObserver for TaskOffers //and it never dies. We do this because we don't know the UUID of @@ -724,6 +875,33 @@ class LLOpenTaskOffer : public LLInventoryAddedObserver protected: /*virtual*/ void done() { + for (uuid_vec_t::iterator it = mAdded.begin(); it != mAdded.end();) + { + const LLUUID& item_uuid = *it; + bool was_moved = false; + LLInventoryObject* added_object = gInventory.getObject(item_uuid); + if (added_object) + { + // cast to item to get Asset UUID + LLInventoryItem* added_item = dynamic_cast<LLInventoryItem*>(added_object); + if (added_item) + { + const LLUUID& asset_uuid = added_item->getAssetUUID(); + if (gInventoryMoveObserver->isAssetWatched(asset_uuid)) + { + LL_DEBUGS("Inventory_Move") << "Found asset UUID: " << asset_uuid << LL_ENDL; + was_moved = true; + } + } + } + + if (was_moved) + { + it = mAdded.erase(it); + } + else ++it; + } + open_inventory_offer(mAdded, ""); mAdded.clear(); } @@ -752,13 +930,21 @@ void start_new_inventory_observer() gNewInventoryObserver = new LLOpenTaskOffer; gInventory.addObserver(gNewInventoryObserver); } + + if (!gInventoryMoveObserver) //inventory move from the world observer + { + // Observer is deleted by gInventory + gInventoryMoveObserver = new LLViewerInventoryMoveFromWorldObserver; + gInventory.addObserver(gInventoryMoveObserver); + } } -class LLDiscardAgentOffer : public LLInventoryFetchComboObserver +class LLDiscardAgentOffer : public LLInventoryFetchItemsObserver { LOG_CLASS(LLDiscardAgentOffer); public: LLDiscardAgentOffer(const LLUUID& folder_id, const LLUUID& object_id) : + LLInventoryFetchItemsObserver(object_id), mFolderID(folder_id), mObjectID(object_id) {} virtual ~LLDiscardAgentOffer() {} @@ -916,9 +1102,12 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) } else if("group_offer" == from_name) { - // do not open inventory when we open group notice attachment because - // we already opened landmark info panel // "group_offer" is passed by LLOpenTaskGroupOffer + // Notification about added landmark will be generated under the "from_name.empty()" called from LLOpenTaskOffer::done(). + LLSD args; + args["type"] = "landmark"; + args["id"] = item_id; + LLSideTray::getInstance()->showPanel("panel_places", args); continue; } @@ -929,28 +1118,6 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) args["LANDMARK_NAME"] = item->getName(); args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); LLNotificationsUtil::add("LandmarkCreated", args); - // Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed. - // If the panel is closed we don't reopen it until created landmark is loaded. - //TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here - LLPanelPlaces *places_panel = dynamic_cast<LLPanelPlaces*>(LLSideTray::getInstance()->getPanel("panel_places")); - if (places_panel) - { - // Landmark creation handling is moved to LLPanelPlaces::showAddedLandmarkInfo() - // TODO* LLPanelPlaces dependency is going to be removed. See EXT-4347. - //if("create_landmark" == places_panel->getPlaceInfoType() && !places_panel->getItem()) - //{ - // places_panel->setItem(item); - //} - //else - // we are opening a group notice attachment - if("create_landmark" != places_panel->getPlaceInfoType()) - { - LLSD args; - args["type"] = "landmark"; - args["id"] = item_id; - LLSideTray::getInstance()->showPanel("panel_places", args); - } - } } } break; @@ -1204,11 +1371,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(); } @@ -1265,13 +1430,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(); } @@ -1602,11 +1763,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(); } @@ -1698,6 +1857,53 @@ protected: } }; +static void parse_lure_bucket(const std::string& bucket, + U64& region_handle, + LLVector3& pos, + LLVector3& look_at, + U8& region_access) +{ + // tokenize the bucket + typedef boost::tokenizer<boost::char_separator<char> > tokenizer; + boost::char_separator<char> sep("|", "", boost::keep_empty_tokens); + tokenizer tokens(bucket, sep); + tokenizer::iterator iter = tokens.begin(); + + S32 gx = boost::lexical_cast<S32>((*(iter)).c_str()); + S32 gy = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 rx = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 ry = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 rz = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 lx = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 ly = boost::lexical_cast<S32>((*(++iter)).c_str()); + S32 lz = boost::lexical_cast<S32>((*(++iter)).c_str()); + + // Grab region access + region_access = SIM_ACCESS_MIN; + if (++iter != tokens.end()) + { + std::string access_str((*iter).c_str()); + LLStringUtil::trim(access_str); + if ( access_str == "A" ) + { + region_access = SIM_ACCESS_ADULT; + } + else if ( access_str == "M" ) + { + region_access = SIM_ACCESS_MATURE; + } + else if ( access_str == "PG" ) + { + region_access = SIM_ACCESS_PG; + } + } + + pos.setVec((F32)rx, (F32)ry, (F32)rz); + look_at.setVec((F32)lx, (F32)ly, (F32)lz); + + region_handle = to_region_handle(gx, gy); +} + void process_improved_im(LLMessageSystem *msg, void **user_data) { if (gNoRender) @@ -2121,10 +2327,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 @@ -2230,10 +2434,13 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mFromID = from_id ^ gAgent.getSessionID(); } + chat.mSourceType = CHAT_SOURCE_OBJECT; + if(SYSTEM_FROM == name) { // System's UUID is NULL (fixes EXT-4766) chat.mFromID = LLUUID::null; + chat.mSourceType = CHAT_SOURCE_SYSTEM; } LLSD query_string; @@ -2250,7 +2457,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mURL = link.str(); chat.mText = message; - chat.mSourceType = CHAT_SOURCE_OBJECT; // Note: lie to Nearby Chat, pretending that this is NOT an IM, because // IMs from obejcts don't open IM sessions. @@ -2329,10 +2535,19 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } else { + LLVector3 pos, look_at; + U64 region_handle; + U8 region_access; + std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size); + parse_lure_bucket(region_info, region_handle, pos, look_at, region_access); + + std::string region_access_str = LLViewerRegion::accessToString(region_access); + LLSD args; // *TODO: Translate -> [FIRST] [LAST] (maybe) args["NAME_SLURL"] = LLSLURL::buildCommand("agent", from_id, "about"); args["MESSAGE"] = message; + args["MATURITY"] = region_access_str; LLSD payload; payload["from_id"] = from_id; payload["lure_id"] = session_id; @@ -2847,7 +3062,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); @@ -2929,9 +3146,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(); } @@ -4554,11 +4771,12 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) if(boost::regex_match(desc, matches, expr)) { // Name of full localizable notification string - // there are three types of this string- with name of receiver and reason of payment, - // without name and without reason (but not simultaneously) + // there are four types of this string- with name of receiver and reason of payment, + // without name and without reason (both may also be absent simultaneously). // example of string without name - You paid L$100 to create a group. // example of string without reason - You paid Smdby Linden L$100. // example of string with reason and name - You paid Smbdy Linden L$100 for a land access pass. + // example of string with no info - You paid L$50. std::string line = "you_paid_ldollars_no_name"; // arguments of string which will be in notification @@ -4579,7 +4797,7 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) std::string reason = std::string(matches[3]); if (reason.empty()) { - line = "you_paid_ldollars_no_reason"; + line = name.empty() ? "you_paid_ldollars_no_info" : "you_paid_ldollars_no_reason"; } else { @@ -4623,6 +4841,10 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD& gSavedSettings.setU32("PreferredMaturity", preferredMaturity); gAgent.sendMaturityPreferenceToServer(preferredMaturity); + // notify user that the maturity preference has been changed + LLSD args; + args["RATING"] = LLViewerRegion::accessToString(preferredMaturity); + LLNotificationsUtil::add("PreferredMaturityChanged", args); } return false; diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 4015cca77b..7c021dc05f 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -208,6 +208,8 @@ void open_inventory_offer(const uuid_vec_t& items, const std::string& from_name) // Returns false if item is not found. bool highlight_offered_item(const LLUUID& item_id); +void set_dad_inventory_item(LLInventoryItem* inv_item, const LLUUID& into_folder_uuid); + struct LLOfferInfo { LLOfferInfo() diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 660bb93562..a591cc1e14 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -2,25 +2,31 @@ * @file llviewerparcelmgr.cpp * @brief Viewer-side representation of owned land * - * $LicenseInfo:firstyear=2002&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index c15dbeb8c6..8b87254f81 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -697,15 +697,6 @@ BOOL LLVOAvatarSelf::setParamWeight(LLViewerVisualParam *param, F32 weight, BOOL /*virtual*/ void LLVOAvatarSelf::updateVisualParams() { - for (U32 type = 0; type < WT_COUNT; type++) - { - LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); - if (wearable) - { - wearable->writeToAvatar(); - } - } - LLVOAvatar::updateVisualParams(); } @@ -716,7 +707,14 @@ void LLVOAvatarSelf::idleUpdateAppearanceAnimation() gAgentWearables.animateAllWearableParams(calcMorphAmount(), FALSE); // apply wearable visual params to avatar - updateVisualParams(); + for (U32 type = 0; type < WT_COUNT; type++) + { + LLWearable *wearable = gAgentWearables.getTopWearable((EWearableType)type); + if (wearable) + { + wearable->writeToAvatar(); + } + } //allow avatar to process updates LLVOAvatar::idleUpdateAppearanceAnimation(); 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/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 0c37bb6eb1..151180aae7 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -900,14 +900,32 @@ void LLWorldMapView::drawFrustum() // fade out in distance. gGL.begin( LLRender::TRIANGLES ); { - LLVector2 cam_lookat(LLViewerCamera::instance().getAtAxis().mV[VX], LLViewerCamera::instance().getAtAxis().mV[VY]); - LLVector2 cam_left(LLViewerCamera::instance().getLeftAxis().mV[VX], LLViewerCamera::instance().getLeftAxis().mV[VY]); + // get camera look at and left axes + LLVector3 at_axis = LLViewerCamera::instance().getAtAxis(); + LLVector3 left_axis = LLViewerCamera::instance().getLeftAxis(); + + // grab components along XY plane + LLVector2 cam_lookat(at_axis.mV[VX], at_axis.mV[VY]); + LLVector2 cam_left(left_axis.mV[VX], left_axis.mV[VY]); + + // but, when looking near straight up or down... + if (is_approx_zero(cam_lookat.magVecSquared())) + { + //...just fall back to looking down the x axis + cam_lookat = LLVector2(1.f, 0.f); // x axis + cam_left = LLVector2(0.f, 1.f); // y axis + } + + // normalize to unit length + cam_lookat.normVec(); + cam_left.normVec(); gGL.color4f(1.f, 1.f, 1.f, 0.25f); gGL.vertex2f( 0, 0 ); gGL.color4f(1.f, 1.f, 1.f, 0.02f); + // use 2d camera vectors to render frustum triangle LLVector2 vert = cam_lookat * far_clip_pixels + cam_left * half_width_pixels; gGL.vertex2f(vert.mV[VX], vert.mV[VY]); diff --git a/indra/newview/res/resource.h b/indra/newview/res/resource.h index 28813be896..6cabd5e10b 100644 --- a/indra/newview/res/resource.h +++ b/indra/newview/res/resource.h @@ -1,25 +1,31 @@ /** * @file resource.h * - * $LicenseInfo:firstyear=2001&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2009, Linden Research, Inc. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. * $/LicenseInfo$ */ diff --git a/indra/newview/res/viewerRes.rc b/indra/newview/res/viewerRes.rc index ecdcacec46..12a09392f6 100644 --- a/indra/newview/res/viewerRes.rc +++ b/indra/newview/res/viewerRes.rc @@ -119,9 +119,9 @@ TOOLPIPETTE CURSOR "toolpipette.cur" TOOLPLAY CURSOR "toolplay.cur" TOOLPAUSE CURSOR "toolpause.cur" TOOLMEDIAOPEN CURSOR "toolmediaopen.cur" +TOOLBUY CURSOR "toolbuy.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/da/panel_login.xml b/indra/newview/skins/default/xui/da/panel_login.xml index d4bf9a7d78..1e60174909 100644 --- a/indra/newview/skins/default/xui/da/panel_login.xml +++ b/indra/newview/skins/default/xui/da/panel_login.xml @@ -11,10 +11,14 @@ </panel.string> <layout_stack name="login_widgets"> <layout_panel name="login"> - <text name="username_text"> - Brugernavn: + <text name="first_name_text"> + Fornavn: </text> - <line_editor label="Brugernavn" name="username_edit" tool_tip="[SECOND_LIFE] Brugernavn"/> + <line_editor label="Fornavn" name="first_name_edit" tool_tip="[SECOND_LIFE] First Name"/> + <text name="last_name_text"> + Efternavn: + </text> + <line_editor label="Efternavn" name="last_name_edit" tool_tip="[SECOND_LIFE] Last Name"/> <text name="password_text"> Password: </text> 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 bac3ea86f1..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,321 +1,306 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater legacy_header_height="18" - height="700" + height="660" layout="topleft" name="avatar_texture_debug" help_topic="avatar_texture_debug" title="AVATAR TEXTURES" - width="940" - can_resize="true"> + width="1253"> <floater.string name="InvalidAvatar"> INVALID AVATAR </floater.string> - - <scroll_container - color="DkGray2" - opaque="true" - follows="all" - height="680" - layout="topleft" - left="5" - top_pad="15" - name="profile_scroll" - reserve_scroll_corner="false" - width="930"> - <panel - name="scroll_content_panel" - follows="left|top" - min_height="300" - layout="topleft" - top="0" - background_visible="false" - left="0" - height="680"> <text type="string" length="1" height="16" layout="topleft" - left="15" + left="30" name="label" - top="20" - width="90"> - Baked -Textures + top="40" + width="80"> + Baked Textures </text> <text type="string" length="1" height="16" layout="topleft" - left_pad="22" + left_pad="50" name="composite_label" top_delta="0" width="120"> - Composite -Textures + Composite Textures </text> <button - height="40" + height="20" label="Dump IDs to Console" label_selected="Dump" layout="topleft" + left_pad="530" name="Dump" top_delta="0" - right="-10" width="150" /> + <scroll_container + color="DkGray2" + opaque="true" + follows="all" + height="590" + layout="topleft" + left="5" + top_pad="5" + name="profile_scroll" + reserve_scroll_corner="false" + width="1240"> <panel name="scroll_content_panel" follows="left|top" min_height="300" layout="topleft" - top="43" + top="0" background_visible="false" - height="930" + height="950" left="0" - width="1230"> - + width="1250"> <texture_picker - height="103" + height="143" label="Hair" layout="topleft" left="10" name="hair-baked" top="17" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Hair" layout="topleft" - left_pad="21" + left_pad="7" name="hair_grain" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Hair Alpha" layout="topleft" left_pad="7" name="hair_alpha" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Head" layout="topleft" left="10" name="head-baked" - top_delta="100" - width="92" /> + top="167" + width="128" /> <texture_picker - height="103" + height="143" label="Makeup" layout="topleft" - left_pad="21" + left_pad="7" name="head_bodypaint" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Head Alpha" layout="topleft" left_pad="7" name="head_alpha" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Head Tattoo" layout="topleft" left_pad="7" name="head_tattoo" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Eyes" layout="topleft" left="10" name="eyes-baked" - top_delta="100" - width="92" /> + top="317" + width="128" /> <texture_picker - height="103" + height="143" label="Eye" layout="topleft" - left_pad="21" + left_pad="7" name="eyes_iris" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Eyes Alpha" layout="topleft" left_pad="7" name="eyes_alpha" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Upper Body" layout="topleft" left="10" name="upper-baked" - top_delta="100" - width="92" /> + top="467" + width="128" /> <texture_picker - height="103" - label="Upper BodyPaint" + height="143" + label="Upper Body Bodypaint" layout="topleft" - left_pad="21" + left_pad="7" name="upper_bodypaint" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Undershirt" layout="topleft" left_pad="7" name="upper_undershirt" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Gloves" layout="topleft" left_pad="7" name="upper_gloves" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Shirt" layout="topleft" left_pad="7" name="upper_shirt" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Upper Jacket" layout="topleft" left_pad="7" name="upper_jacket" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Upper Alpha" layout="topleft" left_pad="7" name="upper_alpha" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Upper Tattoo" layout="topleft" left_pad="7" name="upper_tattoo" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Lower Body" layout="topleft" left="10" name="lower-baked" - top_delta="100" - width="92" /> + top="617" + width="128" /> <texture_picker - height="103" - label="Lower BodyPaint" + height="143" + label="Lower Body Bodypaint" layout="topleft" - left_pad="21" + left_pad="7" name="lower_bodypaint" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Underpants" layout="topleft" left_pad="7" name="lower_underpants" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Socks" layout="topleft" left_pad="7" name="lower_socks" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Shoes" layout="topleft" left_pad="7" name="lower_shoes" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Pants" layout="topleft" left_pad="7" name="lower_pants" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Jacket" layout="topleft" left_pad="7" name="lower_jacket" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Lower Alpha" layout="topleft" left_pad="7" name="lower_alpha" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Lower Tattoo" layout="topleft" left_pad="7" name="lower_tattoo" top_delta="0" - width="92" /> + width="128" /> <texture_picker - height="103" + height="143" label="Skirt" layout="topleft" left="10" name="skirt-baked" - top_delta="100" - width="92" /> + top="767" + width="128" /> <texture_picker - height="103" + height="143" label="Skirt" layout="topleft" - left_pad="21" + left_pad="7" name="skirt" top_delta="0" - width="92" /> -</panel> + width="128" /> </panel> </scroll_container> -</floater>
\ No newline at end of file +</floater> diff --git a/indra/newview/skins/default/xui/en/floater_customize.xml b/indra/newview/skins/default/xui/en/floater_customize.xml index 01bced81d0..32460e937d 100644 --- a/indra/newview/skins/default/xui/en/floater_customize.xml +++ b/indra/newview/skins/default/xui/en/floater_customize.xml @@ -11,7 +11,7 @@ save_rect="true" title="APPEARANCE" top_delta="-185" - width="600"> + width="524"> <tab_container height="517" layout="topleft" @@ -21,7 +21,7 @@ tab_position="left" tab_height="50" top="26" - width="580"> + width="506"> <text type="string" length="1" @@ -65,15 +65,15 @@ mouse_opaque="true" width="16" /> <button - follows="left|top" + follows="right|bottom" height="23" - label="Create New Shape" - label_selected="Create New Shape" + label="Revert" + label_selected="Revert" layout="topleft" - left="10" - name="Create New" - top="104" - width="160" /> + right="390" + name="Revert" + top="477" + width="82" /> <button follows="left|top" height="23" @@ -280,46 +280,46 @@ type="string" length="1" top="488" - follows="left|top" + follows="left|top|right" font="SansSerif" halign="right" height="23" layout="topleft" - left="10" name="Item Action Label" - width="130"> + right="90" + width="100"> Shape: </text> <button - follows="left|bottom" + follows="left|top" + height="23" + label="Create New Shape" + label_selected="Create New Shape" + layout="topleft" + left="10" + name="Create New" + top="104" + width="160" /> + <button + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" name="Save" - left_pad="2" + right="186" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" name="Save As" top="477" - left_pad="3" + right="304" width="115" /> - <button - follows="left|bottom" - height="23" - label="Revert" - label_selected="Revert" - layout="topleft" - left_pad="3" - name="Revert" - top="477" - width="120" /> </panel> <panel border="false" @@ -352,16 +352,6 @@ <button follows="left|top" height="23" - label="Create New Skin" - label_selected="Create New Skin" - layout="topleft" - left_delta="0" - name="Create New" - top_delta="-249" - width="160" /> - <button - follows="left|top" - height="23" label="Skin Color" label_selected="Skin Color" layout="topleft" @@ -489,6 +479,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + top="488" + follows="left|top|right" + font="SansSerif" + halign="right" + height="23" + layout="topleft" + name="Item Action Label" + right="90" + width="100"> + Skin: + </text> <texture_picker allow_no_texture="true" can_apply_immediately="true" @@ -528,50 +532,46 @@ tool_tip="Click to choose a picture" top_delta="102" width="82" /> - <text - type="string" - length="1" - top="488" + <button follows="left|top" - font="SansSerif" - halign="right" height="23" + label="Create New Skin" + label_selected="Create New Skin" layout="topleft" - left="10" - name="Item Action Label" - width="130"> - Skin: - </text> + left_delta="0" + name="Create New" + top_delta="-249" + width="160" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -729,6 +729,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + top="488" + follows="left|top|right" + font="SansSerif" + halign="right" + height="23" + layout="topleft" + name="Item Action Label" + right="90" + width="100"> + Hair: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -751,50 +765,36 @@ name="Create New" top_delta="-89" width="160" /> - <text - type="string" - length="1" - top="488" - follows="left|top" - font="SansSerif" - halign="right" - height="23" - layout="topleft" - name="Item Action Label" - left="10" - width="130"> - Hair: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -914,6 +914,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Eyes: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -935,50 +949,36 @@ name="Create New" top="66" width="160" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - left="10" - width="130"> - Eyes: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <text type="string" @@ -1063,50 +1063,36 @@ name="Create New" top="66" width="160" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - left="10" - width="130"> - Shirt: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> <text type="string" length="1" @@ -1197,6 +1183,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Shirt: + </text> </panel> <panel border="false" @@ -1266,50 +1266,36 @@ name="Create New" top="66" width="160" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - name="Item Action Label" - left="10" - width="130"> - Pants: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> <text type="string" length="1" @@ -1400,6 +1386,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Pants: + </text> </panel> <panel border="false" @@ -1528,6 +1528,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Shoes: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1559,50 +1573,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Shoes: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -1731,6 +1731,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Socks: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1762,50 +1776,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Socks: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -1934,6 +1934,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Jacket: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -1976,50 +1990,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Jacket: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -2148,6 +2148,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Gloves: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2179,50 +2193,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Gloves: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -2351,6 +2351,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Undershirt: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2382,50 +2396,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Undershirt: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -2554,6 +2554,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Underpants: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2585,50 +2599,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Underpants: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -2757,6 +2757,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Skirt: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -2788,50 +2802,36 @@ name="Take Off" top_pad="4" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Skirt: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -2960,6 +2960,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Tattoo: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -3004,50 +3018,36 @@ top_pad="4" left="10" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Tattoo: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> <panel border="false" @@ -3176,6 +3176,20 @@ width="373"> You do not have permission to modify this wearable. </text> + <text + type="string" + length="1" + bottom="4" + follows="left|bottom|right" + font="SansSerif" + halign="right" + height="23" + layout="bottomleft" + name="Item Action Label" + right="90" + width="100"> + Alpha: + </text> <texture_picker can_apply_immediately="true" default_image_name="Default" @@ -3285,61 +3299,47 @@ left="10" top_pad="20" width="82" /> - <text - type="string" - length="1" - bottom="4" - follows="left|bottom" - font="SansSerif" - halign="right" - height="23" - layout="bottomleft" - left="10" - name="Item Action Label" - width="130"> - Alpha: - </text> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save" label_selected="Save" layout="topleft" - left_pad="2" + right="186" name="Save" top="477" width="82" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Save As..." label_selected="Save As..." layout="topleft" - left_pad="3" + right="304" name="Save As" top="477" width="115" /> <button - follows="left|bottom" + follows="right|bottom" height="23" label="Revert" label_selected="Revert" layout="topleft" - left_pad="3" + right="390" name="Revert" top="477" - width="120" /> + width="82" /> </panel> </tab_container> <scroll_container follows="left|top|right|bottom" height="409" layout="topleft" - left="247" + left="211" mouse_opaque="false" name="panel_container" top="92" - width="330"> + width="292"> <scrolling_panel_list follows="left|bottom" layout="topleft" @@ -3355,7 +3355,7 @@ name="script_info" tool_tip="Show scripts attached to your avatar" left="13" - width="90" ></button> + width="90" /> <button bottom="574" follows="right|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml index 42a9ff551e..2c0c8d45b3 100644 --- a/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/en/floater_day_cycle_options.xml @@ -7,7 +7,7 @@ help_topic="day_cycle_floater" save_rect="true" title="DAY CYCLE EDITOR" - width="658"> + width="646"> <tab_container follows="left|top" height="255" @@ -16,7 +16,7 @@ name="Day Cycle Tabs" tab_position="top" top="20" - width="656"> + width="644"> <panel border="true" follows="left|top|right|bottom" @@ -27,7 +27,7 @@ mouse_opaque="false" name="Day Cycle" top="0" - width="654"> + width="642"> <multi_slider can_edit_text="true" control_name="WLTimeSlider" @@ -313,7 +313,7 @@ left="555" name="WLAddKey" top="30" - width="96" /> + width="80" /> <button height="20" label="Delete Key" @@ -322,7 +322,7 @@ left_delta="0" name="WLDeleteKey" top_pad="5" - width="96" /> + width="80" /> <text type="string" length="1" @@ -348,7 +348,7 @@ left="30" name="WLCurKeyTimeText" top="124" - width="105"> + width="100"> Key Time: </text> <spinner @@ -361,11 +361,11 @@ label="Hour" label_width="30" layout="topleft" - left_delta="25" + left_delta="0" max_val="100" name="WLCurKeyHour" top_pad="4" - width="74" /> + width="70" /> <spinner control_name="WLCurKeyMin" decimal_digits="0" @@ -402,7 +402,7 @@ left_delta="0" name="WLKeyPresets" top_pad="7" - width="205" /> + width="155" /> <view_border bevel_style="none" follows="top|left" @@ -410,7 +410,7 @@ layout="topleft" left="12" top="101" - width="240" /> + width="190" /> <text type="string" length="1" @@ -419,7 +419,7 @@ font="SansSerif" height="16" layout="topleft" - left_pad="15" + left="220" name="DayCycleText" top="114" width="120"> @@ -444,7 +444,7 @@ layout="topleft" left_delta="0" name="DayCycleText2" - top_pad="17" + top_pad="9" width="120"> Length of Cycle: </text> @@ -462,7 +462,7 @@ max_val="100" name="WLLengthOfDayHour" top_pad="4" - width="74" /> + width="70" /> <spinner control_name="WLLengthOfDayMin" decimal_digits="0" @@ -492,58 +492,57 @@ max_val="59" name="WLLengthOfDaySec" top_delta="0" - width="60"/> + width="60" /> <text type="string" - halign="right" length="1" border_visible="true" follows="left|top|right" font="SansSerif" height="16" layout="topleft" - left_delta="-23" + left="310" name="DayCycleText3" top="114" - width="85"> - Preview : + width="120"> + Preview: </text> <button height="20" label="Play" label_selected="Play" layout="topleft" - left="480" + left_delta="60" name="WLAnimSky" top_pad="5" - width="83" /> + width="50" /> <button height="20" label="Stop!" label_selected="Stop" layout="topleft" - left_pad="4" + left_pad="5" name="WLStopAnimSky" top_delta="0" - width="83" /> + width="50" /> <button height="20" label="Use Estate Time" label_selected="Go to Estate Time" layout="topleft" - left="480" + left_pad="5" name="WLUseLindenTime" - top_pad="9" - width="170" /> + top_delta="0" + width="150" /> <button height="20" label="Save Test Day" label_selected="Save Test Day" layout="topleft" - left_delta="0" + left="480" name="WLSaveDayCycle" - top_pad="9" - width="170" /> + top="175" + width="150" /> <button height="20" label="Load Test Day" @@ -551,8 +550,8 @@ layout="topleft" left_delta="0" name="WLLoadDayCycle" - top_pad="3" - width="170" /> + top_pad="5" + width="150" /> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 9db6568ee3..5ea207675b 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -119,7 +119,7 @@ No Answer. Please try again later. layout="topleft" left="77" name="leaving" - top="62" + top="52" width="315" word_wrap="true"> Leaving [CURRENT_CHAT]. diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml index 20629018e2..233ab2c1b2 100644 --- a/indra/newview/skins/default/xui/en/floater_world_map.xml +++ b/indra/newview/skins/default/xui/en/floater_world_map.xml @@ -2,7 +2,8 @@ <floater legacy_header_height="18" can_resize="true" - open_centered="true" + center_horiz="true" + center_vert="true" height="600" layout="topleft" min_height="520" @@ -178,16 +179,16 @@ width="90"> Land Sale </text> - <icon - color="0.5 0.25 1 1" + <icon + color="1 1 0.25 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="20" - top_pad="2" + left="41" + top_pad="-2" width="16" /> <text type="string" @@ -196,21 +197,21 @@ height="16" layout="topleft" left_pad="0" - name="auction_label" + name="by_owner_label" top_delta="3" - width="170"> - land auction + width="100"> + by owner </text> - <icon - color="1 1 0.25 1" + <icon + color="0.5 0.25 1 1" follows="top|right" height="16" image_name="legend.tga" layout="topleft" mouse_opaque="true" name="square2" - left="20" - top_pad="-5" + left="41" + top_pad="-3" width="16" /> <text type="string" @@ -219,10 +220,10 @@ height="16" layout="topleft" left_pad="0" - name="by_owner_label" + name="auction_label" top_delta="3" - width="100"> - by owner + width="170"> + land auction </text> <button @@ -306,7 +307,7 @@ initial_value="true" layout="topleft" left="135" - name="events_mature_chk" + name="event_mature_chk" top_pad="3" width="22" /> <icon @@ -328,7 +329,7 @@ top_delta="2" left_pad="3" layout="topleft" - name="events_mature_label" + name="mature_label" width="66"> Moderate </text> @@ -339,7 +340,7 @@ height="16" layout="topleft" left="135" - name="events_adult_chk" + name="event_adult_chk" top_pad="3" width="22" /> <icon @@ -361,7 +362,7 @@ top_delta="2" left_pad="3" layout="topleft" - name="events_adult_label" + name="adult_label" width="66"> Adult </text> @@ -395,7 +396,7 @@ <panel follows="right|top|bottom" - height="330" + height="310" top_pad="0" width="238" name="layout_panel_4"> @@ -534,69 +535,9 @@ <scroll_list.commit_callback function="WMap.SearchResult" /> </scroll_list> - <text - type="string" - length="1" - follows="right|bottom" - halign="right" - height="16" - layout="topleft" - left="25" - name="events_label" - top_pad="16" - width="70"> - Location: - </text> - <spinner - control_name="Teleport_Coordinate_X" - decimal_digits="0" - follows="right|bottom" - height="23" - increment="1" - initial_value="128" - layout="topleft" - left_delta="74" - max_val="255" - min_val="0" - name="teleport_coordinate_x" - width="44" > - <spinner.commit_callback - function="WMap.Coordinates" /> - </spinner> - <spinner - control_name="Teleport_Coordinate_Y" - decimal_digits="0" - follows="right|bottom" - height="23" - increment="1" - initial_value="128" - layout="topleft" - left_delta="47" - max_val="255" - min_val="0" - name="teleport_coordinate_y" > - <spinner.commit_callback - function="WMap.Coordinates" /> - </spinner> - <spinner - control_name="Teleport_Coordinate_Z" - decimal_digits="0" - follows="right|bottom" - height="23" - increment="1" - initial_value="128" - layout="topleft" - left_delta="47" - max_val="255" - min_val="0" - name="teleport_coordinate_z"> - <spinner.commit_callback - function="WMap.Coordinates" /> - </spinner> - <button + <button follows="right|bottom" height="23" - image_unselected="PushButton_On" label="Teleport" layout="topleft" left="25" @@ -633,6 +574,66 @@ <button.commit_callback function="WMap.ShowTarget" /> </button> + +<!-- <text + type="string" + length="1" + follows="bottom|right" + halign="left" + height="16" + top_pad="4" + left="25" + layout="topleft" + name="land_sale_label" + width="250"> + Location: + </text> + <spinner + decimal_digits="0" + follows="bottom|right" + increment="1" + initial_value="128" + layout="topleft" + top_pad="0" + left="25" + max_val="255" + name="spin x" + tool_tip="X coordinate of location to show on map" + width="48"> + <spinner.commit_callback + function="WMap.CommitLocation" /> + </spinner> + <spinner + decimal_digits="0" + follows="bottom|right" + height="16" + increment="1" + initial_value="128" + layout="topleft" + left_pad="2" + max_val="255" + name="spin y" + tool_tip="Y coordinate of location to show on map" + top_delta="0" + width="48" > + <spinner.commit_callback + function="WMap.CommitLocation" /> + </spinner> + <spinner + decimal_digits="0" + follows="bottom|right" + increment="1" + initial_value="0" + layout="topleft" + left_pad="2" + max_val="4096" + name="spin z" + tool_tip="Z coordinate of location to show on map" + top_delta="0" + width="48"> + <spinner.commit_callback + function="WMap.CommitLocation" /> + </spinner>--> </panel> <panel follows="right|bottom" 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 e2348375d5..5c30b9ee94 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_self.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -11,7 +11,8 @@ function="Object.Touch" /> <menu_item_call.on_enable function="Object.EnableTouch" - name="EnableTouch"/> + name="EnableTouch" + parameter="Touch" /> </menu_item_call> <!--menu_item_call label="Stand Up" @@ -43,67 +44,61 @@ <menu_item_call.on_enable function="Attachment.EnableDetach" /> </menu_item_call> - <menu_item_separator - layout="topleft" /> - - <menu_item_call -label="Stand Up" -layout="topleft" -name="Stand Up"> - <menu_item_call.on_click - function="Self.StandUp" - parameter="" /> - <menu_item_call.on_enable - function="Self.EnableStandUp" /> - </menu_item_call> - <menu_item_call - label="Change Outfit" - name="Change Outfit"> - <menu_item_call.on_click - function="CustomizeAvatar" /> - <menu_item_call.on_enable - function="Edit.EnableCustomizeAvatar" /> - </menu_item_call> - <menu_item_call label="Edit My Outfit" -layout="topleft" -name="Edit Outfit"> - <menu_item_call.on_click - function="EditOutfit" /> - <menu_item_call.on_enable - function="Edit.EnableCustomizeAvatar" /> - </menu_item_call> - <menu_item_call label="Edit My Shape" - layout="topleft" - name="Edit My Shape"> - <menu_item_call.on_click - function="EditShape" /> - <menu_item_call.on_enable - function="Edit.EnableEditShape" /> - </menu_item_call> - <menu_item_call - label="My Friends" - layout="topleft" - name="Friends..."> - <menu_item_call.on_click - function="SideTray.PanelPeopleTab" - parameter="friends_panel" /> - </menu_item_call> - <menu_item_call - label="My Groups" - layout="topleft" - name="Groups..."> - <menu_item_call.on_click - function="SideTray.PanelPeopleTab" - parameter="groups_panel" /> - </menu_item_call> - <menu_item_call - label="My Profile" - layout="topleft" - name="Profile..."> - <menu_item_call.on_click - function="ShowAgentProfile" - parameter="agent" /> - </menu_item_call> + <menu_item_call + enabled="false" + label="Drop" + layout="topleft" + name="Drop"> + <menu_item_call.on_click + function="Attachment.Drop" /> + <menu_item_call.on_enable + function="Attachment.EnableDrop" /> + </menu_item_call> + <menu_item_separator + layout="topleft" /> + + <menu_item_call + label="Stand Up" + layout="topleft" + name="Stand Up"> + <menu_item_call.on_click + function="Self.StandUp" + parameter="" /> + <menu_item_call.on_enable + function="Self.EnableStandUp" /> + </menu_item_call> + <menu_item_call + label="My Appearance" + name="Appearance..."> + <menu_item_call.on_click + function="CustomizeAvatar" /> + <menu_item_call.on_enable + function="Edit.EnableCustomizeAvatar" /> + </menu_item_call> + <menu_item_call + label="My Friends" + layout="topleft" + name="Friends..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="friends_panel" /> + </menu_item_call> + <menu_item_call + label="My Groups" + layout="topleft" + name="Groups..."> + <menu_item_call.on_click + function="SideTray.PanelPeopleTab" + parameter="groups_panel" /> + </menu_item_call> + <menu_item_call + label="My Profile" + layout="topleft" + name="Profile..."> + <menu_item_call.on_click + function="ShowAgentProfile" + parameter="agent" /> + </menu_item_call> <menu_item_call label="Debug Textures" name="Debug..."> @@ -112,16 +107,4 @@ name="Edit Outfit"> <menu_item_call.on_visible function="IsGodCustomerService"/> </menu_item_call> - <menu_item_separator - layout="topleft" /> - <menu_item_call - enabled="false" - label="Drop" - layout="topleft" - name="Drop"> - <menu_item_call.on_click - function="Attachment.Drop" /> - <menu_item_call.on_enable - function="Attachment.EnableDrop" /> - </menu_item_call> </context_menu> 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 d5b993152a..a21c1ac44b 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_self.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -183,30 +183,14 @@ </menu_item_call> </context_menu> <menu_item_call - label="Change Outfit" + label="My Appearance" layout="topleft" - name="Chenge Outfit"> + name="Appearance..."> <menu_item_call.on_click function="CustomizeAvatar" /> <menu_item_call.on_enable function="Edit.EnableCustomizeAvatar" /> </menu_item_call> - <menu_item_call label="Edit My Outfit" - layout="topleft" - name="Edit Outfit"> - <menu_item_call.on_click - function="EditOutfit" /> - <menu_item_call.on_enable - function="Edit.EnableCustomizeAvatar" /> - </menu_item_call> - <menu_item_call label="Edit My Shape" - layout="topleft" - name="Edit My Shape"> - <menu_item_call.on_click - function="EditShape" /> - <menu_item_call.on_enable - function="Edit.EnableEditShape" /> - </menu_item_call> <menu_item_call label="My Friends" layout="topleft" 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 ea18e02ca1..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 @@ -16,8 +16,8 @@ function="Self.EnableStandUp" /> </menu_item_call> <menu_item_call - label="Change Outfit" - name="change_outfit"> + label="My Appearance" + name="my_appearance"> <menu_item_call.on_click function="CustomizeAvatar" /> <menu_item_call.on_enable diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index c0046d8e28..5e1f6b58e8 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -410,14 +410,6 @@ parameter="open" /> </menu_item_call> <menu_item_call - label="Open Original" - layout="topleft" - name="Open Original"> - <menu_item_call.on_click - function="Inventory.DoToSelected" - parameter="open_original" /> - </menu_item_call> - <menu_item_call label="Properties" layout="topleft" name="Properties"> @@ -472,7 +464,7 @@ layout="topleft" name="Paste Separator" /> <menu_item_call - label="Delete" + label="Remove Link" layout="topleft" name="Remove Link"> <menu_item_call.on_click @@ -606,7 +598,7 @@ </menu_item_call> <menu_item_separator layout="topleft" - name="Wearable And Object Separator"/> + name="Attach Separator"/> <menu_item_call label="Detach From Yourself" layout="topleft" @@ -629,10 +621,10 @@ <menu_item_call label="Wear" layout="topleft" - name="Wearable And Object Wear"> + name="Object Wear"> <menu_item_call.on_click function="Inventory.DoToSelected" - parameter="wear" /> + parameter="attach" /> </menu_item_call> <menu label="Attach To" @@ -642,6 +634,9 @@ label="Attach To HUD" layout="topleft" name="Attach To HUD" /> + <menu_item_separator + layout="topleft" + name="Wearable Separator"/> <menu_item_call label="Edit" layout="topleft" @@ -651,12 +646,12 @@ parameter="edit" /> </menu_item_call> <menu_item_call - label="Add" + label="Wear" layout="topleft" - name="Wearable Add"> + name="Wearable Wear"> <menu_item_call.on_click function="Inventory.DoToSelected" - parameter="wear_add" /> + parameter="wear" /> </menu_item_call> <menu_item_call label="Take Off" diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index b6cc222e96..8b10c7b049 100644 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -18,16 +18,16 @@ name="Edit..."> <menu_item_call.on_click function="Object.Edit" /> - <menu_item_call.on_enable + <menu_item_call.on_visible function="EnableEdit"/> </menu_item_call> <menu_item_call label="Build" name="Build"> <menu_item_call.on_click - function="Object.Build" /> - <menu_item_call.on_enable - function="EnableEdit"/> + function="Object.Edit" /> + <menu_item_call.on_visible + function="VisibleBuild"/> </menu_item_call> <menu_item_call enabled="false" @@ -44,8 +44,11 @@ name="Object Sit"> <menu_item_call.on_click function="Object.SitOrStand" /> + <menu_item_call.on_visible + function="Object.SitVisible" /> <menu_item_call.on_enable - function="Object.EnableSit" /> + function="Object.EnableSitOrStand" + name="EnableSitOrStand" /> </menu_item_call> <menu_item_call enabled="false" @@ -53,8 +56,11 @@ name="Object Stand Up"> <menu_item_call.on_click function="Object.SitOrStand" /> + <menu_item_call.on_visible + function="Object.StandUpVisible" /> <menu_item_call.on_enable - function="Object.EnableStandUp" /> + function="Object.EnableSitOrStand" + name="EnableSitOrStand" /> </menu_item_call> <menu_item_call label="Object Profile" 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 4ed5807808..59c7f4ed85 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -6,41 +6,38 @@ label="Sort by Name" layout="topleft" name="SortByName"> - <on_check - function="ParticipantList.CheckItem" - parameter="is_sorted_by_name" /> - <on_click + <menu_item_check.on_click function="ParticipantList.Sort" parameter="sort_by_name" /> + <menu_item_check.on_check + function="ParticipantList.CheckItem" + parameter="is_sorted_by_name" /> </menu_item_check> <menu_item_check label="Sort by Recent Speakers" layout="topleft" name="SortByRecentSpeakers"> - <on_check - function="ParticipantList.CheckItem" - parameter="is_sorted_by_recent_speakers" /> - <on_click + <menu_item_check.on_click function="ParticipantList.Sort" parameter="sort_by_recent_speakers" /> + <menu_item_check.on_check + function="ParticipantList.CheckItem" + parameter="is_sorted_by_recent_speakers" /> </menu_item_check> <menu_item_call label="View Profile" layout="topleft" name="View Profile"> - <on_click + <menu_item_call.on_click function="Avatar.Profile" /> - <on_enable - function="ParticipantList.EnableItem" - parameter="can_view_profile" /> </menu_item_call> <menu_item_call label="Add Friend" layout="topleft" name="Add Friend"> - <on_click + <menu_item_call.on_click function="Avatar.AddFriend" /> - <on_enable + <menu_item_call.on_enable function="ParticipantList.EnableItem" parameter="can_add" /> </menu_item_call> @@ -48,9 +45,9 @@ label="IM" layout="topleft" name="IM"> - <on_click + <menu_item_call.on_click function="Avatar.IM" /> - <on_enable + <menu_item_call.on_enable function="ParticipantList.EnableItem" parameter="can_im" /> </menu_item_call> @@ -58,19 +55,20 @@ label="Call" layout="topleft" name="Call"> - <on_click + <menu_item_call.on_click function="Avatar.Call" /> - <on_enable + <menu_item_call.on_enable function="ParticipantList.EnableItem" parameter="can_call" /> </menu_item_call> <menu_item_call + enabled="true" label="Share" layout="topleft" name="Share"> - <on_click + <menu_item_call.on_click function="Avatar.Share" /> - <on_enable + <menu_item_call.on_enable function="ParticipantList.EnableItem" parameter="can_share" /> </menu_item_call> @@ -78,38 +76,37 @@ label="Pay" layout="topleft" name="Pay"> - <on_click + <menu_item_call.on_click function="Avatar.Pay" /> - <on_enable + <menu_item_call.on_enable function="ParticipantList.EnableItem" parameter="can_pay" /> </menu_item_call> <menu_item_separator - layout="topleft" - name="View Icons Separator" /> + layout="topleft" + name="View Icons Separator" /> <menu_item_check - label="View People Icons" - layout="topleft" - name="View Icons"> - <on_check - function="CheckControl" - parameter="ParticipantListShowIcons" /> - <on_click - function="ToggleControl" - parameter="ParticipantListShowIcons" /> + 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" /> + layout="topleft" /> <menu_item_check label="Block Voice" layout="topleft" name="Block/Unblock"> - <on_check + <menu_item_check.on_click + function="Avatar.BlockUnblock" /> + <menu_item_check.on_check function="ParticipantList.CheckItem" parameter="is_blocked" /> - <on_click - function="Avatar.BlockUnblock" /> - <on_enable + <menu_item_check.on_enable function="ParticipantList.EnableItem" parameter="can_block" /> </menu_item_check> @@ -126,72 +123,71 @@ function="ParticipantList.EnableItem" parameter="can_mute_text" /> </menu_item_check> - <menu_item_separator - layout="topleft" - name="Moderator Options Separator"/> + <menu_item_separator + layout="topleft" /> <context_menu label="Moderator Options >" layout="topleft" - name="Moderator Options"> - <menu_item_check - label="Allow text chat" - layout="topleft" - name="AllowTextChat"> - <on_check - function="ParticipantList.CheckItem" - parameter="is_allowed_text_chat" /> - <on_click - function="ParticipantList.ToggleAllowTextChat" /> - <on_enable - function="ParticipantList.EnableItem" - parameter="can_allow_text_chat" /> - </menu_item_check> - <menu_item_separator - layout="topleft" - name="moderate_voice_separator" /> - <menu_item_call - label="Mute this participant" - layout="topleft" - name="ModerateVoiceMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute this participant" - layout="topleft" - name="ModerateVoiceUnMuteSelected"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="selected" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Mute everyone" - layout="topleft" - name="ModerateVoiceMute"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="mute_all" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> - <menu_item_call - label="Unmute everyone" - layout="topleft" - name="ModerateVoiceUnmute"> - <on_click - function="ParticipantList.ModerateVoice" - parameter="unmute_all" /> - <on_enable - function="ParticipantList.EnableItem.Moderate" - parameter="can_moderate_voice" /> - </menu_item_call> + name="Moderator Options" > + <menu_item_check + label="Allow text chat" + layout="topleft" + name="AllowTextChat"> + <on_check + function="ParticipantList.CheckItem" + parameter="is_allowed_text_chat" /> + <on_click + function="ParticipantList.ToggleAllowTextChat" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_allow_text_chat" /> + </menu_item_check> + <menu_item_separator + layout="topleft" + name="moderate_voice_separator" /> + <menu_item_call + label="Mute this participant" + layout="topleft" + name="ModerateVoiceMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Mute everyone else" + layout="topleft" + name="ModerateVoiceMuteOthers"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="others" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute this participant" + layout="topleft" + name="ModerateVoiceUnMuteSelected"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="selected" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> + <menu_item_call + label="Unmute everyone else" + layout="topleft" + name="ModerateVoiceUnMuteOthers"> + <on_click + function="ParticipantList.ModerateVoice" + parameter="others" /> + <on_enable + function="ParticipantList.EnableItem" + parameter="can_moderate_voice" /> + </menu_item_call> </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_save_outfit.xml b/indra/newview/skins/default/xui/en/menu_save_outfit.xml index 6285bf7417..a8778df7f6 100644 --- a/indra/newview/skins/default/xui/en/menu_save_outfit.xml +++ b/indra/newview/skins/default/xui/en/menu_save_outfit.xml @@ -14,9 +14,9 @@ </menu_item_call> <menu_item_call name="save_as_new_outfit" - label="Save As"> + label="Save As New"> <menu_item_call.on_click - function="Outfit.SaveAs.Action" + function="Outfit.SaveAsNew.Action" userdata="" /> </menu_item_call> </toggleable_menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index e8ba8c683d..6c9564c8cf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3380,6 +3380,13 @@ You can click 'Change Preference' to raise your maturity Rating prefer </notification> <notification + icon="notifytip.tga" + name="PreferredMaturityChanged" + type="notifytip"> +Your maturity rating preference is now [RATING]. + </notification> + + <notification icon="alertmodal.tga" name="LandClaimAccessBlocked" type="alertmodal"> @@ -4376,6 +4383,18 @@ Uploading in-world and web site snapshots... </notification> <notification + icon="alertmodal.tga" + name="UploadConfirmation" + type="alertmodal"> +Uploading costs L$[AMOUNT]. +Do you wish to proceed? + <usetemplate + name="okcancelbuttons" + notext="Cancel" + yestext="Upload"/> + </notification> + + <notification icon="notify.tga" name="UploadPayment" type="notify"> @@ -5146,7 +5165,7 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you th type="offer"> [NAME_SLURL] has offered to teleport you to their location: -[MESSAGE] +[MESSAGE], ([MATURITY]) <form name="form"> <button index="0" @@ -5942,6 +5961,13 @@ Selected button can not be shown right now. The button will be shown when there is enough space for it. </notification> + <notification + icon="notifytip.tga" + name="ShareNotification" + type="notifytip"> +Drag items from inventory onto a person in the resident picker + </notification> + <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c34a367c32..e412c491fd 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -127,6 +127,8 @@ <gesture_combo_list.combo_button pad_right="10" use_ellipses="true" /> + <gesture_combo_list.combo_list + page_lines="17" /> </gesture_combo_list> </layout_panel> <icon @@ -344,7 +346,6 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. user_resize="false"> <chiclet_im_well max_displayed_count="99" - flash_period="0.3" follows="right" height="28" layout="topleft" @@ -393,7 +394,6 @@ image_pressed_selected "Lit" + "Selected" - there are new messages and the Well min_width="37" user_resize="false"> <chiclet_notification - flash_period="0.25" follows="right" height="23" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_generic_tip.xml b/indra/newview/skins/default/xui/en/panel_generic_tip.xml index eea92895f5..453ed7c7a6 100644 --- a/indra/newview/skins/default/xui/en/panel_generic_tip.xml +++ b/indra/newview/skins/default/xui/en/panel_generic_tip.xml @@ -3,7 +3,7 @@ height="40" layout="topleft" left="0" - name="panel_generic_tip" + name="panel_system_tip" top="0" width="305"> <text diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 2c9d7e4b6a..96c76576c0 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -22,25 +22,14 @@ width="600"/> <icon follows="all" - image_name="NavBar_BG_NoFav_Bevel" + image_name="NavBar_BG_NoFav" mouse_opaque="false" - name="bg_icon_no_fav_bevel" + name="bg_icon_no_fav" scale_image="true" visible="false" left="0" top="0" - height="60" - width="600"/> - <icon - follows="all" - image_name="NavBar_BG_NoNav_Bevel" - mouse_opaque="false" - name="bg_icon_no_nav_bevel" - scale_image="true" - visible="false" - left="0" - top="0" - height="60" + height="50" width="600"/> <panel background_visible="false" @@ -124,6 +113,10 @@ <!-- top_delta="0" --> <!-- width="168" /> --> <search_combo_box + bevel_style="none" + border_style="line" + border.border_thickness="0" + commit_on_focus_lost="false" follows="right|top" halign="right" height="23" 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 c1800384a3..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" /> @@ -257,7 +257,7 @@ text_pad_left="25" /> <inventory_panel - allow_multi_select="true" + allow_multi_select="false" border="false" follows="left|top|right|bottom" height="176" @@ -317,6 +317,19 @@ name="list_view_btn" top="1" width="31" /> + <button + follows="bottom|left" + height="25" + image_hover_unselected="Toolbar_Middle_Over" + image_overlay="AddItem_Off" + image_selected="Toolbar_Middle_Selected" + image_unselected="Toolbar_Middle_Off" + label="" + layout="topleft" + left_pad="1" + name="add_to_outfit_btn" + top="1" + width="31" /> </panel> </layout_panel> </layout_stack> @@ -338,6 +351,19 @@ name="save_btn" width="145" /> <button + follows="bottom|right" + height="23" + name="save_flyout_btn" + label="" + left_pad="-20" + tab_stop="false" + image_selected="SegmentedBtn_Right_Selected_Press" + image_unselected="SegmentedBtn_Right_Off" + image_pressed="SegmentedBtn_Right_Press" + image_pressed_selected="SegmentedBtn_Right_Selected_Press" + image_overlay="Arrow_Small_Up" + width="20"/> + <button follows="bottom|left|right" height="23" left_pad="15" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 8131b75b70..233137a76b 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -477,7 +477,7 @@ If you're looking for people to hang out with, [secondlife:///app/worldmap try t label="Share" layout="topleft" name="share_btn" - width="62" /> + width="85" /> <button follows="bottom|left" left_pad="3" diff --git a/indra/newview/skins/default/xui/en/panel_place_profile.xml b/indra/newview/skins/default/xui/en/panel_place_profile.xml index a43b244fa0..9725e9952a 100644 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -321,6 +321,7 @@ follows="all" height="223" layout="topleft" + single_expansion="true" left="0" name="advanced_info_accordion" top_pad="10" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index ba967d3e2c..3ef16d2dec 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -330,7 +330,7 @@ <check_box enabled="false" height="16" - label="Enable plain text IM and chat history" + label="Enable plain text chat history" layout="topleft" left_delta="0" name="plain_text_chat_history" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index 08e36d5e57..9186efc431 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -2,14 +2,14 @@ <panel border="false" follows="top|left" - height="510" + height="320" help_topic="panel_region_estate_tab" label="Estate" layout="topleft" left="0" name="Estate" top="320" - width="530"> + width="480"> <text type="string" length="1" @@ -20,7 +20,7 @@ name="estate_help_text" top="14" word_wrap="true" - width="300"> + width="250"> Changes to settings on this tab will affect all regions in the estate. </text> <text @@ -82,7 +82,7 @@ layout="topleft" left_delta="-4" top_pad="5" - width="300" /> + width="250" /> <check_box height="20" label="Use Global Time" @@ -184,14 +184,14 @@ layout="topleft" name="apply_btn" top_pad="10" - left="110" + left="78" width="97" /> <button follows="left|top" height="23" label="Send Message To Estate..." layout="topleft" - left="45" + left="20" name="message_estate_btn" top_pad="20" width="220" /> @@ -200,7 +200,7 @@ height="23" label="Kick Resident from Estate..." layout="topleft" - left="45" + left="20" name="kick_user_from_estate_btn" top_pad="5" width="220" /> @@ -213,7 +213,7 @@ height="20" layout="topleft" name="estate_manager_label" - right="520" + right="470" width="200"> Estate Managers: </text> @@ -222,7 +222,7 @@ follows="top|left" height="71" layout="topleft" - right="520" + right="470" top_pad="-5" width="200" /> <name_list @@ -240,7 +240,7 @@ label="Remove..." layout="topleft" name="remove_estate_manager_btn" - right="520" + right="470" top_pad="5" width="97" /> <button @@ -269,7 +269,7 @@ follows="top|left" height="71" layout="topleft" - right="520" + right="470" top_pad="-5" width="200" /> <name_list @@ -287,7 +287,7 @@ label="Remove..." layout="topleft" name="remove_allowed_avatar_btn" - right="520" + right="470" top_pad="5" width="97" /> <button @@ -316,7 +316,7 @@ follows="top|left" height="71" layout="topleft" - right="520" + right="470" top_pad="-5" width="200" /> <name_list @@ -334,7 +334,7 @@ label="Remove..." layout="topleft" name="remove_allowed_group_btn" - right="520" + right="470" top_pad="5" width="97" /> <button @@ -363,7 +363,7 @@ follows="top|left" height="71" layout="topleft" - right="520" + right="470" top_pad="-5" width="200" /> <name_list @@ -381,7 +381,7 @@ label="Remove..." layout="topleft" name="remove_banned_avatar_btn" - right="520" + right="470" top_pad="5" width="97" /> <button diff --git a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml index f9c86fc75b..8042563900 100644 --- a/indra/newview/skins/default/xui/en/panel_scrolling_param.xml +++ b/indra/newview/skins/default/xui/en/panel_scrolling_param.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <panel - height="152" + height="157" layout="topleft" left="0" name="LLScrollingPanelParam" @@ -10,25 +10,25 @@ follows="left|top" height="16" layout="topleft" - left="4" + left="12" name="min param text" - top="116" - width="128" /> + top="120" + width="120" /> <text follows="left|top" height="16" layout="topleft" - left_pad="6" + left="155" name="max param text" top_delta="0" - width="128" /> + width="120" /> <text type="string" length="1" follows="left|top" height="16" layout="topleft" - left="8" + left="12" name="Loading..." top="11" width="128"> @@ -40,7 +40,7 @@ follows="left|top" height="16" layout="topleft" - left_pad="6" + left="155" name="Loading...2" top_delta="0" width="128"> @@ -49,30 +49,30 @@ <view_border layout="topleft" follows="left|top" - left="2" - top="0" + left="7" + top="5" width="132" height="132" thickness="2" - shadow_light_color="LtGray_50" - highlight_light_color="LtGray_50" - highlight_dark_color="LtGray_50" - shadow_dark_color="LtGray_50" + shadow_light_color="0.3 0.3 0.3 1" + highlight_light_color="0.3 0.3 0.3 1" + highlight_dark_color="0.3 0.3 0.3 1" + shadow_dark_color="0.3 0.3 0.3 1" bevel_style="in" name="left_border" /> <view_border layout="topleft" follows="left|top" - left_pad="2" + left_pad="10" top_delta="0" width="132" height="132" thickness="2" - shadow_light_color="LtGray_50" - highlight_light_color="LtGray_50" - highlight_dark_color="LtGray_50" - shadow_dark_color="LtGray_50" + shadow_light_color="0.3 0.3 0.3 1" + highlight_light_color="0.3 0.3 0.3 1" + highlight_dark_color="0.3 0.3 0.3 1" + shadow_dark_color="0.3 0.3 0.3 1" bevel_style="in" name="right_border" /> @@ -84,10 +84,10 @@ image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" - left="2" + left="7" name="less" tab_stop="false" - top="0" + top="5" width="132" /> <button enabled="false" @@ -97,7 +97,7 @@ image_selected="PushButton_Selected" image_unselected="PushButton_Off" layout="topleft" - left_pad="2" + left_pad="10" name="more" tab_stop="false" top_delta="0" @@ -111,10 +111,11 @@ initial_value="0" label="[DESC]" label_width="100" - layout="topleft" + layout="bottom|left" left="6" max_val="100" name="param slider" - top="134" - width="258" /> + bottom="1" + width="274" + slider_label.font.style="BOLD" /> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index e7384fa77f..92b4c17247 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -55,7 +55,7 @@ clip_partial="true" visible="false" follows="left|top|right|bottom" - font="SansSerifBold" + font="SansSerif" height="20" layout="topleft" left="20" diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml index 6c9acae35e..812d94c55f 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml @@ -45,7 +45,6 @@ layout="topleft" left="0" name="info_btn" - tool_tip="Show object profile" top="0" width="102" /> <button @@ -56,18 +55,6 @@ layout="topleft" left="105" name="share_btn" - tool_tip="Share an inventory item" - top="0" - width="102" /> - <button - enabled="true" - follows="bottom|left" - height="23" - label="Shop" - layout="topleft" - left="210" - name="shop_btn" - tool_tip="Open Marketplace webpage" top="0" width="102" /> <button @@ -78,7 +65,6 @@ layout="topleft" left="210" name="wear_btn" - tool_tip="Wear seleceted outfit" top="0" width="102" /> <button @@ -99,7 +85,6 @@ layout="topleft" left="210" name="teleport_btn" - tool_tip="Teleport to the selected area" top="0" width="102" /> </panel> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 0c73b8d769..813f59ff89 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -148,6 +148,8 @@ <!-- Group name: text shown for LLUUID::null --> <string name="GroupNameNone">(none)</string> + <string name="AvalineCaller">Avaline Caller [ORDER]</string> + <!-- Asset errors. Used in llassetstorage.cpp, translation from error code to error message. --> <string name="AssetErrorNone">No error</string> <string name="AssetErrorRequestFailed">Asset request: failed</string> @@ -2940,6 +2942,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="IM_moderator_label">(Moderator)</string> <!-- voice calls --> + <string name="answered_call">Your call has been answered</string> <string name="started_call">Started a voice call</string> <string name="joined_call">Joined the voice call</string> @@ -3056,6 +3059,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <!-- Financial operations strings --> <string name="paid_you_ldollars">[NAME] paid you L$[AMOUNT]</string> <string name="you_paid_ldollars">You paid [NAME] L$[AMOUNT] [REASON].</string> + <string name="you_paid_ldollars_no_info">You paid L$[AMOUNT].</string> <string name="you_paid_ldollars_no_reason">You paid [NAME] L$[AMOUNT].</string> <string name="you_paid_ldollars_no_name">You paid L$[AMOUNT] [REASON].</string> <string name="for a parcel of land">for a parcel of land</string> diff --git a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml index 9c3ac1be0e..47ad16b277 100644 --- a/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/es/floater_day_cycle_options.xml @@ -57,8 +57,8 @@ <text name="WL12amHash2"> | </text> - <button label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/> - <button label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/> + <button font="SansSerifSmall" width="96" left="546" label="Añadir un punto" label_selected="Añadir un punto" name="WLAddKey"/> + <button font="SansSerifSmall" width="96" left="546" label="Quitar un punto" label_selected="Quitar un punto" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> Configuración del fotograma clave: </text> @@ -86,9 +86,9 @@ </text> <button label="Probar" label_selected="Probar" name="WLAnimSky"/> <button label="Parar" label_selected="Parar" name="WLStopAnimSky"/> - <button label="Usar el horario del estado" label_selected="Ir al horario del estado" name="WLUseLindenTime"/> - <button label="Guardar este tipo de día" label_selected="Guardar este tipo de día" name="WLSaveDayCycle"/> - <button label="Cargar y probar un tipo de día" label_selected="Cargar y probar un tipo de día" name="WLLoadDayCycle"/> + <button width="150" font="SansSerifSmall" label="Usar el horario del estado" label_selected="Ir al horario del estado" name="WLUseLindenTime"/> + <button left="440" width="180" font="SansSerifSmall" label="Guardar este tipo de día" label_selected="Guardar este tipo de día" name="WLSaveDayCycle"/> + <button left="440" width="180" font="SansSerifSmall" label="Cargar y probar un tipo de día" label_selected="Cargar y probar un tipo de día" name="WLLoadDayCycle"/> </panel> </tab_container> </floater> diff --git a/indra/newview/skins/default/xui/es/floater_joystick.xml b/indra/newview/skins/default/xui/es/floater_joystick.xml index dbd2e4f04e..2c1804bd90 100644 --- a/indra/newview/skins/default/xui/es/floater_joystick.xml +++ b/indra/newview/skins/default/xui/es/floater_joystick.xml @@ -16,7 +16,7 @@ Modos de control: </text> <check_box label="Avatar" name="JoystickAvatarEnabled"/> - <check_box label="Construir" left="192" name="JoystickBuildEnabled"/> + <check_box label="Construir" name="JoystickBuildEnabled"/> <check_box label="Flycam" name="JoystickFlycamEnabled"/> <text name="XScale"> Escala: X @@ -27,7 +27,7 @@ <text name="ZScale"> Escala: Z </text> - <text left="3" name="PitchScale" width="115"> + <text name="PitchScale"> Escala: arriba/abajo </text> <text name="YawScale"> @@ -45,10 +45,10 @@ <text name="ZDeadZone"> Zona muerta Z </text> - <text left="3" name="PitchDeadZone" width="115"> + <text name="PitchDeadZone"> Zona muerta arri./aba. </text> - <text left="3" name="YawDeadZone" width="115"> + <text name="YawDeadZone"> Zona muerta izq./der. </text> <text name="RollDeadZone"> @@ -63,7 +63,7 @@ <text name="ZoomDeadZone"> Zona muerta zoom </text> - <button font="SansSerifSmall" label="Por defecto del SpaceNavigator" left="330" name="SpaceNavigatorDefaults" width="210"/> + <button font="SansSerifSmall" label="Por defecto del SpaceNavigator" name="SpaceNavigatorDefaults"/> <button label="OK" label_selected="OK" left="330" name="ok_btn"/> <button label="Cancelar" label_selected="Cancelar" left_delta="120" name="cancel_btn"/> <stat_view label="Monitor del joystick" name="axis_view"> diff --git a/indra/newview/skins/default/xui/es/panel_region_general.xml b/indra/newview/skins/default/xui/es/panel_region_general.xml index 9ee7bef493..67800b2c6f 100644 --- a/indra/newview/skins/default/xui/es/panel_region_general.xml +++ b/indra/newview/skins/default/xui/es/panel_region_general.xml @@ -32,7 +32,7 @@ </text> <icons_combo_box label="'Mature'" name="access_combo"> <icons_combo_box.item label="'Adult'" name="Adult" value="42"/> - <icons_combo_box.item label="'Mature'" name="Mature" value="21"/> + <icons_combo_box.item label="Moderado" name="Mature" value="21"/> <icons_combo_box.item label="'PG'" name="PG" value="13"/> </icons_combo_box> <button label="Aplicar" name="apply_btn"/> diff --git a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml index a381f64cd9..e8122108a8 100644 --- a/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/fr/floater_day_cycle_options.xml @@ -57,8 +57,8 @@ <text name="WL12amHash2"> | </text> - <button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey" width="89" bottom="-45" /> - <button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89" bottom="-70" /> + <button label="Ajouter clé" label_selected="Ajouter clé" name="WLAddKey"/> + <button label="Supprimer clé" label_selected="Supprimer clé" name="WLDeleteKey" width="89"/> <text name="WLCurKeyFrameText" width="170"> Réglages des images-clés : </text> @@ -81,10 +81,10 @@ <spinner label="Heure" name="WLLengthOfDayHour" label_width="80" width="74" /> <spinner label="Min" name="WLLengthOfDayMin" /> <spinner label="S" name="WLLengthOfDaySec" label_width="10" width="50" left_delta="95"/> - <text name="DayCycleText3" left="280" width="200"> + <text name="DayCycleText3"> Prévisualiser : </text> - <button label="Lire" label_selected="Lire" name="WLAnimSky" left_delta="90"/> + <button label="Lire" label_selected="Lire" name="WLAnimSky"/> <button label="Stop !" label_selected="Stop" name="WLStopAnimSky" /> <button label="Utiliser heure domaine" label_selected="Aller heure domaine" name="WLUseLindenTime" /> diff --git a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml index 98c385d29f..808c758bb6 100644 --- a/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml +++ b/indra/newview/skins/default/xui/it/floater_day_cycle_options.xml @@ -57,8 +57,8 @@ <text name="WL12amHash2"> | </text> - <button label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/> - <button label_selected="Cancella voce" name="WLDeleteKey"/> + <button font="SansSerifSmall" width="96" left="546" label="Aggiungi voce" label_selected="Aggiungi voce" name="WLAddKey"/> + <button font="SansSerifSmall" width="96" left="546" label="Cancella voce" label_selected="Cancella voce" name="WLDeleteKey"/> <text name="WLCurKeyFrameText"> Impostazioni del fotogramma chiave: </text> @@ -84,9 +84,9 @@ <text name="DayCycleText3"> Anteprima: </text> - <button label="Avvia" label_selected="Avvia" name="WLAnimSky"/> - <button label="Arresta!" label_selected="Arresta" name="WLStopAnimSky"/> - <button label="Usa l'ora della proprietà" label_selected="Vai all'ora della proprietà" name="WLUseLindenTime"/> + <button width="55" font="SansSerifSmall" label="Avvia" label_selected="Avvia" name="WLAnimSky"/> + <button width="55" left_delta="60" font="SansSerifSmall" label="Arresta!" label_selected="Arresta" name="WLStopAnimSky"/> + <button left_delta="60" width="150" font="SansSerifSmall" label="Usa l'ora della proprietà" label_selected="Vai all'ora della proprietà" name="WLUseLindenTime"/> <button label="Salva il test del giorno" label_selected="Salva il test del giorno" name="WLSaveDayCycle"/> <button label="Carica il test del giorno" label_selected="Carica il test del giorno" name="WLLoadDayCycle"/> </panel> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml index 4f29ae7b44..abbd29286b 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml @@ -28,12 +28,6 @@ <panel.string name="default_text"> デフォルト </panel.string> - <panel.string name="default system device"> - デフォルトのシステム機器 - </panel.string> - <panel.string name="no device"> - 機器が設定されていません - </panel.string> <text name="Input"> 入力 </text> diff --git a/indra/newview/skins/default/xui/pl/floater_joystick.xml b/indra/newview/skins/default/xui/pl/floater_joystick.xml index 78742c39d1..2b1e362b98 100644 --- a/indra/newview/skins/default/xui/pl/floater_joystick.xml +++ b/indra/newview/skins/default/xui/pl/floater_joystick.xml @@ -1,108 +1,108 @@ <?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater name="Joystick" title="KONFIGURACJA JOYSTICKA" width="590"> +<floater name="Joystick" title="KONFIGURACJA JOYSTICKA"> <check_box label="Aktywuj Joystick:" name="enable_joystick"/> <text left="130" name="joystick_type" width="360"/> <spinner label="Kalibracja Osi X" label_width="130" left="20" name="JoystickAxis1" width="170"/> <spinner label="Kalibracja Osi Y" label_width="130" left="210" name="JoystickAxis2" width="170"/> - <spinner label="Kalibracja Osi Z" label_width="130" left="400" name="JoystickAxis0" width="170"/> + <spinner label="Kalibracja Osi Z" label_width="100" left="400" name="JoystickAxis0" width="140"/> <spinner label="Kalibracja wznoszenia" label_width="130" left="20" name="JoystickAxis4" width="170"/> <spinner label="Kalibracja wychylania" label_width="130" left="210" name="JoystickAxis5" width="170"/> - <spinner label="Kalibracja obrotu" label_width="130" left="400" name="JoystickAxis3" width="170"/> + <spinner label="Kalibracja obrotu" label_width="100" left="400" name="JoystickAxis3" width="140"/> <spinner label="Kalibracja powiększania" label_width="130" name="JoystickAxis6" width="170"/> <check_box label="Bezpośrednie" left="205" name="ZoomDirect"/> <check_box label="Kursor 3D" left="340" name="Cursor3D"/> <check_box label="Automatyczne" left="450" name="AutoLeveling"/> - <text left="22" name="Control Modes:"> + <text name="Control Modes:"> Kontroluj: </text> - <check_box label="Awatara" left="130" name="JoystickAvatarEnabled" width="90"/> - <check_box label="Budowanie" left="205" name="JoystickBuildEnabled" width="90"/> - <check_box label="Kamerę podczas latania" left="282" name="JoystickFlycamEnabled" width="90"/> - <text name="XScale" width="104"> + <check_box label="Awatara" name="JoystickAvatarEnabled" width="90"/> + <check_box label="Budowanie" name="JoystickBuildEnabled" width="90"/> + <check_box label="Kamerę podczas latania" left="300" name="JoystickFlycamEnabled" width="90"/> + <text name="XScale"> Skala X </text> - <spinner left="133" name="AvatarAxisScale1"/> - <spinner left="208" name="BuildAxisScale1"/> - <spinner left="283" name="FlycamAxisScale1"/> - <text name="YScale" width="104"> + <spinner name="AvatarAxisScale1"/> + <spinner name="BuildAxisScale1"/> + <spinner left="300" name="FlycamAxisScale1"/> + <text name="YScale"> Skala Y </text> - <spinner left="133" name="AvatarAxisScale2"/> - <spinner left="208" name="BuildAxisScale2"/> - <spinner left="283" name="FlycamAxisScale2"/> - <text name="ZScale" width="104"> + <spinner name="AvatarAxisScale2"/> + <spinner name="BuildAxisScale2"/> + <spinner left="300" name="FlycamAxisScale2"/> + <text name="ZScale"> Skala Z </text> - <spinner left="133" name="AvatarAxisScale0"/> - <spinner left="208" name="BuildAxisScale0"/> - <spinner left="283" name="FlycamAxisScale0"/> - <text name="PitchScale" width="104"> + <spinner name="AvatarAxisScale0"/> + <spinner name="BuildAxisScale0"/> + <spinner left="300" name="FlycamAxisScale0"/> + <text name="PitchScale"> Skala wznoszenia </text> - <spinner left="133" name="AvatarAxisScale4"/> - <spinner left="208" name="BuildAxisScale4"/> - <spinner left="283" name="FlycamAxisScale4"/> - <text name="YawScale" width="104"> + <spinner name="AvatarAxisScale4"/> + <spinner name="BuildAxisScale4"/> + <spinner left="300" name="FlycamAxisScale4"/> + <text name="YawScale"> Skala odchylania </text> - <spinner left="133" name="AvatarAxisScale5"/> - <spinner left="208" name="BuildAxisScale5"/> - <spinner left="283" name="FlycamAxisScale5"/> - <text name="RollScale" width="104"> + <spinner name="AvatarAxisScale5"/> + <spinner name="BuildAxisScale5"/> + <spinner left="300" name="FlycamAxisScale5"/> + <text name="RollScale"> Skala obrotu </text> - <spinner left="208" name="BuildAxisScale3"/> - <spinner left="283" name="FlycamAxisScale3"/> - <text name="XDeadZone" width="104"> + <spinner name="BuildAxisScale3"/> + <spinner left="300" name="FlycamAxisScale3"/> + <text name="XDeadZone"> Tolerancja osi X </text> - <spinner left="133" name="AvatarAxisDeadZone1"/> - <spinner left="208" name="BuildAxisDeadZone1"/> - <spinner left="283" name="FlycamAxisDeadZone1"/> - <text name="YDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone1"/> + <spinner name="BuildAxisDeadZone1"/> + <spinner left="300" name="FlycamAxisDeadZone1"/> + <text name="YDeadZone"> Tolerancja osi Y </text> - <spinner left="133" name="AvatarAxisDeadZone2"/> - <spinner left="208" name="BuildAxisDeadZone2"/> - <spinner left="283" name="FlycamAxisDeadZone2"/> - <text name="ZDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone2"/> + <spinner name="BuildAxisDeadZone2"/> + <spinner left="300" name="FlycamAxisDeadZone2"/> + <text name="ZDeadZone"> Tolerancja osi Z </text> - <spinner left="133" name="AvatarAxisDeadZone0"/> - <spinner left="208" name="BuildAxisDeadZone0"/> - <spinner left="283" name="FlycamAxisDeadZone0"/> - <text name="PitchDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone0"/> + <spinner name="BuildAxisDeadZone0"/> + <spinner left="300" name="FlycamAxisDeadZone0"/> + <text name="PitchDeadZone"> Tolerancja wznoszenia </text> - <spinner left="133" name="AvatarAxisDeadZone4"/> - <spinner left="208" name="BuildAxisDeadZone4"/> - <spinner left="283" name="FlycamAxisDeadZone4"/> - <text name="YawDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone4"/> + <spinner name="BuildAxisDeadZone4"/> + <spinner left="300" name="FlycamAxisDeadZone4"/> + <text name="YawDeadZone"> Tolerancja odchylania </text> - <spinner left="133" name="AvatarAxisDeadZone5"/> - <spinner left="208" name="BuildAxisDeadZone5"/> - <spinner left="283" name="FlycamAxisDeadZone5"/> - <text name="RollDeadZone" width="104"> + <spinner name="AvatarAxisDeadZone5"/> + <spinner name="BuildAxisDeadZone5"/> + <spinner left="300" name="FlycamAxisDeadZone5"/> + <text name="RollDeadZone"> Tolerancja obrotu </text> - <spinner left="208" name="BuildAxisDeadZone3"/> - <spinner left="283" name="FlycamAxisDeadZone3"/> - <text name="Feathering" width="104"> + <spinner name="BuildAxisDeadZone3"/> + <spinner left="300" name="FlycamAxisDeadZone3"/> + <text name="Feathering"> Przenikanie </text> - <slider label="" left="125" name="AvatarFeathering"/> - <slider label="" left="200" name="BuildFeathering"/> - <slider label="" left="275" name="FlycamFeathering"/> - <text name="ZoomScale2" width="104"> + <slider label="" name="AvatarFeathering"/> + <slider label="" name="BuildFeathering"/> + <slider label="" left_delta="81" name="FlycamFeathering"/> + <text name="ZoomScale2"> Skala powiększania </text> - <spinner label="" left="283" name="FlycamAxisScale6"/> - <text name="ZoomDeadZone" width="104"> + <spinner label="" left="300" name="FlycamAxisScale6"/> + <text name="ZoomDeadZone"> Tolerancja powiększania </text> - <spinner label="" left="283" name="FlycamAxisDeadZone6"/> - <button label="Ustawienia domyślne" left="366" name="SpaceNavigatorDefaults"/> + <spinner label="" left="300" name="FlycamAxisDeadZone6"/> + <button label="Ustawienia domyślne" name="SpaceNavigatorDefaults"/> <button label="OK" label_selected="OK" left="366" name="ok_btn"/> <button label="Anuluj" label_selected="Anuluj" name="cancel_btn"/> <stat_view label="Monitor Joysticka" name="axis_view"> |