From fbb4e5fb0f7bba935ec9d0d466be12a346a6b149 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 8 Jun 2012 13:49:02 -0400 Subject: STORM-68 As a Builder, I want that ability to set default permissions on creation of objects, clothing, scripts, notecards, etc. First pass at implementation, debuggins lines still need to be removed and there is one known bug to be resolved. --- doc/contributions.txt | 1 + indra/llinventory/llinventory.cpp | 5 + indra/newview/app_settings/settings.xml | 330 +++++++++++++ indra/newview/llagentwearables.cpp | 62 ++- indra/newview/llfloaterbvhpreview.cpp | 2 +- indra/newview/llfloatergesture.cpp | 25 +- indra/newview/llfloaternamedesc.cpp | 2 +- indra/newview/llfloaterperms.cpp | 153 ++++--- indra/newview/llfloaterperms.h | 49 +- indra/newview/llfloaterpreference.cpp | 8 +- indra/newview/llfloaterpreference.h | 1 + indra/newview/llfloatersnapshot.cpp | 4 +- indra/newview/llinventorymodel.cpp | 2 +- indra/newview/llmeshrepository.cpp | 6 +- indra/newview/llpanelcontents.cpp | 6 +- indra/newview/llviewerfloaterreg.cpp | 2 +- indra/newview/llviewerinventory.cpp | 98 +++- indra/newview/llviewerinventory.h | 12 + indra/newview/llviewermenufile.cpp | 12 +- indra/newview/llviewerobject.cpp | 12 +- indra/newview/llviewerobjectlist.cpp | 12 + .../skins/default/xui/en/floater_perms_default.xml | 508 +++++++++++++++++++++ indra/newview/skins/default/xui/en/menu_viewer.xml | 7 - .../default/xui/en/panel_preferences_advanced.xml | 11 + 24 files changed, 1214 insertions(+), 116 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/floater_perms_default.xml diff --git a/doc/contributions.txt b/doc/contributions.txt index 04edfb4bea..4b4ec9dcd5 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -629,6 +629,7 @@ Jonathan Yap STORM-1809 STORM-1793 STORM-1810 + STORM-68 Kadah Coba STORM-1060 Jondan Lundquist diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index fbf23bc3f0..4e5a328c54 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -303,6 +303,11 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid, LLStringUtil::replaceNonstandardASCII(mDescription, ' '); LLStringUtil::replaceChar(mDescription, '|', ' '); mPermissions.initMasks(inv_type); +// if (LLInventoryType::IT_LSL == inv_type) +// { +// mPermissions.setMaskNext(permissions.getMaskNextOwner()); + mPermissions.setMaskNext(PERM_ALL); +// } } LLInventoryItem::LLInventoryItem() : diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 05c05b9393..b3ed917574 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -13516,5 +13516,335 @@ Value 0 + ObjectsNextOwnerCopy + + Comment + Newly created objects can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + ObjectsNextOwnerModify + + Comment + Newly created objects can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + ObjectsNextOwnerTransfer + + Comment + Newly created objects can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + ObjectsEveryoneCopy + + Comment + Everyone can copy the newly created object + Persist + 1 + Type + Boolean + Value + 0 + + ObjectsShareWithGroup + + Comment + Newly created objects are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + UploadsNextOwnerCopy + + Comment + Newly uploaded items can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + UploadsNextOwnerModify + + Comment + Newly uploaded items can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + UploadsNextOwnerTransfer + + Comment + Newly uploaded items can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + UploadsEveryoneCopy + + Comment + Everyone can copy the newly uploaded item + Persist + 1 + Type + Boolean + Value + 0 + + UploadsShareWithGroup + + Comment + Newly uploaded items are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + ScriptsNextOwnerCopy + + Comment + Newly created scripts can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + ScriptsNextOwnerModify + + Comment + Newly created scripts can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + ScriptsNextOwnerTransfer + + Comment + Newly created scripts can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + ScriptsEveryoneCopy + + Comment + Everyone can copy the newly created script + Persist + 1 + Type + Boolean + Value + 0 + + ScriptsShareWithGroup + + Comment + Newly created scripts are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + NotecardsNextOwnerCopy + + Comment + Newly created notecards can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + NotecardsNextOwnerModify + + Comment + Newly created notecards can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + NotecardsNextOwnerTransfer + + Comment + Newly created notecards can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + NotecardsEveryoneCopy + + Comment + Everyone can copy the newly created notecard + Persist + 1 + Type + Boolean + Value + 0 + + NotecardsShareWithGroup + + Comment + Newly created notecards are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + GesturesNextOwnerCopy + + Comment + Newly created gestures can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + GesturesNextOwnerModify + + Comment + Newly created gestures can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + GesturesNextOwnerTransfer + + Comment + Newly created gestures can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + GesturesEveryoneCopy + + Comment + Everyone can copy the newly created gesture + Persist + 1 + Type + Boolean + Value + 0 + + GesturesShareWithGroup + + Comment + Newly created gestures are shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + + WearablesNextOwnerCopy + + Comment + Newly created clothing or body part can be copied by next owner + Persist + 1 + Type + Boolean + Value + 0 + + WearablesNextOwnerModify + + Comment + Newly created clothing or body part can be modified by next owner + Persist + 1 + Type + Boolean + Value + 0 + + WearablesNextOwnerTransfer + + Comment + Newly created clothing or body part can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + + WearablesEveryoneCopy + + Comment + Everyone can copy the newly created clothing or body part + Persist + 1 + Type + Boolean + Value + 0 + + WearablesShareWithGroup + + Comment + Newly created clothing or body part is shared with the currently active group + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index dd02a74a38..7017357346 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -49,6 +49,7 @@ #include "llvoavatarself.h" #include "llwearable.h" #include "llwearablelist.h" +#include "llfloaterperms.h" #include @@ -65,8 +66,24 @@ class LLWearAndEditCallback : public LLInventoryCallback { void fire(const LLUUID& inv_item) { +llwarns << "DBG 1" << llendl; if (inv_item.isNull()) return; +llwarns << "DBG 2" << llendl; + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + +llwarns << "DBG 3" << llendl; + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); + item->setPermissions(perm); + +llwarns << "DBG 4" << llendl; + gInventory.updateItem(item); + gInventory.notifyObservers(); + // Request editing the item after it gets worn. gAgentWearables.requestEditingWearable(inv_item); @@ -75,6 +92,27 @@ class LLWearAndEditCallback : public LLInventoryCallback } }; +class LLCreateWearableCallback : public LLInventoryCallback +{ + void fire(const LLUUID& inv_item) + { + if (inv_item.isNull()) + return; + + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); + item->setPermissions(perm); + + gInventory.updateItem(item); + gInventory.notifyObservers(); + } +}; + /////////////////////////////////////////////////////////////////////////////// // HACK: For EXT-3923: Pants item shows in inventory with skin icon and messes with "current look" @@ -1982,7 +2020,16 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con LLWearable* wearable = LLWearableList::instance().createNewWearable(type); LLAssetType::EType asset_type = wearable->getAssetType(); LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE; - LLPointer cb = wear ? new LLWearAndEditCallback : NULL; + LLPointer cb; + if (wear) + { + cb = new LLWearAndEditCallback; + } + else + { + cb = new LLCreateWearableCallback; + } + LLUUID folder_id; if (parent_id.notNull()) @@ -1995,10 +2042,15 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con folder_id = gInventory.findCategoryUUIDForType(folder_type); } - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - folder_id, wearable->getTransactionID(), wearable->getName(), - wearable->getDescription(), asset_type, inv_type, wearable->getType(), - wearable->getPermissions().getMaskNextOwner(), + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + folder_id, + wearable->getTransactionID(), + wearable->getName(), + wearable->getDescription(), + asset_type, inv_type, + wearable->getType(), + LLFloaterPerms::getNextOwnerPerms("Wearables"), cb); } diff --git a/indra/newview/llfloaterbvhpreview.cpp b/indra/newview/llfloaterbvhpreview.cpp index b050a638dc..720c2cbeea 100644 --- a/indra/newview/llfloaterbvhpreview.cpp +++ b/indra/newview/llfloaterbvhpreview.cpp @@ -991,7 +991,7 @@ void LLFloaterBvhPreview::onBtnOK(void* userdata) 0, LLFolderType::FT_NONE, LLInventoryType::IT_ANIMATION, - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), name, callback, expected_upload_cost, userdata); diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 56051ff684..dcc245ee20 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -48,6 +48,7 @@ #include "llviewermenu.h" #include "llviewerinventory.h" #include "llviewercontrol.h" +#include "llfloaterperms.h" BOOL item_name_precedes( LLInventoryItem* a, LLInventoryItem* b ) { @@ -74,6 +75,16 @@ public: void fire(const LLUUID &inv_item) { LLPreviewGesture::show(inv_item, LLUUID::null); + + LLInventoryItem* item = gInventory.getItem(inv_item); + if (item) + { + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Gestures")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); + item->setPermissions(perm); + } } }; @@ -449,9 +460,17 @@ void LLFloaterGesture::onClickPlay() void LLFloaterGesture::onClickNew() { LLPointer cb = new GestureShowCallback(); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - LLUUID::null, LLTransactionID::tnull, "New Gesture", "", LLAssetType::AT_GESTURE, - LLInventoryType::IT_GESTURE, NOT_WEARABLE, PERM_MOVE | PERM_TRANSFER, cb); + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + LLUUID::null, + LLTransactionID::tnull, + "New Gesture", + "", + LLAssetType::AT_GESTURE, + LLInventoryType::IT_GESTURE, + NOT_WEARABLE, + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Gestures"), + cb); } void LLFloaterGesture::onActivateBtnClick() diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 27b1c3b9cd..eefc352287 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -171,7 +171,7 @@ void LLFloaterNameDesc::onBtnOK( ) getChild("name_form")->getValue().asString(), getChild("description_form")->getValue().asString(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms(), LLFloaterPerms::getGroupPerms(), LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, nruserdata); closeFloater(false); } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 80b55c3cbb..3853dd0ef6 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -37,96 +37,139 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed) : LLFloater(seed) { - mCommitCallbackRegistrar.add("Perms.Copy", boost::bind(&LLFloaterPerms::onCommitCopy, this)); - mCommitCallbackRegistrar.add("Perms.OK", boost::bind(&LLFloaterPerms::onClickOK, this)); - mCommitCallbackRegistrar.add("Perms.Cancel", boost::bind(&LLFloaterPerms::onClickCancel, this)); - } BOOL LLFloaterPerms::postBuild() { - mCloseSignal.connect(boost::bind(&LLFloaterPerms::cancel, this)); - - refresh(); - - return TRUE; + return true; } -void LLFloaterPerms::onClickOK() -{ - ok(); - closeFloater(); +//static +U32 LLFloaterPerms::getGroupPerms(std::string prefix) +{ + return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE; } -void LLFloaterPerms::onClickCancel() +//static +U32 LLFloaterPerms::getEveryonePerms(std::string prefix) { - cancel(); - closeFloater(); + return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE; } -void LLFloaterPerms::onCommitCopy() +//static +U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) { - // Implements fair use - BOOL copyable = gSavedSettings.getBOOL("NextOwnerCopy"); - if(!copyable) + U32 flags = PERM_MOVE; + if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) { - gSavedSettings.setBOOL("NextOwnerTransfer", TRUE); + flags |= PERM_COPY; } - LLCheckBoxCtrl* xfer = getChild("next_owner_transfer"); - xfer->setEnabled(copyable); + if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) + { + flags |= PERM_MODIFY; + } + if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) + { + flags |= PERM_TRANSFER; + } + return flags; } -void LLFloaterPerms::ok() +//static +U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix) { - refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official. + // Sets bits for permissions that are off + U32 flags = PERM_MOVE; + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) + { + flags |= PERM_COPY; + } + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) + { + flags |= PERM_MODIFY; + } + if ( !gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) + { + flags |= PERM_TRANSFER; + } + return flags; } -void LLFloaterPerms::cancel() +LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) +: LLFloater(seed) { - gSavedSettings.setBOOL("ShareWithGroup", mShareWithGroup); - gSavedSettings.setBOOL("EveryoneCopy", mEveryoneCopy); - gSavedSettings.setBOOL("NextOwnerCopy", mNextOwnerCopy); - gSavedSettings.setBOOL("NextOwnerModify", mNextOwnerModify); - gSavedSettings.setBOOL("NextOwnerTransfer", mNextOwnerTransfer); + mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2)); + mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this)); + mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this)); } -void LLFloaterPerms::refresh() +BOOL LLFloaterPermsDefault::postBuild() { - mShareWithGroup = gSavedSettings.getBOOL("ShareWithGroup"); - mEveryoneCopy = gSavedSettings.getBOOL("EveryoneCopy"); - mNextOwnerCopy = gSavedSettings.getBOOL("NextOwnerCopy"); - mNextOwnerModify = gSavedSettings.getBOOL("NextOwnerModify"); - mNextOwnerTransfer = gSavedSettings.getBOOL("NextOwnerTransfer"); + mCloseSignal.connect(boost::bind(&LLFloaterPermsDefault::cancel, this)); + + category_names[CAT_OBJECTS] = "Objects"; + category_names[CAT_UPLOADS] = "Uploads"; + category_names[CAT_SCRIPTS] = "Scripts"; + category_names[CAT_NOTECARDS] = "Notecards"; + category_names[CAT_GESTURES] = "Gestures"; + category_names[CAT_WEARABLES] = "Wearables"; + + refresh(); + + return true; } -//static -U32 LLFloaterPerms::getGroupPerms(std::string prefix) -{ - return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE; +void LLFloaterPermsDefault::onClickOK() +{ + ok(); + closeFloater(); } -//static -U32 LLFloaterPerms::getEveryonePerms(std::string prefix) +void LLFloaterPermsDefault::onClickCancel() { - return gSavedSettings.getBOOL(prefix+"EveryoneCopy") ? PERM_COPY : PERM_NONE; + cancel(); + closeFloater(); } -//static -U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) +void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) { - U32 flags = PERM_MOVE; - if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) + // Implements fair use + std::string prefix = user_data.asString(); + + BOOL copyable = gSavedSettings.getBOOL(prefix+"NextOwnerCopy"); + if(!copyable) { - flags |= PERM_COPY; + gSavedSettings.setBOOL(prefix+"NextOwnerTransfer", TRUE); } - if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") ) + LLCheckBoxCtrl* xfer = getChild(prefix+"_transfer"); + xfer->setEnabled(copyable); +} + +void LLFloaterPermsDefault::ok() +{ + refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official. +} + +void LLFloaterPermsDefault::cancel() +{ + for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - flags |= PERM_MODIFY; + gSavedSettings.setBOOL(category_names[iter]+"NextOwnerCopy", mNextOwnerCopy[iter]); + gSavedSettings.setBOOL(category_names[iter]+"NextOwnerModify", mNextOwnerModify[iter]); + gSavedSettings.setBOOL(category_names[iter]+"NextOwnerTransfer", mNextOwnerTransfer[iter]); + gSavedSettings.setBOOL(category_names[iter]+"ShareWithGroup", mShareWithGroup[iter]); + gSavedSettings.setBOOL(category_names[iter]+"EveryoneCopy", mEveryoneCopy[iter]); } - if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") ) +} + +void LLFloaterPermsDefault::refresh() +{ + for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - flags |= PERM_TRANSFER; + mShareWithGroup[iter] = gSavedSettings.getBOOL(category_names[iter]+"ShareWithGroup"); + mEveryoneCopy[iter] = gSavedSettings.getBOOL(category_names[iter]+"EveryoneCopy"); + mNextOwnerCopy[iter] = gSavedSettings.getBOOL(category_names[iter]+"NextOwnerCopy"); + mNextOwnerModify[iter] = gSavedSettings.getBOOL(category_names[iter]+"NextOwnerModify"); + mNextOwnerTransfer[iter] = gSavedSettings.getBOOL(category_names[iter]+"NextOwnerTransfer"); } - return flags; } - diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 6b65f4b0cd..bb4a6f9702 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -36,26 +36,53 @@ class LLFloaterPerms : public LLFloater public: /*virtual*/ BOOL postBuild(); - void ok(); - void cancel(); - void onClickOK(); - void onClickCancel(); - void onCommitCopy(); + // Convenience methods to get current permission preference bitfields from saved settings: static U32 getEveryonePerms(std::string prefix=""); // prefix + "EveryoneCopy" static U32 getGroupPerms(std::string prefix=""); // prefix + "ShareWithGroup" static U32 getNextOwnerPerms(std::string prefix=""); // bitfield for prefix + "NextOwner" + "Copy", "Modify", and "Transfer" + static U32 getNextOwnerPermsInverted(std::string prefix=""); private: LLFloaterPerms(const LLSD& seed); + +}; + +class LLFloaterPermsDefault : public LLFloater +{ + friend class LLFloaterReg; + +public: + /*virtual*/ BOOL postBuild(); + void ok(); + void cancel(); + void onClickOK(); + void onClickCancel(); + void onCommitCopy(const LLSD& user_data); + +enum Categories +{ + CAT_OBJECTS, + CAT_UPLOADS, + CAT_SCRIPTS, + CAT_NOTECARDS, + CAT_GESTURES, + CAT_WEARABLES, + CAT_LAST +}; + +private: + LLFloaterPermsDefault(const LLSD& seed); void refresh(); - BOOL // cached values only for implementing cancel. - mShareWithGroup, - mEveryoneCopy, - mNextOwnerCopy, - mNextOwnerModify, - mNextOwnerTransfer; + std::string category_names[CAT_LAST]; + + // cached values only for implementing cancel. + bool mShareWithGroup[CAT_LAST]; + bool mEveryoneCopy[CAT_LAST]; + bool mNextOwnerCopy[CAT_LAST]; + bool mNextOwnerModify[CAT_LAST]; + bool mNextOwnerTransfer[CAT_LAST]; }; #endif diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 173b0e538c..596c73870d 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -346,7 +346,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.BlockList", boost::bind(&LLFloaterPreference::onClickBlockList, this)); mCommitCallbackRegistrar.add("Pref.Proxy", boost::bind(&LLFloaterPreference::onClickProxySettings, this)); mCommitCallbackRegistrar.add("Pref.TranslationSettings", boost::bind(&LLFloaterPreference::onClickTranslationSettings, this)); - + mCommitCallbackRegistrar.add("Pref.PermsDefault", boost::bind(&LLFloaterPreference::onClickPermsDefault, this)); + sSkin = gSavedSettings.getString("SkinCurrent"); mCommitCallbackRegistrar.add("Pref.ClickActionChange", boost::bind(&LLFloaterPreference::onClickActionChange, this)); @@ -1520,6 +1521,11 @@ void LLFloaterPreference::onClickActionChange() mClickActionDirty = true; } +void LLFloaterPreference::onClickPermsDefault() +{ + LLFloaterReg::showInstance("perms_default"); +} + void LLFloaterPreference::updateClickActionSettings() { const int single_clk_action = getChild("single_click_action_combo")->getValue().asInteger(); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index ec5994e917..bc6e74b0c7 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -157,6 +157,7 @@ public: void onClickBlockList(); void onClickProxySettings(); void onClickTranslationSettings(); + void onClickPermsDefault(); void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index d8d62e5bbb..1d429c5963 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -980,8 +980,8 @@ void LLSnapshotLivePreview::saveTexture() LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload - LLFloaterPerms::getGroupPerms(), // that is more permissive than other uploads - LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getGroupPerms("Uploads"), // that is more permissive than other uploads + LLFloaterPerms::getEveryonePerms("Uploads"), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); gViewerWindow->playSnapshotAnimAndSound(); diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 85ecb133d0..bca2a28dfd 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2778,7 +2778,7 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**) { LLPointer titem = new LLViewerInventoryItem; titem->unpackMessage(msg, _PREHASH_ItemData, i); - llinfos << "unpaked item '" << titem->getName() << "' in " + llinfos << "unpacked item '" << titem->getName() << "' in " << titem->getParentUUID() << llendl; U32 callback_id; msg->getU32Fast(_PREHASH_ItemData, _PREHASH_CallbackID, callback_id); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f461c7e46f..03547f103a 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -1369,9 +1369,9 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) result["asset_type"] = "mesh"; result["inventory_type"] = "object"; result["description"] = "(No Description)"; - result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms()); - result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms()); - result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms()); + result["next_owner_mask"] = LLSD::Integer(LLFloaterPerms::getNextOwnerPerms("Uploads")); + result["group_mask"] = LLSD::Integer(LLFloaterPerms::getGroupPerms("Uploads")); + result["everyone_mask"] = LLSD::Integer(LLFloaterPerms::getEveryonePerms("Uploads")); res["mesh_list"] = LLSD::emptyArray(); res["texture_list"] = LLSD::emptyArray(); diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index a64b4ec94d..f180afa037 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -59,6 +59,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llworld.h" +#include "llfloaterperms.h" // // Imported globals @@ -156,12 +157,15 @@ void LLPanelContents::onClickNewScript(void *userdata) { LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); + + // Parameters are base, owner, everyone, group, next perm.initMasks( PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, - PERM_MOVE | PERM_TRANSFER); + PERM_ALL); +// PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer new_item = diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7fdaac68c8..356c79a036 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -244,12 +244,12 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterPayUtil::registerFloater(); LLFloaterReg::add("people", "floater_people.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("perms_default", "floater_perms_default.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("places", "floater_places.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preferences", "floater_preferences.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_proxy", "floater_preferences_proxy.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_hardware_settings", "floater_hardware_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("prefs_translation", "floater_translation_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 45ca23cdfe..0d56233db1 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -64,6 +64,7 @@ #include "llavatarnamecache.h" #include "llavataractions.h" #include "lllogininstance.h" +#include "llfloaterperms.h" ///---------------------------------------------------------------------------- /// Helper class to store special inventory item names and their localized values. @@ -1013,6 +1014,24 @@ void ActivateGestureCallback::fire(const LLUUID& inv_item) LLGestureMgr::instance().activateGesture(inv_item); } +void CreateScriptCallback::fire(const LLUUID& inv_item) +{ + if (inv_item.isNull()) + return; + + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + + item->setPermissions(perm); + + gInventory.updateItem(item); + gInventory.notifyObservers(); +} + void CreateGestureCallback::fire(const LLUUID& inv_item) { if (inv_item.isNull()) @@ -1022,6 +1041,12 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) LLViewerInventoryItem* item = gInventory.getItem(inv_item); if (!item) return; + + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); + item->setPermissions(perm); + gInventory.updateItem(item); gInventory.notifyObservers(); @@ -1030,6 +1055,23 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) gFloaterView->adjustToFitScreen(preview, FALSE); } +void CreateNotecardCallback::fire(const LLUUID& inv_item) +{ + if (inv_item.isNull()) + return; + + LLViewerInventoryItem* item = gInventory.getItem(inv_item); + if (!item) return; + + LLPermissions perm = item->getPermissions(); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Notecards")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Notecards")); + item->setPermissions(perm); + + gInventory.updateItem(item); + gInventory.notifyObservers(); +} + void AddFavoriteLandmarkCallback::fire(const LLUUID& inv_item_id) { if (mTargetLandmarkId.isNull()) return; @@ -1285,22 +1327,44 @@ void create_new_item(const std::string& name, LLViewerAssetType::generateDescriptionFor(asset_type, desc); next_owner_perm = (next_owner_perm) ? next_owner_perm : PERM_MOVE | PERM_TRANSFER; - - if (inv_type == LLInventoryType::IT_GESTURE) - { - LLPointer cb = new CreateGestureCallback(); - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, - NOT_WEARABLE, next_owner_perm, cb); - } - else + LLPointer cb = NULL; + + switch (inv_type) { - LLPointer cb = NULL; - create_inventory_item(gAgent.getID(), gAgent.getSessionID(), - parent_id, LLTransactionID::tnull, name, desc, asset_type, inv_type, - NOT_WEARABLE, next_owner_perm, cb); - } + case LLInventoryType::IT_LSL: + { + cb = new CreateScriptCallback(); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Scripts"); + break; + } + + case LLInventoryType::IT_GESTURE: + { + cb = new CreateGestureCallback(); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Gestures"); + break; + } + + case LLInventoryType::IT_NOTECARD: + { + cb = new CreateNotecardCallback(); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Notecards"); + break; + } + } + + create_inventory_item(gAgent.getID(), + gAgent.getSessionID(), + parent_id, + LLTransactionID::tnull, + name, + desc, + asset_type, + inv_type, + NOT_WEARABLE, + next_owner_perm, + cb); } const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) @@ -1341,7 +1405,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons parent_id, LLAssetType::AT_LSL_TEXT, LLInventoryType::IT_LSL, - PERM_MOVE | PERM_TRANSFER); + PERM_MOVE | PERM_TRANSFER); // overridden in create_new_item } else if ("notecard" == type_name) { @@ -1350,7 +1414,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons parent_id, LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, - PERM_ALL); + PERM_ALL); // overridden in create_new_item } else if ("gesture" == type_name) { @@ -1359,7 +1423,7 @@ void menu_create_inventory_item(LLFolderView* root, LLFolderBridge *bridge, cons parent_id, LLAssetType::AT_GESTURE, LLInventoryType::IT_GESTURE, - PERM_ALL); + PERM_ALL); // overridden in create_new_item } else { diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 7822ef4da6..a88a5d31be 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -279,12 +279,24 @@ public: void fire(const LLUUID& inv_item); }; +class CreateScriptCallback : public LLInventoryCallback +{ +public: + void fire(const LLUUID& inv_item); +}; + class CreateGestureCallback : public LLInventoryCallback { public: void fire(const LLUUID& inv_item); }; +class CreateNotecardCallback : public LLInventoryCallback +{ +public: + void fire(const LLUUID& inv_item); +}; + class AddFavoriteLandmarkCallback : public LLInventoryCallback { public: diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index dc2ea4bd1f..aa0c0008aa 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -441,9 +441,9 @@ class LLFileUploadBulk : public view_listener_t 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms(), - LLFloaterPerms::getGroupPerms(), - LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, @@ -1004,9 +1004,9 @@ void upload_done_callback( 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - PERM_NONE, - PERM_NONE, - PERM_NONE, + LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, // assuming next in a group of uploads is of roughly the same type, i.e. same upload cost diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index cd300accb7..98856d125f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -100,6 +100,7 @@ #include "lltrans.h" #include "llsdutil.h" #include "llmediaentry.h" +#include "llfloaterperms.h" //#define DEBUG_UPDATE_TYPE @@ -2571,8 +2572,15 @@ void LLViewerObject::saveScript( * interaction with doUpdateInventory() called below. */ lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl; + + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + perm.setMaskNext(PERM_ALL); + LLPointer task_item = - new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(), + new LLViewerInventoryItem(item->getUUID(), mID, perm, item->getAssetUUID(), item->getType(), item->getInventoryType(), item->getName(), item->getDescription(), @@ -2594,6 +2602,8 @@ void LLViewerObject::saveScript( task_item->packMessage(msg); msg->sendReliable(mRegionp->getHost()); + task_item->setPermissions(perm); + // do the internal logic doUpdateInventory(task_item, TASK_INVENTORY_ITEM_KEY, is_new); } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 6912faa9ec..09eec8e5ab 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -74,6 +74,7 @@ #include "object_flags.h" #include "llappviewer.h" +#include "llfloaterperms.h" extern F32 gMinObjectDistance; extern BOOL gAnimateTextures; @@ -266,6 +267,17 @@ void LLViewerObjectList::processUpdateCore(LLViewerObject* objectp, // llinfos << "DEBUG selecting " << objectp->mID << " " // << objectp->mLocalID << llendl; LLSelectMgr::getInstance()->selectObjectAndFamily(objectp); + + // This is a bit of a hack. Because the server ensures one of either COPY or TRANSFER is always be on + // to set the bits we want it is first necessary to set them all on and then clear the ones that + // are not needed. + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER, TRUE, PERM_COPY | PERM_MODIFY | PERM_TRANSFER); + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_NEXT_OWNER, FALSE, LLFloaterPerms::getNextOwnerPermsInverted("Objects")); + + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_EVERYONE, TRUE, LLFloaterPerms::getEveryonePerms("Objects")); + + LLSelectMgr::getInstance()->selectionSetObjectPermissions(PERM_GROUP, TRUE, LLFloaterPerms::getGroupPerms("Objects")); + dialog_refresh_all(); } diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml new file mode 100644 index 0000000000..ac19be8d15 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -0,0 +1,508 @@ + + + + + + + Copy + + + + Modify + + + + Transfer + + + + Share with group + + + + Allow anyone to copy + + + + + Objects + + + + + + + + + + + + + Uploads + + + + + + + + + + + + + Scripts + + + + + + + + + + + + + Notecards + + + + + + + + + + + + + Gestures + + + + + + + + + + + + + + Wearables + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 5ba566b175..c660ef13ae 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1131,13 +1131,6 @@ function="File.UploadBulk" parameter="" /> - - - + -- cgit v1.2.3 From dce0a9be48808d084f3c98615d5747544fe59ad5 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 8 Jun 2012 17:09:37 -0400 Subject: STORM-68 Add default: to switch statement to fix compiling issue on mac/linux --- indra/newview/llviewerinventory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 0d56233db1..83a195738a 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1352,6 +1352,8 @@ void create_new_item(const std::string& name, next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Notecards"); break; } + default: + break; } create_inventory_item(gAgent.getID(), -- cgit v1.2.3 From d61a5f743c5d3bde0146b036508485bfdc9c3cb5 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 9 Jun 2012 10:05:54 -0400 Subject: STORM-68 Removed debugging PERM_ALL that was causing upload trouble and removed 3 obsolete debug settings --- indra/llinventory/llinventory.cpp | 5 ----- indra/newview/app_settings/settings.xml | 33 ------------------------------- indra/newview/llassetuploadresponders.cpp | 2 +- indra/newview/llfloaternamedesc.cpp | 8 +++++++- indra/newview/llfloaterperms.cpp | 2 ++ indra/newview/llviewerobject.cpp | 5 ++--- 6 files changed, 12 insertions(+), 43 deletions(-) diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 4e5a328c54..fbf23bc3f0 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -303,11 +303,6 @@ LLInventoryItem::LLInventoryItem(const LLUUID& uuid, LLStringUtil::replaceNonstandardASCII(mDescription, ' '); LLStringUtil::replaceChar(mDescription, '|', ' '); mPermissions.initMasks(inv_type); -// if (LLInventoryType::IT_LSL == inv_type) -// { -// mPermissions.setMaskNext(permissions.getMaskNextOwner()); - mPermissions.setMaskNext(PERM_ALL); -// } } LLInventoryItem::LLInventoryItem() : diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b3ed917574..7a3c1df0bc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6043,39 +6043,6 @@ Value 130 - NextOwnerCopy - - Comment - Newly created objects can be copied by next owner - Persist - 1 - Type - Boolean - Value - 0 - - NextOwnerModify - - Comment - Newly created objects can be modified by next owner - Persist - 1 - Type - Boolean - Value - 0 - - NextOwnerTransfer - - Comment - Newly created objects can be resold or given away by next owner - Persist - 1 - Type - Boolean - Value - 1 - NewCacheLocation Comment diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 65bfc990d1..c4a2d8fca5 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -151,7 +151,7 @@ void on_new_single_inventory_upload_complete( LLSaleInfo::DEFAULT, inventory_item_flags, creation_date_now); - +llwarns << "DBG -------------" << llendl; gInventory.updateItem(item); gInventory.notifyObservers(); success = true; diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index eefc352287..97671a8614 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -45,6 +45,7 @@ #include "lluictrlfactory.h" #include "llstring.h" #include "lleconomy.h" +#include "llpermissions.h" // linden includes #include "llassetstorage.h" @@ -167,11 +168,16 @@ void LLFloaterNameDesc::onBtnOK( ) S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). void *nruserdata = NULL; std::string display_name = LLStringUtil::null; + LLPermissions perm; + perm.setMaskNext(PERM_COPY); upload_new_resource(mFilenameAndPath, // file getChild("name_form")->getValue().asString(), getChild("description_form")->getValue().asString(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, - LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), +perm.getMaskNextOwner(), +// LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getGroupPerms("Uploads"), + LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, nruserdata); closeFloater(false); } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 3853dd0ef6..ede17d937e 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -59,6 +59,8 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix) //static U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) { +llwarns << "DBG prefix=" << prefix << llendl; + U32 flags = PERM_MOVE; if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) { diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 98856d125f..a494e934b0 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2577,7 +2577,6 @@ void LLViewerObject::saveScript( perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - perm.setMaskNext(PERM_ALL); LLPointer task_item = new LLViewerInventoryItem(item->getUUID(), mID, perm, @@ -2602,10 +2601,10 @@ void LLViewerObject::saveScript( task_item->packMessage(msg); msg->sendReliable(mRegionp->getHost()); - task_item->setPermissions(perm); - // do the internal logic doUpdateInventory(task_item, TASK_INVENTORY_ITEM_KEY, is_new); +llwarns << "DBG is_new:" << is_new << llendl; + task_item->setPermissions(perm); } void LLViewerObject::moveInventory(const LLUUID& folder_id, -- cgit v1.2.3 From b6df9b6d56108bcf4b3e8dfd875ef76a9b6f448b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 9 Jun 2012 11:43:39 -0400 Subject: STORM-68 Fiddling with debugging for New Script case --- indra/newview/llassetuploadresponders.cpp | 2 +- indra/newview/llfloaternamedesc.cpp | 6 ++---- indra/newview/llfloaterperms.cpp | 2 -- indra/newview/llpanelcontents.cpp | 4 ++-- indra/newview/llviewerobject.cpp | 20 ++++++++++++-------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index c4a2d8fca5..65bfc990d1 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -151,7 +151,7 @@ void on_new_single_inventory_upload_complete( LLSaleInfo::DEFAULT, inventory_item_flags, creation_date_now); -llwarns << "DBG -------------" << llendl; + gInventory.updateItem(item); gInventory.notifyObservers(); success = true; diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 97671a8614..ee7f413a59 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -168,14 +168,12 @@ void LLFloaterNameDesc::onBtnOK( ) S32 expected_upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); // kinda hack - assumes that unsubclassed LLFloaterNameDesc is only used for uploading chargeable assets, which it is right now (it's only used unsubclassed for the sound upload dialog, and THAT should be a subclass). void *nruserdata = NULL; std::string display_name = LLStringUtil::null; - LLPermissions perm; - perm.setMaskNext(PERM_COPY); + upload_new_resource(mFilenameAndPath, // file getChild("name_form")->getValue().asString(), getChild("description_form")->getValue().asString(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE, -perm.getMaskNextOwner(), -// LLFloaterPerms::getNextOwnerPerms("Uploads"), + LLFloaterPerms::getNextOwnerPerms("Uploads"), LLFloaterPerms::getGroupPerms("Uploads"), LLFloaterPerms::getEveryonePerms("Uploads"), display_name, callback, expected_upload_cost, nruserdata); diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index ede17d937e..3853dd0ef6 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -59,8 +59,6 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix) //static U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix) { -llwarns << "DBG prefix=" << prefix << llendl; - U32 flags = PERM_MOVE; if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") ) { diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index f180afa037..db4b679c50 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -164,8 +164,8 @@ void LLPanelContents::onClickNewScript(void *userdata) PERM_ALL, PERM_NONE, PERM_NONE, - PERM_ALL); -// PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); + // this does not work + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer new_item = diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index a494e934b0..57549e025c 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2555,6 +2555,17 @@ void LLViewerObject::doUpdateInventory( doInventoryCallback(); ++mInventorySerialNum; } + + if(is_new && mInventory) + { + std::string name = item->getName(); +llwarns << "DBG " << name << llendl; + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + item->setPermissions(perm); + } } // save a script, which involves removing the old one, and rezzing @@ -2573,13 +2584,8 @@ void LLViewerObject::saveScript( */ lldebugs << "LLViewerObject::saveScript() " << item->getUUID() << " " << item->getAssetUUID() << llendl; - LLPermissions perm = item->getPermissions(); - perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); - perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); - perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - LLPointer task_item = - new LLViewerInventoryItem(item->getUUID(), mID, perm, + new LLViewerInventoryItem(item->getUUID(), mID, item->getPermissions(), item->getAssetUUID(), item->getType(), item->getInventoryType(), item->getName(), item->getDescription(), @@ -2603,8 +2609,6 @@ void LLViewerObject::saveScript( // do the internal logic doUpdateInventory(task_item, TASK_INVENTORY_ITEM_KEY, is_new); -llwarns << "DBG is_new:" << is_new << llendl; - task_item->setPermissions(perm); } void LLViewerObject::moveInventory(const LLUUID& folder_id, -- cgit v1.2.3 From 052dc3982056d822a523394954c277d9eb7c7ab9 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 12 Jun 2012 14:26:53 -0400 Subject: STORM-68 Fix for group perms not being defined correctly and fix for group and everyone perms failing to copy and paste --- indra/newview/llagentwearables.cpp | 7 +- indra/newview/llfloatergesture.cpp | 1 + indra/newview/llfloaterperms.cpp | 2 +- indra/newview/llpanelcontents.cpp | 10 ++ indra/newview/llviewerinventory.cpp | 8 +- indra/newview/llviewerobject.cpp | 11 --- .../skins/default/xui/en/floater_perm_prefs.xml | 108 --------------------- .../skins/default/xui/en/floater_perms_default.xml | 23 ----- 8 files changed, 20 insertions(+), 150 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/floater_perm_prefs.xml diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 7017357346..654a785a1a 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -66,21 +66,18 @@ class LLWearAndEditCallback : public LLInventoryCallback { void fire(const LLUUID& inv_item) { -llwarns << "DBG 1" << llendl; if (inv_item.isNull()) return; -llwarns << "DBG 2" << llendl; LLViewerInventoryItem* item = gInventory.getItem(inv_item); if (!item) return; -llwarns << "DBG 3" << llendl; LLPermissions perm = item->getPermissions(); perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); item->setPermissions(perm); -llwarns << "DBG 4" << llendl; + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -108,6 +105,7 @@ class LLCreateWearableCallback : public LLInventoryCallback perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -521,6 +519,7 @@ void LLAgentWearables::saveWearableAs(const LLWearableType::EType type, LLWearable* new_wearable = LLWearableList::instance().createCopy( old_wearable, trunc_name); + LLPointer cb = new addWearableToAgentInventoryCallback( LLPointer(NULL), diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index dcc245ee20..59f5b2b346 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -84,6 +84,7 @@ public: perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Gestures")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); item->setPermissions(perm); + item->updateServer(FALSE); } } }; diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 3853dd0ef6..4e9acfc780 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -47,7 +47,7 @@ BOOL LLFloaterPerms::postBuild() //static U32 LLFloaterPerms::getGroupPerms(std::string prefix) { - return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY : PERM_NONE; + return gSavedSettings.getBOOL(prefix+"ShareWithGroup") ? PERM_COPY | PERM_MOVE | PERM_MODIFY : PERM_NONE; } //static diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index db4b679c50..ac0cf460c0 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -183,6 +183,16 @@ void LLPanelContents::onClickNewScript(void *userdata) time_corrected()); object->saveScript(new_item, TRUE, true); + std::string name = new_item->getName(); +llwarns << "DBG " << new_item->getUUID() << llendl; + +// LLPermissions perm = new_item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + new_item->setPermissions(perm); + + // *NOTE: In order to resolve SL-22177, we needed to create // the script first, and then you have to click it in // inventory to edit it. diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 83a195738a..a7ba150294 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1025,9 +1025,9 @@ void CreateScriptCallback::fire(const LLUUID& inv_item) LLPermissions perm = item->getPermissions(); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -1047,8 +1047,9 @@ void CreateGestureCallback::fire(const LLUUID& inv_item) perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Gestures")); item->setPermissions(perm); - gInventory.updateItem(item); - gInventory.notifyObservers(); + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); LLPreviewGesture* preview = LLPreviewGesture::show(inv_item, LLUUID::null); // Force to be entirely onscreen. @@ -1068,6 +1069,7 @@ void CreateNotecardCallback::fire(const LLUUID& inv_item) perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Notecards")); item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 57549e025c..ff714f24b4 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2555,17 +2555,6 @@ void LLViewerObject::doUpdateInventory( doInventoryCallback(); ++mInventorySerialNum; } - - if(is_new && mInventory) - { - std::string name = item->getName(); -llwarns << "DBG " << name << llendl; - LLPermissions perm = item->getPermissions(); - perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); - perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); - perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - item->setPermissions(perm); - } } // save a script, which involves removing the old one, and rezzing diff --git a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml b/indra/newview/skins/default/xui/en/floater_perm_prefs.xml deleted file mode 100644 index ff454e3ebf..0000000000 --- a/indra/newview/skins/default/xui/en/floater_perm_prefs.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - Next owner can: - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml index ac19be8d15..15077330fd 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -8,7 +8,6 @@ save_rect="true" title="DEFAULT CREATION PERMISSIONS" width="700"> - - Copy - Modify - Transfer - Share with group - Allow anyone to copy - - - - - - - - - - - - - - - - - - - Stretch Both Sides - + label_text.wrap="true" + label_text.width="100" + width="134" /> Date: Tue, 25 Feb 2014 17:06:06 +0200 Subject: MAINT-3671 Fix is changed to solve issue with other multi-previews --- indra/newview/llpreview.cpp | 2 ++ indra/newview/llpreviewscript.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 04934b13f1..2caf186b70 100755 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -91,6 +91,7 @@ void LLPreview::setObjectID(const LLUUID& object_id) { loadAsset(); } + refreshFromItem(); } void LLPreview::setItem( LLInventoryItem* item ) @@ -100,6 +101,7 @@ void LLPreview::setItem( LLInventoryItem* item ) { loadAsset(); } + refreshFromItem(); } const LLInventoryItem *LLPreview::getItem() const diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 26c46d543c..18bbf110f7 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1879,7 +1879,7 @@ void LLLiveLSLEditor::loadAsset() mIsModifiable = item && gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE); - refreshFromItem(); + // This is commented out, because we don't completely // handle script exports yet. /* -- cgit v1.2.3 From 057544757c2d713cd8bdc385fc6ea4aeac24b380 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 25 Feb 2014 14:14:21 -0500 Subject: keywords_lsl_default.xml updates from the simulator tree --- .../newview/app_settings/keywords_lsl_default.xml | 3569 ++++++++++---------- 1 file changed, 1801 insertions(+), 1768 deletions(-) diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index 7bdd63e79d..83801a7e1e 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -1,4 +1,4 @@ - + controls @@ -6,27 +6,27 @@ default tooltip - All scripts must have a default state, which is the first state entered when the script starts. + All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error. do tooltip - do / while loop + do / while loop\ndo {\n...\n} while (<condition>); else tooltip - if / else block + if / else block\nif (<condition>) {\n...\n[} else [if (<condition>) {\n...]]\n} for tooltip - for loop + for loop\nfor (<initialiser>; <condition>; <post-iteration-statement>)\n{ ...\n} if tooltip - if / else block + if / else block\nif (<condition>) {\n...\n[} else [if (<condition>) {\n...]]\n} jump @@ -36,7 +36,7 @@ return tooltip - Leave current event or function. + Leave current event or function.\nreturn [<variable>];\nOptionally pass back a variable's value, from a function. state @@ -64,12 +64,12 @@ key tooltip - A 128 bit unique identifier (UUID). + A 128 bit unique identifier (UUID).\nThe key is represented as hexidecimal characters (A-F and 0-9), grouped into sections (8,4,4,4,12 characters) and separated by hyphens (for a total of 36 characters). e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2". list tooltip - A collection of other data types. + A collection of other data types.\nLists are signified by square brackets surrounding their elements; the elements inside are separated by commas. e.g. [0, 1, 2, 3, 4] or ["Yes", "No", "Perhaps"]. quaternion @@ -79,17 +79,17 @@ rotation tooltip - The rotation type is one of several ways to represent an orientation in 3D. + The rotation type is one of several ways to represent an orientation in 3D.\nIt is a mathematical object called a quaternion. You can think of a quaternion as four numbers (x, y, z, w), three of which represent the direction an object is facing and a fourth that represents the object's banking left or right around that direction. string tooltip - Text data. + Text data.\nThe editor accepts UTF-8 encoded text. vector tooltip - A vector is a data type that contains a set of three float values. + A vector is a data type that contains a set of three float values.\nVectors are used to represent colours (RGB), positions, and directions/velocities. constants @@ -1705,7 +1705,7 @@ value 6 tooltip - Allows enabling/disbling of the "Pragma: no-cache" header. + Allows enabling/disbling of the "Pragma: no-cache" header.\nUsage: [HTTP_PRAGMA_NO_CACHE, integer SendHeader]. When SendHeader is TRUE, the "Pragma: no-cache" header is sent by the script. This matches the default behavior. When SendHeader is FALSE, no "Pragma" header is sent by the script. HTTP_VERBOSE_THROTTLE @@ -1941,15 +1941,6 @@ tooltip For use with KFM_COMMAND. - KFM_CMD_SET_MODE - - type - integer - value - 3 - tooltip - - KFM_CMD_STOP type @@ -2326,7 +2317,7 @@ value 19 tooltip - Gets the attachment point to which the object is attached. + Gets the attachment point to which the object is attached.\nReturns 0 if the object is not an attachment (or is an avatar, etc). OBJECT_CHARACTER_TIME @@ -2479,7 +2470,7 @@ value 18 tooltip - Gets the id of the root prim of the object requested. + Gets the id of the root prim of the object requested.\nIf id is an avatar, return the id of the root prim of the linkset the avatar is sitting on (or the avatar's own id if the avatar is not sitting on an object within the region). OBJECT_ROT @@ -4289,7 +4280,7 @@ type integer value - 1 + 0 tooltip @@ -4460,7 +4451,7 @@ type integer value - 1024 + 0x400 tooltip @@ -5176,7 +5167,7 @@ value 0 tooltip - Returns the % of pathfinding characters skipped each frame, averaged over the last minute. + Returns the % of pathfinding characters skipped each frame, averaged over the last minute.\nThe returned value corresponds to the "Characters Updated" stat in the viewer's Statistics Bar. SMOOTH @@ -5203,7 +5194,7 @@ value 64 tooltip - Controls whether the object can be grabbed. + Controls whether the object can be grabbed.\nA grab is the default action when in third person, and is available as the hand tool in build mode. This is useful for physical objects that you don't want other people to be able to trivially disturb. The default is FALSE STATUS_BLOCK_GRAB_OBJECT @@ -5239,7 +5230,7 @@ value 0x80 tooltip - Controls whether the object is returned to the owners inventory if it wanders off the edge of the world. + Controls whether the object is returned to the owners inventory if it wanders off the edge of the world.\nIt is useful to set this status TRUE for things like bullets or rockets. The default is TRUE STATUS_INTERNAL_ERROR @@ -5293,7 +5284,7 @@ value 0x10 tooltip - Controls/indicates whether the object collides or not. + Controls/indicates whether the object collides or not.\nSetting the value to TRUE makes the object non-colliding with all objects. It is a good idea to use this for most objects that move or rotate, but are non-physical. It is also useful for simulating volumetric lighting. The default is FALSE. STATUS_PHYSICS @@ -5302,7 +5293,7 @@ value 0x1 tooltip - Controls/indicates whether the object moves physically. + Controls/indicates whether the object moves physically.\nThis controls the same flag that the UI check-box for Physical controls. The default is FALSE. STATUS_RETURN_AT_EDGE @@ -5617,7 +5608,7 @@ value 32 tooltip - A slider between minimum (0.0) and maximum (1.0) deflection of angular orientation. That is, it's a simple scalar for modulating the strength of angular deflection such that the vehicles preferred axis of motion points toward its real velocity. + A slider between minimum (0.0) and maximum (1.0) deflection of angular orientation. That is, its a simple scalar for modulating the strength of angular deflection such that the vehicles preferred axis of motion points toward its real velocity. VEHICLE_ANGULAR_DEFLECTION_TIMESCALE @@ -6021,28 +6012,28 @@ TargetNumber - tooltip - type integer + tooltip + TargetRotation - tooltip - type rotation + tooltip + CurrentRotation - tooltip - type rotation + tooltip + @@ -6056,28 +6047,28 @@ TargetNumber - tooltip - type integer + tooltip + TargetPosition - tooltip - type vector + tooltip + CurrentPosition - tooltip - type vector + tooltip + @@ -6091,10 +6082,10 @@ AvatarID - tooltip - type key + tooltip + @@ -6108,10 +6099,10 @@ Changed - tooltip - type integer + tooltip + @@ -6125,10 +6116,10 @@ NumberOfCollisions - tooltip - type integer + tooltip + @@ -6143,10 +6134,10 @@ NumberOfCollisions - tooltip - type integer + tooltip + @@ -6161,10 +6152,10 @@ NumberOfCollisions - tooltip - type integer + tooltip + @@ -6179,28 +6170,28 @@ AvatarID - tooltip - type key + tooltip + Levels - tooltip - type integer + tooltip + Edges - tooltip - type integer + tooltip + @@ -6215,19 +6206,19 @@ RequestID - tooltip - type key + tooltip + Data - tooltip - type string + tooltip + @@ -6242,46 +6233,46 @@ Time - tooltip - type string + tooltip + Address - tooltip - type string + tooltip + Subject - tooltip - type string + tooltip + Body - tooltip - type string + tooltip + NumberRemaining - tooltip - type integer + tooltip + @@ -6296,28 +6287,28 @@ HTTPRequestID - tooltip - type key + tooltip + HTTPMethod - tooltip - type string + tooltip + Body - tooltip - type string + tooltip + @@ -6331,37 +6322,37 @@ HTTPRequestID - tooltip - type key + tooltip + Status - tooltip - type integer + tooltip + Metadata - tooltip - type list + tooltip + Body - tooltip - type string + tooltip + @@ -6375,10 +6366,10 @@ Position - tooltip - type vector + tooltip + @@ -6392,10 +6383,10 @@ Position - tooltip - type vector + tooltip + @@ -6409,10 +6400,10 @@ Position - tooltip - type vector + tooltip + @@ -6426,37 +6417,37 @@ SendersLink - tooltip - type integer + tooltip + Value - tooltip - type integer + tooltip + Text - tooltip - type string + tooltip + ID - tooltip - type key + tooltip + @@ -6470,37 +6461,37 @@ Channel - tooltip - type integer + tooltip + Name - tooltip - type string + tooltip + ID - tooltip - type key + tooltip + Text - tooltip - type string + tooltip + @@ -6515,19 +6506,19 @@ Payer - tooltip - type key + tooltip + Amount - tooltip - type integer + tooltip + @@ -6576,10 +6567,10 @@ RezzedObjectsID - tooltip - type key + tooltip + @@ -6593,10 +6584,10 @@ StartParameter - tooltip - type integer + tooltip + @@ -6610,19 +6601,19 @@ Type - tooltip - type integer + tooltip + Reserved - tooltip - type list + tooltip + @@ -6636,55 +6627,55 @@ EventType - tooltip - type integer + tooltip + ChannelID - tooltip - type key + tooltip + MessageID - tooltip - type key + tooltip + Sender - tooltip - type string + tooltip + Data - tooltip - type integer + tooltip + Data - tooltip - type string + tooltip + @@ -6698,10 +6689,10 @@ PermissionFlags - tooltip - type integer + tooltip + @@ -6716,10 +6707,10 @@ NumberDetected - tooltip - type integer + tooltip + @@ -6755,10 +6746,10 @@ NumberOfTouches - tooltip - type integer + tooltip + @@ -6774,10 +6765,10 @@ NumberOfTouches - tooltip - type integer + tooltip + @@ -6792,10 +6783,10 @@ NumberOfTouches - tooltip - type integer + tooltip + @@ -6810,28 +6801,28 @@ RequestID - tooltip - type key + tooltip + Success - tooltip - type integer + tooltip + Message - tooltip - type string + tooltip + @@ -6854,10 +6845,10 @@ Value - tooltip - An integer value. type integer + tooltip + An integer value. @@ -6877,10 +6868,10 @@ Value - tooltip - A floating-point value. type float + tooltip + A floating-point value. @@ -6900,24 +6891,24 @@ ID - tooltip - Agent UUID to add to ban-list. type key + tooltip + Agent UUID to add to ban-list. Hours - tooltip - Period, in hours, to ban the avatar for. type float + tooltip + Period, in hours, to ban the avatar for. tooltip - Add avatar ID to the parcel ban list for the specified number of Hours. + Add avatar ID to the parcel ban list for the specified number of Hours.\nA value of 0 for Hours will add the agent indefinitely.\nThe smallest value that Hours will accept is 0.01; anything smaller will be seen as 0.\nWhen values that small are used, it seems the function bans in approximately 30 second increments (Probably 36 second increments, as 0.01 of an hour is 36 seconds).\nResidents teleporting to a parcel where they are banned will be redirected to a neighbouring parcel. llAddToLandPassList @@ -6932,19 +6923,19 @@ ID - tooltip - Agent UUID to add to pass-list. type key + tooltip + Agent UUID to add to pass-list. Hours - tooltip - Period, in hours, to allow the avatar for. type float + tooltip + Period, in hours, to allow the avatar for. @@ -6964,10 +6955,10 @@ Volume - tooltip - The volume to set. type float + tooltip + The volume to set. @@ -6987,10 +6978,10 @@ Flag - tooltip - Boolean, If TRUE allows anyone to drop inventory on prim, FALSE revokes. type integer + tooltip + Boolean, If TRUE allows anyone to drop inventory on prim, FALSE revokes. @@ -7010,19 +7001,19 @@ Rot1 - tooltip - First rotation. type rotation + tooltip + First rotation. Rot2 - tooltip - Second rotation. type rotation + tooltip + Second rotation. @@ -7042,19 +7033,19 @@ Force - tooltip - Amount of impulse force to apply. type vector + tooltip + Amount of impulse force to apply. Local - tooltip - Boolean, if TRUE, force is treated as a local directional vector instead of region directional vector. type integer + tooltip + Boolean, if TRUE, force is treated as a local directional vector instead of region directional vector. @@ -7074,19 +7065,19 @@ Force - tooltip - Amount of impulse force to apply. type vector + tooltip + Amount of impulse force to apply. Local - tooltip - Boolean, if TRUE, uses local axis, if FALSE, uses region axis. type integer + tooltip + Boolean, if TRUE, uses local axis, if FALSE, uses region axis. @@ -7106,10 +7097,10 @@ Value - tooltip - A floating-point value. type float + tooltip + A floating-point value. @@ -7129,19 +7120,19 @@ y - tooltip - A floating-point value. type float + tooltip + A floating-point value. x - tooltip - A floating-point value. type float + tooltip + A floating-point value. @@ -7161,10 +7152,10 @@ AttachmentPoint - tooltip - type integer + tooltip + @@ -7184,10 +7175,10 @@ AttachPoint - tooltip - Valid attachment poit or ATTACH_* constant. type integer + tooltip + Valid attachment point or ATTACH_* constant. @@ -7207,15 +7198,15 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. tooltip - If an avatar is sitting on the link's sit target, return the avatar's key, NULL_KEY otherwise. + If an avatar is sitting on the link's sit target, return the avatar's key, NULL_KEY otherwise.\nReturns a key that is the UUID of the user seated on the specified link's prim. llAvatarOnSitTarget @@ -7228,7 +7219,7 @@ arguments tooltip - If an avatar is seated on the sit target, returns the avatar's key, otherwise NULL_KEY. + If an avatar is seated on the sit target, returns the avatar's key, otherwise NULL_KEY.\nThis only will detect avatars sitting on sit targets defined with llSitTarget. llAxes2Rot @@ -7243,28 +7234,28 @@ Forward - tooltip - Forward/Back part of rotation. type vector + tooltip + Forward/Back part of rotation. Left - tooltip - Left/Right part of rotation. type vector + tooltip + Left/Right part of rotation. Up - tooltip - Up/Down part of rotation. type vector + tooltip + Up/Down part of rotation. @@ -7284,19 +7275,19 @@ Axis - tooltip - Axis. type vector + tooltip + Axis. Angle - tooltip - Angle in radians. type float + tooltip + Angle in radians. @@ -7316,15 +7307,15 @@ Text - tooltip - type string + tooltip + tooltip - Returns an integer that is the Text, Base64 decoded as a big endian integer. + Returns an integer that is the Text, Base64 decoded as a big endian integer.\nReturns zero if Text is longer then 8 characters. If Text contains fewer then 6 characters, the return value is unpredictable. llBase64ToString @@ -7339,10 +7330,10 @@ Text - tooltip - type string + tooltip + @@ -7375,10 +7366,10 @@ LinkNumber - tooltip - type integer + tooltip + @@ -7398,33 +7389,33 @@ Start - tooltip - type vector + tooltip + End - tooltip - type vector + tooltip + Options - tooltip - type list + tooltip + tooltip - Casts a ray into the physics world from 'start' to 'end' and returns data according to details in Options. + Casts a ray into the physics world from 'start' to 'end' and returns data according to details in Options.\nReports collision data for intersections with objects.\nReturn value: [UUID_1, {link_number_1}, hit_position_1, {hit_normal_1}, UUID_2, {link_number_2}, hit_position_2, {hit_normal_2}, ... , status_code] where {} indicates optional data. llCeil @@ -7439,10 +7430,10 @@ Value - tooltip - type float + tooltip + @@ -7475,24 +7466,24 @@ Link - tooltip - type integer + tooltip + Face - tooltip - type integer + tooltip + tooltip - Clears (deletes) the media and all parameters from the given Face on the linked prim. + Clears (deletes) the media and all parameters from the given Face on the linked prim.\nReturns an integer that is a STATUS_* flag, which details the success/failure of the operation. llClearPrimMedia @@ -7507,15 +7498,15 @@ Face - tooltip - Number of side to clear. type integer + tooltip + Number of side to clear. tooltip - Clears (deletes) the media and all parameters from the given Face. + Clears (deletes) the media and all parameters from the given Face.\nReturns an integer that is a STATUS_* flag which details the success/failure of the operation. llCloseRemoteDataChannel @@ -7530,10 +7521,10 @@ ChannelID - tooltip - type key + tooltip + @@ -7553,10 +7544,10 @@ Offset - tooltip - type vector + tooltip + @@ -7576,33 +7567,33 @@ ObjectName - tooltip - type string + tooltip + ObjectID - tooltip - type key + tooltip + Accept - tooltip - If TRUE, only accept collisions with ObjectName name AND ObjectID (either is optional), otherwise with objects not ObjectName AND ObjectID. type integer + tooltip + If TRUE, only accept collisions with ObjectName name AND ObjectID (either is optional), otherwise with objects not ObjectName AND ObjectID. tooltip - If Accept == TRUE, only accept collisions with objects Name and ID, otherwise with objects not Name or ID. + Specify an empty string or NULL_KEY for Accept, to not filter on the corresponding parameter. llCollisionSound @@ -7617,24 +7608,24 @@ ImpactSound - tooltip - type string + tooltip + ImpactVolume - tooltip - type float + tooltip + tooltip - Suppress default collision sounds, replace default impact sounds with ImpactSound. + Suppress default collision sounds, replace default impact sounds with ImpactSound.\nThe ImpactSound must be in the object inventory.\nSupply an empty string to suppress collision sounds. llCollisionSprite @@ -7649,10 +7640,10 @@ ImpactSprite - tooltip - type string + tooltip + @@ -7672,10 +7663,10 @@ Theta - tooltip - type float + tooltip + @@ -7695,15 +7686,15 @@ Options - tooltip - type list + tooltip + tooltip - Convert link-set to AI/Physics character. + Convert link-set to AI/Physics character.\nCreates a path-finding entity, known as a "character", from the object containing the script. Required to activate use of path-finding functions.\nOptions is a list of key/value pairs. llCreateLink @@ -7718,24 +7709,24 @@ TargetPrim - tooltip - Object UUID that is in the same region. type key + tooltip + Object UUID that is in the same region. Parent - tooltip - If FALSE, then TargetPrim becomes the root. If TRUE, then the script's object becomes the root. type integer + tooltip + If FALSE, then TargetPrim becomes the root. If TRUE, then the script's object becomes the root. tooltip - Attempt to link the object the script is in, to target (requires permission PERMISSION_CHANGE_LINKS be set). + Attempt to link the object the script is in, to target (requires permission PERMISSION_CHANGE_LINKS be set).\nRequires permission PERMISSION_CHANGE_LINKS be set. llCSV2List @@ -7750,10 +7741,10 @@ Text - tooltip - type string + tooltip + @@ -7771,7 +7762,7 @@ arguments tooltip - Convert link-set from AI/Physics character to Physics object. + Convert link-set from AI/Physics character to Physics object.\nConvert the current link-set back to a standard object, removing all path-finding properties. llDeleteSubList @@ -7786,33 +7777,33 @@ Source - tooltip - type list + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + tooltip - Removes the slice from start to end and returns the remainder of the list. + Removes the slice from start to end and returns the remainder of the list.\nRemove a slice from the list and return the remainder, start and end are inclusive.\nUsing negative numbers for start and/or end causes the index to count backwards from the length of the list, so 0, -1 would delete the entire list.\nIf Start is larger than End the list deleted is the exclusion of the entries; so 6, 4 would delete the entire list except for the 5th. list entry. llDeleteSubString @@ -7827,33 +7818,33 @@ Source - tooltip - type string + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + tooltip - Removes the indicated sub-string and returns the result. + Removes the indicated sub-string and returns the result.\nStart and End are inclusive.\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would delete the entire string.\nIf Start is larger than End, the sub-string is the exclusion of the entries; so 6, 4 would delete the entire string except for the 5th. character. llDetachFromAvatar @@ -7881,15 +7872,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the grab offset of a user touching the object. + Returns the grab offset of a user touching the object.\nReturns <0.0, 0.0, 0.0> if Number is not a valid object. llDetectedGroup @@ -7904,15 +7895,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns TRUE if detected object or agent Number has the same user group active as this object. + Returns TRUE if detected object or agent Number has the same user group active as this object.\nIt will return FALSE if the object or agent is in the group, but the group is not active. llDetectedKey @@ -7927,15 +7918,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the key of detected object or avatar number. + Returns the key of detected object or avatar number.\nReturns NULL_KEY if Number is not a valid index. llDetectedLinkNumber @@ -7950,15 +7941,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the link position of the triggered event for touches and collisions only. + Returns the link position of the triggered event for touches and collisions only.\n0 for a non-linked object, 1 for the root of a linked object, 2 for the first child, etc. llDetectedName @@ -7973,15 +7964,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the name of detected object or avatar number. + Returns the name of detected object or avatar number.\nReturns the name of detected object number.\nReturns empty string if Number is not a valid index. llDetectedOwner @@ -7996,15 +7987,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the key of detected object's owner. + Returns the key of detected object's owner.\nReturns invalid key if Number is not a valid index. llDetectedPos @@ -8019,15 +8010,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the position of detected object or avatar number. + Returns the position of detected object or avatar number.\nReturns <0.0, 0.0, 0.0> if Number is not a valid index. llDetectedRot @@ -8042,15 +8033,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the rotation of detected object or avatar number. + Returns the rotation of detected object or avatar number.\nReturns <0.0, 0.0, 0.0, 1.0> if Number is not a valid offset. llDetectedTouchBinormal @@ -8065,15 +8056,15 @@ Index - tooltip - Index of detection information type integer + tooltip + Index of detection information tooltip - Returns the surface bi-normal for a triggered touch event. + Returns the surface bi-normal for a triggered touch event.\nReturns a vector that is the surface bi-normal (tangent to the surface) where the touch event was triggered. llDetectedTouchFace @@ -8088,10 +8079,10 @@ Index - tooltip - Index of detection information type integer + tooltip + Index of detection information @@ -8111,15 +8102,15 @@ Index - tooltip - Index of detection information type integer + tooltip + Index of detection information tooltip - Returns the surface normal for a triggered touch event. + Returns the surface normal for a triggered touch event.\nReturns a vector that is the surface normal (perpendicular to the surface) where the touch event was triggered. llDetectedTouchPos @@ -8134,15 +8125,15 @@ Index - tooltip - Index of detected information type integer + tooltip + Index of detected information tooltip - Returns the position, in region coordinates, where the object was touched in a triggered touch event. + Returns the position, in region coordinates, where the object was touched in a triggered touch event.\nUnless it is a HUD, in which case it returns the position relative to the attach point. llDetectedTouchST @@ -8157,15 +8148,15 @@ Index - tooltip - Index of detection information type integer + tooltip + Index of detection information tooltip - Returns a vector that is the surface coordinates where the prim was touched. + Returns a vector that is the surface coordinates where the prim was touched.\nThe X and Y vector positions contain the horizontal (S) and vertical (T) face coordinates respectively.\nEach component is in the interval [0.0, 1.0].\nTOUCH_INVALID_TEXCOORD is returned if the surface coordinates cannot be determined (e.g. when the viewer does not support this function). llDetectedTouchUV @@ -8180,15 +8171,15 @@ Index - tooltip - Index of detection information type integer + tooltip + Index of detection information tooltip - Returns a vector that is the texture coordinates for where the prim was touched. + Returns a vector that is the texture coordinates for where the prim was touched.\nThe X and Y vector positions contain the U and V face coordinates respectively.\nTOUCH_INVALID_TEXCOORD is returned if the touch UV coordinates cannot be determined (e.g. when the viewer does not support this function). llDetectedType @@ -8203,15 +8194,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of detected object. + Returns the type (AGENT, ACTIVE, PASSIVE, SCRIPTED) of detected object.\nReturns 0 if number is not a valid index.\nNote that number is a bit-field, so comparisons need to be a bitwise checked. e.g.:\ninteger iType = llDetectedType(0);\n{\n // ...do stuff with the agent\n} llDetectedVel @@ -8226,15 +8217,15 @@ Number - tooltip - type integer + tooltip + tooltip - Returns the velocity of the detected object Number. + Returns the velocity of the detected object Number.\nReturns<0.0, 0.0, 0.0> if Number is not a valid offset. llDialog @@ -8249,44 +8240,51 @@ AvatarID - tooltip - type key + tooltip + Text - tooltip - type string + tooltip + Buttons - tooltip - type list + tooltip + Channel - tooltip - type integer + tooltip + tooltip Shows a dialog box on the avatar's screen with the message.\n Up to 12 strings in the list form buttons.\n - If a button is clicked, the name is chatted on Channel. + If a button is clicked, the name is chatted on Channel.\nOpens a "notify box" in the given avatars screen displaying the message.\n + Up to twelve buttons can be specified in a list of strings. When the user clicks a button, the name of the button is said on the specified channel.\n + Channels work just like llSay(), so channel 0 can be heard by everyone.\n + The chat originates at the object's position, not the avatar's position, even though it is said as the avatar (uses avatar's UUID and Name etc.).\n + Examples:\n + llDialog(who, "Are you a boy or a girl?", [ "Boy", "Girl" ], -4913);\n + llDialog(who, "This shows only an OK button.", [], -192);\n + llDialog(who, "This chats so you can 'hear' it.", ["Hooray"], 0); llDie @@ -8299,7 +8297,7 @@ arguments tooltip - Deletes the object. + Delete the object which holds the script. llDumpList2String @@ -8314,24 +8312,24 @@ Source - tooltip - type list + tooltip + Separator - tooltip - type string + tooltip + tooltip - Returns the list as a single string, using Separator between the entries. + Returns the list as a single string, using Separator between the entries.\nWrite the list out as a single string, using Separator between values. llEdgeOfWorld @@ -8346,24 +8344,24 @@ Position - tooltip - type vector + tooltip + Direction - tooltip - type vector + tooltip + tooltip - Checks to see whether the border hit by Direction from Position is the edge of the world (has no neighboring region). + Checks to see whether the border hit by Direction from Position is the edge of the world (has no neighboring region).\nReturns TRUE if the line along Direction from Position hits the edge of the world in the current simulator, returns FALSE if that edge crosses into another simulator. llEjectFromLand @@ -8378,15 +8376,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Ejects AvatarID from land that you own. + Ejects AvatarID from land that you own.\nEjects AvatarID from land that the object owner (group or resident) owns. llEmail @@ -8401,33 +8399,33 @@ Address - tooltip - type string + tooltip + Subject - tooltip - type string + tooltip + Text - tooltip - type string + tooltip + tooltip - Sends email to Address with Subject and Message. + Sends email to Address with Subject and Message.\nSends an email to Address with Subject and Message. llEscapeURL @@ -8442,15 +8440,16 @@ URL - tooltip - type string + tooltip + tooltip - Returns an escaped/encoded version of url, replacing spaces with %20 etc. + Returns an escaped/encoded version of url, replacing spaces with %20 etc.\nReturns the string that is the URL-escaped version of URL (replacing spaces with %20, etc.).\n + This function returns the UTF-8 encoded escape codes for selected characters. llEuler2Rot @@ -8465,15 +8464,15 @@ Vector - tooltip - type vector + tooltip + tooltip - Returns the rotation representation of the Euler angles. + Returns the rotation representation of the Euler angles.\nReturns the rotation represented by the Euler Angle. llEvade @@ -8488,24 +8487,24 @@ TargetID - tooltip - Agent or object to evade. type key + tooltip + Agent or object to evade. Options - tooltip - No options yet. type list + tooltip + No options yet. tooltip - Evade a specified target. + Evade a specified target.\nCharacters will (roughly) try to hide from their pursuers if there is a good hiding spot along their fleeing path. Hiding means no direct line of sight from the head of the character (centre of the top of its physics bounding box) to the head of its pursuer and no direct path between the two on the navigation-mesh. llExecCharacterCmd @@ -8520,24 +8519,24 @@ Command - tooltip - Command to send. type integer + tooltip + Command to send. Options - tooltip - Height for CHARACTER_CMD_JUMP. type list + tooltip + Height for CHARACTER_CMD_JUMP. tooltip - Execute a character command. + Execute a character command.\nSend a command to the path system.\nCurrently only supports stopping the current path-finding operation or causing the character to jump. llFabs @@ -8552,15 +8551,15 @@ Value - tooltip - type float + tooltip + tooltip - Returns the positive version of Value. + Returns the positive version of Value.\nReturns the absolute value of Value. llFleeFrom @@ -8575,33 +8574,33 @@ Source - tooltip - Global coordinate from which to flee. type vector + tooltip + Global coordinate from which to flee. Distance - tooltip - Distance in meters to flee from the source. type float + tooltip + Distance in meters to flee from the source. Options - tooltip - No options available at this time. type list + tooltip + No options available at this time. tooltip - Flee from a point. + Flee from a point.\nDirects a character (llCreateCharacter) to keep away from a defined position in the region or adjacent regions. llFloor @@ -8616,10 +8615,10 @@ Value - tooltip - type float + tooltip + @@ -8639,16 +8638,15 @@ Enable - tooltip - Boolean, if TRUE when an avatar sits on the prim, the avatar will be forced into mouse-look mode. - FALSE is the default setting and will undo a previously set TRUE or do nothing. type integer + tooltip + Boolean, if TRUE when an avatar sits on the prim, the avatar will be forced into mouse-look mode.\nFALSE is the default setting and will undo a previously set TRUE or do nothing. tooltip - If Enable is TRUE any avatar that sits on this object is forced into mouse-look mode. + If Enable is TRUE any avatar that sits on this object is forced into mouse-look mode.\nAfter calling this function with Enable set to TRUE, any agent sitting down on the prim will be forced into mouse-look.\nJust like llSitTarget, this changes a permanent property of the prim (not the object) and needs to be reset by calling this function with Enable set to FALSE in order to disable it. llFrand @@ -8663,15 +8661,15 @@ Magnitude - tooltip - type float + tooltip + tooltip - Returns a pseudo random number in the range [0, Magnitude] or [Magnitude, 0]. + Returns a pseudo random number in the range [0, Magnitude] or [Magnitude, 0].\nReturns a pseudo-random number between [0, Magnitude]. llGenerateKey @@ -8684,7 +8682,7 @@ arguments tooltip - Generates a key (SHA-1 hash) using UUID generation to create a unique key. + Generates a key (SHA-1 hash) using UUID generation to create a unique key.\nAs the UUID produced is versioned, it should never return a value of NULL_KEY.\nThe specific UUID version is an implementation detail that has changed in the past and may change again in the future. Do not depend upon the UUID that is returned to be version 5 SHA-1 hash. llGetAccel @@ -8697,7 +8695,7 @@ arguments tooltip - Returns the acceleration of the object relative to the region's axes. + Returns the acceleration of the object relative to the region's axes.\nGets the acceleration of the object. llGetAgentInfo @@ -8712,16 +8710,16 @@ AvatarID - tooltip - type key + tooltip + tooltip Returns an integer bit-field containing the agent information about id.\n - Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING and/or AGENT_IN_AIR. + Returns AGENT_FLYING, AGENT_ATTACHMENTS, AGENT_SCRIPTED, AGENT_SITTING, AGENT_ON_OBJECT, AGENT_MOUSELOOK, AGENT_AWAY, AGENT_BUSY, AGENT_TYPING, AGENT_CROUCHING, AGENT_ALWAYS_RUN, AGENT_WALKING and/or AGENT_IN_AIR.\nReturns information about the given agent ID as a bit-field of agent info constants. llGetAgentLanguage @@ -8736,15 +8734,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Returns the language code of the preferred interface language of the avatar. + Returns the language code of the preferred interface language of the avatar.\nReturns a string that is the language code of the preferred interface language of the resident. llGetAgentList @@ -8759,24 +8757,24 @@ Scope - tooltip - The scope (region, parcel, parcel same owner) to return agents for. type integer + tooltip + The scope (region, parcel, parcel same owner) to return agents for. Options - tooltip - List of options to apply. Current unused. type list + tooltip + List of options to apply. Current unused. tooltip - Requests a list of agents currently in the region, limited by the scope parameter. + Requests a list of agents currently in the region, limited by the scope parameter.\nReturns a list [key UUID-0, key UUID-1, ..., key UUID-n] or [string error_msg] - returns avatar keys for all agents in the region limited to the area(s) specified by scope llGetAgentSize @@ -8791,15 +8789,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - If the avatar is in the same region, returns the size of the bounding box of the requested avatar by id, otherwise returns ZERO_VECTOR. + If the avatar is in the same region, returns the size of the bounding box of the requested avatar by id, otherwise returns ZERO_VECTOR.\nIf the agent is in the same region as the object, returns the size of the avatar. llGetAlpha @@ -8814,15 +8812,15 @@ Face - tooltip - type integer + tooltip + tooltip - Returns the alpha value of Face. + Returns the alpha value of Face.\nReturns the 'alpha' of the given face. If face is ALL_SIDES the value returned is the mean average of all faces. llGetAndResetTime @@ -8835,7 +8833,7 @@ arguments tooltip - Returns the script time in seconds and then resets the script timer to zero. + Returns the script time in seconds and then resets the script timer to zero.\nGets the time in seconds since starting and resets the time to zero. llGetAnimation @@ -8850,15 +8848,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Returns the name of the currently playing locomotion animation for the avatar id. + Returns the name of the currently playing locomotion animation for the avatar id.\nReturns the currently playing animation for the specified avatar ID. llGetAnimationList @@ -8873,15 +8871,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Returns a list of keys of playing animations for an avatar. + Returns a list of keys of playing animations for an avatar.\nReturns a list of keys of all playing animations for the specified avatar ID. llGetAnimationOverride @@ -8896,15 +8894,15 @@ AnimationState - tooltip - type string + tooltip + tooltip - Returns a string that is the name of the animation that is used for the specified animation state + Returns a string that is the name of the animation that is used for the specified animation state\nTo use this function the script must obtain either the PERMISSION_OVERRIDE_ANIMATIONS or PERMISSION_TRIGGER_ANIMATION permission (automatically granted to attached objects). llGetAttached @@ -8917,7 +8915,7 @@ arguments tooltip - Returns the object's attachment point, or 0 if not attached. + Returns the object's attachment point, or 0 if not attached.\nReturns the object attachment point, or 0 if not attached. llGetBoundingBox @@ -8932,10 +8930,10 @@ ID - tooltip - type key + tooltip + @@ -8953,7 +8951,7 @@ arguments tooltip - Returns the current camera position for the agent the task has permissions for. + Returns the current camera position for the agent the task has permissions for.\nReturns the position of the camera, of the user that granted the script PERMISSION_TRACK_CAMERA. If no user has granted the permission, it returns ZERO_VECTOR. llGetCameraRot @@ -8966,7 +8964,7 @@ arguments tooltip - Returns the current camera orientation for the agent the task has permissions for. + Returns the current camera orientation for the agent the task has permissions for. If no user has granted the PERMISSION_TRACK_CAMERA permission, returns ZERO_ROTATION. llGetCenterOfMass @@ -8994,24 +8992,24 @@ Point - tooltip - A point in region-local space. type vector + tooltip + A point in region-local space. Options - tooltip - No options at this time. type list + tooltip + No options at this time. tooltip - Get the closest navigable point to the point provided. + Get the closest navigable point to the point provided.\nThe function accepts a point in region-local space (like all the other path-finding methods) and returns either an empty list or a list containing a single vector which is the closest point on the navigation-mesh to the point provided. llGetColor @@ -9026,15 +9024,15 @@ Face - tooltip - type integer + tooltip + tooltip - Returns the color on Face. + Returns the color on Face.\nReturns the colour of Face as a vector of red, green, and blue values between 0 and 1. If face is ALL_SIDES the colour returned is the mean average of each channel. llGetCreator @@ -9047,7 +9045,7 @@ arguments tooltip - Returns a key for the creator of the prim. + Returns a key for the creator of the prim.\nReturns the key of the object's original creator. Similar to llGetOwner. llGetDate @@ -9060,7 +9058,7 @@ arguments tooltip - Returns the current date in the UTC time zone in the format YYYY-MM-DD. + Returns the current date in the UTC time zone in the format YYYY-MM-DD.\nReturns the current UTC date as YYYY-MM-DD. llGetDisplayName @@ -9075,15 +9073,15 @@ AvatarID - tooltip - Avatar UUID that is in the same region, or is otherwise known to the region. type key + tooltip + Avatar UUID that is in the same region, or is otherwise known to the region. tooltip - Returns the name of an avatar, if the avatar is in the current region, and the name has been cached, otherwise the same as llGetUsername. Use llRequestDisplayName if you absolutely must have the display name. + Returns the display name of an avatar, if the avatar is connected to the current region, or if the name has been cached. Otherwise, returns an empty string. Use llRequestDisplayName if the avatar may be absent from the region. llGetEnergy @@ -9111,10 +9109,10 @@ DataRequest - tooltip - The type of data to request. Any other string will cause an empty string to be returned. type string + tooltip + The type of data to request. Any other string will cause an empty string to be returned. @@ -9132,7 +9130,7 @@ arguments tooltip - Returns the force (if the script is physical). + Returns the force (if the script is physical).\nReturns the current force if the script is physical. llGetFreeMemory @@ -9145,7 +9143,7 @@ arguments tooltip - Returns the number of free bytes of memory the script can use. + Returns the number of free bytes of memory the script can use.\nReturns the available free space for the current script. This is inaccurate with LSO. llGetFreeURLs @@ -9158,7 +9156,7 @@ arguments tooltip - Returns the number of available URLs for the current script. + Returns the number of available URLs for the current script.\nReturns an integer that is the number of available URLs. llGetGeometricCenter @@ -9171,7 +9169,7 @@ arguments tooltip - Returns the geometric center of the linked set the script is attached to. + Returns the vector that is the geometric center of the object relative to the root prim. llGetGMTclock @@ -9184,7 +9182,7 @@ arguments tooltip - Returns the time in seconds since midnight GMT. + Returns the time in seconds since midnight GMT.\nGets the time in seconds since midnight in GMT/UTC. llGetHTTPHeader @@ -9199,24 +9197,24 @@ HTTPRequestID - tooltip - A valid HTTP request key type key + tooltip + A valid HTTP request key Header - tooltip - Header value name type string + tooltip + Header value name tooltip - Returns the value for header for request_id. + Returns the value for header for request_id.\nReturns a string that is the value of the Header for HTTPRequestID. llGetInventoryCreator @@ -9231,15 +9229,15 @@ InventoryItem - tooltip - type string + tooltip + tooltip - Returns a key for the creator of the inventory item. + Returns a key for the creator of the inventory item.\nThis function returns the UUID of the creator of item. If item is not found in inventory, the object says "No item named 'name'". llGetInventoryKey @@ -9254,15 +9252,15 @@ InventoryItem - tooltip - type string + tooltip + tooltip - Returns the key that is the UUID of the inventory named. + Returns the key that is the UUID of the inventory named.\nReturns the key of the inventory named. llGetInventoryName @@ -9277,24 +9275,24 @@ InventoryType - tooltip - inventory item type type integer + tooltip + Inventory item type Index - tooltip - Index number of inventory item. type integer + tooltip + Index number of inventory item. tooltip - Returns the name of the inventory item number of a given type. + Returns the name of the inventory item of a given type, specified by index number.\nUse the inventory constants INVENTORY_* to specify the type. llGetInventoryNumber @@ -9309,15 +9307,15 @@ InventoryType - tooltip - Inventory item type type integer + tooltip + Inventory item type tooltip - Returns the number of items of a given type (INVENTORY_* flag) in the prim's inventory. + Returns the quantity of items of a given type (INVENTORY_* flag) in the prim's inventory.\nUse the inventory constants INVENTORY_* to specify the type. llGetInventoryPermMask @@ -9332,24 +9330,24 @@ InventoryItem - tooltip - Inventory item name. type string + tooltip + Inventory item name. BitMask - tooltip - MASK_BASE, MASK_OWNER, MASK_GROUP, MASK_EVERYONE or MASK_NEXT type integer + tooltip + MASK_BASE, MASK_OWNER, MASK_GROUP, MASK_EVERYONE or MASK_NEXT tooltip - Returns the requested permission mask for the inventory item. + Returns the requested permission mask for the inventory item.\nReturns the requested permission mask for the inventory item defined by InventoryItem. If item is not in the object's inventory, llGetInventoryPermMask returns FALSE and causes the object to say "No item named '<item>'", where "<item>" is item. llGetInventoryType @@ -9364,15 +9362,15 @@ InventoryItem - tooltip - type string + tooltip + tooltip - Returns the type of the inventory item named. + Returns the type of the named inventory item.\nLike all inventory functions, llGetInventoryType is case-sensitive. llGetKey @@ -9385,7 +9383,7 @@ arguments tooltip - Returns the key of the prim the script is attached to. + Returns the key of the prim the script is attached to.\nGet the key for the object which has this script. llGetLandOwnerAt @@ -9400,15 +9398,15 @@ Position - tooltip - type vector + tooltip + tooltip - Returns the key of the land owner, returns NULL_KEY if public. + Returns the key of the land owner, returns NULL_KEY if public.\nReturns the key of the land owner at Position, or NULL_KEY if public. llGetLinkKey @@ -9423,15 +9421,15 @@ LinkNumber - tooltip - type integer + tooltip + tooltip - Returns the key of the linked prim LinkNumber. + Returns the key of the linked prim LinkNumber.\nReturns the key of LinkNumber in the link set. llGetLinkMedia @@ -9446,28 +9444,28 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag Face - tooltip - The prim's side number type integer + tooltip + The prim's side number Parameters - tooltip - A list of PRIM_* property constants to return values of. type integer + tooltip + A list of PRIM_* property constants to return values of. @@ -9487,15 +9485,15 @@ LinkNumber - tooltip - type integer + tooltip + tooltip - Returns the name of LinkNumber in a link set. + Returns the name of LinkNumber in a link set.\nReturns the name of LinkNumber the link set. llGetLinkNumber @@ -9508,7 +9506,7 @@ arguments tooltip - Returns the link number of the prim containing the script (0 means not linked, 1 the prim is the root, 2 the prim is the first child, etc.). + Returns the link number of the prim containing the script (0 means not linked, 1 the prim is the root, 2 the prim is the first child, etc.).\nReturns the link number of the prim containing the script. 0 means no link, 1 the root, 2 for first child, etc. llGetLinkNumberOfSides @@ -9523,15 +9521,15 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. tooltip - Returns the number of sides of the specified linked prim. + Returns the number of sides of the specified linked prim.\nReturns an integer that is the number of faces (or sides) of the prim link. llGetLinkPrimitiveParams @@ -9546,24 +9544,24 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. Parameters - tooltip - PRIM_* flags. type integer + tooltip + PRIM_* flags. tooltip - Get primitive parameters for LinkNumber based on rules. + Returns the list of primitive attributes requested in the Parameters list for LinkNumber.\nPRIM_* flags can be broken into three categories, face flags, prim flags, and object flags.\n* Supplying a prim or object flag will return that flags attributes.\n* Face flags require the user to also supply a face index parameter. llGetListEntryType @@ -9578,24 +9576,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Returns the type of the index entry in the list (TYPE_INTEGER, TYPE_FLOAT, TYPE_STRING, TYPE_KEY, TYPE_VECTOR, TYPE_ROTATION, or TYPE_INVALID if index is off list). + Returns the type of the index entry in the list (TYPE_INTEGER, TYPE_FLOAT, TYPE_STRING, TYPE_KEY, TYPE_VECTOR, TYPE_ROTATION, or TYPE_INVALID if index is off list).\nReturns the type of the variable at Index in ListVariable. llGetListLength @@ -9610,15 +9608,15 @@ ListVariable - tooltip - type list + tooltip + tooltip - Returns the number of elements in the list. + Returns the number of elements in the list.\nReturns the number of elements in ListVariable. llGetLocalPos @@ -9631,7 +9629,7 @@ arguments tooltip - Returns the position relative to the root. + Returns the position relative to the root.\nReturns the local position of a child object relative to the root. llGetLocalRot @@ -9644,7 +9642,7 @@ arguments tooltip - Returns the rotation local to the root. + Returns the rotation local to the root.\nReturns the local rotation of a child object relative to the root. llGetMass @@ -9657,7 +9655,7 @@ arguments tooltip - Returns the mass of object that the script is attached to. + Returns the mass of object that the script is attached to.\nReturns the scripted object's mass. When called from a script in a link-set, the parent will return the sum of the link-set weights, while a child will return just its own mass. When called from a script inside an attachment, this function will return the mass of the avatar it's attached to, not its own. llGetMassMKS @@ -9724,24 +9722,24 @@ Address - tooltip - type string + tooltip + Subject - tooltip - type string + tooltip + tooltip - Get the next waiting email with appropriate address and/or subject (if blank they are ignored). + Fetch the next queued email with that matches the given address and/or subject, via the email event.\nIf the parameters are blank, they are not used for filtering. llGetNotecardLine @@ -9756,24 +9754,24 @@ NotecardName - tooltip - type string + tooltip + LineNumber - tooltip - type integer + tooltip + tooltip - Returns line from NotecardName via the dataserver event. + Returns LineNumber from NotecardName via the dataserver event. The line index starts at zero.\nIf the requested line is passed the end of the note-card the dataserver event will return the constant EOF string.\nThe key returned by this function is a unique identifier which will be supplied to the dataserver event in the requested parameter. llGetNumberOfNotecardLines @@ -9788,15 +9786,15 @@ NotecardName - tooltip - type string + tooltip + tooltip - Returns number of lines in NotecardName via the dataserver event (cast return value to integer). + Returns the number of lines contained within a notecard via the dataserver event.\nThe key returned by this function is a query ID for identifying the dataserver reply. llGetNumberOfPrims @@ -9809,7 +9807,7 @@ arguments tooltip - Returns the number of prims in a link set the script is attached to. + Returns the number of prims in a link set the script is attached to.\nReturns the number of prims in (and avatars seated on) the object the script is in. llGetNumberOfSides @@ -9822,7 +9820,7 @@ arguments tooltip - Returns the number of faces (or sides) of the prim. + Returns the number of faces (or sides) of the prim.\nReturns the number of sides of the prim which has the script. llGetObjectDesc @@ -9835,7 +9833,7 @@ arguments tooltip - Returns the description of the prim the script is attached to. + Returns the description of the prim the script is attached to.\nReturns the description of the scripted object/prim. You can set the description using llSetObjectDesc. llGetObjectDetails @@ -9850,25 +9848,24 @@ ID - tooltip - Prim or avatar UUID that is in the same region. type key + tooltip + Prim or avatar UUID that is in the same region. Parameters - tooltip - List of OBJECT_* flags. type list + tooltip + List of OBJECT_* flags. tooltip - Returns the object details specified in Parameters for the object with key ID.\n - Parameters are OBJECT_NAME, _DESC, _POS, _ROT, _VELOCITY, _OWNER, _GROUP, _CREATOR. + Returns a list of object details specified in the Parameters list for the object or avatar in the region with key ID.\nParameters are specified by the OBJECT_* constants. llGetObjectMass @@ -9883,15 +9880,15 @@ ID - tooltip - type key + tooltip + tooltip - Returns the mass of the avatar or object in the region. + Returns the mass of the avatar or object in the region.\nGets the mass of the object or avatar corresponding to ID. llGetObjectName @@ -9904,7 +9901,7 @@ arguments tooltip - Returns the name of the prim which the script is attached to. + Returns the name of the prim which the script is attached to.\nReturns the name of the prim (not object) which contains the script. llGetObjectPermMask @@ -9917,17 +9914,17 @@ arguments - PermissionMask + Category - tooltip - type integer + tooltip + Category is one of MASK_BASE, MASK_OWNER, MASK_GROUP, MASK_EVERYONE, or MASK_NEXT tooltip - Returns the requested permission mask for the root object the task is attached to. + Returns the permission mask of the requested category for the object. llGetObjectPrimCount @@ -9942,15 +9939,15 @@ ObjectID - tooltip - type key + tooltip + tooltip - Returns the total number of prims for an object in the region. + Returns the total number of prims for an object in the region.\nReturns the prim count for any object id in the same region. llGetOmega @@ -9963,7 +9960,7 @@ arguments tooltip - Returns the rotation velocity in radians per second. + Returns the rotation velocity in radians per second.\nReturns a vector that is the rotation velocity of the object in radians per second. llGetOwner @@ -9976,7 +9973,7 @@ arguments tooltip - Returns the object owner's UUID. + Returns the object owner's UUID.\nReturns the key for the owner of the object. llGetOwnerKey @@ -9991,15 +9988,15 @@ ObjectID - tooltip - type key + tooltip + tooltip - Returns the owner of ObjectID. + Returns the owner of ObjectID.\nReturns the key for the owner of object ObjectID. llGetParcelDetails @@ -10014,25 +10011,24 @@ Position - tooltip - Location within the region. type vector + tooltip + Location within the region. ParcelDetails - tooltip - List of details requested for the specified parcel location. type list + tooltip + List of details requested for the specified parcel location. tooltip - Returns the parcel details specified in ParcelDetails for the parcel at Position.\n - Parameters is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA, _ID, _SEE_AVATARS. + Returns a list of parcel details specified in the ParcelDetails list for the parcel at Position.\nParameters is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA, _ID, _SEE_AVATARS.\nReturns a list that is the parcel details specified in ParcelDetails (in the same order) for the parcel at Position. llGetParcelFlags @@ -10047,15 +10043,15 @@ Position - tooltip - type vector + tooltip + tooltip - Returns a mask of the parcel flags (PARCEL_FLAG_*) for the parcel that includes the point Position. + Returns a mask of the parcel flags (PARCEL_FLAG_*) for the parcel that includes the point Position.\nReturns a bit-field specifying the parcel flags (PARCEL_FLAG_*) for the parcel at Position. llGetParcelMaxPrims @@ -10070,24 +10066,24 @@ Position - tooltip - Region coordinates (z is ignored) of parcel. type vector + tooltip + Region coordinates (z is ignored) of parcel. SimWide - tooltip - Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner. type integer + tooltip + Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner. tooltip - Returns the maximum number of prims allowed on the parcel at Position. + Returns the maximum number of prims allowed on the parcel at Position for a given scope.\nThe scope may be set to an individual parcel or the combined resources of all parcels with the same ownership in the region. llGetParcelMusicURL @@ -10100,7 +10096,7 @@ arguments tooltip - Gets the streaming audio URL for the parcel object is on. + Gets the streaming audio URL for the parcel object is on.\nThe object owner, avatar or group, must also be the land owner. llGetParcelPrimCount @@ -10115,34 +10111,33 @@ Position - tooltip - region coordinate type vector + tooltip + Region coordinates of parcel to query. Category - tooltip - A PARCEL_COUNT_* flag. type integer + tooltip + A PARCEL_COUNT_* flag. SimWide - tooltip - Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner. type integer + tooltip + Boolean. If FALSE then the return is the maximum prims supported by the parcel. If TRUE then it is the combined number of prims on all parcels in the region owned by the specified parcel's owner. tooltip - Returns the number of prims on the parcel at Position of the given category. - Categories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP. + Returns the number of prims on the parcel at Position of the given category.\nCategories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP.\nReturns the number of prims used on the parcel at Position which are in Category.\nIf SimWide is TRUE, it returns the total number of objects for all parcels with matching ownership in the category specified.\nIf SimWide is FALSE, it returns the number of objects on this specific parcel in the category specified llGetParcelPrimOwners @@ -10157,16 +10152,15 @@ Position - tooltip - type vector + tooltip + tooltip - Returns a list of all residents who own objects on the parcel at Position, with individual prim counts. - Requires owner-like permissions for the parcel. + Returns a list of up to 100 residents who own objects on the parcel at Position, with per-owner land impact totals.\nRequires owner-like permissions for the parcel, and for the script owner to be present in the region.\nThe list is formatted as [ key agentKey1, integer agentLI1, key agentKey2, integer agentLI2, ... ], sorted by agent key.\nThe integers are the combined land impacts of the objects owned by the corresponding agents. llGetPermissions @@ -10179,7 +10173,7 @@ arguments tooltip - Returns an integer bit-field with the permissions that have been granted. + Returns an integer bitmask of the permissions that have been granted to the script. Individual permissions can be determined using a bit-wise "and" operation against the PERMISSION_* constants llGetPermissionsKey @@ -10192,7 +10186,7 @@ arguments tooltip - Returns the key of the avatar that last granted permissions to the script. + Returns the key of the avatar that last granted or declined permissions to the script.\nReturns NULL_KEY if permissions were never granted or declined. llGetPhysicsMaterial @@ -10218,7 +10212,7 @@ arguments tooltip - Returns the position of the task in region coordinates. + Returns the position of the task in region coordinates.\nReturns the vector position of the task in region coordinates. llGetPrimitiveParams @@ -10233,15 +10227,15 @@ Parameters - tooltip - PRIM_* flags type list + tooltip + PRIM_* flags and face parameters tooltip - Returns the primitive parameters specified in the parameters list. + Returns the primitive parameters specified in the parameters list.\nReturns primitive parameters specified in the Parameters list. llGetPrimMediaParams @@ -10256,19 +10250,19 @@ Face - tooltip - face number type integer + tooltip + face number Parameters - tooltip - a set PRIM_* flags (in no particular order) type list + tooltip + One or more PRIM_MEDIA_* flags @@ -10286,7 +10280,7 @@ arguments tooltip - Returns the number of avatars in the region. + Returns the number of avatars in the region.\nReturns an integer that is the number of avatars in the region. llGetRegionCorner @@ -10299,7 +10293,7 @@ arguments tooltip - Returns a vector, in meters, that is the global location of the south-west corner of the region which the object is in. + Returns a vector, in meters, that is the global location of the south-west corner of the region which the object is in.\nReturns the Region-Corner of the simulator containing the task. The region-corner is a vector (values in meters) representing distance from the first region. llGetRegionFlags @@ -10312,7 +10306,7 @@ arguments tooltip - Returns the region flags (REGION_FLAG_*) for the region the object is in. + Returns the region flags (REGION_FLAG_*) for the region the object is in.\nReturns a bit-field specifying the region flags (REGION_FLAG_*) for the region the object is in. llGetRegionFPS @@ -10351,7 +10345,7 @@ arguments tooltip - Returns the current time dilation as a float between 0.0 (full dilation) and 1.0 (no dilation). + Returns the current time dilation as a float between 0.0 (full dilation) and 1.0 (no dilation).\nReturns the current time dilation as a float between 0.0 and 1.0. llGetRootPosition @@ -10364,7 +10358,7 @@ arguments tooltip - Returns the position (in region coordinates) of the root prim of the object which the script is attached to. + Returns the position (in region coordinates) of the root prim of the object which the script is attached to.\nThis is used to allow a child prim to determine where the root is. llGetRootRotation @@ -10377,7 +10371,7 @@ arguments tooltip - Returns the rotation (relative to the region) of the root prim of the object which the script is attached to. + Returns the rotation (relative to the region) of the root prim of the object which the script is attached to.\nGets the global rotation of the root object of the object script is attached to. llGetRot @@ -10390,7 +10384,7 @@ arguments tooltip - Returns the rotation relative to the region's axes. + Returns the rotation relative to the region's axes.\nReturns the rotation. llGetScale @@ -10403,7 +10397,7 @@ arguments tooltip - Returns the scale of the prim. + Returns the scale of the prim.\nReturns a vector that is the scale (dimensions) of the prim. llGetScriptName @@ -10416,7 +10410,7 @@ arguments tooltip - Returns the name of the script that this function is used in. + Returns the name of the script that this function is used in.\nReturns the name of this script. llGetScriptState @@ -10431,15 +10425,15 @@ ScriptName - tooltip - type string + tooltip + tooltip - Returns TRUE if the script named is running. + Returns TRUE if the script named is running.\nReturns TRUE if ScriptName is running. llGetSimStats @@ -10454,10 +10448,10 @@ StatType - tooltip - Statistic type. Currently only SIM_STAT_PCT_CHARS_STEPPED is supported. type integer + tooltip + Statistic type. Currently only SIM_STAT_PCT_CHARS_STEPPED is supported. @@ -10475,7 +10469,7 @@ arguments tooltip - Returns the host-name of the machine which the script is running on (same as string in viewer Help dialog). + Returns the host-name of the machine which the script is running on.\nFor example, "sim225.agni.lindenlab.com". llGetSPMaxMemory @@ -10488,7 +10482,7 @@ arguments tooltip - Returns the maximum used memory for the current script. Only valid after using PROFILE_SCRIPT_MEMORY. Non-mono scripts always use 16k. + Returns the maximum used memory for the current script. Only valid after using PROFILE_SCRIPT_MEMORY. Non-mono scripts always use 16k.\nReturns the integer of the most bytes used while llScriptProfiler was last active. llGetStartParameter @@ -10501,7 +10495,7 @@ arguments tooltip - Returns an integer that is the script start parameter. + Returns an integer that is the script rez parameter.\nIf the object was rezzed by an agent, this function returns 0. llGetStaticPath @@ -10516,37 +10510,37 @@ Start - tooltip - Starting position. type vector + tooltip + Starting position. End - tooltip - Ending position. type vector + tooltip + Ending position. Radius - tooltip - Radius of the character that the path is for, between 0.125m and 5.0m. type float + tooltip + Radius of the character that the path is for, between 0.125m and 5.0m. Parameters - tooltip - Currently only accepts the parameter CHARACTER_TYPE; the options are identical to those used for llCreateCharacter. The default value is CHARACTER_TYPE_NONE. type list + tooltip + Currently only accepts the parameter CHARACTER_TYPE; the options are identical to those used for llCreateCharacter. The default value is CHARACTER_TYPE_NONE. @@ -10566,15 +10560,15 @@ StatusFlag - tooltip - A STATUS_* flag type integer + tooltip + A STATUS_* flag tooltip - Returns value of status (STATUS_PHYSICS, STATUS_PHANTOM, STATUS_BLOCK_GRAB, STATUS_ROTATE_X, STATUS_ROTATE_Y, and/or STATUS_ROTATE_Z). + Returns boolean value of the specified status (e.g. STATUS_PHANTOM) of the object the script is attached to. llGetSubString @@ -10589,33 +10583,33 @@ String - tooltip - type string + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + tooltip - Returns the indicated substring. + Returns a sub-string from String, in a range specified by the Start and End indicies (inclusive).\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would capture the entire string.\nIf Start is greater than End, the sub string is the exclusion of the entries. llGetSunDirection @@ -10628,7 +10622,7 @@ arguments tooltip - Returns a normalized vector of the direction of the sun in the region. + Returns a normalized vector of the direction of the sun in the region.\nReturns the sun's direction on the simulator. llGetTexture @@ -10643,15 +10637,15 @@ Face - tooltip - type integer + tooltip + tooltip - Returns a string that is the texture on face (the inventory name if it is a texture in the prim's inventory, otherwise the key). + Returns a string that is the texture on face (the inventory name if it is a texture in the prim's inventory, otherwise the key).\nReturns the texture of a face, if it is found in object inventory, its key otherwise. llGetTextureOffset @@ -10666,10 +10660,10 @@ Face - tooltip - type integer + tooltip + @@ -10689,10 +10683,10 @@ Face - tooltip - type integer + tooltip + @@ -10712,15 +10706,15 @@ Face - tooltip - type integer + tooltip + tooltip - Returns the texture scale of side in the x and y components of a vector. + Returns the texture scale of side in the x and y components of a vector.\nReturns the texture scale of a side in the x and y components of a vector. llGetTime @@ -10746,7 +10740,7 @@ arguments tooltip - Returns the time in seconds since [SECOND_LIFE] server midnight or since region up-time, whichever is smaller. + Returns the time in seconds since Second Life midnight or since region up-time, whichever is smaller.\nThe Second Life day cycle is 4 hours. llGetTimestamp @@ -10772,7 +10766,7 @@ arguments tooltip - Returns the torque (if the script is physical). + Returns the torque (if the script is physical).\nReturns a vector that is the torque (if the script is physical). llGetUnixTime @@ -10798,7 +10792,7 @@ arguments tooltip - Returns the current used memory for the current script. Non-mono scripts always use 16K. + Returns the current used memory for the current script. Non-mono scripts always use 16K.\nReturns the integer of the number of bytes of memory currently in use by the script. Non-mono scripts always use 16K. llGetUsername @@ -10813,15 +10807,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Returns the single-word user-name of an avatar, if the avatar is in the current region, otherwise the empty string. + Returns the username of an avatar, if the avatar is connected to the current region, or if the name has been cached. Otherwise, returns an empty string. Use llRequestUsername if the avatar may be absent from the region. llGetVel @@ -10834,7 +10828,7 @@ arguments tooltip - Returns the velocity of the object. + Returns the velocity of the object.\nReturns a vector that is the velocity of the object. llGetWallclock @@ -10847,7 +10841,7 @@ arguments tooltip - Returns the time in seconds since midnight California Pacific time (PST/PDT). + Returns the time in seconds since midnight California Pacific time (PST/PDT).\nReturns the time in seconds since simulator's time-zone midnight (Pacific Time). llGiveInventory @@ -10862,24 +10856,24 @@ TargetID - tooltip - type key + tooltip + InventoryItem - tooltip - type string + tooltip + tooltip - Give InventoryItem to destination represented by TargetID. + Give InventoryItem to destination represented by TargetID, as permitted by the permissions system.\nTargetID may be any agent or an object in the same region. llGiveInventoryList @@ -10894,33 +10888,33 @@ TargetID - tooltip - type key + tooltip + FolderName - tooltip - type string + tooltip + InventoryItems - tooltip - type list + tooltip + tooltip - Give InventoryItems to destination (represented by TargetID) as a new folder of items. + Give InventoryItems to destination (represented by TargetID) as a new folder of items, as permitted by the permissions system.\nTargetID may be any agent or an object in the same region. If TargetID is an object, the items are passed directly to the object inventory (no folder is created). llGiveMoney @@ -10935,24 +10929,24 @@ AvatarID - tooltip - type key + tooltip + Amount - tooltip - type integer + tooltip + tooltip - Transfers Amount of L from script owner to AvatarID. + Transfers Amount of L$ from script owner to AvatarID.\nThis call will silently fail if PERMISSION_DEBIT has not been granted. llGodLikeRezObject @@ -10969,19 +10963,19 @@ InventoryItemID - tooltip - type key + tooltip + Position - tooltip - type vector + tooltip + @@ -11001,15 +10995,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the ground height at the object position + offset. + Returns the ground height at the object position + offset.\nReturns the ground height at the object's position + Offset. llGroundContour @@ -11024,15 +11018,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the ground contour direction below the object position + Offset. + Returns the ground contour direction below the object position + Offset.\nReturns the ground contour at the object's position + Offset. llGroundNormal @@ -11047,15 +11041,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the ground normal below the object position + offset. + Returns the ground normal below the object position + offset.\nReturns the ground contour at the object's position + Offset. llGroundRepel @@ -11070,33 +11064,35 @@ Height - tooltip - .Distance above the ground. type float + tooltip + Distance above the ground. Water - tooltip - Boolean, if TRUE then hover above water too. type integer + tooltip + Boolean, if TRUE then hover above water too. Tau - tooltip - Seconds to critically damp in. type float + tooltip + Seconds to critically damp in. tooltip - Critically damps to height if within height * 0.5 of level (either above ground level or above the higher of land and water if water == TRUE). + Critically damps to height if within height * 0.5 of level (either above ground level or above the higher of land and water if water == TRUE).\nCritically damps to fHeight if within fHeight * 0.5 of ground or water level.\n + The height is above ground level if iWater is FALSE or above the higher of land and water if iWater is TRUE.\n + Do not use with vehicles. Only works in physics-enabled objects. llGroundSlope @@ -11111,15 +11107,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the ground slope below the object position + Offset. + Returns the ground slope below the object position + Offset.\nReturns the ground slope at the object position + Offset. llHTTPRequest @@ -11134,33 +11130,33 @@ URL - tooltip - A valid HTTP/HTTPS URL. type string + tooltip + A valid HTTP/HTTPS URL. Parameters - tooltip - Configuration parameters, specified as HTTP_* flag-value pairs. type list + tooltip + Configuration parameters, specified as HTTP_* flag-value pairs. Body - tooltip - Contents of the request. type string + tooltip + Contents of the request. tooltip - Sends an HTTP request to the specified URL with the Body of the request and Parameters. + Sends an HTTP request to the specified URL with the Body of the request and Parameters.\nReturns a key that is a handle identifying the HTTP request made. llHTTPResponse @@ -11175,33 +11171,33 @@ HTTPRequestID - tooltip - A valid HTTP request key. type key + tooltip + A valid HTTP request key. Status - tooltip - HTTP Status (200, 400, 404, etc.). type integer + tooltip + HTTP Status (200, 400, 404, etc.). Body - tooltip - Contents of the response. type string + tooltip + Contents of the response. tooltip - Responds to HTTPRequestID with Status and Body. + Responds to an incoming HTTP request which was triggerd by an http_request event within the script. HTTPRequestID specifies the request to respond to (this ID is supplied in the http_request event handler). Status and Body specify the status code and message to respond with. llInsertString @@ -11216,33 +11212,33 @@ TargetVariable - tooltip - type string + tooltip + Position - tooltip - type integer + tooltip + SourceVariable - tooltip - type string + tooltip + tooltip - Inserts SourceVariable into TargetVariable at Position, and returns the result. + Inserts SourceVariable into TargetVariable at Position, and returns the result.\nInserts SourceVariable into TargetVariable at Position and returns the result. Note this does not alter TargetVariable. llInstantMessage @@ -11257,24 +11253,24 @@ AvatarID - tooltip - type key + tooltip + Text - tooltip - type string - + tooltip + + tooltip - IMs Text to the user identified. + IMs Text to the user identified.\nSend Text to the user as an instant message. llIntegerToBase64 @@ -11289,15 +11285,15 @@ Value - tooltip - type integer + tooltip + tooltip - Returns a string that is a Base64 big endian encode of Value. + Returns a string that is a Base64 big endian encode of Value.\nEncodes the Value as an 8-character Base64 string. llJson2List @@ -11312,10 +11308,10 @@ JSON - tooltip - type string + tooltip + @@ -11335,19 +11331,19 @@ JSON - tooltip - type string + tooltip + Specifiers - tooltip - type list + tooltip + @@ -11367,28 +11363,28 @@ JSON - tooltip - type string + tooltip + Specifiers - tooltip - type list + tooltip + Value - tooltip - type string + tooltip + @@ -11408,19 +11404,19 @@ JSON - tooltip - type string + tooltip + Specifiers - tooltip - type list + tooltip + @@ -11440,15 +11436,15 @@ ID - tooltip - Avatar or rezzed prim UUID. type key + tooltip + Avatar or rezzed prim UUID. tooltip - Returns the name of the prim or avatar specified by ID. The ID must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned. + Returns the name of the prim or avatar specified by ID. The ID must be a valid rezzed prim or avatar key in the current simulator, otherwise an empty string is returned.\nFor avatars, the returned name is the legacy name llLinkParticleSystem @@ -11463,25 +11459,24 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag Rules - tooltip - Particle system rules list in the format [ rule1, data1, rule2, data2 . . . ruleN, dataN ] type integer + tooltip + Particle system rules list in the format [ rule1, data1, rule2, data2 . . . ruleN, dataN ] tooltip - Creates a particle system based on Rules. An empty list removes a particle system from object.\n - List format is [ rule-1, data-1, rule-2, data-2 ... rule-n, data-n ]. + Creates a particle system in prim LinkNumber based on Rules. An empty list removes a particle system from object.\nList format is [ rule-1, data-1, rule-2, data-2 ... rule-n, data-n ].\nThis is identical to llParticleSystem except that it applies to a specified linked prim and not just the prim the script is in. llLinkSitTarget @@ -11496,33 +11491,33 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag of the prim. type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag of the prim. Offset - tooltip - Position for the sit target, relative to the prim's position. type vector + tooltip + Position for the sit target, relative to the prim's position. Rotation - tooltip - Rotation (relative to the prim's rotation) for the avatar. type rotation + tooltip + Rotation (relative to the prim's rotation) for the avatar. tooltip - Set the sit location for the linked prim(s). If Offset == <0,0,0> clear it. + Set the sit location for the linked prim(s). If Offset == <0,0,0> clear it.\nSet the sit location for the linked prim(s). The sit location is relative to the prim's position and rotation. llList2CSV @@ -11537,15 +11532,15 @@ ListVariable - tooltip - type list + tooltip + tooltip - Creates a string of comma separated values from the list. + Creates a string of comma separated values from the list.\nCreate a string of comma separated values from the specified list. llList2Float @@ -11560,24 +11555,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the float at Index in the list. + Copies the float at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a float, then zero is returned. llList2Integer @@ -11592,24 +11587,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the integer at Index in the list. + Copies the integer at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to an integer, then zero is returned. llList2Json @@ -11624,19 +11619,19 @@ JsonType - tooltip - Type is JSON_ARRAY or JSON_OBJECT. type string + tooltip + Type is JSON_ARRAY or JSON_OBJECT. Values - tooltip - List of values to convert. type list + tooltip + List of values to convert. @@ -11656,24 +11651,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the key at Index in the list. + Copies the key at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a key, then null string is returned. llList2List @@ -11688,33 +11683,33 @@ ListVariable - tooltip - type list + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + tooltip - Copies the slice of the list from Start to End. + Returns a subset of entries from ListVariable, in a range specified by the Start and End indicies (inclusive).\nUsing negative numbers for Start and/or End causes the index to count backwards from the length of the string, so 0, -1 would capture the entire string.\nIf Start is greater than End, the sub string is the exclusion of the entries. llList2ListStrided @@ -11729,42 +11724,42 @@ ListVariable - tooltip - type list + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + Stride - tooltip - type integer + tooltip + tooltip - Copies the strided slice of the list from Start to End. + Copies the strided slice of the list from Start to End.\nReturns a copy of the strided slice of the specified list from Start to End. llList2Rot @@ -11779,24 +11774,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the rotation at Index in the list. + Copies the rotation at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to rotation, thenZERO_ROTATION is returned. llList2String @@ -11811,24 +11806,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the string at Index in the list. + Copies the string at Index in the list.\nReturns the value at Index in the specified list as a string. If Index describes a location not in the list then null string is returned. llList2Vector @@ -11843,24 +11838,24 @@ ListVariable - tooltip - type list + tooltip + Index - tooltip - type integer + tooltip + tooltip - Copies the vector at Index in the list. + Copies the vector at Index in the list.\nReturns the value at Index in the specified list. If Index describes a location not in the list, or the value cannot be type-cast to a vector, then ZERO_VECTOR is returned. llListen @@ -11875,42 +11870,42 @@ Channel - tooltip - type integer + tooltip + SpeakersName - tooltip - type string + tooltip + SpeakersID - tooltip - type key + tooltip + Text - tooltip - type string + tooltip + tooltip - Sets a callback for Text on Channel from SpeakersName and SpeakersID (SpeakersName, SpeakersID, and/or Text can be empty) and returns an identifier that can be used to deactivate or remove the listen. + Creates a listen callback for Text on Channel from SpeakersName and SpeakersID (SpeakersName, SpeakersID, and/or Text can be empty) and returns an identifier that can be used to deactivate or remove the listen.\nNon-empty values for SpeakersName, SpeakersID, and Text will filter the results accordingly, while empty strings and NULL_KEY will not filter the results, for string and key parameters respectively.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts. llListenControl @@ -11925,24 +11920,24 @@ ChannelHandle - tooltip - type integer + tooltip + Active - tooltip - type integer + tooltip + tooltip - Makes a listen event callback active or inactive. + Makes a listen event callback active or inactive. Pass in the value returned from llListen to the iChannelHandle parameter to specify which listener you are controlling.\nUse boolean values to specify Active llListenRemove @@ -11957,15 +11952,15 @@ ChannelHandle - tooltip - type integer + tooltip + tooltip - Removes listen event callback number. + Removes a listen event callback. Pass in the value returned from llListen to the iChannelHandle parameter to specify which listener to remove. llListFindList @@ -11980,24 +11975,24 @@ ListVariable - tooltip - type list + tooltip + Find - tooltip - type list + tooltip + tooltip - Returns the index of the first instance of Find in ListVariable. Returns -1 if not found. + Returns the index of the first instance of Find in ListVariable. Returns -1 if not found.\nReturns the position of the first instance of the Find list in the ListVariable. Returns -1 if not found. llListInsertList @@ -12012,33 +12007,33 @@ Target - tooltip - type list + tooltip + ListVariable - tooltip - type list + tooltip + Position - tooltip - type integer + tooltip + tooltip - Returns a list that contains all the elements from Target but with the elements from ListVariable inserted at Position start. + Returns a list that contains all the elements from Target but with the elements from ListVariable inserted at Position start.\nReturns a new list, created by inserting ListVariable into the Target list at Position. Note this does not alter the Target. llListRandomize @@ -12053,24 +12048,24 @@ ListVariable - tooltip - type list + tooltip + Stride - tooltip - type integer + tooltip + tooltip - Returns a randomized list of blocks of size Stride. + Returns a version of the input ListVariable which has been randomized by blocks of size Stride.\nIf the remainder from the length of the list, divided by the stride is non-zero, this function does not randomize the list. llListReplaceList @@ -12085,42 +12080,42 @@ Target - tooltip - type list + tooltip + ListVariable - tooltip - type list + tooltip + Start - tooltip - type integer + tooltip + End - tooltip - type integer + tooltip + tooltip - Returns a list that is Target with Start through End removed and ListVariable inserted at Start. + Returns a list that is Target with Start through End removed and ListVariable inserted at Start.\nReturns a list replacing the slice of the Target list from Start to End with the specified ListVariable. Start and End are inclusive, so 0, 1 would replace the first two entries and 0, 0 would replace only the first list entry. llListSort @@ -12135,33 +12130,33 @@ ListVariable - tooltip - List to sort. type list + tooltip + List to sort. Stride - tooltip - Stride length. type integer + tooltip + Stride length. Ascending - tooltip - Boolean. TRUE = result in ascending order, FALSE = result in descending order. type integer + tooltip + Boolean. TRUE = result in ascending order, FALSE = result in descending order. tooltip - Sorts the list into blocks of stride, in Ascending order if Ascending == TRUE. The sort order is affected by type. + Returns the specified list, sorted into blocks of stride in ascending order (if Ascending is TRUE, otherwise descending). Note that sort only works if the first entry of each block is the same datatype. llListStatistics @@ -12176,31 +12171,31 @@ Operation - tooltip - One of LIST_STAT_* values type integer + tooltip + One of LIST_STAT_* values ListVariable - tooltip - Variable to analyse. type list + tooltip + Variable to analyze. tooltip - Performs statistical aggregate functions on ListVariable using LIST_STAT_* Operations. + Performs a statistical aggregate function, specified by a LIST_STAT_* constant, on ListVariables.\nThis function allows a script to perform a statistical operation as defined by operation on a list composed of integers and floats. llLoadURL energy 10.0 sleep - 10.0 + 0.1 return void arguments @@ -12208,33 +12203,33 @@ AvatarID - tooltip - type key + tooltip + Text - tooltip - type string + tooltip + URL - tooltip - type string + tooltip + tooltip - Shows dialog to avatar AvatarID offering to load web page at URL. If user clicks yes, launches their web browser. + Shows dialog to avatar AvatarID offering to load web page at URL. If user clicks yes, launches their web browser.\nllLoadURL displays a dialogue box to the user, offering to load the specified web page using the default web browser. llLog @@ -12249,15 +12244,15 @@ Value - tooltip - type float - + tooltip + + tooltip - Returns the natural logarithm of Value. Returns zero if Value <= 0. + Returns the natural logarithm of Value. Returns zero if Value <= 0.\nReturns the base e (natural) logarithm of the specified Value. llLog10 @@ -12272,15 +12267,15 @@ Value - tooltip - type float + tooltip + tooltip - Returns the base 10 logarithm of Value. Returns zero if Value <= 0. + Returns the base 10 logarithm of Value. Returns zero if Value <= 0.\nReturns the base 10 (common) logarithm of the specified Value. llLookAt @@ -12295,33 +12290,33 @@ Target - tooltip - type vector + tooltip + Strength - tooltip - type float + tooltip + Damping - tooltip - type float + tooltip + tooltip - Cause object name to point it's forward axis towards Target. + Cause object name to point its forward axis towards Target, at a force controlled by Strength and Damping.\nGood Strength values are around half the mass of the object and good Damping values are less than 1/10th of the Strength.\nAsymmetrical shapes require smaller Damping. A Strength of 0.0 cancels the look at. llLoopSound @@ -12336,24 +12331,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays attached Sound, looping indefinitely, at Volume (0.0 - 1.0). + Plays specified Sound, looping indefinitely, at Volume (0.0 - 1.0).\nOnly one sound may be attached to an object at a time.\nA second call to llLoopSound with the same key will not restart the sound, but the new volume will be used. This allows control over the volume of already playing sounds.\nSetting the volume to 0 is not the same as calling llStopSound; a sound with 0 volume will continue to loop.\nTo restart the sound from the beginning, call llStopSound before calling llLoopSound again. llLoopSoundMaster @@ -12368,24 +12363,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays attached Sound, looping at volume (0.0 - 1.0), and declares it a sync master. + Plays attached Sound, looping at volume (0.0 - 1.0), and declares it a sync master.\nBehaviour is identical to llLoopSound, with the addition of marking the source as a "Sync Master", causing "Slave" sounds to sync to it. If there are multiple masters within a viewers interest area, the most audible one (a function of both distance and volume) will win out as the master.\nThe use of multiple masters within a small area is unlikely to produce the desired effect. llLoopSoundSlave @@ -12400,24 +12395,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays attached sound looping at volume (0.0 - 1.0), synced to most audible sync master. + Plays attached sound looping at volume (0.0 - 1.0), synced to most audible sync master.\nBehaviour is identical to llLoopSound, unless there is a "Sync Master" present.\nIf a Sync Master is already playing the Slave sound will begin playing from the same point the master is in its loop synchronizing the loop points of both sounds.\nIf a Sync Master is started when the Slave is already playing, the Slave will skip to the correct position to sync with the Master. llMakeExplosion @@ -12434,69 +12429,69 @@ Particles - tooltip - type integer + tooltip + Scale - tooltip - type float + tooltip + Velocity - tooltip - type float + tooltip + Lifetime - tooltip - type float + tooltip + Arc - tooltip - type float + tooltip + Texture - tooltip - type string + tooltip + Offset - tooltip - type vector + tooltip + tooltip - Make a round explosion of particles. Deprecated: Use llParticleSystem instead. + Make a round explosion of particles. Deprecated: Use llParticleSystem instead.\nMake a round explosion of particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead. llMakeFire @@ -12513,69 +12508,69 @@ Particles - tooltip - type integer + tooltip + Scale - tooltip - type float + tooltip + Velocity - tooltip - type float + tooltip + Lifetime - tooltip - type float + tooltip + Arc - tooltip - type float + tooltip + Texture - tooltip - type string + tooltip + Offset - tooltip - type vector + tooltip + tooltip - Make fire like particles. Deprecated: Use llParticleSystem instead. + Make fire like particles. Deprecated: Use llParticleSystem instead.\nMake fire particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead. llMakeFountain @@ -12592,69 +12587,69 @@ Particles - tooltip - type integer + tooltip + Scale - tooltip - type float + tooltip + Velocity - tooltip - type float + tooltip + Lifetime - tooltip - type float + tooltip + Arc - tooltip - type float + tooltip + Texture - tooltip - type string + tooltip + Offset - tooltip - type vector + tooltip + tooltip - Make a fountain of particles. Deprecated: Use llParticleSystem instead. + Make a fountain of particles. Deprecated: Use llParticleSystem instead.\nMake a fountain of particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead. llMakeSmoke @@ -12671,69 +12666,69 @@ Particles - tooltip - type integer + tooltip + Scale - tooltip - type float + tooltip + Velocity - tooltip - type float + tooltip + Lifetime - tooltip - type float + tooltip + Arc - tooltip - type float + tooltip + Texture - tooltip - type string + tooltip + Offset - tooltip - type vector + tooltip + tooltip - Make smoke like particles. Deprecated: Use llParticleSystem instead. + Make smoke like particles. Deprecated: Use llParticleSystem instead.\nMake smoky particles using texture from the objects inventory. Deprecated: Use llParticleSystem instead. llManageEstateAccess @@ -12748,24 +12743,24 @@ Action - tooltip - One of the ESTATE_ACCESS_ALLOWED_* actions. type integer + tooltip + One of the ESTATE_ACCESS_ALLOWED_* actions. AvatarID - tooltip - UUID of the avatar or group to act upon. type key + tooltip + UUID of the avatar or group to act upon. tooltip - Use to add or remove agents from the estate's agent access or ban lists or groups from the estate's group access list. + Adds or removes agents from the estate's agent access or ban lists, or groups to the estate's group access list. Action is one of the ESTATE_ACCESS_ALLOWED_* operations to perform.\nReturns an integer representing a boolean, TRUE if the call was successful; FALSE if throttled, invalid action, invalid or null id or object owner is not allowed to manage the estate.\nThe object owner is notified of any changes, unless PERMISSION_SILENT_ESTATE_MANAGEMENT has been granted to the script. llMapDestination @@ -12780,33 +12775,33 @@ RegionName - tooltip - type string + tooltip + Position - tooltip - type vector + tooltip + Direction - tooltip - type vector + tooltip + tooltip - Opens world map centred on region with Position highlighted. Only works for scripts attached to avatar, or during touch events. NOTE: Direction currently does nothing. + Opens world map for avatar who touched is is wearing the script, centred on RegionName with Position highlighted. Only works for scripts attached to avatar, or during touch events.\nDirection currently has no effect. llMD5String @@ -12821,24 +12816,24 @@ Text - tooltip - type string + tooltip + Nonce - tooltip - type integer + tooltip + tooltip - Returns a string of 32 hex characters that is an RSA Data Security Inc., MD5 Message-Digest Algorithm of Text with Nonce. + Returns a string of 32 hex characters that is an RSA Data Security Inc., MD5 Message-Digest Algorithm of Text with Nonce used as the salt.\nReturns a 32-character hex string. (128-bit in binary.) llMessageLinked @@ -12853,42 +12848,42 @@ LinkNumber - tooltip - type integer + tooltip + Number - tooltip - type integer + tooltip + Text - tooltip - type string + tooltip + ID - tooltip - type key + tooltip + tooltip - Sends Number, Text, and ID to members of the link set identified by LinkNumber (LINK_ROOT sends to root task in a linked set, LINK_SET sends to all tasks, LINK_ALL_OTHERS to all other tasks, LINK_ALL_CHILDREN to all children, LINK_THIS to the task the script it is in). + Sends Number, Text, and ID to members of the link set identified by LinkNumber.\nLinkNumber is either a linked number (available through llGetLinkNumber) or a LINK_* constant. llMinEventDelay @@ -12903,10 +12898,10 @@ Delay - tooltip - type float + tooltip + @@ -12926,24 +12921,24 @@ Action - tooltip - LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE or LAND_REVERT type integer + tooltip + LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE or LAND_REVERT Area - tooltip - LAND_SMALL_BRUSH, LAND_MEDIUM_BRUSH or LAND_LARGE_BRUSH type integer + tooltip + 0, 1, 2 (2m x 2m, 4m x 4m, or 8m x 8m) tooltip - Modify land with action (LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE, LAND_REVERT) on size (LAND_SMALL_BRUSH, LAND_MEDIUM_BRUSH, LAND_LARGE_BRUSH). + Modify land with action (LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE, LAND_REVERT) on size (0, 1, 2, corresponding to 2m x 2m, 4m x 4m, 8m x 8m). llModPow @@ -12958,33 +12953,33 @@ Value - tooltip - type integer + tooltip + Power - tooltip - type integer + tooltip + Modulus - tooltip - type integer + tooltip + tooltip - Returns a Value raised to the Power, mod Modulus. ((a**b)%c) b is capped at 0xFFFF (16 bits). + Returns a Value raised to the Power, mod Modulus. ((a**b)%c) b is capped at 0xFFFF (16 bits).\nReturns (Value ^ Power) % Modulus. (Value raised to the Power, Modulus). Value is capped at 0xFFFF (16 bits). llMoveToTarget @@ -12999,24 +12994,24 @@ Target - tooltip - type vector + tooltip + Tau - tooltip - type float + tooltip + tooltip - Critically damp to Target in Tau seconds (if the script is physical). + Critically damp to Target in Tau seconds (if the script is physical).\nCritically damp to position target in tau-seconds if the script is physical. Good tau-values are greater than 0.2. A tau of 0.0 stops the critical damping. llNavigateTo @@ -13031,24 +13026,24 @@ Location - tooltip - Region coordinates for the character to navigate to. type vector + tooltip + Region coordinates for the character to navigate to. Options - tooltip - List of parameters to control the type of path-finding used. Currently only FORCE_DIRECT_PATH supported. type list + tooltip + List of parameters to control the type of path-finding used. Currently only FORCE_DIRECT_PATH supported. tooltip - Navigate to destination. + Navigate to destination.\nDirects an object to travel to a defined position in the region or adjacent regions. llOffsetTexture @@ -13063,33 +13058,33 @@ OffsetS - tooltip - type float + tooltip + OffsetT - tooltip - type float + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the texture S and T offsets for the chosen Face. + Sets the texture S and T offsets for the chosen Face.\nIf Face is ALL_SIDES this function sets the texture offsets for all faces. llOpenRemoteDataChannel @@ -13104,7 +13099,7 @@ arguments tooltip - Requests a channel to listen for XML-RPC calls. Will trigger a remote_data event with channel ID once it is available. + Requests a channel to listen for XML-RPC calls. (Deprecated: XML-RPC should not be used. Use http-in instead.)\nWill trigger a remote_data event with type = REMOTE_DATA_CHANNEL and a channel ID (key) once it is available.\nThis channel ID must be referenced in the XML-RPC call to the script (from the internet) -- so the key must somehow get to the external XML-RPC client. llOverMyLand @@ -13119,15 +13114,15 @@ ID - tooltip - type key + tooltip + tooltip - Returns TRUE if id ID over land owned by the script owner, otherwise FALSE. + Returns TRUE if id ID over land owned by the script owner, otherwise FALSE.\nReturns TRUE if key ID is over land owned by the object owner, FALSE otherwise. llOwnerSay @@ -13142,15 +13137,15 @@ Text - tooltip - type string - + tooltip + + tooltip - says Text to owner only (if owner is in region). + says Text to owner only (if owner is in region).\nSays Text to the owner of the object running the script, if the owner has been within the object's simulator since logging into Second Life, regardless of where they may be in-world. llParcelMediaCommandList @@ -13165,15 +13160,15 @@ CommandList - tooltip - A list of PARCEL_MEDIA_COMMAND_* flags and their parameters type list + tooltip + A list of PARCEL_MEDIA_COMMAND_* flags and their parameters tooltip - Sends a list of commands, some with arguments, to a parcel. + Controls the playback of multimedia resources on a parcel or for an agent, via one or more PARCEL_MEDIA_COMMAND_* arguments specified in CommandList. llParcelMediaQuery @@ -13188,15 +13183,15 @@ QueryList - tooltip - type list + tooltip + tooltip - Returns a list containing results of the sent query. + Queries the media properties of the parcel containing the script, via one or more PARCEL_MEDIA_COMMAND_* arguments specified in CommandList.\nThis function will only work if the script is contained within an object owned by the land-owner (or if the land is owned by a group, only if the object has been deeded to the group). llParseString2List @@ -13211,33 +13206,33 @@ Text - tooltip - type string + tooltip + Separators - tooltip - type list + tooltip + Spacers - tooltip - type list + tooltip + tooltip - Breaks Text into a list, discarding Separators, keeping Spacers (Separators and Spacers must be lists of strings, maximum of 8 each). + Converts Text into a list, discarding Separators, keeping Spacers (Separators and Spacers must be lists of strings, maximum of 8 each).\nSeparators and Spacers are lists of strings with a maximum of 8 entries each. llParseStringKeepNulls @@ -13252,33 +13247,33 @@ Text - tooltip - type string + tooltip + Separators - tooltip - type list + tooltip + Spacers - tooltip - type list + tooltip + tooltip - Breaks Text into a list, discarding separators, keeping spacers, keeping any null values generated. (separators and spacers must be lists of strings, maximum of 8 each). + Breaks Text into a list, discarding separators, keeping spacers, keeping any null values generated. (separators and spacers must be lists of strings, maximum of 8 each).\nllParseStringKeepNulls works almost exactly like llParseString2List, except that if a null is found it will add a null-string instead of discarding it like llParseString2List does. llParticleSystem @@ -13293,16 +13288,15 @@ Parameters - tooltip - type list + tooltip + tooltip - Creates a particle system based on Parameters. An empty list removes particle system from object. - List format is [ rule-1, data-1, rule-2, data-2 . . . rule-n, data-n ]. + Creates a particle system in the prim the script is attached to, based on Parameters. An empty list removes a particle system from object.\nList format is [ rule-1, data-1, rule-2, data-2 ... rule-n, data-n ]. llPassCollisions @@ -13317,15 +13311,15 @@ Pass - tooltip - Boolean, if TRUE, collisions are passed from children on to parents. type integer + tooltip + Boolean, if TRUE, collisions are passed from children on to parents. tooltip - If Pass == TRUE, collisions are passed from children on to parents (default is FALSE). + Configures how collision events are passed to scripts in the linkset.\nIf Pass == TRUE, collisions involving collision-handling scripted child prims are also passed on to the root prim. If Pass == FALSE (default behavior), such collisions will only trigger events in the affected child prim. llPassTouches @@ -13340,15 +13334,15 @@ Pass - tooltip - Boolean, if TRUE, touches are passed from children on to parents. type integer + tooltip + Boolean, if TRUE, touches are passed from children on to parents. tooltip - If pass == TRUE, touches are passed from children on to parents (default is FALSE). + Configures how touch events are passed to scripts in the linkset.\nIf Pass == TRUE, touches involving touch-handling scripted child prims are also passed on to the root prim. If Pass == FALSE (default behavior), such touches will only trigger events in the affected child prim. llPatrolPoints @@ -13363,24 +13357,24 @@ Points - tooltip - A list of vectors for the character to travel through sequentially. The list must contain at least two entries. type list + tooltip + A list of vectors for the character to travel through sequentially. The list must contain at least two entries. Options - tooltip - No options available at this time. type list + tooltip + No options available at this time. tooltip - Patrol a list of points. + Patrol a list of points.\nSets the points for a character (llCreateCharacter) to patrol along. llPlaySound @@ -13395,24 +13389,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays attached Sound once, at Volume (0.0 - 1.0). + Plays Sound once, at Volume (0.0 - 1.0) and attached to the object.\nOnly one sound may be attached to an object at a time, and attaching a new sound or calling llStopSound will stop the previously attached sound.\nA second call to llPlaySound with the same sound will not restart the sound, but the new volume will be used, which allows control over the volume of already playing sounds.\nTo restart the sound from the beginning, call llStopSound before calling llPlaySound again. llPlaySoundSlave @@ -13427,24 +13421,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays attached Sound once, at Volume (0.0 - 1.0), synced to next loop of most audible sync master. + Plays attached Sound once, at Volume (0.0 - 1.0), synced to next loop of most audible sync master.\nBehaviour is identical to llPlaySound, unless there is a "Sync Master" present. If a Sync Master is already playing, the Slave sound will not be played until the Master hits its loop point and returns to the beginning.\nllPlaySoundSlave will play the sound exactly once; if it is desired to have the sound play every time the Master loops, either use llLoopSoundSlave with extra silence padded on the end of the sound or ensure that llPlaySoundSlave is called at least once per loop of the Master. llPow @@ -13459,24 +13453,24 @@ Value - tooltip - type float + tooltip + Exponent - tooltip - type float + tooltip + tooltip - Returns the Value raised to the power Exponent, or returns 0 and triggers Math Error for imaginary results. + Returns the Value raised to the power Exponent, or returns 0 and triggers Math Error for imaginary results.\nReturns the Value raised to the Exponent. llPreloadSound @@ -13491,15 +13485,15 @@ Sound - tooltip - type string + tooltip + tooltip - Preloads a sound on viewers within range. + Causes nearby viewers to preload the Sound from the object's inventory.\nThis is intended to prevent delays in starting new sounds when called upon. llPursue @@ -13514,24 +13508,24 @@ TargetID - tooltip - Agent or object to pursue. type key + tooltip + Agent or object to pursue. Options - tooltip - Parameters for pursuit. type list + tooltip + Parameters for pursuit. tooltip - Chase after a target. + Chase after a target.\nCauses the character (llCharacter) to pursue the target defined by TargetID. llPushObject @@ -13546,42 +13540,42 @@ ObjectID - tooltip - type key + tooltip + Impulse - tooltip - type vector + tooltip + AngularImpulse - tooltip - type vector + tooltip + Local - tooltip - type integer + tooltip + tooltip - Applies Impulse and AngularImpulse to ObjectID. + Applies Impulse and AngularImpulse to ObjectID.\nApplies the supplied impulse and angular impulse to the object specified. llRefreshPrimURL @@ -13609,24 +13603,24 @@ Channel - tooltip - Any integer value except zero. type integer + tooltip + Any integer value except zero. Text - tooltip - Message to be transmitted. type integer + tooltip + Message to be transmitted. tooltip - Broadcasts Text to entire region on Channel (not 0.). + Broadcasts Text to entire region on Channel (except for channel 0). llRegionSayTo @@ -13641,33 +13635,33 @@ TargetID - tooltip - Avatar or object to say to. type key + tooltip + Avatar or object to say to. Channel - tooltip - Output channel, any integer value. type integer + tooltip + Output channel, any integer value. Text - tooltip - Message to be transmitted. type string + tooltip + Message to be transmitted. tooltip - Says Text, on Channel, to avatar or object indicated by TargetID (if within region). + Says Text, on Channel, to avatar or object indicated by TargetID (if within region).\nIf TargetID is an avatar and Channel is nonzero, Text can be heard by any attachment on the avatar. llReleaseCamera @@ -13684,15 +13678,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Return camera to agent. + Return camera to agent.\nDeprecated: Use llClearCameraParams instead. llReleaseControls @@ -13705,7 +13699,7 @@ arguments tooltip - Stop taking inputs. + Stop taking inputs.\nStop taking inputs from the avatar. llReleaseURL @@ -13720,15 +13714,15 @@ URL - tooltip - URL to release. type string + tooltip + URL to release. tooltip - Releases the specified URL, it will no longer be usable. + Releases the specified URL, which was previously obtained using llRequestURL. Once released, the URL will no longer be usable. llRemoteDataReply @@ -13745,42 +13739,42 @@ ChannelID - tooltip - type key + tooltip + MessageID - tooltip - type key + tooltip + - Data + sData - tooltip - type string + tooltip + String data to send - Data + iData - tooltip - type integer + tooltip + Integer data to send tooltip - Send an XML-RPC reply to MessageID on ChannelID with payload of string sData and integer iData. Deprecated: Use HTTP functions/events instead. + Send an XML-RPC reply to MessageID on ChannelID with payload of string sData and integer iData. Deprecated: Use HTTP functions/events instead.\nThe size of sData is limited to 254 characters. llRemoteDataSetRegion @@ -13795,9 +13789,7 @@ arguments tooltip - Deprecated: Use HTTP functions/events instead.\n - If an object using remote data channels changes regions, you must call this function to re-register the remote data channels. - You do not need to make this call if you don't change regions. + Deprecated: Use HTTP functions/events instead.\nIf an object using remote data channels changes regions, you must call this function to re-register the remote data channels.\nYou do not need to make this call if you don't change regions. llRemoteLoadScriptPin @@ -13812,51 +13804,51 @@ ObjectID - tooltip - Target prim to attempt copying into. type key + tooltip + Target prim to attempt copying into. ScriptName - tooltip - Name of the script in current inventory to copy. type string + tooltip + Name of the script in current inventory to copy. PIN - tooltip - Integer set on target prim as a Personal Information Number code. type integer + tooltip + Integer set on target prim as a Personal Information Number code. Running - tooltip - If the script should be set running in the target prim. type integer + tooltip + If the script should be set running in the target prim. StartParameter - tooltip - Integer. Parameter passed to the script if set to be running. type integer + tooltip + Integer. Parameter passed to the script if set to be running. tooltip - If the owner of the object this script is attached to can modify ObjectID, they are in the same region, and the matching PIN is used, copy ScriptName into target, if Running == TRUE, start the script with StartParameter. + If the owner of the object containing this script can modify the object identified by the specified object key, and if the PIN matches the PIN previously set using llSetRemoteScriptAccessPin (on the target prim), then the script will be copied into target. Running is a boolean specifying whether the script should be enabled once copied into the target object. llRemoveFromLandBanList @@ -13871,15 +13863,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Remove avatar from the land ban list. + Remove avatar from the land ban list.\nRemove specified avatar from the land parcel ban list. llRemoveFromLandPassList @@ -13894,15 +13886,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Remove avatar from the land pass list. + Remove avatar from the land pass list.\nRemove specified avatar from the land parcel pass list. llRemoveInventory @@ -13917,15 +13909,15 @@ InventoryItem - tooltip - type string + tooltip + tooltip - Remove the named inventory item. + Remove the named inventory item.\nRemove the named inventory item from the object inventory. llRemoveVehicleFlags @@ -13940,15 +13932,15 @@ Vehiclelags - tooltip - type integer + tooltip + tooltip - Removes the enabled bits in 'flags'. + Removes the enabled bits in 'flags'.\nSets the vehicle flags to FALSE. Valid parameters can be found in the vehicle flags constants section. llRequestAgentData @@ -13963,24 +13955,24 @@ AvatarID - tooltip - type key + tooltip + Data - tooltip - type integer + tooltip + tooltip - Requests data about AvatarID. When data is available the dataserver event will be raised. + Requests data about AvatarID. When data is available the dataserver event will be raised.\nThis function requests data about an avatar. If and when the information is collected, the dataserver event is triggered with the key returned from this function passed in the requested parameter. See the agent data constants (DATA_*) for details about valid values of data and what each will return in the dataserver event. llRequestDisplayName @@ -13995,15 +13987,15 @@ AvatarID - tooltip - Avatar UUID type key + tooltip + Avatar UUID tooltip - Requests name of an avatar. When data is available, the dataserver event will be raised. + Requests the display name of the agent. When the display name is available the dataserver event will be raised.\nThe avatar identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised. llRequestInventoryData @@ -14018,15 +14010,15 @@ InventoryItem - tooltip - type string + tooltip + tooltip - Requests data from object's inventory object. When data is available the dataserver event will be raised. + Requests data for the named InventoryItem.\nWhen data is available, the dataserver event will be raised with the key returned from this function in the requested parameter.\nThe only request currently implemented is to request data from landmarks, where the data returned is in the form "<float, float, float>" which can be cast to a vector. This position is in region local coordinates. llRequestPermissions @@ -14041,24 +14033,24 @@ AvatarID - tooltip - type key + tooltip + - PermmissionMask + PermissionMask - tooltip - type integer + tooltip + tooltip - Ask AvatarID to allow the script to do PermmissionMask (NB: Debit, ownership, link, joint, and permission requests can only go to the task's owner). + Ask AvatarID to allow the script to perform certain actions, specified in the PermissionMask bitmask. PermissionMask should be one or more PERMISSION_* constants. Multiple permissions can be requested simultaneously by ORing the constants together. Many of the permissions requests can only go to object owner.\nThis call will not stop script execution. If the avatar grants the requested permissions, the run_time_permissions event will be called. llRequestSecureURL @@ -14071,7 +14063,7 @@ arguments tooltip - Requests one HTTPS:// (SSL) URL for use by this object. An http_request event is triggered with the results. + Requests one HTTPS:// (SSL) URL for use by this object. The http_request event is triggered with results.\nReturns a key that is the handle used for identifying the request in the http_request event. llRequestSimulatorData @@ -14086,24 +14078,24 @@ RegionName - tooltip - type string + tooltip + Data - tooltip - type integer + tooltip + tooltip - Requests data about a simulator. When data is available the dataserver event will be raised. + Requests the specified Data about RegionName. When the specified data is available, the dataserver event is raised.\nData should use one of the DATA_SIM_* constants.\nReturns a dataserver query ID and triggers the dataserver event when data is found. llRequestURL @@ -14116,7 +14108,7 @@ arguments tooltip - Requests one HTTP:// URL for use by this object. An http_request event is triggered with the results. + Requests one HTTP:// URL for use by this script. The http_request event is triggered with the result of the request.\nReturns a key that is the handle used for identifying the result in the http_request event. llRequestUsername @@ -14131,15 +14123,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Requests single-word user-name of an avatar. When data is available the dataserver event will be raised. + Requests single-word user-name of an avatar. When data is available the dataserver event will be raised.\nRequests the user-name of the identified agent. When the user-name is available the dataserver event is raised.\nThe agent identified does not need to be in the same region or online at the time of the request.\nReturns a key that is used to identify the dataserver event when it is raised. llResetAnimationOverride @@ -14154,15 +14146,15 @@ AnimationState - tooltip - type string + tooltip + tooltip - Resets the animation of the specified animation state to the default value. + Resets the animation of the specified animation state to the default value.\nIf animation state equals "ALL", then all animation states are reset. llResetLandBanList @@ -14203,10 +14195,10 @@ ScriptName - tooltip - type string + tooltip + @@ -14237,7 +14229,7 @@ arguments tooltip - Sets the time to zero. + Sets the time to zero.\nSets the internal timer to zero. llReturnObjectsByID @@ -14252,15 +14244,15 @@ ObjectIDs - tooltip - List of object UUIDs to be returned. type list + tooltip + List of object UUIDs to be returned. tooltip - Return objects using their UUIDs + Return objects using their UUIDs.\nRequires the PERMISSION_RETURN_OBJECTS permission and that the script owner owns the parcel the returned objects are in, or is an estate manager or region owner. llReturnObjectsByOwner @@ -14275,24 +14267,24 @@ ID - tooltip - Object owner's UUID. type key + tooltip + Object owner's UUID. Scope - tooltip - type integer + tooltip + tooltip - Return objects based upon their owner and a scope of parcel, parcel owner, or region. + Return objects based upon their owner and a scope of parcel, parcel owner, or region.\nRequires the PERMISSION_RETURN_OBJECTS permission and that the script owner owns the parcel the returned objects are in, or is an estate manager or region owner. llRezAtRoot @@ -14307,51 +14299,51 @@ InventoryItem - tooltip - type string + tooltip + Position - tooltip - type vector + tooltip + Velocity - tooltip - type vector + tooltip + Rotation - tooltip - type rotation + tooltip + StartParameter - tooltip - type integer + tooltip + tooltip - Instantiate owner's InventoryItem at Position with Velocity, Rotation and with StartParameter. The last selected root object's location will be set to Position. + Instantiate owner's InventoryItem at Position with Velocity, Rotation and with StartParameter. The last selected root object's location will be set to Position.\nCreates object's inventory item at the given Position, with Velocity, Rotation, and StartParameter. llRezObject @@ -14366,51 +14358,51 @@ InventoryItem - tooltip - type string + tooltip + Position - tooltip - type vector + tooltip + Velocity - tooltip - type vector + tooltip + Rotation - tooltip - type rotation + tooltip + StartParameter - tooltip - type integer + tooltip + tooltip - Instantiate owners InventoryItem at Position with Velocity, Rotation and with start StartParameter. + Instantiate owners InventoryItem at Position with Velocity, Rotation and with start StartParameter.\nCreates object's inventory item at Position with Velocity and Rotation supplied. The StartParameter value will be available to the newly created object in the on_rez event or through the llGetStartParameter function.\nThe Velocity parameter is ignored if the rezzed object is not physical. llRot2Angle @@ -14425,15 +14417,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the rotation angle represented by Rotation. + Returns the rotation angle represented by Rotation.\nReturns the angle represented by the Rotation. llRot2Axis @@ -14448,15 +14440,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the rotation axis represented by Rotation. + Returns the rotation axis represented by Rotation.\nReturns the axis represented by the Rotation. llRot2Euler @@ -14471,15 +14463,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the Euler representation (roll, pitch, yaw) of Rotation. + Returns the Euler representation (roll, pitch, yaw) of Rotation.\nReturns the Euler Angle representation of the Rotation. llRot2Fwd @@ -14494,15 +14486,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the forward vector defined by Rotation. + Returns the forward vector defined by Rotation.\nReturns the forward axis represented by the Rotation. llRot2Left @@ -14517,15 +14509,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the left vector defined by Rotation. + Returns the left vector defined by Rotation.\nReturns the left axis represented by the Rotation. llRot2Up @@ -14540,15 +14532,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - Returns the up vector defined by Rotation. + Returns the up vector defined by Rotation.\nReturns the up axis represented by the Rotation. llRotateTexture @@ -14563,24 +14555,24 @@ Radians - tooltip - type float + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the texture rotation for the chosen face. + Sets the texture rotation for the specified Face to angle Radians.\nIf Face is ALL_SIDES, rotates the texture of all sides. llRotBetween @@ -14595,24 +14587,24 @@ Vector1 - tooltip - type vector + tooltip + Vector2 - tooltip - type vector + tooltip + tooltip - Returns the rotation to rotate Vector1 to Vector2. + Returns the rotation to rotate Vector1 to Vector2.\nReturns the rotation needed to rotate Vector1 to Vector2. llRotLookAt @@ -14627,33 +14619,33 @@ Rotation - tooltip - type rotation + tooltip + Strength - tooltip - type float + tooltip + Damping - tooltip - type float + tooltip + tooltip - Cause object to point it's forward axis towards Rotation. + Cause object to rotate to Rotation, with a force function defined by Strength and Damping parameters. Good strength values are around half the mass of the object and good damping values are less than 1/10th of the strength.\nAsymmetrical shapes require smaller damping.\nA strength of 0.0 cancels the look at. llRotTarget @@ -14668,24 +14660,24 @@ Rotation - tooltip - type rotation + tooltip + LeeWay - tooltip - type float + tooltip + tooltip - Set rotations with error of LeeWay as a rotational target and return an ID for the rotational target. + Set rotations with error of LeeWay radians as a rotational target, and return an ID for the rotational target.\nThe returned number is a handle that can be used in at_rot_target and llRotTargetRemove. llRotTargetRemove @@ -14700,15 +14692,15 @@ Handle - tooltip - type integer + tooltip + tooltip - Removes rotational target number. + Removes rotational target number.\nRemove rotational target indicated by the handle. llRound @@ -14723,15 +14715,15 @@ Value - tooltip - type float + tooltip + tooltip - Returns Value rounded to the nearest integer. + Returns Value rounded to the nearest integer.\nReturns the Value rounded to the nearest integer. llSameGroup @@ -14746,15 +14738,15 @@ ID - tooltip - type key + tooltip + tooltip - Returns TRUE if avatar ID is in the same region and has the same active group, otherwise FALSE. + Returns TRUE if avatar ID is in the same region and has the same active group, otherwise FALSE.\nReturns TRUE if the object or agent identified is in the same simulator and has the same active group as this object. Otherwise, returns FALSE. llSay @@ -14769,24 +14761,24 @@ Channel - tooltip - Channel to use to say text on. type integer + tooltip + Channel to use to say text on. Text - tooltip - Text to say. type string + tooltip + Text to say. tooltip - Says Text on Channel. + Says Text on Channel.\nThis chat method has a range of 20m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts. llScaleByFactor @@ -14801,15 +14793,15 @@ ScalingFactor - tooltip - The multiplier to be used with the prim sizes and their local positions. type float + tooltip + The multiplier to be used with the prim sizes and their local positions. tooltip - Attempts to resize the entire object by scaling_factor, maintaining the size-position ratios of the prims.\n\nResizing is subject to prim scale limits and linkability limits. This function can not resize the object if the linkset is physical, a pathfinding character, in a keyframed motion, or if resizing would cause the parcel to overflow.\nReturns a boolean (an integer) TRUE if it succeeds, FALSE if it fails. + Attempts to resize the entire object by ScalingFactor, maintaining the size-position ratios of the prims.\n\nResizing is subject to prim scale limits and linkability limits. This function can not resize the object if the linkset is physical, a pathfinding character, in a keyframed motion, or if resizing would cause the parcel to overflow.\nReturns a boolean (an integer) TRUE if it succeeds, FALSE if it fails. llScaleTexture @@ -14824,33 +14816,33 @@ Horizontal - tooltip - type float + tooltip + Vertical - tooltip - type float + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the texture's S and T scales for the chosen Face. + Sets the diffuse texture Horizontal and Vertical repeats on Face of the prim the script is attached to.\nIf Face == ALL_SIDES, all sides are set in one call.\nNegative values for horizontal and vertical will flip the texture. llScriptDanger @@ -14865,15 +14857,15 @@ Position - tooltip - type vector + tooltip + tooltip - Returns TRUE if Position is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts. + Returns TRUE if Position is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts.\nReturns true if the position is over public land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts. llScriptProfiler @@ -14888,16 +14880,15 @@ State - tooltip - PROFILE_NONE or PROFILE_SCRIPT_MEMORY flags to control the state. type integer + tooltip + PROFILE_NONE or PROFILE_SCRIPT_MEMORY flags to control the state. tooltip - Enables or disables script profiling options. Currently only supports PROFILE_SCRIPT_MEMORY (Mono only) and PROFILE_NONE.\n - MAY SIGNIFICANTLY REDUCE SCRIPT PERFORMANCE!. + Enables or disables script profiling options. Currently only supports PROFILE_SCRIPT_MEMORY (Mono only) and PROFILE_NONE.\nMay significantly reduce script performance. llSendRemoteData @@ -14914,44 +14905,42 @@ ChannelID - tooltip - type key + tooltip + Destination - tooltip - type string + tooltip + Value - tooltip - type integer + tooltip + Text - tooltip - type string + tooltip + tooltip - Deprecated: use HTTP instead.\n - Sends an XML-RPC request to Destination through ChannelID with payload of ChannelID (in a string), integer Value and string Text. - Returns a key that is the message_id for the resulting remote_data events. + Deprecated: use HTTP functions and events instead.\nSends an XML-RPC request to Destination through ChannelID with payload of ChannelID (in a string), integer Value and string Text.\nReturns a key that is the message_id for the resulting remote_data events. llSensor @@ -14966,51 +14955,51 @@ Name - tooltip - Object or avatar name. type string + tooltip + Object or avatar name. ID - tooltip - Object or avatar UUID. type key + tooltip + Object or avatar UUID. Type - tooltip - Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED type integer + tooltip + Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED Range - tooltip - Distance to scan. 0.0 - 96.0m. type float + tooltip + Distance to scan. 0.0 - 96.0m. Arc - tooltip - Angle, in radians, from the local x-axis of the prim to scan. type float + tooltip + Angle, in radians, from the local x-axis of the prim to scan. tooltip - Performs a single scan for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector (Name, ID, and/or Type can be empty or 0). + Performs a single scan for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector.\nSpecifying a blank Name, 0 Type, or NULL_KEY ID will prevent filtering results based on that parameter. A range of 0.0 does not perform a scan.\nResults are returned in the sensor and no_sensor events. llSensorRemove @@ -15023,7 +15012,7 @@ arguments tooltip - removes sensor. + removes sensor.\nRemoves the sensor set by llSensorRepeat. llSensorRepeat @@ -15038,60 +15027,60 @@ Name - tooltip - Object or avatar name. type string + tooltip + Object or avatar name. ID - tooltip - Object or avatar UUID. type key + tooltip + Object or avatar UUID. Type - tooltip - Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED type integer + tooltip + Bit-field mask of AGENT, AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED Range - tooltip - Distance to scan. 0.0 - 96.0m. type float + tooltip + Distance to scan. 0.0 - 96.0m. Arc - tooltip - Angle, in radians, from the local x-axis of the prim to scan. type float + tooltip + Angle, in radians, from the local x-axis of the prim to scan. Rate - tooltip - Period, in seconds, between scans. type float + tooltip + Period, in seconds, between scans. tooltip - Sets a callback for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector (Name, ID, and/or Type can be empty or 0) and repeats every Rate seconds. + Initiates a periodic scan every Rate seconds, for Name and ID with Type (AGENT, ACTIVE, PASSIVE, and/or SCRIPTED) within Range meters and Arc radians of forward vector.\nSpecifying a blank Name, 0 Type, or NULL_KEY ID will prevent filtering results based on that parameter. A range of 0.0 does not perform a scan.\nResults are returned in the sensor and no_sensor events. llSetAlpha @@ -15106,24 +15095,24 @@ Opacity - tooltip - type float + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the alpha (opacity) of Face. + Sets the alpha (opacity) of Face.\nSets the alpha (opacity) value for Face. If Face is ALL_SIDES, sets the alpha for all faces. The alpha value is interpreted as an opacity percentage (1.0 is fully opaque, and 0.2 is mostly transparent). This function will clamp alpha values less than 0.1 to 0.1 and greater than 1.0 to 1. llSetAngularVelocity @@ -15136,26 +15125,26 @@ arguments - Force + AngVel - tooltip - The force to apply. type vector + tooltip + The angular velocity to set the object to. Local - tooltip - If TRUE, the Force is treated as a local directional vector instead of a regional directional vector. type integer + tooltip + If TRUE, the AngVel is treated as a local directional vector instead of a regional directional vector. tooltip - Sets an object's angular velocity, in local coordinates if local == TRUE (if the script is physical). + Sets an object's angular velocity to AngVel, in local coordinates if Local == TRUE (if the script is physical).\nHas no effect on non-physical objects. llSetAnimationOverride @@ -15170,24 +15159,24 @@ AnimationState - tooltip - type string + tooltip + AnimationName - tooltip - type string + tooltip + tooltip - Sets the animation (in object inventory) that will play for the given animation state. + Sets the animation (in object inventory) that will play for the given animation state.\nTo use this function the script must obtain the PERMISSION_OVERRIDE_ANIMATIONS permission. llSetBuoyancy @@ -15202,15 +15191,15 @@ Buoyancy - tooltip - type float + tooltip + tooltip - Set the tasks buoyancy (0 is none, < 1.0 sinks, 1.0 floats, > 1.0 rises). + Set the tasks buoyancy (0 is none, < 1.0 sinks, 1.0 floats, > 1.0 rises).\nSet the object buoyancy. A value of 0 is none, less than 1.0 sinks, 1.0 floats, and greater than 1.0 rises. llSetCameraAtOffset @@ -15225,15 +15214,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Sets the camera used in this object, at offset, if an avatar sits on it. + Sets the camera used in this object, at offset, if an avatar sits on it.\nSets the offset that an avatar's camera will be moved to if the avatar sits on the object. llSetCameraEyeOffset @@ -15248,10 +15237,10 @@ Offset - tooltip - type vector + tooltip + @@ -15271,10 +15260,10 @@ Parameters - tooltip - type list + tooltip + @@ -15294,10 +15283,10 @@ Action - tooltip - A CLICK_ACTION_* flag type integer + tooltip + A CLICK_ACTION_* flag @@ -15317,24 +15306,24 @@ Colour - tooltip - type vector + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the color, for the face. + Sets the color, for the face.\nSets the colour of the side specified. If Face is ALL_SIDES, sets the colour on all faces. llSetContentType @@ -15349,24 +15338,24 @@ HTTPRequestID - tooltip - A valid http_request() key type key + tooltip + A valid http_request() key ContentType - tooltip - Media type to use with any following llHTTPResponse(HTTPRequestID, ...) type integer + tooltip + Media type to use with any following llHTTPResponse(HTTPRequestID, ...) tooltip - Set the media type of an LSL HTTP server response. + Set the media type of an LSL HTTP server response to ContentType.\nHTTPRequestID must be a valid http_request ID. ContentType must be one of the CONTENT_TYPE_* constants. llSetDamage @@ -15381,15 +15370,15 @@ Damage - tooltip - type float + tooltip + tooltip - Sets the amount of damage that will be done to an avatar that this task hits. Task will be killed. + Sets the amount of damage that will be done to an avatar that this task hits. Task will be killed.\nSets the amount of damage that will be done to an avatar that this object hits. This object will be destroyed on damaging an avatar, and no collision event is triggered. llSetForce @@ -15404,24 +15393,24 @@ Force - tooltip - Directional force. type vector - + tooltip + Directional force. + Local - tooltip - Boolean, if TRUE uses local axis, if FALSE uses region axis. type integer + tooltip + Boolean, if TRUE uses local axis, if FALSE uses region axis. tooltip - Sets Force on object, in local coordinates if Local == TRUE (if the script is physical). + Sets Force on object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects. llSetForceAndTorque @@ -15436,33 +15425,33 @@ Force - tooltip - Directional force. type vector + tooltip + Directional force. Torque - tooltip - Torque force. type vector + tooltip + Torque force. Local - tooltip - Boolean, if TRUE uses local axis, if FALSE uses region axis. type integer + tooltip + Boolean, if TRUE uses local axis, if FALSE uses region axis. tooltip - Sets the Force and Torque of object, in local coordinates if Local == TRUE (if the script is physical). + Sets the Force and Torque of object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects. llSetHoverHeight @@ -15477,33 +15466,33 @@ Height - tooltip - Distance above the ground. type float + tooltip + Distance above the ground. Water - tooltip - Boolean, if TRUE then hover above water too. type integer + tooltip + Boolean, if TRUE then hover above water too. Tau - tooltip - Seconds to critically damp in. type float + tooltip + Seconds to critically damp in. tooltip - Critically damps to a Height (either above ground level or above the higher of land and water if water == TRUE). + Critically damps a physical object to a Height (either above ground level or above the higher of land and water if water == TRUE).\nDo not use with vehicles. Use llStopHover to stop hovering. llSetInventoryPermMask @@ -15520,28 +15509,28 @@ InventoryItem - tooltip - An item in the prim's inventory type string + tooltip + An item in the prim's inventory PermissionFlag - tooltip - MASK_* flag type integer + tooltip + MASK_* flag PermissionMask - tooltip - Permission bit-field (PERM_* flags) type integer + tooltip + Permission bit-field (PERM_* flags) @@ -15561,24 +15550,24 @@ Keyframes - tooltip - Strided keyframe list of the form: position, orientation, time. Each keyframe is interpreted relative to the previous transform of the object. type list + tooltip + Strided keyframe list of the form: position, orientation, time. Each keyframe is interpreted relative to the previous transform of the object. Options - tooltip - type list + tooltip + tooltip - Requests that a non-physical object be key-framed according to key-frame list. + Requests that a non-physical object be key-framed according to key-frame list.\nSpecify a list of times, positions, and orientations to be followed by an object. The object will be smoothly moved between key-frames by the simulator. Collisions with other non-physical or key-framed objects will be ignored (no script events will fire and collision processing will not occur). Collisions with physical objects will be computed and reported, but the key-framed object will be unaffected by those collisions.\nKeyframes is a strided list containing positional, rotational, and time data for each step in the motion. Options is a list containing optional arguments and parameters (specified by KFM_* constants). llSetLinkAlpha @@ -15593,33 +15582,33 @@ LinkNumber - tooltip - type integer + tooltip + Opacity - tooltip - type float + tooltip + Face - tooltip - type integer + tooltip + tooltip - If a prim exists in the link chain at LinkNumber, set Face to Opacity. + If a prim exists in the link chain at LinkNumber, set Face to Opacity.\nSets the Face, on the linked prim specified, to the Opacity. llSetLinkCamera @@ -15634,28 +15623,28 @@ LinkNumber - tooltip - Prim link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag type integer + tooltip + Prim link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag EyeOffset - tooltip - Offset, relative to the object's centre and expressed in local coordinates, that the camera looks from. type vector + tooltip + Offset, relative to the object's centre and expressed in local coordinates, that the camera looks from. LookOffset - tooltip - Offset, relative to the object's centre and expressed in local coordinates, that the camera looks toward. type vector + tooltip + Offset, relative to the object's centre and expressed in local coordinates, that the camera looks toward. @@ -15675,33 +15664,33 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag. Colour - tooltip - Colour in RGB <R.R, G.G, B.B> type vector + tooltip + Color in RGB <R.R, G.G, B.B> Face - tooltip - Side number or ALL_SIDES. type integer + tooltip + Side number or ALL_SIDES. tooltip - If a task exists in the link chain at LinkNumber, set the Face to color. + If a task exists in the link chain at LinkNumber, set the Face to color.\nSets the colour of the linked child's side, specified by LinkNumber. llSetLinkMedia @@ -15716,33 +15705,33 @@ Link - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims). type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims). Face - tooltip - Face number. type integer + tooltip + Face number. Parameters - tooltip - A set of name/value pairs (in no particular order) type list + tooltip + A set of name/value pairs (in no particular order) tooltip - Set the media parameters for a particular face on linked prim. Parameters is a list of name/value pairs (in no particular order). If media is not already on this object, add it. Parameters not specified are unchanged, or if new media is added set to the default specified. + Set the media parameters for a particular face on linked prim, specified by Link. Returns an integer that is a STATUS_* flag which details the success/failure of the operation(s).\nMediaParameters is a set of name/value pairs in no particular order. Parameters not specified are unchanged, or if new media is added then set to the default specified. llSetLinkPrimitiveParams @@ -15757,24 +15746,24 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag Parameters - tooltip - type list + tooltip + tooltip - Set primitive parameters for LinkNumber based on Parameters. + Set primitive parameters for LinkNumber based on Parameters.\nSets the parameters (or properties) of any linked prim in one step. llSetLinkPrimitiveParamsFast @@ -15789,24 +15778,24 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag Parameters - tooltip - type list + tooltip + tooltip - Set primitive parameters for LinkNumber based on Parameters, without a delay. + Set primitive parameters for LinkNumber based on Parameters, without a delay.\nSet parameters for link number, from the list of Parameters, with no built-in script sleep. This function is identical to llSetLinkPrimitiveParams, except without the delay. llSetLinkTexture @@ -15821,28 +15810,28 @@ LinkNumber - tooltip - type integer + tooltip + Texture - tooltip - type string + tooltip + Face - tooltip - type integer + tooltip + @@ -15862,78 +15851,78 @@ LinkNumber - tooltip - Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag to effect type integer + tooltip + Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag to effect Mode - tooltip - Bitmask of animation options. type integer + tooltip + Bitmask of animation options. Face - tooltip - Specifies which object face to animate or ALL_SIDES. type integer + tooltip + Specifies which object face to animate or ALL_SIDES. SizeX - tooltip - Horizontal frames (ignored for ROTATE and SCALE). type integer + tooltip + Horizontal frames (ignored for ROTATE and SCALE). SizeY - tooltip - Vertical frames (ignored for ROTATE and SCALE). type integer + tooltip + Vertical frames (ignored for ROTATE and SCALE). Start - tooltip - Start position/frame number (or radians for ROTATE). type float + tooltip + Start position/frame number (or radians for ROTATE). Length - tooltip - Specifies the animation duration, in frames (or radians for ROTATE). type float + tooltip + Specifies the animation duration, in frames (or radians for ROTATE). Rate - tooltip - Specifies the animation playback rate, in frames per second (must be greater than zero). type float + tooltip + Specifies the animation playback rate, in frames per second (must be greater than zero). tooltip - Animates a texture on the prim specified by LinkNumber, by setting the texture scale and offset. + Animates a texture on the prim specified by LinkNumber, by setting the texture scale and offset.\nMode is a bitmask of animation options.\nFace specifies which object face to animate.\nSizeX and SizeY specify the number of horizontal and vertical frames.Start specifes the animation start point.\nLength specifies the animation duration.\nRate specifies the animation playback rate. llSetLocalRot @@ -15948,10 +15937,10 @@ Rotation - tooltip - type rotation + tooltip + @@ -15961,7 +15950,7 @@ llSetMemoryLimit energy - + 10.0 sleep 0.0 return @@ -15971,10 +15960,10 @@ Limit - tooltip - The amount to reserve, which must be less than the allowed maximum (currently 64KB) and not already have been exceeded. type integer + tooltip + The amount to reserve, which must be less than the allowed maximum (currently 64KB) and not already have been exceeded. @@ -15994,10 +15983,10 @@ Description - tooltip - type string + tooltip + @@ -16017,10 +16006,10 @@ Name - tooltip - type string + tooltip + @@ -16042,19 +16031,19 @@ PermissionFlag - tooltip - MASK_* flag type integer + tooltip + MASK_* flag PermissionMask - tooltip - Permission bit-field (PERM_* flags) type integer + tooltip + Permission bit-field (PERM_* flags) @@ -16074,10 +16063,10 @@ URL - tooltip - type string + tooltip + @@ -16097,24 +16086,24 @@ Price - tooltip - The default price shown in the textu input field. type integer + tooltip + The default price shown in the textu input field. QuickButtons - tooltip - Specifies the 4 payment values shown in the payment dialog's buttons (or PAY_HIDE). type list + tooltip + Specifies the 4 payment values shown in the payment dialog's buttons (or PAY_HIDE). tooltip - Sets the default amount when someone chooses to pay this object. + Sets the default amount when someone chooses to pay this object.\nPrice is the default price shown in the textu input field. QuickButtons specifies the 4 payment values shown in the payment dialog's buttons.\nInput field and buttons may be hidden with PAY_HIDE constant, and may be set to their default values using PAY_DEFAULT. llSetPhysicsMaterial @@ -16129,51 +16118,51 @@ MaterialBits - tooltip - A bitmask specifying which of the parameters in the other arguments should be applied to the object. type integer + tooltip + A bitmask specifying which of the parameters in the other arguments should be applied to the object. GravityMultiplier - tooltip - type float + tooltip + Restitution - tooltip - type float + tooltip + Friction - tooltip - type float + tooltip + Density - tooltip - type float + tooltip + tooltip - Sets the selected parameters of the root object's physics behaviour. + Sets the selected parameters of the object's physics behavior.\nMaterialBits is a bitmask specifying which of the parameters in the other arguments should be applied to the object. GravityMultiplier, Restitution, Friction, and Density are the possible parameters to manipulate. llSetPos @@ -16188,15 +16177,15 @@ Position - tooltip - Region coordinates to move to (within 10m). type vector + tooltip + Region coordinates to move to (within 10m). tooltip - If the object is not physical, this function sets the position of the prim. + If the object is not physical, this function sets the position of the prim.\nIf the script is in a child prim, Position is treated as root relative and the link-set is adjusted.\nIf the prim is the root prim, the entire object is moved (up to 10m) to Position in region coordinates. llSetPrimitiveParams @@ -16211,22 +16200,22 @@ Parameters - tooltip - A list of changes. type list + tooltip + A list of changes. tooltip - This function changes the many properties (or "parameters") of a prim in one operation. + This function changes the many properties (or "parameters") of a prim in one operation. Parameters is a list of changes. llSetPrimMediaParams energy 10.0 sleep - 0.1 + 1.0 return integer arguments @@ -16234,24 +16223,24 @@ Face - tooltip - Face number type integer + tooltip + Face number MediaParameters - tooltip - A set of name/value pairs (in no particular order) type list + tooltip + A set of name/value pairs (in no particular order) tooltip - Sets the MediaParameters for a particular Face on the prim. If media is not already on this prim, adds it. + Sets the MediaParameters for a particular Face on the prim. Returns an integer that is a STATUS_* flag which details the success/failure of the operation(s).\nMediaParameters is a set of name/value pairs in no particular order. Parameters not specified are unchanged, or if new media is added then set to the default specified. llSetPrimURL @@ -16268,10 +16257,10 @@ URL - tooltip - type string + tooltip + @@ -16291,15 +16280,15 @@ Position - tooltip - Vector. The location to move to, in region coordinates. type vector + tooltip + Vector. The location to move to, in region coordinates. tooltip - Attempts to move the object so that the root prim is within 0.1m of Position.\nReturns an integer boolean, TRUE if the object is successfully placed within 0.1 m of Position, FALSE otherwise. + Attempts to move the object so that the root prim is within 0.1m of Position.\nReturns an integer boolean, TRUE if the object is successfully placed within 0.1 m of Position, FALSE otherwise.\nPosition may be any location within the region or up to 10m across a region border.\nIf the position is below ground, it will be set to the ground level at that x,y location. llSetRemoteScriptAccessPin @@ -16314,10 +16303,10 @@ PIN - tooltip - type integer + tooltip + @@ -16337,15 +16326,15 @@ Rotation - tooltip - type rotation + tooltip + tooltip - If the object is not physical, this function sets the rotation of the prim. + If the object is not physical, this function sets the rotation of the prim.\nIf the script is in a child prim, Rotation is treated as root relative and the link-set is adjusted.\nIf the prim is the root prim, the entire object is rotated to Rotation in the global reference frame. llSetScale @@ -16360,10 +16349,10 @@ Scale - tooltip - type vector + tooltip + @@ -16383,24 +16372,24 @@ ScriptName - tooltip - type string - + tooltip + + Running - tooltip - type integer + tooltip + tooltip - Enable or disable the script Running state of ScriptName in the prim. + Enable or disable the script Running state of Script in the prim. llSetSitText @@ -16415,15 +16404,15 @@ Text - tooltip - type string + tooltip + tooltip - Displays Text rather than "Sit" in the viewer's context menu. + Displays Text rather than 'Sit' in the viewer's context menu. llSetSoundQueueing @@ -16438,15 +16427,15 @@ QueueEnable - tooltip - Boolean, sound queuing: TRUE enables, FALSE disables (default). type integer + tooltip + Boolean, sound queuing: TRUE enables, FALSE disables (default). tooltip - Determines whether attached sound calls wait for the current sound to finish (0 = no [default], non-zero = yes). + Sets whether successive calls to llPlaySound, llLoopSound, etc., (attached sounds) interrupt the currently playing sound.\nThe default for objects is FALSE. Setting this value to TRUE will make the sound wait until the current playing sound reaches its end. The queue is one level deep. llSetSoundRadius @@ -16461,15 +16450,15 @@ Radius - tooltip - type float + tooltip + Maximum distance that sounds can be heard. tooltip - Establishes a hard cut-off radius for audibility of scripted sounds (both attached and triggered). + Limits radius for audibility of scripted sounds (both attached and triggered) to distance Radius. llSetStatus @@ -16484,24 +16473,24 @@ Status - tooltip - type integer + tooltip + Value - tooltip - type integer + tooltip + tooltip - Sets status (STATUS_PHYSICS, STATUS_PHANTOM, STATUS_BLOCK_GRAB, STATUS_ROTATE_X, STATUS_ROTATE_Y, and/or STATUS_ROTATE_Z) to value. + Sets object status specified in Status bitmask (e.g. STATUS_PHYSICS|STATUS_PHANTOM) to boolean Value.\nFor a full list of STATUS_* constants, see wiki documentation. llSetText @@ -16516,33 +16505,33 @@ Text - tooltip - type string + tooltip + - Colour + Color - tooltip - type vector + tooltip + Opacity - tooltip - type float + tooltip + tooltip - Set text floating over object. + Causes Text to float above the prim, using the specified Color and Opacity. llSetTexture @@ -16557,24 +16546,24 @@ Texture - tooltip - type string + tooltip + Face - tooltip - type integer + tooltip + tooltip - Sets the Texture of Face. + Applies Texture to Face of prim.\nTexture may be a UUID or name of a texture in prim inventory.\nIf Face is ALL_SIDES, set the texture on all faces. llSetTextureAnim @@ -16589,69 +16578,69 @@ Mode - tooltip - Mask of Mode flags. type integer + tooltip + Mask of Mode flags. Face - tooltip - Face number or ALL_SIDES. type integer + tooltip + Face number or ALL_SIDES. SizeX - tooltip - Horizontal frames (ignored for ROTATE and SCALE). type integer + tooltip + Horizontal frames (ignored for ROTATE and SCALE). SizeY - tooltip - Vertical frames (ignored for ROTATE and SCALE). type integer + tooltip + Vertical frames (ignored for ROTATE and SCALE). Start - tooltip - Start position/frame number (or radians for ROTATE). type float + tooltip + Start position/frame number (or radians for ROTATE). Length - tooltip - number of frames to display (or radians for ROTATE). type float + tooltip + number of frames to display (or radians for ROTATE). Rate - tooltip - Frames per second (must not greater than zero). type float + tooltip + Frames per second (must not greater than zero). tooltip - Animate the texture on the specified face/faces. + Animates a texture by setting the texture scale and offset.\nMode is a bitmask of animation options.\nFace specifies which object face to animate.\nSizeX and SizeY specify the number of horizontal and vertical frames.Start specifes the animation start point.\nLength specifies the animation duration.\nRate specifies the animation playback rate. llSetTimerEvent @@ -16666,15 +16655,15 @@ Rate - tooltip - type float + tooltip + tooltip - Cause the timer event to be triggered every Rate seconds. + Causes the timer event to be triggered every Rate seconds.\n Passing in 0.0 stops further timer events. llSetTorque @@ -16689,24 +16678,24 @@ Torque - tooltip - Torque force. type vector + tooltip + Torque force. Local - tooltip - Boolean, if TRUE uses local axis, if FALSE uses region axis. type integer + tooltip + Boolean, if TRUE uses local axis, if FALSE uses region axis. tooltip - Sets the Torque of object, in local coordinates if Local == TRUE (if the script is physical). + Sets the Torque acting on the script's object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).\nOnly works on physical objects. llSetTouchText @@ -16721,15 +16710,15 @@ Text - tooltip - type string + tooltip + tooltip - Displays Text in the menu that acts on a touch. + Displays Text in the viewer context menu that acts on a touch. llSetVehicleFlags @@ -16744,15 +16733,15 @@ Flags - tooltip - type integer + tooltip + tooltip - Sets the enabled bits in 'flags'. + Enables the vehicle flags specified in the Flags bitmask.\nValid parameters can be found in the wiki documentation. llSetVehicleFloatParam @@ -16767,24 +16756,24 @@ ParameterName - tooltip - type integer + tooltip + ParameterValue - tooltip - type float + tooltip + tooltip - Sets the specified vehicle float parameter. + Sets a vehicle float parameter.\nValid parameters can be found in the wiki documentation. llSetVehicleRotationParam @@ -16799,24 +16788,24 @@ ParameterName - tooltip - type integer + tooltip + ParameterValue - tooltip - type float + tooltip + tooltip - Sets the specified vehicle rotation parameter. + Sets a vehicle rotation parameter.\nValid parameters can be found in the wiki documentation. llSetVehicleType @@ -16831,15 +16820,15 @@ Type - tooltip - type integer + tooltip + tooltip - Sets vehicle to one of the default types. + Activates the vehicle action on the object with vehicle preset Type.\nValid Types and an explanation of their characteristics can be found in wiki documentation. llSetVehicleVectorParam @@ -16854,24 +16843,24 @@ ParameterName - tooltip - type integer + tooltip + ParameterValue - tooltip - type float + tooltip + tooltip - Sets the specified vehicle vector parameter. + Sets a vehicle vector parameter.\nValid parameters can be found in the wiki documentation. llSetVelocity @@ -16884,26 +16873,26 @@ arguments - Force + Velocity - tooltip - The force to apply. type vector + tooltip + The velocity to apply. Local - tooltip - If TRUE, the vForce is treated as a local directional vector instead of a regional directional vector. type integer + tooltip + If TRUE, the Velocity is treated as a local directional vector instead of a regional directional vector. tooltip - Sets an objects velocity, in local coordinates if Local == TRUE (if the script is physical). + If the object is physics-enabled, sets the object's linear velocity to Velocity.\nIf Local==TRUE, Velocity is treated as a local directional vector; otherwise, Velocity is treated as a global directional vector. llSHA1String @@ -16918,10 +16907,10 @@ Text - tooltip - type string + tooltip + @@ -16941,24 +16930,24 @@ Channel - tooltip - type integer + tooltip + Text - tooltip - type string + tooltip + tooltip - shouts Text on Channel. + Shouts Text on Channel.\nThis chat method has a range of 100m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts. llSin @@ -16973,10 +16962,10 @@ Theta - tooltip - type float + tooltip + @@ -16996,24 +16985,24 @@ Offset - tooltip - type vector + tooltip + Rotation - tooltip - type rotation + tooltip + tooltip - Set the sit location for this object (if offset == <0,0,0> clear it). + Set the sit location for this object. If offset == ZERO_VECTOR, clears the sit target. llSleep @@ -17028,10 +17017,10 @@ Time - tooltip - type float + tooltip + @@ -17053,42 +17042,42 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + Queue - tooltip - type integer + tooltip + Loop - tooltip - type integer + tooltip + tooltip - Deprecated: Use llPlaySound instead. + Deprecated: Use llPlaySound instead.\nPlays Sound at Volume and specifies whether the sound should loop and/or be enqueued. llSoundPreload @@ -17105,15 +17094,15 @@ Sound - tooltip - type string + tooltip + tooltip - Deprecated: Use llPreloadSound instead. + Deprecated: Use llPreloadSound instead.\nPreloads a sound on viewers within range. llSqrt @@ -17128,15 +17117,15 @@ Value - tooltip - type float + tooltip + tooltip - Returns the square root of Value, or returns 0 and triggers a Math Error for imaginary results. + Returns the square root of Value.\nTriggers a math runtime error for imaginary results (if Value < 0.0). llStartAnimation @@ -17151,15 +17140,15 @@ Animation - tooltip - type string + tooltip + tooltip - Start Animation for agent that owns object. + This function plays the specified animation from playing on the avatar who received the script's most recent permissions request.\nAnimation may be an animation in task inventory or a built-in animation.\nRequires PERMISSION_TRIGGER_ANIMATION. llStopAnimation @@ -17174,15 +17163,15 @@ Animation - tooltip - type string + tooltip + tooltip - Stop Animation for agent that owns object. + This function stops the specified animation on the avatar who received the script's most recent permissions request.\nAnimation may be an animation in task inventory, a built-in animation, or the uuid of an animation.\nRequires PERMISSION_TRIGGER_ANIMATION. llStopHover @@ -17195,7 +17184,7 @@ arguments tooltip - Stop hovering to a height. + Stop hovering to a height (due to llSetHoverHeight()). llStopLookAt @@ -17208,7 +17197,7 @@ arguments tooltip - Stop causing object to point at a target. + Stop causing object to point at a target (due to llLookAt() or llRotLookAt()). llStopMoveToTarget @@ -17221,7 +17210,7 @@ arguments tooltip - Stops critically damped motion. + Stops critically damped motion (due to llMoveToTarget()). llStopSound @@ -17234,7 +17223,7 @@ arguments tooltip - Stops currently attached sound. + Stops playback of the currently attached sound. llStringLength @@ -17249,15 +17238,15 @@ Text - tooltip - type string + tooltip + tooltip - Returns the length of string. + Returns an integer that is the number of characters in Text (not counting the null). llStringToBase64 @@ -17272,15 +17261,15 @@ Text - tooltip - type string + tooltip + tooltip - Converts a string to the Base64 representation of the string. + Returns the string Base64 representation of the input string. llStringTrim @@ -17295,25 +17284,24 @@ Text - tooltip - String to trim type string + tooltip + String to trim TrimType - tooltip - STRING_TRIM_HEAD, STRING_TRIM_TAIL, or STRING_TRIM. type integer + tooltip + STRING_TRIM_HEAD, STRING_TRIM_TAIL, or STRING_TRIM. tooltip - Trims the leading and/or trailing white spaces from a string.\n - TrimType can be STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL. + Outputs a string, eliminating white-space from the start and/or end of the input string Text.\nValid options for TrimType:\nSTRING_TRIM_HEAD: trim all leading spaces in Text\nSTRING_TRIM_TAIL: trim all trailing spaces in Text\nSTRING_TRIM: trim all leading and trailing spaces in Text. llSubStringIndex @@ -17328,24 +17316,24 @@ Text - tooltip - type string + tooltip + Sequence - tooltip - type string + tooltip + tooltip - Returns an integer that is the index in source where pattern first appears. Returns -1 if not found. + Returns an integer that is the index in Text where string pattern Sequence first appears. Returns -1 if not found. llTakeCamera @@ -17362,10 +17350,10 @@ AvatarID - tooltip - type key + tooltip + @@ -17385,33 +17373,33 @@ Controls - tooltip - Bit-field of CONTROL_* flags. type integer + tooltip + Bit-field of CONTROL_* flags. Accept - tooltip - Boolean, determines whether control events are generated. type integer + tooltip + Boolean, determines whether control events are generated. PassOn - tooltip - Boolean, determines whether controls are disabled. type integer + tooltip + Boolean, determines whether controls are disabled. tooltip - Take controls from agent task has permissions for. If (Accept == (controls & input)), send input to task. If PassOn send to agent also. + Take controls from the agent the script has permissions for.\nIf (Accept == (Controls & input)), send input to the script. PassOn determines whether Controls also perform their normal functions.\nRequires the PERMISSION_TAKE_CONTROLS permission to run. llTan @@ -17426,10 +17414,10 @@ Theta - tooltip - type float + tooltip + @@ -17449,24 +17437,24 @@ Position - tooltip - type vector + tooltip + Range - tooltip - type float + tooltip + tooltip - Sets positions within range of position as a target and return an ID for the target. + This function is to have the script know when it has reached a position.\nIt registers a Position with a Range that triggers at_target and not_at_target events continuously until unregistered. llTargetOmega @@ -17481,33 +17469,33 @@ Axis - tooltip - type vector + tooltip + SpinRate - tooltip - type float + tooltip + Gain - tooltip - type float + tooltip + tooltip - Attempt to spin at SpinRate with strength Gain. + Attempt to spin at SpinRate with strength Gain on Axis.\nA spin rate of 0.0 cancels the spin. This function always works in object-local coordinates. llTargetRemove @@ -17522,15 +17510,15 @@ Target - tooltip - type integer + tooltip + tooltip - Removes target number. + Removes positional target Handle registered with llTarget. llTeleportAgent @@ -17545,43 +17533,42 @@ AvatarID - tooltip - UUID of avatar. type key + tooltip + UUID of avatar. LandmarkName - tooltip - Name of landmark (in object contents), or empty string, to use. type string + tooltip + Name of landmark (in object contents), or empty string, to use. Position - tooltip - If no landmark was provided, the position within the current region to teleport the avatar to. type vector + tooltip + If no landmark was provided, the position within the current region to teleport the avatar to. LookAtPoint - tooltip - The position within the target region that the avatar should be turned to face upon arrival. type vector + tooltip + The position within the target region that the avatar should be turned to face upon arrival. tooltip - Requests a teleport of avatar to a landmark stored in the object's inventory. If no landmark is provided (an empty string), the avatar is teleported to the location position in the current region. In either case, the avatar is turned to face the position given by look_at in local coordinates. - Requires the PERMISSION_TELEPORT permission. This function can only teleport the owner of the object. + Requests a teleport of avatar to a landmark stored in the object's inventory. If no landmark is provided (an empty string), the avatar is teleported to the location position in the current region. In either case, the avatar is turned to face the position given by look_at in local coordinates.\nRequires the PERMISSION_TELEPORT permission. This function can only teleport the owner of the object. llTeleportAgentGlobalCoords @@ -17596,42 +17583,42 @@ AvatarID - tooltip - UUID of avatar. type key + tooltip + UUID of avatar. GlobalPosition - tooltip - Global coordinates of the destination region. Can be retrieved by using llRequestSimulatorData(region_name, DATA_SIM_POS). type vector + tooltip + Global coordinates of the destination region. Can be retrieved by using llRequestSimulatorData(region_name, DATA_SIM_POS). RegionPosition - tooltip - The position within the target region to teleport the avatar to, if no landmark was provided. type vector + tooltip + The position within the target region to teleport the avatar to, if no landmark was provided. LookAtPoint - tooltip - The position within the target region that the avatar should be turned to face upon arrival. type vector + tooltip + The position within the target region that the avatar should be turned to face upon arrival. tooltip - Teleports an agent to set of a region_coordinates within a region at the specified global_coordinates. The agent lands facing the position defined by look_at local coordinates. + Teleports an agent to the RegionPosition local coordinates within a region which is specified by the GlobalPosition global coordinates. The agent lands facing the position defined by LookAtPoint local coordinates.\nRequires the PERMISSION_TELEPORT permission. This function can only teleport the owner of the object. llTeleportAgentHome @@ -17646,15 +17633,15 @@ AvatarID - tooltip - type key + tooltip + tooltip - Teleports agent on owner's land to agent's home location. + Teleport agent over the owner's land to agent's home location. llTextBox @@ -17669,33 +17656,33 @@ AvatarID - tooltip - type key + tooltip + Text - tooltip - type string + tooltip + Channel - tooltip - type integer + tooltip + tooltip - Shows a dialog box on the avatar's screen with the message. A text box asks for input, and if entered the Text is chatted on Channel. + Opens a dialog for the specified avatar with message Text, which contains a text box for input. Any text that is entered is said on the specified Channel (as if by the avatar) when the "OK" button is clicked. llToLower @@ -17710,10 +17697,10 @@ Text - tooltip - type string + tooltip + @@ -17733,10 +17720,10 @@ Text - tooltip - type string + tooltip + @@ -17746,7 +17733,7 @@ llTransferLindenDollars energy - + 10.0 sleep 0.0 return @@ -17756,24 +17743,24 @@ AvatarID - tooltip - type key + tooltip + Amount - tooltip - type integer + tooltip + tooltip - Transfer Amount of linden dollars (L$) from script owner to AvatarID. Returns a key to a corresponding transaction_result event for the success of the transfer. + Transfer Amount of linden dollars (L$) from script owner to AvatarID. Returns a key to a corresponding transaction_result event for the success of the transfer.\nAttempts to send the amount of money to the specified avatar, and trigger a transaction_result event identified by the returned key. llTriggerSound @@ -17788,24 +17775,24 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + tooltip - Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object. + Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object.\nThere is no limit to the number of triggered sounds which can be generated by an object, and calling llTriggerSound does not affect the attached sounds created by llPlaySound and llLoopSound. This is very useful for things like collision noises, explosions, etc. There is no way to stop or alter the volume of a sound triggered by this function. llTriggerSoundLimited @@ -17820,42 +17807,42 @@ Sound - tooltip - type string + tooltip + Volume - tooltip - type float + tooltip + TNE - tooltip - type vector + tooltip + BSW - tooltip - type vector + tooltip + tooltip - Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object, limited to axis-aligned bounding box defined by vectors top-north-east (TNE) and bottom-south-west (BSW). + Plays Sound at Volume (0.0 - 1.0), centered at but not attached to object, limited to axis-aligned bounding box defined by vectors top-north-east (TNE) and bottom-south-west (BSW).\nThere is no limit to the number of triggered sounds which can be generated by an object, and calling llTriggerSound does not affect the attached sounds created by llPlaySound and llLoopSound. This is very useful for things like collision noises, explosions, etc. There is no way to stop or alter the volume of a sound triggered by this function. llUnescapeURL @@ -17870,15 +17857,15 @@ URL - tooltip - type string + tooltip + tooltip - Returns an unescaped/ unencoded version of URL, replacing %20 with spaces etc. + Returns the string that is the URL unescaped, replacing "%20" with spaces, etc., version of URL.\nThis function can output raw UTF-8 strings. llUnSit @@ -17893,10 +17880,10 @@ AvatarID - tooltip - type key + tooltip + @@ -17906,9 +17893,9 @@ llUpdateCharacter energy - + 10.0 sleep - + 0.0 return void arguments @@ -17916,15 +17903,15 @@ Options - tooltip - Character configuration options. Takes the same constants as llCreateCharacter(). type list + tooltip + Character configuration options. Takes the same constants as llCreateCharacter(). tooltip - Change the character's settings. + Updates settings for a pathfinding character. llVecDist @@ -17939,24 +17926,24 @@ Location1 - tooltip - type vector + tooltip + Location2 - tooltip - type vector + tooltip + tooltip - Returns the 3D distance between Location1 and Location2. + Returns the distance between Location1 and Location2. llVecMag @@ -17971,15 +17958,15 @@ Vector - tooltip - type vector + tooltip + tooltip - Returns the magnitude of Vector. + Returns the magnitude of the vector. llVecNorm @@ -17994,15 +17981,15 @@ Vector - tooltip - type vector + tooltip + tooltip - Returns the v normalized. + Returns normalized vector. llVolumeDetect @@ -18017,22 +18004,22 @@ DetectEnabled - tooltip - .TRUE enables, FALSE disables. type integer + tooltip + TRUE enables, FALSE disables. tooltip - If DetectEnabled = TRUE, object becomes phantom but triggers collision_start and collision_end events when other objects start and stop interpenetrating. Must be applied to the root object. + If DetectEnabled = TRUE, object becomes phantom but triggers collision_start and collision_end events when other objects start and stop interpenetrating.\nIf another object (including avatars) interpenetrates it, it will get a collision_start event.\nWhen an object stops interpenetrating, a collision_end event is generated. While the other is inter-penetrating, collision events are NOT generated. llWanderWithin energy - + 10.0 sleep - + 0.0 return void arguments @@ -18040,33 +18027,33 @@ Origin - tooltip - Central point to wander about. type vector + tooltip + Central point to wander about. Area - tooltip - Half-extents of an area the character may wander within. (i.e., it can wander from the specified origin by up to +/-Distance.x in x, +/-Distance.y in y, etc.) type vector + tooltip + Half-extents of an area the character may wander within. (i.e., it can wander from the specified origin by up to +/-Distance.x in x, +/-Distance.y in y, etc.) Options - tooltip - No options available at this time. type list + tooltip + No options available at this time. tooltip - Wander within a specified volume. + Wander within a specified volume.\nSets a character to wander about a central spot within a specified area. llWater @@ -18081,15 +18068,15 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the water height below the object position + offset. + Returns the water height below the object position + Offset. llWhisper @@ -18104,24 +18091,24 @@ Channel - tooltip - type integer + tooltip + Text - tooltip - type string + tooltip + tooltip - Whispers Text on Channel. + Whispers Text on Channel.\nThis chat method has a range of 10m radius.\nPUBLIC_CHANNEL is the public chat channel that all avatars see as chat text. DEBUG_CHANNEL is the script debug channel, and is also visible to nearby avatars. All other channels are are not sent to avatars, but may be used to communicate with scripts. llWind @@ -18136,22 +18123,22 @@ Offset - tooltip - type vector + tooltip + tooltip - Returns the wind velocity at the object position + offset. + Returns the wind velocity at the object position + Offset. llXorBase64 energy 10.0 sleep - 0.3 + 0.0 return string arguments @@ -18159,24 +18146,24 @@ Text1 - tooltip - type string + tooltip + Text2 - tooltip - type string + tooltip + tooltip - Performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1. Retained for backwards compatibility. + Performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1. llXorBase64Strings @@ -18193,25 +18180,24 @@ Text1 - tooltip - type string + tooltip + Text2 - tooltip - type string + tooltip + tooltip - Deprecated: Please use llXorBase64 instead.\n - Incorrectly performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1. Retained for backwards compatibility. + Deprecated: Please use llXorBase64 instead.\nIncorrectly performs an exclusive OR on two Base64 strings and returns a Base64 string. Text2 repeats if it is shorter than Text1.\nRetained for backwards compatibility. llXorBase64StringsCorrect @@ -18228,29 +18214,76 @@ Text1 - tooltip - type string + tooltip + Text2 + type + string tooltip + + + + tooltip + Deprecated: Please use llXorBase64 instead.\nCorrectly (unless nulls are present) performs an exclusive OR on two Base64 strings and returns a Base64 string.\nText2 repeats if it is shorter than Text1. + + llGetMinScaleFactor + + energy + 10.0 + sleep + 0.0 + return + float + arguments + + tooltip + Returns the smallest multiplicative uniform scale factor that can be successfully applied (via llScaleByFactor()) to the object without violating prim size or linkability rules. + + llGetMaxScaleFactor + + energy + 10.0 + sleep + 0.0 + return + float + arguments + + tooltip + Returns the largest multiplicative uniform scale factor that can be successfully applied (via llScaleByFactor()) to the object without violating prim size or linkability rules. + + llScaleByFactor + + energy + 10.0 + sleep + 0.0 + return + float + arguments + + + Factor + type - string + float + tooltip + tooltip - Deprecated: Please use llXorBase64 instead.\n - Correctly (unless nulls are present) performs an exclusive OR on two Base64 strings and returns a Base64 string.\n - Text2 repeats if it is shorter than Text1. + Tries to uniformly scale the object by a multiplicative factor. Returns TRUE on success or FALSE on failure. llsd-lsl-syntax-version 2 - \ No newline at end of file + -- cgit v1.2.3 From 64816059b68188842ada767b5a2b6145b62017d4 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 25 Feb 2014 14:44:53 -0500 Subject: don't use the simulator channel in the keywords cache file name --- indra/newview/llsyntaxid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 3ee9859ccd..b558a113fb 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -147,7 +147,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() : std::string LLSyntaxIdLSL::buildFileNameNew() { - mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + gLastVersionChannel + "_" + mSyntaxIdNew.asString() + ".llsd.xml"; + mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + "_" + mSyntaxIdNew.asString() + ".llsd.xml"; return mFileNameNew; } -- cgit v1.2.3 From acc71d628dd024059bb221ef260c9d6d12a0cbd2 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 25 Feb 2014 17:20:44 -0500 Subject: fix typo --- indra/newview/llsyntaxid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index b558a113fb..3d63ab93a0 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -147,7 +147,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() : std::string LLSyntaxIdLSL::buildFileNameNew() { - mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + "_" + mSyntaxIdNew.asString() + ".llsd.xml"; + mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; return mFileNameNew; } -- cgit v1.2.3 From c23aebf89d678fdbd27ac12b92dabb22c0822166 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 26 Feb 2014 12:50:43 +0200 Subject: MAINT-3746 FIXED After replacing LLEnvManagerNew::setRegionChangeCallback with LLAgent::addRegionChangedCallback we should call RegionChanged callbacks to update NavMesh status. --- indra/newview/llagent.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f150ceda67..27d2a92f77 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -850,12 +850,9 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal //----------------------------------------------------------------------------- void LLAgent::setRegion(LLViewerRegion *regionp) { - bool notifyRegionChange; - llassert(regionp); if (mRegionp != regionp) { - notifyRegionChange = true; std::string ip = regionp->getHost().getString(); LL_INFOS("AgentLocation") << "Moving agent into region: " << regionp->getName() @@ -908,10 +905,7 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Pass new region along to metrics components that care about this level of detail. LLAppViewer::metricsUpdateRegion(regionp->getHandle()); } - else - { - notifyRegionChange = false; - } + mRegionp = regionp; // TODO - most of what follows probably should be moved into callbacks @@ -947,11 +941,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp) mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::handleServerBakeRegionTransition,this,_1)); } - if (notifyRegionChange) - { - LL_DEBUGS("AgentLocation") << "Calling RegionChanged callbacks" << LL_ENDL; - mRegionChangedSignal(); - } + LL_DEBUGS("AgentLocation") << "Calling RegionChanged callbacks" << LL_ENDL; + mRegionChangedSignal(); } -- cgit v1.2.3 From 3085c6e18847debc0f7fb6cf3dbcec66aec23687 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 27 Feb 2014 12:22:02 +0200 Subject: MAINT-3778 Develop>RenderMetadata>LOD Info no longer displays values for objects --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c233221e5f..87c7d26cc0 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1288,7 +1288,7 @@ BOOL LLVOVolume::calcLOD() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) && mDrawable->getFace(0)) { - //setDebugText(llformat("%.2f:%.2f, %d", debug_distance, radius, cur_detail)); + setDebugText(llformat("%.2f:%.2f, %d", mDrawable->mDistanceWRTCamera, radius, cur_detail)); //setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex())); } -- cgit v1.2.3 From a8e22e11c5d26b3cdfa2d67919fdde8272d52ea4 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 27 Feb 2014 17:49:50 -0600 Subject: MAINT-2980 Rename "Texture Memory" to "Video Memory" in hardware floater and increase limit. Limit should be however much vram is installed, but underneath the hood, fudge how much memory is used for textures to avoid swapping. Also, catch exceptions when attempting to build a GL context on windows and display an error dialog instead of crashing. --- indra/llwindow/llwindowwin32.cpp | 17 +++++++++++++++-- indra/newview/llfloaterhardwaresettings.cpp | 17 ++++++++++++++++- indra/newview/llfloaterhardwaresettings.h | 2 ++ indra/newview/llviewertexture.h | 2 +- indra/newview/llviewertexturelist.cpp | 15 ++++++--------- .../skins/default/xui/en/floater_hardware_settings.xml | 3 +-- 6 files changed, 41 insertions(+), 15 deletions(-) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 30f5526500..767676b9b8 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -85,6 +85,18 @@ void show_window_creation_error(const std::string& title) LL_WARNS("Window") << title << LL_ENDL; } +HGLRC SafeCreateContext(HDC hdc) +{ + __try + { + return wglCreateContext(hdc); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + return NULL; + } +} + //static BOOL LLWindowWin32::sIsClassRegistered = FALSE; @@ -1166,14 +1178,15 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO return FALSE; } - if (!(mhRC = wglCreateContext(mhDC))) + + if (!(mhRC = SafeCreateContext(mhDC))) { close(); OSMessageBox(mCallbacks->translateString("MBGLContextErr"), mCallbacks->translateString("MBError"), OSMB_OK); return FALSE; } - + if (!wglMakeCurrent(mhDC, mhRC)) { close(); diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 792a2a5d25..6923308ce9 100755 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -87,15 +87,30 @@ void LLFloaterHardwareSettings::refresh() refreshEnabledState(); } +void LLFloaterHardwareSettings::onSetVRAM() +{ + S32 vram = childGetValue("GraphicsCardTextureMemory").asInteger(); + + //give the texture system plenty of leeway to avoid swapping + vram /= 3; + + gSavedSettings.setS32("TextureMemory", vram); +} + void LLFloaterHardwareSettings::refreshEnabledState() { F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting(); - S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier); + S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(true, mem_multiplier); getChild("GraphicsCardTextureMemory")->setMinValue(min_tex_mem); getChild("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem); + S32 vram = gSavedSettings.getS32("TextureMemory"); + vram = vram*3; + + getChild("GraphicsCardTextureMemory")->setValue(vram); + getChild("GraphicsCardTextureMemory")->setCommitCallback(boost::bind(&LLFloaterHardwareSettings::onSetVRAM, this)); if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") || !gGLManager.mHasVertexBufferObject) { diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h index 626771b1d2..63d86d5667 100755 --- a/indra/newview/llfloaterhardwaresettings.h +++ b/indra/newview/llfloaterhardwaresettings.h @@ -64,6 +64,8 @@ public: /// don't apply the changed values void cancel(); + void onSetVRAM(); + /// refresh the enabled values void refreshEnabledState(); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 10101a4b9b..78db136427 100755 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -40,7 +40,7 @@ #include #define MIN_VIDEO_RAM_IN_MEGA_BYTES 32 -#define MAX_VIDEO_RAM_IN_MEGA_BYTES 512 // 512MB max for performance reasons. +#define MAX_VIDEO_RAM_IN_MEGA_BYTES 4096 class LLImageGL ; class LLImageRaw; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 783d1f2202..26f32941bf 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1270,7 +1270,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_m // - it's going to be swapping constantly regardless S32 max_vram = gGLManager.mVRAM; - if(gGLManager.mIsATI) + if(!get_recommended && gGLManager.mIsATI) { //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well. max_vram = (S32)(max_vram * 0.75f); @@ -1285,15 +1285,15 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_m { if (!get_recommended) { - max_texmem = 512; + max_texmem = 2048; } else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup { - max_texmem = 512; + max_texmem = 2048; } else { - max_texmem = 128; + max_texmem = 512; } llwarns << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << llendl; @@ -1301,10 +1301,7 @@ S32 LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, float mem_m S32 system_ram = (S32)BYTES_TO_MEGA_BYTES(gSysMemory.getPhysicalMemoryClamped()); // In MB //llinfos << "*** DETECTED " << system_ram << " MB of system memory." << llendl; - if (get_recommended) - max_texmem = llmin(max_texmem, (S32)(system_ram/2)); - else - max_texmem = llmin(max_texmem, (S32)(system_ram)); + max_texmem = llmin(max_texmem, (S32)(system_ram)); // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise max_texmem = llmin(max_texmem, (S32) (mem_multiplier * (F32) max_texmem)); @@ -1334,7 +1331,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32 mem) mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier)); if (mem != cur_mem) { - gSavedSettings.setS32("TextureMemory", mem); + gSavedSettings.setS32("TextureMemory", mem/3); return; //listener will re-enter this function } diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 9deb0d2030..05594c2d86 100755 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -155,13 +155,12 @@ tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality." width="315" /> Date: Fri, 28 Feb 2014 15:33:09 +0200 Subject: MAINT-358 FIXED [PUBLIC]Verbs buttons are available for landmarks folder if it was selected via keyboard --- indra/llui/llfolderview.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 13d231d712..173279fa81 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1127,18 +1127,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = getCurSelectedItem(); + BOOL shift_select = mask & MASK_SHIFT; + // don't shift select down to children of folders (they are implicitly selected through parent) + LLFolderViewItem* next = last_selected->getNextOpenNode(!shift_select); - if (!mKeyboardSelection) + if (!mKeyboardSelection || (!shift_select && (!next || next == last_selected))) { setSelection(last_selected, FALSE, TRUE); mKeyboardSelection = TRUE; } - LLFolderViewItem* next = NULL; - if (mask & MASK_SHIFT) + if (shift_select) { - // don't shift select down to children of folders (they are implicitly selected through parent) - next = last_selected->getNextOpenNode(FALSE); if (next) { if (next->isSelected()) @@ -1155,7 +1155,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) } else { - next = last_selected->getNextOpenNode(); if( next ) { if (next == last_selected) @@ -1191,18 +1190,18 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) if((mSelectedItems.size() > 0) && mScrollContainer) { LLFolderViewItem* last_selected = mSelectedItems.back(); + BOOL shift_select = mask & MASK_SHIFT; + // don't shift select down to children of folders (they are implicitly selected through parent) + LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select); - if (!mKeyboardSelection) + if (!mKeyboardSelection || (!shift_select && prev == this)) { setSelection(last_selected, FALSE, TRUE); mKeyboardSelection = TRUE; } - LLFolderViewItem* prev = NULL; - if (mask & MASK_SHIFT) + if (shift_select) { - // don't shift select down to children of folders (they are implicitly selected through parent) - prev = last_selected->getPreviousOpenNode(FALSE); if (prev) { if (prev->isSelected()) @@ -1219,7 +1218,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) } else { - prev = last_selected->getPreviousOpenNode(); if( prev ) { if (prev == this) -- cgit v1.2.3 From 80ba9cfeb1351664a57dd1390ee815f3901e3bb5 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 28 Feb 2014 15:37:41 +0200 Subject: MAINT-2613 Two entries for 'DisablePrecacheDelayAfterTeleporting' in settings.xml --- indra/newview/app_settings/settings.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2a01b81943..6ebda3ff6a 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -14936,6 +14936,17 @@ Value 7000 + DisablePrecacheDelayAfterTeleporting + + Comment + Disables the artificial delay in the viewer that precaches some incoming assets + Persist + 0 + Type + Boolean + Value + 0 + VersionChannelName Comment -- cgit v1.2.3 From d9d2659e11991ba41a052e011c610a213872d705 Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Fri, 28 Feb 2014 16:47:18 +0200 Subject: MAINT-3752: Changed the "Show me in Search result" checkbox caption --- indra/newview/skins/default/xui/da/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/de/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/es/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml | 4 ++-- indra/newview/skins/default/xui/it/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/ja/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/pl/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml | 2 +- indra/newview/skins/default/xui/zh/panel_preferences_privacy.xml | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml index 0df330b016..6d48180707 100755 --- a/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Lokationer, billeder, web, søge historik) - + diff --git a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml index e21bed6bb5..afde50b981 100755 --- a/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Standorte, Bilder, Web, Suchverlauf) - + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 78743d26bb..d7ffb73dda 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -47,7 +47,7 @@ (Localizaciones, imágenes, web, historial de búsqueda) - + diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml index cf1a374da6..a89676d119 100755 --- a/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_privacy.xml @@ -7,13 +7,13 @@ (endroits, images, web, historique des recherches) - + - Journaux de chat : + Journaux de chat : diff --git a/indra/newview/skins/default/xui/it/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/it/panel_preferences_privacy.xml index 41e7a59139..241ed8f162 100755 --- a/indra/newview/skins/default/xui/it/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Luoghi, immagini, web, cronologia ricerche) - + diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/ja/panel_preferences_privacy.xml index 420bbed572..3787f390e4 100755 --- a/indra/newview/skins/default/xui/ja/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (位置、画像、web、検索履歴) - + diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/pl/panel_preferences_privacy.xml index 5af2fed142..30b64bc977 100755 --- a/indra/newview/skins/default/xui/pl/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Miejsca, obrazy, przeglądarka internetowa, wyszukiwarka historii) - + diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml index d7fb585e35..8ca05c948a 100755 --- a/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Locações, imagens, web, histórico de busca) - + diff --git a/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml index 20bb839eed..ed6bed439c 100755 --- a/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/ru/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Места, картинки, страницы, журнал поиска) - + diff --git a/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml index 9111594979..285670a6ac 100755 --- a/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/tr/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (Konumlar, görüntüler, web, arama geçmişi) - + diff --git a/indra/newview/skins/default/xui/zh/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/zh/panel_preferences_privacy.xml index 07fdfd87e3..d768cacb94 100755 --- a/indra/newview/skins/default/xui/zh/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/zh/panel_preferences_privacy.xml @@ -7,7 +7,7 @@ (位置、圖像、網頁、搜尋的歷史紀錄) - + -- cgit v1.2.3 From e0a015920d3c0f793cadb88b7b8c4cedca61d2fb Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sun, 2 Mar 2014 14:33:57 -0800 Subject: STORM-1920: Richard fixed and optimized a ton more math. From Richard: There are a bunch of things I changed...mainly I eliminated all the grid_offset nonsense and instead simply calculate the tick index for the current drag position and use that to generate a snapped position as needed. I still use approx_equal because I want grid numbers to light up even when they aren't the axis you are currently snapping to. --- indra/llmath/llmath.h | 1 + indra/newview/llmanipscale.cpp | 351 ++++++++++++++++++++++++----------------- indra/newview/llmanipscale.h | 4 +- 3 files changed, 209 insertions(+), 147 deletions(-) diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b93f89d674..5abd9a0d06 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -72,6 +72,7 @@ const F32 F_E = 2.71828182845904523536f; const F32 F_SQRT2 = 1.4142135623730950488016887242097f; const F32 F_SQRT3 = 1.73205080756888288657986402541f; const F32 OO_SQRT2 = 0.7071067811865475244008443621049f; +const F32 OO_SQRT3 = 0.577350269189625764509f; const F32 DEG_TO_RAD = 0.017453292519943295769236907684886f; const F32 RAD_TO_DEG = 57.295779513082320876798154814105f; const F32 F_APPROXIMATELY_ZERO = 0.00001f; diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 087f617bbb..e93420ae21 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -190,9 +190,11 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mScaleSnapUnit1(1.f), mScaleSnapUnit2(1.f), mSnapRegimeOffset(0.f), + mTickPixelSpacing1(0.f), + mTickPixelSpacing2(0.f), mSnapGuideLength(0.f), mInSnapRegime(FALSE), - mScaleSnapValue(0.f) + mScaleSnappedValue(0.f) { mManipulatorScales = new F32[NUM_MANIPULATORS]; for (S32 i = 0; i < NUM_MANIPULATORS; i++) @@ -556,29 +558,29 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) return; } - // This is a flattened representation of the box as render here - // . - // (+++) (++-) /|\t - // +------------+ | (texture coordinates) - // | | | - // | 1 | (*) --->s - // | +X | + // This is a flattened representation of the box as render here + // . + // (+++) (++-) /|\t + // +------------+ | (texture coordinates) + // | | | + // | 1 | (*) --->s + // | +X | // | | - // (+++) (+-+)| |(+--) (++-) (+++) - // +------------+------------+------------+------------+ - // |0 3|3 7|7 4|4 0| - // | 0 | 4 | 5 | 2 | - // | +Z | -Y | -Z | +Y | - // | | | | | - // |1 2|2 6|6 5|5 1| - // +------------+------------+------------+------------+ - // (-++) (--+)| |(---) (-+-) (-++) - // | 3 | - // | -X | - // | | - // | | - // +------------+ - // (-++) (-+-) + // (+++) (+-+)| |(+--) (++-) (+++) + // +------------+------------+------------+------------+ + // |0 3|3 7|7 4|4 0| + // | 0 | 4 | 5 | 2 | + // | +Z | -Y | -Z | +Y | + // | | | | | + // |1 2|2 6|6 5|5 1| + // +------------+------------+------------+------------+ + // (-++) (--+)| |(---) (-+-) (-++) + // | 3 | + // | -X | + // | | + // | | + // +------------+ + // (-++) (-+-) LLColor4 highlight_color( 1.f, 1.f, 1.f, 0.5f); LLColor4 normal_color( 1.f, 1.f, 1.f, 0.3f); @@ -757,7 +759,7 @@ void LLManipScale::renderCorners( const LLBBox& bbox ) y_offset = bbox.getMaxLocal().mV[VY]; } x_offset = bbox.getMaxLocal().mV[VX]; - } + } } @@ -782,7 +784,7 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en { // Draws a single "jacks" style handle: a long, retangular box from start to end. LLVector3 offset_start = end - start; - offset_start.normVec(); + offset_start.normallize(); offset_start = start + mBoxHandleSize * offset_start; LLVector3 delta = end - offset_start; @@ -837,7 +839,7 @@ void LLManipScale::drag( S32 x, S32 y ) } LLSelectMgr::getInstance()->updateSelectionCenter(); - gAgentCamera.clearFocusObject(); + gAgentCamera.clearFocusObject(); } // Scale around the @@ -888,22 +890,20 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 projected_drag_pos1 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane1, mSnapGuideDir1)); LLVector3 projected_drag_pos2 = inverse_projected_vec(mScaleDir, orthogonal_component(mouse_on_plane2, mSnapGuideDir2)); - LLVector3 mouse_offset_from_scale_line_1 = orthogonal_component(mouse_on_plane1, mScaleDir); - LLVector3 mouse_offset_from_scale_line_2 = orthogonal_component(mouse_on_plane2, mScaleDir); - BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) { F32 drag_dist = projected_drag_pos1.length(); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(projected_drag_pos1, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); - mScaleSnapValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); - + mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + mScaleSnappedValue /= mScaleSnapUnit1 * 2.f; mInSnapRegime = TRUE; - scale_factor = mScaleSnapValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + if (!uniform) { scale_factor *= 0.5f; @@ -913,14 +913,15 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { F32 drag_dist = projected_drag_pos2.length(); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(projected_drag_pos2, mScaleDir, mScaleSnapUnit2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit2 / cur_subdivisions); - mScaleSnapValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); - + mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); + scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + mScaleSnappedValue /= mScaleSnapUnit2 * 2.f; mInSnapRegime = TRUE; - scale_factor = mScaleSnapValue / dist_vec(drag_start_point_agent, drag_start_center_agent); + if (!uniform) { scale_factor *= 0.5f; @@ -1038,7 +1039,6 @@ void LLManipScale::dragCorner( S32 x, S32 y ) rebuild(cur); } } - } @@ -1108,16 +1108,16 @@ void LLManipScale::dragFace( S32 x, S32 y ) { mInSnapRegime = TRUE; - if (dist_along_scale_line > max_drag_dist) + if (dist_along_scale_line > max_drag_dist) { - mScaleSnapValue = max_drag_dist; + mScaleSnappedValue = max_drag_dist; LLVector3 clamp_point = mScaleCenter + max_drag_dist * mScaleDir; drag_delta.setVec(clamp_point - drag_start_point_agent); } else if (dist_along_scale_line < min_drag_dist) { - mScaleSnapValue = min_drag_dist; + mScaleSnappedValue = min_drag_dist; LLVector3 clamp_point = mScaleCenter + min_drag_dist * mScaleDir; drag_delta.setVec(clamp_point - drag_start_point_agent); @@ -1125,7 +1125,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) else { F32 drag_dist = scale_center_to_mouse * mScaleDir; - F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + mScaleDir * drag_dist, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); F32 relative_snap_dist = fmodf(drag_dist + snap_dist, mScaleSnapUnit1 / cur_subdivisions); relative_snap_dist -= snap_dist; @@ -1139,7 +1139,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) drag_dist - max_drag_dist, drag_dist - min_drag_dist); - mScaleSnapValue = drag_dist - relative_snap_dist; + mScaleSnappedValue = drag_dist - relative_snap_dist; if (llabs(relative_snap_dist) < snap_dist) { @@ -1322,7 +1322,7 @@ void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) } guideline_end -= guideline_start; - guideline_end.normVec(); + guideline_end.normallize(); guideline_end *= LLWorld::getInstance()->getRegionWidthInMeters(); guideline_end += guideline_start; @@ -1343,19 +1343,20 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) LLQuaternion grid_rotation; LLSelectMgr::getInstance()->getGrid(grid_origin, grid_rotation, grid_scale); + bool uniform = LLManipScale::getUniform(); + LLVector3 box_corner_agent = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox )); - mScaleCenter = getUniform() ? bbox.getCenterAgent() : bbox.localToAgent(unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox )); + mScaleCenter = uniform ? bbox.getCenterAgent() : bbox.localToAgent(unitVectorToLocalBBoxExtent( -1.f * partToUnitVector( mManipPart ), bbox )); mScaleDir = box_corner_agent - mScaleCenter; - mScaleDir.normVec(); + mScaleDir.normallize(); if(mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { mSnapRegimeOffset = SNAP_GUIDE_SCREEN_OFFSET / gAgentCamera.mHUDCurZoom; - } else { - F32 object_distance = dist_vec(mScaleCenter, LLViewerCamera::getInstance()->getOrigin()); + F32 object_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin()); mSnapRegimeOffset = (SNAP_GUIDE_SCREEN_OFFSET * gViewerWindow->getWorldViewWidthRaw() * object_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } LLVector3 cam_at_axis; @@ -1375,18 +1376,17 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis))); LLVector3 off_axis_dir = mScaleDir % cam_at_axis; - off_axis_dir.normVec(); + off_axis_dir.normallize(); if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { - LLVector3 object_scale = bbox.getMaxLocal(); - object_scale.scaleVec(off_axis_dir * ~bbox.getRotation()); - object_scale.abs(); - if (object_scale.mV[VX] > object_scale.mV[VY] && object_scale.mV[VX] > object_scale.mV[VZ]) + LLVector3 bbox_relative_cam_dir = off_axis_dir * ~bbox.getRotation(); + bbox_relative_cam_dir.abs(); + if (bbox_relative_cam_dir.mV[VX] > bbox_relative_cam_dir.mV[VY] && bbox_relative_cam_dir.mV[VX] > bbox_relative_cam_dir.mV[VZ]) { mSnapGuideDir1 = LLVector3::x_axis * bbox.getRotation(); } - else if (object_scale.mV[VY] > object_scale.mV[VZ]) + else if (bbox_relative_cam_dir.mV[VY] > bbox_relative_cam_dir.mV[VZ]) { mSnapGuideDir1 = LLVector3::y_axis * bbox.getRotation(); } @@ -1405,7 +1405,6 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } else if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { - LLVector3 local_scale_dir = partToUnitVector( mManipPart ); LLVector3 local_camera_dir; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { @@ -1413,74 +1412,133 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } else { - local_camera_dir = (LLViewerCamera::getInstance()->getOrigin() - bbox.getCenterAgent()) * ~bbox.getRotation(); - local_camera_dir.normVec(); - } - local_scale_dir -= projected_vec(local_scale_dir, local_camera_dir); - local_scale_dir.normVec(); - LLVector3 x_axis_proj_camera = LLVector3::x_axis - projected_vec(LLVector3::x_axis, local_camera_dir); - x_axis_proj_camera.normVec(); - LLVector3 y_axis_proj_camera = LLVector3::y_axis - projected_vec(LLVector3::y_axis, local_camera_dir); - y_axis_proj_camera.normVec(); - LLVector3 z_axis_proj_camera = LLVector3::z_axis - projected_vec(LLVector3::z_axis, local_camera_dir); - z_axis_proj_camera.normVec(); - F32 x_axis_proj = llabs(local_scale_dir * x_axis_proj_camera); - F32 y_axis_proj = llabs(local_scale_dir * y_axis_proj_camera); - F32 z_axis_proj = llabs(local_scale_dir * z_axis_proj_camera); - - if (x_axis_proj > y_axis_proj && x_axis_proj > z_axis_proj) - { - mSnapGuideDir1 = LLVector3::y_axis; - mScaleSnapUnit2 = grid_scale.mV[VY]; - mSnapGuideDir2 = LLVector3::z_axis; - mScaleSnapUnit1 = grid_scale.mV[VZ]; - } - else if (y_axis_proj > z_axis_proj) - { - mSnapGuideDir1 = LLVector3::x_axis; - mScaleSnapUnit2 = grid_scale.mV[VX]; - mSnapGuideDir2 = LLVector3::z_axis; - mScaleSnapUnit1 = grid_scale.mV[VZ]; - } - else - { - mSnapGuideDir1 = LLVector3::x_axis; - mScaleSnapUnit2 = grid_scale.mV[VX]; - mSnapGuideDir2 = LLVector3::y_axis; - mScaleSnapUnit1 = grid_scale.mV[VY]; + local_camera_dir = (LLViewerCamera::getInstance()->getOrigin() - box_corner_agent) * ~bbox.getRotation(); + local_camera_dir.normallize(); } - LLVector3 snap_guide_flip(1.f, 1.f, 1.f); + LLVector3 axis_flip; switch (mManipPart) { case LL_CORNER_NNN: + axis_flip.setVec(1.f, 1.f, 1.f); break; case LL_CORNER_NNP: - snap_guide_flip.setVec(1.f, 1.f, -1.f); + axis_flip.setVec(1.f, 1.f, -1.f); break; case LL_CORNER_NPN: - snap_guide_flip.setVec(1.f, -1.f, 1.f); + axis_flip.setVec(1.f, -1.f, 1.f); break; case LL_CORNER_NPP: - snap_guide_flip.setVec(1.f, -1.f, -1.f); + axis_flip.setVec(1.f, -1.f, -1.f); break; case LL_CORNER_PNN: - snap_guide_flip.setVec(-1.f, 1.f, 1.f); + axis_flip.setVec(-1.f, 1.f, 1.f); break; case LL_CORNER_PNP: - snap_guide_flip.setVec(-1.f, 1.f, -1.f); + axis_flip.setVec(-1.f, 1.f, -1.f); break; case LL_CORNER_PPN: - snap_guide_flip.setVec(-1.f, -1.f, 1.f); + axis_flip.setVec(-1.f, -1.f, 1.f); break; case LL_CORNER_PPP: - snap_guide_flip.setVec(-1.f, -1.f, -1.f); + axis_flip.setVec(-1.f, -1.f, -1.f); + break; + default: + break; + } + + // account for which side of the object the camera is located and negate appropriate axes + local_camera_dir.scaleVec(axis_flip); + + // normalize to object scale + LLVector3 bbox_extent = bbox.getExtentLocal(); + local_camera_dir.scaleVec(LLVector3(1.f / bbox_extent.mV[VX], 1.f / bbox_extent.mV[VY], 1.f / bbox_extent.mV[VZ])); + + S32 scale_face = -1; + + if ((local_camera_dir.mV[VX] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + if ((local_camera_dir.mV[VZ] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + LLVector3 local_camera_dir_abs = local_camera_dir; + local_camera_dir_abs.abs(); + // all neighboring faces of bbox are pointing towards camera or away from camera + // use largest magnitude face for snap guides + if (local_camera_dir_abs.mV[VX] > local_camera_dir_abs.mV[VY]) + { + if (local_camera_dir_abs.mV[VX] > local_camera_dir_abs.mV[VZ]) + { + scale_face = VX; + } + else + { + scale_face = VZ; + } + } + else // y > x + { + if (local_camera_dir_abs.mV[VY] > local_camera_dir_abs.mV[VZ]) + { + scale_face = VY; + } + else + { + scale_face = VZ; + } + } + } + else + { + // z axis facing opposite direction from x and y relative to camera, use x and y for snap guides + scale_face = VZ; + } + } + else // x and y axes are facing in opposite directions relative to camera + { + if ((local_camera_dir.mV[VZ] > 0.f) == (local_camera_dir.mV[VY] > 0.f)) + { + // x axis facing opposite direction from y and z relative to camera, use y and z for snap guides + scale_face = VX; + } + else + { + // y axis facing opposite direction from x and z relative to camera, use x and z for snap guides + scale_face = VY; + } + } + + switch(scale_face) + { + case VX: + // x axis face being scaled, use y and z for snap guides + mSnapGuideDir1 = LLVector3::y_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VZ]; + mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VY]; + break; + case VY: + // y axis facing being scaled, use x and z for snap guides + mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VZ]; + mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VX]; + break; + case VZ: + // z axis facing being scaled, use x and y for snap guides + mSnapGuideDir1 = LLVector3::x_axis.scaledVec(axis_flip); + mScaleSnapUnit1 = grid_scale.mV[VY]; + mSnapGuideDir2 = LLVector3::y_axis.scaledVec(axis_flip); + mScaleSnapUnit2 = grid_scale.mV[VX]; break; default: + mSnapGuideDir1.zeroVec(); + mScaleSnapUnit1 = 0.f; + + mSnapGuideDir2.zeroVec(); + mScaleSnapUnit2 = 0.f; break; } - mSnapGuideDir1.scaleVec(snap_guide_flip); - mSnapGuideDir2.scaleVec(snap_guide_flip); + mSnapGuideDir1.rotVec(bbox.getRotation()); mSnapGuideDir2.rotVec(bbox.getRotation()); mSnapDir1 = -1.f * mSnapGuideDir2; @@ -1488,13 +1546,22 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } mScalePlaneNormal1 = mSnapGuideDir1 % mScaleDir; - mScalePlaneNormal1.normVec(); + mScalePlaneNormal1.normallize(); mScalePlaneNormal2 = mSnapGuideDir2 % mScaleDir; - mScalePlaneNormal2.normVec(); + mScalePlaneNormal2.normallize(); mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir); mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir); + + mTickPixelSpacing1 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length()); + mTickPixelSpacing2 = llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length()); + + if (uniform) + { + mScaleSnapUnit1 *= 0.5f; + mScaleSnapUnit2 *= 0.5f; + } } void LLManipScale::renderSnapGuides(const LLBBox& bbox) @@ -1518,9 +1585,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLColor4 tick_color = setupSnapGuideRenderPass(pass); gGL.begin(LLRender::LINES); - LLVector3 line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); - LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f))); - LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f)); + LLVector3 line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); + LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); + LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); gGL.vertex3fv(line_start.mV); @@ -1530,9 +1597,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); gGL.vertex3fv(line_end.mV); - line_mid = mScaleCenter + (mScaleSnapValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset); - line_start = line_mid - (mScaleDir * (llmin(mScaleSnapValue, mSnapGuideLength * 0.5f))); - line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnapValue, mSnapGuideLength * 0.5f)); + line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir2 * mSnapRegimeOffset); + line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); + line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); gGL.vertex3fv(line_start.mV); gGL.color4fv(tick_color.mV); gGL.vertex3fv(line_mid.mV); @@ -1547,6 +1614,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir; // find distance to nearest smallest grid unit + F32 grid_multiple1 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit1 / max_subdivisions)); + F32 grid_multiple2 = llfloor(llmax(0.f, dist_grid_axis) / (mScaleSnapUnit2 / max_subdivisions)); F32 grid_offset1 = fmodf(dist_grid_axis, mScaleSnapUnit1 / max_subdivisions); F32 grid_offset2 = fmodf(dist_grid_axis, mScaleSnapUnit2 / max_subdivisions); @@ -1569,7 +1638,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { // draw snap guide line gGL.begin(LLRender::LINES); - LLVector3 snap_line_center = mScaleCenter + (mScaleSnapValue * mScaleDir); + LLVector3 snap_line_center = bbox.localToAgent(unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox )); LLVector3 snap_line_start = snap_line_center + (mSnapGuideDir1 * mSnapRegimeOffset); LLVector3 snap_line_end = snap_line_center + (mSnapGuideDir2 * mSnapRegimeOffset); @@ -1591,13 +1660,13 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector3 arrow_span = mScaleDir; arrow_dir = snap_line_start - snap_line_center; - arrow_dir.normVec(); + arrow_dir.normallize(); gGL.vertex3fv((snap_line_start + arrow_dir * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_start + arrow_span * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_start - arrow_span * mBoxHandleSize).mV); arrow_dir = snap_line_end - snap_line_center; - arrow_dir.normVec(); + arrow_dir.normallize(); gGL.vertex3fv((snap_line_end + arrow_dir * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_end + arrow_span * mBoxHandleSize).mV); gGL.vertex3fv((snap_line_end - arrow_span * mBoxHandleSize).mV); @@ -1606,7 +1675,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis())); - screen_translate_axis.normVec(); + screen_translate_axis.normallize(); S32 tick_label_spacing = llround(screen_translate_axis * sTickLabelSpacing); @@ -1622,9 +1691,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) for (S32 i = start_tick; i <= stop_tick; i++) { F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit1 / max_subdivisions * (F32)i - grid_offset1)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions)); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); if (fmodf((F32)(i + sub_div_offset_1), (max_subdivisions / cur_subdivisions)) != 0.f) { @@ -1655,9 +1724,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) for (S32 i = start_tick; i <= stop_tick; i++) { F32 alpha = (1.f - (1.f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit2 / max_subdivisions * (F32)i - grid_offset2)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions)); - F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); + F32 cur_subdivisions = llclamp(getSubdivisionLevel(tick_pos, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); if (fmodf((F32)(i + sub_div_offset_2), (max_subdivisions / cur_subdivisions)) != 0.f) { @@ -1695,7 +1764,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { F32 tick_scale = 1.f; F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side1))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit1 / max_subdivisions * (F32)i - grid_offset1)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple1 + i) * (mScaleSnapUnit1 / max_subdivisions)); for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { @@ -1712,29 +1781,24 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) (mSnapGuideDir1 * mSnapRegimeOffset * (1.f + tick_scale)); EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode(); - F32 tick_val; + F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit1 / grid_resolution); + tick_value = (grid_multiple1 + i) / (max_subdivisions / grid_resolution); } else { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit1 * 2.f); - } - - if (getUniform()) - { - tick_val *= 2.f; + tick_value = (grid_multiple1 + i) / (2.f * max_subdivisions); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_val, mScaleSnapValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_val, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); } } @@ -1747,7 +1811,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { F32 tick_scale = 1.f; F32 alpha = grid_alpha * (1.f - (0.5f * ((F32)llabs(i) / (F32)num_ticks_per_side2))); - LLVector3 tick_pos = drag_point + (mScaleDir * (mScaleSnapUnit2 / max_subdivisions * (F32)i - grid_offset2)); + LLVector3 tick_pos = mScaleCenter + (mScaleDir * (grid_multiple2 + i) * (mScaleSnapUnit2 / max_subdivisions)); for (F32 division_level = max_subdivisions; division_level >= sGridMinSubdivisionLevel; division_level /= 2.f) { @@ -1764,29 +1828,24 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) (mSnapGuideDir2 * mSnapRegimeOffset * (1.f + tick_scale)); EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode(); - F32 tick_val; + F32 tick_value; if (grid_mode == GRID_MODE_WORLD) { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit2 / grid_resolution); + tick_value = (grid_multiple2 + i) / (max_subdivisions / grid_resolution); } else { - tick_val = (tick_pos - mScaleCenter) * mScaleDir / (mScaleSnapUnit2 * 2.f); - } - - if (getUniform()) - { - tick_val *= 2.f; + tick_value = (grid_multiple2 + i) / (2.f * max_subdivisions); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_val, mScaleSnapValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) { text_highlight = 1.f; } - renderTickValue(text_origin, tick_val, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); + renderTickValue(text_origin, tick_value, grid_mode == GRID_MODE_WORLD ? std::string("m") : std::string("x"), LLColor4(text_highlight, text_highlight, text_highlight, alpha)); } } } @@ -1881,28 +1940,28 @@ LLVector3 LLManipScale::cornerToUnitVector( S32 part ) const switch(part) { case LL_CORNER_NNN: - vec.setVec(-F_SQRT3, -F_SQRT3, -F_SQRT3); + vec.setVec(-OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_NNP: - vec.setVec(-F_SQRT3, -F_SQRT3, F_SQRT3); + vec.setVec(-OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_NPN: - vec.setVec(-F_SQRT3, F_SQRT3, -F_SQRT3); + vec.setVec(-OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_NPP: - vec.setVec(-F_SQRT3, F_SQRT3, F_SQRT3); + vec.setVec(-OO_SQRT3, OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PNN: - vec.setVec(F_SQRT3, -F_SQRT3, -F_SQRT3); + vec.setVec(OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PNP: - vec.setVec(F_SQRT3, -F_SQRT3, F_SQRT3); + vec.setVec(OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PPN: - vec.setVec(F_SQRT3, F_SQRT3, -F_SQRT3); + vec.setVec(OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PPP: - vec.setVec(F_SQRT3, F_SQRT3, F_SQRT3); + vec.setVec(OO_SQRT3, OO_SQRT3, OO_SQRT3); break; default: vec.clearVec(); diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 5cb8898fd0..13b510c9ff 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -157,10 +157,12 @@ private: LLVector3 mSnapDir1; LLVector3 mSnapDir2; F32 mSnapRegimeOffset; + F32 mTickPixelSpacing1; + F32 mTickPixelSpacing2; F32 mSnapGuideLength; LLVector3 mScaleCenter; LLVector3 mScaleDir; - F32 mScaleSnapValue; + F32 mScaleSnappedValue; BOOL mInSnapRegime; F32* mManipulatorScales; }; -- cgit v1.2.3 From 871bae45ba2f17b8cc791b3b7dcc443f1eb8cd95 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sun, 2 Mar 2014 15:49:17 -0800 Subject: STORM-1920: From Richard, fix for scale sliding when mouse goes in the opposite direction of the scale. I had discovered a set of bugs in the fix he sent me involving when the user decided to move the mouse in the opposite direction. This fixes the bug where the scale would start sliding around. --- indra/newview/llmanipscale.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index ea4235efde..af9fe385b2 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1612,14 +1612,14 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { LLGLDepthTest gls_depth(GL_FALSE); - F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir; + F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); F32 smallest_subdivision1 = mScaleSnapUnit1 / sGridMaxSubdivisionLevel; F32 smallest_subdivision2 = mScaleSnapUnit2 / sGridMaxSubdivisionLevel; // find distance to nearest smallest grid unit - F32 grid_multiple1 = llfloor(llmax(0.f, dist_grid_axis) / smallest_subdivision1); - F32 grid_multiple2 = llfloor(llmax(0.f, dist_grid_axis) / smallest_subdivision2); + F32 grid_multiple1 = llfloor(dist_grid_axis / smallest_subdivision1); + F32 grid_multiple2 = llfloor(dist_grid_axis / smallest_subdivision2); F32 grid_offset1 = fmodf(dist_grid_axis, smallest_subdivision1); F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2); -- cgit v1.2.3 From bd41d696de356028aa6b14d9bdf127360f6d5a57 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sun, 2 Mar 2014 16:28:38 -0800 Subject: =?UTF-8?q?STORM-1920:=20Corrected=20bug=20where=20snap=20values?= =?UTF-8?q?=20would=20highlight=20that=20weren=E2=80=99t=20supposed=20to?= =?UTF-8?q?=20be=20highlighting.=20=20Did=20some=20more=20cleanup=20and=20?= =?UTF-8?q?documentation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also corrected a bug in Richard’s patch that resulted in the object scaling up when the mouse went the opposite direction from the scale. The issue is that the vector length is an absolute value. To allow for "negative" results to be found and discarded, I instead used a dot product with a parallel unit vector to get the signed magnitude - or, if you prefer, the mono-dimensional vector. This bug only surfaced once the code made to actually work as intended in regards to the highlighting. Turns out that if the snapped value was at 2, any axis that was showing values would highlight its "2" text - and the same for all other values. To fix this, I used a simple enum and repurposed the property that tracked whether or not the cursor was in a snap regime. Now it not only tracks whether or not the cursor is in a snap regime, but which one it is in. This allowed the highlight render code to be able to differentiate which row was supposed to highlight and which did not. A couple more duplicated math operations were reduced by rearranging the order of some variable definitions. If at all possible, only do division once. The result is much cleaner and easier to read code. Several deprecated vector functions were updated to match their new versions. If you are going to mark something deprecated, why not just take the time to go through and find all uses and clean it up!? faceToUnitVector() was cleaned up to use the single-output design, matching cornerToUnitVector(). A mess of trailing whitespace was cleaned out. Many more LLManipScale private variables are now documented - though I only documented those I understood fully while reading where they were created and how they were used. --- indra/newview/llmanipscale.cpp | 254 +++++++++++++++++++++-------------------- indra/newview/llmanipscale.h | 41 ++++--- 2 files changed, 152 insertions(+), 143 deletions(-) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index af9fe385b2..23cbc580f6 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -68,7 +68,7 @@ const F32 SELECTED_MANIPULATOR_SCALE = 1.2f; const F32 MANIPULATOR_SCALE_HALF_LIFE = 0.07f; const S32 NUM_MANIPULATORS = 14; -const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = +const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = { LLManip::LL_CORNER_NNN, LLManip::LL_CORNER_NNP, @@ -87,7 +87,7 @@ const LLManip::EManipPart MANIPULATOR_IDS[NUM_MANIPULATORS] = }; -F32 get_default_max_prim_scale(bool is_flora) +F32 get_default_max_prim_scale(bool is_flora) { // a bit of a hack, but if it's foilage, we don't want to use the // new larger scale which would result in giant trees and grass @@ -97,7 +97,7 @@ F32 get_default_max_prim_scale(bool is_flora) return DEFAULT_MAX_PRIM_SCALE; } else - { + { return DEFAULT_MAX_PRIM_SCALE_NO_MESH; } } @@ -179,7 +179,7 @@ void LLManipScale::handleSelect() } LLManipScale::LLManipScale( LLToolComposite* composite ) - : + : LLManip( std::string("Scale"), composite ), mBoxHandleSize( 1.f ), mScaledBoxHandleSize( 1.f ), @@ -193,9 +193,9 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mTickPixelSpacing1(0.f), mTickPixelSpacing2(0.f), mSnapGuideLength(0.f), - mInSnapRegime(FALSE), + mSnapRegime(SNAP_REGIME_NONE), mScaleSnappedValue(0.f) -{ +{ mManipulatorScales = new F32[NUM_MANIPULATORS]; for (S32 i = 0; i < NUM_MANIPULATORS; i++) { @@ -216,7 +216,7 @@ void LLManipScale::render() LLGLDepthTest gls_depth(GL_TRUE); LLGLEnable gl_blend(GL_BLEND); LLGLEnable gls_alpha_test(GL_ALPHA_TEST); - + if( canAffectSelection() ) { gGL.matrixMode(LLRender::MM_MODELVIEW); @@ -228,11 +228,11 @@ void LLManipScale::render() } //////////////////////////////////////////////////////////////////////// - // Calculate size of drag handles + // Calculate size of drag handles const F32 BOX_HANDLE_BASE_SIZE = 50.0f; // box size in pixels = BOX_HANDLE_BASE_SIZE * BOX_HANDLE_BASE_FACTOR const F32 BOX_HANDLE_BASE_FACTOR = 0.2f; - + LLVector3 center_agent = gAgent.getPosAgentFromGlobal(LLSelectMgr::getInstance()->getSelectionCenterGlobal()); if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) @@ -285,7 +285,7 @@ void LLManipScale::render() rot.getAngleAxis(&angle_radians, &x, &y, &z); gGL.rotatef(angle_radians * RAD_TO_DEG, x, y, z); - + { LLGLEnable poly_offset(GL_POLYGON_OFFSET_FILL); glPolygonOffset( -2.f, -2.f); @@ -347,7 +347,7 @@ BOOL LLManipScale::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); LLVector3 box_center_agent = bbox.getCenterAgent(); LLVector3 box_corner_agent = bbox.localToAgent( unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ) ); - + updateSnapGuides(bbox); mDragStartPointGlobal = gAgent.getPosGlobalFromAgent(box_corner_agent); @@ -374,27 +374,27 @@ BOOL LLManipScale::handleMouseUp(S32 x, S32 y, MASK mask) if( hasMouseCapture() ) { - if( (LL_FACE_MIN <= (S32)mManipPart) + if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { sendUpdates(TRUE,TRUE,FALSE); } else - if( (LL_CORNER_MIN <= (S32)mManipPart) + if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { sendUpdates(TRUE,TRUE,TRUE); } - + //send texture update LLSelectMgr::getInstance()->adjustTexturesByScale(TRUE, getStretchTextures()); - + LLSelectMgr::getInstance()->enableSilhouette(TRUE); mManipPart = LL_NO_PART; // Might have missed last update due to UPDATE_DELAY timing LLSelectMgr::getInstance()->sendMultipleUpdate( mLastUpdateFlags ); - + //gAgent.setObjectTracking(gSavedSettings.getBOOL("TrackFocusObject")); LLSelectMgr::getInstance()->saveSelectedObjectTransform(SELECT_ACTION_TYPE_PICK); } @@ -415,15 +415,15 @@ BOOL LLManipScale::handleHover(S32 x, S32 y, MASK mask) { drag( x, y ); } - lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (active)" << llendl; + lldebugst(LLERR_USER_INPUT) << "hover handled by LLManipScale (active)" << llendl; } else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; // not dragging... highlightManipulators(x, y); } - + // Patch up textures, if possible. LLSelectMgr::getInstance()->adjustTexturesByScale(FALSE, getStretchTextures()); @@ -460,7 +460,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) LLMatrix4 projMatrix = LLViewerCamera::getInstance()->getProjection(); LLMatrix4 modelView = LLViewerCamera::getInstance()->getModelview(); transform.initAll(LLVector3(1.f, 1.f, 1.f), bbox.getRotation(), bbox.getPositionAgent()); - + transform *= modelView; transform *= projMatrix; } @@ -479,7 +479,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], min.mV[VY], max.mV[VZ], 1.f); mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], min.mV[VZ], 1.f); mManipulatorVertices[numManips++] = LLVector4(max.mV[VX], max.mV[VY], max.mV[VZ], 1.f); - + // 1-D highlights are applicable iff one object is selected if( mObjectSelection->getObjectCount() == 1 ) { @@ -494,13 +494,13 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) for_each(mProjectedManipulators.begin(), mProjectedManipulators.end(), DeletePointer()); mProjectedManipulators.clear(); - + for (S32 i = 0; i < numManips; i++) { LLVector4 projectedVertex = mManipulatorVertices[i] * transform; projectedVertex = projectedVertex * (1.f / projectedVertex.mV[VW]); - ManipulatorHandle* projManipulator = new ManipulatorHandle(LLVector3(projectedVertex.mV[VX], projectedVertex.mV[VY], + ManipulatorHandle* projManipulator = new ManipulatorHandle(LLVector3(projectedVertex.mV[VX], projectedVertex.mV[VY], projectedVertex.mV[VZ]), MANIPULATOR_IDS[i], (i < 7) ? SCALE_MANIP_CORNER : SCALE_MANIP_FACE); mProjectedManipulators.insert(projManipulator); } @@ -514,13 +514,13 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) mHighlightedPart = LL_NO_PART; - for (minpulator_list_t::iterator iter = mProjectedManipulators.begin(); + for (manipulator_list_t::iterator iter = mProjectedManipulators.begin(); iter != mProjectedManipulators.end(); ++iter) { ManipulatorHandle* manipulator = *iter; { - manip2d.setVec(manipulator->mPosition.mV[VX] * half_width, manipulator->mPosition.mV[VY] * half_height); - + manip2d.set(manipulator->mPosition.mV[VX] * half_width, manipulator->mPosition.mV[VY] * half_height); + delta = manip2d - mousePos; if (delta.magVecSquared() < MAX_MANIP_SELECT_DISTANCE_SQUARED) { @@ -551,7 +551,7 @@ void LLManipScale::highlightManipulators(S32 x, S32 y) void LLManipScale::renderFaces( const LLBBox& bbox ) { - // Don't bother to render the drag handles for 1-D scaling if + // Don't bother to render the drag handles for 1-D scaling if // more than one object is selected or if it is an attachment if ( mObjectSelection->getObjectCount() > 1 ) { @@ -604,7 +604,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) { gGL.color4fv( default_normal_color.mV ); LLGLDepthTest gls_depth(GL_FALSE); - gGL.begin(LLRender::QUADS); + gGL.begin(LLRender::QUADS); { // Face 0 gGL.vertex3f(min.mV[VX], max.mV[VY], max.mV[VZ]); @@ -647,9 +647,9 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) // Find nearest vertex LLVector3 orientWRTHead = bbox.agentToLocalBasis( bbox.getCenterAgent() - gAgentCamera.getCameraPositionAgent() ); - U32 nearest = - (orientWRTHead.mV[0] < 0.0f ? 1 : 0) + - (orientWRTHead.mV[1] < 0.0f ? 2 : 0) + + U32 nearest = + (orientWRTHead.mV[0] < 0.0f ? 1 : 0) + + (orientWRTHead.mV[1] < 0.0f ? 2 : 0) + (orientWRTHead.mV[2] < 0.0f ? 4 : 0); // opposite faces on Linden cubes: @@ -658,7 +658,7 @@ void LLManipScale::renderFaces( const LLBBox& bbox ) // 2 & 4 // Table of order to draw faces, based on nearest vertex - static U32 face_list[8][6] = { + static U32 face_list[8][6] = { { 2,0,1, 4,5,3 }, // v6 F201 F453 { 2,0,3, 4,5,1 }, // v7 F203 F451 { 4,0,1, 2,5,3 }, // v5 F401 F253 @@ -725,7 +725,7 @@ void LLManipScale::renderEdges( const LLBBox& bbox ) { gGL.translatef( center_to_edge.mV[0], center_to_edge.mV[1], center_to_edge.mV[2] ); conditionalHighlight( part ); - gGL.scalef( + gGL.scalef( direction.mV[0] ? edge_width : extent.mV[VX], direction.mV[1] ? edge_width : extent.mV[VY], direction.mV[2] ? edge_width : extent.mV[VZ] ); @@ -793,7 +793,7 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en gGL.pushMatrix(); { gGL.translatef( pos.mV[VX], pos.mV[VY], pos.mV[VZ] ); - gGL.scalef( + gGL.scalef( mBoxHandleSize + llabs(delta.mV[VX]), mBoxHandleSize + llabs(delta.mV[VY]), mBoxHandleSize + llabs(delta.mV[VZ])); @@ -810,18 +810,18 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en void LLManipScale::drag( S32 x, S32 y ) { - if( (LL_FACE_MIN <= (S32)mManipPart) + if( (LL_FACE_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_FACE_MAX) ) { dragFace( x, y ); } else - if( (LL_CORNER_MIN <= (S32)mManipPart) + if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { dragCorner( x, y ); } - + // store changes to override updates for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); iter != LLSelectMgr::getInstance()->getSelection()->end(); iter++) @@ -842,7 +842,7 @@ void LLManipScale::drag( S32 x, S32 y ) gAgentCamera.clearFocusObject(); } -// Scale around the +// Scale around the void LLManipScale::dragCorner( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. @@ -857,11 +857,11 @@ void LLManipScale::dragCorner( S32 x, S32 y ) LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(mDragStartCenterGlobal); LLVector3d drag_start_dir_d; - drag_start_dir_d.setVec(mDragStartPointGlobal - mDragStartCenterGlobal); + drag_start_dir_d.set(mDragStartPointGlobal - mDragStartCenterGlobal); F32 s = 0; F32 t = 0; - nearestPointOnLineFromMouse(x, y, + nearestPointOnLineFromMouse(x, y, drag_start_center_agent, drag_start_point_agent, s, t ); @@ -872,7 +872,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } mDragPointGlobal = lerp(mDragStartCenterGlobal, mDragStartPointGlobal, t); - LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); + LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); F32 scale_factor = 1.f; F32 max_scale = partToMaxScale(mManipPart, bbox); F32 min_scale = partToMinScale(mManipPart, bbox); @@ -893,7 +893,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) BOOL snap_enabled = gSavedSettings.getBOOL("SnapEnabled"); if (snap_enabled && (mouse_on_plane1 - projected_drag_pos1) * mSnapGuideDir1 > mSnapRegimeOffset) { - F32 drag_dist = projected_drag_pos1.length(); + F32 drag_dist = mScaleDir * projected_drag_pos1; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug. F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos1, mScaleDir, mScaleSnapUnit1, mTickPixelSpacing1), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit1 / (2.f * cur_subdivisions); @@ -902,7 +902,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); mScaleSnappedValue /= mScaleSnapUnit1 * 2.f; - mInSnapRegime = TRUE; + mSnapRegime = SNAP_REGIME_UPPER; if (!uniform) { @@ -911,7 +911,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } else if (snap_enabled && (mouse_on_plane2 - projected_drag_pos2) * mSnapGuideDir2 > mSnapRegimeOffset ) { - F32 drag_dist = projected_drag_pos2.length(); + F32 drag_dist = mScaleDir * projected_drag_pos2; // Projecting the drag position allows for negative results, vs using the length which will result in a "reverse scaling" bug. F32 cur_subdivisions = llclamp(getSubdivisionLevel(mScaleCenter + projected_drag_pos2, mScaleDir, mScaleSnapUnit2, mTickPixelSpacing2), sGridMinSubdivisionLevel, sGridMaxSubdivisionLevel); F32 snap_dist = mScaleSnapUnit2 / (2.f * cur_subdivisions); @@ -920,16 +920,16 @@ void LLManipScale::dragCorner( S32 x, S32 y ) mScaleSnappedValue = llclamp((drag_dist - (relative_snap_dist - snap_dist)), min_scale, max_scale); scale_factor = mScaleSnappedValue / dist_vec(drag_start_point_agent, drag_start_center_agent); mScaleSnappedValue /= mScaleSnapUnit2 * 2.f; - mInSnapRegime = TRUE; + mSnapRegime = SNAP_REGIME_LOWER; if (!uniform) { scale_factor *= 0.5f; } } - else + else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; scale_factor = t; if (!uniform) { @@ -979,7 +979,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { const LLVector3& scale = selectNode->mSavedScale; cur->setScale( scale_factor * scale ); - + LLVector3 delta_pos; LLVector3 original_pos = cur->getPositionEdit(); LLVector3d new_pos_global = drag_global + (selectNode->mSavedPositionGlobal - drag_global) * scale_factor; @@ -989,7 +989,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } cur->setPositionAbsoluteGlobal( new_pos_global ); rebuild(cur); - + delta_pos = cur->getPositionEdit() - original_pos; if (selectNode->mIndividualSelection) @@ -1030,7 +1030,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { const LLVector3& scale = selectNode->mSavedScale; cur->setScale( scale_factor * scale, FALSE ); - + if (!selectNode->mIndividualSelection) { cur->setPosition(selectNode->mSavedPositionLocal * scale_factor); @@ -1039,16 +1039,14 @@ void LLManipScale::dragCorner( S32 x, S32 y ) rebuild(cur); } } - } - + void LLManipScale::dragFace( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. if (x == mLastMouseX && y == mLastMouseY) { - // sendUpdates(TRUE,TRUE,FALSE); return; } @@ -1061,9 +1059,9 @@ void LLManipScale::dragFace( S32 x, S32 y ) LLVector3 drag_start_center_agent = gAgent.getPosAgentFromGlobal(drag_start_center_global); LLVector3d drag_start_dir_d; - drag_start_dir_d.setVec(drag_start_point_global - drag_start_center_global); + drag_start_dir_d.set(drag_start_point_global - drag_start_center_global); LLVector3 drag_start_dir_f; - drag_start_dir_f.setVec(drag_start_dir_d); + drag_start_dir_f.set(drag_start_dir_d); LLBBox bbox = LLSelectMgr::getInstance()->getBBoxOfSelection(); @@ -1107,21 +1105,21 @@ void LLManipScale::dragFace( S32 x, S32 y ) if (snap_enabled && dist_from_scale_line > mSnapRegimeOffset) { - mInSnapRegime = TRUE; + mSnapRegime = SNAP_REGIME_UPPER | SNAP_REGIME_LOWER; // A face drag doesn't have split regimes. if (dist_along_scale_line > max_drag_dist) { mScaleSnappedValue = max_drag_dist; LLVector3 clamp_point = mScaleCenter + max_drag_dist * mScaleDir; - drag_delta.setVec(clamp_point - drag_start_point_agent); + drag_delta.set(clamp_point - drag_start_point_agent); } else if (dist_along_scale_line < min_drag_dist) { mScaleSnappedValue = min_drag_dist; LLVector3 clamp_point = mScaleCenter + min_drag_dist * mScaleDir; - drag_delta.setVec(clamp_point - drag_start_point_agent); + drag_delta.set(clamp_point - drag_start_point_agent); } else { @@ -1154,9 +1152,9 @@ void LLManipScale::dragFace( S32 x, S32 y ) } } } - else + else { - mInSnapRegime = FALSE; + mSnapRegime = SNAP_REGIME_NONE; } LLVector3 dir_agent; @@ -1172,7 +1170,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) { dir_agent = bbox.localToAgentBasis( LLVector3::z_axis ); } - stretchFace( + stretchFace( projected_vec(drag_start_dir_f, dir_agent) + drag_start_center_agent, projected_vec(drag_delta, dir_agent)); @@ -1191,7 +1189,7 @@ void LLManipScale::sendUpdates( BOOL send_position_update, BOOL send_scale_updat U32 update_flags = UPD_NONE; if (send_position_update) update_flags |= UPD_POSITION; if (send_scale_update) update_flags |= UPD_SCALE; - + // BOOL send_type = SEND_INDIVIDUALS; if (corner) { @@ -1239,7 +1237,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto S32 axis_index = axis.mV[0] ? 0 : (axis.mV[1] ? 1 : 2 ); LLVector3 delta_local = end_local - start_local; - F32 delta_local_mag = delta_local.magVec(); + F32 delta_local_mag = delta_local.length(); LLVector3 dir_local; if (delta_local_mag == 0.f) { @@ -1259,13 +1257,13 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto LLVector3 scale = cur->getScale(); scale.mV[axis_index] = desired_scale; cur->setScale(scale, FALSE); - rebuild(cur); + rebuild(cur); LLVector3 delta_pos; if( !getUniform() ) { LLVector3 delta_pos_local = axis * (0.5f * desired_delta_size); LLVector3d delta_pos_global; - delta_pos_global.setVec(cur_bbox.localToAgent( delta_pos_local ) - cur_bbox.getCenterAgent()); + delta_pos_global.set(cur_bbox.localToAgent( delta_pos_local ) - cur_bbox.getCenterAgent()); LLVector3 cur_pos = cur->getPositionEdit(); if (cur->isRootEdit() && !cur->isAttachment()) @@ -1314,7 +1312,7 @@ void LLManipScale::stretchFace( const LLVector3& drag_start_agent, const LLVecto void LLManipScale::renderGuidelinesPart( const LLBBox& bbox ) { LLVector3 guideline_start = bbox.getCenterLocal(); - + LLVector3 guideline_end = unitVectorToLocalBBoxExtent( partToUnitVector( mManipPart ), bbox ); if (!getUniform()) @@ -1364,7 +1362,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) F32 snap_guide_length; if (mObjectSelection->getSelectType() == SELECT_TYPE_HUD) { - cam_at_axis.setVec(1.f, 0.f, 0.f); + cam_at_axis.set(1.f, 0.f, 0.f); snap_guide_length = SNAP_GUIDE_SCREEN_LENGTH / gAgentCamera.mHUDCurZoom; } else @@ -1373,7 +1371,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) F32 manipulator_distance = dist_vec(box_corner_agent, LLViewerCamera::getInstance()->getOrigin()); snap_guide_length = (SNAP_GUIDE_SCREEN_LENGTH * gViewerWindow->getWorldViewWidthRaw() * manipulator_distance) / LLViewerCamera::getInstance()->getPixelMeterRatio(); } - + mSnapGuideLength = snap_guide_length / llmax(0.1f, (llmin(mSnapGuideDir1 * cam_at_axis, mSnapGuideDir2 * cam_at_axis))); LLVector3 off_axis_dir = mScaleDir % cam_at_axis; @@ -1397,7 +1395,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) } LLVector3 scale_snap = grid_scale; - mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).magVec(); + mScaleSnapUnit1 = scale_snap.scaleVec(partToUnitVector( mManipPart )).length(); mScaleSnapUnit2 = mScaleSnapUnit1; mSnapGuideDir1 *= mSnapGuideDir1 * LLViewerCamera::getInstance()->getUpAxis() > 0.f ? 1.f : -1.f; mSnapGuideDir2 = mSnapGuideDir1 * -1.f; @@ -1421,28 +1419,28 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) switch (mManipPart) { case LL_CORNER_NNN: - axis_flip.setVec(1.f, 1.f, 1.f); + axis_flip.set(1.f, 1.f, 1.f); break; case LL_CORNER_NNP: - axis_flip.setVec(1.f, 1.f, -1.f); + axis_flip.set(1.f, 1.f, -1.f); break; case LL_CORNER_NPN: - axis_flip.setVec(1.f, -1.f, 1.f); + axis_flip.set(1.f, -1.f, 1.f); break; case LL_CORNER_NPP: - axis_flip.setVec(1.f, -1.f, -1.f); + axis_flip.set(1.f, -1.f, -1.f); break; case LL_CORNER_PNN: - axis_flip.setVec(-1.f, 1.f, 1.f); + axis_flip.set(-1.f, 1.f, 1.f); break; case LL_CORNER_PNP: - axis_flip.setVec(-1.f, 1.f, -1.f); + axis_flip.set(-1.f, 1.f, -1.f); break; case LL_CORNER_PPN: - axis_flip.setVec(-1.f, -1.f, 1.f); + axis_flip.set(-1.f, -1.f, 1.f); break; case LL_CORNER_PPP: - axis_flip.setVec(-1.f, -1.f, -1.f); + axis_flip.set(-1.f, -1.f, -1.f); break; default: break; @@ -1515,7 +1513,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mSnapGuideDir1 = LLVector3::y_axis.scaledVec(axis_flip); mScaleSnapUnit1 = grid_scale.mV[VZ]; mSnapGuideDir2 = LLVector3::z_axis.scaledVec(axis_flip); - mScaleSnapUnit2 = grid_scale.mV[VY]; + mScaleSnapUnit2 = grid_scale.mV[VY]; break; case VY: // y axis facing being scaled, use x and z for snap guides @@ -1532,10 +1530,10 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mScaleSnapUnit2 = grid_scale.mV[VX]; break; default: - mSnapGuideDir1.zeroVec(); + mSnapGuideDir1.setZero(); mScaleSnapUnit1 = 0.f; - mSnapGuideDir2.zeroVec(); + mSnapGuideDir2.setZero(); mScaleSnapUnit2 = 0.f; break; } @@ -1550,7 +1548,7 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox) mScalePlaneNormal1.normalize(); mScalePlaneNormal2 = mSnapGuideDir2 % mScaleDir; - mScalePlaneNormal2.normalize(); + mScalePlaneNormal2.normalize(); mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir); mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir); @@ -1588,7 +1586,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector3 line_mid = mScaleCenter + (mScaleSnappedValue * mScaleDir) + (mSnapGuideDir1 * mSnapRegimeOffset); LLVector3 line_start = line_mid - (mScaleDir * (llmin(mScaleSnappedValue, mSnapGuideLength * 0.5f))); LLVector3 line_end = line_mid + (mScaleDir * llmin(max_point_on_scale_line - mScaleSnappedValue, mSnapGuideLength * 0.5f)); - + gGL.color4f(tick_color.mV[VRED], tick_color.mV[VGREEN], tick_color.mV[VBLUE], tick_color.mV[VALPHA] * 0.1f); gGL.vertex3fv(line_start.mV); gGL.color4fv(tick_color.mV); @@ -1613,13 +1611,16 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLGLDepthTest gls_depth(GL_FALSE); F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); - + F32 smallest_subdivision1 = mScaleSnapUnit1 / sGridMaxSubdivisionLevel; F32 smallest_subdivision2 = mScaleSnapUnit2 / sGridMaxSubdivisionLevel; - + + F32 dist_scale_units_1 = dist_grid_axis / smallest_subdivision1; + F32 dist_scale_units_2 = dist_grid_axis / smallest_subdivision2; + // find distance to nearest smallest grid unit - F32 grid_multiple1 = llfloor(dist_grid_axis / smallest_subdivision1); - F32 grid_multiple2 = llfloor(dist_grid_axis / smallest_subdivision2); + F32 grid_multiple1 = llfloor(dist_scale_units_1); + F32 grid_multiple2 = llfloor(dist_scale_units_2); F32 grid_offset1 = fmodf(dist_grid_axis, smallest_subdivision1); F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2); @@ -1629,8 +1630,6 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision1)); S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision2)); - F32 dist_scale_units_1 = dist_grid_axis / smallest_subdivision1; - F32 dist_scale_units_2 = dist_grid_axis / smallest_subdivision2; S32 ticks_from_scale_center_1 = lltrunc(dist_scale_units_1); S32 ticks_from_scale_center_2 = lltrunc(dist_scale_units_2); S32 max_ticks1 = llceil(max_point_on_scale_line / smallest_subdivision1 - dist_scale_units_1); @@ -1638,7 +1637,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) S32 start_tick = 0; S32 stop_tick = 0; - if (mInSnapRegime) + if (mSnapRegime != SNAP_REGIME_NONE) { // draw snap guide line gGL.begin(LLRender::LINES); @@ -1677,7 +1676,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } gGL.end(); } - + LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis())); screen_translate_axis.normalize(); @@ -1791,12 +1790,13 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } else { - tick_value = (grid_multiple1 + i) / (2.f * max_subdivisions); + tick_value = (grid_multiple1 + i) / (2.f * sGridMaxSubdivisionLevel); } F32 text_highlight = 0.8f; - if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) + // Highlight this text if the tick value matches the snapped to value, and if either the second set of ticks isn't going to be shown or cursor is in the first snap regime. + if (is_approx_equal(tick_value, mScaleSnappedValue) && (mScaleSnapUnit2 == mScaleSnapUnit1 || (mSnapRegime & SNAP_REGIME_UPPER))) { text_highlight = 1.f; } @@ -1840,10 +1840,9 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) tick_value = (grid_multiple2 + i) / (2.f * sGridMaxSubdivisionLevel); } - F32 text_highlight = 0.8f; - if (is_approx_equal(tick_value, mScaleSnappedValue) && mInSnapRegime) + if (is_approx_equal(tick_value, mScaleSnappedValue) && (mSnapRegime & SNAP_REGIME_LOWER)) { text_highlight = 1.f; } @@ -1889,17 +1888,15 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) // Returns unit vector in direction of part of an origin-centered cube LLVector3 LLManipScale::partToUnitVector( S32 part ) const { - if( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ) + if ( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ) { return faceToUnitVector( part ); } - else - if( (LL_CORNER_MIN <= part) && (part <= LL_CORNER_MAX) ) + else if ( (LL_CORNER_MIN <= part) && (part <= LL_CORNER_MAX) ) { return cornerToUnitVector( part ); } - else - if( (LL_EDGE_MIN <= part) && (part <= LL_EDGE_MAX ) ) + else if ( (LL_EDGE_MIN <= part) && (part <= LL_EDGE_MAX ) ) { return edgeToUnitVector( part ); } @@ -1911,27 +1908,32 @@ LLVector3 LLManipScale::partToUnitVector( S32 part ) const LLVector3 LLManipScale::faceToUnitVector( S32 part ) const { llassert( (LL_FACE_MIN <= part) && (part <= LL_FACE_MAX) ); + LLVector3 vec; switch( part ) { case LL_FACE_POSX: - return LLVector3( 1.f, 0.f, 0.f ); - + vec.set( 1.f, 0.f, 0.f ); + break; case LL_FACE_NEGX: - return LLVector3( -1.f, 0.f, 0.f ); - + vec.set( -1.f, 0.f, 0.f ); + break; case LL_FACE_POSY: - return LLVector3( 0.f, 1.f, 0.f ); - + vec.set( 0.f, 1.f, 0.f ); + break; case LL_FACE_NEGY: - return LLVector3( 0.f, -1.f, 0.f ); - + vec.set( 0.f, -1.f, 0.f ); + break; case LL_FACE_POSZ: - return LLVector3( 0.f, 0.f, 1.f ); - + vec.set( 0.f, 0.f, 1.f ); + break; case LL_FACE_NEGZ: - return LLVector3( 0.f, 0.f, -1.f ); + vec.set( 0.f, 0.f, -1.f ); + break; + default: + vec.clear(); } - return LLVector3(); + + return vec; } @@ -1943,31 +1945,31 @@ LLVector3 LLManipScale::cornerToUnitVector( S32 part ) const switch(part) { case LL_CORNER_NNN: - vec.setVec(-OO_SQRT3, -OO_SQRT3, -OO_SQRT3); + vec.set(-OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; - case LL_CORNER_NNP: - vec.setVec(-OO_SQRT3, -OO_SQRT3, OO_SQRT3); + case LL_CORNER_NNP: + vec.set(-OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_NPN: - vec.setVec(-OO_SQRT3, OO_SQRT3, -OO_SQRT3); + vec.set(-OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_NPP: - vec.setVec(-OO_SQRT3, OO_SQRT3, OO_SQRT3); + vec.set(-OO_SQRT3, OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PNN: - vec.setVec(OO_SQRT3, -OO_SQRT3, -OO_SQRT3); + vec.set(OO_SQRT3, -OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PNP: - vec.setVec(OO_SQRT3, -OO_SQRT3, OO_SQRT3); + vec.set(OO_SQRT3, -OO_SQRT3, OO_SQRT3); break; case LL_CORNER_PPN: - vec.setVec(OO_SQRT3, OO_SQRT3, -OO_SQRT3); + vec.set(OO_SQRT3, OO_SQRT3, -OO_SQRT3); break; case LL_CORNER_PPP: - vec.setVec(OO_SQRT3, OO_SQRT3, OO_SQRT3); + vec.set(OO_SQRT3, OO_SQRT3, OO_SQRT3); break; default: - vec.clearVec(); + vec.clear(); } return vec; @@ -1994,8 +1996,8 @@ LLVector3 LLManipScale::unitVectorToLocalBBoxExtent( const LLVector3& v, const L LLVector3 ctr = bbox.getCenterLocal(); return LLVector3( - v.mV[0] ? (v.mV[0]>0 ? max.mV[0] : min.mV[0] ) : ctr.mV[0], - v.mV[1] ? (v.mV[1]>0 ? max.mV[1] : min.mV[1] ) : ctr.mV[1], + v.mV[0] ? (v.mV[0]>0 ? max.mV[0] : min.mV[0] ) : ctr.mV[0], + v.mV[1] ? (v.mV[1]>0 ? max.mV[1] : min.mV[1] ) : ctr.mV[1], v.mV[2] ? (v.mV[2]>0 ? max.mV[2] : min.mV[2] ) : ctr.mV[2] ); } @@ -2013,7 +2015,7 @@ F32 LLManipScale::partToMaxScale( S32 part, const LLBBox &bbox ) const max_extent = bbox_extents.mV[i]; } } - max_scale_factor = bbox_extents.magVec() * get_default_max_prim_scale() / max_extent; + max_scale_factor = bbox_extents.length() * get_default_max_prim_scale() / max_extent; if (getUniform()) { @@ -2036,7 +2038,7 @@ F32 LLManipScale::partToMinScale( S32 part, const LLBBox &bbox ) const min_extent = bbox_extents.mV[i]; } } - F32 min_scale_factor = bbox_extents.magVec() * MIN_PRIM_SCALE / min_extent; + F32 min_scale_factor = bbox_extents.length() * MIN_PRIM_SCALE / min_extent; if (getUniform()) { @@ -2087,7 +2089,7 @@ LLVector3 LLManipScale::nearestAxis( const LLVector3& v ) const // virtual BOOL LLManipScale::canAffectSelection() { - // An selection is scalable if you are allowed to both edit and move + // An selection is scalable if you are allowed to both edit and move // everything in it, and it does not have any sitting agents BOOL can_scale = mObjectSelection->getObjectCount() != 0; if (can_scale) diff --git a/indra/newview/llmanipscale.h b/indra/newview/llmanipscale.h index 2874c5dcd5..e1da7a1bb5 100755 --- a/indra/newview/llmanipscale.h +++ b/indra/newview/llmanipscale.h @@ -51,6 +51,13 @@ typedef enum e_scale_manipulator_type SCALE_MANIP_FACE } EScaleManipulatorType; +typedef enum e_snap_regimes +{ + SNAP_REGIME_NONE = 0, //!< The cursor is not in either of the snap regimes. + SNAP_REGIME_UPPER = 0x1, //!< The cursor is, non-exclusively, in the first of the snap regimes. Prefer to treat as bitmask. + SNAP_REGIME_LOWER = 0x2 //!< The cursor is, non-exclusively, in the second of the snap regimes. Prefer to treat as bitmask. +} ESnapRegimes; + class LLManipScale : public LLManip { @@ -96,7 +103,7 @@ private: void renderSnapGuides( const LLBBox& local_bbox ); void revert(); - + inline void conditionalHighlight( U32 part, const LLColor4* highlight = NULL, const LLColor4* normal = NULL ); void drag( S32 x, S32 y ); @@ -135,35 +142,35 @@ private: }; - F32 mBoxHandleSize; // The size of the handles at the corners of the bounding box - F32 mScaledBoxHandleSize; // handle size after scaling for selection feedback + F32 mBoxHandleSize; //!< The size of the handles at the corners of the bounding box. + F32 mScaledBoxHandleSize; //!< Handle size after scaling for selection feedback. LLVector3d mDragStartPointGlobal; - LLVector3d mDragStartCenterGlobal; // The center of the bounding box of all selected objects at time of drag start + LLVector3d mDragStartCenterGlobal; //!< The center of the bounding box of all selected objects at time of drag start. LLVector3d mDragPointGlobal; LLVector3d mDragFarHitGlobal; S32 mLastMouseX; S32 mLastMouseY; BOOL mSendUpdateOnMouseUp; U32 mLastUpdateFlags; - typedef std::set minpulator_list_t; - minpulator_list_t mProjectedManipulators; + typedef std::set manipulator_list_t; + manipulator_list_t mProjectedManipulators; LLVector4 mManipulatorVertices[14]; - F32 mScaleSnapUnit1; //!< Size of snap multiples for axis 1. - F32 mScaleSnapUnit2; //!< Size of snap multiples for axis 2. + F32 mScaleSnapUnit1; //!< Size of snap multiples for the upper scale. + F32 mScaleSnapUnit2; //!< Size of snap multiples for the lower scale. LLVector3 mScalePlaneNormal1; //!< Normal of plane in which scale occurs that most faces camera. LLVector3 mScalePlaneNormal2; //!< Normal of plane in which scale occurs that most faces camera. - LLVector3 mSnapGuideDir1; - LLVector3 mSnapGuideDir2; - LLVector3 mSnapDir1; - LLVector3 mSnapDir2; - F32 mSnapRegimeOffset; - F32 mTickPixelSpacing1; - F32 mTickPixelSpacing2; + LLVector3 mSnapGuideDir1; //!< The direction in which the upper snap guide tick marks face. + LLVector3 mSnapGuideDir2; //!< The direction in which the lower snap guide tick marks face. + LLVector3 mSnapDir1; //!< The direction in which the upper snap guides face. + LLVector3 mSnapDir2; //!< The direction in which the lower snap guides face. + F32 mSnapRegimeOffset; //!< How far off the scale axis centerline the mouse can be before it exits/enters the snap regime. + F32 mTickPixelSpacing1; //!< The pixel spacing between snap guide tick marks for the upper scale. + F32 mTickPixelSpacing2; //!< The pixel spacing between snap guide tick marks for the lower scale. F32 mSnapGuideLength; - LLVector3 mScaleCenter; + LLVector3 mScaleCenter; //!< The location of the origin of the scaling operation. LLVector3 mScaleDir; //!< The direction of the scaling action. In face-dragging this is aligned with one of the cardinal axis relative to the prim, but in corner-dragging this is along the diagonal. F32 mScaleSnappedValue; //!< The distance of the current position nearest the mouse location, measured along mScaleDir. Is measured either from the center or from the far face/corner depending upon whether uniform scaling is true or false respectively. - BOOL mInSnapRegime; + ESnapRegimes mSnapRegime; // Date: Sun, 2 Mar 2014 16:48:25 -0800 Subject: Better code documentation. --- indra/newview/llmanipscale.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 23cbc580f6..26ebf06d49 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -807,7 +807,7 @@ void LLManipScale::renderAxisHandle( const LLVector3& start, const LLVector3& en } } - +// General scale call void LLManipScale::drag( S32 x, S32 y ) { if( (LL_FACE_MIN <= (S32)mManipPart) @@ -815,8 +815,7 @@ void LLManipScale::drag( S32 x, S32 y ) { dragFace( x, y ); } - else - if( (LL_CORNER_MIN <= (S32)mManipPart) + else if( (LL_CORNER_MIN <= (S32)mManipPart) && ((S32)mManipPart <= LL_CORNER_MAX) ) { dragCorner( x, y ); @@ -842,7 +841,7 @@ void LLManipScale::drag( S32 x, S32 y ) gAgentCamera.clearFocusObject(); } -// Scale around the +// Scale on three axis simultaneously void LLManipScale::dragCorner( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. @@ -850,6 +849,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) { return; } + mLastMouseX = x; mLastMouseY = y; @@ -861,6 +861,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) F32 s = 0; F32 t = 0; + nearestPointOnLineFromMouse(x, y, drag_start_center_agent, drag_start_point_agent, @@ -1041,7 +1042,7 @@ void LLManipScale::dragCorner( S32 x, S32 y ) } } - +// Scale on a single axis void LLManipScale::dragFace( S32 x, S32 y ) { // Suppress scale if mouse hasn't moved. @@ -1755,7 +1756,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) gGL.end(); } - // render tick labels + // render upper tick labels start_tick = -(llmin(ticks_from_scale_center_1, num_ticks_per_side1)); stop_tick = llmin(max_ticks1, num_ticks_per_side1); @@ -1805,7 +1806,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) } } - // label ticks on opposite side + // label ticks on opposite side, only can happen in scaling modes that effect more than one axis and when the object's axis don't have the same scale. A differing scale indicates both conditions. if (mScaleSnapUnit2 != mScaleSnapUnit1) { start_tick = -(llmin(ticks_from_scale_center_2, num_ticks_per_side2)); -- cgit v1.2.3 From 3e09cdefff9bc58c193dca4b08e97d59fa008838 Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Sun, 2 Mar 2014 22:06:24 -0800 Subject: Fixed compile-time errors. My bad. Serves me right for not waiting through the compile! --- indra/llmath/v3dmath.h | 65 +++++++++++++++++++++++++++++++++++------- indra/newview/llmanipscale.cpp | 2 +- 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/indra/llmath/v3dmath.h b/indra/llmath/v3dmath.h index cab4c93a9f..4938273d5b 100755 --- a/indra/llmath/v3dmath.h +++ b/indra/llmath/v3dmath.h @@ -72,17 +72,22 @@ class LLVector3d BOOL clamp(const F64 min, const F64 max); // Clamps all values to (min,max), returns TRUE if data changed BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed - inline const LLVector3d& clearVec(); // Clears LLVector3d to (0, 0, 0, 1) + inline const LLVector3d& clear(); // Clears LLVector3d to (0, 0, 0, 1) + inline const LLVector3d& clearVec(); // deprecated inline const LLVector3d& setZero(); // Zero LLVector3d to (0, 0, 0, 0) inline const LLVector3d& zeroVec(); // deprecated - inline const LLVector3d& setVec(const F64 x, const F64 y, const F64 z); // Sets LLVector3d to (x, y, z, 1) - inline const LLVector3d& setVec(const LLVector3d &vec); // Sets LLVector3d to vec - inline const LLVector3d& setVec(const F64 *vec); // Sets LLVector3d to vec - inline const LLVector3d& setVec(const LLVector3 &vec); - - F64 magVec() const; // Returns magnitude of LLVector3d - F64 magVecSquared() const; // Returns magnitude squared of LLVector3d - inline F64 normVec(); // Normalizes and returns the magnitude of LLVector3d + inline const LLVector3d& set(const F64 x, const F64 y, const F64 z); // Sets LLVector3d to (x, y, z, 1) + inline const LLVector3d& set(const LLVector3d &vec); // Sets LLVector3d to vec + inline const LLVector3d& set(const F64 *vec); // Sets LLVector3d to vec + inline const LLVector3d& set(const LLVector3 &vec); + inline const LLVector3d& setVec(const F64 x, const F64 y, const F64 z); // deprecated + inline const LLVector3d& setVec(const LLVector3d &vec); // deprecated + inline const LLVector3d& setVec(const F64 *vec); // deprecated + inline const LLVector3d& setVec(const LLVector3 &vec); // deprecated + + F64 magVec() const; // deprecated + F64 magVecSquared() const; // deprecated + inline F64 normVec(); // deprecated F64 length() const; // Returns magnitude of LLVector3d F64 lengthSquared() const; // Returns magnitude squared of LLVector3d @@ -127,7 +132,15 @@ class LLVector3d typedef LLVector3d LLGlobalVec; -const LLVector3d &LLVector3d::setVec(const LLVector3 &vec) +inline const LLVector3d &LLVector3d::set(const LLVector3 &vec) +{ + mdV[0] = vec.mV[0]; + mdV[1] = vec.mV[1]; + mdV[2] = vec.mV[2]; + return *this; +} + +inline const LLVector3d &LLVector3d::setVec(const LLVector3 &vec) { mdV[0] = vec.mV[0]; mdV[1] = vec.mV[1]; @@ -184,6 +197,14 @@ inline BOOL LLVector3d::isFinite() const // Clear and Assignment Functions +inline const LLVector3d& LLVector3d::clear(void) +{ + mdV[0] = 0.f; + mdV[1] = 0.f; + mdV[2]= 0.f; + return (*this); +} + inline const LLVector3d& LLVector3d::clearVec(void) { mdV[0] = 0.f; @@ -208,6 +229,30 @@ inline const LLVector3d& LLVector3d::zeroVec(void) return (*this); } +inline const LLVector3d& LLVector3d::set(const F64 x, const F64 y, const F64 z) +{ + mdV[VX] = x; + mdV[VY] = y; + mdV[VZ] = z; + return (*this); +} + +inline const LLVector3d& LLVector3d::set(const LLVector3d &vec) +{ + mdV[0] = vec.mdV[0]; + mdV[1] = vec.mdV[1]; + mdV[2] = vec.mdV[2]; + return (*this); +} + +inline const LLVector3d& LLVector3d::set(const F64 *vec) +{ + mdV[0] = vec[0]; + mdV[1] = vec[1]; + mdV[2] = vec[2]; + return (*this); +} + inline const LLVector3d& LLVector3d::setVec(const F64 x, const F64 y, const F64 z) { mdV[VX] = x; diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 26ebf06d49..a17f615019 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1106,7 +1106,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) if (snap_enabled && dist_from_scale_line > mSnapRegimeOffset) { - mSnapRegime = SNAP_REGIME_UPPER | SNAP_REGIME_LOWER; // A face drag doesn't have split regimes. + mSnapRegime = static_cast(SNAP_REGIME_UPPER | SNAP_REGIME_LOWER); // A face drag doesn't have split regimes. if (dist_along_scale_line > max_drag_dist) { -- cgit v1.2.3 From 100b0f48a9d9aa2883e12ee2c52fc380540711bb Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 3 Mar 2014 20:13:09 +0200 Subject: MAINT-2902 FIXED Browser secure session indicator should be prominent --- indra/newview/llfloaterwebcontent.cpp | 16 +++++----------- indra/newview/llfloaterwebcontent.h | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 68dbb5ae33..3e9051967c 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -70,8 +70,7 @@ LLFloaterWebContent::LLFloaterWebContent( const Params& params ) mShowPageTitle(params.show_page_title), mAllowNavigation(true), mCurrentURL(""), - mDisplayURL(""), - mSecureURL(false) + mDisplayURL("") { mCommitCallbackRegistrar.add( "WebContent.Back", boost::bind( &LLFloaterWebContent::onClickBack, this )); mCommitCallbackRegistrar.add( "WebContent.Forward", boost::bind( &LLFloaterWebContent::onClickForward, this )); @@ -315,9 +314,6 @@ void LLFloaterWebContent::draw() mBtnBack->setEnabled( mWebBrowser->canNavigateBack() && mAllowNavigation); mBtnForward->setEnabled( mWebBrowser->canNavigateForward() && mAllowNavigation); - // Show/hide the lock icon - mSecureLockIcon->setVisible(mSecureURL && !mAddressCombo->hasFocus()); - LLFloater::draw(); } @@ -362,8 +358,6 @@ void LLFloaterWebContent::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent // we populate the status bar with URLs as they change so clear it now we're done const std::string end_str = ""; mStatusBarText->setText( end_str ); - mAddressCombo->setLeftTextPadding(22); - mAddressCombo->setLeftTextPadding(2); } else if(event == MEDIA_EVENT_CLOSE_REQUEST) { @@ -430,10 +424,10 @@ void LLFloaterWebContent::set_current_url(const std::string& url) static const std::string secure_prefix = std::string("https://"); std::string prefix = mCurrentURL.substr(0, secure_prefix.length()); LLStringUtil::toLower(prefix); - mSecureURL = (prefix == secure_prefix); - - // Hack : we move the text a bit to make space for the lock icon in the secure URL case - mDisplayURL = (mSecureURL ? " " + mCurrentURL : mCurrentURL); + bool secure_url = (prefix == secure_prefix); + mSecureLockIcon->setVisible(secure_url); + mAddressCombo->setLeftTextPadding(secure_url ? 22 : 2); + mDisplayURL = mCurrentURL; // Clean up browsing list (prevent dupes) and add/select the new URL to it mAddressCombo->remove(mCurrentURL); diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index f22940cd07..2206784e37 100755 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -112,7 +112,6 @@ protected: std::string mUUID; bool mShowPageTitle; bool mAllowNavigation; - bool mSecureURL; // true when the current url is prefixed "https://" }; #endif // LL_LLFLOATERWEBCONTENT_H -- cgit v1.2.3 From 840e1da8aa4b019ebf08c8c36c72ac01ad592506 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 3 Mar 2014 14:08:26 -0500 Subject: STORM-2017 Untranslatable text appears when scaling, or moving objects --- doc/contributions.txt | 1 + indra/newview/llmanipscale.cpp | 6 +++--- indra/newview/llmaniptranslate.cpp | 5 +++-- indra/newview/skins/default/xui/en/strings.xml | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 2f9d0c2c86..1f5da24f9c 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -674,6 +674,7 @@ Jonathan Yap OPEN-161 STORM-1953 STORM-1957 + STORM-2017 Kadah Coba STORM-1060 STORM-1843 diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index a17f615019..aa4386508b 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -59,7 +59,7 @@ #include "v2math.h" #include "llvoavatar.h" #include "llmeshrepository.h" - +#include "lltrans.h" const F32 MAX_MANIP_SELECT_DISTANCE_SQUARED = 11.f * 11.f; const F32 SNAP_GUIDE_SCREEN_OFFSET = 0.05f; @@ -1874,11 +1874,11 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) LLVector3 help_text_pos = selection_center_start + (mSnapRegimeOffset * 5.f * offset_dir); const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - std::string help_text = "Move mouse cursor over ruler"; + std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f); hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); - help_text = "to snap to grid"; + help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f; hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 06bf294417..e84207461c 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -61,6 +61,7 @@ #include "llui.h" #include "pipeline.h" #include "llviewershadermgr.h" +#include "lltrans.h" const S32 NUM_AXES = 3; const S32 MOUSE_DRAG_SLOP = 2; // pixels @@ -1441,11 +1442,11 @@ void LLManipTranslate::renderSnapGuides() LLVector3 help_text_pos = selection_center_start + (snap_offset_meters_up * 3.f * mSnapOffsetAxis); const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); - std::string help_text = "Move mouse cursor over ruler"; + std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); - help_text = "to snap to grid"; + help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 7e79d297ef..0efe9ad80a 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -383,6 +383,8 @@ Please try logging in again in a minute. Multiple Use texture + Move mouse cursor over ruler + to snap to grid Loading... -- cgit v1.2.3 From fe2801fc63a428f47b29e151cfb71b4558305ceb Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Mon, 3 Mar 2014 21:50:12 -0800 Subject: STORM-2017: Added translatable help text to rotation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I chose the camera’s up vector to place the help text as it provided a consistent location on the screen for the user to see the text pop up. While doing this I realized that the calls to hud_render_utf8text utilized a condition that was guaranteed to be false based on a surrounding if-statement, and so could trivially be replaced with a constant. Also cleaned out a compiler warning about unused private member variables in llmaniptranslate. I don’t like warnings and useless code. :P --- doc/contributions.txt | 2 ++ indra/newview/llmaniprotate.cpp | 29 +++++++++++++++++++++++++++++ indra/newview/llmanipscale.cpp | 4 ++-- indra/newview/llmaniptranslate.cpp | 6 ++---- indra/newview/llmaniptranslate.h | 2 -- 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 1f5da24f9c..6486291226 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -326,6 +326,8 @@ Cron Stardust VWR-25120 STORM-1075 STORM-1919 + STORM-1920 + STORM-2017 Cypren Christenson STORM-417 Dante Tucker diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp index 4cbdfde868..bd21d04b4a 100755 --- a/indra/newview/llmaniprotate.cpp +++ b/indra/newview/llmaniprotate.cpp @@ -61,6 +61,7 @@ #include "llglheaders.h" #include "lltrans.h" #include "llvoavatarself.h" +#include "llhudrender.h" const F32 RADIUS_PIXELS = 100.f; // size in screen space const F32 SQ_RADIUS = RADIUS_PIXELS * RADIUS_PIXELS; @@ -452,6 +453,9 @@ BOOL LLManipRotate::handleMouseDownOnPart( S32 x, S32 y, MASK mask ) // Route future Mouse messages here preemptively. (Release on mouse up.) setMouseCapture( TRUE ); LLSelectMgr::getInstance()->enableSilhouette(FALSE); + + mHelpTextTimer.reset(); + sNumTimesHelpTextShown++; return TRUE; } @@ -1111,6 +1115,31 @@ void LLManipRotate::renderSnapGuides() } } } + + + // render help text + if (mObjectSelection->getSelectType() != SELECT_TYPE_HUD) + { + if (mHelpTextTimer.getElapsedTimeF32() < sHelpTextVisibleTime + sHelpTextFadeTime && sNumTimesHelpTextShown < sMaxTimesShowHelpText) + { + LLVector3 selection_center_start = LLSelectMgr::getInstance()->getSavedBBoxOfSelection().getCenterAgent(); + + LLVector3 offset_dir = LLViewerCamera::getInstance()->getUpAxis(); + + F32 line_alpha = gSavedSettings.getF32("GridOpacity"); + + LLVector3 help_text_pos = selection_center_start + (mRadiusMeters * 3.f * offset_dir); + const LLFontGL* big_fontp = LLFontGL::getFontSansSerif(); + + std::string help_text = LLTrans::getString("manip_hint1"); + LLColor4 help_text_color = LLColor4::white; + help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + help_text = LLTrans::getString("manip_hint2"); + help_text_pos -= offset_dir * mRadiusMeters * 0.4f; + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); + } + } } // Returns TRUE if center of sphere is visible. Also sets a bunch of member variables that are used later (e.g. mCenterToCam) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index aa4386508b..6c1b25f2b4 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1877,10 +1877,10 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, grid_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapRegimeOffset * 0.4f; - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index e84207461c..d237e5ef44 100755 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -112,7 +112,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) : LLManip( std::string("Move"), composite ), mLastHoverMouseX(-1), mLastHoverMouseY(-1), - mSendUpdateOnMouseUp(FALSE), mMouseOutsideSlop(FALSE), mCopyMadeThisDrag(FALSE), mMouseDownX(-1), @@ -126,7 +125,6 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) mSnapOffsetMeters(0.f), mSubdivisions(10.f), mInSnapRegime(FALSE), - mSnapped(FALSE), mArrowScales(1.f, 1.f, 1.f), mPlaneScales(1.f, 1.f, 1.f), mPlaneManipPositions(1.f, 1.f, 1.f, 1.f) @@ -1445,10 +1443,10 @@ void LLManipTranslate::renderSnapGuides() std::string help_text = LLTrans::getString("manip_hint1"); LLColor4 help_text_color = LLColor4::white; help_text_color.mV[VALPHA] = clamp_rescale(mHelpTextTimer.getElapsedTimeF32(), sHelpTextVisibleTime, sHelpTextVisibleTime + sHelpTextFadeTime, line_alpha, 0.f); - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); help_text = LLTrans::getString("manip_hint2"); help_text_pos -= LLViewerCamera::getInstance()->getUpAxis() * mSnapOffsetMeters * 0.2f; - hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, mObjectSelection->getSelectType() == SELECT_TYPE_HUD); + hud_render_utf8text(help_text, help_text_pos, *big_fontp, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, -0.5f * big_fontp->getWidthF32(help_text), 3.f, help_text_color, false); } } } diff --git a/indra/newview/llmaniptranslate.h b/indra/newview/llmaniptranslate.h index 37567c7bd1..3c37bbd698 100755 --- a/indra/newview/llmaniptranslate.h +++ b/indra/newview/llmaniptranslate.h @@ -85,7 +85,6 @@ protected: private: S32 mLastHoverMouseX; S32 mLastHoverMouseY; - BOOL mSendUpdateOnMouseUp; BOOL mMouseOutsideSlop; // true after mouse goes outside slop region BOOL mCopyMadeThisDrag; S32 mMouseDownX; @@ -107,7 +106,6 @@ private: LLVector3 mGridScale; F32 mSubdivisions; BOOL mInSnapRegime; - BOOL mSnapped; LLVector3 mArrowScales; LLVector3 mPlaneScales; LLVector4 mPlaneManipPositions; -- cgit v1.2.3 From befc0efde94c9b964d6efb32f2cc707f51b986bc Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Tue, 4 Mar 2014 20:59:48 -0800 Subject: STORM-1920 / STORM-2013: Fixed uniform scaling highlighting at half values. Re-utilized the technique Richard put in the corner drag code. --- indra/newview/llmanipscale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 6c1b25f2b4..6dc03d8382 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1139,7 +1139,7 @@ void LLManipScale::dragFace( S32 x, S32 y ) drag_dist - max_drag_dist, drag_dist - min_drag_dist); - mScaleSnappedValue = drag_dist - relative_snap_dist; + mScaleSnappedValue = (drag_dist - relative_snap_dist) / (mScaleSnapUnit1 * 2.f); if (llabs(relative_snap_dist) < snap_dist) { -- cgit v1.2.3 From 65850279964bed111e0d11b99f26867cd46b91b7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 5 Mar 2014 12:25:52 +0200 Subject: fix build problem --- indra/llui/llfolderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 173279fa81..c9ea0c0e1b 100755 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -1192,7 +1192,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) LLFolderViewItem* last_selected = mSelectedItems.back(); BOOL shift_select = mask & MASK_SHIFT; // don't shift select down to children of folders (they are implicitly selected through parent) - LLFolderViewItem* prev = prev = last_selected->getPreviousOpenNode(!shift_select); + LLFolderViewItem* prev = last_selected->getPreviousOpenNode(!shift_select); if (!mKeyboardSelection || (!shift_select && prev == this)) { -- cgit v1.2.3 From e62e7319932448eac55486e218d31048dbd034fc Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 5 Mar 2014 15:15:50 +0200 Subject: MAINT-3698 FIXED Reduce Abuse type options available in the abuse report dialog --- .../skins/default/xui/en/floater_report_abuse.xml | 128 +++------------------ 1 file changed, 16 insertions(+), 112 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index 9561f67941..24f95950d8 100755 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -203,47 +203,15 @@ + value="31" /> - - - - - + value="35" /> - - - + value="39" /> - - - - + value="45" /> + value="50" /> - - - - - + value="55" /> - - - + value="60" /> - + value="61" /> + value="63" /> - - - + value="67" /> Date: Thu, 6 Mar 2014 05:51:49 +0200 Subject: MAINT-3610 FIXED SL viewer partly 'eats' chat-messages --- indra/llui/llchatentry.cpp | 10 +--------- indra/llui/lltexteditor.cpp | 5 +++-- indra/llui/lltexteditor.h | 2 ++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/indra/llui/llchatentry.cpp b/indra/llui/llchatentry.cpp index c04b70eb64..dac001afab 100755 --- a/indra/llui/llchatentry.cpp +++ b/indra/llui/llchatentry.cpp @@ -51,6 +51,7 @@ LLChatEntry::LLChatEntry(const Params& p) mCurrentHistoryLine = mLineHistory.begin(); mAutoIndent = false; + keepSelectionOnReturn(true); } LLChatEntry::~LLChatEntry() @@ -179,15 +180,6 @@ BOOL LLChatEntry::handleSpecialKey(const KEY key, const MASK mask) { BOOL handled = FALSE; - // In the case of a chat entry, pressing RETURN when something is selected - // should NOT erase the selection (unlike a notecard, for example) - if (key == KEY_RETURN) - { - endOfDoc(); - startSelection(); - endSelection(); - } - LLTextEditor::handleSpecialKey(key, mask); switch(key) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 3bac15c5d4..6c4d031907 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -264,7 +264,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mContextMenu(NULL), mShowContextMenu(p.show_context_menu), mEnableTooltipPaste(p.enable_tooltip_paste), - mPassDelete(FALSE) + mPassDelete(FALSE), + mKeepSelectionOnReturn(false) { mSourceID.generate(); @@ -1664,7 +1665,7 @@ BOOL LLTextEditor::handleSpecialKey(const KEY key, const MASK mask) case KEY_RETURN: if (mask == MASK_NONE) { - if( hasSelection() ) + if( hasSelection() && !mKeepSelectionOnReturn ) { deleteSelection(FALSE); } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index d3b7bc0eb7..02a76d2f8a 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -295,6 +295,7 @@ protected: /*virtual*/ void updateSegments(); void updateLinkSegments(); + void keepSelectionOnReturn(bool keep) { mKeepSelectionOnReturn = keep; } private: // @@ -338,6 +339,7 @@ private: bool mParseOnTheFly; bool mEnableTooltipPaste; bool mPassDelete; + bool mKeepSelectionOnReturn; // disabling of removing selected text after pressing of Enter LLUUID mSourceID; -- cgit v1.2.3 From 5067f1eed9f00e93bf287bf0fce69c8212a51ff2 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 6 Mar 2014 13:11:48 +0000 Subject: storm-1831 Converting LLSyntaxIdLSL to a singleton. Adding callback for signalling arrival of Syntax file from capability. --- indra/newview/llsyntaxid.cpp | 15 ++++++++++++++- indra/newview/llsyntaxid.h | 16 +++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 3d63ab93a0..7deb976c2a 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -91,6 +91,8 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) LL_ERRS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL; } + + LLSyntaxIdLSL::sFileFetchedSignal(); } void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) @@ -108,7 +110,6 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; } - //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- @@ -121,6 +122,7 @@ LLSD LLSyntaxIdLSL::sKeywordsXml; bool LLSyntaxIdLSL::sLoaded; bool LLSyntaxIdLSL::sLoadFailed; bool LLSyntaxIdLSL::sVersionChanged; +LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal; /** * @brief LLSyntaxIdLSL constructor @@ -251,6 +253,7 @@ void LLSyntaxIdLSL::fetchKeywordsFile() << LL_ENDL; } + //----------------------------------------------------------------------------- // initialise //----------------------------------------------------------------------------- @@ -413,3 +416,13 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() } sLoadFailed = !sLoaded; } + +boost::signals2::connection LLSyntaxIdLSL::addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb) +{ + return sFileFetchedSignal.connect(cb); +} + +void LLSyntaxIdLSL::removeFileFetchedCallback(boost::signals2::connection callback) +{ + sFileFetchedSignal.disconnect(callback); +} diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 226f1f4941..1b6903f2a2 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -35,6 +35,7 @@ #include "llagent.h" #include "llenvmanager.h" #include "llhttpclient.h" +#include "llsingleton.h" #include "llviewerregion.h" @@ -42,14 +43,15 @@ * @file llsyntaxid.h * @brief Tracks the file needed to decorate the current sim's version of LSL. */ -class LLSyntaxIdLSL +class LLSyntaxIdLSL: public LLSingleton { friend class fetchKeywordsFileResponder; public: + typedef boost::signals2::signal file_fetched_signal_t; -static const std::string CAPABILITY_NAME; -static const std::string FILENAME_DEFAULT; -static const std::string SIMULATOR_FEATURE; + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; protected: //LLViewerRegion* region; @@ -59,6 +61,7 @@ protected: static bool sLoaded; static bool sLoadFailed; static bool sVersionChanged; + static file_fetched_signal_t sFileFetchedSignal; private: std::string mCapabilityName; @@ -73,6 +76,7 @@ private: LLUUID mSyntaxIdNew; + public: LLSyntaxIdLSL(); LLSyntaxIdLSL(std::string filenameDefault, std::string simFeatureName, std::string capabilityName); @@ -93,6 +97,9 @@ public: static bool isSupportedVersion(const LLSD& content); static void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } + boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); + void removeFileFetchedCallback(boost::signals2::connection callback); + protected: std::string buildFileNameNew(); @@ -139,5 +146,4 @@ public: * @param content_ref The LSL syntax file for the sim. */ void cacheFile(const LLSD& content_ref); - }; -- cgit v1.2.3 From 76aa75974f25ffe3837fd5789a00e9dd194903e4 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 6 Mar 2014 13:24:52 +0000 Subject: storm-1831 Changes in postBuild to use onFileFetchedCallback --- indra/newview/llpreviewscript.cpp | 35 ++++++++++++++++++++++++----------- indra/newview/llpreviewscript.h | 1 + 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 904b56b436..0ca4718250 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -407,27 +407,45 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - // Intialise keyword highlighting for the current simulator's version of LSL + mSyntaxIdLSL.addFileFetchedCallback(boost::bind(&LLScriptEdCore::onFileFetchedInitialiseKeywords, this)); + onRegionChangeInitialiseKeywords(); + // Set up a callback for region changes, so that highlighting is updated to the new region's version of LSL - gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); + //gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); return TRUE; } void LLScriptEdCore::onRegionChangeInitialiseKeywords() { + // Intialise keyword highlighting for the current simulator's version of LSL LL_DEBUGS("SyntaxLSL") << "Pre Initialise!" << LL_ENDL; mSyntaxIdLSL.initialise(); LL_DEBUGS("SyntaxLSL") << "Post Initialise!" << LL_ENDL; - // Nasty Hack to get started, needs to replaced with a callback or similar. - if (mSyntaxIdLSL.fetching()) + if (mSyntaxIdLSL.isDifferentVersion()) + { + if (mSyntaxIdLSL.isLoaded()) + { + onFileFetchedInitialiseKeywords(); + } + else + { + LL_INFOS("SyntaxLSL") + << "Hashes are the different, waiting for the syntax file to be retrieved." << LL_ENDL; + } + } + else { - LL_WARNS("SyntaxLSL") << "No Response in Time, still fetching!" << LL_ENDL; + LL_INFOS("SyntaxLSL") + << "Hashes are the same, no need to update highlighter." << LL_ENDL; } +} - if (mSyntaxIdLSL.isDifferentVersion()) +void LLScriptEdCore::onFileFetchedInitialiseKeywords() +{ + if (mSyntaxIdLSL.isLoaded()) { LL_INFOS("SyntaxLSL") << "Hashes are different, updating highlighter." << LL_ENDL; @@ -472,11 +490,6 @@ void LLScriptEdCore::onRegionChangeInitialiseKeywords() } } } - else - { - LL_INFOS("SyntaxLSL") - << "Hashes are the same, no need to update highlighter." << LL_ENDL; - } } void LLScriptEdCore::initMenu() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 2dd5a1b6a7..67a4ca52fa 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -79,6 +79,7 @@ public: void initMenu(); void onRegionChangeInitialiseKeywords(); + void onFileFetchedInitialiseKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From c8b0484034d69aa38afba14e6965f69cf8c8da24 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 6 Mar 2014 14:04:05 +0000 Subject: Removing duplicate entry from colors.xml --- indra/newview/skins/default/colors.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index dfd7b5ee39..cb1d6aa32b 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -919,9 +919,6 @@ name="SyntaxLslConstantInteger" value=".1 .1 .5 1.0" /> - Date: Thu, 6 Mar 2014 09:18:20 -0500 Subject: STORM-68 Adjusted Build->Options menu --- indra/newview/skins/default/xui/en/menu_viewer.xml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index ff022c7d3a..2058e671e5 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1077,13 +1077,6 @@ label="Options" name="Options" tear_off="true"> - - - @@ -1194,8 +1187,9 @@ + + + + Date: Thu, 6 Mar 2014 16:11:59 +0000 Subject: storm-1831: Fixing constants not getting highlighted. Fixing ratation constant treated as string. Adding logging of unrecognised token groups. --- indra/llui/llkeywords.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index c5e8f76a73..6a349f3916 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -197,7 +197,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) { ColourGroup = "SyntaxLslConstantKey"; } - else if (key_in == "constants-string") + else if (key_in == "constants-rotation") { ColourGroup = "SyntaxLslConstantRotation"; } @@ -249,6 +249,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) { ColourGroup = "SyntaxLslComment2Sided"; } + else + { + LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognised!" << LL_ENDL; + } return LLUIColorTable::instance().getColor(ColourGroup); } @@ -334,7 +338,6 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) { if (outerIt->second.isMap()) { - Color = ColorGroup; mAttributes.clear(); LLSD arguments = LLSD (); LLSD::map_iterator innerIt = outerIt->second.beginMap(); @@ -360,7 +363,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) std::string tooltip = ""; if (token_type == LLKeywordToken::TT_CONSTANT) { - Color = getColorGroup(Group + "-" + getAttribute("type")); + ColorGroup = getColorGroup(Group + "-" + getAttribute("type")); tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value"); } else if (token_type == LLKeywordToken::TT_EVENT) -- cgit v1.2.3 From 2d6314f93fb5e7bf5f0494d8f9e746a647daa52b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 7 Mar 2014 12:50:08 -0500 Subject: STORM-2018 Group invite fails to let you join groups when groups maxed even when you leave group --- doc/contributions.txt | 1 + indra/newview/llviewermessage.cpp | 55 ++++++++++++++++++++++++++++++++------- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 89390d9977..78c45125b4 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -691,6 +691,7 @@ Jonathan Yap STORM-1987 STORM-1986 STORM-1981 + STORM-2018 Kadah Coba STORM-1060 STORM-1843 diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 267aa9532c..9d80e0c04c 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -644,25 +644,58 @@ void send_sound_trigger(const LLUUID& sound_id, F32 gain) gAgent.sendMessage(); } +static LLSD sSavedGroupInvite; +static LLSD sSavedResponse; + bool join_group_response(const LLSD& notification, const LLSD& response) { - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); +// A bit of variable saving and restoring is used to deal with the case where your group list is full and you +// receive an invitation to another group. The data from that invitation is stored in the sSaved +// variables. If you then drop a group and click on the Join button the stored data is restored and used +// to join the group. + LLSD notification_adjusted = notification; + LLSD response_adjusted = response; + + std::string action = notification["name"]; + +// Storing all the information by group id allows for the rare case of being at your maximum +// group count and receiving more than one invitation. + std::string id = notification_adjusted["payload"]["group_id"].asString(); + + if ("JoinGroup" == action || "JoinGroupCanAfford" == action) + { + sSavedGroupInvite[id] = notification; + sSavedResponse[id] = response; + } + + if ("JoinedTooManyGroupsMember" == action) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notification, response); + if (0 == opt) // Join button pressed + { + notification_adjusted = sSavedGroupInvite[id]; + response_adjusted = sSavedResponse[id]; + } + } + + S32 option = LLNotificationsUtil::getSelectedOption(notification_adjusted, response_adjusted); bool accept_invite = false; - LLUUID group_id = notification["payload"]["group_id"].asUUID(); - LLUUID transaction_id = notification["payload"]["transaction_id"].asUUID(); - std::string name = notification["payload"]["name"].asString(); - std::string message = notification["payload"]["message"].asString(); - S32 fee = notification["payload"]["fee"].asInteger(); + LLUUID group_id = notification_adjusted["payload"]["group_id"].asUUID(); + LLUUID transaction_id = notification_adjusted["payload"]["transaction_id"].asUUID(); + std::string name = notification_adjusted["payload"]["name"].asString(); + std::string message = notification_adjusted["payload"]["message"].asString(); + S32 fee = notification_adjusted["payload"]["fee"].asInteger(); if (option == 2 && !group_id.isNull()) { LLGroupActions::show(group_id); LLSD args; args["MESSAGE"] = message; - LLNotificationsUtil::add("JoinGroup", args, notification["payload"]); + LLNotificationsUtil::add("JoinGroup", args, notification_adjusted["payload"]); return false; } + if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. @@ -677,7 +710,8 @@ bool join_group_response(const LLSD& notification, const LLSD& response) { LLSD args; args["NAME"] = name; - LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]); + LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification_adjusted["payload"]); + return false; } } @@ -691,7 +725,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) args["COST"] = llformat("%d", fee); // Set the fee for next time to 0, so that we don't keep // asking about a fee. - LLSD next_payload = notification["payload"]; + LLSD next_payload = notification_adjusted["payload"]; next_payload["fee"] = 0; LLNotificationsUtil::add("JoinGroupCanAfford", args, @@ -717,6 +751,9 @@ bool join_group_response(const LLSD& notification, const LLSD& response) transaction_id); } + sSavedGroupInvite[id] = LLSD::emptyMap(); + sSavedResponse[id] = LLSD::emptyMap(); + return false; } -- cgit v1.2.3 From 08c7787393d5b9f2875788b344d68a541108b65b Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 11 Mar 2014 12:19:54 +0200 Subject: MAINT-2737 FIXED Disable button if multiple parcels are selected --- indra/newview/llpanelland.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index 5321ebc777..1946b9c523 100755 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -145,7 +145,7 @@ void LLPanelLandInfo::refresh() && ((gAgent.getID() == auth_buyer_id) || (auth_buyer_id.isNull()))); - if (is_public) + if (is_public && !LLViewerParcelMgr::getInstance()->getParcelSelection()->getMultipleOwners()) { getChildView("button buy land")->setEnabled(TRUE); } -- cgit v1.2.3 From 0fb8400e3462ac3585a2af4076d23c20cee8d458 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 11 Mar 2014 12:51:40 +0200 Subject: MAINT-3778 Develop>RenderMetadata>LOD Info no longer displays values for objects --- indra/newview/llvovolume.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 87c7d26cc0..3d41e248de 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1288,9 +1288,9 @@ BOOL LLVOVolume::calcLOD() if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) && mDrawable->getFace(0)) { - setDebugText(llformat("%.2f:%.2f, %d", mDrawable->mDistanceWRTCamera, radius, cur_detail)); + //setDebugText(llformat("%.2f:%.2f, %d", mDrawable->mDistanceWRTCamera, radius, cur_detail)); - //setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex())); + setDebugText(llformat("%d", mDrawable->getFace(0)->getTextureIndex())); } if (cur_detail != mLOD) -- cgit v1.2.3 From 504509c2882b098997ff4ab2648cc555c2314c2f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 7 Mar 2014 20:27:12 +0200 Subject: MAINT-3789 FIXED When moving items between inventory folders, the moved item is no longer highlighted in the new folder. --- indra/newview/llinventorypanel.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index d27f7d2527..ed217718c1 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -529,6 +529,14 @@ void LLInventoryPanel::modelChanged(U32 mask) // Item is to be moved and we found its new parent in the panel's directory, so move the item's UI. view_item->addToFolder(new_parent); addItemID(viewmodel_item->getUUID(), view_item); + if (mInventory) + { + const LLUUID trash_id = mInventory->findCategoryUUIDForType(LLFolderType::FT_TRASH); + if (trash_id != model_item->getParentUUID() && (mask & LLInventoryObserver::INTERNAL) && new_parent->isOpen()) + { + setSelection(item_id, FALSE); + } + } } else { -- cgit v1.2.3 From 147c97dd0306f3df7e3f99b35c3098b56169a5dc Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 7 Mar 2014 15:08:58 -0500 Subject: STORM-2018 Added "else" per code review request. --- indra/newview/llviewermessage.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9d80e0c04c..90551d641b 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -667,8 +667,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) sSavedGroupInvite[id] = notification; sSavedResponse[id] = response; } - - if ("JoinedTooManyGroupsMember" == action) + else if ("JoinedTooManyGroupsMember" == action) { S32 opt = LLNotificationsUtil::getSelectedOption(notification, response); if (0 == opt) // Join button pressed -- cgit v1.2.3 From 06bdcef531c79db7f6901e2c5f5f63b2f75ad4e5 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 9 Mar 2014 04:55:46 +0000 Subject: storm-1831 Fixing identificaton of label for highlighting. --- indra/llui/llkeywords.cpp | 2 +- indra/newview/llpreviewscript.cpp | 72 ++++++++++++++++++++++++--------------- indra/newview/llpreviewscript.h | 18 +++++++--- 3 files changed, 60 insertions(+), 32 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 6a349f3916..a251c2e4f5 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -209,7 +209,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) { ColourGroup = "SyntaxLslConstantVector"; } - else if (key_in == "controls") + else if (key_in == "misc-flow-label") { ColourGroup = "SyntaxLslControlFlow"; } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 0ca4718250..4c6f4fd3ba 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -407,52 +407,70 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - mSyntaxIdLSL.addFileFetchedCallback(boost::bind(&LLScriptEdCore::onFileFetchedInitialiseKeywords, this)); + mSyntaxIdLSL.addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); + + // Intialise keyword highlighting for the current simulator's version of LSL + mSyntaxIdLSL.initialise(); + + if (mSyntaxIdLSL.isDifferentVersion()) + { + processLoaded(); + } + else + { + LL_INFOS("SyntaxLSL") + << "Hashes are the same, no need to update highlighter." << LL_ENDL; + } - onRegionChangeInitialiseKeywords(); - // Set up a callback for region changes, so that highlighting is updated to the new region's version of LSL - //gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); + // Set up a callback for region changes + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); return TRUE; } -void LLScriptEdCore::onRegionChangeInitialiseKeywords() +void LLScriptEdCore::updateKeywords() { - // Intialise keyword highlighting for the current simulator's version of LSL - LL_DEBUGS("SyntaxLSL") << "Pre Initialise!" << LL_ENDL; - mSyntaxIdLSL.initialise(); - LL_DEBUGS("SyntaxLSL") << "Post Initialise!" << LL_ENDL; + if (mLive) + { + clearHighlights(); + gAgent.removeRegionChangedCallback(mRegionChangedCallback); + } + else + { + processLoaded(); + } +} - if (mSyntaxIdLSL.isDifferentVersion()) +void LLScriptEdCore::processLoaded() +{ + mSyntaxIdLSL.initialise(); + if (mSyntaxIdLSL.isLoaded()) { - if (mSyntaxIdLSL.isLoaded()) - { - onFileFetchedInitialiseKeywords(); - } - else - { - LL_INFOS("SyntaxLSL") - << "Hashes are the different, waiting for the syntax file to be retrieved." << LL_ENDL; - } + processKeywords(); } else { LL_INFOS("SyntaxLSL") - << "Hashes are the same, no need to update highlighter." << LL_ENDL; + << "Hashes are different, waiting for the syntax file to be retrieved." << LL_ENDL; } } -void LLScriptEdCore::onFileFetchedInitialiseKeywords() +void LLScriptEdCore::clearHighlights() +{ + mEditor->mKeywords.clearLoaded(); + mEditor->clearSegments(); + mEditor->mKeywords.clear(); +} + +void LLScriptEdCore::processKeywords() { if (mSyntaxIdLSL.isLoaded()) { LL_INFOS("SyntaxLSL") << "Hashes are different, updating highlighter." << LL_ENDL; - mEditor->mKeywords.clearLoaded(); - mEditor->clearSegments(); - mEditor->mKeywords.clear(); + clearHighlights(); if (mSyntaxIdLSL.isLoaded()) { @@ -1227,8 +1245,8 @@ bool LLScriptEdCore::enableLoadFromFileMenu(void* userdata) /// LLScriptEdContainer /// --------------------------------------------------------------------------- -LLScriptEdContainer::LLScriptEdContainer(const LLSD& key) -: LLPreview(key) +LLScriptEdContainer::LLScriptEdContainer(const LLSD& key) : + LLPreview(key) , mScriptEd(NULL) { } @@ -1750,7 +1768,7 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) &LLLiveLSLEditor::onSearchReplace, self, 0); - + self->mScriptEd->mLive = true; return self->mScriptEd; } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 67a4ca52fa..0841c8188b 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,9 +77,12 @@ protected: public: ~LLScriptEdCore(); + void clearHighlights(); + void initialiseKeywords(); void initMenu(); - void onRegionChangeInitialiseKeywords(); - void onFileFetchedInitialiseKeywords(); + void processKeywords(); + void processLoaded(); + void updateKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); @@ -133,6 +136,8 @@ protected: void addHelpItemToHistory(const std::string& help_string); static void onErrorList(LLUICtrl*, void* user_data); + bool mLive; + private: std::string mSampleText; LLTextEditor* mEditor; @@ -155,6 +160,10 @@ private: LLSyntaxIdLSL mSyntaxIdLSL; LLScriptEdContainer* mContainer; // parent view + +public: + boost::signals2::connection mRegionChangedCallback; + }; class LLScriptEdContainer : public LLPreview @@ -163,6 +172,7 @@ class LLScriptEdContainer : public LLPreview public: LLScriptEdContainer(const LLSD& key); + LLScriptEdContainer(const LLSD& key, const bool live); protected: std::string getTmpFileName(); @@ -172,7 +182,7 @@ protected: LLScriptEdCore* mScriptEd; }; -// Used to view and edit a LSL from your inventory. +// Used to view and edit an LSL script from your inventory. class LLPreviewLSL : public LLScriptEdContainer { public: @@ -217,7 +227,7 @@ protected: }; -// Used to view and edit an LSL that is attached to an object. +// Used to view and edit an LSL script that is attached to an object. class LLLiveLSLEditor : public LLScriptEdContainer { friend class LLLiveLSLFile; -- cgit v1.2.3 From 65a47d388c587199d28176fa8ca87260ede47c1d Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 10 Mar 2014 12:13:48 -0700 Subject: Improve Windows 32bit installer logic for blocking old OSs, add XP x64 detection as well --- .../installers/windows/installer_template.nsi | 40 ++++++++++++++++------ 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index fefec31df3..77a23ac26c 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -116,7 +116,8 @@ Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation !include "FileFunc.nsh" ; For GetParameters, GetOptions !insertmacro GetParameters !insertmacro GetOptions -!include WinVer.nsh ; for OS and SP detection +!include WinVer.nsh ; For OS and SP detection +!include x64.nsh ; For 64bit OS detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; After install completes, launch app @@ -154,16 +155,33 @@ Function dirPre FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure we are not on a verion of windows older than XP SP2 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWindowsVersion - ${IfNot} ${AtLeastWin2000} - ${OrIf} ${IsWinXP} - ${AndIfNot} ${AtLeastServicePack} 1 - ${OrIf} ${IsWin2003} - ${AndIfNot} ${AtLeastServicePack} 1 - MessageBox MB_OK $(CheckWindowsVersionMB) +; Make sure this computer meets the minimum system requirements. +; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWindowsVersion + ${If} ${AtMostWin2000} + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} + + ${If} ${IsWinXP} + ${AndIfNot} ${RunningX64} + ${AndIfNot} ${IsServicePack} 3 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} + + ${If} ${IsWinXP} + ${AndIf} ${RunningX64} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) Quit + ${EndIf} + + ${If} ${IsWin2003} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit ${EndIf} FunctionEnd @@ -784,7 +802,7 @@ SectionEnd ; end of uninstall section ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit -Call CheckWindowsVersion ; Don't install if on Windows XP SP1 or older (do to XP x64 only having SP2 and no SP3) +Call CheckWindowsVersion ; Don't install On unsupported systems Push $0 ${GetParameters} $COMMANDLINE ; get our command line -- cgit v1.2.3 From 20d486b52fb8ecefc03eb63a93e4447513d704d2 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Mon, 10 Mar 2014 12:31:48 -0700 Subject: correct line ending to previous comit --- .../installers/windows/installer_template.nsi | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 77a23ac26c..85fa160bb9 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -116,7 +116,7 @@ Var DO_UNINSTALL_V2 ; If non-null, path to a previous Viewer 2 installation !include "FileFunc.nsh" ; For GetParameters, GetOptions !insertmacro GetParameters !insertmacro GetOptions -!include WinVer.nsh ; For OS and SP detection +!include WinVer.nsh ; For OS and SP detection !include x64.nsh ; For 64bit OS detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -155,33 +155,33 @@ Function dirPre FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Make sure this computer meets the minimum system requirements. -; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckWindowsVersion +; Make sure this computer meets the minimum system requirements. +; Currently: Windows 32bit XP SP3, 64bit XP SP2 and Server 2003 SP2 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckWindowsVersion ${If} ${AtMostWin2000} - MessageBox MB_OK $(CheckWindowsVersionMB) + MessageBox MB_OK $(CheckWindowsVersionMB) Quit - ${EndIf} - - ${If} ${IsWinXP} - ${AndIfNot} ${RunningX64} + ${EndIf} + + ${If} ${IsWinXP} + ${AndIfNot} ${RunningX64} ${AndIfNot} ${IsServicePack} 3 - MessageBox MB_OK $(CheckWindowsVersionMB) + MessageBox MB_OK $(CheckWindowsVersionMB) Quit - ${EndIf} - - ${If} ${IsWinXP} - ${AndIf} ${RunningX64} + ${EndIf} + + ${If} ${IsWinXP} + ${AndIf} ${RunningX64} + ${AndIfNot} ${IsServicePack} 2 + MessageBox MB_OK $(CheckWindowsVersionMB) + Quit + ${EndIf} + + ${If} ${IsWin2003} ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) + MessageBox MB_OK $(CheckWindowsVersionMB) Quit - ${EndIf} - - ${If} ${IsWin2003} - ${AndIfNot} ${IsServicePack} 2 - MessageBox MB_OK $(CheckWindowsVersionMB) - Quit ${EndIf} FunctionEnd -- cgit v1.2.3 From 2b4d3fff706d098076bb6c0a7dce2ca35b83300f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 10 Mar 2014 15:46:49 -0400 Subject: back out STORM-2011 due to conflict --- doc/contributions.txt | 1 - indra/newview/llpanelgroupgeneral.cpp | 35 ++++++++++------------------------- indra/newview/llpanelgroupgeneral.h | 5 ++--- indra/newview/llpanelgrouproles.cpp | 35 ++++++++++------------------------- indra/newview/llpanelgrouproles.h | 5 ++--- 5 files changed, 24 insertions(+), 57 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 16cb5c526c..f4e5ad6edb 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -180,7 +180,6 @@ Ansariel Hiller MAINT-2368 STORM-1931 MAINT-2773 - STORM-2011 MAINT-3187 BUG-3764 STORM-1984 diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 6ba7d4f39d..0cd93b330a 100755 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -79,21 +79,18 @@ LLPanelGroupGeneral::LLPanelGroupGeneral() mCtrlReceiveNotices(NULL), mCtrlListGroup(NULL), mActiveTitleLabel(NULL), - mComboActiveTitle(NULL) + mComboActiveTitle(NULL), + mAvatarNameCacheConnection() { } LLPanelGroupGeneral::~LLPanelGroupGeneral() { - for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections.clear(); } BOOL LLPanelGroupGeneral::postBuild() @@ -735,16 +732,12 @@ void LLPanelGroupGeneral::updateMembers() else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); - if (it != mAvatarNameCacheConnections.end()) + // *TODO : Use a callback per member, not for the panel group. + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2, _1)); + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2)); } } @@ -782,17 +775,9 @@ void LLPanelGroupGeneral::addMember(LLGroupMemberData* member) } } -void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) +void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) { - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); - if (it != mAvatarNameCacheConnections.end()) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); - } + mAvatarNameCacheConnection.disconnect(); LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h index a019715bfa..b7f4a01139 100755 --- a/indra/newview/llpanelgroupgeneral.h +++ b/indra/newview/llpanelgroupgeneral.h @@ -63,7 +63,7 @@ public: virtual void setupCtrls (LLPanel* parent); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); private: void reset(); @@ -111,8 +111,7 @@ private: LLComboBox *mComboMature; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - typedef std::map avatar_name_cache_connection_map_t; - avatar_name_cache_connection_map_t mAvatarNameCacheConnections; + boost::signals2::connection mAvatarNameCacheConnection; }; #endif diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 94998f3c52..fdcd1f5ebb 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -743,20 +743,17 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mChanged(FALSE), mPendingMemberUpdate(FALSE), mHasMatch(FALSE), - mNumOwnerAdditions(0) + mNumOwnerAdditions(0), + mAvatarNameCacheConnection() { } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections.clear(); if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1644,17 +1641,9 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) mHasMatch = TRUE; } -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) +void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) { - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); - if (it != mAvatarNameCacheConnections.end()) - { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); - } + mAvatarNameCacheConnection.disconnect(); LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap @@ -1727,16 +1716,12 @@ void LLPanelGroupMembersSubTab::updateMembers() else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); - if (it != mAvatarNameCacheConnections.end()) + // *TODO : Add one callback per fetched avatar name + if (mAvatarNameCacheConnection.connected()) { - if (it->second.connected()) - { - it->second.disconnect(); - } - mAvatarNameCacheConnections.erase(it); + mAvatarNameCacheConnection.disconnect(); } - mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1)); + mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index baa2d40c7e..0cf272f3ee 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -189,7 +189,7 @@ public: virtual void setGroupID(const LLUUID& id); void addMemberToList(LLGroupMemberData* data); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); protected: typedef std::map role_change_data_map_t; @@ -215,8 +215,7 @@ protected: U32 mNumOwnerAdditions; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - typedef std::map avatar_name_cache_connection_map_t; - avatar_name_cache_connection_map_t mAvatarNameCacheConnections; + boost::signals2::connection mAvatarNameCacheConnection; }; class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab -- cgit v1.2.3 From 2ae011dc5ce8b2112c65757ac85e0567165975cf Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Tue, 11 Mar 2014 19:22:11 +0200 Subject: MAINT-3786 FIXED When bringing focus back to the viewer with a single click in world view, a double click teleport to clicked point happens under certain circumstances --- indra/llwindow/llwindowwin32.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 30f5526500..e45a511e6d 100755 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1831,6 +1831,10 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // This helps prevent avatar walking after maximizing the window by double-clicking the title bar. static bool sHandleLeftMouseUp = true; + // Ignore the double click received right after activating app. + // This is to avoid triggering double click teleport after returning focus (see MAINT-3786). + static bool sHandleDoubleClick = true; + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); @@ -1958,6 +1962,11 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ } } + if (!activating) + { + sHandleDoubleClick = false; + } + window_imp->mCallbacks->handleActivateApp(window_imp, activating); break; @@ -2182,6 +2191,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_NCLBUTTONDOWN"); // A click in a non-client area, e.g. title bar or window border. sHandleLeftMouseUp = false; + sHandleDoubleClick = true; } break; @@ -2226,6 +2236,13 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ //case WM_RBUTTONDBLCLK: { window_imp->mCallbacks->handlePingWatchdog(window_imp, "Main:WM_LBUTTONDBLCLK"); + + if (!sHandleDoubleClick) + { + sHandleDoubleClick = true; + break; + } + // Because we move the cursor position in the app, we need to query // to find out where the cursor at the time the event is handled. // If we don't do this, many clicks could get buffered up, and if the -- cgit v1.2.3 From 529edff468dff629455463d09c7db92f7dcd1a40 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 11 Mar 2014 14:03:38 -0400 Subject: restore the relevant fixes for STORM-2011 --- doc/contributions.txt | 1 + indra/newview/llpanelgrouproles.cpp | 35 +++++++++++++++++++++++++---------- indra/newview/llpanelgrouproles.h | 5 +++-- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index f4e5ad6edb..16cb5c526c 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -180,6 +180,7 @@ Ansariel Hiller MAINT-2368 STORM-1931 MAINT-2773 + STORM-2011 MAINT-3187 BUG-3764 STORM-1984 diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c30c932c41..4cb6506b61 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -743,17 +743,20 @@ LLPanelGroupMembersSubTab::LLPanelGroupMembersSubTab() mChanged(FALSE), mPendingMemberUpdate(FALSE), mHasMatch(FALSE), - mNumOwnerAdditions(0), - mAvatarNameCacheConnection() + mNumOwnerAdditions(0) { } LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab() { - if (mAvatarNameCacheConnection.connected()) + for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } } + mAvatarNameCacheConnections.clear(); if (mMembersList) { gSavedSettings.setString("GroupMembersSortOrder", mMembersList->getSortColumnName()); @@ -1644,9 +1647,17 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) mHasMatch = TRUE; } -void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name) +void LLPanelGroupMembersSubTab::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id) { - mAvatarNameCacheConnection.disconnect(); + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id); + if (it != mAvatarNameCacheConnections.end()) + { + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); + } LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap @@ -1719,12 +1730,16 @@ void LLPanelGroupMembersSubTab::updateMembers() else { // If name is not cached, onNameCache() should be called when it is cached and add this member to list. - // *TODO : Add one callback per fetched avatar name - if (mAvatarNameCacheConnection.connected()) + avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(mMemberProgress->first); + if (it != mAvatarNameCacheConnections.end()) { - mAvatarNameCacheConnection.disconnect(); + if (it->second.connected()) + { + it->second.disconnect(); + } + mAvatarNameCacheConnections.erase(it); } - mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2)); + mAvatarNameCacheConnections[mMemberProgress->first] = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, this, gdatap->getMemberVersion(), mMemberProgress->second, _2, _1)); } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 0cf272f3ee..baa2d40c7e 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -189,7 +189,7 @@ public: virtual void setGroupID(const LLUUID& id); void addMemberToList(LLGroupMemberData* data); - void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name); + void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name, const LLUUID& av_id); protected: typedef std::map role_change_data_map_t; @@ -215,7 +215,8 @@ protected: U32 mNumOwnerAdditions; LLGroupMgrGroupData::member_list_t::iterator mMemberProgress; - boost::signals2::connection mAvatarNameCacheConnection; + typedef std::map avatar_name_cache_connection_map_t; + avatar_name_cache_connection_map_t mAvatarNameCacheConnections; }; class LLPanelGroupRolesSubTab : public LLPanelGroupSubTab -- cgit v1.2.3 From f4ef763eeccccedea4b810cf5da161d346bb8f37 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Mar 2014 20:01:53 +0200 Subject: MAINT-2726 FIXED confirm before sharing items flag not working if sharing a folder merged InventoryCategory processing with other objects. Removed one of explicit GiveAcceptable checks (there were three, one per step). --- indra/newview/lltooldraganddrop.cpp | 90 +++++++++++++++---------------------- 1 file changed, 37 insertions(+), 53 deletions(-) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 7314ab60c1..ece30d2d0a 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1584,13 +1584,22 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response) const LLUUID& session_id = payload["session_id"]; const LLUUID& agent_id = payload["agent_id"]; LLViewerInventoryItem * inv_item = gInventory.getItem(payload["item_id"]); - if (NULL == inv_item) + LLViewerInventoryCategory * inv_cat = gInventory.getCategory(payload["item_id"]); + if (NULL == inv_item && NULL == inv_cat) { - llassert(NULL != inv_item); + llassert( FALSE ); return; } - - if (LLGiveInventory::doGiveInventoryItem(agent_id, inv_item, session_id)) + bool successfully_shared; + if (inv_item) + { + successfully_shared = LLGiveInventory::doGiveInventoryItem(agent_id, inv_item, session_id); + } + else + { + successfully_shared = LLGiveInventory::doGiveInventoryCategory(agent_id, inv_cat, session_id); + } + if (successfully_shared) { if ("avatarpicker" == payload["d&d_dest"].asString()) { @@ -1600,8 +1609,8 @@ static void give_inventory_cb(const LLSD& notification, const LLSD& response) } } -static void show_item_sharing_confirmation(const std::string name, - LLViewerInventoryItem* inv_item, +static void show_object_sharing_confirmation(const std::string name, + LLInventoryObject* inv_item, const LLSD& dest, const LLUUID& dest_agent, const LLUUID& session_id = LLUUID::null) @@ -1611,32 +1620,28 @@ static void show_item_sharing_confirmation(const std::string name, llassert(NULL != inv_item); return; } - if(gInventory.getItem(inv_item->getUUID()) - && LLGiveInventory::isInventoryGiveAcceptable(inv_item)) - { - LLSD substitutions; - substitutions["RESIDENTS"] = name; - substitutions["ITEMS"] = inv_item->getName(); - LLSD payload; - payload["agent_id"] = dest_agent; - payload["item_id"] = inv_item->getUUID(); - payload["session_id"] = session_id; - payload["d&d_dest"] = dest.asString(); - LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, payload, &give_inventory_cb); - } + LLSD substitutions; + substitutions["RESIDENTS"] = name; + substitutions["ITEMS"] = inv_item->getName(); + LLSD payload; + payload["agent_id"] = dest_agent; + payload["item_id"] = inv_item->getUUID(); + payload["session_id"] = session_id; + payload["d&d_dest"] = dest.asString(); + LLNotificationsUtil::add("ShareItemsConfirmation", substitutions, payload, &give_inventory_cb); } static void get_name_cb(const LLUUID& id, const std::string& full_name, - LLViewerInventoryItem* inv_item, + LLInventoryObject* inv_obj, const LLSD& dest, const LLUUID& dest_agent) { - show_item_sharing_confirmation(full_name, - inv_item, - dest, - id, - LLUUID::null); + show_object_sharing_confirmation(full_name, + inv_obj, + dest, + id, + LLUUID::null); } // function used as drag-and-drop handler for simple agent give inventory requests @@ -1662,10 +1667,11 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ case DAD_GESTURE: case DAD_CALLINGCARD: case DAD_MESH: + case DAD_CATEGORY: { - LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data; - if(gInventory.getItem(inv_item->getUUID()) - && LLGiveInventory::isInventoryGiveAcceptable(inv_item)) + LLInventoryObject* inv_obj = (LLInventoryObject*)cargo_data; + if(gInventory.getCategory(inv_obj->getUUID()) || (gInventory.getItem(inv_obj->getUUID()) + && LLGiveInventory::isInventoryGiveAcceptable(dynamic_cast(inv_obj)))) { // *TODO: get multiple object transfers working *accept = ACCEPT_YES_COPY_SINGLE; @@ -1682,40 +1688,18 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_ // Otherwise set up a callback to show the dialog when the name arrives. if (gCacheName->getFullName(dest_agent, fullname)) { - show_item_sharing_confirmation(fullname, inv_item, dest, dest_agent, LLUUID::null); + show_object_sharing_confirmation(fullname, inv_obj, dest, dest_agent, LLUUID::null); } else { - gCacheName->get(dest_agent, false, boost::bind(&get_name_cb, _1, _2, inv_item, dest, dest_agent)); + gCacheName->get(dest_agent, false, boost::bind(&get_name_cb, _1, _2, inv_obj, dest, dest_agent)); } return true; } // If an IM session with destination agent is found item offer will be logged in this session. - show_item_sharing_confirmation(session->mName, inv_item, dest, dest_agent, session_id); - } - } - else - { - // It's not in the user's inventory (it's probably - // in an object's contents), so disallow dragging - // it here. You can't give something you don't - // yet have. - *accept = ACCEPT_NO; - } - break; - } - case DAD_CATEGORY: - { - LLViewerInventoryCategory* inv_cat = (LLViewerInventoryCategory*)cargo_data; - if( gInventory.getCategory( inv_cat->getUUID() ) ) - { - // *TODO: get multiple object transfers working - *accept = ACCEPT_YES_COPY_SINGLE; - if(drop) - { - LLGiveInventory::doGiveInventoryCategory(dest_agent, inv_cat, session_id); + show_object_sharing_confirmation(session->mName, inv_obj, dest, dest_agent, session_id); } } else -- cgit v1.2.3 From a04ad99064006322af2bc78848554df4267b0468 Mon Sep 17 00:00:00 2001 From: Tank_Master Date: Thu, 13 Mar 2014 20:08:15 -0700 Subject: Open-154 Better service pack detection for Vista and Server 2008 --- .../installers/windows/installer_template.nsi | 28 +++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 85fa160bb9..8b3a9a8372 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -189,20 +189,32 @@ FunctionEnd ;Recommend Upgrading Service Pack ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function CheckWindowsServPack - ${If} ${IsWinXP} - ${AndIfNot} ${IsServicePack} 3 - ${OrIf} ${IsWin2003} - ${AndIfNot} ${IsServicePack} 2 - ${OrIf} ${IsWinVista} + ${If} ${IsWinVista} ${AndIfNot} ${IsServicePack} 2 - ${OrIf} ${IsWin2008} + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} + + ${If} ${IsWin2008} ${AndIfNot} ${IsServicePack} 2 - ${OrIf} ${IsWin7} + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} + + ${If} ${IsWin7} ${AndIfNot} ${IsServicePack} 1 - ${OrIf} ${IsWin2008R2} + MessageBox MB_OK $(CheckWindowsServPackMB) + DetailPrint $(UseLatestServPackDP) + Return + ${EndIf} + + ${If} ${IsWin2008R2} ${AndIfNot} ${IsServicePack} 1 MessageBox MB_OK $(CheckWindowsServPackMB) DetailPrint $(UseLatestServPackDP) + Return ${EndIf} FunctionEnd -- cgit v1.2.3 From e9116575bfd2238e80eaac08bceb8f797d0e933c Mon Sep 17 00:00:00 2001 From: Ricky Curtice Date: Thu, 13 Mar 2014 20:36:05 -0700 Subject: OPEN-209: Corrected all instances of trigraphs in the code. Trigraphs can cause some real special headaches. The only part that's annoying is the comment in newview/llimview.cpp where there's an unfortunate collision of a trigraph sequence with a character sequence that could be displayed by the viewer. Thankfully, it's only a comment! --- doc/contributions.txt | 1 + indra/llvfs/llvfile.cpp | 2 +- indra/llvfs/tests/lldiriterator_test.cpp | 6 +++--- indra/llwindow/llwindow.cpp | 4 ++-- indra/llwindow/llwindowsdl.cpp | 4 ++-- indra/newview/llagentwearables.cpp | 2 +- indra/newview/llappviewer.cpp | 2 +- indra/newview/llimview.cpp | 2 +- indra/newview/lltoastnotifypanel.cpp | 2 +- indra/newview/llviewermedia.cpp | 2 +- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 89390d9977..dc82200910 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -330,6 +330,7 @@ Cron Stardust VWR-25120 STORM-1075 STORM-1919 + OPEN-209 Cypren Christenson STORM-417 Dante Tucker diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index 306d7d8ec7..983e7c3b59 100755 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -104,7 +104,7 @@ BOOL LLVFile::read(U8 *buffer, S32 bytes, BOOL async, F32 priority) // We can't do a read while there are pending async writes waitForLock(VFSLOCK_APPEND); - // *FIX: (???) + // *FIX: (?) if (async) { mHandle = sVFSThread->read(mVFS, mFileID, mFileType, buffer, mPosition, bytes, threadPri()); diff --git a/indra/llvfs/tests/lldiriterator_test.cpp b/indra/llvfs/tests/lldiriterator_test.cpp index 505d86faa7..a65e3dada5 100755 --- a/indra/llvfs/tests/lldiriterator_test.cpp +++ b/indra/llvfs/tests/lldiriterator_test.cpp @@ -51,9 +51,9 @@ namespace tut void test_chop_662(void) { // Check a selection of bad group names from the crash reports - LLDirIterator iter(".","+bad-group-name]+??-??.*"); - LLDirIterator iter1(".","))--@---bad-group-name2((??-??.*\\.txt"); - LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__??-??.*"); + LLDirIterator iter(".","+bad-group-name]+?\?-??.*"); + LLDirIterator iter1(".","))--@---bad-group-name2((?\?-??.*\\.txt"); + LLDirIterator iter2(".","__^v--x)Cuide d sua vida(x--v^__?\?-??.*"); } template<> template<> diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp index 93b9d36939..a2824db70a 100755 --- a/indra/llwindow/llwindow.cpp +++ b/indra/llwindow/llwindow.cpp @@ -72,7 +72,7 @@ S32 OSMessageBox(const std::string& text, const std::string& caption, U32 type) } S32 result = 0; -#if LL_MESA_HEADLESS // !!! *FIX: (???) +#if LL_MESA_HEADLESS // !!! *FIX: (?) llwarns << "OSMessageBox: " << text << llendl; return OSBTN_OK; #elif LL_WINDOWS @@ -324,7 +324,7 @@ bool LLSplashScreen::isVisible() // static LLSplashScreen *LLSplashScreen::create() { -#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (???) +#if LL_MESA_HEADLESS || LL_SDL // !!! *FIX: (?) return 0; #elif LL_WINDOWS return new LLSplashScreenWin32; diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 205466e936..18e9eb0ee9 100755 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -223,7 +223,7 @@ LLWindowSDL::LLWindowSDL(LLWindowCallbacks* callbacks, mOriginalAspectRatio = 1024.0 / 768.0; if (title.empty()) - mWindowTitle = "SDL Window"; // *FIX: (???) + mWindowTitle = "SDL Window"; // *FIX: (?) else mWindowTitle = title; @@ -956,7 +956,7 @@ BOOL LLWindowSDL::setPosition(const LLCoordScreen position) { if(mWindow) { - // *FIX: (???) + // *FIX: (?) //MacMoveWindow(mWindow, position.mX, position.mY, false); } diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index fa810aac76..a7236f27e8 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -204,7 +204,7 @@ LLAgentWearables::sendAgentWearablesUpdateCallback::~sendAgentWearablesUpdateCal * * Would like to pass the agent in here, but we can't safely * count on it being around later. Just use gAgent directly. - * @param cb callback to execute on completion (??? unused ???) + * @param cb callback to execute on completion (? unused ?) * @param type Type for the wearable in the agent * @param wearable The wearable data. * @param todo Bitmask of actions to take on completion. diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e3c89f1a5f..a9adca3097 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4772,7 +4772,7 @@ void LLAppViewer::idle() static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); // Update session stats every large chunk of time - // *FIX: (???) SAMANTHA + // *FIX: (?) SAMANTHA if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected) { llinfos << "Transmitting sessions stats" << llendl; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 70ffdc14ff..e8ebd21de4 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1352,7 +1352,7 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // IM_SESSION_INVITE means that this is an Ad-hoc incoming chat // (it can be also Group chat but it is checked above) // In this case mInitialTargetIDs contains Ad-hoc session ID and it should not be added - // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. + // to Recent People to prevent showing of an item with (?? ?)(?? ?), sans the spaces. See EXT-8246. // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 9824f2dd38..c983527762 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,7 +46,7 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding S32 BUTTON_WIDTH = 90; -// *TODO: magic numbers(???) - copied from llnotify.cpp(250) +// *TODO: magic numbers(?) - copied from llnotify.cpp(250) const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 21fb8d519b..e21752da53 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -191,7 +191,7 @@ public: // 500 means "Internal Server error" but we decided it's okay to // accept this and go past it in the MIME type probe // 302 means the resource can be found temporarily in a different place - added this for join.secondlife.com - // 499 is a code specifc to join.secondlife.com (????) apparently safe to ignore + // 499 is a code specifc to join.secondlife.com (?) apparently safe to ignore // if( ((status >= 200) && (status < 300)) || // ((status >= 400) && (status < 499)) || // (status == 500) || -- cgit v1.2.3 From da2fc5b6f6458add830182195ae533e4328822fc Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 14 Mar 2014 11:55:24 +0200 Subject: MAINT-3821 FIXED Call setUseUsernames on start up. --- indra/newview/llstartup.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d5f8a1e46e..a5fdb72f9b 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2822,6 +2822,7 @@ void LLStartUp::initNameCache() // capabilities for display name lookup LLAvatarNameCache::initClass(false,gSavedSettings.getBOOL("UsePeopleAPI")); LLAvatarNameCache::setUseDisplayNames(gSavedSettings.getBOOL("UseDisplayNames")); + LLAvatarNameCache::setUseUsernames(gSavedSettings.getBOOL("NameTagShowUsernames")); } void LLStartUp::cleanupNameCache() -- cgit v1.2.3 From 09d1c27d4f78c78d949b6a3d896d6f58df2dfc06 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Fri, 14 Mar 2014 12:21:25 +0200 Subject: MAINT-3822 FIXED Show busy mode message only once for each im session. --- indra/newview/llagent.cpp | 1 + indra/newview/llimview.cpp | 33 +++++++++++++++++++++++++++++++++ indra/newview/llimview.h | 8 ++++++++ indra/newview/llviewermessage.cpp | 13 +++++++++---- 4 files changed, 51 insertions(+), 4 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index f150ceda67..7a93a95ebf 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1466,6 +1466,7 @@ void LLAgent::setDoNotDisturb(bool pIsDoNotDisturb) { LLDoNotDisturbNotificationStorage::getInstance()->updateNotifications(); } + gIMMgr->updateDNDMessageStatus(); } //----------------------------------------------------------------------------- diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 70ffdc14ff..d55922af93 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -409,6 +409,7 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mOtherParticipantIsAvatar(true), mStartCallOnInitialize(false), mStartedAsIMCall(voice), + mIsDNDsend(false), mAvatarNameCacheConnection() { // set P2P type by default @@ -3306,6 +3307,38 @@ bool LLIMMgr::isVoiceCall(const LLUUID& session_id) return im_session->mStartedAsIMCall; } +void LLIMMgr::updateDNDMessageStatus() +{ + if (LLIMModel::getInstance()->mId2SessionMap.empty()) return; + + std::map::const_iterator it = LLIMModel::getInstance()->mId2SessionMap.begin(); + for (; it != LLIMModel::getInstance()->mId2SessionMap.end(); ++it) + { + LLIMModel::LLIMSession* session = (*it).second; + + if (session->isP2P()) + { + setDNDMessageSent(session->mSessionID,false); + } + } +} + +bool LLIMMgr::isDNDMessageSend(const LLUUID& session_id) +{ + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (!im_session) return false; + + return im_session->mIsDNDsend; +} + +void LLIMMgr::setDNDMessageSent(const LLUUID& session_id, bool is_send) +{ + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(session_id); + if (!im_session) return; + + im_session->mIsDNDsend = is_send; +} + void LLIMMgr::addNotifiedNonFriendSessionID(const LLUUID& session_id) { mNotifiedNonFriendSessions.insert(session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index da6039a3ae..4270304de9 100755 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -140,6 +140,8 @@ public: bool mHasOfflineMessage; + bool mIsDNDsend; + private: void onAdHocNameCache(const LLAvatarName& av_name); @@ -443,6 +445,12 @@ public: bool isVoiceCall(const LLUUID& session_id); + void updateDNDMessageStatus(); + + bool isDNDMessageSend(const LLUUID& session_id); + + void setDNDMessageSent(const LLUUID& session_id, bool is_send); + void addNotifiedNonFriendSessionID(const LLUUID& session_id); bool isNonFriendSessionNotified(const LLUUID& session_id); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index df5c7d5c2e..160f924f3f 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2409,10 +2409,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) && from_id.notNull() //not a system message && to_id.notNull()) //not global message { - // return a standard "do not disturb" message, but only do it to online IM - // (i.e. not other auto responses and not store-and-forward IM) - - send_do_not_disturb_message(msg, from_id, session_id); // now store incoming IM in chat history @@ -2433,6 +2429,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); + + if (!gIMMgr->isDNDMessageSend(session_id)) + { + // return a standard "do not disturb" message, but only do it to online IM + // (i.e. not other auto responses and not store-and-forward IM) + send_do_not_disturb_message(msg, from_id, session_id); + gIMMgr->setDNDMessageSent(session_id, true); + } + } else if (from_id.isNull()) { -- cgit v1.2.3 From 559a0229a16ada062a3a5204507adde9a1e70748 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 14 Mar 2014 16:48:46 +0200 Subject: MAINT-2325 FIXED For sale mark is visible partially in Place profile --- indra/newview/skins/default/xui/en/panel_place_profile.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 308acf0c0c..66588ce94e 100755 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -220,7 +220,7 @@ -- cgit v1.2.3 From 99e97bf6aebab653e6faefb4af8c2083af29aca8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 14 Mar 2014 14:51:58 -0400 Subject: conform to new policy forbidding trigraphs --- indra/newview/llagentwearables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index aa97bddec8..9c36e54928 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -238,7 +238,7 @@ LLAgentWearables::sendAgentWearablesUpdateCallback::~sendAgentWearablesUpdateCal * * Would like to pass the agent in here, but we can't safely * count on it being around later. Just use gAgent directly. - * @param cb callback to execute on completion (??? unused ???) + * @param cb callback to execute on completion (? unused ?) * @param type Type for the wearable in the agent * @param wearable The wearable data. * @param todo Bitmask of actions to take on completion. -- cgit v1.2.3 From d9a3eb063271abeec6b437730328fe4a6b1b81f2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 17 Mar 2014 11:39:22 +0200 Subject: MAINT-2176 FIXED Maturity icon is added --- indra/newview/llpanelplaceprofile.cpp | 5 +++++ indra/newview/llpanelplaceprofile.h | 1 + indra/newview/skins/default/xui/en/panel_place_profile.xml | 10 +++++++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 14b5d9af47..3b8acdca90 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -129,6 +129,7 @@ BOOL LLPanelPlaceProfile::postBuild() mEstateNameText = getChild("estate_name"); mEstateRatingText = getChild("estate_rating"); + mEstateRatingIcon = getChild("estate_rating_icon"); mEstateOwnerText = getChild("estate_owner"); mCovenantText = getChild("covenant"); @@ -201,6 +202,7 @@ void LLPanelPlaceProfile::resetLocation() mEstateNameText->setValue(loading); mEstateRatingText->setValue(loading); + mEstateRatingIcon->setValue(loading); mEstateOwnerText->setValue(loading); mCovenantText->setValue(loading); @@ -348,6 +350,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mParcelRatingIcon->setValue(icon_m); mRegionRatingIcon->setValue(icon_m); + mEstateRatingIcon->setValue(icon_m); break; case SIM_ACCESS_ADULT: @@ -355,6 +358,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mParcelRatingIcon->setValue(icon_r); mRegionRatingIcon->setValue(icon_r); + mEstateRatingIcon->setValue(icon_r); break; default: @@ -362,6 +366,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mParcelRatingIcon->setValue(icon_pg); mRegionRatingIcon->setValue(icon_pg); + mEstateRatingIcon->setValue(icon_pg); } std::string rating = LLViewerRegion::accessToString(sim_access); diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index f4c6145881..ff24938b9c 100755 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -103,6 +103,7 @@ private: LLTextBox* mEstateNameText; LLTextBox* mEstateRatingText; + LLIconCtrl* mEstateRatingIcon; LLTextBox* mEstateOwnerText; LLTextEditor* mCovenantText; 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 66588ce94e..30239d6d01 100755 --- a/indra/newview/skins/default/xui/en/panel_place_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_place_profile.xml @@ -762,11 +762,19 @@ top_pad="5" value="Rating:" width="80" /> + -- cgit v1.2.3 From abf5d5b36083d4f1d94674e456750838ae683157 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 14 Mar 2014 21:15:18 +0200 Subject: MAINT-3426 FIXED Searching inventory for "online" no longer returns online friends calling cards in search results. --- indra/newview/llinventorybridge.cpp | 42 +++++++++++++++++++++++++++++++++++++ indra/newview/llinventorybridge.h | 1 + 2 files changed, 43 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 44943d8722..101b16b027 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4708,6 +4708,10 @@ public: virtual void changed(U32 mask) { mBridgep->refreshFolderViewItem(); + if (mask & LLFriendObserver::ONLINE) + { + mBridgep->checkSearchBySuffixChanges(); + } } protected: LLCallingCardBridge* mBridgep; @@ -4742,6 +4746,44 @@ void LLCallingCardBridge::refreshFolderViewItem() } } +void LLCallingCardBridge::checkSearchBySuffixChanges() +{ + if (!mDisplayName.empty()) + { + // changes in mDisplayName are processed by rename function and here it will be always same + // suffixes are also of fixed length, and we are processing change of one at a time, + // so it should be safe to use length (note: mSearchableName is capitalized) + S32 old_length = mSearchableName.length(); + S32 new_length = mDisplayName.length() + getLabelSuffix().length(); + if (old_length == new_length) + { + return; + } + mSearchableName.assign(mDisplayName); + mSearchableName.append(getLabelSuffix()); + LLStringUtil::toUpper(mSearchableName); + if (new_lengthgetFilterSubString()) == std::string::npos) + { + // string no longer contains substring + // we either have to update all parents manually or restart filter. + // dirtyFilter will not work here due to obsolete descendants' generations + getInventoryFilter()->setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE); + } + } + else + { + if (getInventoryFilter()) + { + // mSearchableName became longer, we gained additional suffix and need to repeat filter check. + dirtyFilter(); + } + } + } +} + // virtual void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string action) { diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index bc875e8f37..b29235260b 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -419,6 +419,7 @@ public: void* cargo_data, std::string& tooltip_msg); void refreshFolderViewItem(); + void checkSearchBySuffixChanges(); protected: LLCallingCardObserver* mObserver; }; -- cgit v1.2.3 From 3ee3d4a8f4b74a5f0b75fa54cb8e1cef0b1ef28e Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 14 Mar 2014 16:19:21 -0400 Subject: correct logging levels (ERR causes a crash), and a minor style fix --- indra/llui/llkeywords.cpp | 17 ++++++++--------- indra/llui/lltextbase.cpp | 3 ++- indra/newview/llsyntaxid.cpp | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index a251c2e4f5..9b924c84a9 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -163,15 +163,14 @@ std::string LLKeywords::getArguments(LLSD& arguments) } else { - LL_INFOS("SyntaxLSL") - << "Argument array does not comtain a map element!" << LL_ENDL; + LL_WARNS("SyntaxLSL") + << "Argument array comtains a non-map element!" << LL_ENDL; } } } else if (!arguments.isUndefined()) { - LL_WARNS("SyntaxLSL") - << "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL; } return argString == "" ? "" : argString; } @@ -251,7 +250,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) } else { - LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognised!" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized!" << LL_ENDL; } return LLUIColorTable::instance().getColor(ColourGroup); @@ -287,7 +286,7 @@ void LLKeywords::processTokens() } else { - LL_ERRS("LSL-Tokens-Processing") << "Map for " + outerIt->first + " entries is missing! Ignoring." << LL_ENDL; + LL_WARNS("LSL-Tokens-Processing") << "Map for " + outerIt->first + " entries is missing! Ignoring." << LL_ENDL; } } } @@ -356,7 +355,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) } else { - LL_ERRS("SyntaxLSL") << "Not a valid attribute" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Not a valid attribute" << LL_ENDL; } } @@ -403,7 +402,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) } else if (Tokens.isArray()) // Currently nothing should need this, but it's here for completeness { - LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << Color << LL_ENDL; for (int count = 0; count < Tokens.size(); ++count) { addToken(token_type, Tokens[count], Color, ""); @@ -411,7 +410,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) } else { - LL_INFOS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL; + LL_WARNS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL; } } diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 5ec4cf4fe5..bc11d59a65 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -571,7 +571,8 @@ void LLTextBase::drawText() if ( (getSpellCheck()) && (getWText().length() > 2) ) { // Calculate start and end indices for the spell checking range - S32 start = line_start, end = getLineEnd(last_line); + S32 start = line_start; + S32 end = getLineEnd(last_line); if ( (mSpellCheckStart != start) || (mSpellCheckEnd != end) ) { diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 7deb976c2a..80511cd73f 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -50,7 +50,7 @@ void fetchKeywordsFileResponder::errorWithContent(U32 status, const LLSD& content) { LLSyntaxIdLSL::sLoadFailed = true; - LL_ERRS("SyntaxLSL") + LL_WARNS("SyntaxLSL") << "fetchKeywordsFileResponder error [status:" << status << "]: " << content << LL_ENDL; @@ -88,7 +88,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) { LLSyntaxIdLSL::sLoaded = false; LLSyntaxIdLSL::sLoadFailed = true; - LL_ERRS("SyntaxLSL") + LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL; } @@ -174,7 +174,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() if (!region->capabilitiesReceived()) { // Shouldn't be possible, but experience shows that it may be needed. sLoadFailed = true; - LL_ERRS("SyntaxLSL") + LL_WARNS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities yet! Cannot process SyntaxId." << LL_ENDL; @@ -304,7 +304,7 @@ void LLSyntaxIdLSL::initialise() else { sLoadFailed = true; - LL_ERRS("SyntaxLSL") + LL_WARNS("SyntaxLSL") << "LSLSyntaxId capability URL is empty!!" << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } @@ -388,7 +388,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() sLoaded = (bool)LLSDSerialize::fromXML(content, file); if (!sLoaded) { - LL_ERRS("SyntaxLSL") + LL_WARNS("SyntaxLSL") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; } -- cgit v1.2.3 From bc7a579ba285fa64876a2bc116685f0357fe25dc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 14 Mar 2014 16:33:47 -0400 Subject: STORM-1831 initialize LLKeywords::mLoaded in constructor (fixes black-on-black text in various places) --- indra/llui/llkeywords.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 9b924c84a9..b4932489b5 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -67,7 +67,10 @@ inline bool LLKeywordToken::isTail(const llwchar* s) const return res; } -LLKeywords::LLKeywords() { } +LLKeywords::LLKeywords() : + mLoaded(false) +{ +} LLKeywords::~LLKeywords() { -- cgit v1.2.3 From 3372649d1b61ffb32965a4773ad3b7bd594054b6 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 17 Mar 2014 15:26:47 -0400 Subject: Restore use of RenderSpecularExponent --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/pipeline.cpp | 61 ++------------------------------- 2 files changed, 3 insertions(+), 60 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index d39bf6c3c2..09a928478e 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8908,7 +8908,7 @@ Type F32 Value - 384 + 368.0 RenderDeferred diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5da8a78b1b..805dc99654 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1362,49 +1362,10 @@ void LLPipeline::createLUTBuffers() { if (!mLightFunc) { - /*U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); - U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); - U8* ls = new U8[lightResX*lightResY]; - F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); - // Calculate the (normalized) Blinn-Phong specular lookup texture. - for (U32 y = 0; y < lightResY; ++y) - { - for (U32 x = 0; x < lightResX; ++x) - { - ls[y*lightResX+x] = 0; - F32 sa = (F32) x/(lightResX-1); - F32 spec = (F32) y/(lightResY-1); - F32 n = spec * spec * specExp; - - // Nothing special here. Just your typical blinn-phong term. - spec = powf(sa, n); - - // Apply our normalization function. - // Note: This is the full equation that applies the full normalization curve, not an approximation. - // This is fine, given we only need to create our LUT once per buffer initialization. - // The only trade off is we have a really low dynamic range. - // This means we have to account for things not being able to exceed 0 to 1 in our shaders. - spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n))); - - // Always sample at a 1.0/2.2 curve. - // This "Gamma corrects" our specular term, boosting our lower exponent reflections. - spec = powf(spec, 1.f/2.2f); - - // Easy fix for our dynamic range problem: divide by 6 here, multiply by 6 in our shaders. - // This allows for our specular term to exceed a value of 1 in our shaders. - // This is something that can be important for energy conserving specular models where higher exponents can result in highlights that exceed a range of 0 to 1. - // Technically, we could just use an R16F texture, but driver support for R16F textures can be somewhat spotty at times. - // This works remarkably well for higher specular exponents, though banding can sometimes be seen on lower exponents. - // Combined with a bit of noise and trilinear filtering, the banding is hardly noticable. - ls[y*lightResX+x] = (U8)(llclamp(spec * (1.f / 6), 0.f, 1.f) * 255); - } - }*/ - - U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); F32* ls = new F32[lightResX*lightResY]; - //F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); // Note: only use this when creating new specular lighting functions. + F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); // Calculate the (normalized) blinn-phong specular lookup texture. (with a few tweaks) for (U32 y = 0; y < lightResY; ++y) { @@ -1413,7 +1374,7 @@ void LLPipeline::createLUTBuffers() ls[y*lightResX+x] = 0; F32 sa = (F32) x/(lightResX-1); F32 spec = (F32) y/(lightResY-1); - F32 n = spec * spec * 368; + F32 n = spec * spec * specExp; // Nothing special here. Just your typical blinn-phong term. spec = powf(sa, n); @@ -1426,23 +1387,6 @@ void LLPipeline::createLUTBuffers() // Since we use R16F, we no longer have a dynamic range issue we need to work around here. // Though some older drivers may not like this, newer drivers shouldn't have this problem. ls[y*lightResX+x] = spec; - - - //beckmann distribution - /*F32 alpha = acosf((F32) x/(lightResX-1)); - F32 m = 1.f - (F32) y/(lightResY-1); - - F32 cos4_alpha = cosf(alpha); - cos4_alpha *= cos4_alpha; - cos4_alpha *= cos4_alpha; - - F32 tan_alpha = tanf(alpha); - F32 tan2_alpha = tan_alpha*tan_alpha; - - F32 k = expf(-(tan2_alpha)/(m*m)) / - (3.14159f*m*m*cos4_alpha); - - ls[y*lightResX+x] = k;*/ } } @@ -1455,7 +1399,6 @@ void LLPipeline::createLUTBuffers() LLImageGL::generateTextures(1, &mLightFunc); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); - //LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -- cgit v1.2.3 From c73d3073040d7f9731fd94eb51499d90fad6572a Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 18 Mar 2014 11:48:14 +0200 Subject: MAINT-1744 FIXED User cannot unblock an object by selecting "Unblock" menu item from object's pop-up menu --- indra/newview/lltoolpie.cpp | 12 +----------- indra/newview/skins/default/xui/en/menu_object.xml | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 1c362c18e0..a09a2739e8 100755 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1671,17 +1671,7 @@ BOOL LLToolPie::handleRightClickPick() { name = node->mName; } - std::string mute_msg; - if (LLMuteList::getInstance()->isMuted(object->getID(), name)) - { - mute_msg = LLTrans::getString("UnmuteObject"); - } - else - { - mute_msg = LLTrans::getString("MuteObject2"); - } - - gMenuHolder->getChild("Object Mute")->setValue(mute_msg); + gMenuObject->show(x, y); showVisualContextMenuEffect(); diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml index 52ab7da515..5c98a98d3d 100755 --- a/indra/newview/skins/default/xui/en/menu_object.xml +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -130,16 +130,23 @@ function="Object.ReportAbuse" /> - + - + - + + + + Date: Tue, 18 Mar 2014 17:11:39 +0200 Subject: MAINT-2578 FIXED Resident can add nonexistent resident to IM or add-hoc conference in "Choose resident" floater --- indra/newview/llfloateravatarpicker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index c0afb72cff..1b0e73409b 100755 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -795,7 +795,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled() { bool ret_val = visibleItemsSelected(); - if ( ret_val && mOkButtonValidateSignal.num_slots() ) + if ( ret_val ) { std::string acvtive_panel_name; LLScrollListCtrl* list = NULL; @@ -826,7 +826,7 @@ bool LLFloaterAvatarPicker::isSelectBtnEnabled() getSelectedAvatarData(list, avatar_ids, avatar_names); if (avatar_ids.size() >= 1) { - ret_val = mOkButtonValidateSignal(avatar_ids); + ret_val = mOkButtonValidateSignal.num_slots()?mOkButtonValidateSignal(avatar_ids):true; } else { -- cgit v1.2.3 From f023c677782168cdd48af8e897900f0dfef9fba8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 18 Mar 2014 14:05:41 -0500 Subject: MAINT-3832 Make color pickers actually apply result immediately when "apply immediately" is checked. --- indra/newview/llcolorswatch.h | 3 +++ indra/newview/llfloatercolorpicker.cpp | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 5bdd1712d2..b3b6cfe32d 100755 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -59,6 +59,7 @@ public: Optional alpha_background_image; Optional cancel_callback; Optional select_callback; + Optional preview_callback; Optional border_color; Optional label_width; Optional label_height; @@ -87,6 +88,7 @@ public: void setCanApplyImmediately(BOOL apply) { mCanApplyImmediately = apply; } void setOnCancelCallback(commit_callback_t cb) { mOnCancelCallback = cb; } void setOnSelectCallback(commit_callback_t cb) { mOnSelectCallback = cb; } + void setPreviewCallback(commit_callback_t cb) { mPreviewCallback = cb; } void setFallbackImageName(const std::string& name) { mFallbackImageName = name; } void showPicker(BOOL take_focus); @@ -112,6 +114,7 @@ protected: BOOL mCanApplyImmediately; commit_callback_t mOnCancelCallback; commit_callback_t mOnSelectCallback; + commit_callback_t mPreviewCallback; S32 mLabelWidth; S32 mLabelHeight; diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index a03425649f..7ba7660f19 100755 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -347,6 +347,11 @@ void LLFloaterColorPicker::setCurRgb ( F32 curRIn, F32 curGIn, F32 curBIn ) curG = curGIn; curB = curBIn; + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } + // update corresponding HSL values and LLColor3(curRIn, curGIn, curBIn).calcHSL(&curH, &curS, &curL); @@ -374,6 +379,11 @@ void LLFloaterColorPicker::setCurHsl ( F32 curHIn, F32 curSIn, F32 curLIn ) // update corresponding RGB values and hslToRgb ( curH, curS, curL, curR, curG, curB ); + + if (mApplyImmediateCheck->get()) + { + LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); + } } ////////////////////////////////////////////////////////////////////////////// @@ -463,10 +473,6 @@ void LLFloaterColorPicker::onImmediateCheck( LLUICtrl* ctrl, void* data) void LLFloaterColorPicker::onColorSelect( const LLTextureEntry& te ) { setCurRgb(te.getColor().mV[VRED], te.getColor().mV[VGREEN], te.getColor().mV[VBLUE]); - if (mApplyImmediateCheck->get()) - { - LLColorSwatchCtrl::onColorChanged ( getSwatch (), LLColorSwatchCtrl::COLOR_CHANGE ); - } } void LLFloaterColorPicker::onMouseCaptureLost() -- cgit v1.2.3 From 1ab9f19f82a84a109cf429998f423986268801f6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 19 Mar 2014 12:05:56 +0200 Subject: MAINT-3838 FIXED Get escaped uri for location link. --- indra/newview/llviewermenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 59e98fc882..ab9551ad17 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7825,7 +7825,7 @@ void handle_report_bug(const LLSD& param) replace["[ENVIRONMENT]"] = LLURI::escape(LLAppViewer::instance()->getViewerInfoString()); LLSLURL location_url; LLAgentUI::buildSLURL(location_url); - replace["[LOCATION]"] = location_url.getSLURLString(); + replace["[LOCATION]"] = LLURI::escape(location_url.getSLURLString()); LLUIString file_bug_url = gSavedSettings.getString("ReportBugURL"); file_bug_url.setArgs(replace); -- cgit v1.2.3 From bd4f4ee7932797008ed15f8c0301f5a0e5911a64 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 19 Mar 2014 14:17:13 -0400 Subject: logging cleanup in support of debugging text editor problems --- indra/llui/llkeywords.cpp | 16 ++++++++++------ indra/llui/lltextbase.cpp | 1 + indra/newview/llappviewer.cpp | 4 ++++ indra/newview/llfloaterabout.cpp | 19 ++++++++++++------- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 82b50f43ab..a3e033d894 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -169,8 +169,7 @@ std::string LLKeywords::getArguments(LLSD& arguments) } else { - LL_WARNS("SyntaxLSL") - << "Argument array comtains a non-map element!" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Argument array comtains a non-map element!" << LL_ENDL; } } } @@ -265,11 +264,16 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) void LLKeywords::initialise(LLSD SyntaxXML) { mSyntax = SyntaxXML; - mLoaded = TRUE; + mLoaded = true; } void LLKeywords::processTokens() { + if (!mLoaded) + { + return; + } + // Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD std::string delimiter; addToken(LLKeywordToken::TT_LABEL, "@", getColorGroup("misc-flow-label"), "Label\nTarget for jump statement", delimiter ); @@ -282,7 +286,7 @@ void LLKeywords::processTokens() { if (outerIt->first == "llsd-lsl-syntax-version") { - LL_INFOS("SyntaxLSL") << "Skipping over version key." << LL_ENDL; + // Skip over version key. } else { @@ -361,7 +365,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) } else { - LL_WARNS("SyntaxLSL") << "Not a valid attribute" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Not a valid attribute: " << innerIt->first << LL_ENDL; } } @@ -408,7 +412,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) } else if (Tokens.isArray()) // Currently nothing should need this, but it's here for completeness { - LL_WARNS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << Color << LL_ENDL; + LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << Color << LL_ENDL; for (int count = 0; count < Tokens.size(); ++count) { addToken(token_type, Tokens[count], Color, ""); diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index c4664d6fe0..ee16d3de7c 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -923,6 +923,7 @@ void LLTextBase::createDefaultSegment() // ensures that there is always at least one segment if (mSegments.empty()) { + LLStyleConstSP sp(new LLStyle(getStyleParams())); LLTextSegmentPtr default_segment = new LLNormalTextSegment( sp, 0, getLength() + 1, *this); mSegments.insert(default_segment); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e3c89f1a5f..e4de00b9e5 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3364,6 +3364,10 @@ LLSD LLAppViewer::getViewerInfo() const { info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("RetrievingData"); } + else + { + info["SERVER_RELEASE_NOTES_URL"] = LLTrans::getString("NotConnected"); + } } else if (LLStringUtil::startsWith(mServerReleaseNotesURL, "http")) // it's an URL { diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 4331a63346..27ca9ab56a 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -149,7 +149,8 @@ BOOL LLFloaterAbout::postBuild() } else // not logged in { - setSupportText(LLStringUtil::null); + LL_DEBUGS("ViewerInfo") << "cannot display region info when not connected" << LL_ENDL; + setSupportText(LLTrans::getString("NotConnected")); } support_widget->blockUndo(); @@ -268,11 +269,15 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) LLViewerTextEditor *support_widget = getChild("support_editor", true); + LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); +# if 0 support_widget->clear(); support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(), - FALSE, - LLStyle::Params() - .color(LLUIColorTable::instance().getColor("TextFgReadOnlyColor"))); + FALSE, LLStyle::Params() .color(about_color)); +# else + support_widget->setText(LLAppViewer::instance()->getViewerInfoString(), + LLStyle::Params() .color(about_color)); +# endif } ///---------------------------------------------------------------------------- @@ -306,9 +311,9 @@ void LLServerReleaseNotesURLFetcher::startFetch() // virtual void LLServerReleaseNotesURLFetcher::completedHeader(U32 status, const std::string& reason, const LLSD& content) { - lldebugs << "Status: " << status << llendl; - lldebugs << "Reason: " << reason << llendl; - lldebugs << "Headers: " << content << llendl; + LL_DEBUGS("VersionInfo") << "Status: " << status + << "Reason: " << reason + << "Headers: " << content << LL_ENDL; LLFloaterAbout* floater_about = LLFloaterReg::getTypedInstance("sl_about"); if (floater_about) -- cgit v1.2.3 From 776aadf4ef65681084268c3866058172c89b4259 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 19 Mar 2014 17:30:07 -0400 Subject: OPEN-199: replace the confusing STANDALONE switch with USESYSTEMLIBS --- indra/cmake/00-Common.cmake | 10 +++++----- indra/cmake/APR.cmake | 6 +++--- indra/cmake/Audio.cmake | 6 +++--- indra/cmake/BerkeleyDB.cmake | 6 +++--- indra/cmake/Boost.cmake | 6 +++--- indra/cmake/CARes.cmake | 6 +++--- indra/cmake/CURL.cmake | 6 +++--- indra/cmake/Copy3rdPartyLibs.cmake | 4 ++-- indra/cmake/DBusGlib.cmake | 4 ++-- indra/cmake/EXPAT.cmake | 6 +++--- indra/cmake/ExamplePlugin.cmake | 6 +++--- indra/cmake/FMODEX.cmake | 8 ++++---- indra/cmake/FindJsonCpp.cmake | 4 ++-- indra/cmake/FreeType.cmake | 6 +++--- indra/cmake/GLEXT.cmake | 4 ++-- indra/cmake/GLH.cmake | 6 +++--- indra/cmake/GLOD.cmake | 4 ++-- indra/cmake/GStreamer010Plugin.cmake | 4 ++-- indra/cmake/Glui.cmake | 6 +++--- indra/cmake/GoogleBreakpad.cmake | 6 +++--- indra/cmake/GooglePerfTools.cmake | 6 +++--- indra/cmake/Hunspell.cmake | 6 +++--- indra/cmake/JPEG.cmake | 6 +++--- indra/cmake/JsonCpp.cmake | 6 +++--- indra/cmake/LLAddBuildTest.cmake | 10 +++++----- indra/cmake/LLWindow.cmake | 6 +++--- indra/cmake/NDOF.cmake | 6 +++--- indra/cmake/OPENAL.cmake | 6 +++--- indra/cmake/OpenJPEG.cmake | 6 +++--- indra/cmake/OpenSSL.cmake | 6 +++--- indra/cmake/PNG.cmake | 6 +++--- indra/cmake/Prebuilt.cmake | 2 +- indra/cmake/PulseAudio.cmake | 4 ++-- indra/cmake/Tut.cmake | 4 ++-- indra/cmake/UI.cmake | 6 +++--- indra/cmake/Variables.cmake | 2 +- indra/cmake/ViewerMiscLibs.cmake | 4 ++-- indra/cmake/WebKitLibPlugin.cmake | 6 +++--- indra/cmake/XmlRpcEpi.cmake | 6 +++--- indra/cmake/ZLIB.cmake | 6 +++--- indra/llcommon/llsdserialize.cpp | 2 +- indra/llcommon/llsdserialize_xml.cpp | 2 +- indra/llcommon/llsys.cpp | 2 +- indra/llimage/llimagejpeg.h | 2 +- indra/llmessage/llares.h | 2 +- indra/llmessage/llhttpassetstorage.cpp | 2 +- indra/llprimitive/llmodel.cpp | 2 +- indra/llui/llxuiparser.cpp | 2 +- indra/llxml/llxmlnode.h | 2 +- indra/llxml/llxmlparser.h | 2 +- indra/newview/CMakeLists.txt | 8 ++++---- indra/newview/llviewerobjectlist.cpp | 2 +- indra/newview/llvoicevivox.cpp | 2 +- indra/newview/llvoicevivox.h | 2 +- 54 files changed, 129 insertions(+), 129 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 87484f4ae3..69173c38a2 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -173,12 +173,12 @@ if (LINUX) endif (WORD_SIZE EQUAL 32) add_definitions(-mfpmath=sse) #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 - if (NOT STANDALONE) + if (NOT USESYSTEMLIBS) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory") - endif (NOT STANDALONE) + endif (NOT USESYSTEMLIBS) set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}") @@ -225,14 +225,14 @@ if (LINUX OR DARWIN) endif (LINUX OR DARWIN) -if (STANDALONE) +if (USESYSTEMLIBS) add_definitions(-DLL_STANDALONE=1) if (LINUX AND ${ARCH} STREQUAL "i686") add_definitions(-march=pentiumpro) endif (LINUX AND ${ARCH} STREQUAL "i686") -else (STANDALONE) +else (USESYSTEMLIBS) set(${ARCH}_linux_INCLUDES ELFIO atk-1.0 @@ -241,6 +241,6 @@ else (STANDALONE) gtk-2.0 pango-1.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake index a87027f5f6..1a01671002 100755 --- a/indra/cmake/APR.cmake +++ b/indra/cmake/APR.cmake @@ -8,9 +8,9 @@ set(APR_FIND_REQUIRED ON) set(APRUTIL_FIND_QUIETLY ON) set(APRUTIL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindAPR) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(apr_suite) if (WINDOWS) if (LLCOMMON_LINK_SHARED) @@ -52,4 +52,4 @@ else (STANDALONE) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} uuid) list(APPEND APRUTIL_LIBRARIES ${DB_LIBRARIES} rt) endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake index d23bc2f9c6..876b7f82a8 100755 --- a/indra/cmake/Audio.cmake +++ b/indra/cmake/Audio.cmake @@ -1,13 +1,13 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(OGG REQUIRED ogg) pkg_check_modules(VORBIS REQUIRED vorbis) pkg_check_modules(VORBISENC REQUIRED vorbisenc) pkg_check_modules(VORBISFILE REQUIRED vorbisfile) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(ogg-vorbis) set(VORBIS_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(VORBISENC_INCLUDE_DIRS ${VORBIS_INCLUDE_DIRS}) @@ -32,7 +32,7 @@ else (STANDALONE) set(VORBISENC_LIBRARIES vorbisenc) set(VORBISFILE_LIBRARIES vorbisfile) endif (WINDOWS) -endif (STANDALONE) +endif (USESYSTEMLIBS) link_directories( ${VORBIS_LIBRARY_DIRS} diff --git a/indra/cmake/BerkeleyDB.cmake b/indra/cmake/BerkeleyDB.cmake index 57b53f46ff..5f6b644a15 100755 --- a/indra/cmake/BerkeleyDB.cmake +++ b/indra/cmake/BerkeleyDB.cmake @@ -3,9 +3,9 @@ set(DB_FIND_QUIETLY ON) set(DB_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindBerkeleyDB) -else (STANDALONE) +else (USESYSTEMLIBS) if (LINUX) # Need to add dependency pthread explicitely to support ld.gold. use_prebuilt_binary(db) @@ -14,4 +14,4 @@ else (STANDALONE) set(DB_LIBRARIES db-4.2) endif (LINUX) set(DB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Boost.cmake b/indra/cmake/Boost.cmake index cff762e1f0..50ac27d402 100755 --- a/indra/cmake/Boost.cmake +++ b/indra/cmake/Boost.cmake @@ -4,7 +4,7 @@ include(Prebuilt) set(Boost_FIND_QUIETLY ON) set(Boost_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindBoost) set(BOOST_CONTEXT_LIBRARY boost_context-mt) @@ -14,7 +14,7 @@ if (STANDALONE) set(BOOST_SIGNALS_LIBRARY boost_signals-mt) set(BOOST_SYSTEM_LIBRARY boost_system-mt) set(BOOST_THREAD_LIBRARY boost_thread-mt) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(boost) set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(BOOST_VERSION "1.52") @@ -111,4 +111,4 @@ else (STANDALONE) optimized boost_thread-mt debug boost_thread-mt-d) endif (WINDOWS) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/CARes.cmake b/indra/cmake/CARes.cmake index b0dac5b12f..baa55aa49d 100755 --- a/indra/cmake/CARes.cmake +++ b/indra/cmake/CARes.cmake @@ -5,9 +5,9 @@ include(Prebuilt) set(CARES_FIND_QUIETLY ON) set(CARES_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindCARes) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(ares) add_definitions("-DCARES_STATICLIB") if (WINDOWS) @@ -18,4 +18,4 @@ else (STANDALONE) set(CARES_LIBRARIES cares) endif (WINDOWS) set(CARES_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/ares) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 9aba08e573..04afae594d 100755 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(CURL_FIND_QUIETLY ON) set(CURL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindCURL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(curl) if (WINDOWS) set(CURL_LIBRARIES @@ -16,4 +16,4 @@ else (STANDALONE) set(CURL_LIBRARIES libcurl.a) endif (WINDOWS) set(CURL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 44c2d3ac27..160f18c99b 100755 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -372,9 +372,9 @@ copy_if_different( ) set(third_party_targets ${third_party_targets} ${out_targets}) -if(NOT STANDALONE) +if(NOT USESYSTEMLIBS) add_custom_target( stage_third_party_libs ALL DEPENDS ${third_party_targets} ) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/DBusGlib.cmake b/indra/cmake/DBusGlib.cmake index 83c08d3350..d148a35a5b 100755 --- a/indra/cmake/DBusGlib.cmake +++ b/indra/cmake/DBusGlib.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(DBUSGLIB REQUIRED dbus-glib-1) @@ -18,7 +18,7 @@ elseif (LINUX) gobject-2.0 glib-2.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (DBUSGLIB_FOUND) set(DBUSGLIB ON CACHE BOOL "Build with dbus-glib message bus support.") diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index acb15dc623..c1155531ff 100755 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(EXPAT_FIND_QUIETLY ON) set(EXPAT_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindEXPAT) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(expat) if (WINDOWS) set(EXPAT_LIBRARIES libexpatMT) @@ -14,4 +14,4 @@ else (STANDALONE) set(EXPAT_LIBRARIES expat) endif (WINDOWS) set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/ExamplePlugin.cmake b/indra/cmake/ExamplePlugin.cmake index 599787ad21..5d826c1f66 100755 --- a/indra/cmake/ExamplePlugin.cmake +++ b/indra/cmake/ExamplePlugin.cmake @@ -2,13 +2,13 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(EXAMPLEPLUGIN OFF CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) set(EXAMPLEPLUGIN ON CACHE BOOL "EXAMPLEPLUGIN support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (WINDOWS) elseif (DARWIN) diff --git a/indra/cmake/FMODEX.cmake b/indra/cmake/FMODEX.cmake index 65bc1cabeb..720933d1b7 100644 --- a/indra/cmake/FMODEX.cmake +++ b/indra/cmake/FMODEX.cmake @@ -4,17 +4,17 @@ # When building using proprietary binaries though (i.e. having access to LL private servers), # we always build with FMODEX. # Open source devs should use the -DFMODEX:BOOL=ON then if they want to build with FMOD, whether -# they are using STANDALONE or not. +# they are using USESYSTEMLIBS or not. if (INSTALL_PROPRIETARY) set(FMODEX ON CACHE BOOL "Using FMOD Ex sound library.") endif (INSTALL_PROPRIETARY) if (FMODEX) - if (STANDALONE) + if (USESYSTEMLIBS) # In that case, we use the version of the library installed on the system set(FMODEX_FIND_REQUIRED ON) include(FindFMODEX) - else (STANDALONE) + else (USESYSTEMLIBS) if (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) # If the path have been specified in the arguments, use that set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) @@ -41,6 +41,6 @@ if (FMODEX) set(FMODEX_LIBRARIES ${FMODEX_LIBRARY}) set(FMODEX_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/fmodex) endif (FMODEX_LIBRARY AND FMODEX_INCLUDE_DIR) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (FMODEX) diff --git a/indra/cmake/FindJsonCpp.cmake b/indra/cmake/FindJsonCpp.cmake index 0b056ada58..9398779cff 100755 --- a/indra/cmake/FindJsonCpp.cmake +++ b/indra/cmake/FindJsonCpp.cmake @@ -23,10 +23,10 @@ EXEC_PROGRAM(${CMAKE_CXX_COMPILER} # Try to find a library that was compiled with the same compiler version as we currently use. SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson_linux-gcc-${_gcc_COMPILER_VERSION}_libmt.so) -IF (STANDALONE) +IF (USESYSTEMLIBS) # On standalone, assume that the system installed library was compiled with the used compiler. SET(JSONCPP_NAMES ${JSONCPP_NAMES} libjson.so) -ENDIF (STANDALONE) +ENDIF (USESYSTEMLIBS) FIND_LIBRARY(JSONCPP_LIBRARY NAMES ${JSONCPP_NAMES} PATHS /usr/lib /usr/local/lib diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake index c9a90a9a8d..02c5b37f28 100755 --- a/indra/cmake/FreeType.cmake +++ b/indra/cmake/FreeType.cmake @@ -1,14 +1,14 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(FREETYPE REQUIRED freetype2) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(freetype) set(FREETYPE_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) set(FREETYPE_LIBRARIES freetype) -endif (STANDALONE) +endif (USESYSTEMLIBS) link_directories(${FREETYPE_LIBRARY_DIRS}) diff --git a/indra/cmake/GLEXT.cmake b/indra/cmake/GLEXT.cmake index 0a3dd976b4..a749644202 100644 --- a/indra/cmake/GLEXT.cmake +++ b/indra/cmake/GLEXT.cmake @@ -1,8 +1,8 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(glext) use_prebuilt_binary(glh_linear) set(GLEXT_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) diff --git a/indra/cmake/GLH.cmake b/indra/cmake/GLH.cmake index 911dbe4017..d5262f2efa 100755 --- a/indra/cmake/GLH.cmake +++ b/indra/cmake/GLH.cmake @@ -4,8 +4,8 @@ include(Prebuilt) set(GLH_FIND_REQUIRED TRUE) set(GLH_FIND_QUIETLY TRUE) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindGLH) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(glh_linear) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/GLOD.cmake b/indra/cmake/GLOD.cmake index 6bdbaf621e..3683768af9 100755 --- a/indra/cmake/GLOD.cmake +++ b/indra/cmake/GLOD.cmake @@ -1,9 +1,9 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(GLOD) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) set(GLOD_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) set(GLOD_LIBRARIES GLOD) diff --git a/indra/cmake/GStreamer010Plugin.cmake b/indra/cmake/GStreamer010Plugin.cmake index d2d0699bcd..cfd8565638 100755 --- a/indra/cmake/GStreamer010Plugin.cmake +++ b/indra/cmake/GStreamer010Plugin.cmake @@ -1,7 +1,7 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(GSTREAMER010 REQUIRED gstreamer-0.10) @@ -26,7 +26,7 @@ elseif (LINUX) gthread-2.0 glib-2.0 ) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (GSTREAMER010_FOUND AND GSTREAMER010_PLUGINS_BASE_FOUND) set(GSTREAMER010 ON CACHE BOOL "Build with GStreamer-0.10 streaming media support.") diff --git a/indra/cmake/Glui.cmake b/indra/cmake/Glui.cmake index f62a56856c..db353a91ec 100755 --- a/indra/cmake/Glui.cmake +++ b/indra/cmake/Glui.cmake @@ -2,14 +2,14 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(GLUI OFF CACHE BOOL "GLUI support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(glui) set(GLUI ON CACHE BOOL "GLUI support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) set(GLUI ON CACHE BOOL diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index 96e22791ec..a41815f7b7 100755 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -1,10 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON) include(FindGoogleBreakpad) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(google_breakpad) if (DARWIN) set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler) @@ -18,5 +18,5 @@ else (STANDALONE) # yes, this does look dumb, no, it's not incorrect # set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/include/google_breakpad/google_breakpad") -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index f3fd008e49..c1faeb9325 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -5,9 +5,9 @@ include(Prebuilt) # set ON or OFF as desired. set (USE_TCMALLOC OFF) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindGooglePerfTools) -else (STANDALONE) +else (USESYSTEMLIBS) if (WINDOWS) if (USE_TCMALLOC) use_prebuilt_binary(gperftools) @@ -34,7 +34,7 @@ else (STANDALONE) ${LIBS_PREBUILT_DIR}/include) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (GOOGLE_PERFTOOLS_FOUND) # XXX Disable temporarily, until we have compilation issues on 64-bit diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake index 0c9cf93316..ef74d95b2a 100755 --- a/indra/cmake/Hunspell.cmake +++ b/indra/cmake/Hunspell.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(HUNSPELL_FIND_QUIETLY ON) set(HUNSPELL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindHUNSPELL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(libhunspell) if (WINDOWS) set(HUNSPELL_LIBRARY libhunspell) @@ -19,4 +19,4 @@ else (STANDALONE) endif() set(HUNSPELL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/hunspell) use_prebuilt_binary(dictionaries) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake index 4f99efd602..d6da22aecc 100755 --- a/indra/cmake/JPEG.cmake +++ b/indra/cmake/JPEG.cmake @@ -5,9 +5,9 @@ include(Linking) set(JPEG_FIND_QUIETLY ON) set(JPEG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindJPEG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(jpeglib) if (LINUX) set(JPEG_LIBRARIES jpeg) @@ -17,4 +17,4 @@ else (STANDALONE) set(JPEG_LIBRARIES jpeglib) endif (LINUX) set(JPEG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/JsonCpp.cmake b/indra/cmake/JsonCpp.cmake index 7ad73e5683..0aab2d6634 100755 --- a/indra/cmake/JsonCpp.cmake +++ b/indra/cmake/JsonCpp.cmake @@ -5,9 +5,9 @@ include(Prebuilt) set(JSONCPP_FIND_QUIETLY ON) set(JSONCPP_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindJsonCpp) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(jsoncpp) if (WINDOWS) set(JSONCPP_LIBRARIES @@ -19,4 +19,4 @@ else (STANDALONE) set(JSONCPP_LIBRARIES libjson_linux-gcc-4.1.3_libmt.a) endif (WINDOWS) set(JSONCPP_INCLUDE_DIR "${LIBS_PREBUILT_DIR}/include/jsoncpp" "${LIBS_PREBUILT_DIR}/include/json") -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index 9bb3077797..4e6c41e528 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -202,9 +202,9 @@ FUNCTION(LL_ADD_INTEGRATION_TEST ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files}) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}") - if(STANDALONE) + if(USESYSTEMLIBS) SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") - endif(STANDALONE) + endif(USESYSTEMLIBS) # The following was copied to llcorehttp/CMakeLists.txt's texture_load target. # Any changes made here should be replicated there. @@ -275,10 +275,10 @@ MACRO(SET_TEST_PATH LISTVAR) set(${LISTVAR} ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources ${SHARED_LIB_STAGING_DIR}/Release/Resources /usr/lib) ELSE(WINDOWS) # Linux uses a single staging directory anyway. - IF (STANDALONE) + IF (USESYSTEMLIBS) set(${LISTVAR} ${CMAKE_BINARY_DIR}/llcommon /usr/lib /usr/local/lib) - ELSE (STANDALONE) + ELSE (USESYSTEMLIBS) set(${LISTVAR} ${SHARED_LIB_STAGING_DIR} /usr/lib) - ENDIF (STANDALONE) + ENDIF (USESYSTEMLIBS) ENDIF(WINDOWS) ENDMACRO(SET_TEST_PATH) diff --git a/indra/cmake/LLWindow.cmake b/indra/cmake/LLWindow.cmake index ad732ef650..ba07a80f05 100755 --- a/indra/cmake/LLWindow.cmake +++ b/indra/cmake/LLWindow.cmake @@ -4,7 +4,7 @@ include(Variables) include(GLEXT) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindSDL) # This should be done by FindSDL. Sigh. @@ -13,14 +13,14 @@ if (STANDALONE) SDL_INCLUDE_DIR SDL_LIBRARY ) -else (STANDALONE) +else (USESYSTEMLIBS) if (LINUX) use_prebuilt_binary(SDL) set (SDL_FOUND TRUE) set (SDL_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/i686-linux) set (SDL_LIBRARY SDL directfb fusion direct) endif (LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (SDL_FOUND) include_directories(${SDL_INCLUDE_DIR}) diff --git a/indra/cmake/NDOF.cmake b/indra/cmake/NDOF.cmake index be6fe415f2..e72845db53 100755 --- a/indra/cmake/NDOF.cmake +++ b/indra/cmake/NDOF.cmake @@ -4,10 +4,10 @@ include(Prebuilt) set(NDOF ON CACHE BOOL "Use NDOF space navigator joystick library.") if (NDOF) - if (STANDALONE) + if (USESYSTEMLIBS) set(NDOF_FIND_REQUIRED ON) include(FindNDOF) - else (STANDALONE) + else (USESYSTEMLIBS) use_prebuilt_binary(ndofdev) if (WINDOWS) @@ -18,7 +18,7 @@ if (NDOF) set(NDOF_INCLUDE_DIR ${ARCH_PREBUILT_DIRS}/include/ndofdev) set(NDOF_FOUND 1) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (NDOF) if (NDOF_FOUND) diff --git a/indra/cmake/OPENAL.cmake b/indra/cmake/OPENAL.cmake index a3e1fb924e..c084d68de7 100755 --- a/indra/cmake/OPENAL.cmake +++ b/indra/cmake/OPENAL.cmake @@ -10,14 +10,14 @@ endif (LINUX) if (OPENAL) set(OPENAL_LIB_INCLUDE_DIRS "${LIBS_PREBUILT_DIR}/include/AL") - if (STANDALONE) + if (USESYSTEMLIBS) include(FindPkgConfig) include(FindOpenAL) pkg_check_modules(OPENAL_LIB REQUIRED openal) pkg_check_modules(FREEALUT_LIB REQUIRED freealut) - else (STANDALONE) + else (USESYSTEMLIBS) use_prebuilt_binary(openal_soft) - endif (STANDALONE) + endif (USESYSTEMLIBS) if(WINDOWS) set(OPENAL_LIBRARIES OpenAL32 diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index fcc82c2f49..bf0bde2ba7 100755 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(OPENJPEG_FIND_QUIETLY ON) set(OPENJPEG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindOpenJPEG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(openjpeg) if(WINDOWS) @@ -19,4 +19,4 @@ else (STANDALONE) endif(WINDOWS) set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake index 2704912eb5..5b469f74f9 100755 --- a/indra/cmake/OpenSSL.cmake +++ b/indra/cmake/OpenSSL.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(OpenSSL_FIND_QUIETLY ON) set(OpenSSL_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindOpenSSL) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(openSSL) if (WINDOWS) set(OPENSSL_LIBRARIES ssleay32 libeay32) @@ -14,7 +14,7 @@ else (STANDALONE) set(OPENSSL_LIBRARIES ssl crypto) endif (WINDOWS) set(OPENSSL_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) set(CRYPTO_LIBRARIES crypto) diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake index 913c575672..173d59391e 100755 --- a/indra/cmake/PNG.cmake +++ b/indra/cmake/PNG.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(PNG_FIND_QUIETLY ON) set(PNG_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPNG) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(libpng) if (WINDOWS) set(PNG_LIBRARIES libpng15) @@ -18,4 +18,4 @@ else (STANDALONE) set(PNG_LIBRARIES png15) set(PNG_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/libpng15) endif() -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index ac0cbde253..c3fd8f1666 100755 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -18,7 +18,7 @@ endif(INSTALL_PROPRIETARY) # ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) macro (use_prebuilt_binary _binary) if (NOT DEFINED STANDALONE_${_binary}) - set(STANDALONE_${_binary} ${STANDALONE}) + set(STANDALONE_${_binary} ${USESYSTEMLIBS}) endif (NOT DEFINED STANDALONE_${_binary}) if (NOT STANDALONE_${_binary}) diff --git a/indra/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index 360a971058..cce27f1bdd 100755 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -4,7 +4,7 @@ include(Prebuilt) set(PULSEAUDIO OFF CACHE BOOL "Build with PulseAudio support, if available.") if (PULSEAUDIO) - if (STANDALONE) + if (USESYSTEMLIBS) include(FindPkgConfig) pkg_check_modules(PULSEAUDIO libpulse) @@ -20,7 +20,7 @@ if (PULSEAUDIO) set(PULSEAUDIO_LIBRARIES # none needed! ) - endif (STANDALONE) + endif (USESYSTEMLIBS) endif (PULSEAUDIO) if (PULSEAUDIO_FOUND) diff --git a/indra/cmake/Tut.cmake b/indra/cmake/Tut.cmake index 7488e9dcb0..e11a3c3314 100755 --- a/indra/cmake/Tut.cmake +++ b/indra/cmake/Tut.cmake @@ -1,6 +1,6 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(tut) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/UI.cmake b/indra/cmake/UI.cmake index d0fd4df03a..58acdc22bd 100755 --- a/indra/cmake/UI.cmake +++ b/indra/cmake/UI.cmake @@ -2,7 +2,7 @@ include(Prebuilt) include(FreeType) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindPkgConfig) if (LINUX) @@ -31,7 +31,7 @@ if (STANDALONE) list(APPEND UI_LIBRARIES ${${pkg}_LIBRARIES}) add_definitions(${${pkg}_CFLAGS_OTHERS}) endforeach(pkg) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(gtk-atk-pango-glib) if (LINUX) set(UI_LIBRARIES @@ -59,7 +59,7 @@ else (STANDALONE) foreach(include ${${LL_ARCH}_INCLUDES}) include_directories(${LIBS_PREBUILT_DIR}/include/${include}) endforeach(include) -endif (STANDALONE) +endif (USESYSTEMLIBS) if (LINUX) add_definitions(-DLL_GTK=1 -DLL_X11=1) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 22d0a7f0fe..963b1bd386 100755 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -183,7 +183,7 @@ if (XCODE_VERSION GREATER 4.2) endif (XCODE_VERSION GREATER 4.2) set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") -set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.") +set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.") set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") diff --git a/indra/cmake/ViewerMiscLibs.cmake b/indra/cmake/ViewerMiscLibs.cmake index 5b00c989a4..d4be24799f 100755 --- a/indra/cmake/ViewerMiscLibs.cmake +++ b/indra/cmake/ViewerMiscLibs.cmake @@ -1,10 +1,10 @@ # -*- cmake -*- include(Prebuilt) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) use_prebuilt_binary(libhunspell) use_prebuilt_binary(libuuid) use_prebuilt_binary(slvoice) use_prebuilt_binary(fontconfig) -endif(NOT STANDALONE) +endif(NOT USESYSTEMLIBS) diff --git a/indra/cmake/WebKitLibPlugin.cmake b/indra/cmake/WebKitLibPlugin.cmake index d9df78bfc8..76f2c148db 100755 --- a/indra/cmake/WebKitLibPlugin.cmake +++ b/indra/cmake/WebKitLibPlugin.cmake @@ -2,7 +2,7 @@ include(Linking) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) # The minimal version, 4.4.3, is rather arbitrary: it's the version in Debian/Lenny. find_package(Qt4 4.4.3 COMPONENTS QtCore QtGui QtNetwork QtOpenGL QtWebKit REQUIRED) include(${QT_USE_FILE}) @@ -28,11 +28,11 @@ if (STANDALONE) list(APPEND QT_PLUGIN_LIBRARIES jpeg) set(WEBKITLIBPLUGIN OFF CACHE BOOL "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(llqtwebkit) set(WEBKITLIBPLUGIN ON CACHE BOOL "WEBKITLIBPLUGIN support for the llplugin/llmedia test apps.") -endif (STANDALONE) +endif (USESYSTEMLIBS) if (WINDOWS) set(WEBKIT_PLUGIN_LIBRARIES diff --git a/indra/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index 5bd4848245..3a0caa0a06 100755 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -4,9 +4,9 @@ include(Prebuilt) set(XMLRPCEPI_FIND_QUIETLY ON) set(XMLRPCEPI_FIND_REQUIRED ON) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindXmlRpcEpi) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(xmlrpc-epi) if (WINDOWS) set(XMLRPCEPI_LIBRARIES @@ -17,4 +17,4 @@ else (STANDALONE) set(XMLRPCEPI_LIBRARIES xmlrpc-epi) endif (WINDOWS) set(XMLRPCEPI_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/cmake/ZLIB.cmake b/indra/cmake/ZLIB.cmake index 48e5130ad5..b99a8644c9 100755 --- a/indra/cmake/ZLIB.cmake +++ b/indra/cmake/ZLIB.cmake @@ -5,9 +5,9 @@ set(ZLIB_FIND_REQUIRED ON) include(Prebuilt) -if (STANDALONE) +if (USESYSTEMLIBS) include(FindZLIB) -else (STANDALONE) +else (USESYSTEMLIBS) use_prebuilt_binary(zlib) if (WINDOWS) set(ZLIB_LIBRARIES @@ -19,4 +19,4 @@ else (STANDALONE) if (WINDOWS OR LINUX) set(ZLIB_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/zlib) endif (WINDOWS OR LINUX) -endif (STANDALONE) +endif (USESYSTEMLIBS) diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index ad4fce6f35..77841918ca 100755 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -34,7 +34,7 @@ #include #include "apr_base64.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include "zlib/zlib.h" // for davep's dirty little zip functions diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp index 614a2d5636..4f2a652044 100755 --- a/indra/llcommon/llsdserialize_xml.cpp +++ b/indra/llcommon/llsdserialize_xml.cpp @@ -35,7 +35,7 @@ extern "C" { -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include "expat/expat.h" diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index e63045659e..436745c5e4 100755 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -33,7 +33,7 @@ #include "llsys.h" #include -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include "zlib/zlib.h" diff --git a/indra/llimage/llimagejpeg.h b/indra/llimage/llimagejpeg.h index 7ac7f5d2e0..3d364551a9 100755 --- a/indra/llimage/llimagejpeg.h +++ b/indra/llimage/llimagejpeg.h @@ -32,7 +32,7 @@ #include "llimage.h" extern "C" { -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include # include #else diff --git a/indra/llmessage/llares.h b/indra/llmessage/llares.h index 800781ee88..675120c621 100755 --- a/indra/llmessage/llares.h +++ b/indra/llmessage/llares.h @@ -39,7 +39,7 @@ # pragma warning(pop) #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 7dcf160c9b..9a6b1e0eb7 100755 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -37,7 +37,7 @@ #include "llvfile.h" #include "llvfs.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include "zlib/zlib.h" diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 34e0483a83..36d9232cca 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -44,7 +44,7 @@ #pragma warning (default : 4264) #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include #else # include "zlib/zlib.h" diff --git a/indra/llui/llxuiparser.cpp b/indra/llui/llxuiparser.cpp index 6322da9123..0b84b9f694 100755 --- a/indra/llui/llxuiparser.cpp +++ b/indra/llui/llxuiparser.cpp @@ -30,7 +30,7 @@ #include "llxmlnode.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include #else #include "expat/expat.h" diff --git a/indra/llxml/llxmlnode.h b/indra/llxml/llxmlnode.h index ec486d7957..c1c0bfe5d0 100755 --- a/indra/llxml/llxmlnode.h +++ b/indra/llxml/llxmlnode.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include #else #include "expat/expat.h" diff --git a/indra/llxml/llxmlparser.h b/indra/llxml/llxmlparser.h index e0f8b69452..a5b210404f 100755 --- a/indra/llxml/llxmlparser.h +++ b/indra/llxml/llxmlparser.h @@ -30,7 +30,7 @@ #ifndef XML_STATIC #define XML_STATIC #endif -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include #else #include "expat/expat.h" diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 17e340d136..deda6f2005 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1455,9 +1455,9 @@ if (WINDOWS) SOURCE_GROUP("Resource Files" FILES ${viewer_RESOURCE_FILES}) - if (NOT STANDALONE) + if (NOT USESYSTEMLIBS) list(APPEND viewer_SOURCE_FILES ${viewer_RESOURCE_FILES}) - endif (NOT STANDALONE) + endif (NOT USESYSTEMLIBS) find_library(DINPUT_LIBRARY dinput8 ${DIRECTX_LIBRARY_DIR}) find_library(DXGUID_LIBRARY dxguid ${DIRECTX_LIBRARY_DIR}) @@ -1568,9 +1568,9 @@ source_group("Character File" FILES ${viewer_CHARACTER_FILES}) set_source_files_properties(${viewer_CHARACTER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if (NOT STANDALONE) +if (NOT USESYSTEMLIBS) list(APPEND viewer_SOURCE_FILES ${viewer_CHARACTER_FILES}) -endif (NOT STANDALONE) +endif (NOT USESYSTEMLIBS) if (WINDOWS) file(GLOB viewer_INSTALLER_FILES installers/windows/*.nsi) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index f667c2bf33..33c900ea74 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -68,7 +68,7 @@ #include "u64.h" #include "llviewertexturelist.h" #include "lldatapacker.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS #include #else #include "zlib/zlib.h" diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 050d9dd785..b9856e3a83 100755 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -35,7 +35,7 @@ #include "llbufferstream.h" #include "llfile.h" #include "llmenugl.h" -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include "expat.h" #else # include "expat/expat.h" diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h index c325d72ba6..5e876fa2ef 100755 --- a/indra/newview/llvoicevivox.h +++ b/indra/newview/llvoicevivox.h @@ -38,7 +38,7 @@ class LLVivoxProtocolParser; #include "llviewerregion.h" #include "llcallingcard.h" // for LLFriendObserver -#ifdef LL_STANDALONE +#ifdef LL_USESYSTEMLIBS # include "expat.h" #else # include "expat/expat.h" -- cgit v1.2.3 From 6908cb20fd9491623aa07b0a82bf94978624ef32 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Fri, 21 Mar 2014 17:14:20 -0400 Subject: remove some obsolete BuildParams entries --- BuildParams | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/BuildParams b/BuildParams index 7a6542dadc..35b1ab2641 100755 --- a/BuildParams +++ b/BuildParams @@ -55,21 +55,9 @@ Amazon_viewer_channel_suffix = "Amazon" Desura_sourceid = "1208_desura" Desura_viewer_channel_suffix = "Desura" -# Report changes since... -viewer-development.show_changes_since = last_sprint - -# Build Settings -viewer-development.build_debug_release_separately = true - # Notifications - to configure email notices, add a setting like this: # _.email = -viewer-release.viewer_channel = "Second Life Release" -viewer-release.build_debug_release_separately = true -viewer-release.build_viewer_update_version_manager = true -viewer-release.codeticket_add_context = false - - # ======================================== # mesh-development # ======================================== @@ -121,25 +109,6 @@ viewer-mesh.viewer_channel = "Project Viewer - Mesh" viewer-mesh.viewer_grid = aditi viewer-mesh.email = shining@lists.lindenlab.com -# ======================================== -# viewer-pathfinding -# ======================================== - -viewer-pathfinding.viewer_channel = "Project Viewer - Pathfinding" -viewer-pathfinding.viewer_grid = agni -viewer-pathfinding.build_debug_release_separately = true -viewer-pathfinding.build_CYGWIN_Debug = false -viewer-pathfinding.build_viewer_update_version_manager = false - -# ======================================== -# viewer-materials -# ======================================== - -viewer-materials.viewer_channel = "Second Life Beta Materials" -viewer-materials.build_debug_release_separately = true -viewer-materials.build_CYGWIN_Debug = false -viewer-materials.build_viewer_update_version_manager = false - # ================================================================= # asset delivery 2010 projects # ================================================================= @@ -194,7 +163,6 @@ runway.build_debug_release_separately = true runway.build_CYGWIN_Debug = false runway.build_viewer_update_version_manager = false - # eof -- cgit v1.2.3 From 8e53c5bfb0e9feffa0450b362f21f56036b9b75c Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Wed, 26 Mar 2014 20:31:05 +0000 Subject: storm-1831 Removing the callback after first region crossing. Prevents repeated callbacks after highlighting has been removed for live script. --- indra/newview/llpreviewscript.cpp | 9 +++------ indra/newview/llpreviewscript.h | 1 + 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 4c6f4fd3ba..84e7a1650d 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -434,7 +434,7 @@ void LLScriptEdCore::updateKeywords() if (mLive) { clearHighlights(); - gAgent.removeRegionChangedCallback(mRegionChangedCallback); + mRegionChangedCallback.disconnect(); } else { @@ -458,9 +458,7 @@ void LLScriptEdCore::processLoaded() void LLScriptEdCore::clearHighlights() { - mEditor->mKeywords.clearLoaded(); mEditor->clearSegments(); - mEditor->mKeywords.clear(); } void LLScriptEdCore::processKeywords() @@ -1309,7 +1307,7 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) LLPreviewLSL::onSearchReplace, self, 0); - + self->mScriptEd->mLive = false; return self->mScriptEd; } @@ -1324,7 +1322,7 @@ LLPreviewLSL::LLPreviewLSL(const LLSD& key ) // virtual BOOL LLPreviewLSL::postBuild() { - const LLInventoryItem* item = getItem(); + const LLInventoryItem* item = getItem(); llassert(item); if (item) @@ -1756,7 +1754,6 @@ void LLPreviewLSL::onLoadComplete( LLVFS *vfs, const LLUUID& asset_uuid, LLAsset //static void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) { - LLLiveLSLEditor *self = (LLLiveLSLEditor*)userdata; self->mScriptEd = new LLScriptEdCore( diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 0841c8188b..dc4f828cf1 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -162,6 +162,7 @@ private: LLScriptEdContainer* mContainer; // parent view public: + boost::signals2::connection mFileFetchedCallback; boost::signals2::connection mRegionChangedCallback; }; -- cgit v1.2.3 From 0fddf9656b5ff704859f590eac9df522cbe39ef0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 27 Mar 2014 20:03:08 -0400 Subject: DRTVWR-363: re-enable commented-out LLNotificationsListener::listChannels() and its caller. --- indra/llui/llnotificationslistener.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 9e8e943ee6..3bbeb3a778 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -42,11 +42,10 @@ LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications "Add a notification with specified [\"name\"], [\"substitutions\"] and [\"payload\"].\n" "If optional [\"reply\"] specified, arrange to send user response on that LLEventPump.", &LLNotificationsListener::requestAdd); - /* add("listChannels", + add("listChannels", "Post to [\"reply\"] a map of info on existing channels", &LLNotificationsListener::listChannels, LLSD().with("reply", LLSD())); - */ add("listChannelNotifications", "Post to [\"reply\"] an array of info on notifications in channel [\"channel\"]", &LLNotificationsListener::listChannelNotifications, @@ -117,15 +116,11 @@ void LLNotificationsListener::NotificationResponder(const std::string& reply_pum reponse_event["response"] = response; LLEventPumps::getInstance()->obtain(reply_pump).post(reponse_event); } -/* + void LLNotificationsListener::listChannels(const LLSD& params) const { LLReqID reqID(params); LLSD response(reqID.makeResponse()); - for (LLNotifications:: - - - for (LLNotifications::ChannelMap::const_iterator cmi(mNotifications.mChannels.begin()), cmend(mNotifications.mChannels.end()); cmi != cmend; ++cmi) @@ -136,7 +131,7 @@ void LLNotificationsListener::listChannels(const LLSD& params) const } LLEventPumps::instance().obtain(params["reply"]).post(response); } -*/ + void LLNotificationsListener::listChannelNotifications(const LLSD& params) const { LLReqID reqID(params); -- cgit v1.2.3 From ba892274b393550be3cc7a25ff0e8f86cc1344a9 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 28 Mar 2014 10:30:03 -0400 Subject: DRTVWR-363: Fix LLNotificationsListener::listChannels() channel walk. LLNotifications::ChannelMap went away when LLNotificationChannel became an LLInstanceTracker subclass. Iterate the universe of channels using LLNotificationChannel::beginInstances(), endInstances() instead. More troubling is that LLNotificationChannel::getParentChannelName() went away too. When LLNotificationChannel acquired a Params block and corresponding constructor, it acquired the ability to listen on multiple upstream sources. That meant that a single mParent string became inapplicable, and its access method was removed. (Curiously, mParent was not itself removed, but it was left unused.) Change mParent to mParents, a vector, built by connectToChannel(). Introduce getParents(), an accessor returning an iterator_range over that vector. Change LLNotificationsListener::listChannels() to collect a "parents" key in the map returned for each channel, and -- for backwards compatibility -- capture the first entry in the "parents" array as "parent". --- indra/llui/llnotifications.cpp | 1 + indra/llui/llnotifications.h | 8 +++++++- indra/llui/llnotificationslistener.cpp | 16 +++++++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 5c288c3f03..99641ae104 100755 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1189,6 +1189,7 @@ void LLNotificationChannel::connectToChannel( const std::string& channel_name ) } else { + mParents.push_back(channel_name); LLNotificationChannelPtr p = LLNotifications::instance().getChannel(channel_name); p->connectChanged(boost::bind(&LLNotificationChannelBase::updateItem, this, _1)); } diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 6ac4a98806..39426d9a89 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -88,6 +88,7 @@ #include #include #include +#include #include "llevents.h" #include "llfunctorregistry.h" @@ -839,6 +840,11 @@ public: typedef LLNotificationSet::iterator Iterator; std::string getName() const { return mName; } + typedef std::vector::const_iterator parents_iter; + boost::iterator_range getParents() const + { + return boost::iterator_range(mParents); + } void connectToChannel(const std::string& channel_name); @@ -853,7 +859,7 @@ public: private: std::string mName; - std::string mParent; + std::vector mParents; }; // An interface class to provide a clean linker seam to the LLNotifications class. diff --git a/indra/llui/llnotificationslistener.cpp b/indra/llui/llnotificationslistener.cpp index 3bbeb3a778..b6a32a0e78 100644 --- a/indra/llui/llnotificationslistener.cpp +++ b/indra/llui/llnotificationslistener.cpp @@ -32,6 +32,7 @@ #include "llnotificationtemplate.h" #include "llsd.h" #include "llui.h" +#include LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) : LLEventAPI("LLNotifications", @@ -121,13 +122,18 @@ void LLNotificationsListener::listChannels(const LLSD& params) const { LLReqID reqID(params); LLSD response(reqID.makeResponse()); - for (LLNotifications::ChannelMap::const_iterator cmi(mNotifications.mChannels.begin()), - cmend(mNotifications.mChannels.end()); + for (LLNotificationChannel::instance_iter cmi(LLNotificationChannel::beginInstances()), + cmend(LLNotificationChannel::endInstances()); cmi != cmend; ++cmi) { - LLSD channelInfo; - channelInfo["parent"] = cmi->second->getParentChannelName(); - response[cmi->first] = channelInfo; + LLSD channelInfo, parents; + BOOST_FOREACH(const std::string& parent, cmi->getParents()) + { + parents.append(parent); + } + channelInfo["parents"] = parents; + channelInfo["parent"] = parents.size()? parents[0] : ""; + response[cmi->getName()] = channelInfo; } LLEventPumps::instance().obtain(params["reply"]).post(response); } -- cgit v1.2.3 From 8bc42784122619e3f37afabbc5888821c3430369 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 28 Mar 2014 17:21:36 +0000 Subject: strom-1831: Cleaning out commented and unused code --- indra/llui/llkeywords.cpp | 10 ---------- indra/llui/llkeywords.h | 1 - indra/newview/llsyntaxid.h | 3 --- 3 files changed, 14 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 82b50f43ab..b495709ce0 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -134,16 +134,6 @@ void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, } } -void LLKeywords::clear() -{ - clearLoaded(); - mSyntax = LLSD(); - - std::for_each(mWordTokenMap.begin(), mWordTokenMap.end(), DeletePairedPointer()); - std::for_each(mLineTokenList.begin(), mLineTokenList.end(), DeletePointer()); - std::for_each(mDelimiterTokenList.begin(), mDelimiterTokenList.end(), DeletePointer()); -} - std::string LLKeywords::getArguments(LLSD& arguments) { std::string argString = ""; diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index de7645a5d2..689fd75bcd 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -110,7 +110,6 @@ public: ~LLKeywords(); void addColorGroup(const std::string key_in, const LLColor4 color); - void clear(); void clearLoaded() { mLoaded = false; } LLColor4 getColorGroup(const std::string key_in); bool isLoaded() const { return mLoaded; } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1b6903f2a2..7d6e120038 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -54,8 +54,6 @@ public: static const std::string SIMULATOR_FEATURE; protected: - //LLViewerRegion* region; - static bool sInitialised; static LLSD sKeywordsXml; static bool sLoaded; @@ -111,7 +109,6 @@ protected: void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } void setFileNameNew(std::string name) { mFileNameNew = name; } -// void setSimulatorFeatureName(const std::string& name) { mSimulatorFeature = name; } }; -- cgit v1.2.3 From 08ca5279ffbf3e47fc42a32e38339ce806df1741 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 28 Mar 2014 21:32:30 +0000 Subject: storm-1831: Fixing the remaining LL_ERRS. --- indra/newview/llsyntaxid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 80511cd73f..14265fd3af 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -412,7 +412,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() } else { - LL_ERRS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; } sLoadFailed = !sLoaded; } -- cgit v1.2.3 From e9266f6f063584c86b9f7eb4ab83549868f148ba Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 31 Mar 2014 16:38:31 +0300 Subject: MAINT-1696 FIXED "Owner" name is not clickable in "Place Profile" dialog if region is group owned --- indra/newview/llpanelplaceprofile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index e501486ecb..d3a7f9bb75 100755 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -483,8 +483,9 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, gCacheName->getGroup(parcel->getGroupID(), boost::bind(&LLPanelPlaceInfo::onNameCache, mRegionGroupText, _2)); - gCacheName->getGroup(parcel->getGroupID(), - boost::bind(&LLPanelPlaceInfo::onNameCache, mParcelOwner, _2)); + std::string owner = + LLSLURL("group", parcel->getGroupID(), "inspect").getSLURLString(); + mParcelOwner->setText(owner); } else { -- cgit v1.2.3 From 33e28d6223e4f27c9b8e5a563e749979dad3a1fd Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 9 Apr 2014 17:06:19 -0700 Subject: MAINT-2034 : Terrain texture changes caused by changing texture elevation ranges or terraforming can not be seen until after relog or teleporting out and back to the region --- indra/newview/llviewerregion.cpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index a271690349..7d16a9664b 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1523,40 +1523,69 @@ void LLViewerRegion::unpackRegionHandshake() { LLUUID tmp_id; + bool changed = false; + + // Get the 4 textures for land msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(0)); compp->setDetailTextureID(0, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(1)); compp->setDetailTextureID(1, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(2)); compp->setDetailTextureID(2, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(3)); compp->setDetailTextureID(3, tmp_id); + // Get the start altitude and range values for land textures F32 tmp_f32; msg->getF32("RegionInfo", "TerrainStartHeight00", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(0)); compp->setStartHeight(0, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight01", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(1)); compp->setStartHeight(1, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight10", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(2)); compp->setStartHeight(2, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight11", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(3)); compp->setStartHeight(3, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange00", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(0)); compp->setHeightRange(0, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange01", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(1)); compp->setHeightRange(1, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange10", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(2)); compp->setHeightRange(2, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange11", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(3)); compp->setHeightRange(3, tmp_f32); // If this is an UPDATE (params already ready, we need to regenerate // all of our terrain stuff, by if (compp->getParamsReady()) { - //this line creates frame stalls on region crossing and removing it appears to have no effect - //getLand().dirtyAllPatches(); + // Update if the land changed + if (changed) + { + getLand().dirtyAllPatches(); + } } else { -- cgit v1.2.3 From e10d5238d651f46b6efbf6eb5dbee3e0a755adec Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 28 Apr 2014 11:48:11 +0300 Subject: MAINT-3957 FIXED Group owner issue --- indra/newview/llpanelgrouproles.cpp | 24 ++++++++++++++---------- indra/newview/llpanelgrouproles.h | 3 +++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 256f12a796..2fcaa5666e 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -427,7 +427,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) if(mSubTabContainer) mSubTabContainer->selectTab(1); - + group_roles_tab->mFirstOpen = TRUE; activate(); } @@ -1825,7 +1825,7 @@ LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab() mMemberVisibleCheck(NULL), mDeleteRoleButton(NULL), mCreateRoleButton(NULL), - + mFirstOpen(TRUE), mHasRoleChange(FALSE) { } @@ -1927,6 +1927,7 @@ void LLPanelGroupRolesSubTab::deactivate() LL_DEBUGS() << "LLPanelGroupRolesSubTab::deactivate()" << LL_ENDL; LLPanelGroupSubTab::deactivate(); + mFirstOpen = FALSE; } bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) @@ -1950,7 +1951,7 @@ bool LLPanelGroupRolesSubTab::apply(std::string& mesg) LL_DEBUGS() << "LLPanelGroupRolesSubTab::apply()" << LL_ENDL; saveRoleChanges(true); - + mFirstOpen = FALSE; LLGroupMgr::getInstance()->sendGroupRoleChanges(mGroupID); notifyObservers(); @@ -2087,14 +2088,17 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) } } - if (!gdatap || !gdatap->isMemberDataComplete()) - { - LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); - } - - if (!gdatap || !gdatap->isRoleMemberDataComplete()) + if(!mFirstOpen) { - LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); + if (!gdatap || !gdatap->isMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mGroupID); + } + + if (!gdatap || !gdatap->isRoleMemberDataComplete()) + { + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mGroupID); + } } if ((GC_ROLE_MEMBER_DATA == gc || GC_MEMBER_DATA == gc) diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 26f1dff007..052f1d2071 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -268,6 +268,9 @@ public: void saveRoleChanges(bool select_saved_role); virtual void setGroupID(const LLUUID& id); + + BOOL mFirstOpen; + protected: void handleActionCheck(LLUICtrl* ctrl, bool force); LLSD createRoleItem(const LLUUID& role_id, std::string name, std::string title, S32 members); -- cgit v1.2.3 From efc9422d1b87f2ccf191acde107652102ebf95d0 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Thu, 29 May 2014 03:24:13 +0300 Subject: MAINT-3351 FIXED Misleading failure message when user is successfully removed from a group's Owners role --- indra/newview/llgroupmgr.cpp | 5 +++++ indra/newview/llgroupmgr.h | 2 ++ indra/newview/llpanelgroup.cpp | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 83ce2b0483..081f47df41 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -611,6 +611,11 @@ void LLGroupMgrGroupData::recalcAgentPowers(const LLUUID& agent_id) } } +bool LLGroupMgrGroupData::isSingleMemberNotOwner() +{ + return mMembers.size() == 1 && !mMembers.begin()->second->isOwner(); +} + bool packRoleUpdateMessageBlock(LLMessageSystem* msg, const LLUUID& group_id, const LLUUID& role_id, diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 9e1c1eec90..2b4c9700be 100755 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -254,6 +254,8 @@ public: bool isRoleMemberDataComplete() { return mRoleMemberDataComplete; } bool isGroupPropertiesDataComplete() { return mGroupPropertiesDataComplete; } + bool isSingleMemberNotOwner(); + F32 getAccessTime() const { return mAccessTime; } void setAccessed(); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index bf332d1ca7..f4aab6bd4e 100755 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -49,6 +49,7 @@ #include "llpanelgroupnotices.h" #include "llpanelgroupgeneral.h" +#include "llpanelgrouproles.h" #include "llaccordionctrltab.h" #include "llaccordionctrl.h" @@ -275,6 +276,7 @@ void LLPanelGroup::onBtnApply(void* user_data) { LLPanelGroup* self = static_cast(user_data); self->apply(); + self->refreshData(); } void LLPanelGroup::onBtnGroupCallClicked(void* user_data) @@ -497,6 +499,22 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab) { //we skip refreshing group after ew manually apply changes since its very annoying //for those who are editing group + + LLPanelGroupRoles * roles_tab = dynamic_cast(tab); + if (roles_tab) + { + LLGroupMgr* gmgrp = LLGroupMgr::getInstance(); + LLGroupMgrGroupData* gdatap = gmgrp->getGroupData(roles_tab->getGroupID()); + + // allow refresh only for one specific case: + // there is only one member in group and it is not owner + // it's a wrong situation and need refresh panels from server + if (gdatap && gdatap->isSingleMemberNotOwner()) + { + return true; + } + } + mSkipRefresh = TRUE; return true; } -- cgit v1.2.3 From f0eb544148456f05bd1c6390542192911df32364 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 4 Jun 2014 18:38:01 +0300 Subject: MAINT-3386 FIXED [vwr] Banned Agents list does not show newly-banned residents --- indra/newview/llgroupmgr.cpp | 38 ++++++++++++++++++++++++++++++----- indra/newview/llgroupmgr.h | 5 +++-- indra/newview/llpanelgroupbulkban.cpp | 2 +- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 081f47df41..0801568a93 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1866,12 +1866,20 @@ void LLGroupMgr::sendGroupMemberEjects(const LLUUID& group_id, class GroupBanDataResponder : public LLHTTPClient::Responder { public: - GroupBanDataResponder() {} + GroupBanDataResponder(const LLUUID& gropup_id, BOOL force_refresh=false); virtual ~GroupBanDataResponder() {} virtual void result(const LLSD& pContent); virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent); +private: + LLUUID mGroupID; + BOOL mForceRefresh; }; +GroupBanDataResponder::GroupBanDataResponder(const LLUUID& gropup_id, BOOL force_refresh) : + mGroupID(gropup_id), + mForceRefresh(force_refresh) +{} + void GroupBanDataResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent) { LL_WARNS("GrpMgr") << "Error receiving group member data [status:" @@ -1880,12 +1888,32 @@ void GroupBanDataResponder::errorWithContent(U32 pStatus, const std::string& pRe void GroupBanDataResponder::result(const LLSD& content) { - LLGroupMgr::processGroupBanRequest(content); + if ( content.size()) + { + if (content.has("ban_list")) + { + // group data received + LLGroupMgr::processGroupBanRequest(content); + } + // no group data received, this is either CREATE or DELETE operation + // complete confirmation. Local data may be obsolete. + else if (mForceRefresh) + { + // providing mGroupId and not extracting it from content since it is not + // included into CREATE and DELETE responses + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); + } + } + else + { + LL_WARNS("GrpMgr") << "No group member data received." << LL_ENDL; + return; + } } void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, const LLUUID& group_id, - EBanRequestAction ban_action, /* = BAN_NO_ACTION */ + U32 ban_action, /* = BAN_NO_ACTION */ const std::vector ban_list) /* = std::vector() */ { LLViewerRegion* currentRegion = gAgent.getRegion(); @@ -1911,7 +1939,7 @@ void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, cap_url += "?group_id=" + group_id.asString(); LLSD body = LLSD::emptyMap(); - body["ban_action"] = ban_action; + body["ban_action"] = (LLSD::Integer)(ban_action & ~BAN_UPDATE); // Add our list of potential banned residents to the list body["ban_ids"] = LLSD::emptyArray(); LLSD ban_entry; @@ -1923,7 +1951,7 @@ void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, body["ban_ids"].append(ban_entry); } - LLHTTPClient::ResponderPtr grp_ban_responder = new GroupBanDataResponder(); + LLHTTPClient::ResponderPtr grp_ban_responder = new GroupBanDataResponder(group_id, ban_action & BAN_UPDATE); switch(request_type) { case REQUEST_GET: diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 2b4c9700be..970d6d5a2d 100755 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -356,7 +356,8 @@ public: { BAN_NO_ACTION = 0, BAN_CREATE = 1, - BAN_DELETE = 2 + BAN_DELETE = 2, + BAN_UPDATE = 4 }; public: @@ -395,7 +396,7 @@ public: static void sendGroupBanRequest(EBanRequestType request_type, const LLUUID& group_id, - EBanRequestAction ban_action = BAN_NO_ACTION, + U32 ban_action = BAN_NO_ACTION, const uuid_vec_t ban_list = uuid_vec_t()); static void processGroupBanRequest(const LLSD& content); diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index 5b9dc21f20..0b57233f47 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -136,7 +136,7 @@ void LLPanelGroupBulkBan::submit() return; } - LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE, banned_agent_list); + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list); LLGroupMgr::getInstance()->sendGroupMemberEjects(mImplementation->mGroupID, banned_agent_list); //then close -- cgit v1.2.3 From a0b31c3145b25c1267954dd42d2afa916e5fa046 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 6 Jun 2014 07:41:01 +0300 Subject: MAINT-3389 FIXED [vwr] No visual feedback if you try to ban an already banned agent. --- indra/newview/llpanelgroupbulkban.cpp | 25 ++++++++++++++++++++++ .../skins/default/xui/en/panel_group_bulk_ban.xml | 4 ++++ 2 files changed, 29 insertions(+) diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index 0b57233f47..a31396737d 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -48,6 +48,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupBulk(group_id) { @@ -136,6 +137,30 @@ void LLPanelGroupBulkBan::submit() return; } + LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); + if (group_datap) + { + BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList) + { + const LLUUID& group_ban_agent_id = group_ban_pair.first; + if (std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id) != banned_agent_list.end()) + { + // Fail! + LLAvatarName av_name; + LLAvatarNameCache::get(group_ban_agent_id, &av_name); + + LLStringUtil::format_map_t string_args; + string_args["[RESIDENT]"] = av_name.getDisplayName(); + + LLSD msg; + msg["MESSAGE"] = getString("already_banned", string_args); + LLNotificationsUtil::add("GenericAlert", msg); + (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); + return; + } + } + } + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list); LLGroupMgr::getInstance()->sendGroupMemberEjects(mImplementation->mGroupID, banned_agent_list); diff --git a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml index 8dd2719926..43449df1fd 100644 --- a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml +++ b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml @@ -15,6 +15,10 @@ name="ban_selection_too_large"> Group bans not sent: too many Residents selected. Group bans are limited to 100 per request. + + Group Invitations not sent: resident '[RESIDENT]' already banned. + Date: Tue, 10 Jun 2014 20:11:30 +0300 Subject: Import llpanelgroupinvite from viewer_lion --- indra/newview/llpanelgroupinvite.cpp | 685 +++++++++++++++++++++++++++-------- indra/newview/llpanelgroupinvite.h | 29 +- 2 files changed, 543 insertions(+), 171 deletions(-) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index f3833ed6e4..a9a3c686a6 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -26,8 +26,6 @@ #include "llviewerprecompiledheaders.h" #include "llpanelgroupinvite.h" -#include "llpanelgroupbulk.h" -#include "llpanelgroupbulkimpl.h" #include "llagent.h" #include "llavatarnamecache.h" @@ -47,221 +45,203 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" - -bool invite_owner_callback(LLHandle panel_handle, const LLSD& notification, const LLSD& response) +class LLPanelGroupInvite::impl { - LLPanelGroupInvite* panel = dynamic_cast(panel_handle.get()); - if(!panel) - return false; - - S32 option = LLNotificationsUtil::getSelectedOption(notification, response); - switch(option) - { - case 0: - // user confirmed that they really want a new group owner - panel->mImplementation->mConfirmedOwnerInvite = true; - panel->submit(); - break; - case 1: - // fall through - default: - break; - } - return false; -} - - -LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id) : LLPanelGroupBulk(group_id) +public: + impl(const LLUUID& group_id); + ~impl(); + + void addUsers(const std::vector& names, + const uuid_vec_t& agent_ids); + void submitInvitations(); + void addRoleNames(LLGroupMgrGroupData* gdatap); + void handleRemove(); + void handleSelection(); + + static void callbackClickCancel(void* userdata); + static void callbackClickOK(void* userdata); + static void callbackClickAdd(void* userdata); + static void callbackClickRemove(void* userdata); + static void callbackSelect(LLUICtrl* ctrl, void* userdata); + static void callbackAddUsers(const uuid_vec_t& agent_ids, + void* user_data); + + static void onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name, + void* user_data); + + bool inviteOwnerCallback(const LLSD& notification, const LLSD& response); + +public: + LLUUID mGroupID; + + std::string mLoadingText; + LLNameListCtrl *mInvitees; + LLComboBox *mRoleNames; + LLButton *mOKButton; + LLButton *mRemoveButton; + LLTextBox *mGroupName; + std::string mOwnerWarning; + std::string mAlreadyInGroup; + std::string mTooManySelected; + bool mConfirmedOwnerInvite; + std::set mInviteeIDs; + + void (*mCloseCallback)(void* data); + + void* mCloseCallbackUserData; + + boost::signals2::connection mAvatarNameCacheConnection; +}; + + +LLPanelGroupInvite::impl::impl(const LLUUID& group_id): + mGroupID( group_id ), + mLoadingText (), + mInvitees ( NULL ), + mRoleNames( NULL ), + mOKButton ( NULL ), + mRemoveButton( NULL ), + mGroupName( NULL ), + mConfirmedOwnerInvite( false ), + mCloseCallback( NULL ), + mCloseCallbackUserData( NULL ), + mAvatarNameCacheConnection() { - // Pass on construction of this panel to the control factory. - buildFromFile( "panel_group_invite.xml"); } -void LLPanelGroupInvite::clear() +LLPanelGroupInvite::impl::~impl() { - LLPanelGroupBulk::clear(); - - if(mImplementation->mRoleNames) + if (mAvatarNameCacheConnection.connected()) { - mImplementation->mRoleNames->clear(); - mImplementation->mRoleNames->removeall(); - mImplementation->mRoleNames->setCurrentByID(LLUUID::null); + mAvatarNameCacheConnection.disconnect(); } } -void LLPanelGroupInvite::update() -{ - LLPanelGroupBulk::update(); - - if(mImplementation->mRoleNames) - { - LLUUID store_selected_role = mImplementation->mRoleNames->getCurrentID(); - mImplementation->mRoleNames->clear(); - mImplementation->mRoleNames->removeall(); - mImplementation->mRoleNames->setCurrentByID(LLUUID::null); - - if(!mPendingRoleDataUpdate && !mPendingMemberDataUpdate) - { - ////////////////////////////////////////////////////////////////////////// - // Add role names - addRoleNames(); - //////////////////////////////////////////////////////////////////////////// - mImplementation->mRoleNames->setCurrentByID(store_selected_role); - } - else - { - mImplementation->mRoleNames->add(mImplementation->mLoadingText, LLUUID::null, ADD_BOTTOM); - } - - } -} +const S32 MAX_GROUP_INVITES = 100; // Max invites per request. 100 to match server cap. -BOOL LLPanelGroupInvite::postBuild() +void LLPanelGroupInvite::impl::addUsers(const std::vector& names, + const uuid_vec_t& agent_ids) { - BOOL recurse = TRUE; + std::string name; + LLUUID id; - mImplementation->mLoadingText = getString("loading"); - mImplementation->mRoleNames = getChild("role_name", - recurse); - mImplementation->mGroupName = getChild("group_name_text", recurse); - mImplementation->mBulkAgentList = getChild("invitee_list", recurse); - if ( mImplementation->mBulkAgentList ) + if (names.size() + mInviteeIDs.size() > MAX_GROUP_INVITES) { - mImplementation->mBulkAgentList->setCommitOnSelectionChange(TRUE); - mImplementation->mBulkAgentList->setCommitCallback(LLPanelGroupBulkImpl::callbackSelect, mImplementation); + // Fail! Show a warning and don't add any names. + LLSD msg; + msg["MESSAGE"] = mTooManySelected; + LLNotificationsUtil::add("GenericAlert", msg); + return; } - LLButton* button = getChild("add_button", recurse); - if ( button ) + for (S32 i = 0; i < (S32)names.size(); i++) { - // default to opening avatarpicker automatically - // (*impl::callbackClickAdd)((void*)this); - button->setClickedCallback(LLPanelGroupBulkImpl::callbackClickAdd, this); - } + name = names[i]; + id = agent_ids[i]; - mImplementation->mRemoveButton = - getChild("remove_button", recurse); - if ( mImplementation->mRemoveButton ) - { - mImplementation->mRemoveButton->setClickedCallback(LLPanelGroupBulkImpl::callbackClickRemove, mImplementation); - mImplementation->mRemoveButton->setEnabled(FALSE); - } + // Make sure this agent isn't already in the list. + if (mInviteeIDs.find(id) != mInviteeIDs.end()) + { + continue; + } - mImplementation->mOKButton = getChild("invite_button", recurse); - if ( mImplementation->mOKButton ) - { - mImplementation->mOKButton->setClickedCallback(LLPanelGroupInvite::callbackClickSubmit, this); - mImplementation->mOKButton->setEnabled(FALSE); - } + //add the name to the names list + LLSD row; + row["id"] = id; + row["columns"][0]["value"] = name; - button = getChild("cancel_button", recurse); - if ( button ) - { - button->setClickedCallback(LLPanelGroupBulkImpl::callbackClickCancel, mImplementation); + mInvitees->addElement(row); + mInviteeIDs.insert(id); } - - mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); - mImplementation->mAlreadyInGroup = getString("already_in_group"); - mImplementation->mTooManySelected = getString("invite_selection_too_large"); - - update(); - - return (mImplementation->mRoleNames && - mImplementation->mBulkAgentList && - mImplementation->mRemoveButton); -} - -void LLPanelGroupInvite::callbackClickSubmit(void* userdata) -{ - LLPanelGroupInvite* selfp = (LLPanelGroupInvite*)userdata; - - if(selfp) - selfp->submit(); } -void LLPanelGroupInvite::submit() +void LLPanelGroupInvite::impl::submitInvitations() { std::map role_member_pairs; - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); - if(!gdatap) - { - LL_WARNS("Groups") << "Unable to get group data for group " << mImplementation->mGroupID << LL_ENDL; - return; - } + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); // Default to everyone role. LLUUID role_id = LLUUID::null; - if (mImplementation->mRoleNames) + if (mRoleNames) { - role_id = mImplementation->mRoleNames->getCurrentID(); - - //LLUUID t_ownerUUID = gdatap->mOwnerRole; - //bool t_confirmInvite = mImplementation->mConfirmedOwnerInvite; - + role_id = mRoleNames->getCurrentID(); + // owner role: display confirmation and wait for callback - if ((role_id == gdatap->mOwnerRole) && (!mImplementation->mConfirmedOwnerInvite)) + if ((role_id == gdatap->mOwnerRole) && (!mConfirmedOwnerInvite)) { LLSD args; - args["MESSAGE"] = mImplementation->mOwnerWarning; - LLNotificationsUtil::add( "GenericAlertYesCancel", - args, - LLSD(), - boost::bind(invite_owner_callback, - this->getHandle(), - _1, _2)); + args["MESSAGE"] = mOwnerWarning; + LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2)); return; // we'll be called again if user confirms } } bool already_in_group = false; //loop over the users - std::vector items = mImplementation->mBulkAgentList->getAllData(); + std::vector items = mInvitees->getAllData(); for (std::vector::iterator iter = items.begin(); - iter != items.end(); ++iter) + iter != items.end(); ++iter) { LLScrollListItem* item = *iter; - if(LLGroupActions::isAvatarMemberOfGroup(mImplementation->mGroupID, item->getUUID())) + if(LLGroupActions::isAvatarMemberOfGroup(mGroupID, item->getUUID())) { already_in_group = true; continue; } role_member_pairs[item->getUUID()] = role_id; } - - if (role_member_pairs.size() > LLPanelGroupBulkImpl::MAX_GROUP_INVITES) + + if (role_member_pairs.size() > MAX_GROUP_INVITES) { // Fail! LLSD msg; - msg["MESSAGE"] = mImplementation->mTooManySelected; + msg["MESSAGE"] = mTooManySelected; LLNotificationsUtil::add("GenericAlert", msg); - (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); + (*mCloseCallback)(mCloseCallbackUserData); return; } - LLGroupMgr::getInstance()->sendGroupMemberInvites(mImplementation->mGroupID, role_member_pairs); - + LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs); + if(already_in_group) { LLSD msg; - msg["MESSAGE"] = mImplementation->mAlreadyInGroup; + msg["MESSAGE"] = mAlreadyInGroup; LLNotificationsUtil::add("GenericAlert", msg); } //then close - (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); + (*mCloseCallback)(mCloseCallbackUserData); } -void LLPanelGroupInvite::addRoleNames() +bool LLPanelGroupInvite::impl::inviteOwnerCallback(const LLSD& notification, const LLSD& response) { - LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); - if(!gdatap) + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + switch(option) { - return; + case 0: + // user confirmed that they really want a new group owner + mConfirmedOwnerInvite = true; + submitInvitations(); + break; + case 1: + // fall through + default: + break; } + return false; +} + - LLGroupMgrGroupData::member_list_t::iterator agent_iter = gdatap->mMembers.find(gAgent.getID()); + +void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) +{ + LLGroupMgrGroupData::member_list_t::iterator agent_iter = + gdatap->mMembers.find(gAgent.getID()); //get the member data for the agent if it exists if ( agent_iter != gdatap->mMembers.end() ) @@ -271,7 +251,7 @@ void LLPanelGroupInvite::addRoleNames() //loop over the agent's roles in the group //then add those roles to the list of roles that the agent //can invite people to be - if ( member_data && mImplementation->mRoleNames) + if ( member_data && mRoleNames) { //if the user is the owner then we add //all of the roles in the group @@ -280,11 +260,11 @@ void LLPanelGroupInvite::addRoleNames() //else if they have the limited add to roles power //we add every role the user is in //else we just add to everyone - bool is_owner = member_data->isOwner(); - bool can_assign_any = gAgent.hasPowerInGroup(mImplementation->mGroupID, - GP_ROLE_ASSIGN_MEMBER); - bool can_assign_limited = gAgent.hasPowerInGroup(mImplementation->mGroupID, - GP_ROLE_ASSIGN_MEMBER_LIMITED); + bool is_owner = member_data->isInRole(gdatap->mOwnerRole); + bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, + GP_ROLE_ASSIGN_MEMBER); + bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, + GP_ROLE_ASSIGN_MEMBER_LIMITED); LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.begin(); LLGroupMgrGroupData::role_list_t::iterator end = gdatap->mRoles.end(); @@ -299,18 +279,401 @@ void LLPanelGroupInvite::addRoleNames() // Owners can add any role. if ( is_owner // Even 'can_assign_any' can't add owner role. - || (can_assign_any && role_id != gdatap->mOwnerRole) + || (can_assign_any && role_id != gdatap->mOwnerRole) // Add all roles user is in - || (can_assign_limited && member_data->isInRole(role_id)) + || (can_assign_limited && member_data->isInRole(role_id)) // Everyone role. - || role_id == LLUUID::null ) + || role_id == LLUUID::null ) { - mImplementation->mRoleNames->add(rd.mRoleName, - role_id, - ADD_BOTTOM); + mRoleNames->add(rd.mRoleName, + role_id, + ADD_BOTTOM); } } } }//end if member data is not null }//end if agent is in the group } + +//static +void LLPanelGroupInvite::impl::callbackClickAdd(void* userdata) +{ + LLPanelGroupInvite* panelp = (LLPanelGroupInvite*) userdata; + + if ( panelp ) + { + //Right now this is hard coded with some knowledge that it is part + //of a floater since the avatar picker needs to be added as a dependent + //floater to the parent floater. + //Soon the avatar picker will be embedded into this panel + //instead of being it's own separate floater. But that is next week. + //This will do for now. -jwolk May 10, 2006 + LLView * button = panelp->findChild("add_button"); + LLFloater * root_floater = gFloaterView->getParentFloater(panelp); + LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show( + boost::bind(impl::callbackAddUsers, _1, panelp->mImplementation), TRUE, FALSE, FALSE, root_floater->getName(), button); + if (picker) + { + root_floater->addDependentFloater(picker); + } + } +} + +//static +void LLPanelGroupInvite::impl::callbackClickRemove(void* userdata) +{ + impl* selfp = (impl*) userdata; + + if ( selfp ) selfp->handleRemove(); +} + +void LLPanelGroupInvite::impl::handleRemove() +{ + // Check if there is anything selected. + std::vector selection = + mInvitees->getAllSelected(); + if (selection.empty()) return; + + std::vector::iterator iter; + for(iter = selection.begin(); iter != selection.end(); ++iter) + { + mInviteeIDs.erase( (*iter)->getUUID() ); + } + + // Remove all selected invitees. + mInvitees->deleteSelectedItems(); + mRemoveButton->setEnabled(FALSE); +} + +// static +void LLPanelGroupInvite::impl::callbackSelect( + LLUICtrl* ctrl, void* userdata) +{ + impl* selfp = (impl*) userdata; + if ( selfp ) selfp->handleSelection(); +} + +void LLPanelGroupInvite::impl::handleSelection() +{ + // Check if there is anything selected. + std::vector selection = + mInvitees->getAllSelected(); + if (selection.empty()) + { + mRemoveButton->setEnabled(FALSE); + } + else + { + mRemoveButton->setEnabled(TRUE); + } +} + +void LLPanelGroupInvite::impl::callbackClickCancel(void* userdata) +{ + impl* selfp = (impl*) userdata; + + if ( selfp ) + { + (*(selfp->mCloseCallback))(selfp->mCloseCallbackUserData); + } +} + +void LLPanelGroupInvite::impl::callbackClickOK(void* userdata) +{ + impl* selfp = (impl*) userdata; + + if ( selfp ) selfp->submitInvitations(); +} + + + +//static +void LLPanelGroupInvite::impl::callbackAddUsers(const uuid_vec_t& agent_ids, void* user_data) +{ + std::vector names; + for (S32 i = 0; i < (S32)agent_ids.size(); i++) + { + LLAvatarName av_name; + if (LLAvatarNameCache::get(agent_ids[i], &av_name)) + { + LLPanelGroupInvite::impl::onAvatarNameCache(agent_ids[i], av_name, user_data); + } + else + { + impl* selfp = (impl*) user_data; + if (selfp) + { + if (selfp->mAvatarNameCacheConnection.connected()) + { + selfp->mAvatarNameCacheConnection.disconnect(); + } + // *TODO : Add a callback per avatar name being fetched. + selfp->mAvatarNameCacheConnection = LLAvatarNameCache::get(agent_ids[i],boost::bind(&LLPanelGroupInvite::impl::onAvatarNameCache, _1, _2, user_data)); + } + } + } + +} + +void LLPanelGroupInvite::impl::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name, + void* user_data) +{ + impl* selfp = (impl*) user_data; + + if (selfp) + { + if (selfp->mAvatarNameCacheConnection.connected()) + { + selfp->mAvatarNameCacheConnection.disconnect(); + } + std::vector names; + uuid_vec_t agent_ids; + agent_ids.push_back(agent_id); + names.push_back(av_name.getCompleteName()); + + selfp->addUsers(names, agent_ids); + } +} + + +LLPanelGroupInvite::LLPanelGroupInvite(const LLUUID& group_id) + : LLPanel(), + mImplementation(new impl(group_id)), + mPendingUpdate(FALSE) +{ + // Pass on construction of this panel to the control factory. + buildFromFile( "panel_group_invite.xml"); +} + +LLPanelGroupInvite::~LLPanelGroupInvite() +{ + delete mImplementation; +} + +void LLPanelGroupInvite::setCloseCallback(void (*close_callback)(void*), + void* data) +{ + mImplementation->mCloseCallback = close_callback; + mImplementation->mCloseCallbackUserData = data; +} + +void LLPanelGroupInvite::clear() +{ + mStoreSelected = LLUUID::null; + mImplementation->mInvitees->deleteAllItems(); + mImplementation->mRoleNames->clear(); + mImplementation->mRoleNames->removeall(); + mImplementation->mOKButton->setEnabled(FALSE); + mImplementation->mInviteeIDs.clear(); +} + +void LLPanelGroupInvite::addUsers(uuid_vec_t& agent_ids) +{ + std::vector names; + for (S32 i = 0; i < (S32)agent_ids.size(); i++) + { + std::string fullname; + LLUUID agent_id = agent_ids[i]; + LLViewerObject* dest = gObjectList.findObject(agent_id); + if(dest && dest->isAvatar()) + { + LLNameValue* nvfirst = dest->getNVPair("FirstName"); + LLNameValue* nvlast = dest->getNVPair("LastName"); + if(nvfirst && nvlast) + { + fullname = LLCacheName::buildFullName( + nvfirst->getString(), nvlast->getString()); + + } + if (!fullname.empty()) + { + names.push_back(fullname); + } + else + { + llwarns << "llPanelGroupInvite: Selected avatar has no name: " << dest->getID() << llendl; + names.push_back("(Unknown)"); + } + } + else + { + //looks like user try to invite offline friend + //for offline avatar_id gObjectList.findObject() will return null + //so we need to do this additional search in avatar tracker, see EXT-4732 + if (LLAvatarTracker::instance().isBuddy(agent_id)) + { + LLAvatarName av_name; + if (!LLAvatarNameCache::get(agent_id, &av_name)) + { + // actually it should happen, just in case + //LLAvatarNameCache::get(LLUUID(agent_id), boost::bind(&LLPanelGroupInvite::addUserCallback, this, _1, _2)); + // for this special case! + //when there is no cached name we should remove resident from agent_ids list to avoid breaking of sequence + // removed id will be added in callback + agent_ids.erase(agent_ids.begin() + i); + } + else + { + names.push_back(av_name.getAccountName()); + } + } + } + } + mImplementation->addUsers(names, agent_ids); +} + +void LLPanelGroupInvite::addUserCallback(const LLUUID& id, const LLAvatarName& av_name) +{ + std::vector names; + uuid_vec_t agent_ids; + agent_ids.push_back(id); + names.push_back(av_name.getAccountName()); + + mImplementation->addUsers(names, agent_ids); +} + +void LLPanelGroupInvite::draw() +{ + LLPanel::draw(); + if (mPendingUpdate) + { + updateLists(); + } +} + +void LLPanelGroupInvite::update() +{ + mPendingUpdate = FALSE; + if (mImplementation->mGroupName) + { + mImplementation->mGroupName->setText(mImplementation->mLoadingText); + } + if ( mImplementation->mRoleNames ) + { + mStoreSelected = mImplementation->mRoleNames->getCurrentID(); + mImplementation->mRoleNames->clear(); + mImplementation->mRoleNames->removeall(); + mImplementation->mRoleNames->add(mImplementation->mLoadingText, LLUUID::null, ADD_BOTTOM); + mImplementation->mRoleNames->setCurrentByID(LLUUID::null); + } + + updateLists(); +} + +void LLPanelGroupInvite::updateLists() +{ + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); + bool waiting = false; + + if (gdatap) + { + if (gdatap->isGroupPropertiesDataComplete()) + { + if (mImplementation->mGroupName) + { + mImplementation->mGroupName->setText(gdatap->mName); + } + } + else + { + waiting = true; + } + if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete()) + { + if ( mImplementation->mRoleNames ) + { + mImplementation->mRoleNames->clear(); + mImplementation->mRoleNames->removeall(); + + //add the role names and select the everybody role by default + mImplementation->addRoleNames(gdatap); + mImplementation->mRoleNames->setCurrentByID(mStoreSelected); + } + } + else + { + waiting = true; + } + } + else + { + waiting = true; + } + + if (waiting) + { + if (!mPendingUpdate) + { + LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID); + LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID); + LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID); + } + mPendingUpdate = TRUE; + } + else + { + mPendingUpdate = FALSE; + if (mImplementation->mOKButton && mImplementation->mRoleNames->getItemCount()) + { + mImplementation->mOKButton->setEnabled(TRUE); + } + } +} + +BOOL LLPanelGroupInvite::postBuild() +{ + BOOL recurse = TRUE; + + mImplementation->mLoadingText = getString("loading"); + mImplementation->mRoleNames = getChild("role_name", + recurse); + mImplementation->mGroupName = getChild("group_name_text", recurse); + mImplementation->mInvitees = + getChild("invitee_list", recurse); + if ( mImplementation->mInvitees ) + { + mImplementation->mInvitees->setCommitOnSelectionChange(TRUE); + mImplementation->mInvitees->setCommitCallback(impl::callbackSelect, mImplementation); + } + + LLButton* button = getChild("add_button", recurse); + if ( button ) + { + // default to opening avatarpicker automatically + // (*impl::callbackClickAdd)((void*)this); + button->setClickedCallback(impl::callbackClickAdd, this); + } + + mImplementation->mRemoveButton = + getChild("remove_button", recurse); + if ( mImplementation->mRemoveButton ) + { + mImplementation->mRemoveButton->setClickedCallback(impl::callbackClickRemove, mImplementation); + mImplementation->mRemoveButton->setEnabled(FALSE); + } + + mImplementation->mOKButton = + getChild("ok_button", recurse); + if ( mImplementation->mOKButton ) + { + mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation); + mImplementation->mOKButton->setEnabled(FALSE); + } + + button = getChild("cancel_button", recurse); + if ( button ) + { + button->setClickedCallback(impl::callbackClickCancel, mImplementation); + } + + mImplementation->mOwnerWarning = getString("confirm_invite_owner_str"); + mImplementation->mAlreadyInGroup = getString("already_in_group"); + mImplementation->mTooManySelected = getString("invite_selection_too_large"); + + update(); + + return (mImplementation->mRoleNames && + mImplementation->mInvitees && + mImplementation->mRemoveButton); +} diff --git a/indra/newview/llpanelgroupinvite.h b/indra/newview/llpanelgroupinvite.h index b87a5883b8..9f7b5ae9be 100755 --- a/indra/newview/llpanelgroupinvite.h +++ b/indra/newview/llpanelgroupinvite.h @@ -27,27 +27,36 @@ #define LL_LLPANELGROUPINVITE_H #include "llpanel.h" -#include "llpanelgroupbulk.h" #include "lluuid.h" class LLAvatarName; -class LLPanelGroupInvite : public LLPanelGroupBulk +class LLPanelGroupInvite +: public LLPanel { public: LLPanelGroupInvite(const LLUUID& group_id); - ~LLPanelGroupInvite() {}; + ~LLPanelGroupInvite(); - virtual void clear(); - virtual void update(); + void addUsers(uuid_vec_t& agent_ids); + /** + * this callback is being used to add a user whose fullname isn't been loaded before invoking of addUsers(). + */ + void addUserCallback(const LLUUID& id, const LLAvatarName& av_name); + void clear(); + void update(); - virtual BOOL postBuild(); + void setCloseCallback(void (*close_callback)(void*), void* data); - static void callbackClickSubmit(void* userdata); - virtual void submit(); + virtual void draw(); + virtual BOOL postBuild(); +protected: + class impl; + impl* mImplementation; -private: - void addRoleNames(); + BOOL mPendingUpdate; + LLUUID mStoreSelected; + void updateLists(); }; #endif -- cgit v1.2.3 From dc44604484294d49c4821282315d826972481e6c Mon Sep 17 00:00:00 2001 From: andreylproductengine Date: Thu, 10 Apr 2014 07:05:34 +0300 Subject: MAINT-4133 FIXED Import llpanelgroupinvite.cpp from viewer_lion to voorhees_groupban: import of changes for MAINT-3846. --- indra/newview/llpanelgroupinvite.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index a9a3c686a6..bb4bfb2f96 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -260,7 +260,7 @@ void LLPanelGroupInvite::impl::addRoleNames(LLGroupMgrGroupData* gdatap) //else if they have the limited add to roles power //we add every role the user is in //else we just add to everyone - bool is_owner = member_data->isInRole(gdatap->mOwnerRole); + bool is_owner = member_data->isOwner(); bool can_assign_any = gAgent.hasPowerInGroup(mGroupID, GP_ROLE_ASSIGN_MEMBER); bool can_assign_limited = gAgent.hasPowerInGroup(mGroupID, @@ -579,7 +579,7 @@ void LLPanelGroupInvite::updateLists() { waiting = true; } - if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete()) + if (gdatap->isRoleDataComplete() && gdatap->isMemberDataComplete() && gdatap->isRoleMemberDataComplete()) { if ( mImplementation->mRoleNames ) { @@ -607,6 +607,7 @@ void LLPanelGroupInvite::updateLists() { LLGroupMgr::getInstance()->sendGroupPropertiesRequest(mImplementation->mGroupID); LLGroupMgr::getInstance()->sendGroupRoleDataRequest(mImplementation->mGroupID); + LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(mImplementation->mGroupID); LLGroupMgr::getInstance()->sendCapGroupMembersRequest(mImplementation->mGroupID); } mPendingUpdate = TRUE; -- cgit v1.2.3 From c1cd375517c50cb697ef4babd56526f3162420b1 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Fri, 11 Apr 2014 16:18:32 +0300 Subject: MAINT-3698 Typo is fixed --- indra/newview/skins/default/xui/en/floater_report_abuse.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index 24f95950d8..3912daad05 100755 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -241,7 +241,7 @@ name="Indecency__Inappropriate_avatar_name" value="59" /> Date: Fri, 11 Apr 2014 16:49:58 +0300 Subject: MAINT-3698 Typo is fixed --- indra/newview/skins/default/xui/en/floater_report_abuse.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_report_abuse.xml b/indra/newview/skins/default/xui/en/floater_report_abuse.xml index 3912daad05..c50c8c02fe 100755 --- a/indra/newview/skins/default/xui/en/floater_report_abuse.xml +++ b/indra/newview/skins/default/xui/en/floater_report_abuse.xml @@ -241,7 +241,7 @@ name="Indecency__Inappropriate_avatar_name" value="59" /> Date: Wed, 16 Apr 2014 11:52:27 -0600 Subject: bool not U32 --- indra/llui/llkeywords.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 21129853de..e2ffd30f8d 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -37,14 +37,14 @@ inline bool LLKeywordToken::isHead(const llwchar* s) const { // strncmp is much faster than string compare - bool res = TRUE; + bool res = true; const llwchar* t = mToken.c_str(); S32 len = mToken.size(); for (S32 i=0; i Date: Wed, 16 Apr 2014 11:52:46 -0600 Subject: Orphaned definition --- indra/llui/llkeywords.h | 1 - 1 file changed, 1 deletion(-) diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 689fd75bcd..2f7932f815 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -172,7 +172,6 @@ protected: LLColor4 readColor(LLSD& sd); void insertSegment(std::vector& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); void insertSegments(const LLWString& wtext, std::vector& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); - BOOL loadIntoLLSD( const std::string& filename, LLSD& data ); LLSD mColors; bool mLoaded; -- cgit v1.2.3 From 8c39617c9ac469a8635d511142148ad5a38de836 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 12:52:07 -0600 Subject: Begin moving script editor portions of LLTextEditor to their own derived class. This should fix the run off segment bugs by not overriding LLTextBase::clearSegments() in LLTextEditor TODO: Move the rest of the script stuff out of LLTextEditor for simplicity sake --- indra/llui/lltextbase.cpp | 1 - indra/llui/lltexteditor.cpp | 8 ---- indra/llui/lltexteditor.h | 1 - indra/newview/CMakeLists.txt | 2 + indra/newview/llfloatergotoline.cpp | 2 +- indra/newview/llpreviewscript.cpp | 4 +- indra/newview/llpreviewscript.h | 4 +- indra/newview/llscripteditor.cpp | 51 ++++++++++++++++++++++ indra/newview/llscripteditor.h | 51 ++++++++++++++++++++++ .../skins/default/xui/en/panel_script_ed.xml | 4 +- .../newview/skins/default/xui/en/script_editor.xml | 5 +++ 11 files changed, 116 insertions(+), 17 deletions(-) create mode 100644 indra/newview/llscripteditor.cpp create mode 100644 indra/newview/llscripteditor.h create mode 100644 indra/newview/skins/default/xui/en/script_editor.xml diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index ee16d3de7c..c4664d6fe0 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -923,7 +923,6 @@ void LLTextBase::createDefaultSegment() // ensures that there is always at least one segment if (mSegments.empty()) { - LLStyleConstSP sp(new LLStyle(getStyleParams())); LLTextSegmentPtr default_segment = new LLNormalTextSegment( sp, 0, getLength() + 1, *this); mSegments.insert(default_segment); diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index df8d37e3aa..8120f3f9a1 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2529,14 +2529,6 @@ void LLTextEditor::loadKeywords() } } -void LLTextEditor::clearSegments() -{ - if (!mSegments.empty()) - { - mSegments.clear(); - } -} - void LLTextEditor::updateSegments() { if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 698153587f..09c56fca5a 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -208,7 +208,6 @@ public: const LLTextSegmentPtr getPreviousSegment() const; void getSelectedSegments(segment_vec_t& segments) const; - void clearSegments(); void setShowContextMenu(bool show) { mShowContextMenu = show; } bool getShowContextMenu() const { return mShowContextMenu; } diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 34eab9fa33..f4c1d0b151 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -494,6 +494,7 @@ set(viewer_SOURCE_FILES llsaveoutfitcombobtn.cpp llsceneview.cpp llscreenchannel.cpp + llscripteditor.cpp llscriptfloater.cpp llscrollingpanelparam.cpp llscrollingpanelparambase.cpp @@ -1074,6 +1075,7 @@ set(viewer_HEADER_FILES llsaveoutfitcombobtn.h llsceneview.h llscreenchannel.h + llscripteditor.h llscriptfloater.h llscrollingpanelparam.h llscrollingpanelparambase.h diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index d66e418926..3b34f03532 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -30,7 +30,7 @@ #include "llpreviewscript.h" #include "llfloaterreg.h" #include "lllineeditor.h" -#include "llviewertexteditor.h" +#include "llscripteditor.h" #include "llviewerwindow.h" LLFloaterGotoLine* LLFloaterGotoLine::sInstance = NULL; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 84e7a1650d..0d95874406 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -69,6 +69,7 @@ #include "llkeyboard.h" #include "llscrollcontainer.h" #include "llcheckboxctrl.h" +#include "llscripteditor.h" #include "llselectmgr.h" #include "lltooldraganddrop.h" #include "llscrolllistctrl.h" @@ -77,7 +78,6 @@ #include "lldir.h" #include "llcombobox.h" #include "llviewerstats.h" -#include "llviewertexteditor.h" #include "llviewerwindow.h" #include "lluictrlfactory.h" #include "llmediactrl.h" @@ -399,7 +399,7 @@ BOOL LLScriptEdCore::postBuild() childSetCommitCallback("Insert...", &LLScriptEdCore::onBtnInsertFunction, this); - mEditor = getChild("Script Editor"); + mEditor = getChild("Script Editor"); childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this); childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,FALSE)); diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index dc4f828cf1..913303d57d 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -39,7 +39,7 @@ class LLLiveLSLFile; class LLMessageSystem; -class LLTextEditor; +class LLScriptEditor; class LLButton; class LLCheckBoxCtrl; class LLScrollListCtrl; @@ -140,7 +140,7 @@ protected: private: std::string mSampleText; - LLTextEditor* mEditor; + LLScriptEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); void (*mSearchReplaceCallback) (void* userdata); diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp new file mode 100644 index 0000000000..7067f49fba --- /dev/null +++ b/indra/newview/llscripteditor.cpp @@ -0,0 +1,51 @@ +/** + * @file llecripteditor.cpp + * @author Cinder Roxley + * @brief Text editor widget used for viewing and editing scripts + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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. + * + * 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. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "linden_common.h" +#include "llscripteditor.h" + +static LLDefaultChildRegistry::Register r("script_editor"); + +LLScriptEditor::LLScriptEditor::Params::Params() +{ + +} + + +LLScriptEditor::LLScriptEditor(const Params& p) +: LLTextEditor(p) +{ + +} + +void LLScriptEditor::clearSegments() +{ + if (!mSegments.empty()) + { + mSegments.clear(); + } +} diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h new file mode 100644 index 0000000000..1e05e337c5 --- /dev/null +++ b/indra/newview/llscripteditor.h @@ -0,0 +1,51 @@ +/** + * @file llecripteditor.h + * @author Cinder Roxley + * @brief Text editor widget used for viewing and editing scripts + * + * $LicenseInfo:firstyear=2001&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2012, 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. + * + * 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. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LL_SCRIPTEDITOR_H +#define LL_SCRIPTEDITOR_H + +#include "lltexteditor.h" + +class LLScriptEditor : public LLTextEditor +{ + friend class LLUICtrlFactory; +public: + + struct Params : public LLInitParam::Block + { + Params(); + }; + + virtual ~LLScriptEditor() {}; + void clearSegments(); + +protected: + LLScriptEditor(const Params& p); + +}; + +#endif // LL_SCRIPTEDITOR_H diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index d1b35dce9d..3e88e2dc04 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -148,7 +148,7 @@ name="Keyword Help..." /> - Loading... - + + + -- cgit v1.2.3 From 9ec900c3c440a8d1e25d55667c861d27a95b1297 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 12:53:19 -0600 Subject: Trivial typo fix --- indra/newview/llscripteditor.cpp | 2 +- indra/newview/llscripteditor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 7067f49fba..67a43c0ef0 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -1,5 +1,5 @@ /** - * @file llecripteditor.cpp + * @file llscripteditor.cpp * @author Cinder Roxley * @brief Text editor widget used for viewing and editing scripts * diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index 1e05e337c5..a0bee36a25 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -1,5 +1,5 @@ /** - * @file llecripteditor.h + * @file llscripteditor.h * @author Cinder Roxley * @brief Text editor widget used for viewing and editing scripts * -- cgit v1.2.3 From b533844945a648ab1613a305c072809bbd6d76a8 Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Fri, 18 Apr 2014 20:06:39 +0000 Subject: STORM-2023: Restore system color picker on OSX --- indra/llwindow/llwindowmacosx.cpp | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 11c0b51086..832e08d181 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -39,6 +39,7 @@ #include "indra_constants.h" #include +#include #include extern BOOL gDebugWindowProc; @@ -1743,16 +1744,40 @@ LLSD LLWindowMacOSX::getNativeKeyData() return result; } - BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b) { - // Is this even used anywhere? Do we really need an OS color picker? BOOL retval = FALSE; - //S32 error = 0; + OSErr error = noErr; + NColorPickerInfo info; + + memset(&info, 0, sizeof(info)); + info.theColor.color.rgb.red = (UInt16)(*r * 65535.f); + info.theColor.color.rgb.green = (UInt16)(*g * 65535.f); + info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f); + info.placeWhere = kCenterOnMainScreen; + + if(gWindowImplementation != NULL) + gWindowImplementation->beforeDialog(); + + error = NPickColor(&info); + + if(gWindowImplementation != NULL) + gWindowImplementation->afterDialog(); + + if (error == noErr) + { + retval = info.newColorChosen; + if (info.newColorChosen) + { + *r = ((float) info.theColor.color.rgb.red) / 65535.0; + *g = ((float) info.theColor.color.rgb.green) / 65535.0; + *b = ((float) info.theColor.color.rgb.blue) / 65535.0; + } + } + return (retval); } - void *LLWindowMacOSX::getPlatformWindow() { // NOTE: this will be NULL in fullscreen mode. Plan accordingly. -- cgit v1.2.3 From 1173dde898d5b61749b1c1631d060bf6730b9642 Mon Sep 17 00:00:00 2001 From: Cinder Biscuits Date: Fri, 18 Apr 2014 21:05:20 +0000 Subject: Remove calls to now unused methods --- indra/llwindow/llwindowmacosx.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 832e08d181..ed0348e10e 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1755,15 +1755,9 @@ BOOL LLWindowMacOSX::dialogColorPicker( F32 *r, F32 *g, F32 *b) info.theColor.color.rgb.green = (UInt16)(*g * 65535.f); info.theColor.color.rgb.blue = (UInt16)(*b * 65535.f); info.placeWhere = kCenterOnMainScreen; - - if(gWindowImplementation != NULL) - gWindowImplementation->beforeDialog(); - + error = NPickColor(&info); - if(gWindowImplementation != NULL) - gWindowImplementation->afterDialog(); - if (error == noErr) { retval = info.newColorChosen; -- cgit v1.2.3 From 54c7b96bf19efd28cc7ce81c0864ee7bbb7d6b1d Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 22:03:05 -0600 Subject: Fix header guard --- indra/newview/llsyntaxid.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 7d6e120038..1f7e893b38 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -25,10 +25,8 @@ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -#ifndef LLSYSNTAXIDLSL_H -#define LLSYSNTAXIDLSL_H - -#endif // LLSYSNTAXIDLSL_H +#ifndef LL_SYNTAXID_H +#define LL_SYNTAXID_H #include "llviewerprecompiledheaders.h" @@ -144,3 +142,5 @@ public: */ void cacheFile(const LLSD& content_ref); }; + +#endif // LLSYNTAXID_H -- cgit v1.2.3 From dcffb97518cb2888489c93b90862518f761967dd Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 23:13:57 -0600 Subject: Move some more script editor functions from LLTextEditor to LLScriptEditor --- indra/llui/llkeywords.cpp | 6 +-- indra/llui/llkeywords.h | 12 +++--- indra/llui/lltexteditor.cpp | 37 ------------------ indra/llui/lltexteditor.h | 15 +------- indra/newview/llpreviewscript.cpp | 3 +- indra/newview/llscripteditor.cpp | 44 ++++++++++++++++++++++ indra/newview/llscripteditor.h | 14 ++++++- .../xui/en/floater_region_debug_console.xml | 1 - .../skins/default/xui/en/panel_script_ed.xml | 1 - .../newview/skins/default/xui/en/script_editor.xml | 4 +- 10 files changed, 71 insertions(+), 66 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index e2ffd30f8d..07c84e57c0 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -89,7 +89,7 @@ void LLKeywords::addColorGroup(const std::string key_in, const LLColor4 color) } // Add the token as described -void LLKeywords::addToken(LLKeywordToken::TOKEN_TYPE type, +void LLKeywords::addToken(LLKeywordToken::ETokenType type, const std::string& key_in, const LLColor4& color, const std::string& tool_tip_in, @@ -300,7 +300,7 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) LLColor4 ColorDeprecated = getColorGroup("deprecated"); LLColor4 ColorGM = getColorGroup("god-mode"); - LLKeywordToken::TOKEN_TYPE token_type = LLKeywordToken::TT_UNKNOWN; + LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN; // If a new token type is added here, it must also be added to the 'addToken' method if (Group == "constants") { @@ -633,7 +633,7 @@ void LLKeywords::findSegments(std::vector* seg_list, const LLW seg_start = cur - base; cur += cur_delimiter->getLengthHead(); - LLKeywordToken::TOKEN_TYPE type = cur_delimiter->getType(); + LLKeywordToken::ETokenType type = cur_delimiter->getType(); if( type == LLKeywordToken::TT_TWO_SIDED_DELIMITER || type == LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS ) { while( *cur && !cur_delimiter->isTail(cur)) diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 2f7932f815..69bc8919db 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -53,7 +53,7 @@ public: * - TT_TWO_SIDED_DELIMITER are for delimiters that end with a different delimiter than they open with. * - TT_DOUBLE_QUOTATION_MARKS are for delimiting areas using the same delimiter to open and close. */ - enum TOKEN_TYPE + typedef enum e_token_type { TT_UNKNOWN, TT_WORD, @@ -69,9 +69,9 @@ public: TT_LABEL, // LINE TT_SECTION, // WORD TT_TYPE // WORD - }; + } ETokenType; - LLKeywordToken( TOKEN_TYPE type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter ) + LLKeywordToken( ETokenType type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter ) : mType( type ), mToken( token ), @@ -87,7 +87,7 @@ public: bool isTail(const llwchar* s) const; const LLWString& getToken() const { return mToken; } const LLColor4& getColor() const { return mColor; } - TOKEN_TYPE getType() const { return mType; } + ETokenType getType() const { return mType; } const LLWString& getToolTip() const { return mToolTip; } const LLWString& getDelimiter() const { return mDelimiter; } @@ -96,7 +96,7 @@ public: #endif private: - TOKEN_TYPE mType; + ETokenType mType; LLWString mToken; LLColor4 mColor; LLWString mToolTip; @@ -119,7 +119,7 @@ public: void processTokens(); // Add the token as described - void addToken(LLKeywordToken::TOKEN_TYPE type, + void addToken(LLKeywordToken::ETokenType type, const std::string& key, const LLColor4& color, const std::string& tool_tip = LLStringUtil::null, diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 8120f3f9a1..b18c545f30 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2511,43 +2511,6 @@ BOOL LLTextEditor::tryToRevertToPristineState() return isPristine(); // TRUE => success } - -static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); -void LLTextEditor::loadKeywords() -{ - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); - mKeywords.processTokens(); - - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - mSegments.clear(); - segment_set_t::iterator insert_it = mSegments.begin(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insert_it = mSegments.insert(insert_it, *list_it); - } -} - -void LLTextEditor::updateSegments() -{ - if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) - { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); - // HACK: No non-ascii keywords for now - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); - - clearSegments(); - for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) - { - insertSegment(*list_it); - } - } - - LLTextBase::updateSegments(); -} - void LLTextEditor::updateLinkSegments() { LLWString wtext = getWText(); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 09c56fca5a..6c14ad90a5 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -30,7 +30,6 @@ #define LL_LLTEXTEDITOR_H #include "llrect.h" -#include "llkeywords.h" #include "llframetimer.h" #include "lldarray.h" #include "llstyle.h" @@ -45,7 +44,6 @@ class LLFontGL; class LLScrollbar; -class LLKeywordToken; class TextCmd; class LLUICtrlFactory; class LLScrollContainer; @@ -188,14 +186,6 @@ public: void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); - LLKeywords mKeywords; - void loadKeywords(); - LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } - LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } - - void loadKeywords(const std::string& filename_keywords, - const std::string& filename_colors); - // Hacky methods to make it into a word-wrapping, potentially scrolling, // read-only text box. void setCommitOnFocusLost(BOOL b) { mCommitOnFocusLost = b; } @@ -293,8 +283,8 @@ protected: BOOL mShowLineNumbers; bool mAutoIndent; + bool mParseOnTheFly; - /*virtual*/ void updateSegments(); void updateLinkSegments(); private: @@ -331,7 +321,6 @@ private: BOOL mAllowEmbeddedItems; bool mShowContextMenu; - bool mParseOnTheFly; bool mEnableTooltipPaste; bool mPassDelete; @@ -351,4 +340,4 @@ extern template class LLTextEditor* LLView::getChild( const std::string& name, BOOL recurse) const; #endif -#endif // LL_TEXTEDITOR_ +#endif // LL_TEXTEDITOR_H diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 0d95874406..e778015965 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -472,8 +472,7 @@ void LLScriptEdCore::processKeywords() if (mSyntaxIdLSL.isLoaded()) { - mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); - + mEditor->initKeywords(); mEditor->loadKeywords(); std::vector primary_keywords; diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 67a43c0ef0..61b5eec9fc 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -28,6 +28,8 @@ #include "linden_common.h" #include "llscripteditor.h" +#include "llsyntaxid.h" + static LLDefaultChildRegistry::Register r("script_editor"); LLScriptEditor::LLScriptEditor::Params::Params() @@ -42,6 +44,48 @@ LLScriptEditor::LLScriptEditor(const Params& p) } +void LLScriptEditor::initKeywords() +{ + mKeywords.initialise(LLSyntaxIdLSL::getInstance()->getKeywordsXML()); +} + +static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); + +void LLScriptEditor::loadKeywords() +{ + LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + mKeywords.processTokens(); + + segment_vec_t segment_list; + mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + + mSegments.clear(); + segment_set_t::iterator insert_it = mSegments.begin(); + for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) + { + insert_it = mSegments.insert(insert_it, *list_it); + } +} + +void LLScriptEditor::updateSegments() +{ + if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) + { + LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + // HACK: No non-ascii keywords for now + segment_vec_t segment_list; + mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + + clearSegments(); + for (segment_vec_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it) + { + insertSegment(*list_it); + } + } + + LLTextBase::updateSegments(); +} + void LLScriptEditor::clearSegments() { if (!mSegments.empty()) diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index a0bee36a25..86c915d6a0 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -41,11 +41,21 @@ public: }; virtual ~LLScriptEditor() {}; - void clearSegments(); + void initKeywords(); + void loadKeywords(); + void clearSegments(); + LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } + LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } protected: LLScriptEditor(const Params& p); - + +private: + void updateSegments(); + void loadKeywords(const std::string& filename_keywords, + const std::string& filename_colors); + + LLKeywords mKeywords; }; #endif // LL_SCRIPTEDITOR_H diff --git a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml index 99b812a880..11172d8a3e 100755 --- a/indra/newview/skins/default/xui/en/floater_region_debug_console.xml +++ b/indra/newview/skins/default/xui/en/floater_region_debug_console.xml @@ -21,7 +21,6 @@ layout="topleft" max_length="65536" name="region_debug_console_output" - show_line_numbers="false" word_wrap="true" track_end="true" read_only="true"> diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 3e88e2dc04..1a4f0aff73 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -161,7 +161,6 @@ name="Script Editor" text_readonly_color="DkGray" width="487" - show_line_numbers="true" enable_tooltip_paste="true" word_wrap="true"> Loading... diff --git a/indra/newview/skins/default/xui/en/script_editor.xml b/indra/newview/skins/default/xui/en/script_editor.xml index d24833e85c..b030a117fc 100644 --- a/indra/newview/skins/default/xui/en/script_editor.xml +++ b/indra/newview/skins/default/xui/en/script_editor.xml @@ -1,5 +1,7 @@ + parse_urls="false" + show_context_menu="true" + show_line_numbers="true"> -- cgit v1.2.3 From 46627b4eb2218babbc94421f9b93c03e2951cc6c Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 23:20:33 -0600 Subject: Remove clearHighlights() --- indra/newview/llpreviewscript.cpp | 9 ++------- indra/newview/llpreviewscript.h | 1 - 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index e778015965..1d95276c51 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -433,7 +433,7 @@ void LLScriptEdCore::updateKeywords() { if (mLive) { - clearHighlights(); + mEditor->clearSegments(); mRegionChangedCallback.disconnect(); } else @@ -456,11 +456,6 @@ void LLScriptEdCore::processLoaded() } } -void LLScriptEdCore::clearHighlights() -{ - mEditor->clearSegments(); -} - void LLScriptEdCore::processKeywords() { if (mSyntaxIdLSL.isLoaded()) @@ -468,7 +463,7 @@ void LLScriptEdCore::processKeywords() LL_INFOS("SyntaxLSL") << "Hashes are different, updating highlighter." << LL_ENDL; - clearHighlights(); + mEditor->clearSegments(); if (mSyntaxIdLSL.isLoaded()) { diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 913303d57d..3ac48ae9c4 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,7 +77,6 @@ protected: public: ~LLScriptEdCore(); - void clearHighlights(); void initialiseKeywords(); void initMenu(); void processKeywords(); -- cgit v1.2.3 From 1dad526a5c66104a629c248e560f8e5ddb62c060 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 18 Apr 2014 23:25:21 -0600 Subject: Reinstate support text appendText() in LLFloaterAbout --- indra/newview/llfloaterabout.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 27ca9ab56a..4d8c8e3e99 100755 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -270,14 +270,9 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) getChild("support_editor", true); LLUIColor about_color = LLUIColorTable::instance().getColor("TextFgReadOnlyColor"); -# if 0 support_widget->clear(); support_widget->appendText(LLAppViewer::instance()->getViewerInfoString(), FALSE, LLStyle::Params() .color(about_color)); -# else - support_widget->setText(LLAppViewer::instance()->getViewerInfoString(), - LLStyle::Params() .color(about_color)); -# endif } ///---------------------------------------------------------------------------- -- cgit v1.2.3 From 3dc1b32bf32643613c9912f1165de0f52d0a82c8 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 21 Apr 2014 09:33:21 -0600 Subject: Windows build fix. --- indra/newview/llscripteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 61b5eec9fc..bb59a1d821 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -25,7 +25,7 @@ * $/LicenseInfo$ */ -#include "linden_common.h" +#include "llviewerprecompiledheaders.h" #include "llscripteditor.h" #include "llsyntaxid.h" -- cgit v1.2.3 From 54d392c4ff8a2a211e00a62023409b2dba85e8e9 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 21 Apr 2014 12:07:46 -0600 Subject: Another oops windows build fix. --- indra/newview/llscripteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index bb59a1d821..5d87f7ba0c 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -32,7 +32,7 @@ static LLDefaultChildRegistry::Register r("script_editor"); -LLScriptEditor::LLScriptEditor::Params::Params() +LLScriptEditor::Params::Params() { } -- cgit v1.2.3 From cd382d08c84e2d984a4a20888280084daa290c3f Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 22 Apr 2014 13:04:36 -0400 Subject: add Cinder Roxley to contributors for STORM-1831 --- doc/contributions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/contributions.txt b/doc/contributions.txt index 71e334eb75..d41509e471 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -314,6 +314,7 @@ Cinder Roxley OPEN-185 STORM-1703 STORM-1948 + STORM-1831 STORM-1888 STORM-1958 STORM-1952 -- cgit v1.2.3 From 5870788f68c6b1fb504ae95403e7da95bc55ed4c Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 22 Apr 2014 16:08:13 -0400 Subject: catch a few more cases of STANDALONE -> USESYSTEMLIBS --- indra/cmake/00-Common.cmake | 2 +- indra/cmake/Prebuilt.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 69173c38a2..335dd89080 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -226,7 +226,7 @@ endif (LINUX OR DARWIN) if (USESYSTEMLIBS) - add_definitions(-DLL_STANDALONE=1) + add_definitions(-DLL_USESYSTEMLIBS=1) if (LINUX AND ${ARCH} STREQUAL "i686") add_definitions(-march=pentiumpro) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index c3fd8f1666..e548805148 100755 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -17,11 +17,11 @@ endif(INSTALL_PROPRIETARY) # of previous attempts is serialized in the file # ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) macro (use_prebuilt_binary _binary) - if (NOT DEFINED STANDALONE_${_binary}) - set(STANDALONE_${_binary} ${USESYSTEMLIBS}) - endif (NOT DEFINED STANDALONE_${_binary}) + if (NOT DEFINED USESYSTEMLIBS_${_binary}) + set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS}) + endif (NOT DEFINED USESYSTEMLIBS_${_binary}) - if (NOT STANDALONE_${_binary}) + if (NOT USESYSTEMLIBS_${_binary}) if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") file(READ ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${_binary}_installed") if(DEBUG_PREBUILT) @@ -52,7 +52,7 @@ macro (use_prebuilt_binary _binary) "Failed to download or unpack prebuilt '${_binary}'." " Process returned ${${_binary}_installed}.") endif (NOT ${_binary}_installed EQUAL 0) - endif (NOT STANDALONE_${_binary}) + endif (NOT USESYSTEMLIBS_${_binary}) endmacro (use_prebuilt_binary _binary) endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED) -- cgit v1.2.3 From 05c5a27fd3cab8eac2a2e2a790cbf7b7b76d5fc7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 29 Apr 2014 14:23:21 -0700 Subject: changed memory log frequency to 30 seconds to improve data gathering --- indra/newview/app_settings/settings.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index e23ebd21be..37352d5e98 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6129,16 +6129,16 @@ 0 MemoryLogFrequency - - Comment - Seconds between display of Memory in log (0 for never) - Persist - 1 - Type - F32 - Value - 600.0 - + + Comment + Seconds between display of Memory in log (0 for never) + Persist + 1 + Type + F32 + Value + 30.0 + MemoryPrivatePoolEnabled Comment -- cgit v1.2.3 From 2834c7968de9efc81d3c7db8a9c2b5cd2f16d6a3 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 29 Apr 2014 14:24:00 -0700 Subject: MAINT-3975 FIX Group Invitation window omits ? button for listed residents (INTEREST LIST RC only) --- indra/llui/lltooltip.cpp | 3 ++- indra/newview/skins/default/xui/en/panel_group_invite.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llui/lltooltip.cpp b/indra/llui/lltooltip.cpp index 5e1f12996e..7f2224870d 100755 --- a/indra/llui/lltooltip.cpp +++ b/indra/llui/lltooltip.cpp @@ -477,7 +477,8 @@ void LLToolTipMgr::show(const std::string& msg) void LLToolTipMgr::show(const LLToolTip::Params& params) { if (!params.styled_message.isProvided() - && (!params.message.isProvided() || params.message().empty())) return; + && (!params.message.isProvided() || params.message().empty()) + && !params.image.isProvided()) return; // fill in default tooltip params from tool_tip.xml LLToolTip::Params params_with_defaults(params); diff --git a/indra/newview/skins/default/xui/en/panel_group_invite.xml b/indra/newview/skins/default/xui/en/panel_group_invite.xml index 124c0596c3..f47ed992ca 100755 --- a/indra/newview/skins/default/xui/en/panel_group_invite.xml +++ b/indra/newview/skins/default/xui/en/panel_group_invite.xml @@ -76,7 +76,7 @@ Choose what Role to assign them to: Date: Tue, 6 May 2014 11:09:50 -0600 Subject: Let's get started: some code policy cleanup, reference arguments where we can, correct spelling --- indra/llui/llkeywords.cpp | 130 ++++++++++----------- indra/llui/llkeywords.h | 6 +- .../newview/app_settings/keywords_lsl_default.xml | 20 ++-- indra/newview/llpreviewscript.cpp | 79 ++++++------- indra/newview/llpreviewscript.h | 1 - indra/newview/llsyntaxid.cpp | 17 +-- indra/newview/llsyntaxid.h | 8 +- 7 files changed, 125 insertions(+), 136 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 07c84e57c0..bae604e270 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -82,7 +82,7 @@ LLKeywords::~LLKeywords() mDelimiterTokenList.clear(); } -void LLKeywords::addColorGroup(const std::string key_in, const LLColor4 color) +void LLKeywords::addColorGroup(const std::string& key_in, const LLColor4& color) { WStringMapIndex key ( utf8str_to_wstring(key_in) ); mColorGroupMap[key] = color; @@ -176,79 +176,79 @@ std::string LLKeywords::getAttribute(const std::string& key) return (it != mAttributes.end()) ? it->second : ""; } -LLColor4 LLKeywords::getColorGroup(const std::string key_in) +LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { - std::string ColourGroup = "Black"; + std::string color_group = "Black"; if (key_in == "constants-float") { - ColourGroup = "SyntaxLslConstantFloat"; + color_group = "SyntaxLslConstantFloat"; } else if (key_in == "constants-integer") { - ColourGroup = "SyntaxLslConstantInteger"; + color_group = "SyntaxLslConstantInteger"; } else if (key_in == "constants-key") { - ColourGroup = "SyntaxLslConstantKey"; + color_group = "SyntaxLslConstantKey"; } else if (key_in == "constants-rotation") { - ColourGroup = "SyntaxLslConstantRotation"; + color_group = "SyntaxLslConstantRotation"; } else if (key_in == "constants-string") { - ColourGroup = "SyntaxLslConstantString"; + color_group = "SyntaxLslConstantString"; } else if (key_in == "constants-vector") { - ColourGroup = "SyntaxLslConstantVector"; + color_group = "SyntaxLslConstantVector"; } else if (key_in == "misc-flow-label") { - ColourGroup = "SyntaxLslControlFlow"; + color_group = "SyntaxLslControlFlow"; } else if (key_in =="deprecated") { - ColourGroup = "SyntaxLslDeprecated"; + color_group = "SyntaxLslDeprecated"; } else if (key_in == "events") { - ColourGroup = "SyntaxLslEvent"; + color_group = "SyntaxLslEvent"; } else if (key_in == "functions") { - ColourGroup = "SyntaxLslFunction"; + color_group = "SyntaxLslFunction"; } else if (key_in =="god-mode") { - ColourGroup = "SyntaxLslGodMode"; + color_group = "SyntaxLslGodMode"; } else if (key_in == "types") { - ColourGroup = "SyntaxLslDataType"; + color_group = "SyntaxLslDataType"; } else if (key_in == "sections") { - ColourGroup = "SyntaxLslSection"; + color_group = "SyntaxLslSection"; } else if (key_in == "misc-double_quotation_marks") { - ColourGroup = "SyntaxLslStringLiteral"; + color_group = "SyntaxLslStringLiteral"; } else if (key_in == "misc-comments_1_sided") { - ColourGroup = "SyntaxLslComment1Sided"; + color_group = "SyntaxLslComment1Sided"; } else if (key_in == "misc-comments_2_sided") { - ColourGroup = "SyntaxLslComment2Sided"; + color_group = "SyntaxLslComment2Sided"; } else { LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized!" << LL_ENDL; } - return LLUIColorTable::instance().getColor(ColourGroup); + return LLUIColorTable::instance().getColor(color_group); } void LLKeywords::initialise(LLSD SyntaxXML) @@ -271,107 +271,107 @@ void LLKeywords::processTokens() addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", getColorGroup("misc-comments_2_sided"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", getColorGroup("misc-double_quotation_marks"), "String literal", "\"" ); - LLSD::map_iterator outerIt = mSyntax.beginMap(); - for ( ; outerIt != mSyntax.endMap(); ++outerIt) + LLSD::map_iterator itr = mSyntax.beginMap(); + for ( ; itr != mSyntax.endMap(); ++itr) { - if (outerIt->first == "llsd-lsl-syntax-version") + if (itr->first == "llsd-lsl-syntax-version") { // Skip over version key. } else { - if (outerIt->second.isMap()) + if (itr->second.isMap()) { - processTokensGroup(outerIt->second, outerIt->first); + processTokensGroup(itr->second, itr->first); } else { - LL_WARNS("LSL-Tokens-Processing") << "Map for " + outerIt->first + " entries is missing! Ignoring." << LL_ENDL; + LL_WARNS("LSL-Tokens-Processing") << "Map for " + itr->first + " entries is missing! Ignoring." << LL_ENDL; } } } LL_INFOS("SyntaxLSL") << "Finished processing tokens." << LL_ENDL; } -void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) +void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group) { - LLColor4 Color; - LLColor4 ColorGroup; - LLColor4 ColorDeprecated = getColorGroup("deprecated"); - LLColor4 ColorGM = getColorGroup("god-mode"); + LLColor4 color; + LLColor4 color_group; + LLColor4 color_deprecated = getColorGroup("deprecated"); + LLColor4 color_god_mode = getColorGroup("god-mode"); LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN; // If a new token type is added here, it must also be added to the 'addToken' method - if (Group == "constants") + if (group == "constants") { token_type = LLKeywordToken::TT_CONSTANT; } - else if (Group == "controls") + else if (group == "controls") { token_type = LLKeywordToken::TT_CONTROL; } - else if (Group == "events") + else if (group == "events") { token_type = LLKeywordToken::TT_EVENT; } - else if (Group == "functions") + else if (group == "functions") { token_type = LLKeywordToken::TT_FUNCTION; } - else if (Group == "label") + else if (group == "label") { token_type = LLKeywordToken::TT_LABEL; } - else if (Group == "types") + else if (group == "types") { token_type = LLKeywordToken::TT_TYPE; } - ColorGroup = getColorGroup(Group); - LL_INFOS("Tokens") << "Group: '" << Group << "', using colour: '" << ColorGroup << "'" << LL_ENDL; + color_group = getColorGroup(group); + LL_INFOS("Tokens") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL; - if (Tokens.isMap()) + if (tokens.isMap()) { - LLSD::map_iterator outerIt = Tokens.beginMap(); - for ( ; outerIt != Tokens.endMap(); ++outerIt) + LLSD::map_const_iterator outer_itr = tokens.beginMap(); + for ( ; outer_itr != tokens.endMap(); ++outer_itr) { - if (outerIt->second.isMap()) + if (outer_itr->second.isMap()) { mAttributes.clear(); - LLSD arguments = LLSD (); - LLSD::map_iterator innerIt = outerIt->second.beginMap(); - for ( ; innerIt != outerIt->second.endMap(); ++innerIt) + LLSD arguments = LLSD(); + LLSD::map_const_iterator inner_itr = outer_itr->second.beginMap(); + for ( ; inner_itr != outer_itr->second.endMap(); ++inner_itr) { - if (innerIt->first == "arguments") + if (inner_itr->first == "arguments") { - if (innerIt->second.isArray()) + if (inner_itr->second.isArray()) { - arguments = innerIt->second; + arguments = inner_itr->second; } } - else if (!innerIt->second.isMap() && !innerIt->second.isArray()) + else if (!inner_itr->second.isMap() && !inner_itr->second.isArray()) { - mAttributes[innerIt->first] = innerIt->second.asString(); + mAttributes[inner_itr->first] = inner_itr->second.asString(); } else { - LL_WARNS("SyntaxLSL") << "Not a valid attribute: " << innerIt->first << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Not a valid attribute: " << inner_itr->first << LL_ENDL; } } std::string tooltip = ""; if (token_type == LLKeywordToken::TT_CONSTANT) { - ColorGroup = getColorGroup(Group + "-" + getAttribute("type")); + color_group = getColorGroup(group + "-" + getAttribute("type")); tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value"); } else if (token_type == LLKeywordToken::TT_EVENT) { - tooltip = outerIt->first + "(" + getArguments(arguments) + ")"; + tooltip = outer_itr->first + "(" + getArguments(arguments) + ")"; } else if (token_type == LLKeywordToken::TT_FUNCTION) { - tooltip = getAttribute("return") + " " + outerIt->first + "(" + getArguments(arguments) + ");"; + tooltip = getAttribute("return") + " " + outer_itr->first + "(" + getArguments(arguments) + ");"; tooltip += "\nEnergy: "; tooltip += getAttribute("energy") == "" ? "0.0" : getAttribute("energy"); if (getAttribute("sleep") != "") @@ -389,28 +389,28 @@ void LLKeywords::processTokensGroup(LLSD& Tokens, const std::string Group) tooltip += getAttribute("tooltip"); } - Color = getAttribute("deprecated") == "true" ? ColorDeprecated : ColorGroup; + color = getAttribute("deprecated") == "true" ? color_deprecated : color_group; if (getAttribute("god-mode") == "true") { - Color = ColorGM; + color = color_god_mode; } - addToken(token_type, outerIt->first, Color, tooltip); + addToken(token_type, outer_itr->first, color, tooltip); } } } - else if (Tokens.isArray()) // Currently nothing should need this, but it's here for completeness + else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness { - LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << Color << LL_ENDL; - for (int count = 0; count < Tokens.size(); ++count) + LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL; + for (int count = 0; count < tokens.size(); ++count) { - addToken(token_type, Tokens[count], Color, ""); + addToken(token_type, tokens[count], color, ""); } } else { - LL_WARNS("Tokens") << "Invalid map/array passed: '" << Tokens << "'" << LL_ENDL; + LL_WARNS("Tokens") << "Invalid map/array passed: '" << tokens << "'" << LL_ENDL; } } @@ -511,11 +511,11 @@ LLColor4 LLKeywords::readColor(LLSD& sd) { if (sd.isArray()) { - return LLColor4 (sd, 1.f); + return LLColor4(sd, 1.f); } else if (sd.isMap()) { - return LLColor4 ( sd.get("x").asReal(), sd.get("y").asReal(), sd.get("z").asReal(), 1.f ); + return LLColor4( sd.get("x").asReal(), sd.get("y").asReal(), sd.get("z").asReal(), 1.f ); } else { diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 69bc8919db..b17e9dd942 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -109,9 +109,9 @@ public: LLKeywords(); ~LLKeywords(); - void addColorGroup(const std::string key_in, const LLColor4 color); + void addColorGroup(const std::string& key_in, const LLColor4& color); void clearLoaded() { mLoaded = false; } - LLColor4 getColorGroup(const std::string key_in); + LLColor4 getColorGroup(const std::string& key_in); bool isLoaded() const { return mLoaded; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); @@ -167,7 +167,7 @@ public: #endif protected: - void processTokensGroup(LLSD& Tokens, const std::string Group); + void processTokensGroup(const LLSD& Tokens, const std::string& Group); LLColor4 readColor(const std::string& s); LLColor4 readColor(LLSD& sd); void insertSegment(std::vector& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index 83801a7e1e..53a89f0f09 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -89,7 +89,7 @@ vector tooltip - A vector is a data type that contains a set of three float values.\nVectors are used to represent colours (RGB), positions, and directions/velocities. + A vector is a data type that contains a set of three float values.\nVectors are used to represent colors (RGB), positions, and directions/velocities. constants @@ -852,7 +852,7 @@ value 0x2 tooltip - The object colour has changed. + The object color has changed. CHANGED_INVENTORY @@ -4372,7 +4372,7 @@ value 3 tooltip - A vector <r, g, b> which determines the ending colour of the object. + A vector <r, g, b> which determines the ending color of the object. PSYS_PART_END_GLOW @@ -4426,7 +4426,7 @@ value 0x1 tooltip - Interpolate both the colour and alpha from the start value to the end value. + Interpolate both the color and alpha from the start value to the end value. PSYS_PART_INTERP_SCALE_MASK @@ -4471,7 +4471,7 @@ value 1 tooltip - A vector <r.r, g.g, b.b> which determines the starting colour of the object. + A vector <r.r, g.g, b.b> which determines the starting color of the object. PSYS_PART_START_GLOW @@ -9032,7 +9032,7 @@ tooltip - Returns the color on Face.\nReturns the colour of Face as a vector of red, green, and blue values between 0 and 1. If face is ALL_SIDES the colour returned is the mean average of each channel. + Returns the color on Face.\nReturns the color of Face as a vector of red, green, and blue values between 0 and 1. If face is ALL_SIDES the color returned is the mean average of each channel. llGetCreator @@ -15304,7 +15304,7 @@ arguments - Colour + Color type vector @@ -15323,7 +15323,7 @@ tooltip - Sets the color, for the face.\nSets the colour of the side specified. If Face is ALL_SIDES, sets the colour on all faces. + Sets the color, for the face.\nSets the color of the side specified. If Face is ALL_SIDES, sets the color on all faces. llSetContentType @@ -15671,7 +15671,7 @@ - Colour + Color type vector @@ -15690,7 +15690,7 @@ tooltip - If a task exists in the link chain at LinkNumber, set the Face to color.\nSets the colour of the linked child's side, specified by LinkNumber. + If a task exists in the link chain at LinkNumber, set the Face to color.\nSets the color of the linked child's side, specified by LinkNumber. llSetLinkMedia diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 1d95276c51..fae4aeb7bc 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -374,6 +374,7 @@ LLScriptEdCore::LLScriptEdCore( setXMLFilename("panel_script_ed.xml"); llassert_always(mContainer != NULL); + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); } LLScriptEdCore::~LLScriptEdCore() @@ -389,6 +390,7 @@ LLScriptEdCore::~LLScriptEdCore() } delete mLiveFile; + mRegionChangedCallback.disconnect(); } BOOL LLScriptEdCore::postBuild() @@ -407,25 +409,20 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - mSyntaxIdLSL.addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); + LLSyntaxIdLSL::getInstance()->addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); // Intialise keyword highlighting for the current simulator's version of LSL - mSyntaxIdLSL.initialise(); + LLSyntaxIdLSL::getInstance()->initialise(); - if (mSyntaxIdLSL.isDifferentVersion()) + if (LLSyntaxIdLSL::getInstance()->isDifferentVersion()) { processLoaded(); } else { - LL_INFOS("SyntaxLSL") - << "Hashes are the same, no need to update highlighter." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Hashes are the same, no need to update highlighter." << LL_ENDL; } - - // Set up a callback for region changes - mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); - return TRUE; } @@ -434,7 +431,6 @@ void LLScriptEdCore::updateKeywords() if (mLive) { mEditor->clearSegments(); - mRegionChangedCallback.disconnect(); } else { @@ -444,61 +440,54 @@ void LLScriptEdCore::updateKeywords() void LLScriptEdCore::processLoaded() { - mSyntaxIdLSL.initialise(); - if (mSyntaxIdLSL.isLoaded()) + LLSyntaxIdLSL::getInstance()->initialise(); + if (LLSyntaxIdLSL::getInstance()->isLoaded()) { processKeywords(); } else { - LL_INFOS("SyntaxLSL") - << "Hashes are different, waiting for the syntax file to be retrieved." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Hashes are different, waiting for the syntax file to be retrieved." << LL_ENDL; } } void LLScriptEdCore::processKeywords() { - if (mSyntaxIdLSL.isLoaded()) + if (LLSyntaxIdLSL::getInstance()->isLoaded()) { - LL_INFOS("SyntaxLSL") - << "Hashes are different, updating highlighter." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Hashes are different, updating highlighter." << LL_ENDL; mEditor->clearSegments(); - if (mSyntaxIdLSL.isLoaded()) - { - mEditor->initKeywords(); - mEditor->loadKeywords(); - - std::vector primary_keywords; - std::vector secondary_keywords; - LLKeywordToken *token; - LLKeywords::keyword_iterator_t token_it; - for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) - { - token = token_it->second; - if (token->getType() == LLKeywordToken::TT_FUNCTION) - { - primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - else - { - secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - } + mEditor->initKeywords(); + mEditor->loadKeywords(); - for (std::vector::const_iterator iter= primary_keywords.begin(); - iter!= primary_keywords.end(); ++iter) + string_vec_t primary_keywords; + string_vec_t secondary_keywords; + LLKeywordToken *token; + LLKeywords::keyword_iterator_t token_it; + for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) + { + token = token_it->second; + if (token->getType() == LLKeywordToken::TT_FUNCTION) { - mFunctions->add(*iter); + primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } - - for (std::vector::const_iterator iter= secondary_keywords.begin(); - iter!= secondary_keywords.end(); ++iter) + else { - mFunctions->add(*iter); + secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } } + for (string_vec_t::const_iterator iter = primary_keywords.begin(); + iter!= primary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } + for (string_vec_t::const_iterator iter = secondary_keywords.begin(); + iter!= secondary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } } } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 3ac48ae9c4..966c149d3d 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -156,7 +156,6 @@ private: BOOL mEnableSave; BOOL mHasScriptData; LLLiveLSLFile* mLiveFile; - LLSyntaxIdLSL mSyntaxIdLSL; LLScriptEdContainer* mContainer; // parent view diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 14265fd3af..3f726fa8b5 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -127,13 +127,13 @@ LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal; /** * @brief LLSyntaxIdLSL constructor */ -LLSyntaxIdLSL::LLSyntaxIdLSL(std::string filenameDefault, std::string simFeatureName, std::string capabilityName) : - mFilePath(LL_PATH_APP_SETTINGS) +LLSyntaxIdLSL::LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability) +: mFilePath(LL_PATH_APP_SETTINGS) { - mCapabilityName = capabilityName; - mFileNameCurrent = filenameDefault; - mFileNameDefault = filenameDefault; - mSimulatorFeature = simFeatureName; + mCapabilityName = capability; + mFileNameCurrent = filename; + mFileNameDefault = filename; + mSimulatorFeature = sim_feature; mSyntaxIdCurrent = LLUUID(); } @@ -321,6 +321,9 @@ void LLSyntaxIdLSL::initialise() //----------------------------------------------------------------------------- // isSupportedVersion //----------------------------------------------------------------------------- +const U32 LLSD_SYNTAX_LSL_VERSION_EXPECTED = 2; +const std::string LLSD_SYNTAX_LSL_VERSION_KEY("llsd-lsl-syntax-version"); + bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) { bool isValid = false; @@ -328,8 +331,6 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) * If the schema used to store LSL keywords and hints changes, this value is incremented * Note that it should _not_ be changed if the keywords and hints _content_ changes. */ - const U32 LLSD_SYNTAX_LSL_VERSION_EXPECTED = 2; - const std::string LLSD_SYNTAX_LSL_VERSION_KEY("llsd-lsl-syntax-version"); if (content.has(LLSD_SYNTAX_LSL_VERSION_KEY)) { diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 1f7e893b38..75cfc45380 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -75,7 +75,7 @@ private: public: LLSyntaxIdLSL(); - LLSyntaxIdLSL(std::string filenameDefault, std::string simFeatureName, std::string capabilityName); + LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability); bool checkSyntaxIdChanged(); bool fetching(); @@ -104,9 +104,9 @@ protected: void loadDefaultKeywordsIntoLLSD(); void loadKeywordsIntoLLSD(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } - void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } - void setFileNameDefault(std::string& name) { mFileNameDefault = name; } - void setFileNameNew(std::string name) { mFileNameNew = name; } + void setFileNameCurrent(const std::string& name) { mFileNameCurrent = name; } + void setFileNameDefault(const std::string& name) { mFileNameDefault = name; } + void setFileNameNew(const std::string name) { mFileNameNew = name; } }; -- cgit v1.2.3 From 1e851a2eb70e5f6b12a47c382efb3b9b17674993 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 7 May 2014 15:18:44 -0400 Subject: correct bad merges from 3.7.7-release --- indra/llui/llkeywords.cpp | 4 ++-- indra/llui/lltexteditor.cpp | 28 +++++++++++++++++----------- indra/newview/llappearancemgr.cpp | 4 ++-- indra/newview/llscripteditor.cpp | 6 +++--- 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 07c84e57c0..c79468ba5b 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -523,13 +523,13 @@ LLColor4 LLKeywords::readColor(LLSD& sd) } } -LLFastTimer::DeclareTimer FTM_SYNTAX_COLORING("Syntax Coloring"); +LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring"); // Walk through a string, applying the rules specified by the keyword token list and // create a list of color segments. void LLKeywords::findSegments(std::vector* seg_list, const LLWString& wtext, const LLColor4 &defaultColor, LLTextEditor& editor) { - LLFastTimer ft(FTM_SYNTAX_COLORING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_COLORING); seg_list->clear(); if( wtext.empty() ) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index b18c545f30..7818f6e285 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -792,7 +792,7 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + LL_DEBUGS("UserInput") << "hover handled by " << getName() << " (active)" << LL_ENDL; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; } @@ -2567,20 +2567,20 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Linden text version %d", &version) ) { - llwarns << "Invalid Linden text file header " << llendl; + LL_WARNS() << "Invalid Linden text file header " << LL_ENDL; return FALSE; } if( 1 != version ) { - llwarns << "Invalid Linden text file version: " << version << llendl; + LL_WARNS() << "Invalid Linden text file version: " << version << LL_ENDL; return FALSE; } instream.getline(tbuf, MAX_STRING); if( 0 != sscanf(tbuf, "{") ) { - llwarns << "Invalid Linden text file format" << llendl; + LL_WARNS() << "Invalid Linden text file format" << LL_ENDL; return FALSE; } @@ -2588,13 +2588,13 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) instream.getline(tbuf, MAX_STRING); if( 1 != sscanf(tbuf, "Text length %d", &text_len) ) { - llwarns << "Invalid Linden text length field" << llendl; + LL_WARNS() << "Invalid Linden text length field" << LL_ENDL; return FALSE; } if( text_len > mMaxTextByteLength ) { - llwarns << "Invalid Linden text length: " << text_len << llendl; + LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL; return FALSE; } @@ -2603,21 +2603,21 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length ) char* text = new char[ text_len + 1]; if (text == NULL) { - llerrs << "Memory allocation failure." << llendl; + LL_ERRS() << "Memory allocation failure." << LL_ENDL; return FALSE; } instream.get(text, text_len + 1, '\0'); text[text_len] = '\0'; if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */ { - llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;/* Flawfinder: ignore */ + LL_WARNS() << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << LL_ENDL;/* Flawfinder: ignore */ success = FALSE; } instream.getline(tbuf, MAX_STRING); if( success && (0 != sscanf(tbuf, "}")) ) { - llwarns << "Invalid Linden text file format: missing terminal }" << llendl; + LL_WARNS() << "Invalid Linden text file format: missing terminal }" << LL_ENDL; success = FALSE; } @@ -2680,7 +2680,7 @@ void LLTextEditor::resetPreedit() { if (hasPreeditString()) { - llwarns << "Preedit and selection!" << llendl; + LL_WARNS() << "Preedit and selection!" << LL_ENDL; deselect(); } else @@ -2690,6 +2690,12 @@ void LLTextEditor::resetPreedit() } if (hasPreeditString()) { + if (hasSelection()) + { + LL_WARNS() << "Preedit and selection!" << LL_ENDL; + deselect(); + } + setCursorPos(mPreeditPositions.front()); removeStringNoUndo(mCursorPos, mPreeditPositions.back() - mCursorPos); insertStringNoUndo(mCursorPos, mPreeditOverwrittenWString); @@ -2879,7 +2885,7 @@ void LLTextEditor::markAsPreedit(S32 position, S32 length) setCursorPos(position); if (hasPreeditString()) { - llwarns << "markAsPreedit invoked when hasPreeditString is true." << llendl; + LL_WARNS() << "markAsPreedit invoked when hasPreeditString is true." << LL_ENDL; } mPreeditWString = LLWString( getWText(), position, length ); if (length > 0) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 3024e90894..bab4936bb4 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1435,9 +1435,9 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) // deactivate all gestures in the outfit folder LLInventoryModel::item_array_t gest_items; getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false); - for(S32 i = 0; i < gest_items.count(); ++i) + for(S32 i = 0; i < gest_items.size(); ++i) { - LLViewerInventoryItem *gest_item = gest_items.get(i); + LLViewerInventoryItem *gest_item = gest_items[i]; if ( LLGestureMgr::instance().isGestureActive( gest_item->getLinkedUUID()) ) { LLGestureMgr::instance().deactivateGesture( gest_item->getLinkedUUID() ); diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 5d87f7ba0c..12c328e809 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -49,11 +49,11 @@ void LLScriptEditor::initKeywords() mKeywords.initialise(LLSyntaxIdLSL::getInstance()->getKeywordsXML()); } -static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); +LLTrace::BlockTimerStatHandle FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); void LLScriptEditor::loadKeywords() { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); mKeywords.processTokens(); segment_vec_t segment_list; @@ -71,7 +71,7 @@ void LLScriptEditor::updateSegments() { if (mReflowIndex < S32_MAX && mKeywords.isLoaded() && mParseOnTheFly) { - LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); + LL_RECORD_BLOCK_TIME(FTM_SYNTAX_HIGHLIGHTING); // HACK: No non-ascii keywords for now segment_vec_t segment_list; mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); -- cgit v1.2.3 From 8501d6494bceeea962d7251d882ddc244a8daa7f Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 7 May 2014 19:58:56 -0600 Subject: Code policy --- indra/llui/llkeywords.cpp | 2 +- indra/llui/llkeywords.h | 2 +- .../newview/app_settings/keywords_lsl_default.xml | 2 +- indra/newview/llpreviewscript.cpp | 4 +-- indra/newview/llpreviewscript.h | 2 +- indra/newview/llscripteditor.cpp | 2 +- indra/newview/llsyntaxid.cpp | 38 ++++++++-------------- indra/newview/llsyntaxid.h | 24 ++++---------- 8 files changed, 27 insertions(+), 49 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index bae604e270..346b9a83bd 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -251,7 +251,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) return LLUIColorTable::instance().getColor(color_group); } -void LLKeywords::initialise(LLSD SyntaxXML) +void LLKeywords::initialize(LLSD SyntaxXML) { mSyntax = SyntaxXML; mLoaded = true; diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index b17e9dd942..eecb327fee 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -115,7 +115,7 @@ public: bool isLoaded() const { return mLoaded; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); - void initialise(LLSD SyntaxXML); + void initialize(LLSD SyntaxXML); void processTokens(); // Add the token as described diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index 53a89f0f09..02823136ee 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -21,7 +21,7 @@ for tooltip - for loop\nfor (<initialiser>; <condition>; <post-iteration-statement>)\n{ ...\n} + for loop\nfor (<initializer>; <condition>; <post-iteration-statement>)\n{ ...\n} if diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index fae4aeb7bc..73dc19dd81 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -412,7 +412,7 @@ BOOL LLScriptEdCore::postBuild() LLSyntaxIdLSL::getInstance()->addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); // Intialise keyword highlighting for the current simulator's version of LSL - LLSyntaxIdLSL::getInstance()->initialise(); + LLSyntaxIdLSL::getInstance()->initialize(); if (LLSyntaxIdLSL::getInstance()->isDifferentVersion()) { @@ -440,7 +440,7 @@ void LLScriptEdCore::updateKeywords() void LLScriptEdCore::processLoaded() { - LLSyntaxIdLSL::getInstance()->initialise(); + LLSyntaxIdLSL::getInstance()->initialize(); if (LLSyntaxIdLSL::getInstance()->isLoaded()) { processKeywords(); diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 966c149d3d..69a72325fc 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -77,7 +77,7 @@ protected: public: ~LLScriptEdCore(); - void initialiseKeywords(); + void initializeKeywords(); void initMenu(); void processKeywords(); void processLoaded(); diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 5d87f7ba0c..869368e72c 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -46,7 +46,7 @@ LLScriptEditor::LLScriptEditor(const Params& p) void LLScriptEditor::initKeywords() { - mKeywords.initialise(LLSyntaxIdLSL::getInstance()->getKeywordsXML()); + mKeywords.initialize(LLSyntaxIdLSL::getInstance()->getKeywordsXML()); } static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 3f726fa8b5..3582ac024d 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -70,7 +70,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) << "Supported verson of syntax file." << LL_ENDL; LLSyntaxIdLSL::setKeywordsXml(content_ref); - LLSyntaxIdLSL::sInitialised = true; + LLSyntaxIdLSL::sInitialized = true; LLSyntaxIdLSL::sLoaded = true; LLSyntaxIdLSL::sLoadFailed = false; @@ -117,12 +117,12 @@ const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax"; const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml"; const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId"; -bool LLSyntaxIdLSL::sInitialised; +bool LLSyntaxIdLSL::sInitialized; LLSD LLSyntaxIdLSL::sKeywordsXml; bool LLSyntaxIdLSL::sLoaded; bool LLSyntaxIdLSL::sLoadFailed; bool LLSyntaxIdLSL::sVersionChanged; -LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal; +LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal; /** * @brief LLSyntaxIdLSL constructor @@ -207,7 +207,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() } else { - if ( mSyntaxIdCurrent.isNull() && isInitialised()) + if ( mSyntaxIdCurrent.isNull() && isInitialized()) { LL_INFOS("SyntaxLSL") << "It does not have LSLSyntaxId capability, remaining with default keywords file!" @@ -255,9 +255,9 @@ void LLSyntaxIdLSL::fetchKeywordsFile() //----------------------------------------------------------------------------- -// initialise +// initialize //----------------------------------------------------------------------------- -void LLSyntaxIdLSL::initialise() +void LLSyntaxIdLSL::initialize() { mFileNameNew = mFileNameCurrent; mSyntaxIdNew = mSyntaxIdCurrent; @@ -309,7 +309,7 @@ void LLSyntaxIdLSL::initialise() loadDefaultKeywordsIntoLLSD(); } } - else if (!isInitialised()) + else if (!isInitialized()) { loadDefaultKeywordsIntoLLSD(); } @@ -355,8 +355,7 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) //----------------------------------------------------------------------------- void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() { - LL_INFOS("SyntaxLSL") - << "LSLSyntaxId is null so we will use the default file!" << LL_ENDL; + LL_INFOS("SyntaxLSL") << "LSLSyntaxId is null so we will use the default file!" << LL_ENDL; mSyntaxIdNew = LLUUID(); buildFullFileSpec(); loadKeywordsIntoLLSD(); @@ -373,9 +372,7 @@ void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() */ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { - LL_INFOS("SyntaxLSL") - << "Trying to open cached or default keyword file ;-)" - << LL_ENDL; + LL_INFOS("SyntaxLSL") << "Trying to open cached or default keyword file" << LL_ENDL; // Is this the right thing to do, or should we leave the old content // even if it isn't entirely accurate anymore? @@ -389,9 +386,7 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() sLoaded = (bool)LLSDSerialize::fromXML(content, file); if (!sLoaded) { - LL_WARNS("SyntaxLSL") - << "Unable to deserialise file: " - << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; } else { @@ -399,15 +394,13 @@ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { sKeywordsXml = content; sLoaded = true; - sInitialised = true; - LL_INFOS("SyntaxLSL") - << "Deserialised file: " << mFullFileSpec << LL_ENDL; + sInitialized = true; + LL_INFOS("SyntaxLSL") << "Deserialised file: " << mFullFileSpec << LL_ENDL; } else { sLoaded = false; - LL_WARNS("SyntaxLSL") - << "Unknown or unsupported version of syntax file." << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } } @@ -422,8 +415,3 @@ boost::signals2::connection LLSyntaxIdLSL::addFileFetchedCallback(const file_fet { return sFileFetchedSignal.connect(cb); } - -void LLSyntaxIdLSL::removeFileFetchedCallback(boost::signals2::connection callback) -{ - sFileFetchedSignal.disconnect(callback); -} diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 75cfc45380..b68f3f4237 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -36,23 +36,18 @@ #include "llsingleton.h" #include "llviewerregion.h" - -/** - * @file llsyntaxid.h - * @brief Tracks the file needed to decorate the current sim's version of LSL. - */ -class LLSyntaxIdLSL: public LLSingleton +class LLSyntaxIdLSL : public LLSingleton { friend class fetchKeywordsFileResponder; public: typedef boost::signals2::signal file_fetched_signal_t; - static const std::string CAPABILITY_NAME; - static const std::string FILENAME_DEFAULT; - static const std::string SIMULATOR_FEATURE; + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; protected: - static bool sInitialised; + static bool sInitialized; static LLSD sKeywordsXml; static bool sLoaded; static bool sLoadFailed; @@ -85,16 +80,15 @@ public: LLSD getKeywordsXML() const { return sKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } bool isDifferentVersion() const { return sVersionChanged; } - bool isInitialised() const { return sInitialised; } + bool isInitialized() const { return sInitialized; } - void initialise(); + void initialize(); bool isLoaded() { return sLoaded; } static bool isSupportedVersion(const LLSD& content); static void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); - void removeFileFetchedCallback(boost::signals2::connection callback); protected: @@ -110,10 +104,6 @@ protected: }; -/** - * @file llsyntaxid.h - * @brief Handles responses for the LSLSyntax capability's get call. Is a friend of LLSyntaxIdLSL - */ class fetchKeywordsFileResponder : public LLHTTPClient::Responder { public: -- cgit v1.2.3 From 059a29e976a41c30ec9fb346ae53bbc51aa682fc Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 11 May 2014 23:17:31 -0600 Subject: Fix callback signal, Eliminate some unnecessary statics --- indra/newview/llpreviewscript.cpp | 5 +++-- indra/newview/llsyntaxid.cpp | 35 ++++++++++++++--------------------- indra/newview/llsyntaxid.h | 20 ++++++++------------ 3 files changed, 25 insertions(+), 35 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index befec98849..d83a2bc3a6 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -374,7 +374,6 @@ LLScriptEdCore::LLScriptEdCore( setXMLFilename("panel_script_ed.xml"); llassert_always(mContainer != NULL); - mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); } LLScriptEdCore::~LLScriptEdCore() @@ -391,6 +390,7 @@ LLScriptEdCore::~LLScriptEdCore() delete mLiveFile; mRegionChangedCallback.disconnect(); + mFileFetchedCallback.disconnect(); } BOOL LLScriptEdCore::postBuild() @@ -409,7 +409,7 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - LLSyntaxIdLSL::getInstance()->addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); + mFileFetchedCallback = LLSyntaxIdLSL::getInstance()->addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); // Intialise keyword highlighting for the current simulator's version of LSL LLSyntaxIdLSL::getInstance()->initialize(); @@ -422,6 +422,7 @@ BOOL LLScriptEdCore::postBuild() { LL_DEBUGS("SyntaxLSL") << "Hashes are the same, no need to update highlighter." << LL_ENDL; } + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); return TRUE; } diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 3582ac024d..093caf3ecf 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -49,7 +49,7 @@ void fetchKeywordsFileResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - LLSyntaxIdLSL::sLoadFailed = true; + LLSyntaxIdLSL::getInstance()->sLoadFailed = true; LL_WARNS("SyntaxLSL") << "fetchKeywordsFileResponder error [status:" << status << "]: " << content @@ -64,35 +64,35 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) LL_DEBUGS("SyntaxLSL") << "content_ref isMap so assuming valid XML." << LL_ENDL; - if (LLSyntaxIdLSL::isSupportedVersion(content_ref)) + if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) { LL_INFOS("SyntaxLSL") << "Supported verson of syntax file." << LL_ENDL; - LLSyntaxIdLSL::setKeywordsXml(content_ref); - LLSyntaxIdLSL::sInitialized = true; - LLSyntaxIdLSL::sLoaded = true; - LLSyntaxIdLSL::sLoadFailed = false; + LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); + LLSyntaxIdLSL::getInstance()->sInitialized = true; + LLSyntaxIdLSL::getInstance()->sLoaded = true; + LLSyntaxIdLSL::getInstance()->sLoadFailed = false; cacheFile(content_ref); } else { - LLSyntaxIdLSL::sLoaded = false; - LLSyntaxIdLSL::sLoadFailed = true; + LLSyntaxIdLSL::getInstance()->sLoaded = false; + LLSyntaxIdLSL::getInstance()->sLoadFailed = true; LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } else { - LLSyntaxIdLSL::sLoaded = false; - LLSyntaxIdLSL::sLoadFailed = true; + LLSyntaxIdLSL::getInstance()->sLoaded = false; + LLSyntaxIdLSL::getInstance()->sLoadFailed = true; LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL; } - LLSyntaxIdLSL::sFileFetchedSignal(); + LLSyntaxIdLSL::getInstance()->sFileFetchedSignal(); } void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) @@ -113,16 +113,9 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- -const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax"; -const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml"; -const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId"; - -bool LLSyntaxIdLSL::sInitialized; -LLSD LLSyntaxIdLSL::sKeywordsXml; -bool LLSyntaxIdLSL::sLoaded; -bool LLSyntaxIdLSL::sLoadFailed; -bool LLSyntaxIdLSL::sVersionChanged; -LLSyntaxIdLSL::file_fetched_signal_t LLSyntaxIdLSL::sFileFetchedSignal; +const std::string CAPABILITY_NAME = "LSLSyntax"; +const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml"; +const std::string SIMULATOR_FEATURE = "LSLSyntaxId"; /** * @brief LLSyntaxIdLSL constructor diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index b68f3f4237..179d622286 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -42,17 +42,13 @@ friend class fetchKeywordsFileResponder; public: typedef boost::signals2::signal file_fetched_signal_t; - static const std::string CAPABILITY_NAME; - static const std::string FILENAME_DEFAULT; - static const std::string SIMULATOR_FEATURE; - protected: - static bool sInitialized; - static LLSD sKeywordsXml; - static bool sLoaded; - static bool sLoadFailed; - static bool sVersionChanged; - static file_fetched_signal_t sFileFetchedSignal; + bool sInitialized; + LLSD sKeywordsXml; + bool sLoaded; + bool sLoadFailed; + bool sVersionChanged; + file_fetched_signal_t sFileFetchedSignal; private: std::string mCapabilityName; @@ -85,8 +81,8 @@ public: void initialize(); bool isLoaded() { return sLoaded; } - static bool isSupportedVersion(const LLSD& content); - static void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } + bool isSupportedVersion(const LLSD& content); + void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); -- cgit v1.2.3 From 6141aa44d0f2aa2662a536c9d3ce9312dd57bd99 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 12 May 2014 06:54:04 -0600 Subject: STORM-2027 - Fix syntax highlighting on subsequent opening of scripts. This could use more refactoring, but it fixes it. --- indra/newview/llpreviewscript.cpp | 8 +++++--- indra/newview/llpreviewscript.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index d83a2bc3a6..b300f3a39c 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -352,6 +352,7 @@ LLScriptEdCore::LLScriptEdCore( void (*save_callback)(void*, BOOL), void (*search_replace_callback) (void* userdata), void* userdata, + bool live, S32 bottom_pad) : LLPanel(), @@ -366,6 +367,7 @@ LLScriptEdCore::LLScriptEdCore( mLiveHelpHistorySize(0), mEnableSave(FALSE), mLiveFile(NULL), + mLive(live), mContainer(container), mHasScriptData(FALSE) { @@ -420,7 +422,7 @@ BOOL LLScriptEdCore::postBuild() } else { - LL_DEBUGS("SyntaxLSL") << "Hashes are the same, no need to update highlighter." << LL_ENDL; + processKeywords(); } mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); @@ -1289,8 +1291,8 @@ void* LLPreviewLSL::createScriptEdPanel(void* userdata) LLPreviewLSL::onSave, LLPreviewLSL::onSearchReplace, self, + false, 0); - self->mScriptEd->mLive = false; return self->mScriptEd; } @@ -1745,8 +1747,8 @@ void* LLLiveLSLEditor::createScriptEdPanel(void* userdata) &LLLiveLSLEditor::onSave, &LLLiveLSLEditor::onSearchReplace, self, + true, 0); - self->mScriptEd->mLive = true; return self->mScriptEd; } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 8b98b908e1..e19a87ec0a 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -72,6 +72,7 @@ protected: void (*save_callback)(void* userdata, BOOL close_after_save), void (*search_replace_callback)(void* userdata), void* userdata, + bool live, S32 bottom_pad = 0); // pad below bottom row of buttons public: ~LLScriptEdCore(); -- cgit v1.2.3 From 70aff2154b910afd9a8bdc14c72c4e058c8b1076 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 12 May 2014 07:23:52 -0600 Subject: Eliminate updateKeywords() --- indra/newview/llpreviewscript.cpp | 26 ++++++++++++-------------- indra/newview/llpreviewscript.h | 1 - 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b300f3a39c..5e7b148101 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -391,8 +391,14 @@ LLScriptEdCore::~LLScriptEdCore() } delete mLiveFile; - mRegionChangedCallback.disconnect(); - mFileFetchedCallback.disconnect(); + if (mRegionChangedCallback.connected()) + { + mRegionChangedCallback.disconnect(); + } + if (mFileFetchedCallback.connected()) + { + mFileFetchedCallback.disconnect(); + } } BOOL LLScriptEdCore::postBuild() @@ -424,21 +430,13 @@ BOOL LLScriptEdCore::postBuild() { processKeywords(); } - mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::updateKeywords, this)); - - return TRUE; -} - -void LLScriptEdCore::updateKeywords() -{ + if (mLive) { - mEditor->clearSegments(); - } - else - { - processLoaded(); + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::processLoaded, this)); } + + return TRUE; } void LLScriptEdCore::processLoaded() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index e19a87ec0a..5aab3ed938 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -81,7 +81,6 @@ public: void initMenu(); void processKeywords(); void processLoaded(); - void updateKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From 82cd99d6eb1fbe57e80f54ece6f740c520c7b78a Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 12 May 2014 07:49:18 -0600 Subject: Style - rename previously static members, fix scope, ease up on the exclamation points in debug messages --- indra/newview/llsyntaxid.cpp | 133 ++++++++++++++++--------------------------- indra/newview/llsyntaxid.h | 58 +++++++++---------- 2 files changed, 76 insertions(+), 115 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 093caf3ecf..9a0f53978e 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -40,20 +40,15 @@ fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) { mFileSpec = filespec; - LL_INFOS("SyntaxLSL") - << "Instantiating with file saving to: '" << filespec << "'" - << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; } void fetchKeywordsFileResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - LLSyntaxIdLSL::getInstance()->sLoadFailed = true; - LL_WARNS("SyntaxLSL") - << "fetchKeywordsFileResponder error [status:" - << status << "]: " << content - << LL_ENDL; + LLSyntaxIdLSL::getInstance()->mLoadFailed = true; + LL_WARNS("SyntaxLSL") << "fetchKeywordsFileResponder error [status:" << status << "]: " << content << LL_ENDL; } void fetchKeywordsFileResponder::result(const LLSD& content_ref) @@ -61,38 +56,34 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) // Continue only if a valid LLSD object was returned. if (content_ref.isMap()) { - LL_DEBUGS("SyntaxLSL") - << "content_ref isMap so assuming valid XML." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "content_ref isMap so assuming valid XML." << LL_ENDL; if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) { - LL_INFOS("SyntaxLSL") - << "Supported verson of syntax file." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Supported verson of syntax file." << LL_ENDL; LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); - LLSyntaxIdLSL::getInstance()->sInitialized = true; - LLSyntaxIdLSL::getInstance()->sLoaded = true; - LLSyntaxIdLSL::getInstance()->sLoadFailed = false; + LLSyntaxIdLSL::getInstance()->mInitialized = true; + LLSyntaxIdLSL::getInstance()->mLoaded = true; + LLSyntaxIdLSL::getInstance()->mLoadFailed = false; cacheFile(content_ref); } else { - LLSyntaxIdLSL::getInstance()->sLoaded = false; - LLSyntaxIdLSL::getInstance()->sLoadFailed = true; - LL_WARNS("SyntaxLSL") - << "Unknown or unsupported version of syntax file." << LL_ENDL; + LLSyntaxIdLSL::getInstance()->mLoaded = false; + LLSyntaxIdLSL::getInstance()->mLoadFailed = true; + LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } else { - LLSyntaxIdLSL::getInstance()->sLoaded = false; - LLSyntaxIdLSL::getInstance()->sLoadFailed = true; - LL_WARNS("SyntaxLSL") - << "Syntax file '" << mFileSpec << "' contains invalid LLSD!" << LL_ENDL; + LLSyntaxIdLSL::getInstance()->mLoaded = false; + LLSyntaxIdLSL::getInstance()->mLoadFailed = true; + LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD." << LL_ENDL; } - LLSyntaxIdLSL::getInstance()->sFileFetchedSignal(); + LLSyntaxIdLSL::getInstance()->mFileFetchedSignal(); } void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) @@ -106,8 +97,7 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) file.write(xml.c_str(), str.str().size()); file.close(); - LL_INFOS("SyntaxLSL") - << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; } //----------------------------------------------------------------------------- @@ -159,18 +149,15 @@ std::string LLSyntaxIdLSL::buildFullFileSpec() //----------------------------------------------------------------------------- bool LLSyntaxIdLSL::checkSyntaxIdChanged() { - sVersionChanged = false; + mVersionChanged = false; LLViewerRegion* region = gAgent.getRegion(); if (region) { if (!region->capabilitiesReceived()) { // Shouldn't be possible, but experience shows that it may be needed. - sLoadFailed = true; - LL_WARNS("SyntaxLSL") - << "Region '" << region->getName() - << "' has not received capabilities yet! Cannot process SyntaxId." - << LL_ENDL; + mLoadFailed = true; + LL_INFOS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities yet. Cannot process SyntaxId." << LL_ENDL; } else { @@ -185,40 +172,32 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() mCapabilityURL = region->getCapability(mCapabilityName); if (mSyntaxIdCurrent != mSyntaxIdNew) { - LL_INFOS("SyntaxLSL") - << "It has LSLSyntaxId capability, and the new hash is '" - << mSyntaxIdNew.asString() << "'" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Region has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew.asString() << "'" << LL_ENDL; - sVersionChanged = true; + mVersionChanged = true; } else { - LL_INFOS("SyntaxLSL") - << "It has the same LSLSyntaxId! Leaving hash as '" - << mSyntaxIdCurrent.asString() << "'" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Region has the same LSLSyntaxId! Leaving hash as '" << mSyntaxIdCurrent.asString() << "'" << LL_ENDL; } } else { if ( mSyntaxIdCurrent.isNull() && isInitialized()) { - LL_INFOS("SyntaxLSL") - << "It does not have LSLSyntaxId capability, remaining with default keywords file!" - << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Region does not have LSLSyntaxId capability, remaining with default keywords." << LL_ENDL; } else { // The hash is set to NULL_KEY to indicate use of default keywords file mSyntaxIdNew = LLUUID(); - LL_INFOS("SyntaxLSL") - << "It does not have LSLSyntaxId capability, using default keywords file!" - << LL_ENDL; - sVersionChanged = true; + LL_DEBUGS("SyntaxLSL") << "Region does not have LSLSyntaxId capability, using default keywords." << LL_ENDL; + mVersionChanged = true; } } } } - return sVersionChanged; + return mVersionChanged; } /** @@ -228,7 +207,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() */ bool LLSyntaxIdLSL::fetching() { - return !(sLoaded || sLoadFailed); + return !(mLoaded || mLoadFailed); } //----------------------------------------------------------------------------- @@ -240,10 +219,7 @@ void LLSyntaxIdLSL::fetchKeywordsFile() new fetchKeywordsFileResponder(mFullFileSpec), LLSD(), 30.f ); - LL_INFOS("SyntaxLSL") - << "LSLSyntaxId capability URL is: " << mCapabilityURL - << ". Filename to use is: '" << mFullFileSpec << "'." - << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << mFullFileSpec << "'." << LL_ENDL; } @@ -257,8 +233,8 @@ void LLSyntaxIdLSL::initialize() if (checkSyntaxIdChanged()) { - sKeywordsXml = LLSD(); - sLoaded = sLoadFailed = false; + mKeywordsXml = LLSD(); + mLoaded = mLoadFailed = false; if (mSyntaxIdNew.isNull()) { // Need to open the default @@ -266,9 +242,7 @@ void LLSyntaxIdLSL::initialize() } else if (!mCapabilityURL.empty() ) { - LL_INFOS("SyntaxLSL") - << "LSL version has changed, getting appropriate file." - << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "LSL version has changed, getting appropriate file." << LL_ENDL; // Need a full spec regardless of file source, so build it now. buildFullFileSpec(); @@ -276,16 +250,11 @@ void LLSyntaxIdLSL::initialize() { if ( !gDirUtilp->fileExists(mFullFileSpec) ) { // Does not exist, so fetch it from the capability - LL_INFOS("SyntaxLSL") - << "File is not cached, we will try to download it!" - << LL_ENDL; + LL_INFOS("SyntaxLSL") << "LSL syntax not cached, attempting download." << LL_ENDL; fetchKeywordsFile(); } else { - LL_INFOS("SyntaxLSL") - << "File is cached, no need to download!" - << LL_ENDL; loadKeywordsIntoLLSD(); } } @@ -296,9 +265,8 @@ void LLSyntaxIdLSL::initialize() } else { - sLoadFailed = true; - LL_WARNS("SyntaxLSL") - << "LSLSyntaxId capability URL is empty!!" << LL_ENDL; + mLoadFailed = true; + LL_WARNS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } } @@ -327,8 +295,7 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) if (content.has(LLSD_SYNTAX_LSL_VERSION_KEY)) { - LL_INFOS("SyntaxLSL") - << "Syntax file version: " << content[LLSD_SYNTAX_LSL_VERSION_KEY].asString() << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "LSL syntax version: " << content[LLSD_SYNTAX_LSL_VERSION_KEY].asString() << LL_ENDL; if (content[LLSD_SYNTAX_LSL_VERSION_KEY].asInteger() == LLSD_SYNTAX_LSL_VERSION_EXPECTED) { @@ -337,7 +304,7 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) } else { - LL_WARNS("SyntaxLSL") << "No version key available!" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "No LSL syntax version key." << LL_ENDL; } return isValid; @@ -348,7 +315,7 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) //----------------------------------------------------------------------------- void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() { - LL_INFOS("SyntaxLSL") << "LSLSyntaxId is null so we will use the default file!" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId is null so we will use the default file." << LL_ENDL; mSyntaxIdNew = LLUUID(); buildFullFileSpec(); loadKeywordsIntoLLSD(); @@ -365,46 +332,46 @@ void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() */ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { - LL_INFOS("SyntaxLSL") << "Trying to open cached or default keyword file" << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Trying to open cached or default keyword file" << LL_ENDL; // Is this the right thing to do, or should we leave the old content // even if it isn't entirely accurate anymore? - sKeywordsXml = LLSD().emptyMap(); + mKeywordsXml = LLSD().emptyMap(); LLSD content; llifstream file; file.open(mFullFileSpec); if (file.is_open()) { - sLoaded = (bool)LLSDSerialize::fromXML(content, file); - if (!sLoaded) + mLoaded = (bool)LLSDSerialize::fromXML(content, file); + if (!mLoaded) { - LL_WARNS("SyntaxLSL") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unable to deserialise: " << mFullFileSpec << LL_ENDL; } else { if (isSupportedVersion(content)) { - sKeywordsXml = content; - sLoaded = true; - sInitialized = true; - LL_INFOS("SyntaxLSL") << "Deserialised file: " << mFullFileSpec << LL_ENDL; + mKeywordsXml = content; + mLoaded = true; + mInitialized = true; + LL_DEBUGS("SyntaxLSL") << "Deserialised: " << mFullFileSpec << LL_ENDL; } else { - sLoaded = false; + mLoaded = false; LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } } else { - LL_WARNS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Unable to open: " << mFullFileSpec << LL_ENDL; } - sLoadFailed = !sLoaded; + mLoadFailed = !mLoaded; } boost::signals2::connection LLSyntaxIdLSL::addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb) { - return sFileFetchedSignal.connect(cb); + return mFileFetchedSignal.connect(cb); } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 179d622286..d803a09167 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -39,30 +39,6 @@ class LLSyntaxIdLSL : public LLSingleton { friend class fetchKeywordsFileResponder; -public: - typedef boost::signals2::signal file_fetched_signal_t; - -protected: - bool sInitialized; - LLSD sKeywordsXml; - bool sLoaded; - bool sLoadFailed; - bool sVersionChanged; - file_fetched_signal_t sFileFetchedSignal; - -private: - std::string mCapabilityName; - std::string mCapabilityURL; - std::string mFileNameCurrent; - std::string mFileNameDefault; - std::string mFileNameNew; - ELLPath mFilePath; - std::string mFullFileSpec; - std::string mSimulatorFeature; - LLUUID mSyntaxIdCurrent; - LLUUID mSyntaxIdNew; - - public: LLSyntaxIdLSL(); @@ -73,20 +49,19 @@ public: std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } std::string getFileSpec() const { return mFullFileSpec; } - LLSD getKeywordsXML() const { return sKeywordsXml; } + LLSD getKeywordsXML() const { return mKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } - bool isDifferentVersion() const { return sVersionChanged; } - bool isInitialized() const { return sInitialized; } + bool isDifferentVersion() const { return mVersionChanged; } + bool isInitialized() const { return mInitialized; } void initialize(); - bool isLoaded() { return sLoaded; } - - bool isSupportedVersion(const LLSD& content); - void setKeywordsXml(const LLSD& content) { sKeywordsXml = content; } + bool isLoaded() { return mLoaded; } + bool isSupportedVersion(const LLSD& content); + void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; } + typedef boost::signals2::signal file_fetched_signal_t; boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); - protected: std::string buildFileNameNew(); std::string buildFullFileSpec(); @@ -97,6 +72,25 @@ protected: void setFileNameCurrent(const std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(const std::string& name) { mFileNameDefault = name; } void setFileNameNew(const std::string name) { mFileNameNew = name; } + +private: + bool mInitialized; + LLSD mKeywordsXml; + bool mLoaded; + bool mLoadFailed; + bool mVersionChanged; + file_fetched_signal_t mFileFetchedSignal; + + std::string mCapabilityName; + std::string mCapabilityURL; + std::string mFileNameCurrent; + std::string mFileNameDefault; + std::string mFileNameNew; + ELLPath mFilePath; + std::string mFullFileSpec; + std::string mSimulatorFeature; + LLUUID mSyntaxIdCurrent; + LLUUID mSyntaxIdNew; }; -- cgit v1.2.3 From f9bbf9e30a24bb873252cd5f0dfe7dadeb7b4b22 Mon Sep 17 00:00:00 2001 From: Cinder Date: Tue, 13 May 2014 10:16:03 -0600 Subject: STORM-2028 - Show context menu in script editor --- indra/newview/llscripteditor.h | 2 +- indra/newview/skins/default/xui/en/panel_script_ed.xml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index 86c915d6a0..d3e18021f9 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -32,7 +32,6 @@ class LLScriptEditor : public LLTextEditor { - friend class LLUICtrlFactory; public: struct Params : public LLInitParam::Block @@ -48,6 +47,7 @@ public: LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } protected: + friend class LLUICtrlFactory; LLScriptEditor(const Params& p); private: diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 1a4f0aff73..76a81c4885 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -149,7 +149,7 @@ + word_wrap="true" + show_context_menu="true" + show_line_numbers="true"> Loading... Date: Tue, 13 May 2014 17:49:51 -0400 Subject: STORM-68 Apply default upload permission settings for ONLY Share with Group and Allow anyone to Copy to snapshot upload. The Next owner values will stay at full perms. --- indra/newview/llsnapshotlivepreview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 737f665954..5b22c51321 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -818,8 +818,8 @@ void LLSnapshotLivePreview::saveTexture() LLFolderType::FT_SNAPSHOT_CATEGORY, LLInventoryType::IT_SNAPSHOT, PERM_ALL, // Note: Snapshots to inventory is a special case of content upload - LLFloaterPerms::getGroupPerms(), // that is more permissive than other uploads - LLFloaterPerms::getEveryonePerms(), + LLFloaterPerms::getGroupPerms("Uploads"), // that is more permissive than other uploads + LLFloaterPerms::getEveryonePerms("Uploads"), "Snapshot : " + pos_string, callback, expected_upload_cost, userdata); gViewerWindow->playSnapshotAnimAndSound(); -- cgit v1.2.3 From c073bad6b29fa3c5167c28c286171a1bda9b5e4a Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 14 May 2014 11:04:53 -0600 Subject: Begin syntax coloring personalization --- indra/llui/llkeywords.cpp | 4 +- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterscriptedprefs.cpp | 56 +++ indra/newview/llfloaterscriptedprefs.h | 48 +++ indra/newview/llviewerfloaterreg.cpp | 2 + indra/newview/skins/default/colors.xml | 12 +- .../default/xui/en/floater_script_ed_prefs.xml | 478 +++++++++++++++++++++ .../skins/default/xui/en/panel_script_ed.xml | 11 +- .../newview/skins/default/xui/en/script_editor.xml | 12 +- 9 files changed, 615 insertions(+), 10 deletions(-) create mode 100644 indra/newview/llfloaterscriptedprefs.cpp create mode 100644 indra/newview/llfloaterscriptedprefs.h create mode 100644 indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 2d8bd926c0..f633f3e4af 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -237,11 +237,11 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) } else if (key_in == "misc-comments_1_sided") { - color_group = "SyntaxLslComment1Sided"; + color_group = "SyntaxLslComment"; } else if (key_in == "misc-comments_2_sided") { - color_group = "SyntaxLslComment2Sided"; + color_group = "SyntaxLslComment"; } else { diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index f0b7584312..1877db6280 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -272,6 +272,7 @@ set(viewer_SOURCE_FILES llfloaterregionrestarting.cpp llfloatersceneloadstats.cpp llfloaterscriptdebug.cpp + llfloaterscriptedprefs.cpp llfloaterscriptlimits.cpp llfloatersearch.cpp llfloatersellland.cpp @@ -869,6 +870,7 @@ set(viewer_HEADER_FILES llfloaterregionrestarting.h llfloatersceneloadstats.h llfloaterscriptdebug.h + llfloaterscriptedprefs.h llfloaterscriptlimits.h llfloatersearch.h llfloatersellland.h diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp new file mode 100644 index 0000000000..39624186bb --- /dev/null +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -0,0 +1,56 @@ +/** + * @file llfloaterscriptedprefs.cpp + * @brief Color controls for the script editor + * @author Cinder Roxley + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, 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. + * + * 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. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llfloaterscriptedprefs.h" + +#include "llcolorswatch.h" + + +LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) +: LLFloater(key) +{ + mCommitCallbackRegistrar.add("ScriptPref.applyUIColor", boost::bind(&LLFloaterScriptEdPrefs::applyUIColor, this ,_1, _2)); + mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2)); +} + +BOOL LLFloaterScriptEdPrefs::postBuild() +{ + return TRUE; +} + +void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); + // *TODO: Signal all active script editors to change colors on the fly. +} + +void LLFloaterScriptEdPrefs::getUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLColorSwatchCtrl* color_swatch = dynamic_cast(ctrl); + color_swatch->setOriginal(LLUIColorTable::instance().getColor(param.asString())); +} diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h new file mode 100644 index 0000000000..360c9adc92 --- /dev/null +++ b/indra/newview/llfloaterscriptedprefs.h @@ -0,0 +1,48 @@ +/** + * @file llfloaterscriptedprefs.h + * @brief Color controls for the script editor + * @author Cinder Roxley + * + * $LicenseInfo:firstyear=2006&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2014, 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. + * + * 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. + * + * 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 + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#ifndef LLFLOATERSCRIPTEDPREFS_H +#define LLFLOATERSCRIPTEDPREFS_H + +#include "llfloater.h" + +class LLUICtrl; + +class LLFloaterScriptEdPrefs : public LLFloater +{ +public: + LLFloaterScriptEdPrefs(const LLSD& key); + BOOL postBuild(); + +private: + ~LLFloaterScriptEdPrefs() {}; + + void applyUIColor(LLUICtrl* ctrl, const LLSD& param); + void getUIColor(LLUICtrl* ctrl, const LLSD& param); +}; + +#endif // LL_FLOATERSCRIPTEDPREFS_H diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index fae35fe664..3cd5b54aaf 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -98,6 +98,7 @@ #include "llfloaterreporter.h" #include "llfloatersceneloadstats.h" #include "llfloaterscriptdebug.h" +#include "llfloaterscriptedprefs.h" #include "llfloaterscriptlimits.h" #include "llfloatersearch.h" #include "llfloatersellland.h" @@ -282,6 +283,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); LLFloaterReg::add("properties", "floater_inventory_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("script_colors", "floater_script_ed_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("telehubs", "floater_telehub.xml",&LLFloaterReg::build); LLFloaterReg::add("test_inspectors", "floater_test_inspectors.xml", &LLFloaterReg::build); diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index cb1d6aa32b..bdbece33e0 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -907,10 +907,16 @@ + name="ScriptText" + reference="Black" /> + + + + + Choose desired colors: + + + + + + + + Text + + + + + + + Cursor + + + + + + + Background + + + + + + + Sections + + + + + + + Data Types + + + + + + + Events + + + + + + + Comment + + + + + + + String Literals + + + + + + + + Integer Const + + + + + + + String Const + + + + + + + Float Const + + + + + + + Compound + + + + + + + Flow Control + + + + + + + Function + + + +default +{ + state_entry() + { + llSay(0, "Hello!"); + } +} + + \ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 76a81c4885..755d9eaf39 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -70,6 +70,16 @@ label="Save to file..." layout="topleft" name="SaveToFile" /> + + + + + name="script_editor" + parse_urls="false" + show_context_menu="true" + show_line_numbers="true" + text_color="ScriptText" + default_color="ScriptText" + bg_writeable_color="ScriptBackground" + bg_focus_color="ScriptBackground"> -- cgit v1.2.3 From e776b600b1a76fcbe316041fc6fa8e885464daee Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 14 May 2014 14:08:24 -0600 Subject: Refactor more script editor properties away from LLTextEditor to LLScriptEditor --- indra/llui/lltexteditor.cpp | 77 +---------------- indra/llui/lltexteditor.h | 7 +- indra/newview/llfloaterscriptedprefs.h | 4 +- indra/newview/llscripteditor.cpp | 96 +++++++++++++++++++++- indra/newview/llscripteditor.h | 8 ++ .../default/xui/en/floater_script_ed_prefs.xml | 1 - .../skins/default/xui/en/panel_script_ed.xml | 3 +- 7 files changed, 106 insertions(+), 90 deletions(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 7818f6e285..268c830a75 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -75,8 +75,6 @@ template class LLTextEditor* LLView::getChild( // // Constants // -const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; -const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; const S32 SPACES_PER_TAB = 4; const F32 SPELLCHECK_DELAY = 0.5f; // delay between the last keypress and spell checking the word the cursor is on @@ -236,7 +234,6 @@ LLTextEditor::Params::Params() prevalidate_callback("prevalidate_callback"), embedded_items("embedded_items", false), ignore_tab("ignore_tab", true), - show_line_numbers("show_line_numbers", false), auto_indent("auto_indent", true), default_color("default_color"), commit_on_focus_lost("commit_on_focus_lost", false), @@ -252,8 +249,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mBaseDocIsPristine(TRUE), mPristineCmd( NULL ), mLastCmd( NULL ), - mDefaultColor( p.default_color() ), - mShowLineNumbers ( p.show_line_numbers ), + mDefaultColor( p.default_color() ), mAutoIndent(p.auto_indent), mCommitOnFocusLost( p.commit_on_focus_lost), mAllowEmbeddedItems( p.embedded_items ), @@ -277,14 +273,7 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : params.visible = p.border_visible; mBorder = LLUICtrlFactory::create (params); addChild( mBorder ); - setText(p.default_text()); - - if (mShowLineNumbers) - { - mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; - updateRects(); - } mParseOnTheFly = TRUE; } @@ -2196,69 +2185,6 @@ void LLTextEditor::drawPreeditMarker() } } - -void LLTextEditor::drawLineNumbers() -{ - LLGLSUIDefault gls_ui; - LLRect scrolled_view_rect = getVisibleDocumentRect(); - LLRect content_rect = getVisibleTextRect(); - LLLocalClipRect clip(content_rect); - S32 first_line = getFirstVisibleLine(); - S32 num_lines = getLineCount(); - if (first_line >= num_lines) - { - return; - } - - S32 cursor_line = mLineInfoList[getLineNumFromDocIndex(mCursorPos)].mLineNum; - - if (mShowLineNumbers) - { - S32 left = 0; - S32 top = getRect().getHeight(); - S32 bottom = 0; - - gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor.get() ); // line number area always read-only - gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN-1, bottom, LLColor4::grey3); // separator - - S32 last_line_num = -1; - - for (S32 cur_line = first_line; cur_line < num_lines; cur_line++) - { - line_info& line = mLineInfoList[cur_line]; - - if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mVisibleTextRect.mBottom) - { - break; - } - - S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom; - // draw the line numbers - if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) - { - const LLFontGL *num_font = LLFontGL::getFontMonospace(); - const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); - BOOL is_cur_line = cursor_line == line.mLineNum; - const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; - const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; - num_font->render( - ltext, // string to draw - 0, // begin offset - UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x - line_bottom, // y - fg_color, - LLFontGL::RIGHT, // horizontal alignment - LLFontGL::BOTTOM, // vertical alignment - style, - LLFontGL::NO_SHADOW, - S32_MAX, // max chars - UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2); // max pixels - last_line_num = line.mLineNum; - } - } - } -} - void LLTextEditor::draw() { { @@ -2270,7 +2196,6 @@ void LLTextEditor::draw() } LLTextBase::draw(); - drawLineNumbers(); drawPreeditMarker(); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 404275026c..2408613824 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -58,7 +58,6 @@ public: Optional embedded_items, ignore_tab, - show_line_numbers, commit_on_focus_lost, show_context_menu, enable_tooltip_paste, @@ -279,11 +278,11 @@ protected: protected: LLUIColor mDefaultColor; - BOOL mShowLineNumbers; bool mAutoIndent; bool mParseOnTheFly; void updateLinkSegments(); + class LLViewBorder* mBorder; private: // @@ -293,8 +292,6 @@ private: void cleanStringForPaste(LLWString & clean_string); void pasteTextWithLinebreaks(LLWString & clean_string); - void drawLineNumbers(); - void onKeyStroke(); // Concrete TextCmd sub-classes used by the LLTextEditor base class @@ -303,8 +300,6 @@ private: class TextCmdOverwriteChar; class TextCmdRemove; - class LLViewBorder* mBorder; - BOOL mBaseDocIsPristine; TextCmd* mPristineCmd; diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h index 360c9adc92..765db75abc 100644 --- a/indra/newview/llfloaterscriptedprefs.h +++ b/indra/newview/llfloaterscriptedprefs.h @@ -25,8 +25,8 @@ * $/LicenseInfo$ */ -#ifndef LLFLOATERSCRIPTEDPREFS_H -#define LLFLOATERSCRIPTEDPREFS_H +#ifndef LL_FLOATERSCRIPTEDPREFS_H +#define LL_FLOATERSCRIPTEDPREFS_H #include "llfloater.h" diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 31d3c29af4..df46380130 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -29,19 +29,109 @@ #include "llscripteditor.h" #include "llsyntaxid.h" +#include "lllocalcliprect.h" + +const S32 UI_TEXTEDITOR_LINE_NUMBER_MARGIN = 32; +const S32 UI_TEXTEDITOR_LINE_NUMBER_DIGITS = 4; static LLDefaultChildRegistry::Register r("script_editor"); LLScriptEditor::Params::Params() -{ - -} +: show_line_numbers("show_line_numbers", true) +{} LLScriptEditor::LLScriptEditor(const Params& p) : LLTextEditor(p) +, mShowLineNumbers(p.show_line_numbers) +{ + if (mShowLineNumbers) + { + mHPad += UI_TEXTEDITOR_LINE_NUMBER_MARGIN; + updateRects(); + } +} + +void LLScriptEditor::draw() { + { + // pad clipping rectangle so that cursor can draw at full width + // when at left edge of mVisibleTextRect + LLRect clip_rect(mVisibleTextRect); + clip_rect.stretch(1); + LLLocalClipRect clip(clip_rect); + } + LLTextBase::draw(); + drawLineNumbers(); + + drawPreeditMarker(); + + //RN: the decision was made to always show the orange border for keyboard focus but do not put an insertion caret + // when in readonly mode + mBorder->setKeyboardFocusHighlight( hasFocus() );// && !mReadOnly); +} + +void LLScriptEditor::drawLineNumbers() +{ + LLGLSUIDefault gls_ui; + LLRect scrolled_view_rect = getVisibleDocumentRect(); + LLRect content_rect = getVisibleTextRect(); + LLLocalClipRect clip(content_rect); + S32 first_line = getFirstVisibleLine(); + S32 num_lines = getLineCount(); + if (first_line >= num_lines) + { + return; + } + + S32 cursor_line = mLineInfoList[getLineNumFromDocIndex(mCursorPos)].mLineNum; + + if (mShowLineNumbers) + { + S32 left = 0; + S32 top = getRect().getHeight(); + S32 bottom = 0; + + gl_rect_2d(left, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN, bottom, mReadOnlyBgColor.get() ); // line number area always read-only + gl_rect_2d(UI_TEXTEDITOR_LINE_NUMBER_MARGIN, top, UI_TEXTEDITOR_LINE_NUMBER_MARGIN-1, bottom, LLColor4::grey3); // separator + + S32 last_line_num = -1; + + for (S32 cur_line = first_line; cur_line < num_lines; cur_line++) + { + line_info& line = mLineInfoList[cur_line]; + + if ((line.mRect.mTop - scrolled_view_rect.mBottom) < mVisibleTextRect.mBottom) + { + break; + } + + S32 line_bottom = line.mRect.mBottom - scrolled_view_rect.mBottom + mVisibleTextRect.mBottom; + // draw the line numbers + if(line.mLineNum != last_line_num && line.mRect.mTop <= scrolled_view_rect.mTop) + { + const LLFontGL *num_font = LLFontGL::getFontMonospace(); + const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum )); + BOOL is_cur_line = cursor_line == line.mLineNum; + const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL; + const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor; + num_font->render( + ltext, // string to draw + 0, // begin offset + UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2, // x + line_bottom, // y + fg_color, + LLFontGL::RIGHT, // horizontal alignment + LLFontGL::BOTTOM, // vertical alignment + style, + LLFontGL::NO_SHADOW, + S32_MAX, // max chars + UI_TEXTEDITOR_LINE_NUMBER_MARGIN - 2); // max pixels + last_line_num = line.mLineNum; + } + } + } } void LLScriptEditor::initKeywords() diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index d3e18021f9..8c5ab362a3 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -36,10 +36,16 @@ public: struct Params : public LLInitParam::Block { + Optional show_line_numbers; + Params(); }; virtual ~LLScriptEditor() {}; + + // LLView override + virtual void draw(); + void initKeywords(); void loadKeywords(); void clearSegments(); @@ -51,11 +57,13 @@ protected: LLScriptEditor(const Params& p); private: + void drawLineNumbers(); void updateSegments(); void loadKeywords(const std::string& filename_keywords, const std::string& filename_colors); LLKeywords mKeywords; + bool mShowLineNumbers; }; #endif // LL_SCRIPTEDITOR_H diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 838ed031d6..ee996ee27c 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -464,7 +464,6 @@ bg_readonly_color="ScriptBackground" bg_selected_color="ScriptSelectedColor" cursor_color="ScriptCursorColor" - show_line_numbers="true" enable_tooltip_paste="true" word_wrap="true"> default diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 755d9eaf39..76677d6e95 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -172,8 +172,7 @@ width="487" enable_tooltip_paste="true" word_wrap="true" - show_context_menu="true" - show_line_numbers="true"> + show_context_menu="true"> Loading... Date: Wed, 14 May 2014 16:43:13 -0400 Subject: clean up the constructor for LLSyntaxIdLSL --- indra/newview/llsyntaxid.cpp | 36 +++++++++++++++++------------------- indra/newview/llsyntaxid.h | 5 ++++- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9a0f53978e..7551c1a442 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -103,31 +103,29 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- -const std::string CAPABILITY_NAME = "LSLSyntax"; -const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml"; -const std::string SIMULATOR_FEATURE = "LSLSyntaxId"; +const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax"; +const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml"; +const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId"; /** * @brief LLSyntaxIdLSL constructor */ -LLSyntaxIdLSL::LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability) -: mFilePath(LL_PATH_APP_SETTINGS) -{ - mCapabilityName = capability; - mFileNameCurrent = filename; - mFileNameDefault = filename; - mSimulatorFeature = sim_feature; - mSyntaxIdCurrent = LLUUID(); -} - LLSyntaxIdLSL::LLSyntaxIdLSL() : - mFilePath(LL_PATH_APP_SETTINGS) + mInitialized(false), + mKeywordsXml(LLSD()), + mLoaded(false), + mLoadFailed(false), + mVersionChanged(false), + mCapabilityName(CAPABILITY_NAME), + mCapabilityURL(""), + mFileNameCurrent(FILENAME_DEFAULT), + mFileNameDefault(FILENAME_DEFAULT), + mFileNameNew(""), + mFilePath(LL_PATH_APP_SETTINGS), + mSimulatorFeature(SIMULATOR_FEATURE), + mSyntaxIdCurrent(LLUUID()), + mSyntaxIdNew(LLUUID()) { - mCapabilityName = CAPABILITY_NAME; - mFileNameCurrent = FILENAME_DEFAULT; - mFileNameDefault = FILENAME_DEFAULT; - mSimulatorFeature = SIMULATOR_FEATURE; - mSyntaxIdCurrent = LLUUID(); } std::string LLSyntaxIdLSL::buildFileNameNew() diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index d803a09167..aa69209ca9 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -42,7 +42,6 @@ friend class fetchKeywordsFileResponder; public: LLSyntaxIdLSL(); - LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability); bool checkSyntaxIdChanged(); bool fetching(); @@ -74,6 +73,10 @@ protected: void setFileNameNew(const std::string name) { mFileNameNew = name; } private: + static const std::string CAPABILITY_NAME; + static const std::string FILENAME_DEFAULT; + static const std::string SIMULATOR_FEATURE; + bool mInitialized; LLSD mKeywordsXml; bool mLoaded; -- cgit v1.2.3 From 7ada3ea719e583101ea0762ed75f0c1b803f08dc Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 14 May 2014 20:37:25 -0600 Subject: Clean up LLSyntaxIdLSL ctor --- indra/newview/llsyntaxid.cpp | 35 ++++++++--------------------------- indra/newview/llsyntaxid.h | 5 ----- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9a0f53978e..dfbb8c9551 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -103,36 +103,17 @@ void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- -const std::string CAPABILITY_NAME = "LSLSyntax"; const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml"; -const std::string SIMULATOR_FEATURE = "LSLSyntaxId"; -/** - * @brief LLSyntaxIdLSL constructor - */ -LLSyntaxIdLSL::LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability) +LLSyntaxIdLSL::LLSyntaxIdLSL() : mFilePath(LL_PATH_APP_SETTINGS) -{ - mCapabilityName = capability; - mFileNameCurrent = filename; - mFileNameDefault = filename; - mSimulatorFeature = sim_feature; - mSyntaxIdCurrent = LLUUID(); -} - -LLSyntaxIdLSL::LLSyntaxIdLSL() : - mFilePath(LL_PATH_APP_SETTINGS) -{ - mCapabilityName = CAPABILITY_NAME; - mFileNameCurrent = FILENAME_DEFAULT; - mFileNameDefault = FILENAME_DEFAULT; - mSimulatorFeature = SIMULATOR_FEATURE; - mSyntaxIdCurrent = LLUUID(); -} +, mFileNameCurrent(FILENAME_DEFAULT) +, mSyntaxIdCurrent(LLUUID()) +{} std::string LLSyntaxIdLSL::buildFileNameNew() { - mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; + mFileNameNew = mSyntaxIdNew.isNull() ? FILENAME_DEFAULT : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; return mFileNameNew; } @@ -165,11 +146,11 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() region->getSimulatorFeatures(simFeatures); // Does the sim have the required feature - if (simFeatures.has(mSimulatorFeature)) + if (simFeatures.has("LSLSyntaxId")) { // get and check the hash - mSyntaxIdNew = simFeatures[mSimulatorFeature].asUUID(); - mCapabilityURL = region->getCapability(mCapabilityName); + mSyntaxIdNew = simFeatures["LSLSyntaxId"].asUUID(); + mCapabilityURL = region->getCapability("LSLSyntax"); if (mSyntaxIdCurrent != mSyntaxIdNew) { LL_DEBUGS("SyntaxLSL") << "Region has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew.asString() << "'" << LL_ENDL; diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index d803a09167..0f347a6ce3 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -42,7 +42,6 @@ friend class fetchKeywordsFileResponder; public: LLSyntaxIdLSL(); - LLSyntaxIdLSL(const std::string& filename, const std::string& sim_feature, const std::string& capability); bool checkSyntaxIdChanged(); bool fetching(); @@ -70,7 +69,6 @@ protected: void loadKeywordsIntoLLSD(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } void setFileNameCurrent(const std::string& name) { mFileNameCurrent = name; } - void setFileNameDefault(const std::string& name) { mFileNameDefault = name; } void setFileNameNew(const std::string name) { mFileNameNew = name; } private: @@ -81,14 +79,11 @@ private: bool mVersionChanged; file_fetched_signal_t mFileFetchedSignal; - std::string mCapabilityName; std::string mCapabilityURL; std::string mFileNameCurrent; - std::string mFileNameDefault; std::string mFileNameNew; ELLPath mFilePath; std::string mFullFileSpec; - std::string mSimulatorFeature; LLUUID mSyntaxIdCurrent; LLUUID mSyntaxIdNew; }; -- cgit v1.2.3 From 4ce0f6d6eac3817e586bee1edd42ae80aaf21f4f Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 14 May 2014 21:24:23 -0600 Subject: Color syntax in script colors floater --- indra/newview/llfloaterscriptedprefs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp index 39624186bb..12d4bd6faf 100644 --- a/indra/newview/llfloaterscriptedprefs.cpp +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -29,6 +29,7 @@ #include "llfloaterscriptedprefs.h" #include "llcolorswatch.h" +#include "llscripteditor.h" LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) @@ -40,6 +41,12 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) BOOL LLFloaterScriptEdPrefs::postBuild() { + LLScriptEditor* editor = getChild("Script Preview"); + if (editor) + { + editor->initKeywords(); + editor->loadKeywords(); + } return TRUE; } -- cgit v1.2.3 From 8cd4543e6090b79b3f9bfe2bbe1f23cc98f6382e Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 16 May 2014 07:36:44 -0600 Subject: Set colors for script editor --- indra/newview/skins/default/xui/en/panel_script_ed.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 76677d6e95..5971082380 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -170,6 +170,14 @@ max_length="262144" name="Script Editor" width="487" + text_color="ScriptText" + default_color="ScriptText" + bg_writeable_color="ScriptBackground" + bg_focus_color="ScriptBackground" + text_readonly_color="ScriptText" + bg_readonly_color="ScriptBackground" + bg_selected_color="ScriptSelectedColor" + cursor_color="ScriptCursorColor" enable_tooltip_paste="true" word_wrap="true" show_context_menu="true"> -- cgit v1.2.3 From be45cff44fae3f2e28ab4784e7b73aac20f736f9 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 16 May 2014 08:36:33 -0600 Subject: Typo fix --- indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index ee996ee27c..7b212b1d70 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -426,7 +426,7 @@ parameter="SyntaxLslFunction" /> + parameter="SyntaxLslFunction" /> Date: Fri, 16 May 2014 09:18:38 -0600 Subject: Remove orphaned LLKeywords methods --- indra/llui/llkeywords.cpp | 34 ---------------------------------- indra/llui/llkeywords.h | 4 ---- 2 files changed, 38 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index f633f3e4af..b4e3ccbf5e 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -82,12 +82,6 @@ LLKeywords::~LLKeywords() mDelimiterTokenList.clear(); } -void LLKeywords::addColorGroup(const std::string& key_in, const LLColor4& color) -{ - WStringMapIndex key ( utf8str_to_wstring(key_in) ); - mColorGroupMap[key] = color; -} - // Add the token as described void LLKeywords::addToken(LLKeywordToken::ETokenType type, const std::string& key_in, @@ -495,34 +489,6 @@ bool LLKeywords::WStringMapIndex::operator<(const LLKeywords::WStringMapIndex &o return result; } -LLColor4 LLKeywords::readColor( const std::string& s ) -{ - F32 r, g, b; - r = g = b = 0.0f; - S32 values_read = sscanf(s.c_str(), "%f, %f, %f]", &r, &g, &b ); - if( values_read != 3 ) - { - llinfos << " poorly formed color in keyword file" << llendl; - } - return LLColor4( r, g, b, 1.f); -} - -LLColor4 LLKeywords::readColor(LLSD& sd) -{ - if (sd.isArray()) - { - return LLColor4(sd, 1.f); - } - else if (sd.isMap()) - { - return LLColor4( sd.get("x").asReal(), sd.get("y").asReal(), sd.get("z").asReal(), 1.f ); - } - else - { - return LLColor4::black; - } -} - LLTrace::BlockTimerStatHandle FTM_SYNTAX_COLORING("Syntax Coloring"); // Walk through a string, applying the rules specified by the keyword token list and diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index eecb327fee..4e20b4459e 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -109,7 +109,6 @@ public: LLKeywords(); ~LLKeywords(); - void addColorGroup(const std::string& key_in, const LLColor4& color); void clearLoaded() { mLoaded = false; } LLColor4 getColorGroup(const std::string& key_in); bool isLoaded() const { return mLoaded; } @@ -168,12 +167,9 @@ public: protected: void processTokensGroup(const LLSD& Tokens, const std::string& Group); - LLColor4 readColor(const std::string& s); - LLColor4 readColor(LLSD& sd); void insertSegment(std::vector& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); void insertSegments(const LLWString& wtext, std::vector& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); - LLSD mColors; bool mLoaded; LLSD mSyntax; word_token_map_t mWordTokenMap; -- cgit v1.2.3 From 5850397c52bbc184584de6bb3e6d33bfb8abc5d7 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 16 May 2014 09:18:59 -0600 Subject: Trivial indentation change in floater_script_ed_prefs.xml --- .../default/xui/en/floater_script_ed_prefs.xml | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 7b212b1d70..a076839c09 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -21,15 +21,15 @@ + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="15" + name="text" + top="45" + width="44" > @@ -412,15 +412,15 @@ Flow Control + can_apply_immediately="true" + follows="left|top" + height="24" + label_height="0" + layout="topleft" + left="170" + name="function" + top_pad="10" + width="44" > -- cgit v1.2.3 From f697eb375e3b72f9b57cd5071552035c82bb3f0c Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 16 May 2014 09:27:37 -0600 Subject: Update syntax coloring in the preview script on the fly. --- indra/newview/llfloaterscriptedprefs.cpp | 11 +++++++---- indra/newview/llfloaterscriptedprefs.h | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp index 12d4bd6faf..da075aa36c 100644 --- a/indra/newview/llfloaterscriptedprefs.cpp +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -34,6 +34,7 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) : LLFloater(key) +, mEditor(NULL) { mCommitCallbackRegistrar.add("ScriptPref.applyUIColor", boost::bind(&LLFloaterScriptEdPrefs::applyUIColor, this ,_1, _2)); mCommitCallbackRegistrar.add("ScriptPref.getUIColor", boost::bind(&LLFloaterScriptEdPrefs::getUIColor, this ,_1, _2)); @@ -41,11 +42,11 @@ LLFloaterScriptEdPrefs::LLFloaterScriptEdPrefs(const LLSD& key) BOOL LLFloaterScriptEdPrefs::postBuild() { - LLScriptEditor* editor = getChild("Script Preview"); - if (editor) + mEditor = getChild("Script Preview"); + if (mEditor) { - editor->initKeywords(); - editor->loadKeywords(); + mEditor->initKeywords(); + mEditor->loadKeywords(); } return TRUE; } @@ -54,6 +55,8 @@ void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) { LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); // *TODO: Signal all active script editors to change colors on the fly. + mEditor->initKeywords(); + mEditor->loadKeywords(); } void LLFloaterScriptEdPrefs::getUIColor(LLUICtrl* ctrl, const LLSD& param) diff --git a/indra/newview/llfloaterscriptedprefs.h b/indra/newview/llfloaterscriptedprefs.h index 765db75abc..31df897aac 100644 --- a/indra/newview/llfloaterscriptedprefs.h +++ b/indra/newview/llfloaterscriptedprefs.h @@ -30,6 +30,7 @@ #include "llfloater.h" +class LLScriptEditor; class LLUICtrl; class LLFloaterScriptEdPrefs : public LLFloater @@ -43,6 +44,8 @@ private: void applyUIColor(LLUICtrl* ctrl, const LLSD& param); void getUIColor(LLUICtrl* ctrl, const LLSD& param); + + LLScriptEditor* mEditor; }; #endif // LL_FLOATERSCRIPTEDPREFS_H -- cgit v1.2.3 From ec2b00c2e5fccd7432ef1b5a5ab5c88d098e95f2 Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 28 May 2014 12:15:37 -0600 Subject: Don't hardcode black as the default color for syntax --- indra/llui/llkeywords.cpp | 4 ++-- indra/newview/llfloaterscriptedprefs.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index b4e3ccbf5e..29b9c5c2f1 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -172,7 +172,7 @@ std::string LLKeywords::getAttribute(const std::string& key) LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { - std::string color_group = "Black"; + std::string color_group = "ScriptText"; if (key_in == "constants-float") { color_group = "SyntaxLslConstantFloat"; @@ -239,7 +239,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) } else { - LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized!" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized." << LL_ENDL; } return LLUIColorTable::instance().getColor(color_group); diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp index da075aa36c..2484a08626 100644 --- a/indra/newview/llfloaterscriptedprefs.cpp +++ b/indra/newview/llfloaterscriptedprefs.cpp @@ -54,7 +54,6 @@ BOOL LLFloaterScriptEdPrefs::postBuild() void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param) { LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); - // *TODO: Signal all active script editors to change colors on the fly. mEditor->initKeywords(); mEditor->loadKeywords(); } -- cgit v1.2.3 From 299be536119b0adb9887e087f7ec9be8b356f97f Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 28 May 2014 12:55:00 -0600 Subject: Make default and state out of flow-control and into events --- .../newview/app_settings/keywords_lsl_default.xml | 34 +++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index 02823136ee..ef699031c6 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -3,11 +3,6 @@ controls - default - - tooltip - All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error. - do tooltip @@ -38,11 +33,6 @@ tooltip Leave current event or function.\nreturn [<variable>];\nOptionally pass back a variable's value, from a function. - state - - tooltip - state <target>\nIf the target state is not the same as the current one, change to the target state. - while tooltip @@ -6005,6 +5995,30 @@ events + default + + arguments + + tooltip + All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error. + + state + + arguments + + + Name + + type + string + tooltip + + + + + tooltip + state <target>\nChange to the target state. + at_rot_target arguments -- cgit v1.2.3 From 274327e1e2b2486eddb66d787e410b54d37e4437 Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 28 May 2014 13:01:51 -0600 Subject: Half of STORM-2025, fix flow-control highlighting --- indra/llui/llkeywords.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 29b9c5c2f1..8b5fb54877 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -197,6 +197,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { color_group = "SyntaxLslConstantVector"; } + else if (key_in == "controls") + { + color_group = "SyntaxLslControlFlow"; + } else if (key_in == "misc-flow-label") { color_group = "SyntaxLslControlFlow"; -- cgit v1.2.3 From 6f056ef99dd08a4278ae3b1d3c4bac070a9dfc64 Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Wed, 4 Jun 2014 13:01:58 +0300 Subject: MAINT-4113 FIXED Get total contribution as sum of parcels' billable area. --- indra/newview/llpanelgrouplandmoney.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 106f6c25f1..506c31c22a 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -421,27 +421,14 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) msg->getUUID("QueryData", "OwnerID", owner_id, 0); msg->getUUID("TransactionData", "TransactionID", trans_id); + S32 total_contribution; if(owner_id.isNull()) { // special block which has total contribution ++first_block; - - S32 total_contribution; + msg->getS32("QueryData", "ActualArea", total_contribution, 0); mPanel.getChild("total_contributed_land_value")->setTextArg("[AREA]", llformat("%d", total_contribution)); - - S32 committed; - msg->getS32("QueryData", "BillableArea", committed, 0); - mPanel.getChild("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed)); - - S32 available = total_contribution - committed; - mPanel.getChild("land_available_value")->setTextArg("[AREA]", llformat("%d", available)); - - if ( mGroupOverLimitTextp && mGroupOverLimitIconp ) - { - mGroupOverLimitIconp->setVisible(available < 0); - mGroupOverLimitTextp->setVisible(available < 0); - } } if ( trans_id != mTransID ) return; @@ -460,7 +447,8 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) std::string sim_name; std::string land_sku; std::string land_type; - + S32 committed = 0; + for(S32 i = first_block; i < count; ++i) { msg->getUUID("QueryData", "OwnerID", owner_id, i); @@ -489,6 +477,9 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) S32 region_y = llround(global_y) % REGION_WIDTH_UNITS; std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y); std::string area; + committed+=billable_area; + + if(billable_area == actual_area) { area = llformat("%d", billable_area); @@ -525,6 +516,16 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) mGroupParcelsp->addElement(row); } + + mPanel.getChild("total_land_in_use_value")->setTextArg("[AREA]", llformat("%d", committed)); + + S32 available = total_contribution - committed; + mPanel.getChild("land_available_value")->setTextArg("[AREA]", llformat("%d", available)); + if ( mGroupOverLimitTextp && mGroupOverLimitIconp ) + { + mGroupOverLimitIconp->setVisible(available < 0); + mGroupOverLimitTextp->setVisible(available < 0); + } } } -- cgit v1.2.3 From 7e8d4ca3b1d96b5573aab99015f431147e6c6965 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 4 Jun 2014 10:29:40 -0400 Subject: make "default" a constant, and remove that and "state" from events --- .../newview/app_settings/keywords_lsl_default.xml | 34 +++++++--------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/indra/newview/app_settings/keywords_lsl_default.xml b/indra/newview/app_settings/keywords_lsl_default.xml index ef699031c6..37dd2db93f 100755 --- a/indra/newview/app_settings/keywords_lsl_default.xml +++ b/indra/newview/app_settings/keywords_lsl_default.xml @@ -33,6 +33,11 @@ tooltip Leave current event or function.\nreturn [<variable>];\nOptionally pass back a variable's value, from a function. + state + + tooltip + state <target>\nIf the target state is not the same as the current one, change to the target state. + while tooltip @@ -5992,33 +5997,14 @@ tooltip - - events - default - arguments - - tooltip - All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error. - - state - - arguments - - - Name - - type - string - tooltip - - - - - tooltip - state <target>\nChange to the target state. + tooltip + All scripts must have a default state, which is the first state entered when the script starts.\nIf another state is defined before the default state, the compiler will report a syntax error. + + events + at_rot_target arguments -- cgit v1.2.3 From 4170ae1027b1c8e5f63b0e6c4c9f919d8d3b66c0 Mon Sep 17 00:00:00 2001 From: Cinder Date: Wed, 4 Jun 2014 12:52:27 -0600 Subject: STORM-2025: Part 2 - After consulting with Oz, remove subcategories of constants and fix highlighting --- indra/llui/llkeywords.cpp | 44 ++------- indra/newview/skins/default/colors.xml | 17 +--- .../default/xui/en/floater_script_ed_prefs.xml | 100 ++------------------- 3 files changed, 12 insertions(+), 149 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 8b5fb54877..9be15d8f1d 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -173,29 +173,9 @@ std::string LLKeywords::getAttribute(const std::string& key) LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { std::string color_group = "ScriptText"; - if (key_in == "constants-float") + if (key_in == "constants") { - color_group = "SyntaxLslConstantFloat"; - } - else if (key_in == "constants-integer") - { - color_group = "SyntaxLslConstantInteger"; - } - else if (key_in == "constants-key") - { - color_group = "SyntaxLslConstantKey"; - } - else if (key_in == "constants-rotation") - { - color_group = "SyntaxLslConstantRotation"; - } - else if (key_in == "constants-string") - { - color_group = "SyntaxLslConstantString"; - } - else if (key_in == "constants-vector") - { - color_group = "SyntaxLslConstantVector"; + color_group = "SyntaxLslConstant"; } else if (key_in == "controls") { @@ -229,18 +209,6 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { color_group = "SyntaxLslSection"; } - else if (key_in == "misc-double_quotation_marks") - { - color_group = "SyntaxLslStringLiteral"; - } - else if (key_in == "misc-comments_1_sided") - { - color_group = "SyntaxLslComment"; - } - else if (key_in == "misc-comments_2_sided") - { - color_group = "SyntaxLslComment"; - } else { LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized." << LL_ENDL; @@ -265,9 +233,9 @@ void LLKeywords::processTokens() // Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD std::string delimiter; addToken(LLKeywordToken::TT_LABEL, "@", getColorGroup("misc-flow-label"), "Label\nTarget for jump statement", delimiter ); - addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", getColorGroup("misc-comments_1_sided"), "Comment (single-line)\nNon-functional commentary or disabled code", delimiter ); - addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", getColorGroup("misc-comments_2_sided"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); - addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", getColorGroup("misc-double_quotation_marks"), "String literal", "\"" ); + addToken(LLKeywordToken::TT_ONE_SIDED_DELIMITER, "//", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (single-line)\nNon-functional commentary or disabled code", delimiter ); + addToken(LLKeywordToken::TT_TWO_SIDED_DELIMITER, "/*", LLUIColorTable::instance().getColor("SyntaxLslComment"), "Comment (multi-line)\nNon-functional commentary or disabled code", "*/" ); + addToken(LLKeywordToken::TT_DOUBLE_QUOTATION_MARKS, "\"", LLUIColorTable::instance().getColor("SyntaxLslStringLiteral"), "String literal", "\"" ); LLSD::map_iterator itr = mSyntax.beginMap(); for ( ; itr != mSyntax.endMap(); ++itr) @@ -401,7 +369,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness { LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL; - for (int count = 0; count < tokens.size(); ++count) + for (S32 count = 0; count < tokens.size(); ++count) { addToken(token_type, tokens[count], color, ""); } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index bdbece33e0..3a1f3d4e0a 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -919,23 +919,8 @@ name="SyntaxLslComment" value=".8 .3 .15 1.0" /> - - - - - diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index a076839c09..8ae0df22b1 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -268,15 +268,15 @@ label_height="0" layout="topleft" left="170" - name="i_constant" + name="constant" top_pad="10" width="44" > + parameter="SyntaxLslConstant" /> + parameter="SyntaxLslConstant" /> - Integer Const - - - - - - - String Const - - - - - - - Float Const - - - - - - - Compound + Constant Date: Wed, 4 Jun 2014 22:51:20 -0600 Subject: A little more cleanup in LLSyntaxIDLSL and LLKeywords --- indra/llui/llkeywords.cpp | 65 ++++++++++++++++++++++++-------------------- indra/llui/llkeywords.h | 24 ++++++++++++---- indra/newview/llsyntaxid.cpp | 15 +++------- indra/newview/llsyntaxid.h | 5 ++-- 4 files changed, 59 insertions(+), 50 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 9be15d8f1d..9c5a339b6d 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -67,8 +67,8 @@ inline bool LLKeywordToken::isTail(const llwchar* s) const return res; } -LLKeywords::LLKeywords() : - mLoaded(false) +LLKeywords::LLKeywords() +: mLoaded(false) { } @@ -92,7 +92,7 @@ void LLKeywords::addToken(LLKeywordToken::ETokenType type, std::string tip_text = tool_tip_in; LLStringUtil::replaceString(tip_text, "\\n", "\n" ); LLStringUtil::replaceString(tip_text, "\t", " " ); - if (tip_text == "") + if (tip_text.empty()) { tip_text = "[no info]"; } @@ -161,7 +161,7 @@ std::string LLKeywords::getArguments(LLSD& arguments) { LL_WARNS("SyntaxLSL") << "Not an array! Invalid arguments LLSD passed to function." << arguments << LL_ENDL; } - return argString == "" ? "" : argString; + return argString; } std::string LLKeywords::getAttribute(const std::string& key) @@ -299,14 +299,14 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group if (tokens.isMap()) { LLSD::map_const_iterator outer_itr = tokens.beginMap(); - for ( ; outer_itr != tokens.endMap(); ++outer_itr) + for ( ; outer_itr != tokens.endMap(); ++outer_itr ) { if (outer_itr->second.isMap()) { mAttributes.clear(); LLSD arguments = LLSD(); LLSD::map_const_iterator inner_itr = outer_itr->second.beginMap(); - for ( ; inner_itr != outer_itr->second.endMap(); ++inner_itr) + for ( ; inner_itr != outer_itr->second.endMap(); ++inner_itr ) { if (inner_itr->first == "arguments") { @@ -326,33 +326,34 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group } std::string tooltip = ""; - if (token_type == LLKeywordToken::TT_CONSTANT) + switch (token_type) { - color_group = getColorGroup(group + "-" + getAttribute("type")); - tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value"); - } - else if (token_type == LLKeywordToken::TT_EVENT) - { - tooltip = outer_itr->first + "(" + getArguments(arguments) + ")"; - } - else if (token_type == LLKeywordToken::TT_FUNCTION) - { - tooltip = getAttribute("return") + " " + outer_itr->first + "(" + getArguments(arguments) + ");"; - tooltip += "\nEnergy: "; - tooltip += getAttribute("energy") == "" ? "0.0" : getAttribute("energy"); - if (getAttribute("sleep") != "") - { - tooltip += ", Sleep: " + getAttribute("sleep"); - } + case LLKeywordToken::TT_CONSTANT: + color_group = getColorGroup(group + "-" + getAttribute("type")); + tooltip = "Type: " + getAttribute("type") + ", Value: " + getAttribute("value"); + break; + case LLKeywordToken::TT_EVENT: + tooltip = outer_itr->first + "(" + getArguments(arguments) + ")"; + break; + case LLKeywordToken::TT_FUNCTION: + tooltip = getAttribute("return") + " " + outer_itr->first + "(" + getArguments(arguments) + ");"; + tooltip.append("\nEnergy: "); + tooltip.append(getAttribute("energy").empty() ? "0.0" : getAttribute("energy")); + if (!getAttribute("sleep").empty()) + { + tooltip += ", Sleep: " + getAttribute("sleep"); + } + default: + break; } - if (getAttribute("tooltip") != "") + if (!getAttribute("tooltip").empty()) { - if (tooltip != "") + if (!tooltip.empty()) { - tooltip += "\n"; + tooltip.append("\n"); } - tooltip += getAttribute("tooltip"); + tooltip.append(getAttribute("tooltip")); } color = getAttribute("deprecated") == "true" ? color_deprecated : color_group; @@ -399,15 +400,19 @@ LLKeywords::WStringMapIndex::WStringMapIndex(const LLWString& str) copyData(str.data(), str.size()); } -LLKeywords::WStringMapIndex::WStringMapIndex(const llwchar *start, size_t length): -mData(start), mLength(length), mOwner(false) +LLKeywords::WStringMapIndex::WStringMapIndex(const llwchar *start, size_t length) +: mData(start) +, mLength(length) +, mOwner(false) { } LLKeywords::WStringMapIndex::~WStringMapIndex() { - if(mOwner) + if (mOwner) + { delete[] mData; + } } void LLKeywords::WStringMapIndex::copyData(const llwchar *start, size_t length) diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 4e20b4459e..18e2ed06c5 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -113,7 +113,10 @@ public: LLColor4 getColorGroup(const std::string& key_in); bool isLoaded() const { return mLoaded; } - void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); + void findSegments(std::vector *seg_list, + const LLWString& text, + const LLColor4 &defaultColor, + class LLTextEditor& editor); void initialize(LLSD SyntaxXML); void processTokens(); @@ -167,8 +170,19 @@ public: protected: void processTokensGroup(const LLSD& Tokens, const std::string& Group); - void insertSegment(std::vector& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, class LLTextEditor& editor); - void insertSegments(const LLWString& wtext, std::vector& seg_list, LLKeywordToken* token, S32 text_len, S32 seg_start, S32 seg_end, const LLColor4 &defaultColor, LLTextEditor& editor); + void insertSegment(std::vector& seg_list, + LLTextSegmentPtr new_segment, + S32 text_len, + const LLColor4 &defaultColor, + class LLTextEditor& editor); + void insertSegments(const LLWString& wtext, + std::vector& seg_list, + LLKeywordToken* token, + S32 text_len, + S32 seg_start, + S32 seg_end, + const LLColor4 &defaultColor, + LLTextEditor& editor); bool mLoaded; LLSD mSyntax; @@ -182,9 +196,7 @@ protected: element_attributes_t mAttributes; std::string getAttribute(const std::string& key); - std::string getArguments(LLSD& args); - -private: + std::string getArguments(LLSD& arguments); }; #endif // LL_LLKEYWORDS_H diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 7551c1a442..0ef5993ac1 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -37,9 +37,9 @@ //----------------------------------------------------------------------------- // fetchKeywordsFileResponder //----------------------------------------------------------------------------- -fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) +fetchKeywordsFileResponder::fetchKeywordsFileResponder(const std::string& filespec) +: mFileSpec(filespec) { - mFileSpec = filespec; LL_DEBUGS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; } @@ -128,18 +128,11 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() : { } -std::string LLSyntaxIdLSL::buildFileNameNew() -{ - mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; - return mFileNameNew; -} - -std::string LLSyntaxIdLSL::buildFullFileSpec() +void LLSyntaxIdLSL::buildFullFileSpec() { ELLPath path = mSyntaxIdNew.isNull() ? LL_PATH_APP_SETTINGS : LL_PATH_CACHE; - buildFileNameNew(); + mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; mFullFileSpec = gDirUtilp->getExpandedFilename(path, mFileNameNew); - return mFullFileSpec; } //----------------------------------------------------------------------------- diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index f14693d619..2288fb4ab8 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -62,8 +62,7 @@ public: boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); protected: - std::string buildFileNameNew(); - std::string buildFullFileSpec(); + void buildFullFileSpec(); void fetchKeywordsFile(); void loadDefaultKeywordsIntoLLSD(); void loadKeywordsIntoLLSD(); @@ -105,7 +104,7 @@ public: * @brief fetchKeywordsFileResponder * @param filespec File path and name of where to save the returned data */ - fetchKeywordsFileResponder(std::string filespec); + fetchKeywordsFileResponder(const std::string& filespec); void errorWithContent(U32 status, const std::string& reason, -- cgit v1.2.3 From 739f4954b165bd993f8dfaf0636b7a29c228e091 Mon Sep 17 00:00:00 2001 From: Stinson Linden Date: Fri, 6 Jun 2014 22:35:59 +0100 Subject: Correcting a build error. --- indra/newview/llpanelgrouplandmoney.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 506c31c22a..375c54479d 100755 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -421,7 +421,7 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg) msg->getUUID("QueryData", "OwnerID", owner_id, 0); msg->getUUID("TransactionData", "TransactionID", trans_id); - S32 total_contribution; + S32 total_contribution = 0; if(owner_id.isNull()) { // special block which has total contribution -- cgit v1.2.3 From 47a5e1c751bb8dfccef65ee841749d8209106c99 Mon Sep 17 00:00:00 2001 From: Stinson Linden Date: Thu, 5 Jun 2014 23:15:43 +0100 Subject: MAINT-4009: Ensuring that the local bitmaps are cleaned up on app exit. --- indra/newview/llappviewer.cpp | 5 ++++- indra/newview/lllocalbitmaps.cpp | 6 ++++++ indra/newview/lllocalbitmaps.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1c38adb879..42f56fff32 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -100,6 +100,7 @@ #include "llspellcheck.h" #include "llscenemonitor.h" #include "llavatarrenderinfoaccountant.h" +#include "lllocalbitmaps.h" // Linden library includes #include "llavatarnamecache.h" @@ -1758,7 +1759,9 @@ bool LLAppViewer::cleanup() #if 0 // this seems to get us stuck in an infinite loop... gTransferManager.cleanup(); #endif - + + LLLocalBitmapMgr::cleanupClass(); + // Note: this is where gWorldMap used to be deleted. // Note: this is where gHUDManager used to be deleted. diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 1948475530..e78e0233d7 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -824,6 +824,12 @@ LLLocalBitmapMgr::~LLLocalBitmapMgr() { } +void LLLocalBitmapMgr::cleanupClass() +{ + std::for_each(sBitmapList.begin(), sBitmapList.end(), DeletePointer()); + sBitmapList.clear(); +} + bool LLLocalBitmapMgr::addUnit() { bool add_successful = false; diff --git a/indra/newview/lllocalbitmaps.h b/indra/newview/lllocalbitmaps.h index 47c077dcab..a15ea10801 100755 --- a/indra/newview/lllocalbitmaps.h +++ b/indra/newview/lllocalbitmaps.h @@ -117,6 +117,7 @@ class LLLocalBitmapMgr ~LLLocalBitmapMgr(); public: + static void cleanupClass(); static bool addUnit(); static void delUnit(LLUUID tracking_id); -- cgit v1.2.3 From bde6023286c899c99104b16181203f7b58819333 Mon Sep 17 00:00:00 2001 From: Stinson Linden Date: Fri, 6 Jun 2014 19:28:18 +0100 Subject: MAINT-4137: Correcting some poorly written CPP code that could potentially lead to problems in the future. --- indra/newview/lllocalbitmaps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index e78e0233d7..92587a911a 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -190,7 +190,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) { // decode is successful, we can safely proceed. LLUUID old_id = LLUUID::null; - if (!(optional_firstupdate == UT_FIRSTUSE) && !mWorldID.isNull()) + if ((optional_firstupdate != UT_FIRSTUSE) && !mWorldID.isNull()) { old_id = mWorldID; } @@ -206,7 +206,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) gTextureList.addImage(texture); - if (!optional_firstupdate == UT_FIRSTUSE) + if (optional_firstupdate != UT_FIRSTUSE) { // seek out everything old_id uses and replace it with mWorldID replaceIDs(old_id, mWorldID); -- cgit v1.2.3 From 61f3bf8a4799016f6a50007314816cddb1dff030 Mon Sep 17 00:00:00 2001 From: Stinson Linden Date: Fri, 6 Jun 2014 19:30:41 +0100 Subject: MAINT-4137: Correcting a potential crash. This change should fix the most probable location of a callstack being reported by the crash reporter. However, there is no reproduction yet, so hard to test whether this actually patches the crash occcurrence. --- indra/newview/lllocalbitmaps.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 92587a911a..6d1a240ce5 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -213,8 +213,11 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) // remove old_id from gimagelist LLViewerFetchedTexture* image = gTextureList.findImage(old_id); - gTextureList.deleteImage(image); - image->unref(); + if (image != NULL) + { + gTextureList.deleteImage(image); + image->unref(); + } } mUpdateRetries = LL_LOCAL_UPDATE_RETRIES; -- cgit v1.2.3 From 086b2c0448584c3a3c5fc320f9f6ba20e613d974 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Sat, 7 Jun 2014 16:02:30 -0700 Subject: MAINT-4001 : Make Received Items not movable (protected), consolidate Received Items folders which may have been moved --- indra/llinventory/llfoldertype.cpp | 2 +- indra/newview/llsidepanelinventory.cpp | 12 +++++++----- indra/newview/llviewerfoldertype.cpp | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp index 8b568ea560..5f8aaae20b 100755 --- a/indra/llinventory/llfoldertype.cpp +++ b/indra/llinventory/llfoldertype.cpp @@ -92,7 +92,7 @@ LLFolderDictionary::LLFolderDictionary() addEntry(LLFolderType::FT_MESH, new FolderEntry("mesh", TRUE)); - addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", FALSE)); + addEntry(LLFolderType::FT_INBOX, new FolderEntry("inbox", TRUE)); addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", FALSE)); addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE)); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 2556714792..4970eec636 100755 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -257,12 +257,9 @@ void LLSidepanelInventory::updateInbox() // // Track inbox folder changes // - - const bool do_not_create_folder = false; - - const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, do_not_create_folder); + const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, true); - // Set up observer to listen for creation of inbox if at least one of them doesn't exist + // Set up observer to listen for creation of inbox if it doesn't exist if (inbox_id.isNull()) { observeInboxCreation(); @@ -270,6 +267,11 @@ void LLSidepanelInventory::updateInbox() // Set up observer for inbox changes, if we have an inbox already else { + // Consolidate Received items + // We shouldn't have to do that but with a client/server system relying on a "well known folder" convention, + // things can get messy and conventions broken. This call puts everything back together in its right place. + gInventory.consolidateForType(inbox_id, LLFolderType::FT_INBOX); + // Enable the display of the inbox if it exists enableInbox(true); diff --git a/indra/newview/llviewerfoldertype.cpp b/indra/newview/llviewerfoldertype.cpp index 4237ffd295..66e900c405 100644 --- a/indra/newview/llviewerfoldertype.cpp +++ b/indra/newview/llviewerfoldertype.cpp @@ -136,7 +136,7 @@ LLViewerFolderDictionary::LLViewerFolderDictionary() addEntry(LLFolderType::FT_MESH, new ViewerFolderEntry("Meshes", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); bool boxes_invisible = !gSavedSettings.getBOOL("InventoryOutboxMakeVisible"); - addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Inbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); + addEntry(LLFolderType::FT_INBOX, new ViewerFolderEntry("Received Items", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); addEntry(LLFolderType::FT_OUTBOX, new ViewerFolderEntry("Merchant Outbox", "Inv_SysOpen", "Inv_SysClosed", FALSE, boxes_invisible)); addEntry(LLFolderType::FT_BASIC_ROOT, new ViewerFolderEntry("Basic Root", "Inv_SysOpen", "Inv_SysClosed", FALSE, true)); -- cgit v1.2.3 From 904fd4245b517a44140a333a828d383ce4ed3005 Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 8 Jun 2014 17:10:57 -0600 Subject: "sections" is apparently unused as well. --- indra/llui/llkeywords.cpp | 4 --- indra/newview/skins/default/colors.xml | 3 --- .../default/xui/en/floater_script_ed_prefs.xml | 30 ---------------------- 3 files changed, 37 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 9c5a339b6d..fe050d6107 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -205,10 +205,6 @@ LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { color_group = "SyntaxLslDataType"; } - else if (key_in == "sections") - { - color_group = "SyntaxLslSection"; - } else { LL_WARNS("SyntaxLSL") << "Color key '" << key_in << "' not recognized." << LL_ENDL; diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 3a1f3d4e0a..464e633297 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -942,9 +942,6 @@ - diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 8ae0df22b1..5b2eb0820c 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -110,36 +110,6 @@ width="100"> Background - - - - - - Sections - Date: Sun, 8 Jun 2014 17:49:24 -0600 Subject: Update sample script in script colors floater --- indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 5b2eb0820c..b76c34f4a0 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -346,12 +346,15 @@ cursor_color="ScriptCursorColor" enable_tooltip_paste="true" word_wrap="true"> +/* A sample script */ default { state_entry() { - llSay(0, "Hello!"); + // Comment + string greeting = "Hello"; + llSay(PUBLIC_CHANNEL, greeting); } } - \ No newline at end of file + -- cgit v1.2.3 From 6a6508f0fdcf5964018289315d7b6e6a62696a7e Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 8 Jun 2014 17:51:31 -0600 Subject: Use a common SyntaxLSL broad tag to make debugging easier --- indra/llui/llkeywords.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index fe050d6107..95bdfa6fb3 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -290,7 +290,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group } color_group = getColorGroup(group); - LL_INFOS("Tokens") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL; + LL_INFOS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL; if (tokens.isMap()) { @@ -373,7 +373,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, const std::string& group } else { - LL_WARNS("Tokens") << "Invalid map/array passed: '" << tokens << "'" << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Invalid map/array passed: '" << tokens << "'" << LL_ENDL; } } -- cgit v1.2.3 From b06e63acedbbbc0dafe24a04e866fcb4363601e8 Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 8 Jun 2014 18:28:10 -0600 Subject: Fix lsl constant highlighting and sort the if-else chain to parse a little quicker --- indra/llui/llkeywords.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 95bdfa6fb3..75773d7dfd 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -173,37 +173,43 @@ std::string LLKeywords::getAttribute(const std::string& key) LLColor4 LLKeywords::getColorGroup(const std::string& key_in) { std::string color_group = "ScriptText"; - if (key_in == "constants") + if (key_in == "functions") { - color_group = "SyntaxLslConstant"; + color_group = "SyntaxLslFunction"; } else if (key_in == "controls") { color_group = "SyntaxLslControlFlow"; } - else if (key_in == "misc-flow-label") + else if (key_in == "events") { - color_group = "SyntaxLslControlFlow"; + color_group = "SyntaxLslEvent"; } - else if (key_in =="deprecated") + else if (key_in == "types") { - color_group = "SyntaxLslDeprecated"; + color_group = "SyntaxLslDataType"; } - else if (key_in == "events") + else if (key_in == "misc-flow-label") { - color_group = "SyntaxLslEvent"; + color_group = "SyntaxLslControlFlow"; } - else if (key_in == "functions") + else if (key_in =="deprecated") { - color_group = "SyntaxLslFunction"; + color_group = "SyntaxLslDeprecated"; } else if (key_in =="god-mode") { color_group = "SyntaxLslGodMode"; } - else if (key_in == "types") + else if (key_in == "constants" + || key_in == "constants-integer" + || key_in == "constants-float" + || key_in == "constants-string" + || key_in == "constants-key" + || key_in == "constants-rotation" + || key_in == "constants-vector") { - color_group = "SyntaxLslDataType"; + color_group = "SyntaxLslConstant"; } else { -- cgit v1.2.3 From 84eb6671630cbd11a3a5d2cfd9a0d89c19f6e58e Mon Sep 17 00:00:00 2001 From: Cinder Date: Sun, 8 Jun 2014 18:41:45 -0600 Subject: Update syntax color floater with recent changes. --- .../default/xui/en/floater_script_ed_prefs.xml | 71 +++++++++++----------- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index b76c34f4a0..9a65a7e158 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -2,13 +2,13 @@ + width="320"> + parameter="SyntaxLslStringLiteral" /> + parameter="SyntaxLslStringLiteral" /> - Comment + String Literals + parameter="SyntaxLslConstant" /> + parameter="SyntaxLslConstant" /> - String Literals + Constant - + parameter="SyntaxLslControlFlow" /> + parameter="SyntaxLslControlFlow" /> - Constant + Flow Control + parameter="SyntaxLslFunction" /> + parameter="SyntaxLslFunction" /> - Flow Control + Function + parameter="SyntaxLslComment" /> + parameter="SyntaxLslComment" /> - Function + Comment Date: Sun, 8 Jun 2014 18:46:22 -0600 Subject: Don't allow script colors floater resize --- indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index 9a65a7e158..d8e6935d9f 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -1,7 +1,7 @@ Date: Sun, 8 Jun 2014 18:47:17 -0600 Subject: Capitalize script colors floater for consistency. --- indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml index d8e6935d9f..8e4bcb3eb0 100644 --- a/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml +++ b/indra/newview/skins/default/xui/en/floater_script_ed_prefs.xml @@ -7,7 +7,7 @@ name="floater_script_colors" help_topic="script_colors" save_rect="true" - title="Customize script colors" + title="SCRIPT COLORS" width="320"> Date: Mon, 9 Jun 2014 10:28:18 -0700 Subject: Fix for maint-3154 alt-zoom zooms way out --- indra/newview/llagentcamera.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index d1dfbe3315..7b0496ea45 100755 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -913,6 +913,8 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction) F32 max_distance = llmin(mDrawDistance - DIST_FUDGE, LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE ); + max_distance = llmin(max_distance, current_distance * 4.f); //Scaled max relative to current distance. MAINT-3154 + if (new_distance > max_distance) { new_distance = max_distance; -- cgit v1.2.3 From 41f6c5ce4899b3ae57aefa564ee22ff84fa698ce Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 9 Jun 2014 15:14:09 -0600 Subject: Greatly simplify LLSyntaxIdLSL: * Move file fetched callback to the singleton and handle all syntax id changes within the singleton * Remove a fair number of bool checks and method relying more on callbacks to drive syntax changes. * Don't pretty print the cache file to conserve space and to speed up xml to llsd parsing * Clean up includes --- indra/newview/llpreviewscript.cpp | 95 ++++-------- indra/newview/llpreviewscript.h | 3 +- indra/newview/llsyntaxid.cpp | 296 ++++++++++++++++---------------------- indra/newview/llsyntaxid.h | 111 ++++---------- 4 files changed, 182 insertions(+), 323 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 76cb1c1ebc..9ff0ece7d9 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -399,13 +399,9 @@ LLScriptEdCore::~LLScriptEdCore() } delete mLiveFile; - if (mRegionChangedCallback.connected()) + if (mSyntaxIDConnection.connected()) { - mRegionChangedCallback.disconnect(); - } - if (mFileFetchedCallback.connected()) - { - mFileFetchedCallback.disconnect(); + mSyntaxIDConnection.disconnect(); } } @@ -425,79 +421,48 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - mFileFetchedCallback = LLSyntaxIdLSL::getInstance()->addFileFetchedCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); + mSyntaxIDConnection = LLSyntaxIdLSL::getInstance()->addSyntaxIDCallback(boost::bind(&LLScriptEdCore::processKeywords, this)); // Intialise keyword highlighting for the current simulator's version of LSL LLSyntaxIdLSL::getInstance()->initialize(); - - if (LLSyntaxIdLSL::getInstance()->isDifferentVersion()) - { - processLoaded(); - } - else - { - processKeywords(); - } - - if (mLive) - { - mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::processLoaded, this)); - } + processKeywords(); return TRUE; } -void LLScriptEdCore::processLoaded() -{ - LLSyntaxIdLSL::getInstance()->initialize(); - if (LLSyntaxIdLSL::getInstance()->isLoaded()) - { - processKeywords(); - } - else - { - LL_DEBUGS("SyntaxLSL") << "Hashes are different, waiting for the syntax file to be retrieved." << LL_ENDL; - } -} - void LLScriptEdCore::processKeywords() { - if (LLSyntaxIdLSL::getInstance()->isLoaded()) - { - LL_DEBUGS("SyntaxLSL") << "Hashes are different, updating highlighter." << LL_ENDL; - - mEditor->clearSegments(); - - mEditor->initKeywords(); - mEditor->loadKeywords(); - - string_vec_t primary_keywords; - string_vec_t secondary_keywords; - LLKeywordToken *token; - LLKeywords::keyword_iterator_t token_it; - for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) - { - token = token_it->second; - if (token->getType() == LLKeywordToken::TT_FUNCTION) - { - primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - else - { - secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - } - for (string_vec_t::const_iterator iter = primary_keywords.begin(); - iter!= primary_keywords.end(); ++iter) + LL_DEBUGS("SyntaxLSL") << "Processing keywords" << LL_ENDL; + mEditor->clearSegments(); + mEditor->initKeywords(); + mEditor->loadKeywords(); + + string_vec_t primary_keywords; + string_vec_t secondary_keywords; + LLKeywordToken *token; + LLKeywords::keyword_iterator_t token_it; + for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) + { + token = token_it->second; + if (token->getType() == LLKeywordToken::TT_FUNCTION) { - mFunctions->add(*iter); + primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } - for (string_vec_t::const_iterator iter = secondary_keywords.begin(); - iter!= secondary_keywords.end(); ++iter) + else { - mFunctions->add(*iter); + secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } } + for (string_vec_t::const_iterator iter = primary_keywords.begin(); + iter!= primary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } + for (string_vec_t::const_iterator iter = secondary_keywords.begin(); + iter!= secondary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } } void LLScriptEdCore::initMenu() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 5aab3ed938..9ea191e928 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -159,8 +159,7 @@ private: LLScriptEdContainer* mContainer; // parent view public: - boost::signals2::connection mFileFetchedCallback; - boost::signals2::connection mRegionChangedCallback; + boost::signals2::connection mSyntaxIDConnection; }; diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 0ef5993ac1..5b5bab85d0 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -1,8 +1,8 @@ /** * @file LLSyntaxId - * @author Ima Mechanique * @brief Handles downloading, saving, and checking of LSL keyword/syntax files * for each region. + * @author Ima Mechanique, Cinder Roxley * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ * Second Life Viewer Source Code @@ -28,189 +28,149 @@ #include "llviewerprecompiledheaders.h" +#include "llsyntaxid.h" #include "llagent.h" #include "llappviewer.h" #include "llhttpclient.h" #include "llsdserialize.h" -#include "llsyntaxid.h" +#include "llviewerregion.h" //----------------------------------------------------------------------------- // fetchKeywordsFileResponder //----------------------------------------------------------------------------- -fetchKeywordsFileResponder::fetchKeywordsFileResponder(const std::string& filespec) -: mFileSpec(filespec) +class fetchKeywordsFileResponder : public LLHTTPClient::Responder { - LL_DEBUGS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; -} +public: + fetchKeywordsFileResponder(const std::string& filespec) + : mFileSpec(filespec) + { + LL_DEBUGS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; + } -void fetchKeywordsFileResponder::errorWithContent(U32 status, - const std::string& reason, - const LLSD& content) -{ - LLSyntaxIdLSL::getInstance()->mLoadFailed = true; - LL_WARNS("SyntaxLSL") << "fetchKeywordsFileResponder error [status:" << status << "]: " << content << LL_ENDL; -} + virtual void errorWithContent(U32 status, + const std::string& reason, + const LLSD& content) + { + LL_WARNS("SyntaxLSL") << "failed to fetch syntax file [status:" << status << "]: " << content << LL_ENDL; + } -void fetchKeywordsFileResponder::result(const LLSD& content_ref) -{ + virtual void result(const LLSD& content_ref) + { // Continue only if a valid LLSD object was returned. if (content_ref.isMap()) { - LL_DEBUGS("SyntaxLSL") << "content_ref isMap so assuming valid XML." << LL_ENDL; - if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) { - LL_DEBUGS("SyntaxLSL") << "Supported verson of syntax file." << LL_ENDL; - LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); - LLSyntaxIdLSL::getInstance()->mInitialized = true; - LLSyntaxIdLSL::getInstance()->mLoaded = true; - LLSyntaxIdLSL::getInstance()->mLoadFailed = false; cacheFile(content_ref); + LLSyntaxIdLSL::getInstance()->handleFileFetched(mFileSpec); } else { - LLSyntaxIdLSL::getInstance()->mLoaded = false; - LLSyntaxIdLSL::getInstance()->mLoadFailed = true; LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } else { - LLSyntaxIdLSL::getInstance()->mLoaded = false; - LLSyntaxIdLSL::getInstance()->mLoadFailed = true; LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD." << LL_ENDL; } - - LLSyntaxIdLSL::getInstance()->mFileFetchedSignal(); } -void fetchKeywordsFileResponder::cacheFile(const LLSD& content_ref) -{ - std::stringstream str; - LLSDSerialize::toPrettyXML(content_ref, str); - const std::string xml = str.str(); - - // save the str to disc, usually to the cache. - llofstream file(mFileSpec, std::ios_base::out); - file.write(xml.c_str(), str.str().size()); - file.close(); + void cacheFile(const LLSD& content_ref) + { + std::stringstream str; + LLSDSerialize::toXML(content_ref, str); + const std::string xml = str.str(); - LL_DEBUGS("SyntaxLSL") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; -} + // save the str to disk, usually to the cache. + llofstream file(mFileSpec, std::ios_base::out); + file.write(xml.c_str(), str.str().size()); + file.close(); + LL_DEBUGS("SyntaxLSL") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; + } + +private: + std::string mFileSpec; +}; + //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- -const std::string LLSyntaxIdLSL::CAPABILITY_NAME = "LSLSyntax"; -const std::string LLSyntaxIdLSL::FILENAME_DEFAULT = "keywords_lsl_default.xml"; -const std::string LLSyntaxIdLSL::SIMULATOR_FEATURE = "LSLSyntaxId"; +const std::string SYNTAX_ID_CAPABILITY_NAME = "LSLSyntax"; +const std::string SYNTAX_ID_SIMULATOR_FEATURE = "LSLSyntaxId"; +const std::string FILENAME_DEFAULT = "keywords_lsl_default.xml"; /** * @brief LLSyntaxIdLSL constructor */ -LLSyntaxIdLSL::LLSyntaxIdLSL() : - mInitialized(false), - mKeywordsXml(LLSD()), - mLoaded(false), - mLoadFailed(false), - mVersionChanged(false), - mCapabilityName(CAPABILITY_NAME), - mCapabilityURL(""), - mFileNameCurrent(FILENAME_DEFAULT), - mFileNameDefault(FILENAME_DEFAULT), - mFileNameNew(""), - mFilePath(LL_PATH_APP_SETTINGS), - mSimulatorFeature(SIMULATOR_FEATURE), - mSyntaxIdCurrent(LLUUID()), - mSyntaxIdNew(LLUUID()) +LLSyntaxIdLSL::LLSyntaxIdLSL() +: mKeywordsXml(LLSD()) +, mCapabilityURL(std::string()) +, mFilePath(LL_PATH_APP_SETTINGS) +, mSyntaxId(LLUUID()) { + mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this)); + handleRegionChanged(); // Kick off an initial caps query and fetch } void LLSyntaxIdLSL::buildFullFileSpec() { - ELLPath path = mSyntaxIdNew.isNull() ? LL_PATH_APP_SETTINGS : LL_PATH_CACHE; - mFileNameNew = mSyntaxIdNew.isNull() ? mFileNameDefault : "keywords_lsl_" + mSyntaxIdNew.asString() + ".llsd.xml"; - mFullFileSpec = gDirUtilp->getExpandedFilename(path, mFileNameNew); + ELLPath path = mSyntaxId.isNull() ? LL_PATH_APP_SETTINGS : LL_PATH_CACHE; + const std::string filename = mSyntaxId.isNull() ? FILENAME_DEFAULT : "keywords_lsl_" + mSyntaxId.asString() + ".llsd.xml"; + mFullFileSpec = gDirUtilp->getExpandedFilename(path, filename); } //----------------------------------------------------------------------------- -// checkSyntaxIdChange() +// syntaxIdChange() //----------------------------------------------------------------------------- -bool LLSyntaxIdLSL::checkSyntaxIdChanged() +bool LLSyntaxIdLSL::syntaxIdChanged() { - mVersionChanged = false; + bool version_changed = false; LLViewerRegion* region = gAgent.getRegion(); if (region) { - if (!region->capabilitiesReceived()) - { // Shouldn't be possible, but experience shows that it may be needed. - mLoadFailed = true; - LL_INFOS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities yet. Cannot process SyntaxId." << LL_ENDL; - } - else + if (region->capabilitiesReceived()) { - LLSD simFeatures; - region->getSimulatorFeatures(simFeatures); + LLSD sim_features; + region->getSimulatorFeatures(sim_features); - // Does the sim have the required feature - if (simFeatures.has(mSimulatorFeature)) + if (sim_features.has(SYNTAX_ID_SIMULATOR_FEATURE)) { // get and check the hash - mSyntaxIdNew = simFeatures[mSimulatorFeature].asUUID(); - mCapabilityURL = region->getCapability(mCapabilityName); - if (mSyntaxIdCurrent != mSyntaxIdNew) - { - LL_DEBUGS("SyntaxLSL") << "Region has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew.asString() << "'" << LL_ENDL; - - mVersionChanged = true; - } - else - { - LL_DEBUGS("SyntaxLSL") << "Region has the same LSLSyntaxId! Leaving hash as '" << mSyntaxIdCurrent.asString() << "'" << LL_ENDL; - } - } - else - { - if ( mSyntaxIdCurrent.isNull() && isInitialized()) + LLUUID new_syntax_id = sim_features[SYNTAX_ID_SIMULATOR_FEATURE].asUUID(); + mCapabilityURL = region->getCapability(SYNTAX_ID_CAPABILITY_NAME); + LL_DEBUGS("SyntaxLSL") << SYNTAX_ID_SIMULATOR_FEATURE << " capability URL: " << mCapabilityURL << LL_ENDL; + if (new_syntax_id != mSyntaxId) { - LL_DEBUGS("SyntaxLSL") << "Region does not have LSLSyntaxId capability, remaining with default keywords." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL; + mSyntaxId = new_syntax_id; + version_changed = true; } else - { - // The hash is set to NULL_KEY to indicate use of default keywords file - mSyntaxIdNew = LLUUID(); - LL_DEBUGS("SyntaxLSL") << "Region does not have LSLSyntaxId capability, using default keywords." << LL_ENDL; - mVersionChanged = true; - } + LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL; } } + else + { + LL_WARNS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities. Cannot process SyntaxId." << LL_ENDL; + } } - return mVersionChanged; -} - -/** - * @brief LLSyntaxIdLSL::fetching - * If the XML has not loaded yet and it hasn't failed, then we're still fetching it. - * @return bool Whether the file fetch is still in process. - */ -bool LLSyntaxIdLSL::fetching() -{ - return !(mLoaded || mLoadFailed); + return version_changed; } //----------------------------------------------------------------------------- // fetchKeywordsFile //----------------------------------------------------------------------------- -void LLSyntaxIdLSL::fetchKeywordsFile() +void LLSyntaxIdLSL::fetchKeywordsFile(const std::string& filespec) { + mInflightFetches.push_back(filespec); LLHTTPClient::get(mCapabilityURL, - new fetchKeywordsFileResponder(mFullFileSpec), - LLSD(), 30.f - ); - LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << mFullFileSpec << "'." << LL_ENDL; + new fetchKeywordsFileResponder(filespec), + LLSD(), 30.f); + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << filespec << "'." << LL_ENDL; } @@ -219,55 +179,40 @@ void LLSyntaxIdLSL::fetchKeywordsFile() //----------------------------------------------------------------------------- void LLSyntaxIdLSL::initialize() { - mFileNameNew = mFileNameCurrent; - mSyntaxIdNew = mSyntaxIdCurrent; - - if (checkSyntaxIdChanged()) + if (mSyntaxId.isNull()) { - mKeywordsXml = LLSD(); - mLoaded = mLoadFailed = false; + loadDefaultKeywordsIntoLLSD(); + } + else if (!mCapabilityURL.empty()) + { + LL_DEBUGS("SyntaxLSL") << "LSL version has changed, getting appropriate file." << LL_ENDL; - if (mSyntaxIdNew.isNull()) - { // Need to open the default - loadDefaultKeywordsIntoLLSD(); - } - else if (!mCapabilityURL.empty() ) + // Need a full spec regardless of file source, so build it now. + buildFullFileSpec(); + if (mSyntaxId.notNull()) { - LL_DEBUGS("SyntaxLSL") << "LSL version has changed, getting appropriate file." << LL_ENDL; - - // Need a full spec regardless of file source, so build it now. - buildFullFileSpec(); - if ( !mSyntaxIdNew.isNull()) - { - if ( !gDirUtilp->fileExists(mFullFileSpec) ) - { // Does not exist, so fetch it from the capability - LL_INFOS("SyntaxLSL") << "LSL syntax not cached, attempting download." << LL_ENDL; - fetchKeywordsFile(); - } - else - { - loadKeywordsIntoLLSD(); - } + if (!gDirUtilp->fileExists(mFullFileSpec)) + { // Does not exist, so fetch it from the capability + LL_DEBUGS("SyntaxLSL") << "LSL syntax not cached, attempting download." << LL_ENDL; + fetchKeywordsFile(mFullFileSpec); } else - { // Need to open the default - loadDefaultKeywordsIntoLLSD(); + { + LL_DEBUGS("SyntaxLSL") << "Found cached Syntax file: " << mFullFileSpec << " Loading keywords." << LL_ENDL; + loadKeywordsIntoLLSD(); } } else { - mLoadFailed = true; - LL_WARNS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId is null. Loading default values" << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } } - else if (!isInitialized()) + else { + LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId capability URL is empty." << LL_ENDL; loadDefaultKeywordsIntoLLSD(); } - - mFileNameCurrent = mFileNameNew; - mSyntaxIdCurrent = mSyntaxIdNew; } //----------------------------------------------------------------------------- @@ -278,7 +223,7 @@ const std::string LLSD_SYNTAX_LSL_VERSION_KEY("llsd-lsl-syntax-version"); bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) { - bool isValid = false; + bool is_valid = false; /* * If the schema used to store LSL keywords and hints changes, this value is incremented * Note that it should _not_ be changed if the keywords and hints _content_ changes. @@ -290,15 +235,15 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) if (content[LLSD_SYNTAX_LSL_VERSION_KEY].asInteger() == LLSD_SYNTAX_LSL_VERSION_EXPECTED) { - isValid = true; + is_valid = true; } } else { - LL_DEBUGS("SyntaxLSL") << "No LSL syntax version key." << LL_ENDL; + LL_DEBUGS("SyntaxLSL") << "Missing LSL syntax version key." << LL_ENDL; } - return isValid; + return is_valid; } //----------------------------------------------------------------------------- @@ -306,8 +251,7 @@ bool LLSyntaxIdLSL::isSupportedVersion(const LLSD& content) //----------------------------------------------------------------------------- void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() { - LL_DEBUGS("SyntaxLSL") << "LSLSyntaxId is null so we will use the default file." << LL_ENDL; - mSyntaxIdNew = LLUUID(); + mSyntaxId.setNull(); buildFullFileSpec(); loadKeywordsIntoLLSD(); } @@ -323,46 +267,52 @@ void LLSyntaxIdLSL::loadDefaultKeywordsIntoLLSD() */ void LLSyntaxIdLSL::loadKeywordsIntoLLSD() { - LL_DEBUGS("SyntaxLSL") << "Trying to open cached or default keyword file" << LL_ENDL; - - // Is this the right thing to do, or should we leave the old content - // even if it isn't entirely accurate anymore? - mKeywordsXml = LLSD().emptyMap(); - LLSD content; llifstream file; file.open(mFullFileSpec); if (file.is_open()) { - mLoaded = (bool)LLSDSerialize::fromXML(content, file); - if (!mLoaded) - { - LL_WARNS("SyntaxLSL") << "Unable to deserialise: " << mFullFileSpec << LL_ENDL; - } - else + if (LLSDSerialize::fromXML(content, file) != LLSDParser::PARSE_FAILURE) { if (isSupportedVersion(content)) { - mKeywordsXml = content; - mLoaded = true; - mInitialized = true; LL_DEBUGS("SyntaxLSL") << "Deserialised: " << mFullFileSpec << LL_ENDL; } else { - mLoaded = false; LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; } } } else { - LL_WARNS("SyntaxLSL") << "Unable to open: " << mFullFileSpec << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Failed to open: " << mFullFileSpec << LL_ENDL; + } + mKeywordsXml = content; + mSyntaxIDChangedSignal(); +} + +bool LLSyntaxIdLSL::keywordFetchInProgress() +{ + return !mInflightFetches.empty(); +} + +void LLSyntaxIdLSL::handleRegionChanged() +{ + if (syntaxIdChanged()) + { + buildFullFileSpec(); + fetchKeywordsFile(mFullFileSpec); } - mLoadFailed = !mLoaded; } -boost::signals2::connection LLSyntaxIdLSL::addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb) +void LLSyntaxIdLSL::handleFileFetched(const std::string& filepath) +{ + mInflightFetches.remove(filepath); + loadKeywordsIntoLLSD(); +} + +boost::signals2::connection LLSyntaxIdLSL::addSyntaxIDCallback(const syntax_id_changed_signal_t::slot_type& cb) { - return mFileFetchedSignal.connect(cb); + return mSyntaxIDChangedSignal.connect(cb); } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 2288fb4ab8..70f6b28337 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -2,7 +2,7 @@ * @file llsyntaxid.h * @brief Contains methods to access the LSLSyntaxId feature and LSLSyntax capability * to use the appropriate syntax file for the current region's LSL version. - * @author Ima Mechanique + * @author Ima Mechanique, Cinder Roxley * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ * Second Life Viewer Source Code @@ -30,98 +30,43 @@ #include "llviewerprecompiledheaders.h" -#include "llagent.h" -#include "llenvmanager.h" -#include "llhttpclient.h" #include "llsingleton.h" -#include "llviewerregion.h" + +class fetchKeywordsFileResponder; class LLSyntaxIdLSL : public LLSingleton { -friend class fetchKeywordsFileResponder; - -public: - LLSyntaxIdLSL(); - - bool checkSyntaxIdChanged(); - bool fetching(); - std::string getFileNameCurrent() const { return mFileNameCurrent; } - ELLPath getFilePath() const { return mFilePath; } - std::string getFileSpec() const { return mFullFileSpec; } - LLSD getKeywordsXML() const { return mKeywordsXml; } - LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } - bool isDifferentVersion() const { return mVersionChanged; } - bool isInitialized() const { return mInitialized; } - - void initialize(); - bool isLoaded() { return mLoaded; } - - bool isSupportedVersion(const LLSD& content); - void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; } - typedef boost::signals2::signal file_fetched_signal_t; - boost::signals2::connection addFileFetchedCallback(const file_fetched_signal_t::slot_type& cb); - -protected: - void buildFullFileSpec(); - void fetchKeywordsFile(); - void loadDefaultKeywordsIntoLLSD(); - void loadKeywordsIntoLLSD(); - void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } - void setFileNameCurrent(const std::string& name) { mFileNameCurrent = name; } - void setFileNameNew(const std::string name) { mFileNameNew = name; } + friend class LLSingleton; + friend class fetchKeywordsFileResponder; private: - static const std::string CAPABILITY_NAME; - static const std::string FILENAME_DEFAULT; - static const std::string SIMULATOR_FEATURE; - - bool mInitialized; - LLSD mKeywordsXml; - bool mLoaded; - bool mLoadFailed; - bool mVersionChanged; - file_fetched_signal_t mFileFetchedSignal; + std::list mInflightFetches; + typedef boost::signals2::signal syntax_id_changed_signal_t; + syntax_id_changed_signal_t mSyntaxIDChangedSignal; + boost::signals2::connection mRegionChangedCallback; + + bool syntaxIdChanged(); + bool isSupportedVersion(const LLSD& content); + void handleRegionChanged(); + void handleFileFetched(const std::string& filepath); + void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; }; + void buildFullFileSpec(); + void fetchKeywordsFile(const std::string& filespec); + void loadDefaultKeywordsIntoLLSD(); + void loadKeywordsIntoLLSD(); - std::string mCapabilityName; std::string mCapabilityURL; - std::string mFileNameCurrent; - std::string mFileNameDefault; - std::string mFileNameNew; - ELLPath mFilePath; std::string mFullFileSpec; - std::string mSimulatorFeature; - LLUUID mSyntaxIdCurrent; - LLUUID mSyntaxIdNew; -}; - - -class fetchKeywordsFileResponder : public LLHTTPClient::Responder -{ + ELLPath mFilePath; + LLUUID mSyntaxId; + LLSD mKeywordsXml; + public: - std::string mFileSpec; - - /** - * @brief fetchKeywordsFileResponder - * @param filespec File path and name of where to save the returned data - */ - fetchKeywordsFileResponder(const std::string& filespec); - - void errorWithContent(U32 status, - const std::string& reason, - const LLSD& content); - - /** - * @brief Checks the returned LLSD for version and stores it in the LLSyntaxIdLSL object. - * @param content_ref The returned LLSD. - */ - void result(const LLSD& content_ref); - - /** - * @brief Saves the returned file to the location provided at instantiation. - * Could be extended to manage cached entries. - * @param content_ref The LSL syntax file for the sim. - */ - void cacheFile(const LLSD& content_ref); + LLSyntaxIdLSL(); + void initialize(); + bool keywordFetchInProgress(); + LLSD getKeywordsXML() const { return mKeywordsXml; }; + boost::signals2::connection addSyntaxIDCallback(const syntax_id_changed_signal_t::slot_type& cb); }; #endif // LLSYNTAXID_H -- cgit v1.2.3 From 78be5c3aa5f7263698bec5bcbccb24c150f78d09 Mon Sep 17 00:00:00 2001 From: Cinder Date: Mon, 9 Jun 2014 16:19:20 -0600 Subject: STORM-2026 - Use more unique syntax colors by default, also clean up some indentation --- indra/newview/llsyntaxid.cpp | 28 ++++++++++++++-------------- indra/newview/skins/default/colors.xml | 20 ++++++++++---------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 5b5bab85d0..236ad784ec 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -51,31 +51,31 @@ public: const std::string& reason, const LLSD& content) { - LL_WARNS("SyntaxLSL") << "failed to fetch syntax file [status:" << status << "]: " << content << LL_ENDL; + LL_WARNS("SyntaxLSL") << "failed to fetch syntax file [status:" << status << "]: " << content << LL_ENDL; } virtual void result(const LLSD& content_ref) { - // Continue only if a valid LLSD object was returned. - if (content_ref.isMap()) - { - if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) + // Continue only if a valid LLSD object was returned. + if (content_ref.isMap()) { - LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); + if (LLSyntaxIdLSL::getInstance()->isSupportedVersion(content_ref)) + { + LLSyntaxIdLSL::getInstance()->setKeywordsXml(content_ref); - cacheFile(content_ref); - LLSyntaxIdLSL::getInstance()->handleFileFetched(mFileSpec); + cacheFile(content_ref); + LLSyntaxIdLSL::getInstance()->handleFileFetched(mFileSpec); + } + else + { + LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; + } } else { - LL_WARNS("SyntaxLSL") << "Unknown or unsupported version of syntax file." << LL_ENDL; + LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD." << LL_ENDL; } } - else - { - LL_WARNS("SyntaxLSL") << "Syntax file '" << mFileSpec << "' contains invalid LLSD." << LL_ENDL; - } -} void cacheFile(const LLSD& content_ref) { diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 464e633297..bdc884885f 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -917,32 +917,32 @@ reference="Black" /> + value="0 0.5 0 1" /> + value="0 0.6 0.6 1" /> + value="0.4 0 0.8 1" /> + value="0 0 0.8 1" /> + value="0.8 0.4 0 1" /> + value="0.9 0.0 0.66, 1" /> + value="0 0.3 0.5 1" /> + value="0.3 0 0.5 1" /> + value="0.7 .2 .35 1" /> + value="1 0.14 0 1" /> -- cgit v1.2.3 From a92dbb592b338f48f7b75b68a9da511dc95279f9 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 11 Jun 2014 20:24:25 +0300 Subject: MAINT-4133 FIXED Import llpanelgroupinvite.cpp from viewer_lion to voorhees_groupban. --- indra/newview/llpanelgroupinvite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index bb4bfb2f96..236ad861a5 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -655,7 +655,7 @@ BOOL LLPanelGroupInvite::postBuild() } mImplementation->mOKButton = - getChild("ok_button", recurse); + getChild("invite_button", recurse); if ( mImplementation->mOKButton ) { mImplementation->mOKButton->setClickedCallback(impl::callbackClickOK, mImplementation); -- cgit v1.2.3 From 142e8edcd334b6119a74a7ce93c9823ad82bc052 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 16 Jun 2014 14:35:23 -0400 Subject: correct merge mistake --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index fe9dde4a43..6797dab839 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1483,7 +1483,7 @@ void LLAppearanceMgr::takeOffOutfit(const LLUUID& cat_id) // deactivate all gestures in the outfit folder LLInventoryModel::item_array_t gest_items; - getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE, false); + getDescendentsOfAssetType(cat_id, gest_items, LLAssetType::AT_GESTURE); for(S32 i = 0; i < gest_items.size(); ++i) { LLViewerInventoryItem *gest_item = gest_items[i]; -- cgit v1.2.3 From f924175da0acbb8a8884fff0740d416da9c2489c Mon Sep 17 00:00:00 2001 From: "maxim@mnikolenko" Date: Wed, 18 Jun 2014 13:00:18 +0300 Subject: MAINT-3186 FIXED Disable menu items if group or ad-hoc chat is in multiselection --- indra/newview/llfloaterimcontainer.cpp | 20 ++++++++++++++++++++ .../skins/default/xui/en/menu_conversation.xml | 1 + 2 files changed, 21 insertions(+) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index ebb44561da..a0df37b309 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1271,6 +1271,22 @@ bool LLFloaterIMContainer::enableContextMenuItem(const LLSD& userdata) uuid_vec_t uuids; getParticipantUUIDs(uuids); + + //If there is group or ad-hoc chat in multiselection, everything needs to be disabled + if(uuids.size() > 1) + { + const std::set selectedItems = mConversationsRoot->getSelectionList(); + LLConversationItem * conversationItem; + for(std::set::const_iterator it = selectedItems.begin(); it != selectedItems.end(); ++it) + { + conversationItem = static_cast((*it)->getViewModelItem()); + if((conversationItem->getType() == LLConversationItem::CONV_SESSION_GROUP) || (conversationItem->getType() == LLConversationItem::CONV_SESSION_AD_HOC)) + { + return false; + } + } + } + if ("conversation_log" == item) { return gSavedPerAccountSettings.getS32("KeepConversationLogTranscripts") > 0; @@ -1375,6 +1391,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v else if ("can_call" == item) { return LLAvatarActions::canCall(); + } + else if ("can_open_voice_conversation" == item) + { + return is_single_select && LLAvatarActions::canCall(); } else if ("can_zoom_in" == item) { diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index 31b1d091ee..f5a493c064 100755 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -17,6 +17,7 @@ layout="topleft" name="open_voice_conversation"> + Date: Thu, 19 Jun 2014 17:38:39 +0300 Subject: MAINT-4174 FIXED "Ban Resident(s)" button in Banned residents tab is active for members without ban permissions, after viewing 'Banned Residents' tab in a group where they do have ban permissions --- indra/newview/llpanelgrouproles.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 2fcaa5666e..b21e1747b3 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -2875,10 +2875,7 @@ void LLPanelGroupBanListSubTab::activate() mBanList->deselectAllItems(); mDeleteBanButton->setEnabled(FALSE); - if (gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) - { - mCreateBanButton->setEnabled(TRUE); - } + mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)); // BAKER: Should I really request everytime activate() is called? // Perhaps I should only do it on a force refresh, or if an action on the list happens... -- cgit v1.2.3 From a7db93cb698d81ea5005ed4be453fbddd65e0cc0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 19 Jun 2014 21:23:14 +0300 Subject: MAINT-4182 FIXED The group ban list always appears empty --- indra/newview/llgroupmgr.cpp | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 61c3bbb13a..50e3ab6dd8 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1868,8 +1868,8 @@ class GroupBanDataResponder : public LLHTTPClient::Responder public: GroupBanDataResponder(const LLUUID& gropup_id, BOOL force_refresh=false); virtual ~GroupBanDataResponder() {} - virtual void result(const LLSD& pContent); - virtual void errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent); + virtual void httpSuccess(); + virtual void httpFailure(); private: LLUUID mGroupID; BOOL mForceRefresh; @@ -1880,34 +1880,27 @@ GroupBanDataResponder::GroupBanDataResponder(const LLUUID& gropup_id, BOOL force mForceRefresh(force_refresh) {} -void GroupBanDataResponder::errorWithContent(U32 pStatus, const std::string& pReason, const LLSD& pContent) +void GroupBanDataResponder::httpFailure() { LL_WARNS("GrpMgr") << "Error receiving group member data [status:" - << pStatus << "]: " << pContent << LL_ENDL; + << mStatus << "]: " << mContent << LL_ENDL; } -void GroupBanDataResponder::result(const LLSD& content) +void GroupBanDataResponder::httpSuccess() { - if ( content.size()) + if ( mContent.size()) { - if (content.has("ban_list")) + if (mContent.has("ban_list")) { - // group data received - LLGroupMgr::processGroupBanRequest(content); - } - // no group data received, this is either CREATE or DELETE operation - // complete confirmation. Local data may be obsolete. - else if (mForceRefresh) - { - // providing mGroupId and not extracting it from content since it is not - // included into CREATE and DELETE responses - LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); + // group ban data received + LLGroupMgr::processGroupBanRequest(mContent); + mForceRefresh = false; } } - else + if (mForceRefresh) { - LL_WARNS("GrpMgr") << "No group member data received." << LL_ENDL; - return; + // no ban data received, refreshing data after successful operation + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); } } -- cgit v1.2.3 From d949bee053610fe8769055589984e721ae1ee3d1 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 20 Jun 2014 10:17:31 -0600 Subject: BUG-6425 - Init default keywords file during ctor so we have something to fallback on should caps or fetch fail --- indra/newview/llsyntaxid.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 236ad784ec..9b82710161 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -111,6 +111,7 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() , mFilePath(LL_PATH_APP_SETTINGS) , mSyntaxId(LLUUID()) { + loadDefaultKeywordsIntoLLSD(); mRegionChangedCallback = gAgent.addRegionChangedCallback(boost::bind(&LLSyntaxIdLSL::handleRegionChanged, this)); handleRegionChanged(); // Kick off an initial caps query and fetch } -- cgit v1.2.3 From 984353d7ca6184d7252c716150d42139aae94e5c Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 20 Jun 2014 11:02:50 -0600 Subject: STORM-2036 - Fix trying to parse caps too early by adding a callback to check region caps when they haven't already been received --- doc/contributions.txt | 1 + indra/newview/llsyntaxid.cpp | 19 +++++++++++++++---- indra/newview/llsyntaxid.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index a3ca5d5f58..3ba4ee8973 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -321,6 +321,7 @@ Cinder Roxley STORM-1958 STORM-1952 STORM-1951 + STORM-2036 Clara Young Coaldust Numbers VWR-1095 diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 9b82710161..b1194dcd1b 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -128,7 +128,6 @@ void LLSyntaxIdLSL::buildFullFileSpec() //----------------------------------------------------------------------------- bool LLSyntaxIdLSL::syntaxIdChanged() { - bool version_changed = false; LLViewerRegion* region = gAgent.getRegion(); if (region) @@ -148,7 +147,7 @@ bool LLSyntaxIdLSL::syntaxIdChanged() { LL_DEBUGS("SyntaxLSL") << "New SyntaxID '" << new_syntax_id << "' found." << LL_ENDL; mSyntaxId = new_syntax_id; - version_changed = true; + return true; } else LL_DEBUGS("SyntaxLSL") << "SyntaxID matches what we have." << LL_ENDL; @@ -156,10 +155,11 @@ bool LLSyntaxIdLSL::syntaxIdChanged() } else { - LL_WARNS("SyntaxLSL") << "Region '" << region->getName() << "' has not received capabilities. Cannot process SyntaxId." << LL_ENDL; + region->setCapabilitiesReceivedCallback(boost::bind(&LLSyntaxIdLSL::handleCapsReceived, this, _1)); + LL_DEBUGS("SyntaxLSL") << "Region has not received capabilities. Waiting for caps..." << LL_ENDL; } } - return version_changed; + return false; } //----------------------------------------------------------------------------- @@ -307,6 +307,17 @@ void LLSyntaxIdLSL::handleRegionChanged() } } +void LLSyntaxIdLSL::handleCapsReceived(const LLUUID& region_uuid) +{ + LLViewerRegion* current_region = gAgent.getRegion(); + + if (region_uuid.notNull() + && current_region->getRegionID() == region_uuid) + { + syntaxIdChanged(); + } +} + void LLSyntaxIdLSL::handleFileFetched(const std::string& filepath) { mInflightFetches.remove(filepath); diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 70f6b28337..504fb0997e 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -48,6 +48,7 @@ private: bool syntaxIdChanged(); bool isSupportedVersion(const LLSD& content); void handleRegionChanged(); + void handleCapsReceived(const LLUUID& region_uuid); void handleFileFetched(const std::string& filepath); void setKeywordsXml(const LLSD& content) { mKeywordsXml = content; }; void buildFullFileSpec(); -- cgit v1.2.3 From 8d2e0fb3a047e349b88db80afa09fc97a7f4ff74 Mon Sep 17 00:00:00 2001 From: Cinder Date: Fri, 20 Jun 2014 13:43:31 -0600 Subject: STORM-2035 - Invert the background color in script editors for highlighting sections. Since the background color can be changed by the user, this ensures distinctive highlighting --- doc/contributions.txt | 1 + indra/llui/lltextbase.cpp | 51 +++++----- indra/llui/lltextbase.h | 40 +++++--- indra/newview/llscripteditor.cpp | 104 +++++++++++++++++++++ indra/newview/llscripteditor.h | 5 +- .../skins/default/xui/en/panel_script_ed.xml | 1 - 6 files changed, 155 insertions(+), 47 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 3ba4ee8973..7e8ab46b1a 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -321,6 +321,7 @@ Cinder Roxley STORM-1958 STORM-1952 STORM-1951 + STORM-2035 STORM-2036 Clara Young Coaldust Numbers diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index ebfd227f06..71db0ac030 100755 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -70,43 +70,36 @@ bool LLTextBase::compare_segment_end::operator()(const LLTextSegmentPtr& a, cons // helper functors -struct LLTextBase::compare_bottom +bool LLTextBase::compare_bottom::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mBottom; // bottom of a is higher than bottom of b - } - - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mBottom > b; // bottom of a is higher than bottom of b - } + return a > b.mRect.mBottom; // bottom of a is higher than bottom of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b - } +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mBottom > b; // bottom of a is higher than bottom of b +} -}; +bool LLTextBase::compare_bottom::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mBottom > b.mRect.mBottom; // bottom of a is higher than bottom of b +} // helper functors -struct LLTextBase::compare_top +bool LLTextBase::compare_top::operator()(const S32& a, const LLTextBase::line_info& b) const { - bool operator()(const S32& a, const LLTextBase::line_info& b) const - { - return a > b.mRect.mTop; // top of a is higher than top of b - } + return a > b.mRect.mTop; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const S32& b) const - { - return a.mRect.mTop > b; // top of a is higher than top of b - } +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const S32& b) const +{ + return a.mRect.mTop > b; // top of a is higher than top of b +} - bool operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const - { - return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b - } -}; +bool LLTextBase::compare_top::operator()(const LLTextBase::line_info& a, const LLTextBase::line_info& b) const +{ + return a.mRect.mTop > b.mRect.mTop; // top of a is higher than top of b +} struct LLTextBase::line_end_compare { diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index ecbfdaf84c..738b4d5b8e 100755 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -451,9 +451,31 @@ public: LLScrollContainer* getScrollContainer() const { return mScroller; } protected: + // protected member variables + // List of offsets and segment index of the start of each line. Always has at least one node (0). + struct line_info + { + line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num); + S32 mDocIndexStart; + S32 mDocIndexEnd; + LLRect mRect; + S32 mLineNum; // actual line count (ignoring soft newlines due to word wrap) + }; + typedef std::vector line_list_t; + // helper structs - struct compare_bottom; - struct compare_top; + struct compare_bottom + { + bool operator()(const S32& a, const line_info& b) const; + bool operator()(const line_info& a, const S32& b) const; + bool operator()(const line_info& a, const line_info& b) const; + }; + struct compare_top + { + bool operator()(const S32& a, const line_info& b) const; + bool operator()(const line_info& a, const S32& b) const; + bool operator()(const line_info& a, const line_info& b) const; + }; struct line_end_compare; typedef std::vector segment_vec_t; @@ -501,18 +523,6 @@ protected: }; typedef std::multiset segment_set_t; - // protected member variables - // List of offsets and segment index of the start of each line. Always has at least one node (0). - struct line_info - { - line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num); - S32 mDocIndexStart; - S32 mDocIndexEnd; - LLRect mRect; - S32 mLineNum; // actual line count (ignoring soft newlines due to word wrap) - }; - typedef std::vector line_list_t; - // member functions LLTextBase(const Params &p); virtual ~LLTextBase(); @@ -522,7 +532,7 @@ protected: virtual bool useLabel() const; // draw methods - void drawSelectionBackground(); // draws the black box behind the selected text + virtual void drawSelectionBackground(); // draws the black box behind the selected text void drawCursor(); void drawText(); diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index df46380130..3bbfbad477 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -183,3 +183,107 @@ void LLScriptEditor::clearSegments() mSegments.clear(); } } + +// Most of this is shamelessly copied from LLTextBase +void LLScriptEditor::drawSelectionBackground() +{ + // Draw selection even if we don't have keyboard focus for search/replace + if( hasSelection() && !mLineInfoList.empty()) + { + std::vector selection_rects; + + S32 selection_left = llmin( mSelectionStart, mSelectionEnd ); + S32 selection_right = llmax( mSelectionStart, mSelectionEnd ); + + // Skip through the lines we aren't drawing. + LLRect content_display_rect = getVisibleDocumentRect(); + + // binary search for line that starts before top of visible buffer + line_list_t::const_iterator line_iter = std::lower_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mTop, LLTextBase::compare_bottom()); + line_list_t::const_iterator end_iter = std::upper_bound(mLineInfoList.begin(), mLineInfoList.end(), content_display_rect.mBottom, LLTextBase::compare_top()); + + bool done = false; + + // Find the coordinates of the selected area + for (;line_iter != end_iter && !done; ++line_iter) + { + // is selection visible on this line? + if (line_iter->mDocIndexEnd > selection_left && line_iter->mDocIndexStart < selection_right) + { + segment_set_t::iterator segment_iter; + S32 segment_offset; + getSegmentAndOffset(line_iter->mDocIndexStart, &segment_iter, &segment_offset); + + LLRect selection_rect; + selection_rect.mLeft = line_iter->mRect.mLeft; + selection_rect.mRight = line_iter->mRect.mLeft; + selection_rect.mBottom = line_iter->mRect.mBottom; + selection_rect.mTop = line_iter->mRect.mTop; + + for(;segment_iter != mSegments.end(); ++segment_iter, segment_offset = 0) + { + LLTextSegmentPtr segmentp = *segment_iter; + + S32 segment_line_start = segmentp->getStart() + segment_offset; + S32 segment_line_end = llmin(segmentp->getEnd(), line_iter->mDocIndexEnd); + + if (segment_line_start > segment_line_end) break; + + S32 segment_width = 0; + S32 segment_height = 0; + + // if selection after beginning of segment + if(selection_left >= segment_line_start) + { + S32 num_chars = llmin(selection_left, segment_line_end) - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mLeft += segment_width; + } + + // if selection_right == segment_line_end then that means we are the first character of the next segment + // or first character of the next line, in either case we want to add the length of the current segment + // to the selection rectangle and continue. + // if selection right > segment_line_end then selection spans end of current segment... + if (selection_right >= segment_line_end) + { + // extend selection slightly beyond end of line + // to indicate selection of newline character (use "n" character to determine width) + S32 num_chars = segment_line_end - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mRight += segment_width; + } + // else if selection ends on current segment... + else + { + S32 num_chars = selection_right - segment_line_start; + segmentp->getDimensions(segment_offset, num_chars, segment_width, segment_height); + selection_rect.mRight += segment_width; + + break; + } + } + selection_rects.push_back(selection_rect); + } + } + + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor; + F32 alpha = hasFocus() ? 0.7f : 0.3f; + alpha *= getDrawContext().mAlpha; + // We want to invert the background color in script editors + LLColor4 selection_color(1.f - color.mV[VRED], + 1.f - color.mV[VGREEN], + 1.f - color.mV[VBLUE], + alpha); + + for (std::vector::iterator rect_it = selection_rects.begin(); + rect_it != selection_rects.end(); + ++rect_it) + { + LLRect selection_rect = *rect_it; + selection_rect = *rect_it; + selection_rect.translate(mVisibleTextRect.mLeft - content_display_rect.mLeft, mVisibleTextRect.mBottom - content_display_rect.mBottom); + gl_rect_2d(selection_rect, selection_color); + } + } +} diff --git a/indra/newview/llscripteditor.h b/indra/newview/llscripteditor.h index 8c5ab362a3..f458203a39 100644 --- a/indra/newview/llscripteditor.h +++ b/indra/newview/llscripteditor.h @@ -48,7 +48,7 @@ public: void initKeywords(); void loadKeywords(); - void clearSegments(); + /* virtual */ void clearSegments(); LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } @@ -58,7 +58,8 @@ protected: private: void drawLineNumbers(); - void updateSegments(); + /* virtual */ void updateSegments(); + /* virtual */ void drawSelectionBackground(); void loadKeywords(const std::string& filename_keywords, const std::string& filename_colors); diff --git a/indra/newview/skins/default/xui/en/panel_script_ed.xml b/indra/newview/skins/default/xui/en/panel_script_ed.xml index 5971082380..eb1b954e61 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -176,7 +176,6 @@ bg_focus_color="ScriptBackground" text_readonly_color="ScriptText" bg_readonly_color="ScriptBackground" - bg_selected_color="ScriptSelectedColor" cursor_color="ScriptCursorColor" enable_tooltip_paste="true" word_wrap="true" -- cgit v1.2.3 From 845b80a3864093ebed940551d91441e45e4b50b9 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 23 Jun 2014 13:25:17 +0300 Subject: MAINT-4182 Cleaning up --- indra/newview/llgroupmgr.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 50e3ab6dd8..98036f3a20 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1888,16 +1888,12 @@ void GroupBanDataResponder::httpFailure() void GroupBanDataResponder::httpSuccess() { - if ( mContent.size()) + if (mContent.has("ban_list")) { - if (mContent.has("ban_list")) - { - // group ban data received - LLGroupMgr::processGroupBanRequest(mContent); - mForceRefresh = false; - } + // group ban data received + LLGroupMgr::processGroupBanRequest(mContent); } - if (mForceRefresh) + else if (mForceRefresh) { // no ban data received, refreshing data after successful operation LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_GET, mGroupID); -- cgit v1.2.3 From be2f4ecdb4135256e3e513370614c1626e5a1354 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 23 Jun 2014 18:39:53 +0300 Subject: MAINT-4175 FIXED [Group Bans] When banning a list of multiple avatars, if an already banned avatar is included in the list, no avatars are added to the ban list and those avatars already group members are not ejected from the group. --- indra/newview/llpanelgroupbulkban.cpp | 78 ++++++++++++++++++---- indra/newview/llpanelgroupbulkimpl.h | 2 + .../skins/default/xui/en/panel_group_bulk_ban.xml | 26 ++++++-- 3 files changed, 90 insertions(+), 16 deletions(-) diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index a31396737d..3499b45949 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llavatarnamecache.h" +#include "llavataractions.h" #include "llfloateravatarpicker.h" #include "llbutton.h" #include "llcallingcard.h" @@ -100,6 +101,8 @@ BOOL LLPanelGroupBulkBan::postBuild() } mImplementation->mTooManySelected = getString("ban_selection_too_large"); + mImplementation->mBanNotPermitted = getString("ban_not_permitted"); + mImplementation->mCannotBanYourself = getString("cant_ban_yourself"); update(); return TRUE; @@ -117,6 +120,15 @@ void LLPanelGroupBulkBan::callbackClickSubmit(void* userdata) void LLPanelGroupBulkBan::submit() { + if (!gAgent.hasPowerInGroup(mImplementation->mGroupID, GP_GROUP_BAN_ACCESS)) + { + // Fail! Agent no longer have ban rights. + LLSD msg; + msg["MESSAGE"] = mImplementation->mBanNotPermitted; + LLNotificationsUtil::add("GenericAlert", msg); + (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); + return; + } std::vector banned_agent_list; std::vector agents = mImplementation->mBulkAgentList->getAllData(); std::vector::iterator iter = agents.begin(); @@ -137,32 +149,74 @@ void LLPanelGroupBulkBan::submit() return; } + // remove already banned users and yourself from request. + std::vector banned_avatar_names; + bool banning_self = FALSE; + std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); + if (conflict != banned_agent_list.end()) + { + banned_agent_list.erase(conflict); + banning_self = TRUE; + } LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); if (group_datap) { BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList) { const LLUUID& group_ban_agent_id = group_ban_pair.first; - if (std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id) != banned_agent_list.end()) + std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id); + if (conflict != banned_agent_list.end()) { - // Fail! LLAvatarName av_name; LLAvatarNameCache::get(group_ban_agent_id, &av_name); + banned_avatar_names.push_back(av_name); - LLStringUtil::format_map_t string_args; - string_args["[RESIDENT]"] = av_name.getDisplayName(); - - LLSD msg; - msg["MESSAGE"] = getString("already_banned", string_args); - LLNotificationsUtil::add("GenericAlert", msg); - (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); - return; + banned_agent_list.erase(conflict); + if (banned_agent_list.size() == 0) + { + break; + } } } } - LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list); - LLGroupMgr::getInstance()->sendGroupMemberEjects(mImplementation->mGroupID, banned_agent_list); + if (banned_agent_list.size() != 0) + { + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list); + LLGroupMgr::getInstance()->sendGroupMemberEjects(mImplementation->mGroupID, banned_agent_list); + } + + // building notification + if (banned_avatar_names.size() > 0 || banning_self) + { + std::string reasons; + if(banned_avatar_names.size() > 0) + { + std::string names_string; + LLAvatarActions::buildResidentsString(banned_avatar_names, names_string); + LLStringUtil::format_map_t reason_args; + reason_args["[RESIDENTS]"] = names_string; + reasons = "\n " + getString("residents_already_banned", reason_args); + } + + if(banning_self) + { + reasons += "\n " + mImplementation->mCannotBanYourself; + } + + LLStringUtil::format_map_t msg_args; + msg_args["[REASONS]"] = reasons; + LLSD msg; + if (banned_agent_list.size() == 0) + { + msg["MESSAGE"] = getString("ban_failed", msg_args); + } + else + { + msg["MESSAGE"] = getString("partial_ban", msg_args); + } + LLNotificationsUtil::add("GenericAlert", msg); + } //then close (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); diff --git a/indra/newview/llpanelgroupbulkimpl.h b/indra/newview/llpanelgroupbulkimpl.h index 0bc834d67e..585b48c68f 100644 --- a/indra/newview/llpanelgroupbulkimpl.h +++ b/indra/newview/llpanelgroupbulkimpl.h @@ -74,6 +74,8 @@ public: std::string mLoadingText; std::string mTooManySelected; + std::string mBanNotPermitted; + std::string mCannotBanYourself; std::set mInviteeIDs; diff --git a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml index 43449df1fd..31989f2e16 100644 --- a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml +++ b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml @@ -15,10 +15,28 @@ name="ban_selection_too_large"> Group bans not sent: too many Residents selected. Group bans are limited to 100 per request. - - Group Invitations not sent: resident '[RESIDENT]' already banned. - + + Group ban not sent: you do not have 'Manage ban list' ability. + + + Some group bans were not sent: +[REASONS] + + + Group bans were not sent: +[REASONS] + + + - The following resident(s) are already banned: [RESIDENTS]. + + + - You cannot ban yourself from a group. + Date: Mon, 23 Jun 2014 23:10:23 -0500 Subject: MAINT-2980 Up texture memory slider cap to 4096MB. Make "Texture Memory" default to 1/3rd of video memory. Add description on debug setting and tooltip to explain why. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloaterhardwaresettings.cpp | 15 ------------ indra/newview/llfloaterhardwaresettings.h | 2 -- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 28 +++++++--------------- .../default/xui/en/floater_hardware_settings.xml | 5 ++-- 6 files changed, 13 insertions(+), 41 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6081729687..a2a8cf989d 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11862,7 +11862,7 @@ TextureMemory Comment - Amount of memory to use for textures in MB (0 = autodetect) + Amount of memory to use for textures in MB (0 = autodetect). Defaults to 1/3 of video memory to allow room for render targets, vertex buffers, 3D accelerated desktops, and over allocation. Persist 1 Type diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index f267a2e7b3..035eb307c2 100755 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -87,16 +87,6 @@ void LLFloaterHardwareSettings::refresh() refreshEnabledState(); } -void LLFloaterHardwareSettings::onSetVRAM() -{ - S32 vram = childGetValue("GraphicsCardTextureMemory").asInteger(); - - //give the texture system plenty of leeway to avoid swapping - vram /= 3; - - gSavedSettings.setS32("TextureMemory", vram); -} - void LLFloaterHardwareSettings::refreshEnabledState() { F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple"); @@ -105,11 +95,6 @@ void LLFloaterHardwareSettings::refreshEnabledState() getChild("GraphicsCardTextureMemory")->setMinValue(min_tex_mem.value()); getChild("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem.value()); - S32 vram = gSavedSettings.getS32("TextureMemory"); - vram = vram*3; - - getChild("GraphicsCardTextureMemory")->setValue(vram); - getChild("GraphicsCardTextureMemory")->setCommitCallback(boost::bind(&LLFloaterHardwareSettings::onSetVRAM, this)); if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderVBOEnable") || !gGLManager.mHasVertexBufferObject) { diff --git a/indra/newview/llfloaterhardwaresettings.h b/indra/newview/llfloaterhardwaresettings.h index 63d86d5667..626771b1d2 100755 --- a/indra/newview/llfloaterhardwaresettings.h +++ b/indra/newview/llfloaterhardwaresettings.h @@ -64,8 +64,6 @@ public: /// don't apply the changed values void cancel(); - void onSetVRAM(); - /// refresh the enabled values void refreshEnabledState(); diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index ba89aafc84..e16caf167d 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -64,7 +64,7 @@ // extern const S32Megabytes gMinVideoRam(32); -const S32Megabytes gMaxVideoRam(512); +const S32Megabytes gMaxVideoRam(4096); // statics diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 2209b24ca7..9f862b4f97 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1275,21 +1275,15 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl { S32Megabytes max_texmem; if (gGLManager.mVRAM != 0) - { - // Treat any card with < 32 MB (shudder) as having 32 MB - // - it's going to be swapping constantly regardless + { //use detected amount of vram as maximum S32Megabytes max_vram(gGLManager.mVRAM); - if(!get_recommended && gGLManager.mIsATI) - { - //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well. - max_vram = max_vram * 0.75f; - } - - max_vram = llmax(max_vram, getMinVideoRamSetting()); max_texmem = max_vram; - if (!get_recommended) - max_texmem *= 2; + + if (get_recommended) + { //recommend 1/3rd of total video memory for textures + max_texmem /= 3; + } } else { @@ -1309,15 +1303,9 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB - //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; - max_texmem = llmin(max_texmem, (S32Megabytes)(system_ram)); - - // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise + // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise max_texmem = llmin(max_texmem, (S32Megabytes) (mem_multiplier * max_texmem)); - max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam); - return max_texmem; } @@ -1341,7 +1329,7 @@ void LLViewerTextureList::updateMaxResidentTexMem(S32Megabytes mem) mem = llclamp(mem, getMinVideoRamSetting(), getMaxVideoRamSetting(false, mem_multiplier)); if (mem != cur_mem) { - gSavedSettings.setS32("TextureMemory", mem.value()/3); + gSavedSettings.setS32("TextureMemory", mem.value()); return; //listener will re-enter this function } diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 05594c2d86..40d54233e8 100755 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -157,16 +157,17 @@ Date: Tue, 24 Jun 2014 15:27:08 -0600 Subject: STORM-2035 - Looking for a good selection box contrast --- indra/newview/llscripteditor.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp index 3bbfbad477..81920562a7 100644 --- a/indra/newview/llscripteditor.cpp +++ b/indra/newview/llscripteditor.cpp @@ -267,13 +267,13 @@ void LLScriptEditor::drawSelectionBackground() } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - const LLColor4& color = mReadOnly ? mReadOnlyBgColor : mWriteableBgColor; + const LLColor4& color = mReadOnly ? mReadOnlyFgColor : mFgColor; F32 alpha = hasFocus() ? 0.7f : 0.3f; alpha *= getDrawContext().mAlpha; - // We want to invert the background color in script editors - LLColor4 selection_color(1.f - color.mV[VRED], - 1.f - color.mV[VGREEN], - 1.f - color.mV[VBLUE], + // We want to shift the color to something readable but distinct + LLColor4 selection_color((1.f + color.mV[VRED]) * 0.5f, + (1.f + color.mV[VGREEN]) * 0.5f, + (1.f + color.mV[VBLUE]) * 0.5f, alpha); for (std::vector::iterator rect_it = selection_rects.begin(); -- cgit v1.2.3 From 854c251feffe9bf194bc4e63fd0de28bd20ff995 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 25 Jun 2014 20:09:33 +0300 Subject: MAINT-4178 FIXED [Group Bans] The viewer allows you to attempt to ban when the ban list already contains 500 entries, which fails. --- indra/newview/llgroupmgr.h | 2 + indra/newview/llpanelgroupbulkban.cpp | 55 ++++++++++++++++++---- indra/newview/llpanelgroupbulkban.h | 2 + indra/newview/llpanelgroupbulkimpl.h | 1 + indra/newview/llpanelgrouproles.cpp | 33 ++++++++++++- indra/newview/llpanelgrouproles.h | 2 + .../skins/default/xui/en/panel_group_bulk_ban.xml | 38 +++++++++------ .../skins/default/xui/en/panel_group_roles.xml | 13 +++++ 8 files changed, 119 insertions(+), 27 deletions(-) diff --git a/indra/newview/llgroupmgr.h b/indra/newview/llgroupmgr.h index 970d6d5a2d..2e94e8d9a0 100755 --- a/indra/newview/llgroupmgr.h +++ b/indra/newview/llgroupmgr.h @@ -49,6 +49,8 @@ enum LLGroupChange GC_ALL }; +const U32 GB_MAX_BANNED_AGENTS = 500; + class LLGroupMgrObserver { public: diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index 3499b45949..cf1f0bc32f 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -102,6 +102,7 @@ BOOL LLPanelGroupBulkBan::postBuild() mImplementation->mTooManySelected = getString("ban_selection_too_large"); mImplementation->mBanNotPermitted = getString("ban_not_permitted"); + mImplementation->mBanLimitFail = getString("ban_limit_fail"); mImplementation->mCannotBanYourself = getString("cant_ban_yourself"); update(); @@ -122,13 +123,23 @@ void LLPanelGroupBulkBan::submit() { if (!gAgent.hasPowerInGroup(mImplementation->mGroupID, GP_GROUP_BAN_ACCESS)) { - // Fail! Agent no longer have ban rights. + // Fail! Agent no longer have ban rights. Permissions could have changed after button was pressed. LLSD msg; msg["MESSAGE"] = mImplementation->mBanNotPermitted; LLNotificationsUtil::add("GenericAlert", msg); (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); return; } + LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); + if (group_datap && group_datap->mBanList.size() >= GB_MAX_BANNED_AGENTS) + { + // Fail! Size limit exceeded. List could have updated after button was pressed. + LLSD msg; + msg["MESSAGE"] = mImplementation->mBanLimitFail; + LLNotificationsUtil::add("GenericAlert", msg); + (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); + return; + } std::vector banned_agent_list; std::vector agents = mImplementation->mBulkAgentList->getAllData(); std::vector::iterator iter = agents.begin(); @@ -138,8 +149,8 @@ void LLPanelGroupBulkBan::submit() banned_agent_list.push_back(agent->getUUID()); } - const S32 MAX_GROUP_BANS = 100; // Max invites per request. 100 to match server cap. - if (banned_agent_list.size() > MAX_GROUP_BANS) + const S32 MAX_BANS_PER_REQUEST = 100; // Max bans per request. 100 to match server cap. + if (banned_agent_list.size() > MAX_BANS_PER_REQUEST) { // Fail! LLSD msg; @@ -151,6 +162,7 @@ void LLPanelGroupBulkBan::submit() // remove already banned users and yourself from request. std::vector banned_avatar_names; + std::vector out_of_limit_names; bool banning_self = FALSE; std::vector::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); if (conflict != banned_agent_list.end()) @@ -158,7 +170,6 @@ void LLPanelGroupBulkBan::submit() banned_agent_list.erase(conflict); banning_self = TRUE; } - LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); if (group_datap) { BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList) @@ -178,8 +189,23 @@ void LLPanelGroupBulkBan::submit() } } } + // this check should always be the last one before we send the request. + // Otherwise we have a possibility of cutting more then we need to. + if (banned_agent_list.size() > GB_MAX_BANNED_AGENTS - group_datap->mBanList.size()) + { + std::vector::iterator exeedes_limit = banned_agent_list.begin() + GB_MAX_BANNED_AGENTS - group_datap->mBanList.size(); + for (std::vector::iterator itor = exeedes_limit ; + itor != banned_agent_list.end(); ++itor) + { + LLAvatarName av_name; + LLAvatarNameCache::get(*itor, &av_name); + out_of_limit_names.push_back(av_name); + } + banned_agent_list.erase(exeedes_limit,banned_agent_list.end()); + } } + // sending request and ejecting members if (banned_agent_list.size() != 0) { LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mImplementation->mGroupID, LLGroupMgr::BAN_CREATE | LLGroupMgr::BAN_UPDATE, banned_agent_list); @@ -187,16 +213,12 @@ void LLPanelGroupBulkBan::submit() } // building notification - if (banned_avatar_names.size() > 0 || banning_self) + if (banned_avatar_names.size() > 0 || banning_self || out_of_limit_names.size() > 0) { std::string reasons; if(banned_avatar_names.size() > 0) { - std::string names_string; - LLAvatarActions::buildResidentsString(banned_avatar_names, names_string); - LLStringUtil::format_map_t reason_args; - reason_args["[RESIDENTS]"] = names_string; - reasons = "\n " + getString("residents_already_banned", reason_args); + reasons = "\n " + buildResidentsArgument(banned_avatar_names, "residents_already_banned"); } if(banning_self) @@ -204,6 +226,11 @@ void LLPanelGroupBulkBan::submit() reasons += "\n " + mImplementation->mCannotBanYourself; } + if(out_of_limit_names.size() > 0) + { + reasons += "\n " + buildResidentsArgument(out_of_limit_names, "ban_limit_reached"); + } + LLStringUtil::format_map_t msg_args; msg_args["[REASONS]"] = reasons; LLSD msg; @@ -222,3 +249,11 @@ void LLPanelGroupBulkBan::submit() (*(mImplementation->mCloseCallback))(mImplementation->mCloseCallbackUserData); } +std::string LLPanelGroupBulkBan::buildResidentsArgument(std::vector avatar_names, const std::string &format) +{ + std::string names_string; + LLAvatarActions::buildResidentsString(avatar_names, names_string); + LLStringUtil::format_map_t args; + args["[RESIDENTS]"] = names_string; + return getString(format, args); +} diff --git a/indra/newview/llpanelgroupbulkban.h b/indra/newview/llpanelgroupbulkban.h index 0684f365a0..9060d275f9 100644 --- a/indra/newview/llpanelgroupbulkban.h +++ b/indra/newview/llpanelgroupbulkban.h @@ -42,6 +42,8 @@ public: static void callbackClickSubmit(void* userdata); virtual void submit(); +private: + std::string buildResidentsArgument(std::vector avatar_names, const std::string &format); }; #endif // LL_LLPANELGROUPBULKBAN_H diff --git a/indra/newview/llpanelgroupbulkimpl.h b/indra/newview/llpanelgroupbulkimpl.h index 585b48c68f..d3a48e5a9a 100644 --- a/indra/newview/llpanelgroupbulkimpl.h +++ b/indra/newview/llpanelgroupbulkimpl.h @@ -75,6 +75,7 @@ public: std::string mLoadingText; std::string mTooManySelected; std::string mBanNotPermitted; + std::string mBanLimitFail; std::string mCannotBanYourself; std::set mInviteeIDs; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b21e1747b3..68022ef343 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -2844,8 +2844,9 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) mCreateBanButton = parent->getChild("ban_create", recurse); mDeleteBanButton = parent->getChild("ban_delete", recurse); mRefreshBanListButton = parent->getChild("ban_refresh", recurse); + mBanCountText = parent->getChild("ban_count", recurse); - if(!mBanList || !mCreateBanButton || !mDeleteBanButton || !mRefreshBanListButton) + if(!mBanList || !mCreateBanButton || !mDeleteBanButton || !mRefreshBanListButton || !mBanCountText) return FALSE; mBanList->setCommitOnSelectionChange(TRUE); @@ -2860,6 +2861,8 @@ BOOL LLPanelGroupBanListSubTab::postBuildSubTab(LLView* root) mRefreshBanListButton->setClickedCallback(onRefreshBanList, this); mRefreshBanListButton->setEnabled(FALSE); + setBanCount(0); + mBanList->setOnNameListCompleteCallback(boost::bind(&LLPanelGroupBanListSubTab::onBanListCompleted, this, _1)); populateBanList(); @@ -2875,7 +2878,18 @@ void LLPanelGroupBanListSubTab::activate() mBanList->deselectAllItems(); mDeleteBanButton->setEnabled(FALSE); - mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)); + LLGroupMgrGroupData * group_datap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + if (group_datap) + { + mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) && + group_datap->mBanList.size() < GB_MAX_BANNED_AGENTS); + setBanCount(group_datap->mBanList.size()); + } + else + { + mCreateBanButton->setEnabled(FALSE); + setBanCount(0); + } // BAKER: Should I really request everytime activate() is called? // Perhaps I should only do it on a force refresh, or if an action on the list happens... @@ -2993,6 +3007,10 @@ void LLPanelGroupBanListSubTab::handleDeleteBanEntry() // the button anymore until we reselect another entry. mDeleteBanButton->setEnabled(FALSE); } + + // update ban-count related elements + mCreateBanButton->setEnabled(TRUE); + setBanCount(gdatap->mBanList.size()); LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, mGroupID, LLGroupMgr::BAN_DELETE, ban_ids); } @@ -3021,6 +3039,14 @@ void LLPanelGroupBanListSubTab::onBanListCompleted(bool isComplete) } } +void LLPanelGroupBanListSubTab::setBanCount(U32 ban_count) +{ + LLStringUtil::format_map_t args; + args["[COUNT]"] = llformat("%d", ban_count); + args["[LIMIT]"] = llformat("%d", GB_MAX_BANNED_AGENTS); + mBanCountText->setText(getString("ban_count_template", args)); +} + void LLPanelGroupBanListSubTab::populateBanList() { LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); @@ -3060,6 +3086,9 @@ void LLPanelGroupBanListSubTab::populateBanList() } mRefreshBanListButton->setEnabled(TRUE); + mCreateBanButton->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) && + gdatap->mBanList.size() < GB_MAX_BANNED_AGENTS); + setBanCount(gdatap->mBanList.size()); } void LLPanelGroupBanListSubTab::setGroupID(const LLUUID& id) diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 052f1d2071..b9697a1d3a 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -347,6 +347,7 @@ public: void onBanListCompleted(bool isComplete); protected: + void setBanCount(U32 ban_count); void populateBanList(); public: @@ -357,6 +358,7 @@ protected: LLButton* mCreateBanButton; LLButton* mDeleteBanButton; LLButton* mRefreshBanListButton; + LLTextBase* mBanCountText; }; diff --git a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml index 31989f2e16..509dcf354e 100644 --- a/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml +++ b/indra/newview/skins/default/xui/en/panel_group_bulk_ban.xml @@ -15,28 +15,36 @@ name="ban_selection_too_large"> Group bans not sent: too many Residents selected. Group bans are limited to 100 per request. - - Group ban not sent: you do not have 'Manage ban list' ability. - - + + Group ban not sent: your group have reached limit of allowed ban records. + + - Some group bans were not sent: + Some group bans were not sent: [REASONS] - - + - Group bans were not sent: + Group bans were not sent: [REASONS] - - + - - The following resident(s) are already banned: [RESIDENTS]. - - + + - Ban limit reached, following agents not banned: [RESIDENTS]. + + - - You cannot ban yourself from a group. - + - You cannot ban yourself from a group. + Any resident on the ban list will be unable to join the group. + + Ban count: [COUNT]/[LIMIT] + + + Date: Mon, 30 Jun 2014 19:54:28 -0500 Subject: MAINT-2980 Fix for AMD cards reporting system ram + vram for dedicated vram -- use WMI instead of DxDiag to get dedicated video memory. --- indra/llwindow/lldxhardware.cpp | 178 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 173 insertions(+), 5 deletions(-) diff --git a/indra/llwindow/lldxhardware.cpp b/indra/llwindow/lldxhardware.cpp index ba5bc8fcfb..e7afef63f8 100755 --- a/indra/llwindow/lldxhardware.cpp +++ b/indra/llwindow/lldxhardware.cpp @@ -34,9 +34,12 @@ #include #undef INITGUID +#include + #include #include "lldxhardware.h" + #include "llerror.h" #include "llstring.h" @@ -53,11 +56,160 @@ LLDXHardware gDXHardware; #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } } -std::string get_string(IDxDiagContainer *containerp, WCHAR *wszPropName) +typedef BOOL ( WINAPI* PfnCoSetProxyBlanket )( IUnknown* pProxy, DWORD dwAuthnSvc, DWORD dwAuthzSvc, + OLECHAR* pServerPrincName, DWORD dwAuthnLevel, DWORD dwImpLevel, + RPC_AUTH_IDENTITY_HANDLE pAuthInfo, DWORD dwCapabilities ); + +HRESULT GetVideoMemoryViaWMI( WCHAR* strInputDeviceID, DWORD* pdwAdapterRam ) { HRESULT hr; + bool bGotMemory = false; + HRESULT hrCoInitialize = S_OK; + IWbemLocator* pIWbemLocator = nullptr; + IWbemServices* pIWbemServices = nullptr; + BSTR pNamespace = nullptr; + + *pdwAdapterRam = 0; + hrCoInitialize = CoInitialize( 0 ); + + hr = CoCreateInstance( CLSID_WbemLocator, + nullptr, + CLSCTX_INPROC_SERVER, + IID_IWbemLocator, + ( LPVOID* )&pIWbemLocator ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) wprintf( L"WMI: CoCreateInstance failed: 0x%0.8x\n", hr ); +#endif + + if( SUCCEEDED( hr ) && pIWbemLocator ) + { + // Using the locator, connect to WMI in the given namespace. + pNamespace = SysAllocString( L"\\\\.\\root\\cimv2" ); + + hr = pIWbemLocator->ConnectServer( pNamespace, nullptr, nullptr, 0L, + 0L, nullptr, nullptr, &pIWbemServices ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) wprintf( L"WMI: pIWbemLocator->ConnectServer failed: 0x%0.8x\n", hr ); +#endif + if( SUCCEEDED( hr ) && pIWbemServices != 0 ) + { + HINSTANCE hinstOle32 = nullptr; + + hinstOle32 = LoadLibraryW( L"ole32.dll" ); + if( hinstOle32 ) + { + PfnCoSetProxyBlanket pfnCoSetProxyBlanket = nullptr; + + pfnCoSetProxyBlanket = ( PfnCoSetProxyBlanket )GetProcAddress( hinstOle32, "CoSetProxyBlanket" ); + if( pfnCoSetProxyBlanket != 0 ) + { + // Switch security level to IMPERSONATE. + pfnCoSetProxyBlanket( pIWbemServices, RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, nullptr, + RPC_C_AUTHN_LEVEL_CALL, RPC_C_IMP_LEVEL_IMPERSONATE, nullptr, 0 ); + } + + FreeLibrary( hinstOle32 ); + } + + IEnumWbemClassObject* pEnumVideoControllers = nullptr; + BSTR pClassName = nullptr; + + pClassName = SysAllocString( L"Win32_VideoController" ); + + hr = pIWbemServices->CreateInstanceEnum( pClassName, 0, + nullptr, &pEnumVideoControllers ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) wprintf( L"WMI: pIWbemServices->CreateInstanceEnum failed: 0x%0.8x\n", hr ); +#endif + + if( SUCCEEDED( hr ) && pEnumVideoControllers ) + { + IWbemClassObject* pVideoControllers[10] = {0}; + DWORD uReturned = 0; + BSTR pPropName = nullptr; + + // Get the first one in the list + pEnumVideoControllers->Reset(); + hr = pEnumVideoControllers->Next( 5000, // timeout in 5 seconds + 10, // return the first 10 + pVideoControllers, + &uReturned ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) wprintf( L"WMI: pEnumVideoControllers->Next failed: 0x%0.8x\n", hr ); + if( uReturned == 0 ) wprintf( L"WMI: pEnumVideoControllers uReturned == 0\n" ); +#endif + + VARIANT var; + if( SUCCEEDED( hr ) ) + { + bool bFound = false; + for( UINT iController = 0; iController < uReturned; iController++ ) + { + if ( !pVideoControllers[iController] ) + continue; + + pPropName = SysAllocString( L"PNPDeviceID" ); + hr = pVideoControllers[iController]->Get( pPropName, 0L, &var, nullptr, nullptr ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) + wprintf( L"WMI: pVideoControllers[iController]->Get PNPDeviceID failed: 0x%0.8x\n", hr ); +#endif + if( SUCCEEDED( hr ) ) + { + if( wcsstr( var.bstrVal, strInputDeviceID ) != 0 ) + bFound = true; + } + VariantClear( &var ); + if( pPropName ) SysFreeString( pPropName ); + + if( bFound ) + { + pPropName = SysAllocString( L"AdapterRAM" ); + hr = pVideoControllers[iController]->Get( pPropName, 0L, &var, nullptr, nullptr ); +#ifdef PRINTF_DEBUGGING + if( FAILED( hr ) ) + wprintf( L"WMI: pVideoControllers[iController]->Get AdapterRAM failed: 0x%0.8x\n", + hr ); +#endif + if( SUCCEEDED( hr ) ) + { + bGotMemory = true; + *pdwAdapterRam = var.ulVal; + } + VariantClear( &var ); + if( pPropName ) SysFreeString( pPropName ); + break; + } + SAFE_RELEASE( pVideoControllers[iController] ); + } + } + } + + if( pClassName ) + SysFreeString( pClassName ); + SAFE_RELEASE( pEnumVideoControllers ); + } + + if( pNamespace ) + SysFreeString( pNamespace ); + SAFE_RELEASE( pIWbemServices ); + } + + SAFE_RELEASE( pIWbemLocator ); + + if( SUCCEEDED( hrCoInitialize ) ) + CoUninitialize(); + + if( bGotMemory ) + return S_OK; + else + return E_FAIL; +} + +void get_wstring(IDxDiagContainer* containerp, WCHAR* wszPropName, WCHAR* wszPropValue, int outputSize) +{ + HRESULT hr; VARIANT var; - WCHAR wszPropValue[256]; VariantInit( &var ); hr = containerp->GetProp(wszPropName, &var ); @@ -76,13 +228,19 @@ std::string get_string(IDxDiagContainer *containerp, WCHAR *wszPropName) wcscpy( wszPropValue, (var.boolVal) ? L"true" : L"false" ); /* Flawfinder: ignore */ break; case VT_BSTR: - wcsncpy( wszPropValue, var.bstrVal, 255 ); /* Flawfinder: ignore */ - wszPropValue[255] = 0; + wcsncpy( wszPropValue, var.bstrVal, outputSize-1 ); /* Flawfinder: ignore */ + wszPropValue[outputSize-1] = 0; break; } } // Clear the variant (this is needed to free BSTR memory) VariantClear( &var ); +} + +std::string get_string(IDxDiagContainer *containerp, WCHAR *wszPropName) +{ + WCHAR wszPropValue[256]; + get_wstring(containerp, wszPropName, wszPropValue, 256); return utf16str_to_utf8str(wszPropValue); } @@ -361,8 +519,18 @@ BOOL LLDXHardware::getInfo(BOOL vram_only) goto LCleanup; } - // Get the English VRAM string + DWORD vram = 0; + + WCHAR deviceID[512]; + + get_wstring(device_containerp, L"szDeviceID", deviceID, 512); + + if (SUCCEEDED(GetVideoMemoryViaWMI(deviceID, &vram))) { + mVRAM = vram/(1024*1024); + } + else + { // Get the English VRAM string std::string ram_str = get_string(device_containerp, L"szDisplayMemoryEnglish"); // We don't need the device any more -- cgit v1.2.3 From b51f81e7fedb8e5a94ccc4a911a7b0f75b9290ae Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 30 Jun 2014 19:59:01 -0500 Subject: MAINT-2980 Fix for mac cutting texture memory in half (now that we're cutting texture memory to default to 1/3rd of installed ram, pre-cutting is redundant). --- indra/newview/featuretable_mac.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index a2d68eb550..628a96e988 100755 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -1,4 +1,4 @@ -version 36 +version 37 // The version number above should be implemented IF AND ONLY IF some // change has been made that is sufficiently important to justify // resetting the graphics preferences of all users to the recommended @@ -60,7 +60,7 @@ WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 -RenderTextureMemoryMultiple 1 0.5 +RenderTextureMemoryMultiple 1 1 RenderCompressTextures 1 1 RenderShaderLightingMaxLevel 1 3 RenderDeferred 1 1 @@ -522,7 +522,7 @@ list ATI_Mobility_Radeon_9600 Disregard96DefaultDrawDistance 1 0 list NVIDIA_GeForce_8600 -RenderTextureMemoryMultiple 1 0.375 +RenderTextureMemoryMultiple 1 1 RenderUseImpostors 0 0 UseOcclusion 0 0 -- cgit v1.2.3 From 70c2472e427c2d58edd857d298ea9f1fbe4bd41f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 2 Jul 2014 16:57:07 +0300 Subject: MAINT-4203 FIXED [Group Bans] Member list shows newly banned ex-residents --- indra/newview/llpanelgrouproles.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 68022ef343..47f2c94cd1 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1330,6 +1330,15 @@ void LLPanelGroupMembersSubTab::activate() update(GC_ALL); mActivated = true; } + else + { + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + // Members can be removed outside of this tab, checking changes + if (!gdatap || (gdatap->isMemberDataComplete() && gdatap->mMembers.size() != mMembersList->getItemCount())) + { + update(GC_MEMBER_DATA); + } + } } void LLPanelGroupMembersSubTab::deactivate() -- cgit v1.2.3 From 770a0a2dea0bd503f88b35d3d440208bcd303e54 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 7 Jul 2014 10:28:54 -0500 Subject: MAINT-2980 Back out most changes related to upping the 512MB texture cap to unblock RC. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llviewertexture.cpp | 2 +- indra/newview/llviewertexturelist.cpp | 35 +++++++++++++++------- .../default/xui/en/floater_hardware_settings.xml | 4 +-- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3c39c021ca..12db188620 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11873,7 +11873,7 @@ TextureMemory Comment - Amount of memory to use for textures in MB (0 = autodetect). Defaults to 1/3 of video memory to allow room for render targets, vertex buffers, 3D accelerated desktops, and over allocation. + Amount of memory to use for textures in MB (0 = autodetect) Persist 1 Type diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index e16caf167d..ba89aafc84 100755 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -64,7 +64,7 @@ // extern const S32Megabytes gMinVideoRam(32); -const S32Megabytes gMaxVideoRam(4096); +const S32Megabytes gMaxVideoRam(512); // statics diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 9f862b4f97..b98726900f 100755 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1275,37 +1275,52 @@ S32Megabytes LLViewerTextureList::getMaxVideoRamSetting(bool get_recommended, fl { S32Megabytes max_texmem; if (gGLManager.mVRAM != 0) - { //use detected amount of vram as maximum + { + // Treat any card with < 32 MB (shudder) as having 32 MB + // - it's going to be swapping constantly regardless S32Megabytes max_vram(gGLManager.mVRAM); - max_texmem = max_vram; - - if (get_recommended) - { //recommend 1/3rd of total video memory for textures - max_texmem /= 3; + if(gGLManager.mIsATI) + { + //shrink the availabe vram for ATI cards because some of them do not handel texture swapping well. + max_vram = max_vram * 0.75f; } + + max_vram = llmax(max_vram, getMinVideoRamSetting()); + max_texmem = max_vram; + if (!get_recommended) + max_texmem *= 2; } else { if (!get_recommended) { - max_texmem = (S32Megabytes) 2048; + max_texmem = (S32Megabytes)512; } else if (gSavedSettings.getBOOL("NoHardwareProbe")) //did not do hardware detection at startup { - max_texmem = (S32Megabytes) 2048; + max_texmem = (S32Megabytes)512; } else { - max_texmem = (S32Megabytes) 512; + max_texmem = (S32Megabytes)128; } LL_WARNS() << "VRAM amount not detected, defaulting to " << max_texmem << " MB" << LL_ENDL; } - // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise + S32Megabytes system_ram = gSysMemory.getPhysicalMemoryClamped(); // In MB + //LL_INFOS() << "*** DETECTED " << system_ram << " MB of system memory." << LL_ENDL; + if (get_recommended) + max_texmem = llmin(max_texmem, system_ram/2); + else + max_texmem = llmin(max_texmem, system_ram); + + // limit the texture memory to a multiple of the default if we've found some cards to behave poorly otherwise max_texmem = llmin(max_texmem, (S32Megabytes) (mem_multiplier * max_texmem)); + max_texmem = llclamp(max_texmem, getMinVideoRamSetting(), gMaxVideoRam); + return max_texmem; } diff --git a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml index 40d54233e8..9deb0d2030 100755 --- a/indra/newview/skins/default/xui/en/floater_hardware_settings.xml +++ b/indra/newview/skins/default/xui/en/floater_hardware_settings.xml @@ -155,9 +155,9 @@ tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality." width="315" /> Date: Mon, 7 Jul 2014 15:54:24 -0400 Subject: Added tag 3.7.11-release for changeset 64799eb29883 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 02e19f6f66..18da825621 100755 --- a/.hgtags +++ b/.hgtags @@ -483,3 +483,4 @@ d029faf69f20a23007f32420a1ac6a3b89a6d441 3.7.6-release bba9b3722eea08949e4ff69591f736bf0f808434 3.7.8-release a9f2d0cb11f73b06858e6083bb50083becc3f9cd 3.7.9-release 91dae9494b4d147541c7a01902334ba19a7ec05e 3.7.10-release +64799eb298834073a3e9992cd8d27c3cb9d30b10 3.7.11-release -- cgit v1.2.3 From 226929f8f5b8bc1080d0082b2595d689238df2b8 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 7 Jul 2014 15:54:24 -0400 Subject: increment viewer version to 3.7.12 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 584a914c29..f7e5aa84c2 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.11 +3.7.12 -- cgit v1.2.3 From bfb9fc85b9c8b59d5cddced665d8be2e6907b455 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 9 Jul 2014 14:26:16 -0400 Subject: MAINT-4216 FIX --- indra/newview/llappearancemgr.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 6797dab839..9451a30341 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -1341,15 +1341,15 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, LLNotificationsUtil::add("CannotWearTrash"); return false; } - else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), LLAppearanceMgr::instance().getCOF())) // EXT-84911 + else if (isLinkedInCOF(item_to_wear->getUUID())) // EXT-84911 { return false; } switch (item_to_wear->getType()) { - case LLAssetType::AT_CLOTHING: - if (gAgentWearables.areWearablesLoaded()) + case LLAssetType::AT_CLOTHING: + if (gAgentWearables.areWearablesLoaded()) { if (!cb && do_update) { @@ -1367,7 +1367,8 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, addCOFItemLink(item_to_wear, cb); } break; - case LLAssetType::AT_BODYPART: + + case LLAssetType::AT_BODYPART: // TODO: investigate wearables may not be loaded at this point EXT-8231 // Remove the existing wearables of the same type. @@ -1379,10 +1380,12 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, } addCOFItemLink(item_to_wear, cb); break; - case LLAssetType::AT_OBJECT: + + case LLAssetType::AT_OBJECT: rez_attachment(item_to_wear, NULL, replace); break; - default: return false;; + + default: return false;; } return true; -- cgit v1.2.3 From 2121ffcdabf97745f1fc4db6d5183b1d8cb57ce9 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Fri, 11 Jul 2014 16:46:18 -0700 Subject: Fixed assert in llmemory.h for adjacent memory locations. --- indra/llcommon/llmemory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index db52f2b1f4..7d1d541a4b 100755 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -257,7 +257,8 @@ inline void ll_memcpy_nonaliased_aligned_16(char* __restrict dst, const char* __ assert((bytes % sizeof(F32))== 0); ll_assert_aligned(src,16); ll_assert_aligned(dst,16); - assert((src < dst) ? ((src + bytes) < dst) : ((dst + bytes) < src)); + + assert((src < dst) ? ((src + bytes) <= dst) : ((dst + bytes) <= src)); assert(bytes%16==0); char* end = dst + bytes; -- cgit v1.2.3 From 3b5b6e35c4f1d5412349766deff7bf573ac1a301 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Sat, 12 Jul 2014 02:51:27 +0300 Subject: fixing merge conficts --- indra/newview/llnamelistctrl.cpp | 5 +++-- indra/newview/llnamelistctrl.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index c0bf763437..54e4c6c1da 100755 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -64,8 +64,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p) mNameColumnIndex(p.name_column.column_index), mNameColumn(p.name_column.column_name), mAllowCallingCardDrop(p.allow_calling_card_drop), - mShortNames(p.short_names) - mAvatarNameCacheConnection(), + mShortNames(p.short_names), mPendingLookupsRemaining(0) {} @@ -337,6 +336,8 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow( it->second.disconnect(); } mAvatarNameCacheConnections.erase(it); + } + mAvatarNameCacheConnections[id] = LLAvatarNameCache::get(id,boost::bind(&LLNameListCtrl::onAvatarNameCache,this, _1, _2, suffix, item->getHandle())); if(mPendingLookupsRemaining <= 0) { diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index ae74ca2cbc..2c40eeaaca 100755 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -168,6 +168,7 @@ private: BOOL mAllowCallingCardDrop; bool mShortNames; // display name only, no SLID typedef std::map avatar_name_cache_connection_map_t; + avatar_name_cache_connection_map_t mAvatarNameCacheConnections; S32 mPendingLookupsRemaining; namelist_complete_signal_t mNameListCompleteSignal; -- cgit v1.2.3 From b4df05d21af49ab7195b77d44fb0e53b070e79bd Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 14 Jul 2014 12:31:16 +0300 Subject: MAINT-4226 Group ban option is added to participant menu in Group chat. --- indra/newview/llconversationmodel.cpp | 9 +++ indra/newview/llconversationmodel.h | 2 + indra/newview/llfloaterimcontainer.cpp | 87 ++++++++++++++++++++++ indra/newview/llfloaterimcontainer.h | 4 + .../skins/default/xui/en/menu_conversation.xml | 8 ++ 5 files changed, 110 insertions(+) diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 74b77f760d..6e32ce60ec 100755 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -51,6 +51,7 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& u mConvType(CONV_UNKNOWN), mLastActiveTime(0.0), mDisplayModeratorOptions(false), + mDisplayGroupBanOptions(false), mAvatarNameCacheConnection() { } @@ -63,6 +64,7 @@ LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInte mConvType(CONV_UNKNOWN), mLastActiveTime(0.0), mDisplayModeratorOptions(false), + mDisplayGroupBanOptions(false), mAvatarNameCacheConnection() { } @@ -75,6 +77,7 @@ LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_mod mConvType(CONV_UNKNOWN), mLastActiveTime(0.0), mDisplayModeratorOptions(false), + mDisplayGroupBanOptions(false), mAvatarNameCacheConnection() { } @@ -159,6 +162,12 @@ void LLConversationItem::buildParticipantMenuOptions(menuentry_vec_t& items, U32 items.push_back(std::string("ModerateVoiceMute")); items.push_back(std::string("ModerateVoiceUnmute")); } + + if ((getType() != CONV_SESSION_1_ON_1) && mDisplayGroupBanOptions) + { + items.push_back(std::string("Group Ban Separator")); + items.push_back(std::string("BanMember")); + } } } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index dc74506c53..56e1a26709 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -143,6 +143,7 @@ protected: bool mNeedsRefresh; // Flag signaling to the view that something changed for this item F64 mLastActiveTime; bool mDisplayModeratorOptions; + bool mDisplayGroupBanOptions; boost::signals2::connection mAvatarNameCacheConnection; }; @@ -206,6 +207,7 @@ public: void dumpDebugData(); void setModeratorOptionsVisible(bool visible) { mDisplayModeratorOptions = visible; } void setDisplayModeratorRole(bool displayRole); + void setGroupBanVisible(bool visible) { mDisplayGroupBanOptions = visible; } private: void onAvatarNameCache(const LLAvatarName& av_name); // callback used by fetchAvatarName diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a0df37b309..8ebe268d81 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -532,6 +532,7 @@ void LLFloaterIMContainer::draw() { LLConversationItemParticipant* participant_model = dynamic_cast(*current_participant_model); participant_model->setModeratorOptionsVisible(isGroupModerator() && participant_model->getUUID() != gAgentID); + participant_model->setGroupBanVisible(haveAbilityToBan() && participant_model->getUUID() != gAgentID); current_participant_model++; } @@ -1150,6 +1151,10 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec { toggleAllowTextChat(userID); } + else if ("ban_member" == command) + { + banSelectedMember(userID); + } } else if (selectedIDS.size() > 1) { @@ -1407,6 +1412,10 @@ bool LLFloaterIMContainer::enableContextMenuItem(const std::string& item, uuid_v else if ("can_offer_teleport" == item) { return LLAvatarActions::canOfferTeleport(uuids); + } + else if ("can_ban_member" == item) + { + return canBanSelectedMember(single_id); } else if (("can_moderate_voice" == item) || ("can_allow_text_chat" == item) || ("can_mute" == item) || ("can_unmute" == item)) { @@ -1830,6 +1839,84 @@ bool LLFloaterIMContainer::isGroupModerator() return false; } +bool LLFloaterIMContainer::haveAbilityToBan() +{ + LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant(); + if (NULL == speaker_manager) + { + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; + return false; + } + LLUUID group_uuid = speaker_manager->getSessionID(); + + return gAgent.isInGroup(group_uuid) && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS); +} + +bool LLFloaterIMContainer::canBanSelectedMember(const LLUUID& participant_uuid) +{ + LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant(); + if (NULL == speaker_manager) + { + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; + return false; + } + LLUUID group_uuid = speaker_manager->getSessionID(); + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid); + if(!gdatap) + { + LL_WARNS("Groups") << "Unable to get group data for group " << group_uuid << LL_ENDL; + return false; + } + + LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); + LLGroupMemberData* member_data = (*mi).second; + // Is the member an owner? + if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) + { + return false; + } + if( gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) && + gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS) ) + { + return true; + } + + return false; +} + +void LLFloaterIMContainer::banSelectedMember(const LLUUID& participant_uuid) +{ + LLSpeakerMgr * speaker_manager = getSpeakerMgrForSelectedParticipant(); + if (NULL == speaker_manager) + { + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; + return; + } + + LLUUID group_uuid = speaker_manager->getSessionID(); + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid); + if(!gdatap) + { + LL_WARNS("Groups") << "Unable to get group data for group " << group_uuid << LL_ENDL; + return; + } + std::vector ids; + ids.push_back(participant_uuid); + + LLGroupBanData ban_data; + gdatap->createBanEntry(participant_uuid, ban_data); + LLGroupMgr::getInstance()->sendGroupBanRequest(LLGroupMgr::REQUEST_POST, group_uuid, LLGroupMgr::BAN_CREATE, ids); + LLGroupMgr::getInstance()->sendGroupMemberEjects(group_uuid, ids); + LLGroupMgr::getInstance()->sendGroupMembersRequest(group_uuid); + LLSD args; + std::string name; + gCacheName->getFullName(participant_uuid, name); + args["AVATAR_NAME"] = name; + args["GROUP_NAME"] = gdatap->mName; + LLNotifications::instance().add(LLNotification::Params("EjectAvatarFromGroup").substitutions(args)); + +} + void LLFloaterIMContainer::moderateVoice(const std::string& command, const LLUUID& userID) { if (!gAgent.getRegion()) return; diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index f6d973b9b3..5ea9fd399b 100755 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -167,12 +167,16 @@ private: LLSpeaker * getSpeakerOfSelectedParticipant(LLSpeakerMgr * speaker_managerp); LLSpeakerMgr * getSpeakerMgrForSelectedParticipant(); bool isGroupModerator(); + bool haveAbilityToBan(); + bool canBanSelectedMember(const LLUUID& participant_uuid); + LLUUID getGroupUIIDForSelectedParticipant(); bool isMuted(const LLUUID& avatar_id); void moderateVoice(const std::string& command, const LLUUID& userID); void moderateVoiceAllParticipants(bool unmute); void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); void toggleAllowTextChat(const LLUUID& participant_uuid); void toggleMute(const LLUUID& participant_id, U32 flags); + void banSelectedMember(const LLUUID& participant_uuid); void openNearbyChat(); bool isParticipantListExpanded(); diff --git a/indra/newview/skins/default/xui/en/menu_conversation.xml b/indra/newview/skins/default/xui/en/menu_conversation.xml index f5a493c064..ed362b36e5 100755 --- a/indra/newview/skins/default/xui/en/menu_conversation.xml +++ b/indra/newview/skins/default/xui/en/menu_conversation.xml @@ -214,4 +214,12 @@ + + + + + -- cgit v1.2.3 From 0f22bcdff029ba7c420ec04ce992251ab1d4be6f Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 16 Jul 2014 02:16:48 +0300 Subject: MAINT-4263 FIXED Viewer crashes after right click on group in Conversations. --- indra/newview/llfloaterimcontainer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 8ebe268d81..be8195b5ee 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1868,13 +1868,24 @@ bool LLFloaterIMContainer::canBanSelectedMember(const LLUUID& participant_uuid) return false; } + if (!gdatap->mMembers.size()) + { + return false; + } + LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find((participant_uuid)); + if (mi == gdatap->mMembers.end()) + { + return false; + } + LLGroupMemberData* member_data = (*mi).second; // Is the member an owner? if ( member_data && member_data->isInRole(gdatap->mOwnerRole) ) { return false; } + if( gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS) ) { -- cgit v1.2.3 From 9f5fc6efbd3f3e4418372425734372b5a9bb5d35 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 17 Jul 2014 20:30:35 +0300 Subject: MAINT-4241 FIXED [Group Bans] Ban member(s) button is not greyed out for banning group owners. Viewer gives message that you ejected group owner. --- indra/newview/llgroupmgr.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 98036f3a20..56e671d902 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -2154,6 +2154,22 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) online_status, is_owner); + LLGroupMemberData* member_old = group_datap->mMembers[member_id]; + if (member_old && group_datap->mRoleMemberDataComplete) + { + LLGroupMemberData::role_list_t::iterator rit = member_old->roleBegin(); + LLGroupMemberData::role_list_t::iterator end = member_old->roleEnd(); + + for ( ; rit != end; ++rit) + { + data->addRole((*rit).first,(*rit).second); + } + } + else + { + group_datap->mRoleMemberDataComplete = false; + } + group_datap->mMembers[member_id] = data; } @@ -2173,7 +2189,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content) group_datap->mMemberDataComplete = true; group_datap->mMemberRequestID.setNull(); // Make the role-member data request - if (group_datap->mPendingRoleMemberRequest) + if (group_datap->mPendingRoleMemberRequest || !group_datap->mRoleMemberDataComplete) { group_datap->mPendingRoleMemberRequest = false; LLGroupMgr::getInstance()->sendGroupRoleMembersRequest(group_id); -- cgit v1.2.3 From 530fe90d3d3c86259f5296b992525c531a47bf8d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 21 Jul 2014 14:35:27 -0400 Subject: Added tag 3.7.12-release for changeset 3b44ea8988cb --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 18da825621..9b426adee4 100755 --- a/.hgtags +++ b/.hgtags @@ -484,3 +484,4 @@ bba9b3722eea08949e4ff69591f736bf0f808434 3.7.8-release a9f2d0cb11f73b06858e6083bb50083becc3f9cd 3.7.9-release 91dae9494b4d147541c7a01902334ba19a7ec05e 3.7.10-release 64799eb298834073a3e9992cd8d27c3cb9d30b10 3.7.11-release +3b44ea8988cb902f0dda8429e8d5e4569e304532 3.7.12-release -- cgit v1.2.3 From 532433674c9553636af9ea8d433b9da6d6fae587 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 21 Jul 2014 14:35:27 -0400 Subject: increment viewer version to 3.7.13 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index f7e5aa84c2..214b521fe2 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.12 +3.7.13 -- cgit v1.2.3 From 3d4acb535d75c4cc78c93dee318bcffaca691237 Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Tue, 22 Jul 2014 17:24:00 -0700 Subject: Appears to fix MAINT-4184 --- indra/llmessage/lltransfermanager.cpp | 8 ++++++-- indra/newview/lltexturefetch.cpp | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index d6db20d7a3..ec7b21d8b6 100755 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -1260,9 +1260,13 @@ bool LLTransferTarget::addDelayedPacket( size); #ifdef _DEBUG - if (mDelayedPacketMap.find(packet_id) != mDelayedPacketMap.end()) + transfer_packet_map::iterator iter = mDelayedPacketMap.find(packet_id); + if (iter != mDelayedPacketMap.end()) { - LL_ERRS() << "Packet ALREADY in delayed packet map!" << LL_ENDL; + if (!(iter->second->mSize == size) && !(iter->second->mDatap == datap)) + { + LL_ERRS() << "Packet ALREADY in delayed packet map!" << LL_ENDL; + } } #endif diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 9ea46cab68..fcf0d88495 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2648,7 +2648,8 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const worker->setImagePriority(priority); worker->setDesiredDiscard(desired_discard, desired_size); worker->setCanUseHTTP(can_use_http); - worker->setUrl(url); + + //worker->setUrl(url); //MAINT-4184 this line seems to be the cause and url is always blank. if (!worker->haveWork()) { worker->setState(LLTextureFetchWorker::INIT); -- cgit v1.2.3 From 342833534f44cf702b9680c24e520904da8c8ecf Mon Sep 17 00:00:00 2001 From: Aura Linden Date: Wed, 23 Jul 2014 09:16:48 -0700 Subject: Improved comments --- indra/newview/lltexturefetch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index fcf0d88495..2376f6a259 100755 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2649,7 +2649,8 @@ bool LLTextureFetch::createRequest(FTType f_type, const std::string& url, const worker->setDesiredDiscard(desired_discard, desired_size); worker->setCanUseHTTP(can_use_http); - //worker->setUrl(url); //MAINT-4184 this line seems to be the cause and url is always blank. + //MAINT-4184 url is always empty. Do not set with it. + if (!worker->haveWork()) { worker->setState(LLTextureFetchWorker::INIT); -- cgit v1.2.3 From 66aeec75abf118d03797b3f2af24814cca9e6dce Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 4 Aug 2014 14:41:11 -0400 Subject: Added tag 3.7.13-release for changeset d86a7e1bc96d --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9b426adee4..4d2aec7673 100755 --- a/.hgtags +++ b/.hgtags @@ -485,3 +485,4 @@ a9f2d0cb11f73b06858e6083bb50083becc3f9cd 3.7.9-release 91dae9494b4d147541c7a01902334ba19a7ec05e 3.7.10-release 64799eb298834073a3e9992cd8d27c3cb9d30b10 3.7.11-release 3b44ea8988cb902f0dda8429e8d5e4569e304532 3.7.12-release +d86a7e1bc96d27b683f951d3701d5b7042158c68 3.7.13-release -- cgit v1.2.3 From 1346949e4d601e8c945fa30593ba1d405e9ed80d Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 4 Aug 2014 14:41:11 -0400 Subject: increment viewer version to 3.7.14 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 214b521fe2..35c6ac5179 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.7.13 +3.7.14 -- cgit v1.2.3