diff options
author | Brian McGroarty <soft@lindenlab.com> | 2008-03-19 00:01:42 +0000 |
---|---|---|
committer | Brian McGroarty <soft@lindenlab.com> | 2008-03-19 00:01:42 +0000 |
commit | 25de7377c1f6cc2fa6f217b9e9eaca84ab36748d (patch) | |
tree | ea1770b154433082dbcf06da043c0c3a45f7c5f3 /indra/newview | |
parent | 2d9afdaa03f0d44d05e3f2fb9d99dd5b059a9cac (diff) |
QAR-377 maintenance-6 merge:
svn merge -r 82602:82644 svn+ssh://svn/svn/linden/qa/maintenance-6-merge-82557 release/
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/keywords.ini | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llappviewer.h | 1 | ||||
-rw-r--r-- | indra/newview/lldelayedgestureerror.cpp | 125 | ||||
-rw-r--r-- | indra/newview/lldelayedgestureerror.h | 82 | ||||
-rw-r--r-- | indra/newview/llfloaterabout.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 183 | ||||
-rw-r--r-- | indra/newview/llgesturemgr.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llinventorybridge.h | 4 | ||||
-rw-r--r-- | indra/newview/llpreviewgesture.cpp | 10 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llwearablelist.cpp | 33 | ||||
-rw-r--r-- | indra/newview/llwearablelist.h | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
16 files changed, 365 insertions, 137 deletions
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index 80d840271b..961e86c6cb 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -458,8 +458,6 @@ PARCEL_FLAG_USE_BAN_LIST Used with llGetParcelFlags to find if a parcel uses a PARCEL_FLAG_USE_LAND_PASS_LIST Used with llGetParcelFlags to find if a parcel allows passes to be purchased PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls -PARCEL_FLAG_LOCAL_SOUND_ONLY Used with llGetParcelFlags to find if a parcel restricts spacialized sound to the parcel -PARCEL_FLAG_RESTRICT_PUSHOBJECT Used with llGetParcelFlags to find if a parcel restricts llPushObject() calls PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel allows all objects to enter PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY Used with llGetParcelFlags to find if a parcel only allows group (and owner) objects to enter diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8c7af9ebf7..04daf7ceb7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -252,7 +252,6 @@ BOOL gGodConnect = FALSE; BOOL gAcceptTOS = FALSE; BOOL gAcceptCriticalMessage = FALSE; -LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; LLSD gDebugInfo; @@ -1014,8 +1013,12 @@ bool LLAppViewer::init() // Build a string representing the current version number. gCurrentVersion = llformat("%s %d.%d.%d.%d", gChannelName.c_str(), LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD ); - + // + // Various introspection concerning the libs we're using. + // + llinfos << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << llendl; + // Merge with the command line overrides gSavedSettings.applyOverrides(gCommandLineSettings); @@ -1248,17 +1251,6 @@ bool LLAppViewer::init() // Load Custom bindings (override defaults) gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini").c_str()); - // Calculate the digest for the executable (takes < 90ms on a fast machine). - FILE* app_file = LLFile::fopen( gDirUtilp->getExecutablePathAndName().c_str(), "rb" ); /* Flawfinder: ignore */ - if( app_file ) - { - LLMD5 app_md5; - app_md5.update( app_file ); // Automatically closes the file - app_md5.finalize(); - app_md5.raw_digest( gViewerDigest.mData ); - } - llinfos << "Viewer Digest: " << gViewerDigest << llendl; - // If we don't have the right GL requirements, exit. if (!gGLManager.mHasRequirements && !gNoRender) { @@ -1368,7 +1360,7 @@ bool LLAppViewer::mainLoop() gViewerWindow->mWindow->gatherInput(); } -#if 1 && !RELEASE_FOR_DOWNLOAD +#if 1 && !LL_RELEASE_FOR_DOWNLOAD // once per second debug info if (debugTime.getElapsedTimeF32() > 1.f) { diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 9518636f87..da3f5d54c1 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -224,7 +224,6 @@ extern BOOL gGodConnect; // llstartup extern BOOL gAcceptTOS; extern BOOL gAcceptCriticalMessage; -extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. typedef enum { diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp new file mode 100644 index 0000000000..aaa49b831d --- /dev/null +++ b/indra/newview/lldelayedgestureerror.cpp @@ -0,0 +1,125 @@ +/** + * @file lldelayedgestureerror.cpp + * @brief Delayed gesture error message -- try to wait until name has been retrieved + * @author Dale Glass + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "lldelayedgestureerror.h" +#include <list> +#include "llnotify.h" +#include "llcallbacklist.h" +#include "llinventory.h" +#include "llviewerinventory.h" +#include "llinventorymodel.h" + +const F32 MAX_NAME_WAIT_TIME = 5.0f; + +LLDelayedGestureError::ErrorQueue LLDelayedGestureError::sQueue; + +//static +void LLDelayedGestureError::gestureMissing(const LLUUID &id) +{ + LLErrorEntry ent("GestureMissing", id); + if ( ! doDialog(ent) ) + { + enqueue(ent); + } +} + +//static +void LLDelayedGestureError::gestureFailedToLoad(const LLUUID &id) +{ + LLErrorEntry ent("UnableToLoadGesture", id); + + if ( ! doDialog(ent) ) + { + enqueue(ent); + } +} + +//static +void LLDelayedGestureError::enqueue(const LLErrorEntry &ent) +{ + if ( sQueue.empty() ) + { + gIdleCallbacks.addFunction(onIdle, NULL); + } + + sQueue.push_back(ent); +} + +//static +void LLDelayedGestureError::onIdle(void *userdata) +{ + if ( ! sQueue.empty() ) + { + LLErrorEntry ent = sQueue.front(); + sQueue.pop_front(); + + if ( ! doDialog(ent, false ) ) + { + enqueue(ent); + } + } + else + { + // Nothing to do anymore + gIdleCallbacks.deleteFunction(onIdle, NULL); + } +} + +//static +bool LLDelayedGestureError::doDialog(const LLErrorEntry &ent, bool uuid_ok) +{ + LLStringBase<char>::format_map_t args; + LLInventoryItem *item = gInventory.getItem( ent.mItemID ); + + if ( item ) + { + args["[NAME]"] = item->getName(); + } + else + { + if ( uuid_ok || ent.mTimer.getElapsedTimeF32() > MAX_NAME_WAIT_TIME ) + { + args["[NAME]"] = LLString( ent.mItemID.asString() ); + } + else + { + return false; + } + } + + + LLNotifyBox::showXml(ent.mNotifyName, args); + + return true; +} + diff --git a/indra/newview/lldelayedgestureerror.h b/indra/newview/lldelayedgestureerror.h new file mode 100644 index 0000000000..8430a9b848 --- /dev/null +++ b/indra/newview/lldelayedgestureerror.h @@ -0,0 +1,82 @@ +/** + * @file lldelayedgestureerror.h + * @brief Delayed gesture error message -- try to wait until name has been retrieved + * @author Dale Glass + * + * $LicenseInfo:firstyear=2004&license=viewergpl$ + * + * Copyright (c) 2004-2007, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlife.com/developers/opensource/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlife.com/developers/opensource/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + + +#ifndef LL_DELAYEDGESTUREERROR_H +#define LL_DELAYEDGESTUREERROR_H + +#include <list> +#include "lltimer.h" + +// TODO: Refactor to be more generic - this may be useful for other delayed notifications in the future + +class LLDelayedGestureError +{ +public: + /** + * @brief Generates a missing gesture error + * @param id UUID of missing gesture + * Delays message for up to 5 seconds if UUID can't be immediately converted to a text description + */ + static void gestureMissing(const LLUUID &id); + + /** + * @brief Generates a gesture failed to load error + * @param id UUID of missing gesture + * Delays message for up to 5 seconds if UUID can't be immediately converted to a text description + */ + static void gestureFailedToLoad(const LLUUID &id); + +private: + + + struct LLErrorEntry + { + LLErrorEntry(const LLString& notify, const LLUUID &item) : mTimer(), mNotifyName(notify), mItemID(item) {} + + LLTimer mTimer; + LLString mNotifyName; + LLUUID mItemID; + }; + + + static bool doDialog(const LLErrorEntry &ent, bool uuid_ok = false); + static void enqueue(const LLErrorEntry &ent); + static void onIdle(void *userdata); + + typedef std::list<LLErrorEntry> ErrorQueue; + + static ErrorQueue sQueue; +}; + + +#endif diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 4edf6f3652..bf8b1fd663 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -168,12 +168,6 @@ LLFloaterAbout::LLFloaterAbout() support.append("\n"); } - // MD5 digest of executable - support.append("Viewer Digest: "); - char viewer_digest_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/ - gViewerDigest.toString( viewer_digest_string ); - support.append(viewer_digest_string); - // Fix views childDisable("credits_editor"); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 375523cc39..00c6f0de73 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -225,14 +225,33 @@ void LLFloaterRegionInfo::onOpen() gFloaterView->getNewFloaterPosition(&left, &top); rect.translate(left,top); - requestRegionInfo(); refreshFromRegion(gAgent.getRegion()); + requestRegionInfo(); LLFloater::onOpen(); } // static void LLFloaterRegionInfo::requestRegionInfo() { + LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels"); + if(tab) + { + LLPanel* panel; + + panel = LLUICtrlFactory::getPanelByName(tab, "General"); + if (panel) panel->setCtrlsEnabled(FALSE); + + panel = LLUICtrlFactory::getPanelByName(tab, "Debug"); + if (panel) panel->setCtrlsEnabled(FALSE); + + panel = LLUICtrlFactory::getPanelByName(tab, "Terrain"); + if (panel) panel->setCtrlsEnabled(FALSE); + + panel = LLUICtrlFactory::getPanelByName(tab, "Estate"); + if (panel) panel->setCtrlsEnabled(FALSE); + + } + // Must allow anyone to request the RegionInfo data // so non-owners/non-gods can see the values. // Therefore can't use an EstateOwnerMessage JC @@ -278,6 +297,11 @@ void LLFloaterRegionInfo::processEstateOwnerRequest(LLMessageSystem* msg,void**) //dispatch the message dispatch.dispatch(request, invoice, strings); + + LLViewerRegion* region = gAgent.getRegion(); + BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + panel->setCtrlsEnabled(allow_modify); + } @@ -295,6 +319,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) LLTabContainer* tab = LLUICtrlFactory::getTabContainerByName(findInstance(), "region_panels"); if(!tab) return; + LLViewerRegion* region = gAgent.getRegion(); + BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); + // extract message char sim_name[MAX_STRING]; /* Flawfinder: ignore*/ U32 region_flags; @@ -335,13 +362,13 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->childSetValue("access_combo", LLSD(LLViewerRegion::accessToString(sim_access)) ); - // detect teen grid for maturity - LLViewerRegion* region = gAgent.getRegion(); + // detect teen grid for maturity U32 parent_estate_id; msg->getU32("RegionInfo", "ParentEstateID", parent_estate_id); BOOL teen_grid = (parent_estate_id == 5); // *TODO add field to estate table and test that panel->childSetEnabled("access_combo", gAgent.isGodlike() || (region && region->canManageEstate() && !teen_grid)); + panel->setCtrlsEnabled(allow_modify); // DEBUG PANEL @@ -352,6 +379,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->childSetValue("disable_scripts_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)) ); panel->childSetValue("disable_collisions_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)) ); panel->childSetValue("disable_physics_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SKIP_PHYSICS)) ); + panel->setCtrlsEnabled(allow_modify); // TERRAIN PANEL panel = LLUICtrlFactory::getPanelByName(tab, "Terrain"); @@ -363,11 +391,11 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) panel->childSetValue("terrain_lower_spin", LLSD(terrain_lower_limit)); panel->childSetValue("use_estate_sun_check", LLSD(use_estate_sun)); - BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); panel->childSetValue("fixed_sun_check", LLSD((BOOL)(region_flags & REGION_FLAGS_SUN_FIXED))); panel->childSetEnabled("fixed_sun_check", allow_modify && !use_estate_sun); panel->childSetValue("sun_hour_slider", LLSD(sun_hour)); panel->childSetEnabled("sun_hour_slider", allow_modify && !use_estate_sun); + panel->setCtrlsEnabled(allow_modify); getInstance()->refreshFromRegion( gAgent.getRegion() ); } @@ -584,7 +612,7 @@ BOOL LLPanelRegionGeneralInfo::postBuild() initCtrl("block_terraform_check"); initCtrl("block_fly_check"); initCtrl("allow_damage_check"); - initCtrl("allow_land_resell_check"); + initCtrl("allow_land_resell_check"); initCtrl("allow_parcel_changes_check"); initCtrl("agent_limit_spin"); initCtrl("object_bonus_spin"); @@ -1690,11 +1718,12 @@ bool LLPanelEstateInfo::isLindenEstate() return (estate_id <= ESTATE_LAST_LINDEN); } +typedef std::vector<LLUUID> AgentOrGroupIDsVector; struct LLEstateAccessChangeInfo { U32 mOperationFlag; // ESTATE_ACCESS_BANNED_AGENT_ADD, _REMOVE, etc. LLString mDialogName; - LLUUID mAgentOrGroupID; + AgentOrGroupIDsVector mAgentOrGroupIDs; // List of agent IDs to apply to this change }; // Special case callback for groups, since it has different callback format than names @@ -1704,7 +1733,7 @@ void LLPanelEstateInfo::addAllowedGroup2(LLUUID id, void* user_data) LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo; change_info->mOperationFlag = ESTATE_ACCESS_ALLOWED_GROUP_ADD; change_info->mDialogName = "EstateAllowedGroupAdd"; - change_info->mAgentOrGroupID = id; + change_info->mAgentOrGroupIDs.push_back(id); if (isLindenEstate()) { @@ -1749,8 +1778,8 @@ void LLPanelEstateInfo::accessAddCore2(S32 option, void* data) return; } - // avatar picker no multi-select, yes close-on-select - LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, FALSE, TRUE); + // avatar picker yes multi-select, yes close-on-select + LLFloaterAvatarPicker::show(accessAddCore3, (void*)change_info, TRUE, TRUE); } // static @@ -1766,21 +1795,44 @@ void LLPanelEstateInfo::accessAddCore3(const std::vector<std::string>& names, co return; } // User did select a name. - change_info->mAgentOrGroupID = ids[0]; - + change_info->mAgentOrGroupIDs = ids; // Can't put estate owner on ban list LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate(); if (!panel) return; LLViewerRegion* region = gAgent.getRegion(); if (!region) return; - - if ((change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) - && (region->getOwner() == change_info->mAgentOrGroupID)) + + if (change_info->mOperationFlag & ESTATE_ACCESS_ALLOWED_AGENT_ADD) { - gViewerWindow->alertXml("OwnerCanNotBeDenied"); - delete change_info; - change_info = NULL; - return; + LLCtrlListInterface *list = panel->childGetListInterface("allowed_avatar_name_list"); + int currentCount = (list ? list->getItemCount() : 0); + if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) + { + LLString::format_map_t args; + args["[NUM_ADDED]"] = llformat("%d",ids.size()); + args["[MAX_AGENTS]"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); + args["[LIST_TYPE]"] = "Allowed Residents"; + args["[NUM_EXCESS]"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); + gViewerWindow->alertXml("MaxAgentOnRegionBatch", args); + delete change_info; + return; + } + } + if (change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) + { + LLCtrlListInterface *list = panel->childGetListInterface("banned_avatar_name_list"); + int currentCount = (list ? list->getItemCount() : 0); + if (ids.size() + currentCount > ESTATE_MAX_ACCESS_IDS) + { + LLString::format_map_t args; + args["[NUM_ADDED]"] = llformat("%d",ids.size()); + args["[MAX_AGENTS]"] = llformat("%d",ESTATE_MAX_ACCESS_IDS); + args["[LIST_TYPE]"] = "Banned Residents"; + args["[NUM_EXCESS]"] = llformat("%d",(ids.size()+currentCount)-ESTATE_MAX_ACCESS_IDS); + gViewerWindow->alertXml("MaxAgentOnRegionBatch", args); + delete change_info; + return; + } } if (isLindenEstate()) @@ -1804,21 +1856,29 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const char* dialog_ if (!panel) return; LLNameListCtrl* name_list = LLViewerUICtrlFactory::getNameListByName(panel, list_ctrl_name); if (!name_list) return; - LLScrollListItem* item = name_list->getFirstSelected(); - if (!item) return; - LLUUID agent_id = item->getUUID(); + + std::vector<LLScrollListItem*> list_vector = name_list->getAllSelected(); + if (list_vector.size() == 0) + return; LLEstateAccessChangeInfo* change_info = new LLEstateAccessChangeInfo; - change_info->mAgentOrGroupID = agent_id; change_info->mOperationFlag = operation_flag; change_info->mDialogName = dialog_name; - + + for (std::vector<LLScrollListItem*>::const_iterator iter = list_vector.begin(); + iter != list_vector.end(); + iter++) + { + LLScrollListItem *item = (*iter); + change_info->mAgentOrGroupIDs.push_back(item->getUUID()); + } + if (isLindenEstate()) { // warn on change linden estate gViewerWindow->alertXml("ChangeLindenAccess", - accessRemoveCore2, - (void*)change_info); + accessRemoveCore2, + (void*)change_info); } else { @@ -1850,9 +1910,9 @@ void LLPanelEstateInfo::accessRemoveCore2(S32 option, void* data) LLString::format_map_t args; args["[ALL_ESTATES]"] = all_estates_text(); gViewerWindow->alertXml(change_info->mDialogName, - args, - accessCoreConfirm, - (void*)change_info); + args, + accessCoreConfirm, + (void*)change_info); } } @@ -1862,35 +1922,54 @@ void LLPanelEstateInfo::accessRemoveCore2(S32 option, void* data) void LLPanelEstateInfo::accessCoreConfirm(S32 option, void* data) { LLEstateAccessChangeInfo* change_info = (LLEstateAccessChangeInfo*)data; - U32 flags = change_info->mOperationFlag; - switch(option) + const U32 originalFlags = change_info->mOperationFlag; + AgentOrGroupIDsVector& ids = change_info->mAgentOrGroupIDs; + + LLViewerRegion* region = gAgent.getRegion(); + + for (AgentOrGroupIDsVector::const_iterator iter = ids.begin(); + iter != ids.end(); + iter++) { - case 0: - // This estate - sendEstateAccessDelta(flags, change_info->mAgentOrGroupID); - break; - case 1: + U32 flags = originalFlags; + if (iter + 1 != ids.end()) + flags |= ESTATE_ACCESS_NO_REPLY; + + const LLUUID id = (*iter); + if ((change_info->mOperationFlag & ESTATE_ACCESS_BANNED_AGENT_ADD) + && region && (region->getOwner() == id)) { - // All estates, either than I own or manage for this owner. - // This will be verified on simulator. JC - LLViewerRegion* region = gAgent.getRegion(); - if (!region) break; - if (region->getOwner() == gAgent.getID() - || gAgent.isGodlike()) - { - flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES; - sendEstateAccessDelta(flags, change_info->mAgentOrGroupID); - } - else if (region->isEstateManager()) + gViewerWindow->alertXml("OwnerCanNotBeDenied"); + break; + } + switch(option) + { + case 0: + // This estate + sendEstateAccessDelta(flags, id); + break; + case 1: { - flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES; - sendEstateAccessDelta(flags, change_info->mAgentOrGroupID); + // All estates, either than I own or manage for this owner. + // This will be verified on simulator. JC + if (!region) break; + if (region->getOwner() == gAgent.getID() + || gAgent.isGodlike()) + { + flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES; + sendEstateAccessDelta(flags, id); + } + else if (region->isEstateManager()) + { + flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES; + sendEstateAccessDelta(flags, id); + } + break; } - break; + case 2: + default: + break; } - case 2: - default: - break; } delete change_info; change_info = NULL; diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 32c712d926..51e28047f5 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -50,6 +50,7 @@ // newview #include "llagent.h" #include "llchatbar.h" +#include "lldelayedgestureerror.h" #include "llinventorymodel.h" #include "llnotify.h" #include "llviewermessage.h" @@ -1006,20 +1007,14 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); } - // Get missing gesture's name. Use UUID if name can't be found. - LLStringBase<char>::format_map_t args; - LLInventoryItem *item = gInventory.getItem( item_id ); - args["[NAME]"] = item ? item->getName() : LLString( item_id.asString() ); - - if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifyBox::showXml("GestureMissing", args); + LLDelayedGestureError::gestureMissing( item_id ); } else { - LLNotifyBox::showXml("UnableToLoadGesture", args); + LLDelayedGestureError::gestureFailedToLoad( item_id ); } llwarns << "Problem loading gesture: " << status << llendl; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 4dc5bfddec..3242e7d474 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -80,7 +80,7 @@ LLIMMgr* gIMMgr = NULL; // // Statics // -//*FIXME: make these all either UIStrings or Strings +// *FIXME: make these all either UIStrings or Strings static LLString sOnlyUserMessage; static LLUIString sOfflineMessage; static LLUIString sInviteMessage; @@ -374,7 +374,7 @@ LLIMMgr::LLIMMgr() : mFriendObserver = new LLIMViewFriendObserver(this); LLAvatarTracker::instance().addObserver(mFriendObserver); - //*HACK: use floater to initialize string constants from xml file + // *HACK: use floater to initialize string constants from xml file // then delete it right away LLFloaterIM* dummy_floater = new LLFloaterIM(); delete dummy_floater; @@ -738,7 +738,7 @@ void LLIMMgr::inviteToSession( if (channelp && channelp->callStarted()) { // you have already started a call to the other user, so just accept the invite - inviteUserResponse(0, invite); + inviteUserResponse(0, invite); // inviteUserResponse deletes return; } @@ -752,7 +752,7 @@ void LLIMMgr::inviteToSession( if (gSavedSettings.getBOOL("VoiceCallsFriendsOnly")) { // invite not from a friend, so decline - inviteUserResponse(1, invite); + inviteUserResponse(1, invite); // inviteUserResponse deletes return; } } @@ -771,13 +771,17 @@ void LLIMMgr::inviteToSession( args["[GROUP]"] = session_name; LLNotifyBox::showXml(notify_box_type, - args, - inviteUserResponse, - (void*)invite); + args, + inviteUserResponse, + (void*)invite); // inviteUserResponse deletes } mPendingInvitations[session_id.asString()] = LLSD(); } + else + { + delete invite; + } } //static diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 9ef666b357..432854f62e 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -199,7 +199,7 @@ public: protected: LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - mInventoryPanel(inventory), mUUID(uuid) {} + mInventoryPanel(inventory), mUUID(uuid), mInvType(LLInventoryType::IT_NONE) {} LLInventoryObject* getInventoryObject() const; BOOL isInTrash() const; @@ -297,7 +297,7 @@ public: protected: LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLInvFVBridge(inventory, uuid) {} + LLInvFVBridge(inventory, uuid), mCallingCards(FALSE), mWearables(FALSE) {} // menu callbacks static void pasteClipboard(void* user_data); diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index ba2925d45a..691a786245 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -49,6 +49,7 @@ #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" +#include "lldelayedgestureerror.h" #include "llfloatergesture.h" // for some label constants #include "llgesturemgr.h" #include "llinventorymodel.h" @@ -955,11 +956,6 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, } else { - // Get missing gesture's name. Use UUID if name can't be found. - LLStringBase<char>::format_map_t args; - LLInventoryItem *item = gInventory.getItem( *item_idp ); - args["[NAME]"] = item ? item->getName() : LLString( item_idp->asString() ); - if( gViewerStats ) { gViewerStats->incStat( LLViewerStats::ST_DOWNLOAD_FAILED ); @@ -968,11 +964,11 @@ void LLPreviewGesture::onLoadComplete(LLVFS *vfs, if( LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE == status || LL_ERR_FILE_EMPTY == status) { - LLNotifyBox::showXml("GestureMissing", args); + LLDelayedGestureError::gestureMissing( *item_idp ); } else { - LLNotifyBox::showXml("UnableToLoadGesture", args); + LLDelayedGestureError::gestureFailedToLoad( *item_idp ); } llwarns << "Problem loading gesture: " << status << llendl; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d2bc8f4100..13dfe45f3e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1021,7 +1021,6 @@ BOOL idle_startup() gSkipOptionalUpdate, gAcceptTOS, gAcceptCriticalMessage, - gViewerDigest, gLastExecEvent, requested_options, hashed_mac_string, diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6bd81e76e9..0f478d86d4 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5180,7 +5180,7 @@ void process_script_teleport_request(LLMessageSystem* msg, void**) msg->getVector3("Data", "SimPosition", pos); msg->getVector3("Data", "LookAt", look_at); - // gFloaterWorldMap->trackURL(sim_name, (U32)pos.mV[VX], (U32)pos.mV[VY], (U32)pos.mV[VZ]); + // gFloaterWorldMap->trackURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]); // LLFloaterWorldMap::show(NULL, TRUE); LLURLDispatcher::dispatch(LLURLDispatcher::buildSLURL(sim_name, (S32)pos.mV[VX], (S32)pos.mV[VY], (S32)pos.mV[VZ]), FALSE); diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index c94ee7c54e..4e030c7abc 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -207,39 +207,6 @@ void LLWearableList::processGetAssetReply( const char* filename, const LLAssetID } -LLWearable* LLWearableList::createLegacyWearableFromAvatar( EWearableType type ) -{ - llinfos << "LLWearableList::createLegacyWearableFromAvatar" << llendl; - - LLTransactionID tid; - LLAssetID new_asset_id; - tid.generate(); - new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); - - LLWearable* wearable = new LLWearable( tid ); - wearable->setType( type ); - wearable->setName( wearable->getTypeLabel() ); - wearable->setDescription( "Recovered from lost asset." ); - - LLVOAvatar* avatar = gAgent.getAvatarObject(); - LLPermissions perm; - perm.init( avatar->getID(), avatar->getID(), LLUUID::null, LLUUID::null ); - perm.initMasks(PERM_TRANSFER, PERM_TRANSFER, PERM_NONE, PERM_NONE, PERM_MOVE | PERM_TRANSFER); - wearable->setPermissions( perm ); - - // Save info is the default. - - wearable->readFromAvatar(); - - mList[ new_asset_id ] = wearable; - - // Send to the dataserver - wearable->saveNewAsset(); - - return wearable; -} - - // Creates a new wearable just like the old_wearable but with data copied over from item LLWearable* LLWearableList::createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item ) { diff --git a/indra/newview/llwearablelist.h b/indra/newview/llwearablelist.h index c3a7e1bd91..88434842b4 100644 --- a/indra/newview/llwearablelist.h +++ b/indra/newview/llwearablelist.h @@ -51,8 +51,6 @@ public: void(*asset_arrived_callback)(LLWearable*, void* userdata), void* userdata ); - LLWearable* createLegacyWearableFromAvatar( EWearableType type ); - LLWearable* createWearableMatchedToInventoryItem( LLWearable* old_wearable, LLViewerInventoryItem* item ); LLWearable* createCopyFromAvatar( LLWearable* old_wearable, const std::string& new_name = std::string() ); LLWearable* createCopy( LLWearable* old_wearable ); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 136612e1a8..f42ec51b5d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1896,7 +1896,7 @@ void renderPhysicalBeacons(LLDrawable* drawablep) LLViewerObject *vobj = drawablep->getVObj(); if (vobj && !vobj->isAvatar() - && !vobj->getParent() + //&& !vobj->getParent() && vobj->usePhysics()) { if (gPipeline.sRenderBeacons) |