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 - - - - - - - - - - - - - - - - - + + + + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share/ta-p/2149711 Learn about posting to Flickr] + + + diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml new file mode 100644 index 0000000000..1fc4927ac2 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + [SIZE] KB + + + + + + Refreshing... + + + Comment (optional): + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index df04ddee86..ce09faeac0 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -148,13 +148,19 @@ Please try logging in again in a minute. You were sent to an invalid region. Testing viewer disconnect - - Connecting to Facebook... - Posting... - Disconnecting from Facebook... - Problem connecting to Facebook - Problem posting to Facebook - Problem disconnecting from Facebook + + Connecting to Facebook... + Posting... + Disconnecting from Facebook... + Problem connecting to Facebook + Problem posting to Facebook + Problem disconnecting from Facebook + Connecting to Flickr... + Posting... + Disconnecting from Flickr... + Problem connecting to Flickr + Problem posting to Flickr + Problem disconnecting from Flickr Person -- cgit v1.2.3 From 7c46eb17f24e30fe83469a297086aa93f100e5ed Mon Sep 17 00:00:00 2001 From: Cho Date: Mon, 4 Nov 2013 19:12:39 +0000 Subject: Changed SLShare menu text to match spec for ACME-1138 --- indra/newview/skins/default/xui/en/menu_viewer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 19fe706885..bbd6e94579 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -281,14 +281,14 @@ Date: Mon, 4 Nov 2013 22:52:53 +0000 Subject: Update libpng after fixing arch under which it was built. --- autobuild.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 80b94dae1b..dffc972193 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -66,9 +66,9 @@ archive hash - 54f1d3658ccb296a43110bf66c03288b + 1fc3f59c43a7c0a496a387f3ac863e77 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-sdl-update/rev/283292/arch/Linux/installer/SDL-1.2.14-linux-20131101.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-sdl-update/rev/283356/arch/Linux/installer/SDL-1.2.14-linux-20131104.tar.bz2 name linux @@ -1194,9 +1194,9 @@ archive hash - 2af1b87fb0bef24d719769b351b7b99f + 0ebd7e5bc41ecfda46374599ab968ce9 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283244/arch/Darwin/installer/libpng-1.6.6-darwin-20131101.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283342/arch/Darwin/installer/libpng-1.6.6-darwin-20131104.tar.bz2 name darwin @@ -1206,9 +1206,9 @@ archive hash - 9f8e9f2fa6fb0fff69c34158a4d441ee + db6395f1fe7eca0381c87221dea75dc8 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283244/arch/Linux/installer/libpng-1.6.6-linux-20131101.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283342/arch/Linux/installer/libpng-1.6.6-linux-20131104.tar.bz2 name linux @@ -1218,9 +1218,9 @@ archive hash - a550626c3f421d0d601fdf88ddd69b64 + 85ee721b97edd322e3cd8e3a504da5f7 url - http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283244/arch/CYGWIN/installer/libpng-1.6.6-windows-20131101.tar.bz2 + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-libpng-update/rev/283342/arch/CYGWIN/installer/libpng-1.6.6-windows-20131104.tar.bz2 name windows -- cgit v1.2.3 From cea9ffe89ce98f04e311aa989cce5955e77a15ff Mon Sep 17 00:00:00 2001 From: Cho Date: Mon, 4 Nov 2013 23:42:21 +0000 Subject: added Twitter floater for ACME-1146, ACME-1147, ACME-1148, ACME-1149, and ACME-1150 --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloatersnapshot.cpp | 8 +- indra/newview/llfloatertwitter.cpp | 669 +++++++++++++++++++++ indra/newview/llfloatertwitter.h | 122 ++++ indra/newview/llsnapshotlivepreview.cpp | 3 + indra/newview/lltwitterconnect.cpp | 3 +- indra/newview/llviewerfloaterreg.cpp | 2 + .../skins/default/xui/en/floater_twitter.xml | 89 +++ indra/newview/skins/default/xui/en/menu_viewer.xml | 11 +- .../skins/default/xui/en/panel_twitter_account.xml | 75 +++ .../skins/default/xui/en/panel_twitter_photo.xml | 152 +++++ indra/newview/skins/default/xui/en/strings.xml | 8 +- 12 files changed, 1137 insertions(+), 7 deletions(-) create mode 100644 indra/newview/llfloatertwitter.cpp create mode 100644 indra/newview/llfloatertwitter.h create mode 100644 indra/newview/skins/default/xui/en/floater_twitter.xml create mode 100644 indra/newview/skins/default/xui/en/panel_twitter_account.xml create mode 100644 indra/newview/skins/default/xui/en/panel_twitter_photo.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 226c739e48..746991a6f0 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -288,6 +288,7 @@ set(viewer_SOURCE_FILES llfloatertos.cpp llfloatertoybox.cpp llfloatertranslationsettings.cpp + llfloatertwitter.cpp llfloateruipreview.cpp llfloaterurlentry.cpp llfloatervoiceeffect.cpp @@ -879,6 +880,7 @@ set(viewer_HEADER_FILES llfloatertos.h llfloatertoybox.h llfloatertranslationsettings.h + llfloatertwitter.h llfloateruipreview.h llfloaterurlentry.h llfloatervoiceeffect.h diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index fa92ed094b..4701e128d3 100755 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -33,6 +33,7 @@ #include "llfloaterreg.h" #include "llfloatersocial.h" #include "llfloaterflickr.h" +#include "llfloatertwitter.h" #include "llcheckboxctrl.h" #include "llcombobox.h" #include "llpostcard.h" @@ -1265,10 +1266,11 @@ S32 LLFloaterSnapshot::notify(const LLSD& info) void LLFloaterSnapshot::update() { LLFloaterSnapshot* inst = LLFloaterReg::findTypedInstance("snapshot"); - LLFloaterSocial* floater_social = LLFloaterReg::findTypedInstance("social"); - LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance("flickr"); + LLFloaterSocial* floater_social = LLFloaterReg::findTypedInstance("social"); + LLFloaterFlickr* floater_flickr = LLFloaterReg::findTypedInstance("flickr"); + LLFloaterTwitter* floater_twitter = LLFloaterReg::findTypedInstance("twitter"); - if (!inst && !floater_social && !floater_flickr) + if (!inst && !floater_social && !floater_flickr && !floater_twitter) return; BOOL changed = FALSE; diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp new file mode 100644 index 0000000000..b45cf32945 --- /dev/null +++ b/indra/newview/llfloatertwitter.cpp @@ -0,0 +1,669 @@ +/** +* @file llfloatertwitter.cpp +* @brief Implementation of llfloatertwitter +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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 "llfloatertwitter.h" + +#include "llagent.h" +#include "llagentui.h" +#include "llcheckboxctrl.h" +#include "llcombobox.h" +#include "lltwitterconnect.h" +#include "llfloaterreg.h" +#include "lliconctrl.h" +#include "llresmgr.h" // LLLocale +#include "llsdserialize.h" +#include "llloadingindicator.h" +#include "llplugincookiestore.h" +#include "llslurl.h" +#include "lltrans.h" +#include "llsnapshotlivepreview.h" +#include "llviewerregion.h" +#include "llviewercontrol.h" +#include "llviewermedia.h" + +static LLRegisterPanelClassWrapper t_panel_photo("lltwitterphotopanel"); +static LLRegisterPanelClassWrapper t_panel_account("lltwitteraccountpanel"); + +const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare"; + +/////////////////////////// +//LLTwitterPhotoPanel/////// +/////////////////////////// + +LLTwitterPhotoPanel::LLTwitterPhotoPanel() : +mSnapshotPanel(NULL), +mResolutionComboBox(NULL), +mRefreshBtn(NULL), +mWorkingLabel(NULL), +mThumbnailPlaceholder(NULL), +mCaptionTextBox(NULL), +mLocationCheckbox(NULL), +mPostButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLTwitterPhotoPanel::onSend, this)); + mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLTwitterPhotoPanel::onClickNewSnapshot, this)); +} + +LLTwitterPhotoPanel::~LLTwitterPhotoPanel() +{ + if(mPreviewHandle.get()) + { + mPreviewHandle.get()->die(); + } +} + +BOOL LLTwitterPhotoPanel::postBuild() +{ + setVisibleCallback(boost::bind(&LLTwitterPhotoPanel::onVisibilityChange, this, _2)); + + mSnapshotPanel = getChild("snapshot_panel"); + mResolutionComboBox = getChild("resolution_combobox"); + mResolutionComboBox->setCommitCallback(boost::bind(&LLTwitterPhotoPanel::updateResolution, this, TRUE)); + mRefreshBtn = getChild("new_snapshot_btn"); + mWorkingLabel = getChild("working_lbl"); + mThumbnailPlaceholder = getChild("thumbnail_placeholder"); + mCaptionTextBox = getChild("photo_caption"); + mLocationCheckbox = getChild("add_location_cb"); + mPostButton = getChild("post_photo_btn"); + mCancelButton = getChild("cancel_photo_btn"); + + return LLPanel::postBuild(); +} + +void LLTwitterPhotoPanel::draw() +{ + LLSnapshotLivePreview * previewp = static_cast(mPreviewHandle.get()); + + // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts) + bool no_ongoing_connection = !(LLTwitterConnect::instance().isTransactionOngoing()); + mCancelButton->setEnabled(no_ongoing_connection); + mCaptionTextBox->setEnabled(no_ongoing_connection); + mResolutionComboBox->setEnabled(no_ongoing_connection); + mRefreshBtn->setEnabled(no_ongoing_connection); + mLocationCheckbox->setEnabled(no_ongoing_connection); + + // Display the preview if one is available + if (previewp && previewp->getThumbnailImage()) + { + const LLRect& thumbnail_rect = mThumbnailPlaceholder->getRect(); + const S32 thumbnail_w = previewp->getThumbnailWidth(); + const S32 thumbnail_h = previewp->getThumbnailHeight(); + + // calc preview offset within the preview rect + const S32 local_offset_x = (thumbnail_rect.getWidth() - thumbnail_w) / 2 ; + const S32 local_offset_y = (thumbnail_rect.getHeight() - thumbnail_h) / 2 ; + + // calc preview offset within the floater rect + // Hack : To get the full offset, we need to take into account each and every offset of each widgets up to the floater. + // This is almost as arbitrary as using a fixed offset so that's what we do here for the sake of simplicity. + // *TODO : Get the offset looking through the hierarchy of widgets, should be done in postBuild() so to avoid traversing the hierarchy each time. + S32 offset_x = thumbnail_rect.mLeft + local_offset_x - 1; + S32 offset_y = thumbnail_rect.mBottom + local_offset_y - 39; + + mSnapshotPanel->localPointToOtherView(offset_x, offset_y, &offset_x, &offset_y, getParentByType()); + + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Apply floater transparency to the texture unless the floater is focused. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + LLColor4 color = LLColor4::white; + gl_draw_scaled_image(offset_x, offset_y, + thumbnail_w, thumbnail_h, + previewp->getThumbnailImage(), color % alpha); + + previewp->drawPreviewRect(offset_x, offset_y) ; + } + + // Update the visibility of the working (computing preview) label + mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); + + // Enable Post if we have a preview to send and no on going connection being processed + mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate())); + + // Draw the rest of the panel on top of it + LLPanel::draw(); +} + +LLSnapshotLivePreview* LLTwitterPhotoPanel::getPreviewView() +{ + LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)mPreviewHandle.get(); + return previewp; +} + +void LLTwitterPhotoPanel::onVisibilityChange(const LLSD& new_visibility) +{ + bool visible = new_visibility.asBoolean(); + if (visible) + { + if (mPreviewHandle.get()) + { + LLSnapshotLivePreview* preview = getPreviewView(); + if(preview) + { + lldebugs << "opened, updating snapshot" << llendl; + preview->updateSnapshot(TRUE); + } + } + else + { + LLRect full_screen_rect = getRootView()->getRect(); + LLSnapshotLivePreview::Params p; + p.rect(full_screen_rect); + LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); + mPreviewHandle = previewp->getHandle(); + + previewp->setSnapshotType(previewp->SNAPSHOT_WEB); + previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); + //previewp->setSnapshotQuality(98); + previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); + + updateControls(); + } + } +} + +void LLTwitterPhotoPanel::onClickNewSnapshot() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + if (previewp) + { + //setStatus(Impl::STATUS_READY); + lldebugs << "updating snapshot" << llendl; + previewp->updateSnapshot(TRUE); + } +} + +void LLTwitterPhotoPanel::onSend() +{ + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel"); // just in case it is already listening + LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterPhotoPanel", boost::bind(&LLTwitterPhotoPanel::onTwitterConnectStateChange, this, _1)); + + // Connect to Twitter if necessary and then post + if (LLTwitterConnect::instance().isConnected()) + { + sendPhoto(); + } + else + { + LLTwitterConnect::instance().checkConnectionToTwitter(true); + } +} + +bool LLTwitterPhotoPanel::onTwitterConnectStateChange(const LLSD& data) +{ + switch (data.get("enum").asInteger()) + { + case LLTwitterConnect::TWITTER_CONNECTED: + sendPhoto(); + break; + + case LLTwitterConnect::TWITTER_POSTED: + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterPhotoPanel"); + clearAndClose(); + break; + } + + return false; +} + +void LLTwitterPhotoPanel::sendPhoto() +{ + // Get the caption + std::string caption = mCaptionTextBox->getValue().asString(); + + // Add the location if required + bool add_location = mLocationCheckbox->getValue().asBoolean(); + if (add_location) + { + // Get the SLURL for the location + LLSLURL slurl; + LLAgentUI::buildSLURL(slurl); + std::string slurl_string = slurl.getSLURLString(); + + // Add query parameters so Google Analytics can track incoming clicks! + slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + + // Add it to the caption (pretty crude, but we don't have a better option with photos) + if (caption.empty()) + caption = slurl_string; + else + caption = caption + " " + slurl_string; + } + + // Get the image + LLSnapshotLivePreview* previewp = getPreviewView(); + + // Post to Twitter + LLTwitterConnect::instance().uploadPhoto(previewp->getFormattedImage(), caption); + + updateControls(); +} + +void LLTwitterPhotoPanel::clearAndClose() +{ + mCaptionTextBox->setValue(""); + + LLFloater* floater = getParentByType(); + if (floater) + { + floater->closeFloater(); + } +} + +void LLTwitterPhotoPanel::updateControls() +{ + LLSnapshotLivePreview* previewp = getPreviewView(); + BOOL got_bytes = previewp && previewp->getDataSize() > 0; + BOOL got_snap = previewp && previewp->getSnapshotUpToDate(); + LLSnapshotLivePreview::ESnapshotType shot_type = (previewp ? previewp->getSnapshotType() : LLSnapshotLivePreview::SNAPSHOT_POSTCARD); + + // *TODO: Separate maximum size for Web images from postcards + lldebugs << "Is snapshot up-to-date? " << got_snap << llendl; + + LLLocale locale(LLLocale::USER_LOCALE); + std::string bytes_string; + if (got_snap) + { + LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + } + + //getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : getString("unknown")); <---uses localized string + getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : "unknown"); + getChild("file_size_label")->setColor( + shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD + && got_bytes + && previewp->getDataSize() > MAX_POSTCARD_DATASIZE ? LLUIColor(LLColor4::red) : LLUIColorTable::instance().getColor( "LabelTextColor" )); + + updateResolution(FALSE); +} + +void LLTwitterPhotoPanel::updateResolution(BOOL do_update) +{ + LLComboBox* combobox = static_cast(mResolutionComboBox); + + std::string sdstring = combobox->getSelectedValue(); + LLSD sdres; + std::stringstream sstream(sdstring); + LLSDSerialize::fromNotation(sdres, sstream, sdstring.size()); + + S32 width = sdres[0]; + S32 height = sdres[1]; + + LLSnapshotLivePreview * previewp = static_cast(mPreviewHandle.get()); + if (previewp && combobox->getCurrentIndex() >= 0) + { + S32 original_width = 0 , original_height = 0 ; + previewp->getSize(original_width, original_height) ; + + if (width == 0 || height == 0) + { + // take resolution from current window size + lldebugs << "Setting preview res from window: " << gViewerWindow->getWindowWidthRaw() << "x" << gViewerWindow->getWindowHeightRaw() << llendl; + previewp->setSize(gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw()); + } + else + { + // use the resolution from the selected pre-canned drop-down choice + lldebugs << "Setting preview res selected from combo: " << width << "x" << height << llendl; + previewp->setSize(width, height); + } + + checkAspectRatio(width); + + previewp->getSize(width, height); + + if(original_width != width || original_height != height) + { + previewp->setSize(width, height); + + // hide old preview as the aspect ratio could be wrong + lldebugs << "updating thumbnail" << llendl; + + previewp->updateSnapshot(FALSE, TRUE); + if(do_update) + { + lldebugs << "Will update controls" << llendl; + updateControls(); + LLTwitterPhotoPanel::onClickNewSnapshot(); + } + } + + } +} + +void LLTwitterPhotoPanel::checkAspectRatio(S32 index) +{ + LLSnapshotLivePreview *previewp = getPreviewView() ; + + BOOL keep_aspect = FALSE; + + if (0 == index) // current window size + { + keep_aspect = TRUE; + } + else // predefined resolution + { + keep_aspect = FALSE; + } + + if (previewp) + { + previewp->mKeepAspectRatio = keep_aspect; + } +} + +LLUICtrl* LLTwitterPhotoPanel::getRefreshBtn() +{ + return mRefreshBtn; +} + +/////////////////////////// +//LLTwitterAccountPanel////// +/////////////////////////// + +LLTwitterAccountPanel::LLTwitterAccountPanel() : +mAccountCaptionLabel(NULL), +mAccountNameLabel(NULL), +mPanelButtons(NULL), +mConnectButton(NULL), +mDisconnectButton(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Connect", boost::bind(&LLTwitterAccountPanel::onConnect, this)); + mCommitCallbackRegistrar.add("SocialSharing.Disconnect", boost::bind(&LLTwitterAccountPanel::onDisconnect, this)); + + setVisibleCallback(boost::bind(&LLTwitterAccountPanel::onVisibilityChange, this, _2)); +} + +BOOL LLTwitterAccountPanel::postBuild() +{ + mAccountCaptionLabel = getChild("account_caption_label"); + mAccountNameLabel = getChild("account_name_label"); + mPanelButtons = getChild("panel_buttons"); + mConnectButton = getChild("connect_btn"); + mDisconnectButton = getChild("disconnect_btn"); + + return LLPanel::postBuild(); +} + +void LLTwitterAccountPanel::draw() +{ + LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState(); + + //Disable the 'disconnect' button and the 'use another account' button when disconnecting in progress + bool disconnecting = connection_state == LLTwitterConnect::TWITTER_DISCONNECTING; + mDisconnectButton->setEnabled(!disconnecting); + + //Disable the 'connect' button when a connection is in progress + bool connecting = connection_state == LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS; + mConnectButton->setEnabled(!connecting); + + LLPanel::draw(); +} + +void LLTwitterAccountPanel::onVisibilityChange(const LLSD& new_visibility) +{ + bool visible = new_visibility.asBoolean(); + + if(visible) + { + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectState").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectStateChange, this, _1)); + + LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectInfo").listen("LLTwitterAccountPanel", boost::bind(&LLTwitterAccountPanel::onTwitterConnectInfoChange, this)); + + //Connected + if(LLTwitterConnect::instance().isConnected()) + { + showConnectedLayout(); + } + //Check if connected (show disconnected layout in meantime) + else + { + showDisconnectedLayout(); + } + if ((LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_NOT_CONNECTED) || + (LLTwitterConnect::instance().getConnectionState() == LLTwitterConnect::TWITTER_CONNECTION_FAILED)) + { + LLTwitterConnect::instance().checkConnectionToTwitter(); + } + } + else + { + LLEventPumps::instance().obtain("TwitterConnectState").stopListening("LLTwitterAccountPanel"); + LLEventPumps::instance().obtain("TwitterConnectInfo").stopListening("LLTwitterAccountPanel"); + } +} + +bool LLTwitterAccountPanel::onTwitterConnectStateChange(const LLSD& data) +{ + if(LLTwitterConnect::instance().isConnected()) + { + //In process of disconnecting so leave the layout as is + if(data.get("enum").asInteger() != LLTwitterConnect::TWITTER_DISCONNECTING) + { + showConnectedLayout(); + } + } + else + { + showDisconnectedLayout(); + } + + return false; +} + +bool LLTwitterAccountPanel::onTwitterConnectInfoChange() +{ + LLSD info = LLTwitterConnect::instance().getInfo(); + std::string clickable_name; + + //Strings of format [http://www.somewebsite.com Click Me] become clickable text + if(info.has("link") && info.has("name")) + { + clickable_name = "[" + info["link"].asString() + " " + info["name"].asString() + "]"; + } + + mAccountNameLabel->setText(clickable_name); + + return false; +} + +void LLTwitterAccountPanel::showConnectButton() +{ + if(!mConnectButton->getVisible()) + { + mConnectButton->setVisible(TRUE); + mDisconnectButton->setVisible(FALSE); + } +} + +void LLTwitterAccountPanel::hideConnectButton() +{ + if(mConnectButton->getVisible()) + { + mConnectButton->setVisible(FALSE); + mDisconnectButton->setVisible(TRUE); + } +} + +void LLTwitterAccountPanel::showDisconnectedLayout() +{ + mAccountCaptionLabel->setText(getString("twitter_disconnected")); + mAccountNameLabel->setText(std::string("")); + showConnectButton(); +} + +void LLTwitterAccountPanel::showConnectedLayout() +{ + LLTwitterConnect::instance().loadTwitterInfo(); + + mAccountCaptionLabel->setText(getString("twitter_connected")); + hideConnectButton(); +} + +void LLTwitterAccountPanel::onConnect() +{ + LLTwitterConnect::instance().checkConnectionToTwitter(true); + + //Clear only the twitter browser cookies so that the twitter login screen appears + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".twitter.com"); +} + +void LLTwitterAccountPanel::onDisconnect() +{ + LLTwitterConnect::instance().disconnectFromTwitter(); + + LLViewerMedia::getCookieStore()->removeCookiesByDomain(".twitter.com"); +} + +//////////////////////// +//LLFloaterTwitter/////// +//////////////////////// + +LLFloaterTwitter::LLFloaterTwitter(const LLSD& key) : LLFloater(key), + mSocialPhotoPanel(NULL), + mStatusErrorText(NULL), + mStatusLoadingText(NULL), + mStatusLoadingIndicator(NULL) +{ + mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterTwitter::onCancel, this)); +} + +void LLFloaterTwitter::onCancel() +{ + closeFloater(); +} + +BOOL LLFloaterTwitter::postBuild() +{ + // Keep tab of the Photo Panel + mSocialPhotoPanel = static_cast(getChild("panel_twitter_photo")); + // Connection status widgets + mStatusErrorText = getChild("connection_error_text"); + mStatusLoadingText = getChild("connection_loading_text"); + mStatusLoadingIndicator = getChild("connection_loading_indicator"); + return LLFloater::postBuild(); +} + +// static +void LLFloaterTwitter::preUpdate() +{ + LLFloaterTwitter* instance = LLFloaterReg::findTypedInstance("twitter"); + if (instance) + { + //Will set file size text to 'unknown' + instance->mSocialPhotoPanel->updateControls(); + } +} + +// static +void LLFloaterTwitter::postUpdate() +{ + LLFloaterTwitter* instance = LLFloaterReg::findTypedInstance("twitter"); + if (instance) + { + //Will set the file size text + instance->mSocialPhotoPanel->updateControls(); + + // The refresh button is initially hidden. We show it after the first update, + // i.e. after snapshot is taken + LLUICtrl * refresh_button = instance->mSocialPhotoPanel->getRefreshBtn(); + + if (!refresh_button->getVisible()) + { + refresh_button->setVisible(true); + } + + } +} + +void LLFloaterTwitter::draw() +{ + if (mStatusErrorText && mStatusLoadingText && mStatusLoadingIndicator) + { + mStatusErrorText->setVisible(false); + mStatusLoadingText->setVisible(false); + mStatusLoadingIndicator->setVisible(false); + LLTwitterConnect::EConnectionState connection_state = LLTwitterConnect::instance().getConnectionState(); + std::string status_text; + + switch (connection_state) + { + case LLTwitterConnect::TWITTER_NOT_CONNECTED: + // No status displayed when first opening the panel and no connection done + case LLTwitterConnect::TWITTER_CONNECTED: + // When successfully connected, no message is displayed + case LLTwitterConnect::TWITTER_POSTED: + // No success message to show since we actually close the floater after successful posting completion + break; + case LLTwitterConnect::TWITTER_CONNECTION_IN_PROGRESS: + // Connection loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterConnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_POSTING: + // Posting indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterPosting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_CONNECTION_FAILED: + // Error connecting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorConnecting"); + mStatusErrorText->setValue(status_text); + break; + case LLTwitterConnect::TWITTER_POST_FAILED: + // Error posting to the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorPosting"); + mStatusErrorText->setValue(status_text); + break; + case LLTwitterConnect::TWITTER_DISCONNECTING: + // Disconnecting loading indicator + mStatusLoadingText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterDisconnecting"); + mStatusLoadingText->setValue(status_text); + mStatusLoadingIndicator->setVisible(true); + break; + case LLTwitterConnect::TWITTER_DISCONNECT_FAILED: + // Error disconnecting from the service + mStatusErrorText->setVisible(true); + status_text = LLTrans::getString("SocialTwitterErrorDisconnecting"); + mStatusErrorText->setValue(status_text); + break; + } + } + LLFloater::draw(); +} + diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h new file mode 100644 index 0000000000..d0c7b57eef --- /dev/null +++ b/indra/newview/llfloatertwitter.h @@ -0,0 +1,122 @@ +/** +* @file llfloatertwitter.h +* @brief Header file for llfloatertwitter +* @author cho@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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_LLFLOATERTWITTER_H +#define LL_LLFLOATERTWITTER_H + +#include "llfloater.h" +#include "lltextbox.h" +#include "llviewertexture.h" + +class LLIconCtrl; +class LLCheckBoxCtrl; +class LLSnapshotLivePreview; + +class LLTwitterPhotoPanel : public LLPanel +{ +public: + LLTwitterPhotoPanel(); + ~LLTwitterPhotoPanel(); + + BOOL postBuild(); + void draw(); + + LLSnapshotLivePreview* getPreviewView(); + void onVisibilityChange(const LLSD& new_visibility); + void onClickNewSnapshot(); + void onSend(); + bool onTwitterConnectStateChange(const LLSD& data); + + void sendPhoto(); + void clearAndClose(); + + void updateControls(); + void updateResolution(BOOL do_update); + void checkAspectRatio(S32 index); + LLUICtrl* getRefreshBtn(); + +private: + LLHandle mPreviewHandle; + + LLUICtrl * mSnapshotPanel; + LLUICtrl * mResolutionComboBox; + LLUICtrl * mRefreshBtn; + LLUICtrl * mWorkingLabel; + LLUICtrl * mThumbnailPlaceholder; + LLUICtrl * mCaptionTextBox; + LLUICtrl * mLocationCheckbox; + LLUICtrl * mPostButton; + LLUICtrl* mCancelButton; +}; + +class LLTwitterAccountPanel : public LLPanel +{ +public: + LLTwitterAccountPanel(); + BOOL postBuild(); + void draw(); + +private: + void onVisibilityChange(const LLSD& new_visibility); + bool onTwitterConnectStateChange(const LLSD& data); + bool onTwitterConnectInfoChange(); + void onConnect(); + void onUseAnotherAccount(); + void onDisconnect(); + + void showConnectButton(); + void hideConnectButton(); + void showDisconnectedLayout(); + void showConnectedLayout(); + + LLTextBox * mAccountCaptionLabel; + LLTextBox * mAccountNameLabel; + LLUICtrl * mPanelButtons; + LLUICtrl * mConnectButton; + LLUICtrl * mDisconnectButton; +}; + + +class LLFloaterTwitter : public LLFloater +{ +public: + LLFloaterTwitter(const LLSD& key); + BOOL postBuild(); + void draw(); + void onCancel(); + + static void preUpdate(); + static void postUpdate(); + +private: + LLTwitterPhotoPanel* mSocialPhotoPanel; + LLTextBox* mStatusErrorText; + LLTextBox* mStatusLoadingText; + LLUICtrl* mStatusLoadingIndicator; +}; + +#endif // LL_LLFLOATERTWITTER_H + diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index afd9942e77..67952f83c7 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -36,6 +36,7 @@ #include "llfloaterreg.h" #include "llfloatersocial.h" #include "llfloaterflickr.h" +#include "llfloatertwitter.h" #include "llimagebmp.h" #include "llimagej2c.h" #include "llimagejpeg.h" @@ -211,6 +212,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail LLFloaterSnapshot::preUpdate(); LLFloaterSocial::preUpdate(); LLFloaterFlickr::preUpdate(); + LLFloaterTwitter::preUpdate(); } // Update thumbnail if requested. @@ -769,6 +771,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) LLFloaterSnapshot::postUpdate(); LLFloaterSocial::postUpdate(); LLFloaterFlickr::postUpdate(); + LLFloaterTwitter::postUpdate(); return TRUE; } diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index 80142e7073..5abd654d0c 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -296,7 +296,8 @@ std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, boo LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = regionp->getCapability("TwitterConnect"); + url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + //url = regionp->getCapability("TwitterConnect"); url += route; if (include_read_from_master && mReadFromMaster) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 0541da95fc..e74e6fef3d 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -116,6 +116,7 @@ #include "llfloatertopobjects.h" #include "llfloatertoybox.h" #include "llfloatertranslationsettings.h" +#include "llfloatertwitter.h" #include "llfloateruipreview.h" #include "llfloatervoiceeffect.h" #include "llfloatervoicevolume.h" @@ -307,6 +308,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("social", "floater_social.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("flickr", "floater_flickr.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("twitter", "floater_twitter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("start_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("stop_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_twitter.xml b/indra/newview/skins/default/xui/en/floater_twitter.xml new file mode 100644 index 0000000000..7007a14cdb --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_twitter.xml @@ -0,0 +1,89 @@ + + + + + + + + + + Error + + + + Loading... + + + + diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index bbd6e94579..79adb4e8bb 100755 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -282,14 +282,21 @@ + name="Facebook"> + + + + name="Flickr"> diff --git a/indra/newview/skins/default/xui/en/panel_twitter_account.xml b/indra/newview/skins/default/xui/en/panel_twitter_account.xml new file mode 100644 index 0000000000..4a413bd711 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_twitter_account.xml @@ -0,0 +1,75 @@ + + + + + Not connected to Twitter. + + + + + + + + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share/ta-p/2149711 Learn about posting to Twitter] + + + diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml new file mode 100644 index 0000000000..058c65402a --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + [SIZE] KB + + + + + + Refreshing... + + + Comment (optional): + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ce09faeac0..2b707ed84b 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -148,7 +148,7 @@ Please try logging in again in a minute. You were sent to an invalid region. Testing viewer disconnect - + Connecting to Facebook... Posting... Disconnecting from Facebook... @@ -161,6 +161,12 @@ Please try logging in again in a minute. Problem connecting to Flickr Problem posting to Flickr Problem disconnecting from Flickr + Connecting to Twitter... + Posting... + Disconnecting from Twitter... + Problem connecting to Twitter + Problem posting to Twitter + Problem disconnecting from Twitter Person -- cgit v1.2.3 From 181a7d22964b7cfbdd108493560ea60064a65f86 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 6 Nov 2013 01:38:49 +0000 Subject: fixed backwards-compatibility with FBC SLURL for ACME-1154 --- indra/newview/llfacebookconnect.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 99fcab3dc3..b0111f63fa 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -76,7 +76,7 @@ public: bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { - if (tokens.size() >= 2) + if (tokens.size() >= 1) { if (tokens[0].asString() == "connect") { @@ -87,16 +87,7 @@ public: fbc_web->closeFloater(); } - if (tokens[1].asString() == "facebook") - { - // connect to facebook - if (query_map.has("code")) - { - LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); - } - return true; - } - else if (tokens[1].asString() == "flickr") + if (tokens.size() >= 2 && tokens[1].asString() == "flickr") { // connect to flickr if (query_map.has("oauth_token")) @@ -105,7 +96,7 @@ public: } return true; } - else if (tokens[1].asString() == "twitter") + else if (tokens.size() >= 2 && tokens[1].asString() == "twitter") { // connect to twitter if (query_map.has("oauth_token")) @@ -114,6 +105,15 @@ public: } return true; } + else //if (tokens.size() >= 2 && tokens[1].asString() == "facebook") + { + // connect to facebook + if (query_map.has("code")) + { + LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); + } + return true; + } } } return false; -- cgit v1.2.3 From 1a1826a4f7110dc2b7859f6ce871ab0ac957525f Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 6 Nov 2013 02:06:53 +0000 Subject: separated web floaters for Facebook, Flickr, and Twitter to fix ACME-1151 --- indra/newview/llfacebookconnect.cpp | 28 +++++++++++++++++++++------- indra/newview/llflickrconnect.cpp | 6 +++--- indra/newview/llfloaterwebcontent.cpp | 11 ++++++++++- indra/newview/lltwitterconnect.cpp | 6 +++--- indra/newview/llviewerfloaterreg.cpp | 4 +++- 5 files changed, 40 insertions(+), 15 deletions(-) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index b0111f63fa..bf517fbc9e 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -80,15 +80,15 @@ public: { if (tokens[0].asString() == "connect") { - // this command probably came from the fbc_web browser, so close it - LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); - if (fbc_web) - { - fbc_web->closeFloater(); - } - if (tokens.size() >= 2 && tokens[1].asString() == "flickr") { + // this command probably came from the flickr_web browser, so close it + LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + if (flickr_web) + { + flickr_web->closeFloater(); + } + // connect to flickr if (query_map.has("oauth_token")) { @@ -98,6 +98,13 @@ public: } else if (tokens.size() >= 2 && tokens[1].asString() == "twitter") { + // this command probably came from the twitter_web browser, so close it + LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + if (twitter_web) + { + twitter_web->closeFloater(); + } + // connect to twitter if (query_map.has("oauth_token")) { @@ -107,6 +114,13 @@ public: } else //if (tokens.size() >= 2 && tokens[1].asString() == "facebook") { + // this command probably came from the fbc_web browser, so close it + LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); + if (fbc_web) + { + fbc_web->closeFloater(); + } + // connect to facebook if (query_map.has("code")) { diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 62c8110ea7..3da3ef22b2 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -280,11 +280,11 @@ void LLFlickrConnect::openFlickrWeb(std::string url) p.url(url).allow_address_entry(false); p.url(url).allow_back_forward_navigation(false); p.url(url).trusted_content(true); - LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p); + LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). - //So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event + //So when showing the internal web browser, set focus to it's containing floater "flickr_web". When a mouse event //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus. - //fbc_web floater contains the "webbrowser" panel. JIRA: ACME-744 + //flickr_web floater contains the "webbrowser" panel. JIRA: ACME-744 gFocusMgr.setKeyboardFocus( floater ); //LLUrlAction::openURLExternal(url); diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 4fa2d4cb20..814c91ef6c 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -299,16 +299,25 @@ void LLFloaterWebContent::onClose(bool app_quitting) { LLFacebookConnect::instance().setConnectionState(LLFacebookConnect::FB_CONNECTION_FAILED); } + } + // Same with Flickr + LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + if (flickr_web == this) + { if (!LLFlickrConnect::instance().isConnected()) { LLFlickrConnect::instance().setConnectionState(LLFlickrConnect::FLICKR_CONNECTION_FAILED); } + } + // And Twitter + LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + if (twitter_web == this) + { if (!LLTwitterConnect::instance().isConnected()) { LLTwitterConnect::instance().setConnectionState(LLTwitterConnect::TWITTER_CONNECTION_FAILED); } } - LLViewerMedia::proxyWindowClosed(mUUID); destroy(); } diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index 5abd654d0c..fe45d3e4d0 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -280,11 +280,11 @@ void LLTwitterConnect::openTwitterWeb(std::string url) p.url(url).allow_address_entry(false); p.url(url).allow_back_forward_navigation(false); p.url(url).trusted_content(true); - LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p); + LLFloater *floater = LLFloaterReg::showInstance("twitter_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). - //So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event + //So when showing the internal web browser, set focus to it's containing floater "twitter_web". When a mouse event //occurs on the "webbrowser" panel part of the floater, a mouse cursor will properly show and the "webbrowser" will gain focus. - //fbc_web floater contains the "webbrowser" panel. JIRA: ACME-744 + //twitter_web floater contains the "webbrowser" panel. JIRA: ACME-744 gFocusMgr.setKeyboardFocus( floater ); //LLUrlAction::openURLExternal(url); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e74e6fef3d..1e07aaf5ec 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -316,8 +316,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("search", "floater_search.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("my_profile", "floater_my_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); LLFloaterReg::add("profile", "floater_web_profile.xml", (LLFloaterBuildFunc)&LLFloaterWebProfile::create); - LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("how_to", "floater_how_to.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterReg::add("fbc_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("flickr_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); + LLFloaterReg::add("twitter_web", "floater_fbc_web.xml", (LLFloaterBuildFunc)&LLFloaterWebContent::create); LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); -- cgit v1.2.3 From 74707f0057c05dc4dd439302e64fe29e8ed91a32 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Wed, 6 Nov 2013 16:14:32 -0800 Subject: - Fixed an issue where the role action value was not equal to the constant in roles_constants.h --- indra/newview/skins/default/xui/en/role_actions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index 0c8a043ea7..490217d3f6 100755 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -5,7 +5,7 @@ name="Group Ban"> + name="allow ban" value="51" /> Date: Thu, 7 Nov 2013 00:23:24 +0000 Subject: STORM-1831 Increasing source text buffer to 256 KB (As discussed in Server/Scripting and Open Source User Groups). This change also addresses/closes: VWR-22401 --- indra/newview/skins/default/xui/en/panel_script_ed.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 bcdef96138..d1b35dce9d 100755 --- a/indra/newview/skins/default/xui/en/panel_script_ed.xml +++ b/indra/newview/skins/default/xui/en/panel_script_ed.xml @@ -157,7 +157,7 @@ height="376" ignore_tab="false" layout="topleft" - max_length="65536" + max_length="262144" name="Script Editor" text_readonly_color="DkGray" width="487" -- cgit v1.2.3 From 9ec7c9e8afaadbe91d888e588ebfcf7cba44dfdc Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 7 Nov 2013 00:24:51 +0000 Subject: STORM-1831 Adding "LSLSyntax" to list of capabilities the region keeps track of. --- indra/newview/llviewerregion.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 678f24fb3c..854f05f116 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1614,6 +1614,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); capabilityNames.append("LandResources"); + capabilityNames.append("LSLSyntax"); capabilityNames.append("MapLayer"); capabilityNames.append("MapLayerGod"); capabilityNames.append("MeshUploadFlag"); -- cgit v1.2.3 From be23aaefe53cd245752d3973bf930c87f67c6253 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 7 Nov 2013 01:30:36 +0000 Subject: added title, descriptions, tags, and safety level to panel_flickr_photo.xml for ACME-1142 --- indra/newview/llfloaterflickr.cpp | 40 ++++++--- indra/newview/llfloaterflickr.h | 5 +- .../skins/default/xui/en/floater_flickr.xml | 6 +- .../skins/default/xui/en/panel_flickr_account.xml | 2 +- .../skins/default/xui/en/panel_flickr_photo.xml | 98 ++++++++++++++++++++-- .../skins/default/xui/en/panel_twitter_photo.xml | 2 +- 6 files changed, 126 insertions(+), 27 deletions(-) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 290d174619..1edc61fcf6 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -63,8 +63,11 @@ mResolutionComboBox(NULL), mRefreshBtn(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), -mCaptionTextBox(NULL), +mTitleTextBox(NULL), +mDescriptionTextBox(NULL), mLocationCheckbox(NULL), +mTagsTextBox(NULL), +mRatingComboBox(NULL), mPostButton(NULL) { mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFlickrPhotoPanel::onSend, this)); @@ -89,8 +92,11 @@ BOOL LLFlickrPhotoPanel::postBuild() mRefreshBtn = getChild("new_snapshot_btn"); mWorkingLabel = getChild("working_lbl"); mThumbnailPlaceholder = getChild("thumbnail_placeholder"); - mCaptionTextBox = getChild("photo_caption"); + mTitleTextBox = getChild("photo_title"); + mDescriptionTextBox = getChild("photo_description"); mLocationCheckbox = getChild("add_location_cb"); + mTagsTextBox = getChild("photo_tags"); + mRatingComboBox = getChild("rating_combobox"); mPostButton = getChild("post_photo_btn"); mCancelButton = getChild("cancel_photo_btn"); @@ -104,7 +110,10 @@ void LLFlickrPhotoPanel::draw() // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts) bool no_ongoing_connection = !(LLFlickrConnect::instance().isTransactionOngoing()); mCancelButton->setEnabled(no_ongoing_connection); - mCaptionTextBox->setEnabled(no_ongoing_connection); + mTitleTextBox->setEnabled(no_ongoing_connection); + mDescriptionTextBox->setEnabled(no_ongoing_connection); + mTagsTextBox->setEnabled(no_ongoing_connection); + mRatingComboBox->setEnabled(no_ongoing_connection); mResolutionComboBox->setEnabled(no_ongoing_connection); mRefreshBtn->setEnabled(no_ongoing_connection); mLocationCheckbox->setEnabled(no_ongoing_connection); @@ -144,7 +153,7 @@ void LLFlickrPhotoPanel::draw() mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); // Enable Post if we have a preview to send and no on going connection being processed - mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate())); + mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate()) && (mRatingComboBox && mRatingComboBox->getValue().isDefined())); // Draw the rest of the panel on top of it LLPanel::draw(); @@ -234,8 +243,10 @@ bool LLFlickrPhotoPanel::onFlickrConnectStateChange(const LLSD& data) void LLFlickrPhotoPanel::sendPhoto() { - // Get the caption - std::string caption = mCaptionTextBox->getValue().asString(); + // Get the title, description, and tags + std::string title = mTitleTextBox->getValue().asString(); + std::string description = mDescriptionTextBox->getValue().asString(); + std::string tags = mTagsTextBox->getValue().asString(); // Add the location if required bool add_location = mLocationCheckbox->getValue().asBoolean(); @@ -249,25 +260,30 @@ void LLFlickrPhotoPanel::sendPhoto() // Add query parameters so Google Analytics can track incoming clicks! slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; - // Add it to the caption (pretty crude, but we don't have a better option with photos) - if (caption.empty()) - caption = slurl_string; + // Add it to the description (pretty crude, but we don't have a better option with photos) + if (description.empty()) + description = slurl_string; else - caption = caption + " " + slurl_string; + description = description + " " + slurl_string; } + // Get the content rating + int content_rating = mRatingComboBox->getValue().asInteger(); + // Get the image LLSnapshotLivePreview* previewp = getPreviewView(); // Post to Flickr - LLFlickrConnect::instance().uploadPhoto(previewp->getFormattedImage(), "", caption, "", 1); + LLFlickrConnect::instance().uploadPhoto(previewp->getFormattedImage(), title, description, tags, content_rating); updateControls(); } void LLFlickrPhotoPanel::clearAndClose() { - mCaptionTextBox->setValue(""); + mTitleTextBox->setValue(""); + mDescriptionTextBox->setValue(""); + mTagsTextBox->setValue(""); LLFloater* floater = getParentByType(); if (floater) diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h index d98a470d5c..8cf2cd2dd6 100644 --- a/indra/newview/llfloaterflickr.h +++ b/indra/newview/llfloaterflickr.h @@ -66,8 +66,11 @@ private: LLUICtrl * mRefreshBtn; LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; - LLUICtrl * mCaptionTextBox; + LLUICtrl * mTitleTextBox; + LLUICtrl * mDescriptionTextBox; LLUICtrl * mLocationCheckbox; + LLUICtrl * mTagsTextBox; + LLUICtrl * mRatingComboBox; LLUICtrl * mPostButton; LLUICtrl* mCancelButton; }; diff --git a/indra/newview/skins/default/xui/en/floater_flickr.xml b/indra/newview/skins/default/xui/en/floater_flickr.xml index 441e3ee73d..57014f8427 100644 --- a/indra/newview/skins/default/xui/en/floater_flickr.xml +++ b/indra/newview/skins/default/xui/en/floater_flickr.xml @@ -10,10 +10,10 @@ single_instance="true" reuse_instance="true" title="UPLOAD TO FLICKR" - height="482" + height="622" width="304"> diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml index 1fc4927ac2..d7d3fb6c1b 100644 --- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -1,19 +1,19 @@ + height="507"> - Comment (optional): + Title: + + + Description: + + + + Tags: + + +Separate tags with spaces +Use "" for multi-word tags + + + + + + + + Date: Thu, 7 Nov 2013 18:12:45 +0000 Subject: storm-1831 General cleanup of cruft created during caps experiments ;-) --- indra/newview/llsyntaxid.cpp | 191 ++++++++++++++++++++++++++----------------- indra/newview/llsyntaxid.h | 31 +++++-- 2 files changed, 142 insertions(+), 80 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 442793bff1..7d0c7e376a 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -31,53 +31,54 @@ #include "llhttpclient.h" #include "llagent.h" #include "llappviewer.h" -#include "llcurl.h" -#include "llenvmanager.h" #include "llsdserialize.h" #include "llsyntaxid.h" + //----------------------------------------------------------------------------- // fetchKeywordsFileResponder //----------------------------------------------------------------------------- -class fetchKeywordsFileResponder : public LLCurl::Responder +fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) { -public: - std::string mFileSpec; + mFileSpec = filespec; + LL_WARNS("") + << "Instantiating with file saving to: '" << filespec << "'" + << LL_ENDL; +} - fetchKeywordsFileResponder(std::string filespec) - { - mFileSpec = filespec; - } - void errorWithContent(U32 status, +void fetchKeywordsFileResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) - { - LL_WARNS("") - << "fetchKeywordsFileResponder error [status:" - << status - << "]: " - << content - << LL_ENDL; - } +{ + LL_WARNS("") + << "fetchKeywordsFileResponder error [status:" + << status + << "]: " + << content + << LL_ENDL; +} - void result(const LLSD& content_ref) - { - //LLSyntaxIdLSL::setKeywordsXml(content_ref); +void fetchKeywordsFileResponder::result(const LLSD& content_ref) +{ + LLSyntaxIdLSL::setKeywordsXml(content_ref); - std::stringstream str; - LLSDSerialize::toPrettyXML(content_ref, str); - LL_WARNS("") - << "fetchKeywordsFileResponder result:" << str.str() - << "filename: '" << mFileSpec << "'" - << LL_ENDL; + std::stringstream str; + LLSDSerialize::toPrettyXML(content_ref, str); + const std::string xml = str.str(); - // TODO save the damn str to disc - //llofstream file(mFileSpec, std::ios_base::out); - //file.write(str.str(), str.str().size()); - //file.close(); - } -}; + // save the str to disc + llofstream file(mFileSpec, std::ios_base::out); + file.write(xml.c_str(), str.str().size()); + file.close(); + + LL_WARNS("") + << "Syntax file received, saving as: '" << mFileSpec << "'" + << LL_ENDL; +} + + +LLSD LLSyntaxIdLSL::sKeywordsXml; //----------------------------------------------------------------------------- // LLSyntaxIdLSL @@ -90,16 +91,34 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() : mFileNameDefault("keywords_lsl_default.xml"), mSimulatorFeature("LSLSyntaxId"), mCapabilityName("LSLSyntax"), + mCapabilityURL(""), mFilePath(LL_PATH_APP_SETTINGS) { - mCurrentSyntaxId = LLUUID(); + mSyntaxIdCurrent = LLUUID(); mFileNameCurrent = mFileNameDefault; } -std::string LLSyntaxIdLSL::buildFileName(LLUUID& SyntaxId) +std::string LLSyntaxIdLSL::buildFileNameNew() { - std::string filename = "keywords_lsl_" + SyntaxId.asString() + "_" + gLastVersionChannel + ".llsd.xml"; - return filename; + std::string filename = "keywords_lsl_"; + if (!mSyntaxIdNew.isNull()) + { + filename += gLastVersionChannel + "_" + mSyntaxIdNew.asString(); + } + else + { + filename += mFileNameDefault; + } + mFileNameNew = filename + ".llsd.xml"; + return mFileNameNew; +} + +std::string LLSyntaxIdLSL::buildFullFileSpec() +{ + ELLPath path = mSyntaxIdNew.isNull() ? LL_PATH_APP_SETTINGS : LL_PATH_CACHE; + buildFileNameNew(); + mFullFileSpec = gDirUtilp->getExpandedFilename(path, mFileNameNew); + return mFullFileSpec; } //----------------------------------------------------------------------------- @@ -112,15 +131,9 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() if (region) { - /* - LL_WARNS("LSLSyntax") - << "REGION is '" << region->getName() << "'" - << LL_ENDL; - */ - if (!region->capabilitiesReceived()) { // Shouldn't be possible, but experience shows that it's needed -// region->setCapabilitiesReceivedCallback(boost::bind(&LLSyntaxIdLSL::checkSyntaxIdChange, this)); + //region->setCapabilitiesReceivedCallback(boost::bind(&LLSyntaxIdLSL::checkSyntaxIdChange, this)); LL_WARNS("LSLSyntax") << "region '" << region->getName() << "' has not received capabilities yet! Setting a callback for when they arrive." @@ -133,18 +146,18 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() region->getSimulatorFeatures(simFeatures); if (simFeatures.has("LSLSyntaxId")) { - LLUUID SyntaxId = simFeatures["LSLSyntaxId"].asUUID(); - if (mCurrentSyntaxId != SyntaxId) + mSyntaxIdNew = simFeatures["LSLSyntaxId"].asUUID(); + mCapabilityURL = region->getCapability(mCapabilityName); + if (mSyntaxIdCurrent != mSyntaxIdNew) { // set the properties for the fetcher to use - mFileNameCurrent = buildFileName(SyntaxId); - mFilePath = LL_PATH_CACHE; - mCurrentSyntaxId = SyntaxId; + //mFileNameNew = buildFileNameNew(mSyntaxIdNew); + //mFilePath = LL_PATH_CACHE; LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() << "' it has LSLSyntaxId capability, and the new hash is '" - << SyntaxId << "'" + << mSyntaxIdNew << "'" << LL_ENDL; changed = true; @@ -154,14 +167,14 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() << "' it has the same LSLSyntaxId! Leaving hash as '" - << mCurrentSyntaxId << "'" + << mSyntaxIdCurrent << "'" << LL_ENDL; } } else { // Set the hash to NULL_KEY to indicate use of default keywords file - if ( mCurrentSyntaxId.isNull() ) + if ( mSyntaxIdCurrent.isNull() ) { LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() @@ -170,9 +183,9 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() } else { - mCurrentSyntaxId = LLUUID(); - mFileNameCurrent = mFileNameDefault; - mFilePath = LL_PATH_APP_SETTINGS; + mSyntaxIdNew = LLUUID(); + //mFileNameNew = mFileNameDefault; + //mFilePath = LL_PATH_APP_SETTINGS; LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() @@ -190,18 +203,27 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() //----------------------------------------------------------------------------- // fetchKeywordsFile //----------------------------------------------------------------------------- -bool LLSyntaxIdLSL::fetchKeywordsFile() +void LLSyntaxIdLSL::fetchKeywordsFile() { - LLViewerRegion* region = gAgent.getRegion(); - bool fetched = false; - - std::string cap_url = region->getCapability(mCapabilityName); - if ( !cap_url.empty() ) + if ( !mCapabilityURL.empty() ) { - LLHTTPClient::get(cap_url, new fetchKeywordsFileResponder(mFullFileSpec)); + //buildFullFileSpec(); + LLHTTPClient::get(mCapabilityURL, + new fetchKeywordsFileResponder(mFullFileSpec), + LLSD(), 30.f + ); + LL_WARNS("LSLSyntax") + << "LSLSyntaxId capability URL is: " << mCapabilityURL + << ". Filename to use is: '" << mFullFileSpec << "'." + << LL_ENDL; + } + else + { + LL_WARNS("LSLSyntax") + << "LSLSyntaxId capability URL is empty using capability: '" + << mCapabilityName << "'" + << LL_ENDL; } - - return fetched; } void LLSyntaxIdLSL::initialise() @@ -212,24 +234,42 @@ void LLSyntaxIdLSL::initialise() << "Change to syntax, setting up new file." << LL_ENDL; - setFileNameNew(gDirUtilp->getExpandedFilename( - mFilePath, - mFileNameCurrent - )); - if ( !mCurrentSyntaxId.isNull() ) + // Need a full spec built regardless of file source + buildFullFileSpec(); + if ( !mSyntaxIdNew.isNull() ) { - bool success = false; + LL_WARNS("LSLSyntax") + << "ID is not null so must be processed!" + << LL_ENDL; + if ( !gDirUtilp->fileExists(mFullFileSpec) ) { // Does not exist, so fetch it from the capability - success = fetchKeywordsFile(); + fetchKeywordsFile(); + LL_WARNS("LSLSyntax") + << "Filename is not cached, we will try to download it!" + << LL_ENDL; + } + else + { + LL_WARNS("LSLSyntax") + << "Filename is cached, no need to download!" + << LL_ENDL; + openKeywordsFile(); } } + else + { // Need to open the default + LL_WARNS("LSLSyntax") + << "ID is null so SyntaxID does not need to be processed!" + << LL_ENDL; + openKeywordsFile(); + } // TODO add a signal here to tell the editor the hash has changed? } else { LL_WARNS("LSLSyntax") - << "Apparently there is no change to Syntax!" + << "No change to Syntax! Nothing to see here. Move along now!" << LL_ENDL; } @@ -239,7 +279,10 @@ void LLSyntaxIdLSL::initialise() //----------------------------------------------------------------------------- // openKeywordsFile //----------------------------------------------------------------------------- -void openKeywordsFile() +void LLSyntaxIdLSL::openKeywordsFile() { - ; + LL_WARNS("LSLSyntax") + << "Trying to open default or cached keyword file ;-)" + << LL_ENDL; + // TODO Open the file and load LLSD into sKeywordsXml } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index f7e3d6896e..d9f2572863 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -12,6 +12,21 @@ #include "llviewerregion.h" +class fetchKeywordsFileResponder : public LLHTTPClient::Responder +{ +public: + std::string mFileSpec; + + fetchKeywordsFileResponder(std::string filespec); + + void errorWithContent(U32 status, + const std::string& reason, + const LLSD& content); + + void result(const LLSD& content_ref); +}; + + /** * @file llsyntaxid.h * @brief The LLSyntaxIdLSL class @@ -24,7 +39,7 @@ public: bool checkSyntaxIdChanged(); std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } - LLUUID getSyntaxId() const { return mCurrentSyntaxId; } + LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } void initialise(); @@ -32,13 +47,14 @@ public: protected: - std::string buildFileName(LLUUID& SyntaxId); - bool fetchKeywordsFile(); + std::string buildFileNameNew(); + std::string buildFullFileSpec(); + void fetchKeywordsFile(); void openKeywordsFile(); - void setSyntaxId(LLUUID SyntaxId) { mCurrentSyntaxId = SyntaxId; } + 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 setFileNameNew(std::string name) { mFileNameNew = name; } void setSimulatorFeatureName(const std::string& name) { mSimulatorFeature = name; } @@ -51,13 +67,16 @@ protected: private: std::string mCapabilityName; - LLUUID mCurrentSyntaxId; + std::string mCapabilityURL; std::string mFileNameCurrent; std::string mFileNameDefault; std::string mFileNameNew; ELLPath mFilePath; std::string mFullFileSpec; std::string mSimulatorFeature; + LLUUID mSyntaxIdCurrent; + LLUUID mSyntaxIdNew; static LLSD sKeywordsXml; + }; -- cgit v1.2.3 From c8b8c29371a0eb4d53537030d0b007afcc500b3d Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 7 Nov 2013 18:31:05 +0000 Subject: Fixing LL_WARNS without labels and removing some crufty comments missed before --- indra/newview/llsyntaxid.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 7d0c7e376a..0249607834 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -41,7 +41,7 @@ fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) { mFileSpec = filespec; - LL_WARNS("") + LL_WARNS("LSLSyntax") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; } @@ -51,7 +51,7 @@ void fetchKeywordsFileResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - LL_WARNS("") + LL_WARNS("LSLSyntax") << "fetchKeywordsFileResponder error [status:" << status << "]: " @@ -72,7 +72,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) file.write(xml.c_str(), str.str().size()); file.close(); - LL_WARNS("") + LL_WARNS("LSLSyntax") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; } @@ -150,10 +150,6 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() mCapabilityURL = region->getCapability(mCapabilityName); if (mSyntaxIdCurrent != mSyntaxIdNew) { - // set the properties for the fetcher to use - //mFileNameNew = buildFileNameNew(mSyntaxIdNew); - //mFilePath = LL_PATH_CACHE; - LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() << "' it has LSLSyntaxId capability, and the new hash is '" @@ -184,8 +180,6 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() else { mSyntaxIdNew = LLUUID(); - //mFileNameNew = mFileNameDefault; - //mFilePath = LL_PATH_APP_SETTINGS; LL_WARNS("LSLSyntax") << "Region changed to '" << region->getName() -- cgit v1.2.3 From 389ddfd5add78998aaadb171593b5b036d2dbee0 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 7 Nov 2013 19:06:39 +0000 Subject: updated panel_twitter_photo.xml to match design spec for ACME-1153 --- indra/newview/llfloatertwitter.cpp | 61 ++++++++----------- indra/newview/llfloatertwitter.h | 4 +- .../skins/default/xui/en/panel_twitter_photo.xml | 70 ++++++++++++---------- 3 files changed, 65 insertions(+), 70 deletions(-) diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index b45cf32945..5a2402cdd6 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -63,8 +63,8 @@ mResolutionComboBox(NULL), mRefreshBtn(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), -mCaptionTextBox(NULL), -mLocationCheckbox(NULL), +mStatusTextBox(NULL), +mPhotoCheckbox(NULL), mPostButton(NULL) { mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLTwitterPhotoPanel::onSend, this)); @@ -89,8 +89,8 @@ BOOL LLTwitterPhotoPanel::postBuild() mRefreshBtn = getChild("new_snapshot_btn"); mWorkingLabel = getChild("working_lbl"); mThumbnailPlaceholder = getChild("thumbnail_placeholder"); - mCaptionTextBox = getChild("photo_caption"); - mLocationCheckbox = getChild("add_location_cb"); + mStatusTextBox = getChild("photo_status"); + mPhotoCheckbox = getChild("add_photo_cb"); mPostButton = getChild("post_photo_btn"); mCancelButton = getChild("cancel_photo_btn"); @@ -104,11 +104,11 @@ void LLTwitterPhotoPanel::draw() // Enable interaction only if no transaction with the service is on-going (prevent duplicated posts) bool no_ongoing_connection = !(LLTwitterConnect::instance().isTransactionOngoing()); mCancelButton->setEnabled(no_ongoing_connection); - mCaptionTextBox->setEnabled(no_ongoing_connection); - mResolutionComboBox->setEnabled(no_ongoing_connection); - mRefreshBtn->setEnabled(no_ongoing_connection); - mLocationCheckbox->setEnabled(no_ongoing_connection); - + mStatusTextBox->setEnabled(no_ongoing_connection); + mResolutionComboBox->setEnabled(no_ongoing_connection && mPhotoCheckbox->getValue().asBoolean()); + mRefreshBtn->setEnabled(no_ongoing_connection && mPhotoCheckbox->getValue().asBoolean()); + mPhotoCheckbox->setEnabled(no_ongoing_connection); + // Display the preview if one is available if (previewp && previewp->getThumbnailImage()) { @@ -131,7 +131,7 @@ void LLTwitterPhotoPanel::draw() gGL.matrixMode(LLRender::MM_MODELVIEW); // Apply floater transparency to the texture unless the floater is focused. - F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + F32 alpha = (mPhotoCheckbox->getValue().asBoolean() ? (getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency()) : 0.5f); LLColor4 color = LLColor4::white; gl_draw_scaled_image(offset_x, offset_y, thumbnail_w, thumbnail_h, @@ -234,40 +234,31 @@ bool LLTwitterPhotoPanel::onTwitterConnectStateChange(const LLSD& data) void LLTwitterPhotoPanel::sendPhoto() { - // Get the caption - std::string caption = mCaptionTextBox->getValue().asString(); + // Get the status text + std::string status = mStatusTextBox->getValue().asString(); - // Add the location if required - bool add_location = mLocationCheckbox->getValue().asBoolean(); - if (add_location) + // Add the photo if required + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + if (add_photo) { - // Get the SLURL for the location - LLSLURL slurl; - LLAgentUI::buildSLURL(slurl); - std::string slurl_string = slurl.getSLURLString(); - - // Add query parameters so Google Analytics can track incoming clicks! - slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; - - // Add it to the caption (pretty crude, but we don't have a better option with photos) - if (caption.empty()) - caption = slurl_string; - else - caption = caption + " " + slurl_string; - } - - // Get the image - LLSnapshotLivePreview* previewp = getPreviewView(); + // Get the image + LLSnapshotLivePreview* previewp = getPreviewView(); - // Post to Twitter - LLTwitterConnect::instance().uploadPhoto(previewp->getFormattedImage(), caption); + // Post to Twitter + LLTwitterConnect::instance().uploadPhoto(previewp->getFormattedImage(), status); + } + else + { + // Just post the status to Twitter + LLTwitterConnect::instance().updateStatus(status); + } updateControls(); } void LLTwitterPhotoPanel::clearAndClose() { - mCaptionTextBox->setValue(""); + mStatusTextBox->setValue(""); LLFloater* floater = getParentByType(); if (floater) diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h index d0c7b57eef..090e01872a 100644 --- a/indra/newview/llfloatertwitter.h +++ b/indra/newview/llfloatertwitter.h @@ -66,8 +66,8 @@ private: LLUICtrl * mRefreshBtn; LLUICtrl * mWorkingLabel; LLUICtrl * mThumbnailPlaceholder; - LLUICtrl * mCaptionTextBox; - LLUICtrl * mLocationCheckbox; + LLUICtrl * mStatusTextBox; + LLUICtrl * mPhotoCheckbox; LLUICtrl * mPostButton; LLUICtrl* mCancelButton; }; diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml index 540bc0f807..84206c608b 100644 --- a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -11,9 +11,43 @@ orientation="vertical" name="stack_photo" top="8"> - + + + What's happening? + + + + + + Refreshing... - - Comment (optional): - - - - Date: Thu, 7 Nov 2013 16:27:38 -0500 Subject: STORM-68 Add initial support to use a capability for setting default object permissions on the server. --- indra/newview/llfloaterperms.cpp | 45 ++++++++++++++++++++-- indra/newview/llfloaterperms.h | 1 + indra/newview/llviewerregion.cpp | 4 ++ .../newview/skins/default/xui/en/notifications.xml | 11 ++++++ 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 4e9acfc780..c167c03c30 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -32,7 +32,9 @@ #include "llviewerwindow.h" #include "lluictrlfactory.h" #include "llpermissions.h" - +#include "llagent.h" +#include "llviewerregion.h" +#include "llnotificationsutil.h" LLFloaterPerms::LLFloaterPerms(const LLSD& seed) : LLFloater(seed) @@ -96,7 +98,7 @@ U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix) } LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) -: LLFloater(seed) + : LLFloater(seed) { mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2)); mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this)); @@ -145,9 +147,46 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) xfer->setEnabled(copyable); } +class LLFloaterPermsResponder : public LLHTTPClient::Responder +{ +public: + LLFloaterPermsResponder(): LLHTTPClient::Responder() {} + + void error(U32 status, const std::string& reason) + { + LLSD args; + args["REASON"] = reason; + LLNotificationsUtil::add("DefaultObjectPermissions", args); + } + void result(const LLSD& content) + { + LL_INFOS("FloaterPermsResponder") << "Set new values" << LL_ENDL; + } +}; + +void LLFloaterPermsDefault::updateCap() +{ + std::string object_url = gAgent.getRegion()->getCapability("DefaultObjectPermissions"); + + if(!object_url.empty()) + { + LLSD report = LLSD::emptyMap(); + report["Group"] = (LLSD::Integer)LLFloaterPerms::getGroupPerms("Objects"); + report["Everyone"] = (LLSD::Integer)LLFloaterPerms::getEveryonePerms("Objects"); + report["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms("Objects"); + LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); + } +} + void LLFloaterPermsDefault::ok() { - refresh(); // Changes were already applied to saved settings. Refreshing internal values makes it official. +// Changes were already applied automatically to saved settings. +// Refreshing internal values makes it official. + refresh(); + +// We know some setting has changed but not which one. Just in case it was a setting for +// object permissions tell the server what the values are. + updateCap(); } void LLFloaterPermsDefault::cancel() diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index bb4a6f9702..5fe39a2c1b 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -59,6 +59,7 @@ public: void onClickOK(); void onClickCancel(); void onCommitCopy(const LLSD& user_data); + static void updateCap(); enum Categories { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index e3cb985ddb..7b5721cb39 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -70,6 +70,7 @@ #include "stringize.h" #include "llviewercontrol.h" #include "llsdserialize.h" +#include "llfloaterperms.h" #ifdef LL_WINDOWS #pragma warning(disable:4355) @@ -1485,6 +1486,8 @@ void LLViewerRegion::unpackRegionHandshake() msg->nextBlock("RegionInfo"); msg->addU32("Flags", 0x0 ); msg->sendReliable(host); + + LLFloaterPermsDefault::updateCap(); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) @@ -1494,6 +1497,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("ChatSessionRequest"); capabilityNames.append("CopyInventoryFromNotecard"); capabilityNames.append("CreateInventoryCategory"); + capabilityNames.append("DefaultObjectPermissions"); capabilityNames.append("DispatchRegionInfo"); capabilityNames.append("EstateChangeInfo"); capabilityNames.append("EventQueueGet"); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index afc5b916e7..a46cce996b 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7722,5 +7722,16 @@ Disabling future updates for this file. Attempted to add an invalid or unreadable image file [FNAME] which could not be opened or decoded. Attempt cancelled. + + + There was a problem saving the default permissions due to the following reason: [REASON]. Please try setting the default permissions later. + fail + + -- cgit v1.2.3 From 15434d53ea1f1bca37b7b9d6d569b3cb61d09bbe Mon Sep 17 00:00:00 2001 From: Cho Date: Fri, 8 Nov 2013 00:33:14 +0000 Subject: added SLShare links to snapshot floater for ACME-1167 --- indra/newview/llfloatertwitter.cpp | 6 ++-- indra/newview/llpanelsnapshotoptions.cpp | 36 ++++++++++++++++++++++ .../skins/default/xui/en/floater_snapshot.xml | 2 +- .../default/xui/en/panel_snapshot_options.xml | 36 ++++++++++++++++++++++ 4 files changed, 77 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 5a2402cdd6..1324bd5fd8 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -109,6 +109,8 @@ void LLTwitterPhotoPanel::draw() mRefreshBtn->setEnabled(no_ongoing_connection && mPhotoCheckbox->getValue().asBoolean()); mPhotoCheckbox->setEnabled(no_ongoing_connection); + bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + // Display the preview if one is available if (previewp && previewp->getThumbnailImage()) { @@ -131,7 +133,7 @@ void LLTwitterPhotoPanel::draw() gGL.matrixMode(LLRender::MM_MODELVIEW); // Apply floater transparency to the texture unless the floater is focused. - F32 alpha = (mPhotoCheckbox->getValue().asBoolean() ? (getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency()) : 0.5f); + F32 alpha = (add_photo ? (getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency()) : 0.5f); LLColor4 color = LLColor4::white; gl_draw_scaled_image(offset_x, offset_y, thumbnail_w, thumbnail_h, @@ -144,7 +146,7 @@ void LLTwitterPhotoPanel::draw() mWorkingLabel->setVisible(!(previewp && previewp->getSnapshotUpToDate())); // Enable Post if we have a preview to send and no on going connection being processed - mPostButton->setEnabled(no_ongoing_connection && (previewp && previewp->getSnapshotUpToDate())); + mPostButton->setEnabled(no_ongoing_connection && ((add_photo && previewp && previewp->getSnapshotUpToDate()) || !mStatusTextBox->getValue().asString().empty())); // Draw the rest of the panel on top of it LLPanel::draw(); diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 554fabe5b3..1967c50a29 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -31,6 +31,7 @@ #include "llsidetraypanelcontainer.h" #include "llfloatersnapshot.h" // FIXME: create a snapshot model +#include "llfloaterreg.h" /** * Provides several ways to save a snapshot. @@ -44,6 +45,7 @@ class LLPanelSnapshotOptions public: LLPanelSnapshotOptions(); ~LLPanelSnapshotOptions(); + /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void onEconomyDataChange() { updateUploadCost(); } @@ -54,6 +56,9 @@ private: void onSaveToEmail(); void onSaveToInventory(); void onSaveToComputer(); + void onSendToFacebook(); + void onSendToTwitter(); + void onSendToFlickr(); }; static LLRegisterPanelClassWrapper panel_class("llpanelsnapshotoptions"); @@ -73,6 +78,19 @@ LLPanelSnapshotOptions::~LLPanelSnapshotOptions() LLGlobalEconomy::Singleton::getInstance()->removeObserver(this); } +// virtual +BOOL LLPanelSnapshotOptions::postBuild() +{ + LLTextBox* sendToFacebookTextBox = getChild("send_to_facebook_textbox"); + sendToFacebookTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToFacebook, this)); + LLTextBox* sendToTwitterTextBox = getChild("send_to_twitter_textbox"); + sendToTwitterTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToTwitter, this)); + LLTextBox* sendToFlickrTextBox = getChild("send_to_flickr_textbox"); + sendToFlickrTextBox->setURLClickedCallback(boost::bind(&LLPanelSnapshotOptions::onSendToFlickr, this)); + + return LLPanel::postBuild(); +} + // virtual void LLPanelSnapshotOptions::onOpen(const LLSD& key) { @@ -118,3 +136,21 @@ void LLPanelSnapshotOptions::onSaveToComputer() { openPanel("panel_snapshot_local"); } + +void LLPanelSnapshotOptions::onSendToFacebook() +{ + LLFloaterReg::hideInstance("snapshot"); + LLFloaterReg::showInstance("social"); +} + +void LLPanelSnapshotOptions::onSendToTwitter() +{ + LLFloaterReg::hideInstance("snapshot"); + LLFloaterReg::showInstance("twitter"); +} + +void LLPanelSnapshotOptions::onSendToFlickr() +{ + LLFloaterReg::hideInstance("snapshot"); + LLFloaterReg::showInstance("flickr"); +} diff --git a/indra/newview/skins/default/xui/en/floater_snapshot.xml b/indra/newview/skins/default/xui/en/floater_snapshot.xml index 853c209bca..019ddad33c 100755 --- a/indra/newview/skins/default/xui/en/floater_snapshot.xml +++ b/indra/newview/skins/default/xui/en/floater_snapshot.xml @@ -10,7 +10,7 @@ help_topic="snapshot" save_rect="true" save_visibility="false" - title="SNAPSHOT PREVIEW" + title="SNAPSHOT" width="470"> diff --git a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml index 61c8c971c2..eff60f8228 100755 --- a/indra/newview/skins/default/xui/en/panel_snapshot_options.xml +++ b/indra/newview/skins/default/xui/en/panel_snapshot_options.xml @@ -81,4 +81,40 @@ + + Send to: [secondlife:/// Facebook] + + + [secondlife:/// Twitter] + + + [secondlife:/// Flickr] + -- cgit v1.2.3 From 4af21580297dd85727ffdc5d4eee89ad58ead271 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:31:32 +0000 Subject: Adding method to load cached/default syntax file and method to access sKeyWordsXML. --- indra/llui/llkeywords.cpp | 12 +++++----- indra/llui/llkeywords.h | 20 ++++++++--------- indra/newview/llpreviewscript.cpp | 15 ++++++++----- indra/newview/llpreviewscript.h | 1 + indra/newview/llsyntaxid.cpp | 47 ++++++++++++++++++++++++++++++++------- indra/newview/llsyntaxid.h | 4 +++- 6 files changed, 69 insertions(+), 30 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 687c2fb31d..832264f074 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -34,7 +34,7 @@ #include "lltexteditor.h" #include "llstl.h" -inline BOOL LLKeywordToken::isHead(const llwchar* s) const +inline bool LLKeywordToken::isHead(const llwchar* s) const { // strncmp is much faster than string compare BOOL res = TRUE; @@ -51,7 +51,7 @@ inline BOOL LLKeywordToken::isHead(const llwchar* s) const return res; } -inline BOOL LLKeywordToken::isTail(const llwchar* s) const +inline bool LLKeywordToken::isTail(const llwchar* s) const { BOOL res = TRUE; const llwchar* t = mDelimiter.c_str(); @@ -198,7 +198,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) return LLUIColorTable::instance().getColor(ColourGroup); } -BOOL LLKeywords::initialise(ELLPath path, const std::string filename) +bool LLKeywords::initialise(ELLPath path, const std::string filename) { mReady = false; setFilenameSyntax( gDirUtilp->getExpandedFilename(path, filename) ); @@ -214,7 +214,7 @@ BOOL LLKeywords::initialise(ELLPath path, const std::string filename) return mReady; } -BOOL LLKeywords::loadFromFile() +bool LLKeywords::loadFromFile() { processTokens(); return true; @@ -226,14 +226,14 @@ BOOL LLKeywords::loadFromFile() * contained data to the specified LLSD object. * @return Returns boolean true/false indicating success or failure. */ -BOOL LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data) +bool LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data) { mLoaded = false; llifstream file; file.open(filename); if(file.is_open()) { - mLoaded = (BOOL)LLSDSerialize::fromXML(data, file); + mLoaded = (bool)LLSDSerialize::fromXML(data, file); if (!mLoaded) { LL_WARNS("") << "Unable to deserialise file: " << filename << LL_ENDL; diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 1bd23549d2..f98453405d 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -83,8 +83,8 @@ public: S32 getLengthHead() const { return mToken.size(); } S32 getLengthTail() const { return mDelimiter.size(); } - BOOL isHead(const llwchar* s) const; - BOOL isTail(const llwchar* s) const; + bool isHead(const llwchar* s) const; + bool isTail(const llwchar* s) const; const LLWString& getToken() const { return mToken; } const LLColor4& getColor() const { return mColor; } TOKEN_TYPE getType() const { return mType; } @@ -111,13 +111,13 @@ public: void addColorGroup(const std::string key_in, const LLColor4 color); LLColor4 getColorGroup(const std::string key_in); - BOOL loadFromFile(); - BOOL loadFromFile(const std::string& filename); - BOOL isLoaded() const { return mLoaded; } + bool loadFromFile(); + bool loadFromFile(const std::string& filename); + bool isLoaded() const { return mLoaded; } void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); - BOOL initialise(ELLPath path, const std::string filename); + bool initialise(ELLPath path, const std::string filename); std::string processColors(); std::string processColors(LLSD &data, const std::string strGroup); void processTokens(); @@ -176,10 +176,10 @@ 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 ); + bool loadIntoLLSD( const std::string& filename, LLSD& data ); LLSD mColors; - BOOL mLoaded; + bool mLoaded; LLSD mSyntax; word_token_map_t mWordTokenMap; typedef std::deque token_list_t; @@ -194,8 +194,8 @@ protected: std::string getArguments(LLSD& args); private: - BOOL ready() { return mReady; } - BOOL mReady; + bool ready() { return mReady; } + bool mReady; std::string mFilenameSyntax; }; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 5f23249c8d..705872328a 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -406,11 +406,7 @@ BOOL LLScriptEdCore::postBuild() initMenu(); -// Make this work ;-) - mSyntaxIdLSL.initialise(); - // ... - mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml"); -// mEditor->mKeywords.initialise(mSyntaxIdLSL.getFullFileSpec()); + LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLScriptEdCore::initKeywords(), this)); // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. std::vector funcs; @@ -456,6 +452,15 @@ BOOL LLScriptEdCore::postBuild() return TRUE; } +void LLScriptEdCore::initKeywords() +{ + // Make this work ;-) + mSyntaxIdLSL.initialise(); + // ... + mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml"); + // mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); +} + void LLScriptEdCore::initMenu() { // *TODO: Skinning - make these callbacks data driven diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 73ccaab0b8..149c27461e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,6 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); + void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 0249607834..00e6086546 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -248,7 +248,7 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "Filename is cached, no need to download!" << LL_ENDL; - openKeywordsFile(); + loadKeywordsFileIntoLLSD(); } } else @@ -256,27 +256,58 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "ID is null so SyntaxID does not need to be processed!" << LL_ENDL; - openKeywordsFile(); + loadKeywordsFileIntoLLSD(); } - // TODO add a signal here to tell the editor the hash has changed? + mFileNameCurrent = mFileNameNew; + mSyntaxIdCurrent = mSyntaxIdNew; } else { LL_WARNS("LSLSyntax") << "No change to Syntax! Nothing to see here. Move along now!" << LL_ENDL; - } - //LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLSyntaxIdLSL::checkSyntaxIdChange(), this)); } //----------------------------------------------------------------------------- -// openKeywordsFile +// loadKeywordsFileIntoLLSD //----------------------------------------------------------------------------- -void LLSyntaxIdLSL::openKeywordsFile() +/** + * @brief Load xml serialised LLSD + * @desc Opens the specified filespec and attempts to deserialise the + * contained data to the specified LLSD object. + * @return Returns boolean true/false indicating success or failure. + */ +bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() { LL_WARNS("LSLSyntax") << "Trying to open default or cached keyword file ;-)" << LL_ENDL; - // TODO Open the file and load LLSD into sKeywordsXml + + bool loaded = false; + LLSD content; + llifstream file; + file.open(mFullFileSpec); + if (file.is_open()) + { + loaded = (bool)LLSDSerialize::fromXML(content, file); + if (!loaded) + { + LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << filename << 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(); + } + else + { + sKeywordsXml = content; + LL_INFOS("LSLSyntax") << "Deserialised file: " << filename << LL_ENDL; + } + } + else + { + LL_WARNS("LSLSyntax") << "Unable to open file: " << filename << LL_ENDL; + } + return loaded; } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index d9f2572863..50013a8380 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -39,6 +39,7 @@ public: bool checkSyntaxIdChanged(); std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } + LLSD getKeywordsXML() const { return sKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } void initialise(); @@ -50,7 +51,8 @@ protected: std::string buildFileNameNew(); std::string buildFullFileSpec(); void fetchKeywordsFile(); - void openKeywordsFile(); + //void openKeywordsFile(); + bool loadKeywordsFileIntoLLSD(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } -- cgit v1.2.3 From 29b2129e1eec0dbbb909422e82766a58f14c5da3 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:32:08 +0000 Subject: Backed out changeset: e82d9467bec8 --- indra/llui/llkeywords.cpp | 12 +++++----- indra/llui/llkeywords.h | 20 ++++++++--------- indra/newview/llpreviewscript.cpp | 15 +++++-------- indra/newview/llpreviewscript.h | 1 - indra/newview/llsyntaxid.cpp | 47 +++++++-------------------------------- indra/newview/llsyntaxid.h | 4 +--- 6 files changed, 30 insertions(+), 69 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 832264f074..687c2fb31d 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -34,7 +34,7 @@ #include "lltexteditor.h" #include "llstl.h" -inline bool LLKeywordToken::isHead(const llwchar* s) const +inline BOOL LLKeywordToken::isHead(const llwchar* s) const { // strncmp is much faster than string compare BOOL res = TRUE; @@ -51,7 +51,7 @@ inline bool LLKeywordToken::isHead(const llwchar* s) const return res; } -inline bool LLKeywordToken::isTail(const llwchar* s) const +inline BOOL LLKeywordToken::isTail(const llwchar* s) const { BOOL res = TRUE; const llwchar* t = mDelimiter.c_str(); @@ -198,7 +198,7 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) return LLUIColorTable::instance().getColor(ColourGroup); } -bool LLKeywords::initialise(ELLPath path, const std::string filename) +BOOL LLKeywords::initialise(ELLPath path, const std::string filename) { mReady = false; setFilenameSyntax( gDirUtilp->getExpandedFilename(path, filename) ); @@ -214,7 +214,7 @@ bool LLKeywords::initialise(ELLPath path, const std::string filename) return mReady; } -bool LLKeywords::loadFromFile() +BOOL LLKeywords::loadFromFile() { processTokens(); return true; @@ -226,14 +226,14 @@ bool LLKeywords::loadFromFile() * contained data to the specified LLSD object. * @return Returns boolean true/false indicating success or failure. */ -bool LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data) +BOOL LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data) { mLoaded = false; llifstream file; file.open(filename); if(file.is_open()) { - mLoaded = (bool)LLSDSerialize::fromXML(data, file); + mLoaded = (BOOL)LLSDSerialize::fromXML(data, file); if (!mLoaded) { LL_WARNS("") << "Unable to deserialise file: " << filename << LL_ENDL; diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index f98453405d..1bd23549d2 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -83,8 +83,8 @@ public: S32 getLengthHead() const { return mToken.size(); } S32 getLengthTail() const { return mDelimiter.size(); } - bool isHead(const llwchar* s) const; - bool isTail(const llwchar* s) const; + BOOL isHead(const llwchar* s) const; + BOOL isTail(const llwchar* s) const; const LLWString& getToken() const { return mToken; } const LLColor4& getColor() const { return mColor; } TOKEN_TYPE getType() const { return mType; } @@ -111,13 +111,13 @@ public: void addColorGroup(const std::string key_in, const LLColor4 color); LLColor4 getColorGroup(const std::string key_in); - bool loadFromFile(); - bool loadFromFile(const std::string& filename); - bool isLoaded() const { return mLoaded; } + BOOL loadFromFile(); + BOOL loadFromFile(const std::string& filename); + BOOL isLoaded() const { return mLoaded; } void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); - bool initialise(ELLPath path, const std::string filename); + BOOL initialise(ELLPath path, const std::string filename); std::string processColors(); std::string processColors(LLSD &data, const std::string strGroup); void processTokens(); @@ -176,10 +176,10 @@ 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 ); + BOOL loadIntoLLSD( const std::string& filename, LLSD& data ); LLSD mColors; - bool mLoaded; + BOOL mLoaded; LLSD mSyntax; word_token_map_t mWordTokenMap; typedef std::deque token_list_t; @@ -194,8 +194,8 @@ protected: std::string getArguments(LLSD& args); private: - bool ready() { return mReady; } - bool mReady; + BOOL ready() { return mReady; } + BOOL mReady; std::string mFilenameSyntax; }; diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 705872328a..5f23249c8d 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -406,7 +406,11 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLScriptEdCore::initKeywords(), this)); +// Make this work ;-) + mSyntaxIdLSL.initialise(); + // ... + mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml"); +// mEditor->mKeywords.initialise(mSyntaxIdLSL.getFullFileSpec()); // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. std::vector funcs; @@ -452,15 +456,6 @@ BOOL LLScriptEdCore::postBuild() return TRUE; } -void LLScriptEdCore::initKeywords() -{ - // Make this work ;-) - mSyntaxIdLSL.initialise(); - // ... - mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml"); - // mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); -} - void LLScriptEdCore::initMenu() { // *TODO: Skinning - make these callbacks data driven diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 149c27461e..73ccaab0b8 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,6 @@ public: ~LLScriptEdCore(); void initMenu(); - void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 00e6086546..0249607834 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -248,7 +248,7 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "Filename is cached, no need to download!" << LL_ENDL; - loadKeywordsFileIntoLLSD(); + openKeywordsFile(); } } else @@ -256,58 +256,27 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "ID is null so SyntaxID does not need to be processed!" << LL_ENDL; - loadKeywordsFileIntoLLSD(); + openKeywordsFile(); } - mFileNameCurrent = mFileNameNew; - mSyntaxIdCurrent = mSyntaxIdNew; + // TODO add a signal here to tell the editor the hash has changed? } else { LL_WARNS("LSLSyntax") << "No change to Syntax! Nothing to see here. Move along now!" << LL_ENDL; + } + //LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLSyntaxIdLSL::checkSyntaxIdChange(), this)); } //----------------------------------------------------------------------------- -// loadKeywordsFileIntoLLSD +// openKeywordsFile //----------------------------------------------------------------------------- -/** - * @brief Load xml serialised LLSD - * @desc Opens the specified filespec and attempts to deserialise the - * contained data to the specified LLSD object. - * @return Returns boolean true/false indicating success or failure. - */ -bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() +void LLSyntaxIdLSL::openKeywordsFile() { LL_WARNS("LSLSyntax") << "Trying to open default or cached keyword file ;-)" << LL_ENDL; - - bool loaded = false; - LLSD content; - llifstream file; - file.open(mFullFileSpec); - if (file.is_open()) - { - loaded = (bool)LLSDSerialize::fromXML(content, file); - if (!loaded) - { - LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << filename << 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(); - } - else - { - sKeywordsXml = content; - LL_INFOS("LSLSyntax") << "Deserialised file: " << filename << LL_ENDL; - } - } - else - { - LL_WARNS("LSLSyntax") << "Unable to open file: " << filename << LL_ENDL; - } - return loaded; + // TODO Open the file and load LLSD into sKeywordsXml } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 50013a8380..d9f2572863 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -39,7 +39,6 @@ public: bool checkSyntaxIdChanged(); std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } - LLSD getKeywordsXML() const { return sKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } void initialise(); @@ -51,8 +50,7 @@ protected: std::string buildFileNameNew(); std::string buildFullFileSpec(); void fetchKeywordsFile(); - //void openKeywordsFile(); - bool loadKeywordsFileIntoLLSD(); + void openKeywordsFile(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } -- cgit v1.2.3 From 3b03ffbd70bff48a747f9f3a45056069724fc42f Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:39:53 +0000 Subject: Changing method openKeywordFile to loadKeywordFileIntoLLSD to load cached/default syntax file and method to access sKeyWordsXML. loadKeywordFileIntoLLSD was taken almost verbatim from LLKeywords::loadIntoLLSD which can be removed later. I know the name is long but I wanted to remember where it came from and why it is how it is. Removed a little cruft also. --- indra/newview/llsyntaxid.cpp | 47 ++++++++++++++++++++++++++++++++++++-------- indra/newview/llsyntaxid.h | 4 +++- 2 files changed, 42 insertions(+), 9 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 0249607834..00e6086546 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -248,7 +248,7 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "Filename is cached, no need to download!" << LL_ENDL; - openKeywordsFile(); + loadKeywordsFileIntoLLSD(); } } else @@ -256,27 +256,58 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "ID is null so SyntaxID does not need to be processed!" << LL_ENDL; - openKeywordsFile(); + loadKeywordsFileIntoLLSD(); } - // TODO add a signal here to tell the editor the hash has changed? + mFileNameCurrent = mFileNameNew; + mSyntaxIdCurrent = mSyntaxIdNew; } else { LL_WARNS("LSLSyntax") << "No change to Syntax! Nothing to see here. Move along now!" << LL_ENDL; - } - //LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLSyntaxIdLSL::checkSyntaxIdChange(), this)); } //----------------------------------------------------------------------------- -// openKeywordsFile +// loadKeywordsFileIntoLLSD //----------------------------------------------------------------------------- -void LLSyntaxIdLSL::openKeywordsFile() +/** + * @brief Load xml serialised LLSD + * @desc Opens the specified filespec and attempts to deserialise the + * contained data to the specified LLSD object. + * @return Returns boolean true/false indicating success or failure. + */ +bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() { LL_WARNS("LSLSyntax") << "Trying to open default or cached keyword file ;-)" << LL_ENDL; - // TODO Open the file and load LLSD into sKeywordsXml + + bool loaded = false; + LLSD content; + llifstream file; + file.open(mFullFileSpec); + if (file.is_open()) + { + loaded = (bool)LLSDSerialize::fromXML(content, file); + if (!loaded) + { + LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << filename << 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(); + } + else + { + sKeywordsXml = content; + LL_INFOS("LSLSyntax") << "Deserialised file: " << filename << LL_ENDL; + } + } + else + { + LL_WARNS("LSLSyntax") << "Unable to open file: " << filename << LL_ENDL; + } + return loaded; } diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index d9f2572863..50013a8380 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -39,6 +39,7 @@ public: bool checkSyntaxIdChanged(); std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } + LLSD getKeywordsXML() const { return sKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } void initialise(); @@ -50,7 +51,8 @@ protected: std::string buildFileNameNew(); std::string buildFullFileSpec(); void fetchKeywordsFile(); - void openKeywordsFile(); + //void openKeywordsFile(); + bool loadKeywordsFileIntoLLSD(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } -- cgit v1.2.3 From bea2e9822b52b66e3644925143b852526c669248 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sat, 9 Nov 2013 11:51:45 +0000 Subject: Fixing some references to 'filename' I forgot to rename to mFullFileSpec. --- doc/contributions.txt | 3 ++- indra/newview/llsyntaxid.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index 4ce074506b..03f0194a47 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -514,7 +514,8 @@ Ima Mechanique VWR-10791 VWR-20553 VWR-19213 - VWR-23739 + VWR-22401 + VWR-23739 VWR-24766 VWR-28065 Imnotgoing Sideways diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 00e6086546..c5960fb16e 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -293,7 +293,7 @@ bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() loaded = (bool)LLSDSerialize::fromXML(content, file); if (!loaded) { - LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << filename << LL_ENDL; + LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; // Is this the right thing to do, or should we leave the old content // even if it isn't entirely accurate anymore? @@ -302,12 +302,12 @@ bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() else { sKeywordsXml = content; - LL_INFOS("LSLSyntax") << "Deserialised file: " << filename << LL_ENDL; + LL_INFOS("LSLSyntax") << "Deserialised file: " << mFullFileSpec << LL_ENDL; } } else { - LL_WARNS("LSLSyntax") << "Unable to open file: " << filename << LL_ENDL; + LL_WARNS("LSLSyntax") << "Unable to open file: " << mFullFileSpec << LL_ENDL; } return loaded; } -- cgit v1.2.3 From a4c5b5c416e9a289fa2caa6d61d05e1f68605b5a Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 17:39:34 +0000 Subject: Fixing missing parenthesis. --- 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 c5960fb16e..2388f1c5ef 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -297,7 +297,7 @@ bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() // 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(); + sKeywordsXml = LLSD().emptyMap(); } else { -- cgit v1.2.3 From da0cd7b845028f679e6ce7243715d52481f0c430 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 17:43:17 +0000 Subject: Adding getter for mFullFileSpec, shortening loadKeywordsFileIntoLLSD to loadKeywordsIntoLLSD. --- indra/newview/llsyntaxid.cpp | 6 +++--- indra/newview/llsyntaxid.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 2388f1c5ef..18869c215d 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -248,7 +248,7 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "Filename is cached, no need to download!" << LL_ENDL; - loadKeywordsFileIntoLLSD(); + loadKeywordsIntoLLSD(); } } else @@ -256,7 +256,7 @@ void LLSyntaxIdLSL::initialise() LL_WARNS("LSLSyntax") << "ID is null so SyntaxID does not need to be processed!" << LL_ENDL; - loadKeywordsFileIntoLLSD(); + loadKeywordsIntoLLSD(); } mFileNameCurrent = mFileNameNew; mSyntaxIdCurrent = mSyntaxIdNew; @@ -278,7 +278,7 @@ void LLSyntaxIdLSL::initialise() * contained data to the specified LLSD object. * @return Returns boolean true/false indicating success or failure. */ -bool LLSyntaxIdLSL::loadKeywordsFileIntoLLSD() +bool LLSyntaxIdLSL::loadKeywordsIntoLLSD() { LL_WARNS("LSLSyntax") << "Trying to open default or cached keyword file ;-)" diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 50013a8380..fc875a835f 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -39,6 +39,7 @@ public: bool checkSyntaxIdChanged(); std::string getFileNameCurrent() const { return mFileNameCurrent; } ELLPath getFilePath() const { return mFilePath; } + std::string getFileSpec() const { return mFullFileSpec; } LLSD getKeywordsXML() const { return sKeywordsXml; } LLUUID getSyntaxId() const { return mSyntaxIdCurrent; } @@ -51,8 +52,7 @@ protected: std::string buildFileNameNew(); std::string buildFullFileSpec(); void fetchKeywordsFile(); - //void openKeywordsFile(); - bool loadKeywordsFileIntoLLSD(); + bool loadKeywordsIntoLLSD(); void setSyntaxId(LLUUID SyntaxId) { mSyntaxIdCurrent = SyntaxId; } void setFileNameCurrent(std::string& name) { mFileNameCurrent = name; } void setFileNameDefault(std::string& name) { mFileNameDefault = name; } -- cgit v1.2.3 From 06ed74f177983e2eb170426712f422253a0b48e7 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 18:29:22 +0000 Subject: Tidying up llsyntaxid files --- indra/newview/llsyntaxid.cpp | 40 ++++++++++++++--------------- indra/newview/llsyntaxid.h | 60 ++++++++++++++++++++++++++------------------ 2 files changed, 54 insertions(+), 46 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 18869c215d..5d8879195a 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -28,9 +28,9 @@ #include "llviewerprecompiledheaders.h" -#include "llhttpclient.h" #include "llagent.h" #include "llappviewer.h" +#include "llhttpclient.h" #include "llsdserialize.h" #include "llsyntaxid.h" @@ -46,10 +46,9 @@ fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) << LL_ENDL; } - void fetchKeywordsFileResponder::errorWithContent(U32 status, - const std::string& reason, - const LLSD& content) + const std::string& reason, + const LLSD& content) { LL_WARNS("LSLSyntax") << "fetchKeywordsFileResponder error [status:" @@ -67,7 +66,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) LLSDSerialize::toPrettyXML(content_ref, str); const std::string xml = str.str(); - // save the str to disc + // 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(); @@ -78,8 +77,6 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) } -LLSD LLSyntaxIdLSL::sKeywordsXml; - //----------------------------------------------------------------------------- // LLSyntaxIdLSL //----------------------------------------------------------------------------- @@ -98,6 +95,8 @@ LLSyntaxIdLSL::LLSyntaxIdLSL() : mFileNameCurrent = mFileNameDefault; } +LLSD LLSyntaxIdLSL::sKeywordsXml; + std::string LLSyntaxIdLSL::buildFileNameNew() { std::string filename = "keywords_lsl_"; @@ -151,7 +150,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() if (mSyntaxIdCurrent != mSyntaxIdNew) { LL_WARNS("LSLSyntax") - << "Region changed to '" << region->getName() + << "Region is '" << region->getName() << "' it has LSLSyntaxId capability, and the new hash is '" << mSyntaxIdNew << "'" << LL_ENDL; @@ -161,7 +160,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() else { LL_WARNS("LSLSyntax") - << "Region changed to '" << region->getName() + << "Region is '" << region->getName() << "' it has the same LSLSyntaxId! Leaving hash as '" << mSyntaxIdCurrent << "'" << LL_ENDL; @@ -173,7 +172,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() if ( mSyntaxIdCurrent.isNull() ) { LL_WARNS("LSLSyntax") - << "Region changed to '" << region->getName() + << "Region is '" << region->getName() << " it does not have LSLSyntaxId capability, remaining with default keywords file!" << LL_ENDL; } @@ -182,7 +181,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() mSyntaxIdNew = LLUUID(); LL_WARNS("LSLSyntax") - << "Region changed to '" << region->getName() + << "Region is '" << region->getName() << " it does not have LSLSyntaxId capability, using default keywords file!" << LL_ENDL; @@ -201,7 +200,6 @@ void LLSyntaxIdLSL::fetchKeywordsFile() { if ( !mCapabilityURL.empty() ) { - //buildFullFileSpec(); LLHTTPClient::get(mCapabilityURL, new fetchKeywordsFileResponder(mFullFileSpec), LLSD(), 30.f @@ -225,28 +223,28 @@ void LLSyntaxIdLSL::initialise() if (checkSyntaxIdChanged()) { LL_WARNS("LSLSyntax") - << "Change to syntax, setting up new file." + << "Change to LSL version, getting appropriate file." << LL_ENDL; - // Need a full spec built regardless of file source + // Need a full spec regardless of file source, so build it now. buildFullFileSpec(); if ( !mSyntaxIdNew.isNull() ) { LL_WARNS("LSLSyntax") - << "ID is not null so must be processed!" + << "We have an ID for the version, so we will process it!" << LL_ENDL; if ( !gDirUtilp->fileExists(mFullFileSpec) ) { // Does not exist, so fetch it from the capability fetchKeywordsFile(); LL_WARNS("LSLSyntax") - << "Filename is not cached, we will try to download it!" + << "File is not cached, we will try to download it!" << LL_ENDL; } else { LL_WARNS("LSLSyntax") - << "Filename is cached, no need to download!" + << "File is cached, no need to download!" << LL_ENDL; loadKeywordsIntoLLSD(); } @@ -254,7 +252,7 @@ void LLSyntaxIdLSL::initialise() else { // Need to open the default LL_WARNS("LSLSyntax") - << "ID is null so SyntaxID does not need to be processed!" + << "ID is null so we will use the default file!" << LL_ENDL; loadKeywordsIntoLLSD(); } @@ -263,8 +261,8 @@ void LLSyntaxIdLSL::initialise() } else { - LL_WARNS("LSLSyntax") - << "No change to Syntax! Nothing to see here. Move along now!" + LL_INFOS("LSLSyntax") + << "No change to Syntax! Nothing to see. Move along now!" << LL_ENDL; } } @@ -281,7 +279,7 @@ void LLSyntaxIdLSL::initialise() bool LLSyntaxIdLSL::loadKeywordsIntoLLSD() { LL_WARNS("LSLSyntax") - << "Trying to open default or cached keyword file ;-)" + << "Trying to open cached or default keyword file ;-)" << LL_ENDL; bool loaded = false; diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index fc875a835f..472e88744f 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -11,28 +11,61 @@ #include "llhttpclient.h" #include "llviewerregion.h" - +/** + * @file llsyntaxid.h + * @brief Handles responses for the LSLSyntax capability's get call. + */ class fetchKeywordsFileResponder : public LLHTTPClient::Responder { public: std::string mFileSpec; + /** + * @brief fetchKeywordsFileResponder + * @param filespec File path and name of where to save the returned data + */ fetchKeywordsFileResponder(std::string filespec); void errorWithContent(U32 status, const std::string& reason, const LLSD& content); + /** + * @brief Saves the returned file to the location provided at instantiation. + * @param content_ref The LSL syntax file for the sim. + */ void result(const LLSD& content_ref); }; /** * @file llsyntaxid.h - * @brief The LLSyntaxIdLSL class + * @brief Tracks the file needed to decorate the current sim's version of LSL. */ class LLSyntaxIdLSL { +public: + + +protected: + LLViewerRegion* region; + + +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; + + static LLSD sKeywordsXml; + + public: LLSyntaxIdLSL(); @@ -58,27 +91,4 @@ protected: void setFileNameDefault(std::string& name) { mFileNameDefault = name; } void setFileNameNew(std::string name) { mFileNameNew = name; } void setSimulatorFeatureName(const std::string& name) { mSimulatorFeature = name; } - - -//public: - - -protected: - LLViewerRegion* region; - - -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; - - static LLSD sKeywordsXml; - }; -- cgit v1.2.3 From 5e27952ee4698006c86ebdca60c4eab305ddebac Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 20:24:13 +0000 Subject: storm-1831 Switch to use the llsyntaxid keywords LLSD directly --- indra/llui/llkeywords.cpp | 15 +++------------ indra/llui/llkeywords.h | 2 +- indra/newview/llpreviewscript.cpp | 3 +-- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 687c2fb31d..ac95a20588 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -198,19 +198,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) return LLUIColorTable::instance().getColor(ColourGroup); } -BOOL LLKeywords::initialise(ELLPath path, const std::string filename) +bool LLKeywords::initialise(LLSD SyntaxXML) { - mReady = false; - setFilenameSyntax( gDirUtilp->getExpandedFilename(path, filename) ); - - if (! loadIntoLLSD(mFilenameSyntax, mSyntax) ) - { - LL_ERRS("") << "Failed to load syntax data from '" << mFilenameSyntax << "', cannot continue!" << LL_ENDL; - } - else - { - mReady = true; - } + mSyntax = SyntaxXML; + mLoaded = mReady = true; return mReady; } diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 1bd23549d2..24a0450912 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -117,7 +117,7 @@ public: void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); - BOOL initialise(ELLPath path, const std::string filename); + bool initialise(LLSD SyntaxXML); std::string processColors(); std::string processColors(LLSD &data, const std::string strGroup); void processTokens(); diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 5f23249c8d..b464845256 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -409,8 +409,7 @@ BOOL LLScriptEdCore::postBuild() // Make this work ;-) mSyntaxIdLSL.initialise(); // ... - mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml"); -// mEditor->mKeywords.initialise(mSyntaxIdLSL.getFullFileSpec()); + mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. std::vector funcs; -- cgit v1.2.3 From 488964157cb02b44ac9c72bb6c57e47c2b21ee53 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 21:57:29 +0000 Subject: Moving keywords code into its own method. --- indra/newview/llpreviewscript.cpp | 87 +++++++++++++++++++++------------------ indra/newview/llpreviewscript.h | 1 + 2 files changed, 47 insertions(+), 41 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index b464845256..0cf8dbe9c5 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -406,53 +406,58 @@ BOOL LLScriptEdCore::postBuild() initMenu(); -// Make this work ;-) - mSyntaxIdLSL.initialise(); - // ... - mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); - - // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. - std::vector funcs; - std::vector tooltips; - - LLColor3 color(0.5f, 0.0f, 0.15f); - mEditor->loadKeywords(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords.ini"), funcs, tooltips, color); - - 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; - // FIX: change this to use the new Token Type enum entries. - if (token->getColor() == color) // Wow, what a disgusting hack. - { - primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - else + return initKeywords(); +} + +bool LLScriptEdCore::initKeywords() +{ + // Make this work ;-) + mSyntaxIdLSL.initialise(); + // ... + mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); + + // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. + //std::vector funcs; + //std::vector tooltips; + + LLColor3 color(0.5f, 0.0f, 0.15f); + 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) { - secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); + token = token_it->second; + // FIX: change this to use the new Token Type enum entries. + if (token->getColor() == color) // Wow, what a disgusting hack. + { + primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); + } + else + { + secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); + } } - } - // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary - // keywords. They're intelligently grouped in keywords.ini. - std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); + // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary + // keywords. They're intelligently grouped in keywords.ini. + std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); - for (std::vector::const_iterator iter= primary_keywords.begin(); - iter!= primary_keywords.end(); ++iter) - { - mFunctions->add(*iter); - } + for (std::vector::const_iterator iter= primary_keywords.begin(); + iter!= primary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } - for (std::vector::const_iterator iter= secondary_keywords.begin(); - iter!= secondary_keywords.end(); ++iter) - { - mFunctions->add(*iter); - } + for (std::vector::const_iterator iter= secondary_keywords.begin(); + iter!= secondary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } - return TRUE; + return TRUE; } void LLScriptEdCore::initMenu() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 73ccaab0b8..bc0256703e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,6 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); + bool initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From dc317ed70ac8b8344a745b4f43116460efdfdbca Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 21:58:17 +0000 Subject: Refactoring load routines to remove uneeded methods --- indra/llui/llkeywords.cpp | 36 ------------------------------------ indra/llui/lltexteditor.cpp | 24 ++++++++++-------------- indra/llui/lltexteditor.h | 5 +---- 3 files changed, 11 insertions(+), 54 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index ac95a20588..65ede3e46f 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -205,42 +205,6 @@ bool LLKeywords::initialise(LLSD SyntaxXML) return mReady; } -BOOL LLKeywords::loadFromFile() -{ - processTokens(); - return true; -} - -/** - * @brief Load xml serialised LLSD - * @desc Opens the specified filespec and attempts to deserialise the - * contained data to the specified LLSD object. - * @return Returns boolean true/false indicating success or failure. - */ -BOOL LLKeywords::loadIntoLLSD(const std::string& filename, LLSD& data) -{ - mLoaded = false; - llifstream file; - file.open(filename); - if(file.is_open()) - { - mLoaded = (BOOL)LLSDSerialize::fromXML(data, file); - if (!mLoaded) - { - LL_WARNS("") << "Unable to deserialise file: " << filename << LL_ENDL; - } - else - { - LL_INFOS("") << "Deserialised file: " << filename << LL_ENDL; - } - } - else - { - LL_WARNS("") << "Unable to open file: " << filename << LL_ENDL; - } - return mLoaded; -} - ///** // * @brief Start processing the colour LLSD from its beginning. // * diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 4bab68b339..b6c2e20a9d 100755 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -2502,23 +2502,19 @@ BOOL LLTextEditor::tryToRevertToPristineState() static LLFastTimer::DeclareTimer FTM_SYNTAX_HIGHLIGHTING("Syntax Highlighting"); -void LLTextEditor::loadKeywords(const std::string& filename, - const std::vector& funcs, - const std::vector& tooltips, - const LLColor4& color) +void LLTextEditor::loadKeywords() { LLFastTimer ft(FTM_SYNTAX_HIGHLIGHTING); - if(mKeywords.loadFromFile()) - { - segment_vec_t segment_list; - mKeywords.findSegments(&segment_list, getWText(), mDefaultColor.get(), *this); + mKeywords.processTokens(); - 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); - } + 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); } } diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 8cc0e03712..0b4a22b08b 100755 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -187,10 +187,7 @@ public: void getCurrentLineAndColumn( S32* line, S32* col, BOOL include_wordwrap ); LLKeywords mKeywords; - void loadKeywords(const std::string& filename, - const std::vector& funcs, - const std::vector& tooltips, - const LLColor4& func_color); + void loadKeywords(); LLKeywords::keyword_iterator_t keywordsBegin() { return mKeywords.begin(); } LLKeywords::keyword_iterator_t keywordsEnd() { return mKeywords.end(); } -- cgit v1.2.3 From 009245510149c26337ac1cca64a367cd2234725b Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 22:35:49 +0000 Subject: Removing unused getter/setter and property for mFilenameSyntax, mReady. --- indra/llui/llkeywords.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 24a0450912..f14605157d 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -113,8 +113,7 @@ public: LLColor4 getColorGroup(const std::string key_in); BOOL loadFromFile(); BOOL loadFromFile(const std::string& filename); - BOOL isLoaded() const { return mLoaded; } - void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; } + bool isLoaded() const { return mLoaded; } void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); bool initialise(LLSD SyntaxXML); @@ -179,7 +178,7 @@ protected: BOOL loadIntoLLSD( const std::string& filename, LLSD& data ); LLSD mColors; - BOOL mLoaded; + bool mLoaded; LLSD mSyntax; word_token_map_t mWordTokenMap; typedef std::deque token_list_t; @@ -194,9 +193,6 @@ protected: std::string getArguments(LLSD& args); private: - BOOL ready() { return mReady; } - BOOL mReady; - std::string mFilenameSyntax; }; #endif // LL_LLKEYWORDS_H -- cgit v1.2.3 From 1cf2acf6d70c5ce68d6faedffbbf2b070f2a6fd7 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Sun, 10 Nov 2013 22:47:34 +0000 Subject: Fixing some small discrepencies. --- indra/newview/llpreviewscript.cpp | 15 +++++---------- indra/newview/llpreviewscript.h | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 0cf8dbe9c5..143703f60e 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -406,20 +406,16 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - return initKeywords(); + initKeywords(); + + return TRUE; } -bool LLScriptEdCore::initKeywords() +void LLScriptEdCore::initKeywords() { - // Make this work ;-) mSyntaxIdLSL.initialise(); - // ... mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); - // FIX: Refactor LLTextEditor::loadKeywords so these can be removed. - //std::vector funcs; - //std::vector tooltips; - LLColor3 color(0.5f, 0.0f, 0.15f); mEditor->loadKeywords(); @@ -443,6 +439,7 @@ bool LLScriptEdCore::initKeywords() // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary // keywords. They're intelligently grouped in keywords.ini. + // As we don't use keywords.ini, this is no longer true. Do we need to sort now? std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); for (std::vector::const_iterator iter= primary_keywords.begin(); @@ -456,8 +453,6 @@ bool LLScriptEdCore::initKeywords() { mFunctions->add(*iter); } - - return TRUE; } void LLScriptEdCore::initMenu() diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index bc0256703e..149c27461e 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); - bool initKeywords(); + void initKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From f6d8e55eb9e9ec377e3a9ce9b25de702c3239090 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 11 Nov 2013 13:36:33 +0000 Subject: Fixing indentation of LLScriptEdCore::initKeywords --- indra/newview/llpreviewscript.cpp | 66 +++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 143703f60e..34ad95e228 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -413,46 +413,46 @@ BOOL LLScriptEdCore::postBuild() void LLScriptEdCore::initKeywords() { - mSyntaxIdLSL.initialise(); - mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); + mSyntaxIdLSL.initialise(); + mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); - LLColor3 color(0.5f, 0.0f, 0.15f); - mEditor->loadKeywords(); + LLColor3 color(0.5f, 0.0f, 0.15f); + 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) + 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; + // FIX: change this to use the new Token Type enum entries. + if (token->getColor() == color) // Wow, what a disgusting hack. { - token = token_it->second; - // FIX: change this to use the new Token Type enum entries. - if (token->getColor() == color) // Wow, what a disgusting hack. - { - primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } - else - { - secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); - } + primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } - - // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary - // keywords. They're intelligently grouped in keywords.ini. - // As we don't use keywords.ini, this is no longer true. Do we need to sort now? - std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); - - for (std::vector::const_iterator iter= primary_keywords.begin(); - iter!= primary_keywords.end(); ++iter) + else { - mFunctions->add(*iter); + secondary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } + } - for (std::vector::const_iterator iter= secondary_keywords.begin(); - iter!= secondary_keywords.end(); ++iter) - { - mFunctions->add(*iter); - } + // Case-insensitive dictionary sort for primary keywords. We don't sort the secondary + // keywords. They're intelligently grouped in keywords.ini. + // As we don't use keywords.ini, this is no longer true. Do we need to sort now? + std::stable_sort( primary_keywords.begin(), primary_keywords.end(), LLSECKeywordCompare() ); + + for (std::vector::const_iterator iter= primary_keywords.begin(); + iter!= primary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } + + for (std::vector::const_iterator iter= secondary_keywords.begin(); + iter!= secondary_keywords.end(); ++iter) + { + mFunctions->add(*iter); + } } void LLScriptEdCore::initMenu() -- cgit v1.2.3 From 3e41917403fb3519adac2343ca21a1f289596621 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 11 Nov 2013 16:33:04 +0000 Subject: Removing no longer used member variable, adding method to reset the mLoaded status --- indra/llui/llkeywords.cpp | 4 ++-- indra/llui/llkeywords.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 65ede3e46f..6aeaf4798b 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -201,8 +201,8 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in) bool LLKeywords::initialise(LLSD SyntaxXML) { mSyntax = SyntaxXML; - mLoaded = mReady = true; - return mReady; + mLoaded = true; + return mLoaded; } ///** diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index f14605157d..074cedfc63 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -110,6 +110,7 @@ public: ~LLKeywords(); void addColorGroup(const std::string key_in, const LLColor4 color); + void clearLoaded() { mLoaded = false; } LLColor4 getColorGroup(const std::string key_in); BOOL loadFromFile(); BOOL loadFromFile(const std::string& filename); -- cgit v1.2.3 From 377eb5561f885902585830226fd82c4ceeec4e05 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 11 Nov 2013 16:34:16 +0000 Subject: Renaming initKeywords to better reflect its intended use (onRegionChangeInitialiseKeywords) --- indra/newview/llpreviewscript.cpp | 8 +++++--- indra/newview/llpreviewscript.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 34ad95e228..19aab8f383 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -34,6 +34,7 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldir.h" +#include "llenvmanager.h" #include "llexternaleditor.h" #include "llfilepicker.h" #include "llfloaterreg.h" @@ -406,13 +407,14 @@ BOOL LLScriptEdCore::postBuild() initMenu(); - initKeywords(); - + onRegionChangeInitialiseKeywords(); + //LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords(), this)); return TRUE; } -void LLScriptEdCore::initKeywords() +void LLScriptEdCore::onRegionChangeInitialiseKeywords() { + mEditor->mKeywords.clearLoaded(); mSyntaxIdLSL.initialise(); mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 149c27461e..2dd5a1b6a7 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -78,7 +78,7 @@ public: ~LLScriptEdCore(); void initMenu(); - void initKeywords(); + void onRegionChangeInitialiseKeywords(); virtual void draw(); /*virtual*/ BOOL postBuild(); -- cgit v1.2.3 From da240d7cf0cccf54a65ca906b612579932aa78e3 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Mon, 11 Nov 2013 16:35:30 +0000 Subject: Commenting out an include for lscript_rt_interface.h, intend to track down and remove all of these, where appropriate, later. --- indra/newview/llfloaterbulkpermission.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 76f62a7880..c3e9a6f5fb 100755 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -36,7 +36,7 @@ #include "llviewerobject.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" -#include "lscript_rt_interface.h" +//#include "lscript_rt_interface.h" #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerobject.h" -- cgit v1.2.3 From 56b1b35a18c21f6dad4147df35ba4594f31b67e3 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 11 Nov 2013 13:21:12 -0500 Subject: STORM-68 Send default permissions to simulator just once after logging in --- indra/newview/llfloaterperms.cpp | 19 ++++++++++++++++--- indra/newview/llfloaterperms.h | 3 ++- indra/newview/llviewerregion.cpp | 5 ++++- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index c167c03c30..f5a9bc7bb5 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -97,6 +97,8 @@ U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix) return flags; } +static bool mCapSent = false; + LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) : LLFloater(seed) { @@ -160,12 +162,18 @@ public: } void result(const LLSD& content) { - LL_INFOS("FloaterPermsResponder") << "Set new values" << LL_ENDL; + LLFloaterPermsDefault::setCapSent(true); + LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL; } }; -void LLFloaterPermsDefault::updateCap() +void LLFloaterPermsDefault::updateCap(bool alwaysUpdate) { + if(!alwaysUpdate && mCapSent) + { + return; + } + std::string object_url = gAgent.getRegion()->getCapability("DefaultObjectPermissions"); if(!object_url.empty()) @@ -178,6 +186,11 @@ void LLFloaterPermsDefault::updateCap() } } +void LLFloaterPermsDefault::setCapSent(bool cap_sent) +{ + mCapSent = cap_sent; +} + void LLFloaterPermsDefault::ok() { // Changes were already applied automatically to saved settings. @@ -186,7 +199,7 @@ void LLFloaterPermsDefault::ok() // We know some setting has changed but not which one. Just in case it was a setting for // object permissions tell the server what the values are. - updateCap(); + updateCap(true); } void LLFloaterPermsDefault::cancel() diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 5fe39a2c1b..a31d034ec8 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -59,7 +59,8 @@ public: void onClickOK(); void onClickCancel(); void onCommitCopy(const LLSD& user_data); - static void updateCap(); + static void updateCap(bool alwaysUpdate); + static void setCapSent(bool cap_sent); enum Categories { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 7b5721cb39..68db98580f 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1487,7 +1487,10 @@ void LLViewerRegion::unpackRegionHandshake() msg->addU32("Flags", 0x0 ); msg->sendReliable(host); - LLFloaterPermsDefault::updateCap(); + // Supplying false in this call means only send the default permissions to the simulator if + // it has never been sent. Once this data is sent the simulator will pass this data to new + // simulators as the agent moves around. + LLFloaterPermsDefault::updateCap(false); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) -- cgit v1.2.3 From dbab46ae786166ac5d6c929e2c444d8f490edd58 Mon Sep 17 00:00:00 2001 From: Cho Date: Mon, 11 Nov 2013 23:13:01 +0000 Subject: made floater_snapshot links open the photo tab on the corresponding floater for ACME-1168 --- indra/newview/llfloaterflickr.cpp | 13 +++++++++++++ indra/newview/llfloaterflickr.h | 2 ++ indra/newview/llfloatersocial.cpp | 13 +++++++++++++ indra/newview/llfloatersocial.h | 2 ++ indra/newview/llfloatertwitter.cpp | 13 +++++++++++++ indra/newview/llfloatertwitter.h | 2 ++ indra/newview/llpanelsnapshotoptions.cpp | 21 +++++++++++++++++++++ 7 files changed, 66 insertions(+) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 1edc61fcf6..7140b527b9 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -46,6 +46,7 @@ #include "llviewerregion.h" #include "llviewercontrol.h" #include "llviewermedia.h" +#include "lltabcontainer.h" static LLRegisterPanelClassWrapper t_panel_photo("llflickrphotopanel"); static LLRegisterPanelClassWrapper t_panel_account("llflickraccountpanel"); @@ -588,6 +589,18 @@ BOOL LLFloaterFlickr::postBuild() return LLFloater::postBuild(); } +void LLFloaterFlickr::showPhotoPanel() +{ + LLTabContainer* parent = dynamic_cast(mSocialPhotoPanel->getParent()); + if (!parent) + { + llwarns << "Cannot find panel container" << llendl; + return; + } + + parent->selectTabPanel(mSocialPhotoPanel); +} + // static void LLFloaterFlickr::preUpdate() { diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h index 8cf2cd2dd6..e9005444d8 100644 --- a/indra/newview/llfloaterflickr.h +++ b/indra/newview/llfloaterflickr.h @@ -110,6 +110,8 @@ public: BOOL postBuild(); void draw(); void onCancel(); + + void showPhotoPanel(); static void preUpdate(); static void postUpdate(); diff --git a/indra/newview/llfloatersocial.cpp b/indra/newview/llfloatersocial.cpp index 2a74c8e3ea..31404da7d3 100644 --- a/indra/newview/llfloatersocial.cpp +++ b/indra/newview/llfloatersocial.cpp @@ -46,6 +46,7 @@ #include "llviewerregion.h" #include "llviewercontrol.h" #include "llviewermedia.h" +#include "lltabcontainer.h" static LLRegisterPanelClassWrapper t_panel_status("llsocialstatuspanel"); static LLRegisterPanelClassWrapper t_panel_photo("llsocialphotopanel"); @@ -823,6 +824,18 @@ BOOL LLFloaterSocial::postBuild() return LLFloater::postBuild(); } +void LLFloaterSocial::showPhotoPanel() +{ + LLTabContainer* parent = dynamic_cast(mSocialPhotoPanel->getParent()); + if (!parent) + { + llwarns << "Cannot find panel container" << llendl; + return; + } + + parent->selectTabPanel(mSocialPhotoPanel); +} + // static void LLFloaterSocial::preUpdate() { diff --git a/indra/newview/llfloatersocial.h b/indra/newview/llfloatersocial.h index bbe07c9704..041ae8a268 100644 --- a/indra/newview/llfloatersocial.h +++ b/indra/newview/llfloatersocial.h @@ -150,6 +150,8 @@ public: BOOL postBuild(); void draw(); void onCancel(); + + void showPhotoPanel(); static void preUpdate(); static void postUpdate(); diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 1324bd5fd8..0da0d64426 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -46,6 +46,7 @@ #include "llviewerregion.h" #include "llviewercontrol.h" #include "llviewermedia.h" +#include "lltabcontainer.h" static LLRegisterPanelClassWrapper t_panel_photo("lltwitterphotopanel"); static LLRegisterPanelClassWrapper t_panel_account("lltwitteraccountpanel"); @@ -565,6 +566,18 @@ BOOL LLFloaterTwitter::postBuild() return LLFloater::postBuild(); } +void LLFloaterTwitter::showPhotoPanel() +{ + LLTabContainer* parent = dynamic_cast(mSocialPhotoPanel->getParent()); + if (!parent) + { + llwarns << "Cannot find panel container" << llendl; + return; + } + + parent->selectTabPanel(mSocialPhotoPanel); +} + // static void LLFloaterTwitter::preUpdate() { diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h index 090e01872a..12e1d41210 100644 --- a/indra/newview/llfloatertwitter.h +++ b/indra/newview/llfloatertwitter.h @@ -108,6 +108,8 @@ public: void draw(); void onCancel(); + void showPhotoPanel(); + static void preUpdate(); static void postUpdate(); diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index 1967c50a29..4cadd837d1 100755 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -32,6 +32,9 @@ #include "llfloatersnapshot.h" // FIXME: create a snapshot model #include "llfloaterreg.h" +#include "llfloatersocial.h" +#include "llfloaterflickr.h" +#include "llfloatertwitter.h" /** * Provides several ways to save a snapshot. @@ -140,17 +143,35 @@ void LLPanelSnapshotOptions::onSaveToComputer() void LLPanelSnapshotOptions::onSendToFacebook() { LLFloaterReg::hideInstance("snapshot"); + + LLFloaterSocial* social_floater = dynamic_cast(LLFloaterReg::getInstance("social")); + if (social_floater) + { + social_floater->showPhotoPanel(); + } LLFloaterReg::showInstance("social"); } void LLPanelSnapshotOptions::onSendToTwitter() { LLFloaterReg::hideInstance("snapshot"); + + LLFloaterTwitter* twitter_floater = dynamic_cast(LLFloaterReg::getInstance("twitter")); + if (twitter_floater) + { + twitter_floater->showPhotoPanel(); + } LLFloaterReg::showInstance("twitter"); } void LLPanelSnapshotOptions::onSendToFlickr() { LLFloaterReg::hideInstance("snapshot"); + + LLFloaterFlickr* flickr_floater = dynamic_cast(LLFloaterReg::getInstance("flickr")); + if (flickr_floater) + { + flickr_floater->showPhotoPanel(); + } LLFloaterReg::showInstance("flickr"); } -- cgit v1.2.3 From 86442d1f8beae66890231c12ddc1cd9e1f1a6170 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 12 Nov 2013 01:43:00 +0000 Subject: added Flickr and Twitter FUI buttons for ACME-1179 --- indra/newview/app_settings/commands.xml | 20 ++++++++++++++++++++ indra/newview/app_settings/toolbars.xml | 2 +- indra/newview/skins/default/xui/en/strings.xml | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 60c942094a..6c9b67ac0b 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -226,6 +226,26 @@ is_running_function="Floater.IsOpen" is_running_parameters="social" /> + + - @@ -22,5 +21,6 @@ + diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 2b707ed84b..b24cca588e 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3893,6 +3893,8 @@ Try enclosing path to the editor with double quotes. Search Snapshot Facebook + Flickr + Twitter Speak Camera controls Voice settings @@ -3921,6 +3923,8 @@ Try enclosing path to the editor with double quotes. Find places, events, people Take a picture Post to Facebook + Upload to Flickr + Twitter Speak with people nearby using your microphone Changing camera angle Volume controls for calls and people near you in world -- cgit v1.2.3 From a718b0d182dd35bdb01973eb3108e8b4a58a627c Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 12 Nov 2013 18:04:23 +0000 Subject: updated Flickr photo upload UI content rating text for ACME-1178 --- indra/newview/skins/default/xui/en/panel_flickr_photo.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml index d7d3fb6c1b..39935a7687 100644 --- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -189,15 +189,15 @@ Use "" for multi-word tags height="21" width="250"> -- cgit v1.2.3 From 9946965c4decd59793adcaa39c70dbf9778d61dd Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 12 Nov 2013 20:07:54 +0000 Subject: replaced Flickr and Twitter FUI icons for ACME-1181 --- indra/newview/app_settings/commands.xml | 4 ++-- indra/newview/skins/default/textures/textures.xml | 2 ++ .../skins/default/textures/toolbar_icons/flickr.png | Bin 0 -> 15530 bytes .../skins/default/textures/toolbar_icons/twitter.png | Bin 0 -> 16051 bytes 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 indra/newview/skins/default/textures/toolbar_icons/flickr.png create mode 100644 indra/newview/skins/default/textures/toolbar_icons/twitter.png diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml index 6c9b67ac0b..f4e9cc0136 100755 --- a/indra/newview/app_settings/commands.xml +++ b/indra/newview/app_settings/commands.xml @@ -228,7 +228,7 @@ /> + + diff --git a/indra/newview/skins/default/textures/toolbar_icons/flickr.png b/indra/newview/skins/default/textures/toolbar_icons/flickr.png new file mode 100644 index 0000000000..7fce9f0df2 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/flickr.png differ diff --git a/indra/newview/skins/default/textures/toolbar_icons/twitter.png b/indra/newview/skins/default/textures/toolbar_icons/twitter.png new file mode 100644 index 0000000000..a99c490887 Binary files /dev/null and b/indra/newview/skins/default/textures/toolbar_icons/twitter.png differ -- cgit v1.2.3 From 9e6dd1811e890d6d5e23059c67f13d9960e56366 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 12 Nov 2013 22:18:05 +0000 Subject: implemented Twitter character limits for status text box for ACME-1171 and ACME-1172 --- indra/newview/llfloatertwitter.cpp | 13 +++++++++++++ indra/newview/skins/default/xui/en/panel_twitter_photo.xml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 0da0d64426..46cad7ec45 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -47,6 +47,7 @@ #include "llviewercontrol.h" #include "llviewermedia.h" #include "lltabcontainer.h" +#include "lltexteditor.h" static LLRegisterPanelClassWrapper t_panel_photo("lltwitterphotopanel"); static LLRegisterPanelClassWrapper t_panel_account("lltwitteraccountpanel"); @@ -112,6 +113,18 @@ void LLTwitterPhotoPanel::draw() bool add_photo = mPhotoCheckbox->getValue().asBoolean(); + // Restrict the status text length to Twitter's character limit + LLTextEditor* status_text_box = dynamic_cast(mStatusTextBox); + if (status_text_box) + { + int max_status_length = add_photo ? 119 : 140; + status_text_box->setMaxTextLength(max_status_length); + if (status_text_box->getText().length() > max_status_length) + { + status_text_box->setText(status_text_box->getText().substr(0, max_status_length)); + } + } + // Display the preview if one is available if (previewp && previewp->getThumbnailImage()) { diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml index 84206c608b..fd2bffe675 100644 --- a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -31,7 +31,7 @@ width="250" left="9" length="1" - max_length="700" + max_length="119" name="photo_status" type="string" word_wrap="true"> -- cgit v1.2.3 From 19c1be0e055bd06cb3083a9c9d126a4907a90788 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 12 Nov 2013 22:37:24 +0000 Subject: replaced Flickr title text_editor to a line_editor for ACME-1169 --- indra/newview/skins/default/xui/en/panel_flickr_photo.xml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml index 39935a7687..b3af271f34 100644 --- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -102,7 +102,7 @@ type="string"> Title: - - + type="string"> + Date: Wed, 13 Nov 2013 18:44:33 +0000 Subject: changed Twitter photo character limit to 100 just to be safe, and switched to use cap server for Flickr and Twitter service --- indra/newview/llflickrconnect.cpp | 4 ++-- indra/newview/llfloaterflickr.cpp | 4 +++- indra/newview/llfloatertwitter.cpp | 2 +- indra/newview/lltwitterconnect.cpp | 4 ++-- indra/newview/skins/default/xui/en/panel_twitter_photo.xml | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 3da3ef22b2..3a21933b63 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -296,8 +296,8 @@ std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - //url = regionp->getCapability("FlickrConnect"); + //url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("FlickrConnect"); url += route; if (include_read_from_master && mReadFromMaster) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 7140b527b9..0bfbd02a04 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -261,11 +261,13 @@ void LLFlickrPhotoPanel::sendPhoto() // Add query parameters so Google Analytics can track incoming clicks! slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; + slurl_string = "VISIT THIS LOCATION"; + // Add it to the description (pretty crude, but we don't have a better option with photos) if (description.empty()) description = slurl_string; else - description = description + " " + slurl_string; + description = description + "\n\n" + slurl_string; } // Get the content rating diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 46cad7ec45..6f8ad109c6 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -117,7 +117,7 @@ void LLTwitterPhotoPanel::draw() LLTextEditor* status_text_box = dynamic_cast(mStatusTextBox); if (status_text_box) { - int max_status_length = add_photo ? 119 : 140; + int max_status_length = add_photo ? 100 : 140; status_text_box->setMaxTextLength(max_status_length); if (status_text_box->getText().length() > max_status_length) { diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index fe45d3e4d0..e015867df2 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -296,8 +296,8 @@ std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, boo LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - //url = regionp->getCapability("TwitterConnect"); + //url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("TwitterConnect"); url += route; if (include_read_from_master && mReadFromMaster) diff --git a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml index fd2bffe675..8e2412c84e 100644 --- a/indra/newview/skins/default/xui/en/panel_twitter_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_twitter_photo.xml @@ -31,7 +31,7 @@ width="250" left="9" length="1" - max_length="119" + max_length="140" name="photo_status" type="string" word_wrap="true"> -- cgit v1.2.3 From 377dd51688dea6bd83f0a9b70be12528f8a891c3 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 13 Nov 2013 20:32:06 +0000 Subject: added fancier link description text and switched back to using dev servers instead of caps for Flickr and Twitter --- indra/newview/llflickrconnect.cpp | 4 ++-- indra/newview/llfloaterflickr.cpp | 3 ++- indra/newview/lltwitterconnect.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 3a21933b63..3da3ef22b2 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -296,8 +296,8 @@ std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - //url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - url = regionp->getCapability("FlickrConnect"); + url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + //url = regionp->getCapability("FlickrConnect"); url += route; if (include_read_from_master && mReadFromMaster) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 0bfbd02a04..5a05c47416 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -53,6 +53,7 @@ static LLRegisterPanelClassWrapper t_panel_account("llflic const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; +const std::string DEFAULT_PHOTO_LINK_TEXT = "VISIT THIS LOCATION NOW"; /////////////////////////// //LLFlickrPhotoPanel/////// @@ -261,7 +262,7 @@ void LLFlickrPhotoPanel::sendPhoto() // Add query parameters so Google Analytics can track incoming clicks! slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; - slurl_string = "VISIT THIS LOCATION"; + slurl_string = "" + DEFAULT_PHOTO_LINK_TEXT + ""; // Add it to the description (pretty crude, but we don't have a better option with photos) if (description.empty()) diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index e015867df2..fe45d3e4d0 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -296,8 +296,8 @@ std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, boo LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - //url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - url = regionp->getCapability("TwitterConnect"); + url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + //url = regionp->getCapability("TwitterConnect"); url += route; if (include_read_from_master && mReadFromMaster) -- cgit v1.2.3 From b267f6754efd2c77042fd4a3f6d2397eac461ce2 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 13 Nov 2013 20:39:07 +0000 Subject: included default secondlife tag in Flickr photo upload for ACME-1184 --- indra/newview/llfloaterflickr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 5a05c47416..97361643ed 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -54,6 +54,7 @@ static LLRegisterPanelClassWrapper t_panel_account("llflic const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; const std::string DEFAULT_PHOTO_LINK_TEXT = "VISIT THIS LOCATION NOW"; +const std::string DEFAULT_TAG_TEXT = "secondlife "; /////////////////////////// //LLFlickrPhotoPanel/////// @@ -98,6 +99,7 @@ BOOL LLFlickrPhotoPanel::postBuild() mDescriptionTextBox = getChild("photo_description"); mLocationCheckbox = getChild("add_location_cb"); mTagsTextBox = getChild("photo_tags"); + mTagsTextBox->setValue(DEFAULT_TAG_TEXT); mRatingComboBox = getChild("rating_combobox"); mPostButton = getChild("post_photo_btn"); mCancelButton = getChild("cancel_photo_btn"); @@ -287,7 +289,7 @@ void LLFlickrPhotoPanel::clearAndClose() { mTitleTextBox->setValue(""); mDescriptionTextBox->setValue(""); - mTagsTextBox->setValue(""); + mTagsTextBox->setValue(DEFAULT_TAG_TEXT); LLFloater* floater = getParentByType(); if (floater) -- cgit v1.2.3 From 758f656100406015bc8b27284670088decbbfabb Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 13 Nov 2013 21:38:19 +0000 Subject: made Twitter status text truncate and untruncate for ACME-1183 --- indra/newview/llfloatertwitter.cpp | 11 ++++++++++- indra/newview/llfloatertwitter.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 6f8ad109c6..06d0fb5542 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -119,9 +119,18 @@ void LLTwitterPhotoPanel::draw() { int max_status_length = add_photo ? 100 : 140; status_text_box->setMaxTextLength(max_status_length); + if (!add_photo) + { + if (mOldStatusText.length() > status_text_box->getText().length() && status_text_box->getText() == mOldStatusText.substr(0, status_text_box->getText().length())) + { + status_text_box->setText(mOldStatusText); + } + mOldStatusText = ""; + } if (status_text_box->getText().length() > max_status_length) { - status_text_box->setText(status_text_box->getText().substr(0, max_status_length)); + mOldStatusText = status_text_box->getText(); + status_text_box->setText(mOldStatusText.substr(0, max_status_length)); } } diff --git a/indra/newview/llfloatertwitter.h b/indra/newview/llfloatertwitter.h index 12e1d41210..686e167b1f 100644 --- a/indra/newview/llfloatertwitter.h +++ b/indra/newview/llfloatertwitter.h @@ -70,6 +70,8 @@ private: LLUICtrl * mPhotoCheckbox; LLUICtrl * mPostButton; LLUICtrl* mCancelButton; + + std::string mOldStatusText; }; class LLTwitterAccountPanel : public LLPanel -- cgit v1.2.3 From 08e0b94ff043b77d96609d9d8f395c0acf2640d0 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 14 Nov 2013 18:48:13 +0000 Subject: changed capitalization of Flickr SLURL link text to 'Visit this location now' for ACME-1186 --- indra/newview/llfloaterflickr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 97361643ed..61ebe563a3 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -53,7 +53,7 @@ static LLRegisterPanelClassWrapper t_panel_account("llflic const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; -const std::string DEFAULT_PHOTO_LINK_TEXT = "VISIT THIS LOCATION NOW"; +const std::string DEFAULT_PHOTO_LINK_TEXT = "Visit this location now"; const std::string DEFAULT_TAG_TEXT = "secondlife "; /////////////////////////// -- cgit v1.2.3 From df78262f0ac19c888bb3416da0df37ece77729dc Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 15 Nov 2013 23:17:06 +0000 Subject: Fixing the stupid mistake that prevented this from compiling. Thanks to Jonathan Yap for spotting it. --- indra/newview/llpreviewscript.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 19aab8f383..c662343238 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -407,8 +407,11 @@ BOOL LLScriptEdCore::postBuild() initMenu(); + // Intialise keyword highlighting for the current simulator's version of LSL onRegionChangeInitialiseKeywords(); - //LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords(), this)); + // Set up a callback for region changes, so that highlighting is updated to the new region's version of LSL + LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); + return TRUE; } -- cgit v1.2.3 From 6b451ffdd6b1c75bd363864e48fbcf9b045dbd67 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Mon, 18 Nov 2013 13:50:49 -0500 Subject: add license header --- indra/newview/llsyntaxid.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index 472e88744f..a79a19be91 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -1,4 +1,29 @@ - +/** + * @file llagentdata.h + * @brief Contains commonly used agent data + * @author Ima Mechanique + * + * $LicenseInfo:firstyear=2013&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2013, 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 LLSYSNTAXIDLSL_H #define LLSYSNTAXIDLSL_H -- cgit v1.2.3 From b7edc965bc77ab21e9a1e3f6b424299a50053529 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 19 Nov 2013 16:32:41 -0500 Subject: STORM-68 Place initial call to send cap in new, better location. Make processing of debug setting names a little more elegant. --- indra/newview/llagent.cpp | 3 +++ indra/newview/llfloaterperms.cpp | 50 ++++++++++++++++++++++------------------ indra/newview/llfloaterperms.h | 5 ++-- indra/newview/llviewerregion.cpp | 1 - 4 files changed, 34 insertions(+), 25 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3870a3be2e..f9301b61a1 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -737,6 +737,9 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Update all of the regions. LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); + + // Send default object permissions to simulator + LLFloaterPermsDefault::updateCap(false); } // Pass new region along to metrics components that care about this level of detail. diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index f5a9bc7bb5..dc4969f5e6 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -1,7 +1,7 @@ /** * @file llfloaterperms.cpp * @brief Asset creation permission preferences. - * @author Coco + * @author Jonathan Yap * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code @@ -43,7 +43,7 @@ LLFloaterPerms::LLFloaterPerms(const LLSD& seed) BOOL LLFloaterPerms::postBuild() { - return true; + return TRUE; } //static @@ -107,17 +107,23 @@ LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this)); } + +// String equivalents of enum Categories - initialization order must match enum order! +const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = +{ + "Objects", + "Uploads", + "Scripts", + "Notecards", + "Gestures", + "Wearables" +}; + + BOOL LLFloaterPermsDefault::postBuild() { 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; @@ -179,9 +185,9 @@ void LLFloaterPermsDefault::updateCap(bool alwaysUpdate) if(!object_url.empty()) { LLSD report = LLSD::emptyMap(); - report["Group"] = (LLSD::Integer)LLFloaterPerms::getGroupPerms("Objects"); - report["Everyone"] = (LLSD::Integer)LLFloaterPerms::getEveryonePerms("Objects"); - report["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms("Objects"); + report["Group"] = (LLSD::Integer)LLFloaterPerms::getGroupPerms(sCategoryNames[CAT_OBJECTS]); + report["Everyone"] = (LLSD::Integer)LLFloaterPerms::getEveryonePerms(sCategoryNames[CAT_OBJECTS]); + report["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]); LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); } } @@ -206,11 +212,11 @@ void LLFloaterPermsDefault::cancel() { for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - 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]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerCopy", mNextOwnerCopy[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerModify", mNextOwnerModify[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerTransfer", mNextOwnerTransfer[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"ShareWithGroup", mShareWithGroup[iter]); + gSavedSettings.setBOOL(sCategoryNames[iter]+"EveryoneCopy", mEveryoneCopy[iter]); } } @@ -218,10 +224,10 @@ void LLFloaterPermsDefault::refresh() { for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++) { - 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"); + mShareWithGroup[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"ShareWithGroup"); + mEveryoneCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"EveryoneCopy"); + mNextOwnerCopy[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerCopy"); + mNextOwnerModify[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerModify"); + mNextOwnerTransfer[iter] = gSavedSettings.getBOOL(sCategoryNames[iter]+"NextOwnerTransfer"); } } diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index a31d034ec8..b4b5d58aa5 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -1,7 +1,7 @@ /** * @file llfloaterperms.h * @brief Asset creation permission preferences. - * @author Coco + * @author Jonathan Yap * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code @@ -62,6 +62,7 @@ public: static void updateCap(bool alwaysUpdate); static void setCapSent(bool cap_sent); +// Update instantiation of sCategoryNames in the .cpp file to match if you change this! enum Categories { CAT_OBJECTS, @@ -77,7 +78,7 @@ private: LLFloaterPermsDefault(const LLSD& seed); void refresh(); - std::string category_names[CAT_LAST]; + static const std::string sCategoryNames[CAT_LAST]; // cached values only for implementing cancel. bool mShareWithGroup[CAT_LAST]; diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 68db98580f..21e0db46c9 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1490,7 +1490,6 @@ void LLViewerRegion::unpackRegionHandshake() // Supplying false in this call means only send the default permissions to the simulator if // it has never been sent. Once this data is sent the simulator will pass this data to new // simulators as the agent moves around. - LLFloaterPermsDefault::updateCap(false); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) -- cgit v1.2.3 From 176901422f0122dad8d1e4e423d0bc19e9e4ad8a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 20 Nov 2013 10:21:41 -0500 Subject: STORM-68 Reapply changes to inventory processing lost in the merge. Move call to updateCap back to where it was. The place it was moved to was too early in the login sequence and was causing a crash. --- indra/newview/llagent.cpp | 3 -- indra/newview/llfloaterperms.cpp | 3 ++ indra/newview/llviewerinventory.cpp | 99 ++++++++++++++++++++++++++++++------- indra/newview/llviewerinventory.h | 2 + indra/newview/llviewerregion.cpp | 1 + 5 files changed, 88 insertions(+), 20 deletions(-) diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7d2b4f6269..d210456993 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -898,9 +898,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp) // Update all of the regions. LLWorld::getInstance()->updateAgentOffset(mAgentOriginGlobal); - - // Send default object permissions to simulator - LLFloaterPermsDefault::updateCap(false); } // Pass new region along to metrics components that care about this level of detail. diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index dc4969f5e6..4923420a3e 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -175,15 +175,18 @@ public: void LLFloaterPermsDefault::updateCap(bool alwaysUpdate) { +llwarns << "DBG start" << llendl; if(!alwaysUpdate && mCapSent) { return; } +llwarns << "DBG getRegion" << llendl; std::string object_url = gAgent.getRegion()->getCapability("DefaultObjectPermissions"); if(!object_url.empty()) { +llwarns << "DBG post" << llendl; LLSD report = LLSD::emptyMap(); report["Group"] = (LLSD::Integer)LLFloaterPerms::getGroupPerms(sCategoryNames[CAT_OBJECTS]); report["Everyone"] = (LLSD::Integer)LLFloaterPerms::getEveryonePerms(sCategoryNames[CAT_OBJECTS]); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index fff9821e86..5e3df16c38 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -65,6 +65,7 @@ #include "llavataractions.h" #include "lllogininstance.h" #include "llfavoritesbar.h" +#include "llfloaterperms.h" // Two do-nothing ops for use in callbacks. void no_op_inventory_func(const LLUUID&) {} @@ -989,6 +990,24 @@ void activate_gesture_cb(const LLUUID& inv_item) LLGestureMgr::instance().activateGesture(inv_item); } +void create_script_cb(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 create_gesture_cb(const LLUUID& inv_item) { if (inv_item.isNull()) @@ -998,6 +1017,13 @@ void create_gesture_cb(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(); @@ -1007,6 +1033,24 @@ void create_gesture_cb(const LLUUID& inv_item) } +void create_notecard_cb(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(); +} + LLInventoryCallbackManager gInventoryCallbacks; void create_inventory_item(const LLUUID& agent_id, const LLUUID& session_id, @@ -1260,22 +1304,43 @@ 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 LLBoostFuncInventoryCallback(create_gesture_cb); - 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 LLBoostFuncInventoryCallback(create_script_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Scripts"); + break; + } + + case LLInventoryType::IT_GESTURE: + { + cb = new LLBoostFuncInventoryCallback(create_gesture_cb); + next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Gestures"); + break; + } + + case LLInventoryType::IT_NOTECARD: + { + cb = new LLBoostFuncInventoryCallback(create_notecard_cb); + 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) @@ -1316,7 +1381,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, 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) { @@ -1325,7 +1390,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, parent_id, LLAssetType::AT_NOTECARD, LLInventoryType::IT_NOTECARD, - PERM_ALL); + PERM_ALL); // overridden in create_new_item } else if ("gesture" == type_name) { @@ -1334,7 +1399,7 @@ void menu_create_inventory_item(LLInventoryPanel* panel, LLFolderBridge *bridge, 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 ab19a12014..dc2fdb8c8d 100755 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -249,7 +249,9 @@ void rez_attachment_cb(const LLUUID& inv_item, LLViewerJointAttachment *attachme void activate_gesture_cb(const LLUUID& inv_item); +void create_script_cb(const LLUUID& inv_item); void create_gesture_cb(const LLUUID& inv_item); +void create_notecard_cb(const LLUUID& inv_item); class AddFavoriteLandmarkCallback : public LLInventoryCallback { diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index c6e67355c3..dd88c5b846 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1577,6 +1577,7 @@ void LLViewerRegion::unpackRegionHandshake() // Supplying false in this call means only send the default permissions to the simulator if // it has never been sent. Once this data is sent the simulator will pass this data to new // simulators as the agent moves around. + LLFloaterPermsDefault::updateCap(false); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) -- cgit v1.2.3 From aec2fde7a4c3114b9081fa3c90f891f8337595ad Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 20 Nov 2013 14:47:00 -0500 Subject: STORM-68 Added default clause to switch statement to try to fix linux compile error. --- indra/newview/llviewerinventory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 5e3df16c38..c52505e4b3 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1328,6 +1328,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 7e749052ca05024ed2ca4c8a799d7ddaf64191d9 Mon Sep 17 00:00:00 2001 From: "niel@mint-32" Date: Wed, 20 Nov 2013 23:59:37 +0000 Subject: storm-1831 Expanding/fixing copyright header --- indra/newview/llsyntaxid.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/indra/newview/llsyntaxid.h b/indra/newview/llsyntaxid.h index a79a19be91..3a711d7460 100644 --- a/indra/newview/llsyntaxid.h +++ b/indra/newview/llsyntaxid.h @@ -1,6 +1,7 @@ /** - * @file llagentdata.h - * @brief Contains commonly used agent data + * @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 * * $LicenseInfo:firstyear=2013&license=viewerlgpl$ -- cgit v1.2.3 From 25c7ea0532b6316639b7efbbfb9f10bfe7e38635 Mon Sep 17 00:00:00 2001 From: "niel@mint-32" Date: Thu, 21 Nov 2013 00:02:15 +0000 Subject: storm-1831 Replacing old region changed callback setup with the shiny new one. --- indra/newview/llpreviewscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index c662343238..362836b5b9 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -410,7 +410,7 @@ BOOL LLScriptEdCore::postBuild() // Intialise keyword highlighting for the current simulator's version of LSL onRegionChangeInitialiseKeywords(); // Set up a callback for region changes, so that highlighting is updated to the new region's version of LSL - LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); + gAgent.addRegionChangedCallback(boost::bind(&LLScriptEdCore::onRegionChangeInitialiseKeywords, this)); return TRUE; } -- cgit v1.2.3 From 483c829aa370dabfc18cbba770a347b25ec80010 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 21 Nov 2013 02:37:40 +0000 Subject: storm-1831 Removing am uneccessary message. --- indra/newview/llsyntaxid.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index 66e0777525..e09b083d9c 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -223,10 +223,6 @@ void LLSyntaxIdLSL::initialise() buildFullFileSpec(); if ( !mSyntaxIdNew.isNull() ) { - LL_INFOS("LSLSyntax") - << "We have an ID for the version, processing it!" - << LL_ENDL; - if ( !gDirUtilp->fileExists(mFullFileSpec) ) { // Does not exist, so fetch it from the capability fetchKeywordsFile(); -- cgit v1.2.3 From b5eb40cfd4849685274f9545b22becd90ba7c858 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 21 Nov 2013 19:28:35 +0000 Subject: storm-1831 Cleaning up output messages SyntaxLSL. --- indra/newview/llsyntaxid.cpp | 55 ++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/indra/newview/llsyntaxid.cpp b/indra/newview/llsyntaxid.cpp index e09b083d9c..605d49b175 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -41,7 +41,7 @@ fetchKeywordsFileResponder::fetchKeywordsFileResponder(std::string filespec) { mFileSpec = filespec; - LL_WARNS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "Instantiating with file saving to: '" << filespec << "'" << LL_ENDL; } @@ -50,11 +50,9 @@ void fetchKeywordsFileResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content) { - LL_WARNS("LSLSyntax") + LL_ERRS("SyntaxLSL") << "fetchKeywordsFileResponder error [status:" - << status - << "]: " - << content + << status << "]: " << content << LL_ENDL; } @@ -71,7 +69,7 @@ void fetchKeywordsFileResponder::result(const LLSD& content_ref) file.write(xml.c_str(), str.str().size()); file.close(); - LL_WARNS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "Syntax file received, saving as: '" << mFileSpec << "'" << LL_ENDL; } @@ -131,8 +129,8 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() { if (!region->capabilitiesReceived()) { // Shouldn't be possible, but experience shows that it may be needed. - LL_WARNS("LSLSyntax") - << "region '" << region->getName() + LL_WARNS("SyntaxLSL") + << "Region '" << region->getName() << "' has not received capabilities yet! Cannot process SyntaxId." << LL_ENDL; } @@ -149,23 +147,16 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() mCapabilityURL = region->getCapability(mCapabilityName); if (mSyntaxIdCurrent != mSyntaxIdNew) { - LL_WARNS("LSLSyntax") - << "Region is '" << region->getName() - << "' it has LSLSyntaxId capability, and the new hash is '" - << mSyntaxIdNew << "'" - << LL_ENDL; + message = "' it has LSLSyntaxId capability, and the new hash is '" + + mSyntaxIdNew.asString() + "'"; changed = true; } else { - LL_WARNS("LSLSyntax") - << "Region is '" << region->getName() - << "' it has the same LSLSyntaxId! Leaving hash as '" - << mSyntaxIdCurrent << "'" - << LL_ENDL; + message = "' it has the same LSLSyntaxId! Leaving hash as '" + + mSyntaxIdCurrent + "'"; } - } else { @@ -180,9 +171,9 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() message = " it does not have LSLSyntaxId capability, using default keywords file!"; changed = true; } - LL_WARNS("LSLSyntax") - << "Region is '" << region->getName() << message << LL_ENDL; } + LL_INFOS("SyntaxLSL") + << "Region is '" << region->getName() << message << LL_ENDL; } } return changed; @@ -199,14 +190,14 @@ void LLSyntaxIdLSL::fetchKeywordsFile() new fetchKeywordsFileResponder(mFullFileSpec), LLSD(), 30.f ); - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "LSLSyntaxId capability URL is: " << mCapabilityURL << ". Filename to use is: '" << mFullFileSpec << "'." << LL_ENDL; } else { - LL_WARNS("LSLSyntax") + LL_ERRS("SyntaxLSL") << "LSLSyntaxId capability URL is empty!!" << LL_ENDL; } } @@ -215,7 +206,7 @@ void LLSyntaxIdLSL::initialise() { if (checkSyntaxIdChanged()) { - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "LSL version has changed, getting appropriate file." << LL_ENDL; @@ -226,13 +217,13 @@ void LLSyntaxIdLSL::initialise() if ( !gDirUtilp->fileExists(mFullFileSpec) ) { // Does not exist, so fetch it from the capability fetchKeywordsFile(); - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "File is not cached, we will try to download it!" << LL_ENDL; } else { - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "File is cached, no need to download!" << LL_ENDL; loadKeywordsIntoLLSD(); @@ -240,7 +231,7 @@ void LLSyntaxIdLSL::initialise() } else { // Need to open the default - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "LSLSyntaxId is null so we will use the default file!" << LL_ENDL; loadKeywordsIntoLLSD(); @@ -250,7 +241,7 @@ void LLSyntaxIdLSL::initialise() } else { - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "No change to Syntax! Nothing to see. Move along now!" << LL_ENDL; } @@ -267,7 +258,7 @@ void LLSyntaxIdLSL::initialise() */ bool LLSyntaxIdLSL::loadKeywordsIntoLLSD() { - LL_INFOS("LSLSyntax") + LL_INFOS("SyntaxLSL") << "Trying to open cached or default keyword file ;-)" << LL_ENDL; @@ -280,7 +271,7 @@ bool LLSyntaxIdLSL::loadKeywordsIntoLLSD() loaded = (bool)LLSDSerialize::fromXML(content, file); if (!loaded) { - LL_WARNS("LSLSyntax") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; + LL_ERRS("SyntaxLSL") << "Unable to deserialise file: " << mFullFileSpec << LL_ENDL; // Is this the right thing to do, or should we leave the old content // even if it isn't entirely accurate anymore? @@ -289,12 +280,12 @@ bool LLSyntaxIdLSL::loadKeywordsIntoLLSD() else { sKeywordsXml = content; - LL_INFOS("LSLSyntax") << "Deserialised file: " << mFullFileSpec << LL_ENDL; + LL_INFOS("SyntaxLSL") << "Deserialised file: " << mFullFileSpec << LL_ENDL; } } else { - LL_WARNS("LSLSyntax") << "Unable to open file: " << mFullFileSpec << LL_ENDL; + LL_ERRS("SyntaxLSL") << "Unable to open file: " << mFullFileSpec << LL_ENDL; } return loaded; } -- cgit v1.2.3 From fa5c3320cc9c50462b222b1b1197d9c16064983e Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 21 Nov 2013 19:55:38 +0000 Subject: storm-1831 Cleaning up colour LLSD processing code which is no longer used as colours come from the colors XML file. --- indra/llui/llkeywords.cpp | 58 +---------------------------------------------- indra/llui/llkeywords.h | 2 -- 2 files changed, 1 insertion(+), 59 deletions(-) diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp index 6aeaf4798b..5f5810812e 100755 --- a/indra/llui/llkeywords.cpp +++ b/indra/llui/llkeywords.cpp @@ -67,10 +67,7 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const return res; } -LLKeywords::LLKeywords() : mLoaded(FALSE) -{ - //setFilenameSyntax( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords_lsl_default.xml") ); -} +LLKeywords::LLKeywords() : mLoaded(FALSE) { } LLKeywords::~LLKeywords() { @@ -205,59 +202,6 @@ bool LLKeywords::initialise(LLSD SyntaxXML) return mLoaded; } -///** -// * @brief Start processing the colour LLSD from its beginning. -// * -// */ -//std::string LLKeywords::processColors() -//{ -// return processColors(mColors, ""); -//} - -///** -// * @brief Recursively process the colour LLSD from an arbitrary level. -// * @desc Process the supplied LLSD for colour data. The strPrefix is a string -// * of hyphen separated keys from previous levels. -// */ -//std::string LLKeywords::processColors(LLSD &settings, const std::string strPrefix) -//{ -// if (settings.isMap() || (! settings.isMap() && strPrefix != "") ) -// { -// LLSD llsd_map = settings; - -// LLSD::map_iterator my_iter = llsd_map.beginMap(); -// for ( ; my_iter != llsd_map.endMap(); ++my_iter) -// { -// std::string strGroup = strPrefix; -// const LLSD::String& key = my_iter->first; -// LLSD& value = my_iter->second; -// -// if (key == "color") -// { -// if (value.isMap() || value.isArray()) -// { -// addColorGroup(strGroup, readColor(value)); -// } -// else -// { -// LL_WARNS("Invalid Color") << "Invalid Color Entry - first: '" << key << "' second: '" << value << "'" << LL_ENDL; -// } -// } -// else if (value.isMap()) -// { -// strGroup += (strGroup.length() == 0) ? my_iter->first : "-" + my_iter->first; -// strGroup = processColors(value, strGroup); -// } -// else -// { -// LL_WARNS("Invalid Color") << "Invalid Color Entry - first: '" << key << "' second: '" << value << "'" << LL_ENDL; -// } -// } -// } -// return strPrefix; -//} -//*/ - void LLKeywords::processTokens() { // Add 'standard' stuff: Quotes, Comments, Strings, Labels, etc. before processing the LLSD diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h index 074cedfc63..d0f1de8389 100755 --- a/indra/llui/llkeywords.h +++ b/indra/llui/llkeywords.h @@ -118,8 +118,6 @@ public: void findSegments(std::vector *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor ); bool initialise(LLSD SyntaxXML); - std::string processColors(); - std::string processColors(LLSD &data, const std::string strGroup); void processTokens(); // Add the token as described -- cgit v1.2.3 From 380334956c6689c2091e95969a7f79a29db49a4d Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Thu, 21 Nov 2013 21:29:24 +0000 Subject: storm-1831 Fixing message string UUID assignment --- 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 605d49b175..43f840544c 100644 --- a/indra/newview/llsyntaxid.cpp +++ b/indra/newview/llsyntaxid.cpp @@ -155,7 +155,7 @@ bool LLSyntaxIdLSL::checkSyntaxIdChanged() else { message = "' it has the same LSLSyntaxId! Leaving hash as '" - + mSyntaxIdCurrent + "'"; + + mSyntaxIdCurrent.asString() + "'"; } } else -- cgit v1.2.3 From 7563fb0b5181fa7223cb08f79e2710f9d44aded3 Mon Sep 17 00:00:00 2001 From: Ima Mechanique Date: Fri, 22 Nov 2013 01:01:29 +0000 Subject: storm-1831 Replacing old hack with an ENUM check. --- indra/newview/llpreviewscript.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 362836b5b9..41c172e629 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -421,7 +421,6 @@ void LLScriptEdCore::onRegionChangeInitialiseKeywords() mSyntaxIdLSL.initialise(); mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML()); - LLColor3 color(0.5f, 0.0f, 0.15f); mEditor->loadKeywords(); std::vector primary_keywords; @@ -431,8 +430,7 @@ void LLScriptEdCore::onRegionChangeInitialiseKeywords() for (token_it = mEditor->keywordsBegin(); token_it != mEditor->keywordsEnd(); ++token_it) { token = token_it->second; - // FIX: change this to use the new Token Type enum entries. - if (token->getColor() == color) // Wow, what a disgusting hack. + if (token->getType() == LLKeywordToken::TT_FUNCTION) { primary_keywords.push_back( wstring_to_utf8str(token->getToken()) ); } -- cgit v1.2.3 From bf86275d78b041faffc646195bc16ecabaa3bdb7 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 26 Nov 2013 01:47:37 +0000 Subject: LLTwitterConnect and LLFlickrConnect now use caps again, instead of pdp15 --- indra/newview/llflickrconnect.cpp | 4 ++-- indra/newview/lltwitterconnect.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 3da3ef22b2..3a21933b63 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -296,8 +296,8 @@ std::string LLFlickrConnect::getFlickrConnectURL(const std::string& route, bool LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - //url = regionp->getCapability("FlickrConnect"); + //url = "http://pdp15.lindenlab.com/flickr/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("FlickrConnect"); url += route; if (include_read_from_master && mReadFromMaster) diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index fe45d3e4d0..e015867df2 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -296,8 +296,8 @@ std::string LLTwitterConnect::getTwitterConnectURL(const std::string& route, boo LLViewerRegion *regionp = gAgent.getRegion(); if (regionp) { - url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO - //url = regionp->getCapability("TwitterConnect"); + //url = "http://pdp15.lindenlab.com/twitter/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO + url = regionp->getCapability("TwitterConnect"); url += route; if (include_read_from_master && mReadFromMaster) -- cgit v1.2.3 From 25d0a3e029cb68a14cc7c3417cc43cb3ffa90925 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Thu, 6 Feb 2014 16:19:03 -0800 Subject: [GroupBan] When adding "Manage Ban List" ability additionally grant requisite abilities - Viewer side implementation for MAINT-3467 complete --- indra/llcommon/roles_constants.h | 2 +- indra/newview/llgroupmgr.cpp | 2 +- indra/newview/llpanelgrouproles.cpp | 160 +++++++++++++++++---- indra/newview/llpanelgrouproles.h | 7 +- indra/newview/llviewerregion.cpp | 2 +- .../newview/skins/default/xui/en/notifications.xml | 30 +++- .../newview/skins/default/xui/en/role_actions.xml | 12 +- 7 files changed, 177 insertions(+), 38 deletions(-) diff --git a/indra/llcommon/roles_constants.h b/indra/llcommon/roles_constants.h index 598cd48e22..8fd7978fa1 100755 --- a/indra/llcommon/roles_constants.h +++ b/indra/llcommon/roles_constants.h @@ -60,7 +60,7 @@ enum LLRoleChangeType // bit 0x1 << 46 (GP_PROPOSAL_VIEW) const U64 GP_NO_POWERS = 0x0; -const U64 GP_ALL_POWERS = 0xFFFFFFFFFFFFFFFFLL; +const U64 GP_ALL_POWERS = 0xFFFFffffFFFFffffLL; // Membership const U64 GP_MEMBER_INVITE = 0x1LL << 1; // Invite member diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp index 1e5c43dcdf..a33731a200 100755 --- a/indra/newview/llgroupmgr.cpp +++ b/indra/newview/llgroupmgr.cpp @@ -1895,7 +1895,7 @@ void LLGroupMgr::sendGroupBanRequest( EBanRequestType request_type, } // Get our capability - std::string cap_url = currentRegion->getCapability("GroupBan"); + std::string cap_url = currentRegion->getCapability("GroupAPIv1"); if(cap_url.empty()) { return; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index ad0e7ba753..adcac17c16 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -438,6 +438,7 @@ LLPanelGroupSubTab::LLPanelGroupSubTab() mHeader(NULL), mFooter(NULL), mActivated(false), + mHasGroupBanPower(false), mSearchEditor(NULL) { } @@ -559,9 +560,10 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl, return; } + mHasGroupBanPower = false; + std::vector::iterator ras_it = LLGroupMgr::getInstance()->mRoleActionSets.begin(); std::vector::iterator ras_end = LLGroupMgr::getInstance()->mRoleActionSets.end(); - for ( ; ras_it != ras_end; ++ras_it) { buildActionCategory(ctrl, @@ -691,6 +693,31 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, row["columns"][column_index]["value"] = (*ra_it)->mDescription; row["columns"][column_index]["font"] = "SANSSERIF_SMALL"; + if(mHasGroupBanPower) + { + // The ban ability is being set. Prevent these abilities from being manipulated + if((*ra_it)->mPowerBit == GP_MEMBER_EJECT) + { + row["enabled"] = false; + } + else if((*ra_it)->mPowerBit == GP_ROLE_REMOVE_MEMBER) + { + row["enabled"] = false; + } + } + else + { + // The ban ability is not set. Allow these abilities to be manipulated + if((*ra_it)->mPowerBit == GP_MEMBER_EJECT) + { + row["enabled"] = true; + } + else if((*ra_it)->mPowerBit == GP_ROLE_REMOVE_MEMBER) + { + row["enabled"] = true; + } + } + LLScrollListItem* item = ctrl->addElement(row, ADD_BOTTOM, (*ra_it)); if (-1 != check_box_index) @@ -726,6 +753,15 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl, check->setTentative(TRUE); } } + + // Regardless of whether or not this ability is allowed by all or some, we want to prevent + // the group managers from accidentally disabling either of the two additional abilities + // tied with GP_GROUP_BAN_ACCESS. + if( (allowed_by_all & GP_GROUP_BAN_ACCESS) == GP_GROUP_BAN_ACCESS || + (allowed_by_some & GP_GROUP_BAN_ACCESS) == GP_GROUP_BAN_ACCESS) + { + mHasGroupBanPower = true; + } } } @@ -1989,7 +2025,7 @@ void LLPanelGroupRolesSubTab::update(LLGroupChange gc) mRolesList->sortByColumn(std::string("name"), TRUE); if ( (gdatap->mRoles.size() < (U32)MAX_ROLES) - && gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS) ) + && gAgent.hasPowerInGroup(mGroupID, GP_ROLE_CREATE) ) { mCreateRoleButton->setEnabled(TRUE); } @@ -2219,40 +2255,115 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) LLRoleAction* rap = (LLRoleAction*)action_item->getUserdata(); U64 power = rap->mPowerBit; - if (check->get()) + bool isEnablingAbility = check->get(); + LLRoleData rd; + LLSD args; + + if (isEnablingAbility && + !force && + ((GP_ROLE_ASSIGN_MEMBER == power) || (GP_ROLE_CHANGE_ACTIONS == power) )) { - if (!force && ( (GP_ROLE_ASSIGN_MEMBER == power) - || (GP_ROLE_CHANGE_ACTIONS == power) )) + // Uncheck the item, for now. It will be + // checked if they click 'Yes', below. + check->set(FALSE); + + LLRoleData rd; + LLSD args; + + if ( gdatap->getRoleData(role_id, rd) ) + { + args["ACTION_NAME"] = rap->mDescription; + args["ROLE_NAME"] = rd.mRoleName; + mHasModal = TRUE; + std::string warning = "AssignDangerousActionWarning"; + if (GP_ROLE_CHANGE_ACTIONS == power) + { + warning = "AssignDangerousAbilityWarning"; + } + LLNotificationsUtil::add(warning, args, LLSD(), boost::bind(&LLPanelGroupRolesSubTab::addActionCB, this, _1, _2, check)); + } + else { - // Uncheck the item, for now. It will be - // checked if they click 'Yes', below. - check->set(FALSE); + llwarns << "Unable to look up role information for role id: " + << role_id << llendl; + } + } - LLRoleData rd; - LLSD args; + if(GP_GROUP_BAN_ACCESS == power) + { + std::string warning = isEnablingAbility ? "AssignBanAbilityWarning" : "RemoveBanAbilityWarning"; - if ( gdatap->getRoleData(role_id, rd) ) + ////////////////////////////////////////////////////////////////////////// + // Get role data for both GP_ROLE_REMOVE_MEMBER and GP_MEMBER_EJECT + // Add description and role name to LLSD + // Pop up dialog saying "Yo, you also granted these other abilities when you did this!" + if ( gdatap->getRoleData(role_id, rd) ) + { + args["ACTION_NAME"] = rap->mDescription; + args["ROLE_NAME"] = rd.mRoleName; + mHasModal = TRUE; + + std::vector all_data = mAllowedActionsList->getAllData(); + std::vector::iterator ad_it = all_data.begin(); + std::vector::iterator ad_end = all_data.end(); + LLRoleAction* adp; + for( ; ad_it != ad_end; ++ad_it) { - args["ACTION_NAME"] = rap->mDescription; - args["ROLE_NAME"] = rd.mRoleName; - mHasModal = TRUE; - std::string warning = "AssignDangerousActionWarning"; - if (GP_ROLE_CHANGE_ACTIONS == power) + adp = (LLRoleAction*)(*ad_it)->getUserdata(); + if(adp->mPowerBit == GP_MEMBER_EJECT) { - warning = "AssignDangerousAbilityWarning"; + args["ACTION_NAME_2"] = adp->mDescription; + } + else if(adp->mPowerBit == GP_ROLE_REMOVE_MEMBER) + { + args["ACTION_NAME_3"] = adp->mDescription; } - LLNotificationsUtil::add(warning, args, LLSD(), boost::bind(&LLPanelGroupRolesSubTab::addActionCB, this, _1, _2, check)); - } - else - { - llwarns << "Unable to look up role information for role id: " - << role_id << llendl; } + + LLNotificationsUtil::add(warning, args); + } + else + { + llwarns << "Unable to look up role information for role id: " + << role_id << llendl; + } + + ////////////////////////////////////////////////////////////////////////// + + LLGroupMgrGroupData::role_list_t::iterator rit = gdatap->mRoles.find(role_id); + U64 current_role_powers = GP_NO_POWERS; + if (rit != gdatap->mRoles.end()) + { + current_role_powers = ((*rit).second->getRoleData().mRolePowers); + } + + if(isEnablingAbility) + { + power |= (GP_ROLE_REMOVE_MEMBER | GP_MEMBER_EJECT); + current_role_powers |= power; } else { - gdatap->addRolePower(role_id,power); + current_role_powers |= (GP_ROLE_REMOVE_MEMBER | GP_MEMBER_EJECT); } + + mAllowedActionsList->deleteAllItems(); + buildActionsList( mAllowedActionsList, + current_role_powers, + current_role_powers, + boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false), + TRUE, + FALSE, + FALSE); + + } + + ////////////////////////////////////////////////////////////////////////// + // Adding non-specific ability to role + ////////////////////////////////////////////////////////////////////////// + if(isEnablingAbility) + { + gdatap->addRolePower(role_id, power); } else { @@ -2261,6 +2372,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) mHasRoleChange = TRUE; notifyObservers(); + } bool LLPanelGroupRolesSubTab::addActionCB(const LLSD& notification, const LLSD& response, LLCheckBoxCtrl* check) diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index e74e4f746d..26f1dff007 100755 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -142,7 +142,10 @@ protected: icon_map_t mActionIcons; bool mActivated; - + + bool mHasGroupBanPower; // Used to communicate between action sets due to the dependency between + // GP_GROUP_BAN_ACCESS and GP_EJECT_MEMBER and GP_ROLE_REMOVE_MEMBER + void setOthersVisible(BOOL b); }; @@ -246,7 +249,7 @@ public: static void onActionCheck(LLUICtrl*, void*); bool addActionCB(const LLSD& notification, const LLSD& response, LLCheckBoxCtrl* check); - + static void onPropertiesKey(LLLineEditor*, void*); void onDescriptionKeyStroke(LLTextEditor* caller); diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 20b210e69a..59d008d54d 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1604,7 +1604,7 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) capabilityNames.append("GetObjectCost"); capabilityNames.append("GetObjectPhysicsData"); capabilityNames.append("GetTexture"); - capabilityNames.append("GroupBan"); + capabilityNames.append("GroupAPIv1"); capabilityNames.append("GroupMemberData"); capabilityNames.append("GroupProposalBallot"); capabilityNames.append("HomeLocation"); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 35f2e7b31e..ccd2113292 100755 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -506,7 +506,35 @@ Add this Ability to '[ROLE_NAME]'? notext="No" yestext="Yes"/> - + + +You are about to add the Ability '[ACTION_NAME]' to the Role '[ROLE_NAME]'. + + *WARNING* +Any Member in a Role with this Ability will also be granted the Abilities '[ACTION_NAME_2]' and '[ACTION_NAME_3]' + + + + +You are removing the Ability '[ACTION_NAME]' to the Role '[ROLE_NAME]'. + + *WARNING* +Removing this ability will NOT remove the Abilities '[ACTION_NAME_2]' and '[ACTION_NAME_3]'. + +If you no longer wish to have these abilities granted to this role, disable them immediately! + + + - - - @@ -16,7 +9,10 @@ - + -- cgit v1.2.3 From 454c5ed631d15441dd50503ab457688fe0289867 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Thu, 13 Feb 2014 10:25:33 -0800 Subject: [MAINT-3721] - Viewer crash upon click invite - Fixed a crash that would happen when a resident attempts to invite someone into a group --- indra/newview/llpanelgroupinvite.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index 19689e7f4b..a368baee48 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -251,6 +251,10 @@ void LLPanelGroupInvite::submit() void LLPanelGroupInvite::addRoleNames() { LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID); + if(!gdatap) + { + return; + } LLGroupMgrGroupData::member_list_t::iterator agent_iter = gdatap->mMembers.find(gAgent.getID()); -- cgit v1.2.3 From 37e34f6035edcc2cf1fb941f9c189f8fbd0772ef Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Wed, 19 Feb 2014 16:06:43 -0800 Subject: [MAINT-3751] - Can't uncheck Ban ability from role - Fixed an issue where, once granted the ban ability, it could not become unchecked. --- indra/newview/llpanelgrouproles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index adcac17c16..06932a7ec5 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -2344,7 +2344,7 @@ void LLPanelGroupRolesSubTab::handleActionCheck(LLUICtrl* ctrl, bool force) } else { - current_role_powers |= (GP_ROLE_REMOVE_MEMBER | GP_MEMBER_EJECT); + current_role_powers &= ~GP_GROUP_BAN_ACCESS; } mAllowedActionsList->deleteAllItems(); -- cgit v1.2.3 From 910b40c12062181fd6d5d82d169c29632c95c830 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Wed, 5 Mar 2014 10:15:41 -0800 Subject: [MAINT-3385] Filter function of Banned Agents doesn't work - Removed filter --- indra/newview/skins/default/xui/en/panel_group_roles.xml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index 9c3dddf476..783106b887 100755 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -300,16 +300,6 @@ name="help_text"> Any resident on the ban list will be unable to join the group. - Date: Tue, 11 Mar 2014 16:19:49 -0700 Subject: - Added null checks in a couple places. --- indra/newview/llpanelgroupinvite.cpp | 5 +++++ indra/newview/llpanelgrouproles.cpp | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/indra/newview/llpanelgroupinvite.cpp b/indra/newview/llpanelgroupinvite.cpp index a368baee48..48736be253 100755 --- a/indra/newview/llpanelgroupinvite.cpp +++ b/indra/newview/llpanelgroupinvite.cpp @@ -184,6 +184,11 @@ void LLPanelGroupInvite::submit() 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; + } // Default to everyone role. LLUUID role_id = LLUUID::null; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 06932a7ec5..b1ea8b7e57 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1903,6 +1903,12 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) lldebugs << "LLPanelGroupRolesSubTab::needsApply()" << llendl; LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + if(!gdatap) + { + llwarns << "Unable to get group data for group " << mGroupID << llendl; + return; + } + return (mHasRoleChange // Text changed in current role || (gdatap && gdatap->pendingRoleChanges())); // Pending role changes in the group -- cgit v1.2.3 From c64486b6ffa78adbf619ff59fd3cb1c263e5c742 Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Tue, 11 Mar 2014 17:10:10 -0700 Subject: Fixed up some compile errors after merge --- indra/newview/llpanelgrouproles.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 67a8493d63..d1eae8027a 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1908,7 +1908,7 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg) if(!gdatap) { llwarns << "Unable to get group data for group " << mGroupID << llendl; - return; + return false; } @@ -2784,7 +2784,7 @@ void LLPanelGroupActionsSubTab::setGroupID(const LLUUID& id) // LLPanelGroupBanListSubTab ///////////////////////////////////////////// -static LLPanelInjector t_panel_group_members_subtab("panel_group_banlist_subtab"); +static LLPanelInjector t_panel_group_ban_subtab("panel_group_banlist_subtab"); LLPanelGroupBanListSubTab::LLPanelGroupBanListSubTab() : LLPanelGroupSubTab(), -- cgit v1.2.3 From aef1cc0576c4bf1e7248f1008a1582771845c59f Mon Sep 17 00:00:00 2001 From: Baker Linden Date: Tue, 25 Mar 2014 16:21:07 -0700 Subject: [GroupBan] - Fixed stuff... again - Put "Ban Members" button back in Member tab Reviewer: Richard --- indra/newview/llpanelgrouproles.cpp | 45 ++++++++++++++++++---- .../newview/skins/default/xui/en/floater_about.xml | 2 +- .../skins/default/xui/en/panel_group_roles.xml | 7 ++++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index d1eae8027a..5093207c50 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -1012,15 +1012,15 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() } // If anyone selected is in any role besides 'Everyone' then they can't be ejected. - if (role_id.notNull() && (count > 0)) - { + if (role_id.notNull() && (count > 0)) + { can_eject_members = FALSE; - can_ban_members = FALSE; - if (role_id == gdatap->mOwnerRole) - { - member_is_owner = TRUE; - } - } + can_ban_members = FALSE; + if (role_id == gdatap->mOwnerRole) + { + member_is_owner = TRUE; + } + } LLRoleData rd; if (gdatap->getRoleData(role_id,rd)) @@ -1096,6 +1096,35 @@ void LLPanelGroupMembersSubTab::handleMemberSelect() can_ban_members = TRUE; } } + + } + + // ... or we can eject them because we have all the requisite powers... + if( gAgent.hasPowerInGroup(mGroupID, GP_ROLE_REMOVE_MEMBER) && + !member_is_owner) + { + if( gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_EJECT)) + { + can_eject_members = TRUE; + } + + if( gAgent.hasPowerInGroup(mGroupID, GP_GROUP_BAN_ACCESS)) + { + can_ban_members = TRUE; + } + } + + + uuid_vec_t::const_iterator member_iter = selected_members.begin(); + uuid_vec_t::const_iterator member_end = selected_members.end(); + for ( ; member_iter != member_end; ++member_iter) + { + // Don't count the agent. + if ((*member_iter) == gAgent.getID()) + { + can_eject_members = FALSE; + can_ban_members = FALSE; + } } mBanBtn->setEnabled(can_ban_members); diff --git a/indra/newview/skins/default/xui/en/floater_about.xml b/indra/newview/skins/default/xui/en/floater_about.xml index 9668cfa526..ef2f158a86 100755 --- a/indra/newview/skins/default/xui/en/floater_about.xml +++ b/indra/newview/skins/default/xui/en/floater_about.xml @@ -72,7 +72,7 @@ Second Life is brought to you by the Lindens: top_pad="10" width="435" word_wrap="true"> -Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase +Philip, Andrew, Doug, Richard, Phoenix, Ian, Mark, Robin, Dan, Char, Ryan, Eric, Jim, Lee, Jeff, Michael, Kelly, Steve, Catherine, Bub, Ramzi, Jill, Jeska, Don, Kona, Callum, Charity, Jack, Shawn, babbage, James, Lauren, Blue, Brent, Reuben, Pathfinder, Jesse, Patsy, Torley, Bo, Cyn, Jonathan, Gia, Annette, Ginsu, Harry, Lex, Runitai, Guy, Cornelius, Beth, Swiss, Thumper, Wendy, Teeple, Seth, Dee, Mia, Sally, Liana, Aura, Beez, Milo, Red, Gulliver, Marius, Joe, Jose, Dore, Justin, Nora, Morpheus, Lexie, Amber, Chris, Xan, Leyla, Walker, Sabin, Joshua, Hiromi, Tofu, Fritz, June, Jean, Ivy, Dez, Ken, Betsy, Which, Spike, Rob, Zee, Dustin, George, Claudia, del, Matthew, jane, jay, Adrian, Yool, Rika, Yoz, siobhan, Qarl, Benjamin, Beast, Everett, madhavi, Christopher, Izzy, stephany, Jeremy, sean, adreanne, Pramod, Tobin, sejong, Iridium, maurice, kj, Meta, kari, JP, bert, kyle, Jon, Socrates, Bridie, Ivan, maria, Aric, Coco, Periapse, sandy, Storrs, Lotte, Colossus, Brad, Pastrami, Zen, BigPapi, Banzai, Sardonyx, Mani, Garry, Jaime, Neuro, Samuel, Niko, CeeLo, Austin, Soft, Poppy, emma, tessa, angelo, kurz, alexa, Sue, CG, Blake, Erica, Brett, Bevis, kristen, Q, simon, Enus, MJ, laurap, Kip, Scouse, Ron, Ram, kend, Marty, Prospero, melissa, kraft, Nat, Seraph, Hamilton, Lordan, Green, miz, Ashlei, Trinity, Ekim, Echo, Charlie, Rowan, Rome, Jt, Doris, benoc, Christy, Bao, Kate, Tj, Patch, Cheah, Johan, Brandy, Angela, Oreh, Cogsworth, Lan, Mitchell, Space, Bambers, Einstein, Bender, Malbers, Matias, Maggie, Rothman, Milton, Niall, Marin, Allison, Mango, Andrea, Katt, Yi, Ambroff, Rico, Raymond, Gail, Christa, William, Dawn, Usi, Dynamike, M, Corr, Dante, Molly, kaylee, Danica, Kelv, Lil, jacob, Nya, Rodney, elsie, Blondin, Grant, Nyx, Devin, Monty, Minerva, Keira, Katie, Jenn, Makai, Clare, Joy, Cody, Gayathri, FJ, spider, Oskar, Landon, Jarv, Noelle, Al, Doc, Gray, Vir, t, Maestro, Simone, Shannon, yang, Courtney, Scott, charlene, Quixote, Susan, Zed, Amanda, Katelin, Esbee, JoRoan, Enkidu, roxie, Scarlet, Merov, Kevin, Judy, Rand, Newell, Les, Dessie, Galen, Michon, Geo, Siz, Calyle, Pete, Praveen, Callen, Sheldon, Pink, Nelson, jenelle, Terrence, Nathan, Juan, Sascha, Huseby, Karina, Kaye, Kotler, Lis, Darv, Charrell, Dakota, Kimmora, Theeba, Taka, Mae, Perry, Ducot, dana, Esther, Dough, gisele, Doten, Viale, Fisher, jessieann, ashley, Torres, delby, rountree, kurt, Slaton, Madison, Rue, Gino, Wen, Casssandra, Brodesky, Squid, Gez, Rakesh, Gecko, Ladan, Tony, Tatem, Squire, Falcon, BK, Crimp, Tiggs, Bacon, Coyot, Carmilla, Webb, Sea, Arch, Jillian, Jason, Bernard, Vogt, Peggy, dragon, Pup, xandix, Wallace, Bewest, Inoshiro, Rhett, AG, Aimee, Ghengis, Itiaes, Eli, Steffan, Epic, Grapes, Stone, Prep, Scobu, Robert, Alain, Carla, Vicky, Tia, Alec, Taras, Lisa, Oz, Ariane, Log, House, Kazu, Kim, Drofnas, Tyler, Campbell, Michele, Madeline, Nelly, Baron, Thor, Lori, Hele, Fredrik, Teddy, Pixie, Berry, Gabrielle, Alfonso, Brooke, Wolf, Ringo, Cru, Charlar, Rodvik, Gibson, Elise, Bagman, Greger, Leonidas, Jerm, Leslie, CB, Brenda, Durian, Carlo, mm, Zeeshan, Caleb, Max, Elikak, Mercille, Steph, Chase, Baker + + + + + [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share/ta-p/2149711 Learn about posting to Facebook] + + + diff --git a/indra/newview/skins/default/xui/en/panel_facebook_photo.xml b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml new file mode 100644 index 0000000000..19f9f2fb74 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + [SIZE] KB + + + + + + Refreshing... + + + Comment (optional): + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_facebook_place.xml b/indra/newview/skins/default/xui/en/panel_facebook_place.xml new file mode 100644 index 0000000000..1eea8f317b --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_facebook_place.xml @@ -0,0 +1,132 @@ + + + + + Say something about where you are: + + + + + + + + + + + + + + + Include overhead view of location + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_facebook_status.xml b/indra/newview/skins/default/xui/en/panel_facebook_status.xml new file mode 100644 index 0000000000..50e15c2e80 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_facebook_status.xml @@ -0,0 +1,67 @@ + + + + + What's on your mind? + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_social_account.xml b/indra/newview/skins/default/xui/en/panel_social_account.xml deleted file mode 100644 index d7235396fe..0000000000 --- a/indra/newview/skins/default/xui/en/panel_social_account.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Not connected to Facebook. - - - - - - - - [http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-Share/ta-p/2149711 Learn about posting to Facebook] - - - diff --git a/indra/newview/skins/default/xui/en/panel_social_photo.xml b/indra/newview/skins/default/xui/en/panel_social_photo.xml deleted file mode 100644 index a55613b52a..0000000000 --- a/indra/newview/skins/default/xui/en/panel_social_photo.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - [SIZE] KB - - - - - - Refreshing... - - - Comment (optional): - - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_social_place.xml b/indra/newview/skins/default/xui/en/panel_social_place.xml deleted file mode 100644 index 13e94f6998..0000000000 --- a/indra/newview/skins/default/xui/en/panel_social_place.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Say something about where you are: - - - - - - - - - - - - - - - Include overhead view of location - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/panel_social_status.xml b/indra/newview/skins/default/xui/en/panel_social_status.xml deleted file mode 100644 index 54cfa3f524..0000000000 --- a/indra/newview/skins/default/xui/en/panel_social_status.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - What's on your mind? - - - - - - - - - - diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index b24cca588e..3806e1287c 100755 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -3877,6 +3877,8 @@ Try enclosing path to the editor with double quotes. Conversations Compass Destinations + Facebook + Flickr Gestures How to Inventory @@ -3892,10 +3894,8 @@ Try enclosing path to the editor with double quotes. Profile Search Snapshot - Facebook - Flickr - Twitter Speak + Twitter Camera controls Voice settings @@ -3907,6 +3907,8 @@ Try enclosing path to the editor with double quotes. Converse with everyone Compass Destinations of interest + Post to Facebook + Upload to Flickr Gestures for your avatar How to do common tasks View and use your belongings @@ -3922,10 +3924,8 @@ Try enclosing path to the editor with double quotes. Edit or view your profile Find places, events, people Take a picture - Post to Facebook - Upload to Flickr - Twitter Speak with people nearby using your microphone + Twitter Changing camera angle Volume controls for calls and people near you in world -- cgit v1.2.3 From 5a23bf50bcee13a5841f680b13ca480753d367a1 Mon Sep 17 00:00:00 2001 From: Cho Date: Thu, 5 Dec 2013 00:29:12 +0000 Subject: Added slshare SLapp support for ACME-1214 --- indra/newview/llfacebookconnect.cpp | 69 +++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 0a662b4671..860f488945 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -69,6 +69,75 @@ void toast_user_for_facebook_success() /////////////////////////////////////////////////////////////////////////////// // +class LLSLShareHandler : public LLCommandHandler +{ +public: + LLSLShareHandler() : LLCommandHandler("slshare", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) + { + if (tokens.size() >= 1) + { + if (tokens[0].asString() == "connect") + { + if (tokens.size() >= 2 && tokens[1].asString() == "flickr") + { + // this command probably came from the flickr_web browser, so close it + LLFloater* flickr_web = LLFloaterReg::getInstance("flickr_web"); + if (flickr_web) + { + flickr_web->closeFloater(); + } + + // connect to flickr + if (query_map.has("oauth_token")) + { + LLFlickrConnect::instance().connectToFlickr(query_map["oauth_token"], query_map.get("oauth_verifier")); + } + return true; + } + else if (tokens.size() >= 2 && tokens[1].asString() == "twitter") + { + // this command probably came from the twitter_web browser, so close it + LLFloater* twitter_web = LLFloaterReg::getInstance("twitter_web"); + if (twitter_web) + { + twitter_web->closeFloater(); + } + + // connect to twitter + if (query_map.has("oauth_token")) + { + LLTwitterConnect::instance().connectToTwitter(query_map["oauth_token"], query_map.get("oauth_verifier")); + } + return true; + } + else //if (tokens.size() >= 2 && tokens[1].asString() == "facebook") + { + // this command probably came from the fbc_web browser, so close it + LLFloater* fbc_web = LLFloaterReg::getInstance("fbc_web"); + if (fbc_web) + { + fbc_web->closeFloater(); + } + + // connect to facebook + if (query_map.has("code")) + { + LLFacebookConnect::instance().connectToFacebook(query_map["code"], query_map.get("state")); + } + return true; + } + } + } + return false; + } +}; +LLSLShareHandler gSLShareHandler; + +/////////////////////////////////////////////////////////////////////////////// +// +// DEPRECATED - please remove once "fbc" is phased out of the web service class LLFacebookConnectHandler : public LLCommandHandler { public: -- cgit v1.2.3 From a36c4f45b4bf03c707089398bccf62a12ac44f0b Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 4 Dec 2013 18:02:04 -0800 Subject: ACME-1043 : WIP : Add an argument to open trusted content with js and other enabled options, bypassing prefs --- indra/newview/llfacebookconnect.cpp | 10 +++++---- indra/newview/llfloaterwebcontent.cpp | 6 ++++-- indra/newview/llfloaterwebcontent.h | 3 ++- indra/newview/llmediactrl.cpp | 4 ++-- indra/newview/llmediactrl.h | 2 +- indra/newview/llviewermedia.cpp | 39 ++++++++++++++++++++++------------- indra/newview/llviewermedia.h | 5 +++-- 7 files changed, 43 insertions(+), 26 deletions(-) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 0a662b4671..8cde871cd1 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -377,10 +377,12 @@ void LLFacebookConnect::openFacebookWeb(std::string url) { // Open the URL in an internal browser window without navigation UI LLFloaterWebContent::Params p; - p.url(url).show_chrome(true); - p.url(url).allow_address_entry(false); - p.url(url).allow_back_forward_navigation(false); - p.url(url).trusted_content(true); + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); LLFloater *floater = LLFloaterReg::showInstance("fbc_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). //So when showing the internal web browser, set focus to it's containing floater "fbc_web". When a mouse event diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 814c91ef6c..2e08b3792f 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -53,7 +53,8 @@ LLFloaterWebContent::_Params::_Params() allow_back_forward_navigation("allow_back_forward_navigation", true), preferred_media_size("preferred_media_size"), trusted_content("trusted_content", false), - show_page_title("show_page_title", true) + show_page_title("show_page_title", true), + clean_browser("clean_browser", false) {} LLFloaterWebContent::LLFloaterWebContent( const Params& params ) @@ -240,11 +241,12 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p) void LLFloaterWebContent::open_media(const Params& p) { + llinfos << "Merov : LLFloaterWebContent::open_media, allow_address_entry = " << p.allow_address_entry << ", clean_browser = " << p.clean_browser << llendl; // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin. LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, "text/html"); mWebBrowser->setTarget(p.target); - mWebBrowser->navigateTo(p.url, "text/html"); + mWebBrowser->navigateTo(p.url, "text/html", p.clean_browser); set_current_url(p.url); diff --git a/indra/newview/llfloaterwebcontent.h b/indra/newview/llfloaterwebcontent.h index f22940cd07..2bb8e3271f 100755 --- a/indra/newview/llfloaterwebcontent.h +++ b/indra/newview/llfloaterwebcontent.h @@ -57,7 +57,8 @@ public: allow_address_entry, allow_back_forward_navigation, trusted_content, - show_page_title; + show_page_title, + clean_browser; Optional preferred_media_size; _Params(); diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp index 2075aeed63..229542c1c4 100755 --- a/indra/newview/llmediactrl.cpp +++ b/indra/newview/llmediactrl.cpp @@ -539,7 +539,7 @@ void LLMediaCtrl::clearCache() //////////////////////////////////////////////////////////////////////////////// // -void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) +void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool clean_browser) { // don't browse to anything that starts with secondlife:// or sl:// const std::string protocol1 = "secondlife://"; @@ -556,7 +556,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type) { mCurrentNavUrl = url_in; mMediaSource->setSize(mTextureWidth, mTextureHeight); - mMediaSource->navigateTo(url_in, mime_type, mime_type.empty()); + mMediaSource->navigateTo(url_in, mime_type, mime_type.empty(), false, clean_browser); } } diff --git a/indra/newview/llmediactrl.h b/indra/newview/llmediactrl.h index 6c38c1fb56..8429d8188e 100755 --- a/indra/newview/llmediactrl.h +++ b/indra/newview/llmediactrl.h @@ -95,7 +95,7 @@ public: virtual BOOL handleToolTip(S32 x, S32 y, MASK mask); // navigation - void navigateTo( std::string url_in, std::string mime_type = ""); + void navigateTo( std::string url_in, std::string mime_type = "", bool clean_browser = false); void navigateBack(); void navigateHome(); void navigateForward(); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 13483790ed..2393a932a2 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -429,7 +429,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // Try to find media with the same media ID viewer_media_t media_impl = getMediaImplFromTextureID(media_entry->getMediaID()); - lldebugs << "called, current URL is \"" << media_entry->getCurrentURL() + llinfos << "Merov : called, current URL is \"" << media_entry->getCurrentURL() << "\", previous URL is \"" << previous_url << "\", update_from_self is " << (update_from_self?"true":"false") << llendl; @@ -790,6 +790,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { LLFastTimer t1(FTM_MEDIA_UPDATE); + //llinfos << "Merov : updateMedia called" << llendl; + // Enable/disable the plugin read thread LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); @@ -1534,7 +1536,8 @@ void LLViewerMedia::createSpareBrowserMediaSource() // popping up at the moment we start a media plugin. if (!sSpareBrowserMediaSource && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")) { - // The null owner will keep the browser plugin from fully initializing + llinfos << "Merov : createSpareBrowserMediaSource : need to create a spare browser..." << llendl; + // The null owner will keep the browser plugin from fully initializing // (specifically, it keeps LLPluginClassMedia from negotiating a size change, // which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color) sSpareBrowserMediaSource = LLViewerMediaImpl::newSourceFromMediaType("text/html", NULL, 0, 0); @@ -1543,8 +1546,9 @@ void LLViewerMedia::createSpareBrowserMediaSource() ///////////////////////////////////////////////////////////////////////////////////////// // static -LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() +LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() { + llinfos << "Merov : getSpareBrowserMediaSource : give up the spare browser..." << llendl; LLPluginClassMedia* result = sSpareBrowserMediaSource; sSpareBrowserMediaSource = NULL; return result; @@ -1592,7 +1596,8 @@ std::string LLViewerMedia::getParcelAudioURL() // static void LLViewerMedia::initClass() { - gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL); + llinfos << "Merov : initClass called" << llendl; + gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL); sTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> setTeleportFinishedCallback(boost::bind(&LLViewerMedia::onTeleportFinished)); } @@ -1601,6 +1606,7 @@ void LLViewerMedia::initClass() // static void LLViewerMedia::cleanupClass() { + llinfos << "Merov : cleanupClass called" << llendl; gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL); sTeleportFinishConnection.disconnect(); } @@ -1669,7 +1675,8 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mNavigateSuspendedDeferred(false), mIsUpdated(false), mTrustedBrowser(false), - mZoomFactor(1.0) + mZoomFactor(1.0), + mCleanBrowser(false) { // Set up the mute list observer if it hasn't been set up already. @@ -1793,14 +1800,15 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) ////////////////////////////////////////////////////////////////////////////////////////// /*static*/ -LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target) +LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target, bool get_clean_source) { std::string plugin_basename = LLMIMETypes::implType(media_type); LLPluginClassMedia* media_source = NULL; // HACK: we always try to keep a spare running webkit plugin around to improve launch times. // If a spare was already created before PluginAttachDebuggerToPlugins was set, don't use it. - if(plugin_basename == "media_plugin_webkit" && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")) + // Merov : do not use a spare if launching with full viewer control (e.g. Facebook, Twitter and few others) + if(plugin_basename == "media_plugin_webkit" && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins") && !get_clean_source) { media_source = LLViewerMedia::getSpareBrowserMediaSource(); if(media_source) @@ -1812,7 +1820,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ return media_source; } } - + llinfos << "Merov : newSourceFromMediaType, get_clean_source = " << get_clean_source << llendl; if(plugin_basename.empty()) { LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; @@ -1856,18 +1864,19 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ // collect 'cookies enabled' setting from prefs and send to embedded browser bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" ); - media_source->enable_cookies( cookies_enabled ); + media_source->enable_cookies( cookies_enabled || get_clean_source); // collect 'plugins enabled' setting from prefs and send to embedded browser bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" ); - media_source->setPluginsEnabled( plugins_enabled ); + media_source->setPluginsEnabled( plugins_enabled || get_clean_source); // collect 'javascript enabled' setting from prefs and send to embedded browser bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); - media_source->setJavascriptEnabled( javascript_enabled ); + llinfos << "Merov : setting javascript flag : " << javascript_enabled << llendl; + media_source->setJavascriptEnabled( javascript_enabled || get_clean_source); bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); - media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled ); + media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled || get_clean_source); media_source->setTarget(target); @@ -1922,7 +1931,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type) // Save the MIME type that really caused the plugin to load mCurrentMimeType = mMimeType; - LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mTarget); + LLPluginClassMedia* media_source = newSourceFromMediaType(mMimeType, this, mMediaWidth, mMediaHeight, mTarget, mCleanBrowser); if (media_source) { @@ -2543,7 +2552,7 @@ void LLViewerMediaImpl::unload() } ////////////////////////////////////////////////////////////////////////////////////////// -void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request) +void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request, bool clean_browser) { cancelMimeTypeProbe(); @@ -2554,8 +2563,10 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi } // Always set the current URL and MIME type. + llinfos << "Merov : LLViewerMediaImpl::navigateTo url = " << url << llendl; mMediaURL = url; mMimeType = mime_type; + mCleanBrowser = clean_browser; // Clear the current media URL, since it will no longer be correct. mCurrentMediaURL.clear(); diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index fff5b3fc08..07125e07e5 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -234,7 +234,7 @@ public: void navigateReload(); void navigateHome(); void unload(); - void navigateTo(const std::string& url, const std::string& mime_type = "", bool rediscover_type = false, bool server_request = false); + void navigateTo(const std::string& url, const std::string& mime_type = "", bool rediscover_type = false, bool server_request = false, bool clean_browser = false); void navigateInternal(); void navigateStop(); bool handleKeyHere(KEY key, MASK mask); @@ -289,7 +289,7 @@ public: void setTarget(const std::string& target) { mTarget = target; } // utility function to create a ready-to-use media instance from a desired media type. - static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null); + static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null, bool get_clean_source = false); // Internally set our desired browser user agent string, including // the Second Life version and skin name. Used because we can @@ -464,6 +464,7 @@ private: bool mTrustedBrowser; std::string mTarget; LLNotificationPtr mNotification; + bool mCleanBrowser; // force the creation of a clean browsing target with full options enabled private: BOOL mIsUpdated ; -- cgit v1.2.3 From f5b356a7d4b51fbf509926295cb38d3a1e8442e3 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 4 Dec 2013 21:14:40 -0800 Subject: ACME-1043 : Fixed! Added an argument to force a clean full feature browser window in some situations --- indra/newview/llfloaterwebcontent.cpp | 1 - indra/newview/llviewermedia.cpp | 26 +++++++++----------------- indra/newview/llviewermedia.h | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/indra/newview/llfloaterwebcontent.cpp b/indra/newview/llfloaterwebcontent.cpp index 2e08b3792f..4eb5236c6a 100755 --- a/indra/newview/llfloaterwebcontent.cpp +++ b/indra/newview/llfloaterwebcontent.cpp @@ -241,7 +241,6 @@ void LLFloaterWebContent::preCreate(LLFloaterWebContent::Params& p) void LLFloaterWebContent::open_media(const Params& p) { - llinfos << "Merov : LLFloaterWebContent::open_media, allow_address_entry = " << p.allow_address_entry << ", clean_browser = " << p.clean_browser << llendl; // Specifying a mime type of text/html here causes the plugin system to skip the MIME type probe and just open a browser plugin. LLViewerMedia::proxyWindowOpened(p.target(), p.id()); mWebBrowser->setHomePageUrl(p.url, "text/html"); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 2393a932a2..1a19589a26 100755 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -429,7 +429,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // Try to find media with the same media ID viewer_media_t media_impl = getMediaImplFromTextureID(media_entry->getMediaID()); - llinfos << "Merov : called, current URL is \"" << media_entry->getCurrentURL() + lldebugs << "called, current URL is \"" << media_entry->getCurrentURL() << "\", previous URL is \"" << previous_url << "\", update_from_self is " << (update_from_self?"true":"false") << llendl; @@ -790,8 +790,6 @@ void LLViewerMedia::updateMedia(void *dummy_arg) { LLFastTimer t1(FTM_MEDIA_UPDATE); - //llinfos << "Merov : updateMedia called" << llendl; - // Enable/disable the plugin read thread LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread")); @@ -1536,7 +1534,6 @@ void LLViewerMedia::createSpareBrowserMediaSource() // popping up at the moment we start a media plugin. if (!sSpareBrowserMediaSource && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")) { - llinfos << "Merov : createSpareBrowserMediaSource : need to create a spare browser..." << llendl; // The null owner will keep the browser plugin from fully initializing // (specifically, it keeps LLPluginClassMedia from negotiating a size change, // which keeps MediaPluginWebkit::initBrowserWindow from doing anything until we have some necessary data, like the background color) @@ -1548,7 +1545,6 @@ void LLViewerMedia::createSpareBrowserMediaSource() // static LLPluginClassMedia* LLViewerMedia::getSpareBrowserMediaSource() { - llinfos << "Merov : getSpareBrowserMediaSource : give up the spare browser..." << llendl; LLPluginClassMedia* result = sSpareBrowserMediaSource; sSpareBrowserMediaSource = NULL; return result; @@ -1596,7 +1592,6 @@ std::string LLViewerMedia::getParcelAudioURL() // static void LLViewerMedia::initClass() { - llinfos << "Merov : initClass called" << llendl; gIdleCallbacks.addFunction(LLViewerMedia::updateMedia, NULL); sTeleportFinishConnection = LLViewerParcelMgr::getInstance()-> setTeleportFinishedCallback(boost::bind(&LLViewerMedia::onTeleportFinished)); @@ -1606,7 +1601,6 @@ void LLViewerMedia::initClass() // static void LLViewerMedia::cleanupClass() { - llinfos << "Merov : cleanupClass called" << llendl; gIdleCallbacks.deleteFunction(LLViewerMedia::updateMedia, NULL); sTeleportFinishConnection.disconnect(); } @@ -1800,15 +1794,16 @@ void LLViewerMediaImpl::setMediaType(const std::string& media_type) ////////////////////////////////////////////////////////////////////////////////////////// /*static*/ -LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target, bool get_clean_source) +LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target, bool clean_browser) { std::string plugin_basename = LLMIMETypes::implType(media_type); LLPluginClassMedia* media_source = NULL; // HACK: we always try to keep a spare running webkit plugin around to improve launch times. // If a spare was already created before PluginAttachDebuggerToPlugins was set, don't use it. - // Merov : do not use a spare if launching with full viewer control (e.g. Facebook, Twitter and few others) - if(plugin_basename == "media_plugin_webkit" && !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins") && !get_clean_source) + // Do not use a spare if launching with full viewer control (e.g. Facebook, Twitter and few others) + if ((plugin_basename == "media_plugin_webkit") && + !gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins") && !clean_browser) { media_source = LLViewerMedia::getSpareBrowserMediaSource(); if(media_source) @@ -1820,7 +1815,6 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ return media_source; } } - llinfos << "Merov : newSourceFromMediaType, get_clean_source = " << get_clean_source << llendl; if(plugin_basename.empty()) { LL_WARNS_ONCE("Media") << "Couldn't find plugin for media type " << media_type << LL_ENDL; @@ -1864,19 +1858,18 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_ // collect 'cookies enabled' setting from prefs and send to embedded browser bool cookies_enabled = gSavedSettings.getBOOL( "CookiesEnabled" ); - media_source->enable_cookies( cookies_enabled || get_clean_source); + media_source->enable_cookies( cookies_enabled || clean_browser); // collect 'plugins enabled' setting from prefs and send to embedded browser bool plugins_enabled = gSavedSettings.getBOOL( "BrowserPluginsEnabled" ); - media_source->setPluginsEnabled( plugins_enabled || get_clean_source); + media_source->setPluginsEnabled( plugins_enabled || clean_browser); // collect 'javascript enabled' setting from prefs and send to embedded browser bool javascript_enabled = gSavedSettings.getBOOL( "BrowserJavascriptEnabled" ); - llinfos << "Merov : setting javascript flag : " << javascript_enabled << llendl; - media_source->setJavascriptEnabled( javascript_enabled || get_clean_source); + media_source->setJavascriptEnabled( javascript_enabled || clean_browser); bool media_plugin_debugging_enabled = gSavedSettings.getBOOL("MediaPluginDebugging"); - media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled || get_clean_source); + media_source->enableMediaPluginDebugging( media_plugin_debugging_enabled || clean_browser); media_source->setTarget(target); @@ -2563,7 +2556,6 @@ void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mi } // Always set the current URL and MIME type. - llinfos << "Merov : LLViewerMediaImpl::navigateTo url = " << url << llendl; mMediaURL = url; mMimeType = mime_type; mCleanBrowser = clean_browser; diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 07125e07e5..6803adfaa2 100755 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -289,7 +289,7 @@ public: void setTarget(const std::string& target) { mTarget = target; } // utility function to create a ready-to-use media instance from a desired media type. - static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null, bool get_clean_source = false); + static LLPluginClassMedia* newSourceFromMediaType(std::string media_type, LLPluginClassMediaOwner *owner /* may be NULL */, S32 default_width, S32 default_height, const std::string target = LLStringUtil::null, bool clean_browser = false); // Internally set our desired browser user agent string, including // the Second Life version and skin name. Used because we can -- cgit v1.2.3 From 944840c8b164aa0f254d3d0eb38292a49b0dcae6 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 5 Dec 2013 13:26:43 -0500 Subject: STORM-68 Code cleanup/function renaming --- indra/newview/llfloaterperms.cpp | 34 +++++++++++++++++++++++----------- indra/newview/llfloaterperms.h | 3 ++- indra/newview/llviewerregion.cpp | 5 +---- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index b03a4e9013..28fb76160a 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -158,30 +158,42 @@ void LLFloaterPermsDefault::onCommitCopy(const LLSD& user_data) class LLFloaterPermsResponder : public LLHTTPClient::Responder { public: - LLFloaterPermsResponder(): LLHTTPClient::Responder() {} + LLFloaterPermsResponder(): LLHTTPClient::Responder() {} +private: + std::string mPreviousReason; void error(U32 status, const std::string& reason) { - LLSD args; - args["REASON"] = reason; - LLNotificationsUtil::add("DefaultObjectPermissions", args); +llwarns << "DBG !" << mPreviousReason << "!" << llendl; + // Do not display the same error more than once in a row + if (reason != mPreviousReason) + { + mPreviousReason = reason; + LLSD args; + args["REASON"] = reason; + LLNotificationsUtil::add("DefaultObjectPermissions", args); + } } void result(const LLSD& content) { + // Since we have had a successful POST call be sure to display the next error message + // even if it is the same as a previous one. + mPreviousReason = ""; LLFloaterPermsDefault::setCapSent(true); LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL; } }; -void LLFloaterPermsDefault::updateCap(bool alwaysUpdate) +void LLFloaterPermsDefault::sendInitialPerms() { -llwarns << "DBG start" << llendl; - if(!alwaysUpdate && mCapSent) + if(!mCapSent) { - return; + updateCap(); } +} -llwarns << "DBG getRegion" << llendl; +void LLFloaterPermsDefault::updateCap() +{ std::string object_url = gAgent.getRegion()->getCapability("AgentPreferences"); if(!object_url.empty()) @@ -193,7 +205,7 @@ llwarns << "DBG getRegion" << llendl; (LLSD::Integer)LLFloaterPerms::getEveryonePerms(sCategoryNames[CAT_OBJECTS]); report["default_object_perm_masks"]["NextOwner"] = (LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]); -llwarns << "DBG post:" << report << llendl; + LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder()); } } @@ -211,7 +223,7 @@ void LLFloaterPermsDefault::ok() // We know some setting has changed but not which one. Just in case it was a setting for // object permissions tell the server what the values are. - updateCap(true); + updateCap(); } void LLFloaterPermsDefault::cancel() diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index b4b5d58aa5..2bb0a19dc1 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -59,7 +59,8 @@ public: void onClickOK(); void onClickCancel(); void onCommitCopy(const LLSD& user_data); - static void updateCap(bool alwaysUpdate); + static void sendInitialPerms(); + static void updateCap(); static void setCapSent(bool cap_sent); // Update instantiation of sCategoryNames in the .cpp file to match if you change this! diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 4cd9f9769a..dcecddece5 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1574,10 +1574,7 @@ void LLViewerRegion::unpackRegionHandshake() msg->addU32("Flags", 0x0 ); msg->sendReliable(host); - // Supplying false in this call means only send the default permissions to the simulator if - // it has never been sent. Once this data is sent the simulator will pass this data to new - // simulators as the agent moves around. - LLFloaterPermsDefault::updateCap(false); + LLFloaterPermsDefault::sendInitialPerms(); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) -- cgit v1.2.3 From 096530b7265223ade02a86977973b7e5df12e93c Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Thu, 5 Dec 2013 14:42:14 -0500 Subject: STORM-68 Get display error message once to work properly --- indra/newview/llfloaterperms.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 28fb76160a..b4ea34d5f1 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -160,15 +160,15 @@ class LLFloaterPermsResponder : public LLHTTPClient::Responder public: LLFloaterPermsResponder(): LLHTTPClient::Responder() {} private: - std::string mPreviousReason; + static std::string sPreviousReason; void error(U32 status, const std::string& reason) { -llwarns << "DBG !" << mPreviousReason << "!" << llendl; +llwarns << "DBG !" << sPreviousReason << "!" << llendl; // Do not display the same error more than once in a row - if (reason != mPreviousReason) + if (reason != sPreviousReason) { - mPreviousReason = reason; + sPreviousReason = reason; LLSD args; args["REASON"] = reason; LLNotificationsUtil::add("DefaultObjectPermissions", args); @@ -178,12 +178,14 @@ llwarns << "DBG !" << mPreviousReason << "!" << llendl; { // Since we have had a successful POST call be sure to display the next error message // even if it is the same as a previous one. - mPreviousReason = ""; + sPreviousReason = ""; LLFloaterPermsDefault::setCapSent(true); LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL; } }; + std::string LLFloaterPermsResponder::sPreviousReason; + void LLFloaterPermsDefault::sendInitialPerms() { if(!mCapSent) -- cgit v1.2.3 From 11e3f8c3a1209c17814d90978a1c0b80225bc122 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Thu, 5 Dec 2013 12:54:15 -0800 Subject: ACME-1043 : Use a clean browser for connection to Flickr and Twitter as well --- indra/newview/llflickrconnect.cpp | 10 ++++++---- indra/newview/lltwitterconnect.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index 3a21933b63..8f9f55c1ea 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -276,10 +276,12 @@ void LLFlickrConnect::openFlickrWeb(std::string url) { // Open the URL in an internal browser window without navigation UI LLFloaterWebContent::Params p; - p.url(url).show_chrome(true); - p.url(url).allow_address_entry(false); - p.url(url).allow_back_forward_navigation(false); - p.url(url).trusted_content(true); + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); LLFloater *floater = LLFloaterReg::showInstance("flickr_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). //So when showing the internal web browser, set focus to it's containing floater "flickr_web". When a mouse event diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index e015867df2..7942b21319 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -276,10 +276,12 @@ void LLTwitterConnect::openTwitterWeb(std::string url) { // Open the URL in an internal browser window without navigation UI LLFloaterWebContent::Params p; - p.url(url).show_chrome(true); - p.url(url).allow_address_entry(false); - p.url(url).allow_back_forward_navigation(false); - p.url(url).trusted_content(true); + p.url(url); + p.show_chrome(true); + p.allow_address_entry(false); + p.allow_back_forward_navigation(false); + p.trusted_content(true); + p.clean_browser(true); LLFloater *floater = LLFloaterReg::showInstance("twitter_web", p); //the internal web browser has a bug that prevents it from gaining focus unless a mouse event occurs first (it seems). //So when showing the internal web browser, set focus to it's containing floater "twitter_web". When a mouse event -- cgit v1.2.3 From b6cda94fa5daae104be37cdce393e255022c79cd Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 6 Dec 2013 17:48:12 -0500 Subject: STORM-68 Remove incorrect method of setting default object permissions --- indra/newview/llviewerobjectlist.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 34d36dd887..b7a4510bac 100755 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -266,17 +266,6 @@ 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(); } -- cgit v1.2.3 From 88f139594bb819bc31b438edcceaf9cd661b3f82 Mon Sep 17 00:00:00 2001 From: Cho Date: Tue, 10 Dec 2013 18:55:49 +0000 Subject: Added placeholder http SLURL for Twitter sharing on Aditi for ACME-1216 --- indra/newview/llfloatertwitter.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloatertwitter.cpp b/indra/newview/llfloatertwitter.cpp index 18a1fcbba9..ea263566a6 100644 --- a/indra/newview/llfloatertwitter.cpp +++ b/indra/newview/llfloatertwitter.cpp @@ -53,6 +53,7 @@ static LLRegisterPanelClassWrapper t_panel_photo("lltwitter static LLRegisterPanelClassWrapper t_panel_account("lltwitteraccountpanel"); const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte +const std::string DEFAULT_PHOTO_LOCATION_URL = "http://maps.secondlife.com/"; const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=twitter&utm_medium=photo&utm_campaign=slshare"; /////////////////////////// @@ -271,6 +272,13 @@ void LLTwitterPhotoPanel::sendPhoto() LLAgentUI::buildSLURL(slurl); std::string slurl_string = slurl.getSLURLString(); + // Use a valid http:// URL if the scheme is secondlife:// + LLURI slurl_uri(slurl_string); + if (slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) + { + slurl_string = DEFAULT_PHOTO_LOCATION_URL; + } + // Add query parameters so Google Analytics can track incoming clicks! slurl_string += DEFAULT_PHOTO_QUERY_PARAMETERS; @@ -281,7 +289,6 @@ void LLTwitterPhotoPanel::sendPhoto() status = status + " " + slurl_string; } - // Add the photo if required bool add_photo = mPhotoCheckbox->getValue().asBoolean(); if (add_photo) -- cgit v1.2.3 From b562de469a04c5b267e46c0a0bbf4d898e36d3f7 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 10 Dec 2013 16:25:57 -0500 Subject: STORM-68 Move initial call to POST default permissions to a better location. --- indra/newview/llviewerregion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index dcecddece5..e3df09022c 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1573,8 +1573,6 @@ void LLViewerRegion::unpackRegionHandshake() msg->nextBlock("RegionInfo"); msg->addU32("Flags", 0x0 ); msg->sendReliable(host); - - LLFloaterPermsDefault::sendInitialPerms(); } void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames) @@ -1847,6 +1845,8 @@ void LLViewerRegion::setCapabilitiesReceived(bool received) { mCapabilitiesReceivedSignal(getRegionID()); + LLFloaterPermsDefault::sendInitialPerms(); + // This is a single-shot signal. Forget callbacks to save resources. mCapabilitiesReceivedSignal.disconnect_all_slots(); } -- cgit v1.2.3 From 35daa8031979fc708640e2f2f9ab849e6cb156dd Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 11 Dec 2013 12:09:39 -0500 Subject: STORM-68 Re-add wearables callback that did not carry through in the merge. --- indra/newview/llagentwearables.cpp | 42 +++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index c741f6403d..f71b49010d 100755 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -86,27 +86,26 @@ void wear_and_edit_cb(const LLUUID& inv_item) LLAppearanceMgr::instance().wearItemOnAvatar(inv_item); } -class LLCreateWearableCallback : public LLInventoryCallback +void wear_cb(const LLUUID& inv_item) { - void fire(const LLUUID& inv_item) + if (inv_item.isNull()) { - if (inv_item.isNull()) - return; + return; + } - LLViewerInventoryItem* item = gInventory.getItem(inv_item); - if (!item) 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); + LLPermissions perm = item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Wearables")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Wearables")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Wearables")); + item->setPermissions(perm); - item->updateServer(FALSE); - gInventory.updateItem(item); - gInventory.notifyObservers(); - } -}; + item->updateServer(FALSE); + gInventory.updateItem(item); + gInventory.notifyObservers(); +} /////////////////////////////////////////////////////////////////////////////// @@ -1841,7 +1840,16 @@ void LLAgentWearables::createWearable(LLWearableType::EType type, bool wear, con LLViewerWearable* wearable = LLWearableList::instance().createNewWearable(type, gAgentAvatarp); LLAssetType::EType asset_type = wearable->getAssetType(); LLInventoryType::EType inv_type = LLInventoryType::IT_WEARABLE; - LLPointer cb = wear ? new LLBoostFuncInventoryCallback(wear_and_edit_cb) : NULL; + LLPointer cb; + if(wear) + { + cb = new LLBoostFuncInventoryCallback(wear_and_edit_cb); + } + else + { + cb = new LLBoostFuncInventoryCallback(wear_cb); + } + LLUUID folder_id; if (parent_id.notNull()) -- cgit v1.2.3 From 26a6668fb23ce289b67154ba3e3ac35f25a54978 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 11 Dec 2013 21:46:17 -0800 Subject: ACME-1233 : Set the quality for jpeg images send to Facebook correctly --- indra/newview/llfloaterfacebook.cpp | 36 +++++++++++++++++++--- indra/newview/llfloaterfacebook.h | 2 ++ indra/newview/llsnapshotlivepreview.cpp | 10 ++++-- indra/newview/llsnapshotlivepreview.h | 2 +- .../skins/default/xui/en/panel_facebook_photo.xml | 4 +++ 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp index 6488e7ea00..09cc14f6db 100644 --- a/indra/newview/llfloaterfacebook.cpp +++ b/indra/newview/llfloaterfacebook.cpp @@ -59,6 +59,13 @@ const std::string DEFAULT_CHECKIN_ICON_URL = "http://map.secondlife.com.s3.amazo const std::string DEFAULT_CHECKIN_QUERY_PARAMETERS = "?sourceid=slshare_checkin&utm_source=facebook&utm_medium=checkin&utm_campaign=slshare"; const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=facebook&utm_medium=photo&utm_campaign=slshare"; +const S32 MAX_QUALITY = 100; // Max quality value for jpeg images +const S32 MIN_QUALITY = 0; // Min quality value for jpeg images +const S32 TARGET_DATA_SIZE = 95000; // Size of the image (compressed) we're trying to send to Facebook +const S32 MAX_DATA_SIZE = 98000; // Max size of the image (compressed) sent to Facebook +const S32 QUALITY_DECREMENT = 5; // Value we use to ratchet the quality down if we're over MAX_DATA_SIZE + + std::string get_map_url() { LLVector3d center_agent; @@ -73,6 +80,14 @@ std::string get_map_url() return map_url; } +// Compute target jpeg quality : see https://wiki.lindenlab.com/wiki/Facebook_Image_Quality for details +S32 compute_jpeg_quality(S32 width, S32 height) +{ + F32 target_compression_ratio = (F32)(width * height * 3) / (F32)(TARGET_DATA_SIZE); + S32 quality = (S32)(110.0f - (2.0f * target_compression_ratio)); + return llclamp(quality,MIN_QUALITY,MAX_QUALITY); +} + /////////////////////////// //LLFacebookStatusPanel////// /////////////////////////// @@ -173,7 +188,8 @@ mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mCaptionTextBox(NULL), mLocationCheckbox(NULL), -mPostButton(NULL) +mPostButton(NULL), +mQuality(MAX_QUALITY) { mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFacebookPhotoPanel::onSend, this)); mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFacebookPhotoPanel::onClickNewSnapshot, this)); @@ -285,10 +301,11 @@ void LLFacebookPhotoPanel::onVisibilityChange(const LLSD& new_visibility) p.rect(full_screen_rect); LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); mPreviewHandle = previewp->getHandle(); + mQuality = MAX_QUALITY; previewp->setSnapshotType(previewp->SNAPSHOT_WEB); previewp->setSnapshotFormat(LLFloaterSnapshot::SNAPSHOT_FORMAT_JPEG); - //previewp->setSnapshotQuality(98); + previewp->setSnapshotQuality(mQuality, false); previewp->setThumbnailPlaceholderRect(mThumbnailPlaceholder->getRect()); updateControls(); @@ -399,6 +416,11 @@ void LLFacebookPhotoPanel::updateControls() if (got_snap) { LLResMgr::getInstance()->getIntegerString(bytes_string, (previewp->getDataSize()) >> 10 ); + if (previewp->getDataSize() >= MAX_DATA_SIZE) + { + // If size too big, change mQuality + mQuality -= QUALITY_DECREMENT; + } } //getChild("file_size_label")->setTextArg("[SIZE]", got_snap ? bytes_string : getString("unknown")); <---uses localized string @@ -445,8 +467,14 @@ void LLFacebookPhotoPanel::updateResolution(BOOL do_update) checkAspectRatio(width); previewp->getSize(width, height); + if (do_update || (mQuality == MAX_QUALITY)) + { + // Recompute quality setting if the update is requested by the UI or if quality has been reset + mQuality = compute_jpeg_quality(width, height); + } + bool quality_reset = previewp->setSnapshotQuality(mQuality, false); - if(original_width != width || original_height != height) + if (original_width != width || original_height != height || quality_reset) { previewp->setSize(width, height); @@ -454,7 +482,7 @@ void LLFacebookPhotoPanel::updateResolution(BOOL do_update) lldebugs << "updating thumbnail" << llendl; previewp->updateSnapshot(FALSE, TRUE); - if(do_update) + if (do_update || quality_reset) { lldebugs << "Will update controls" << llendl; updateControls(); diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h index ab6420264b..0776f24034 100644 --- a/indra/newview/llfloaterfacebook.h +++ b/indra/newview/llfloaterfacebook.h @@ -88,6 +88,8 @@ private: LLUICtrl * mLocationCheckbox; LLUICtrl * mPostButton; LLUICtrl* mCancelButton; + + S32 mQuality; // Compression quality }; class LLFacebookCheckinPanel : public LLPanel diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 9feeea1644..7f578975db 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -222,15 +222,21 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail } } -void LLSnapshotLivePreview::setSnapshotQuality(S32 quality) +// Return true if the quality has been changed, false otherwise +bool LLSnapshotLivePreview::setSnapshotQuality(S32 quality, bool set_by_user) { llclamp(quality, 0, 100); if (quality != mSnapshotQuality) { mSnapshotQuality = quality; - gSavedSettings.setS32("SnapshotQuality", quality); + if (set_by_user) + { + gSavedSettings.setS32("SnapshotQuality", quality); + } mSnapshotUpToDate = FALSE; + return true; } + return false; } void LLSnapshotLivePreview::drawPreviewRect(S32 offset_x, S32 offset_y) diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index fe3d257b02..0c63bf47c7 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -93,7 +93,7 @@ public: void setSnapshotType(ESnapshotType type) { mSnapshotType = type; } void setSnapshotFormat(LLFloaterSnapshot::ESnapshotFormat type) { mSnapshotFormat = type; } - void setSnapshotQuality(S32 quality); + bool setSnapshotQuality(S32 quality, bool set_by_user = true); void setSnapshotBufferType(LLViewerWindow::ESnapshotType type) { mSnapshotBufferType = type; } void updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail = FALSE, F32 delay = 0.f); void saveWeb(); diff --git a/indra/newview/skins/default/xui/en/panel_facebook_photo.xml b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml index 19f9f2fb74..2d46665bae 100644 --- a/indra/newview/skins/default/xui/en/panel_facebook_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_photo.xml @@ -39,6 +39,10 @@ label="1024x768" name="1024x768" value="[i1024,i768]" /> + Date: Thu, 12 Dec 2013 08:51:15 -0500 Subject: STORM-68 Fix bug for new gestures, notecards, and scripts where a copied item did not preserve its default permissions. Add apply button. --- indra/newview/llfloaterperms.cpp | 11 ++++-- indra/newview/llfloaterperms.h | 3 +- indra/newview/llviewerinventory.cpp | 3 ++ .../skins/default/xui/en/floater_perms_default.xml | 40 ++++++++++++++-------- 4 files changed, 38 insertions(+), 19 deletions(-) diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index b4ea34d5f1..0178c0b4f1 100755 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -103,6 +103,7 @@ LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed) : LLFloater(seed) { mCommitCallbackRegistrar.add("PermsDefault.Copy", boost::bind(&LLFloaterPermsDefault::onCommitCopy, this, _2)); + mCommitCallbackRegistrar.add("PermsDefault.Apply", boost::bind(&LLFloaterPermsDefault::onClickApply, this)); mCommitCallbackRegistrar.add("PermsDefault.OK", boost::bind(&LLFloaterPermsDefault::onClickOK, this)); mCommitCallbackRegistrar.add("PermsDefault.Cancel", boost::bind(&LLFloaterPermsDefault::onClickCancel, this)); } @@ -129,9 +130,14 @@ BOOL LLFloaterPermsDefault::postBuild() return true; } +void LLFloaterPermsDefault::onClickApply() +{ + apply(); +} + void LLFloaterPermsDefault::onClickOK() { - ok(); + apply(); closeFloater(); } @@ -164,7 +170,6 @@ private: void error(U32 status, const std::string& reason) { -llwarns << "DBG !" << sPreviousReason << "!" << llendl; // Do not display the same error more than once in a row if (reason != sPreviousReason) { @@ -217,7 +222,7 @@ void LLFloaterPermsDefault::setCapSent(bool cap_sent) mCapSent = cap_sent; } -void LLFloaterPermsDefault::ok() +void LLFloaterPermsDefault::apply() { // Changes were already applied automatically to saved settings. // Refreshing internal values makes it official. diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index 2bb0a19dc1..12f297960a 100755 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -54,8 +54,9 @@ class LLFloaterPermsDefault : public LLFloater public: /*virtual*/ BOOL postBuild(); - void ok(); + void apply(); void cancel(); + void onClickApply(); void onClickOK(); void onClickCancel(); void onCommitCopy(const LLSD& user_data); diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index c52505e4b3..5c41ef52b6 100755 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1004,6 +1004,7 @@ void create_script_cb(const LLUUID& inv_item) item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } @@ -1024,6 +1025,7 @@ void create_gesture_cb(const LLUUID& inv_item) item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); @@ -1047,6 +1049,7 @@ void create_notecard_cb(const LLUUID& inv_item) item->setPermissions(perm); + item->updateServer(FALSE); gInventory.updateItem(item); gInventory.notifyObservers(); } 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 9c3b92bc83..4e44c9ebb3 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -17,24 +17,22 @@ name="default permissions" top="20" width="690"> - - - + Next owner: + - - 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 64c239fbf7f1fb668d94b9c26f413858058b8270 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 26 Feb 2014 00:32:49 +0000 Subject: Added machine tags to Flickr uploads for ACME-1323 --- indra/newview/llfloaterflickr.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 61f1487d4b..8c3db46d76 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -49,6 +49,7 @@ #include "llviewermedia.h" #include "lltabcontainer.h" #include "llviewerparcelmgr.h" +#include "llviewerregion.h" static LLRegisterPanelClassWrapper t_panel_photo("llflickrphotopanel"); static LLRegisterPanelClassWrapper t_panel_account("llflickraccountpanel"); @@ -56,6 +57,7 @@ static LLRegisterPanelClassWrapper t_panel_account("llflic const S32 MAX_POSTCARD_DATASIZE = 1024 * 1024; // one megabyte const std::string DEFAULT_PHOTO_QUERY_PARAMETERS = "?sourceid=slshare_photo&utm_source=flickr&utm_medium=photo&utm_campaign=slshare"; const std::string DEFAULT_TAG_TEXT = "secondlife "; +const std::string FLICKR_MACHINE_TAGS_NAMESPACE = "secondlife"; /////////////////////////// //LLFlickrPhotoPanel/////// @@ -318,6 +320,26 @@ void LLFlickrPhotoPanel::sendPhoto() description = slurl_string; else description = description + "\n\n" + slurl_string; + + // Also add special "machine tags" with location metadata + const LLVector3& agent_pos_region = gAgent.getPositionAgent(); + LLViewerRegion* region = gAgent.getRegion(); + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + if (region && parcel) + { + S32 pos_x = S32(agent_pos_region.mV[VX]); + S32 pos_y = S32(agent_pos_region.mV[VY]); + S32 pos_z = S32(agent_pos_region.mV[VZ]); + + std::string parcel_name = LLViewerParcelMgr::getInstance()->getAgentParcelName(); + std::string region_name = region->getName(); + + tags += llformat(" \"%s:region=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), region_name.c_str()); + tags += llformat(" \"%s:parcel=%s\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), parcel_name.c_str()); + tags += llformat(" \"%s:x=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_x); + tags += llformat(" \"%s:y=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_y); + tags += llformat(" \"%s:z=%d\"", FLICKR_MACHINE_TAGS_NAMESPACE.c_str(), pos_z); + } } // Get the content rating -- cgit v1.2.3 From d220657d8525ccfa246e0f49904e18cc36458b28 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 25 Feb 2014 21:54:09 -0800 Subject: ACME-1327 : WIP : Added big preview to the Flickr photo panel, uses the thumbnail for the moment --- indra/newview/CMakeLists.txt | 2 + indra/newview/llfloaterbigpreview.cpp | 109 +++++++++++++++++++++ indra/newview/llfloaterbigpreview.h | 56 +++++++++++ indra/newview/llfloaterflickr.cpp | 36 ++++++- indra/newview/llfloaterflickr.h | 2 + indra/newview/llsnapshotlivepreview.h | 2 +- indra/newview/llviewerfloaterreg.cpp | 2 + .../skins/default/xui/en/floater_big_preview.xml | 25 +++++ .../skins/default/xui/en/panel_flickr_photo.xml | 17 +++- 9 files changed, 247 insertions(+), 4 deletions(-) create mode 100644 indra/newview/llfloaterbigpreview.cpp create mode 100644 indra/newview/llfloaterbigpreview.h create mode 100644 indra/newview/skins/default/xui/en/floater_big_preview.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 793d972e1c..6d8d6b75a2 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -208,6 +208,7 @@ set(viewer_SOURCE_FILES llfloateravatarpicker.cpp llfloateravatartextures.cpp llfloaterbeacons.cpp + llfloaterbigpreview.cpp llfloaterbuildoptions.cpp llfloaterbulkpermission.cpp llfloaterbump.cpp @@ -802,6 +803,7 @@ set(viewer_HEADER_FILES llfloateravatarpicker.h llfloateravatartextures.h llfloaterbeacons.h + llfloaterbigpreview.h llfloaterbuildoptions.h llfloaterbulkpermission.h llfloaterbump.h diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp new file mode 100644 index 0000000000..84a1523e7c --- /dev/null +++ b/indra/newview/llfloaterbigpreview.cpp @@ -0,0 +1,109 @@ +/** +* @file llfloaterbigpreview.cpp +* @brief Display of extended (big) preview for snapshots and SL Share +* @author merov@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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 "llfloaterbigpreview.h" + +#include "llfloaterreg.h" +#include "llsnapshotlivepreview.h" + +/////////////////////// +//LLFloaterBigPreview// +/////////////////////// + +LLFloaterBigPreview::LLFloaterBigPreview(const LLSD& key) : LLFloater(key), + mPreviewPlaceholder(NULL), + mFloaterOwner(NULL) +{ +} + +LLFloaterBigPreview::~LLFloaterBigPreview() +{ + if (mPreviewHandle.get()) + { + mPreviewHandle.get()->die(); + } +} + +void LLFloaterBigPreview::onCancel() +{ + closeFloater(); +} + +void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) +{ + if (floaterp == mFloaterOwner) + { + closeFloater(); + } +} + +BOOL LLFloaterBigPreview::postBuild() +{ + mPreviewPlaceholder = getChild("big_preview_placeholder"); + return LLFloater::postBuild(); +} + +void LLFloaterBigPreview::draw() +{ + LLFloater::draw(); + + LLSnapshotLivePreview * previewp = static_cast(mPreviewHandle.get()); + + // Display the preview if one is available + // HACK!!! We use the puny thumbnail image for the moment + // *TODO : Use the real large preview + if (previewp && previewp->getThumbnailImage()) + { + const LLRect& preview_rect = mPreviewPlaceholder->getRect(); +// const S32 thumbnail_w = previewp->getThumbnailWidth(); +// const S32 thumbnail_h = previewp->getThumbnailHeight(); + + // calc preview offset within the preview rect +// const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; +// const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; + const S32 local_offset_x = 0 ; + const S32 local_offset_y = 0 ; + + // calc preview offset within the floater rect + S32 offset_x = preview_rect.mLeft + local_offset_x; + S32 offset_y = preview_rect.mBottom + local_offset_y; + + //llinfos << "Merov : draw, offset x = " << offset_x << ", y = " << offset_y << ", thumbnail w = " << thumbnail_w << ", h = " << thumbnail_h << ", rect w = " << preview_rect.getWidth() << ", h = " << preview_rect.getHeight() << llendl; + + gGL.matrixMode(LLRender::MM_MODELVIEW); + // Apply floater transparency to the texture unless the floater is focused. + F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); + LLColor4 color = LLColor4::white; + gl_draw_scaled_image(offset_x, offset_y, + //thumbnail_w, thumbnail_h, + preview_rect.getWidth(), preview_rect.getHeight(), + previewp->getThumbnailImage(), color % alpha); + } +} + diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h new file mode 100644 index 0000000000..91b0968e88 --- /dev/null +++ b/indra/newview/llfloaterbigpreview.h @@ -0,0 +1,56 @@ +/** +* @file llfloaterbigpreview.h +* @brief Display of extended (big) preview for snapshots and SL Share +* @author merov@lindenlab.com +* +* $LicenseInfo:firstyear=2013&license=viewerlgpl$ +* Second Life Viewer Source Code +* Copyright (C) 2013, 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_LLFLOATERBIGPREVIEW_H +#define LL_LLFLOATERBIGPREVIEW_H + +#include "llfloater.h" +#include "llviewertexture.h" + +//class LLSnapshotLivePreview; + +class LLFloaterBigPreview : public LLFloater +{ +public: + LLFloaterBigPreview(const LLSD& key); + ~LLFloaterBigPreview(); + + BOOL postBuild(); + void draw(); + void onCancel(); + + void setPreview(LLView* previewp) { mPreviewHandle = previewp->getHandle(); } + void setFloaterOwner(LLFloater* floaterp) { mFloaterOwner = floaterp; } + void closeOnFloaterOwnerClosing(LLFloater* floaterp); + +private: + LLHandle mPreviewHandle; + LLUICtrl* mPreviewPlaceholder; + LLFloater* mFloaterOwner; +}; + +#endif // LL_LLFLOATERBIGPREVIEW_H + diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 61f1487d4b..21c619730c 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -44,6 +44,7 @@ #include "llslurl.h" #include "lltrans.h" #include "llsnapshotlivepreview.h" +#include "llfloaterbigpreview.h" #include "llviewerregion.h" #include "llviewercontrol.h" #include "llviewermedia.h" @@ -76,6 +77,7 @@ mPostButton(NULL) { mCommitCallbackRegistrar.add("SocialSharing.SendPhoto", boost::bind(&LLFlickrPhotoPanel::onSend, this)); mCommitCallbackRegistrar.add("SocialSharing.RefreshPhoto", boost::bind(&LLFlickrPhotoPanel::onClickNewSnapshot, this)); + mCommitCallbackRegistrar.add("SocialSharing.BigPreview", boost::bind(&LLFlickrPhotoPanel::onClickBigPreview, this)); } LLFlickrPhotoPanel::~LLFlickrPhotoPanel() @@ -227,7 +229,7 @@ void LLFlickrPhotoPanel::onVisibilityChange(const LLSD& new_visibility) LLSnapshotLivePreview::Params p; p.rect(full_screen_rect); LLSnapshotLivePreview* previewp = new LLSnapshotLivePreview(p); - mPreviewHandle = previewp->getHandle(); + mPreviewHandle = previewp->getHandle(); previewp->setContainer(this); previewp->setSnapshotType(previewp->SNAPSHOT_WEB); @@ -251,6 +253,18 @@ void LLFlickrPhotoPanel::onClickNewSnapshot() } } +void LLFlickrPhotoPanel::onClickBigPreview() +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + LLSnapshotLivePreview* previewp = getPreviewView(); + big_preview_floater->setPreview(previewp); + big_preview_floater->setFloaterOwner(getParentByType()); + } + LLFloaterReg::showInstance("big_preview"); +} + void LLFlickrPhotoPanel::onSend() { LLEventPumps::instance().obtain("FlickrConnectState").stopListening("LLFlickrPhotoPanel"); // just in case it is already listening @@ -340,6 +354,11 @@ void LLFlickrPhotoPanel::clearAndClose() LLFloater* floater = getParentByType(); if (floater) { + LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(floater); + } floater->closeFloater(); } } @@ -615,8 +634,23 @@ LLFloaterFlickr::LLFloaterFlickr(const LLSD& key) : LLFloater(key), mCommitCallbackRegistrar.add("SocialSharing.Cancel", boost::bind(&LLFloaterFlickr::onCancel, this)); } +void LLFloaterFlickr::onClose(bool app_quitting) +{ + LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } + LLFloater::onClose(app_quitting); +} + void LLFloaterFlickr::onCancel() { + LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); + if (big_preview_floater) + { + big_preview_floater->closeOnFloaterOwnerClosing(this); + } closeFloater(); } diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h index 319ab1278f..9fa4a258e2 100644 --- a/indra/newview/llfloaterflickr.h +++ b/indra/newview/llfloaterflickr.h @@ -48,6 +48,7 @@ public: LLSnapshotLivePreview* getPreviewView(); void onVisibilityChange(const LLSD& new_visibility); void onClickNewSnapshot(); + void onClickBigPreview(); void onSend(); bool onFlickrConnectStateChange(const LLSD& data); @@ -111,6 +112,7 @@ public: LLFloaterFlickr(const LLSD& key); BOOL postBuild(); void draw(); + void onClose(bool app_quitting); void onCancel(); void showPhotoPanel(); diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 7f3e7a080b..1b7b5290f8 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -113,7 +113,7 @@ public: LLPointer getFormattedImage(); LLPointer getEncodedImage(); - /// Sets size of preview thumbnail image and thhe surrounding rect. + /// Sets size of preview thumbnail image and the surrounding rect. void setThumbnailPlaceholderRect(const LLRect& rect) {mThumbnailPlaceholderRect = rect; } BOOL setThumbnailImageSize() ; void generateThumbnailImage(BOOL force_update = FALSE) ; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 1f25110aa3..982522955c 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -38,6 +38,7 @@ #include "llfloateravatar.h" #include "llfloateravatarpicker.h" #include "llfloateravatartextures.h" +#include "llfloaterbigpreview.h" #include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbuy.h" @@ -324,6 +325,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("facebook", "floater_facebook.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("flickr", "floater_flickr.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("twitter", "floater_twitter.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("big_preview", "floater_big_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterUIPreviewUtil::registerFloater(); LLFloaterReg::add("upload_anim_bvh", "floater_animation_bvh_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); diff --git a/indra/newview/skins/default/xui/en/floater_big_preview.xml b/indra/newview/skins/default/xui/en/floater_big_preview.xml new file mode 100644 index 0000000000..23698ccc40 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_big_preview.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml index 4516c01670..350c385cc3 100644 --- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -82,7 +82,7 @@ text_color="EmphasisColor" height="14" top_pad="-19" - left_pad="-20" + left_pad="-30" length="1" halign="center" name="working_lbl" @@ -92,6 +92,19 @@ width="150"> Refreshing... + Title: -- cgit v1.2.3 From 6dfcd7fc2bd0f502673c43f1a54cda2a8d74e391 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Tue, 25 Feb 2014 23:01:52 -0800 Subject: ACME-1327 : WIP : Added computation of the big preview, allow big preview to be resizable --- indra/newview/llfloaterbigpreview.cpp | 8 ++-- indra/newview/llsnapshotlivepreview.cpp | 54 +++++++++++++++++++++- indra/newview/llsnapshotlivepreview.h | 10 +++- .../skins/default/xui/en/floater_big_preview.xml | 2 +- 4 files changed, 66 insertions(+), 8 deletions(-) diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp index 84a1523e7c..d5f25d5f95 100644 --- a/indra/newview/llfloaterbigpreview.cpp +++ b/indra/newview/llfloaterbigpreview.cpp @@ -78,7 +78,7 @@ void LLFloaterBigPreview::draw() // Display the preview if one is available // HACK!!! We use the puny thumbnail image for the moment // *TODO : Use the real large preview - if (previewp && previewp->getThumbnailImage()) + if (previewp && previewp->getBigThumbnailImage()) { const LLRect& preview_rect = mPreviewPlaceholder->getRect(); // const S32 thumbnail_w = previewp->getThumbnailWidth(); @@ -93,9 +93,7 @@ void LLFloaterBigPreview::draw() // calc preview offset within the floater rect S32 offset_x = preview_rect.mLeft + local_offset_x; S32 offset_y = preview_rect.mBottom + local_offset_y; - - //llinfos << "Merov : draw, offset x = " << offset_x << ", y = " << offset_y << ", thumbnail w = " << thumbnail_w << ", h = " << thumbnail_h << ", rect w = " << preview_rect.getWidth() << ", h = " << preview_rect.getHeight() << llendl; - + gGL.matrixMode(LLRender::MM_MODELVIEW); // Apply floater transparency to the texture unless the floater is focused. F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); @@ -103,7 +101,7 @@ void LLFloaterBigPreview::draw() gl_draw_scaled_image(offset_x, offset_y, //thumbnail_w, thumbnail_h, preview_rect.getWidth(), preview_rect.getHeight(), - previewp->getThumbnailImage(), color % alpha); + previewp->getBigThumbnailImage(), color % alpha); } } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index eef4ed78c8..2ab00419f9 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -75,7 +75,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mColor(1.f, 0.f, 0.f, 0.5f), mCurImageIndex(0), mPreviewImage(NULL), - mThumbnailImage(NULL) , + mThumbnailImage(NULL) , + mBigThumbnailImage(NULL) , mThumbnailWidth(0), mThumbnailHeight(0), mThumbnailSubsampled(FALSE), @@ -115,6 +116,7 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param mKeepAspectRatio = gSavedSettings.getBOOL("KeepAspectForSnapshot") ; mThumbnailUpdateLock = FALSE ; mThumbnailUpToDate = FALSE ; + mBigThumbnailUpToDate = FALSE ; } LLSnapshotLivePreview::~LLSnapshotLivePreview() @@ -205,6 +207,7 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail if (new_thumbnail) { mThumbnailUpToDate = FALSE ; + mBigThumbnailUpToDate = FALSE; } } @@ -602,6 +605,55 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) mThumbnailUpdateLock = FALSE ; } +LLViewerTexture* LLSnapshotLivePreview::getBigThumbnailImage() +{ + if (mThumbnailUpdateLock) //in the process of updating + { + return NULL; + } + if (mBigThumbnailUpToDate && mBigThumbnailImage)//already updated + { + return mBigThumbnailImage; + } + + LLPointer raw = new LLImageRaw; + + // The big thumbnail is be a subsampled version of the preview (used in SL Share previews, i.e. Flickr, Twitter, Facebook) + raw->resize( mPreviewImage->getWidth(), + mPreviewImage->getHeight(), + mPreviewImage->getComponents()); + raw->copy(mPreviewImage); + // Scale to the big thumbnail size + if (!raw->scale(getBigThumbnailWidth(), getBigThumbnailHeight())) + { + raw = NULL ; + } + + if (raw) + { + // Filter + // Note: filtering needs to be done *before* the scaling to power of 2 or the effect is distorted + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(raw); + } + else + { + llwarns << "Couldn't find a path to the following filter : " << getFilter() << llendl; + } + } + // Scale to a power of 2 so it can be mapped to a texture + raw->expandToPowerOfTwo(); + mBigThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE); + mBigThumbnailUpToDate = TRUE ; + } + + return mBigThumbnailImage ; +} // Called often. Checks whether it's time to grab a new snapshot and if so, does it. // Returns TRUE if new snapshot generated, FALSE otherwise. diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index 1b7b5290f8..baf3531e69 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -120,6 +120,11 @@ public: void resetThumbnailImage() { mThumbnailImage = NULL ; } void drawPreviewRect(S32 offset_x, S32 offset_y) ; + + LLViewerTexture* getBigThumbnailImage(); + S32 getBigThumbnailWidth() const { return 3*mThumbnailWidth ; } + S32 getBigThumbnailHeight() const { return 3*mThumbnailHeight ; } + // Returns TRUE when snapshot generated, FALSE otherwise. static BOOL onIdle( void* snapshot_preview ); @@ -145,7 +150,10 @@ private: BOOL mThumbnailUpdateLock ; BOOL mThumbnailUpToDate ; LLRect mThumbnailPlaceholderRect; - BOOL mThumbnailSubsampled; // TRUE is the thumbnail is a subsampled version of the mPreviewImage + BOOL mThumbnailSubsampled; // TRUE if the thumbnail is a subsampled version of the mPreviewImage + + LLPointer mBigThumbnailImage ; + BOOL mBigThumbnailUpToDate; S32 mCurImageIndex; // The logic is mPreviewImage (raw frame) -> mFormattedImage (formatted / filtered) -> mPreviewImageEncoded (decoded back, to show artifacts) diff --git a/indra/newview/skins/default/xui/en/floater_big_preview.xml b/indra/newview/skins/default/xui/en/floater_big_preview.xml index 23698ccc40..c0bdd3d9bd 100644 --- a/indra/newview/skins/default/xui/en/floater_big_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_big_preview.xml @@ -2,7 +2,7 @@ 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 8fb94a96b18d3b115b75f6d40a06da1c31d21623 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 26 Feb 2014 06:33:15 -0800 Subject: ACME-1327 : WIP : Update the big preview with size and refresh as well --- indra/newview/llsnapshotlivepreview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 2ab00419f9..db203c7c78 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -545,6 +545,9 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update) return ; } + // Invalidate the big thumbnail when we regenerate the small one + mBigThumbnailUpToDate = FALSE; + if(mThumbnailImage) { resetThumbnailImage() ; -- cgit v1.2.3 From d80a812ffc0e70dcb049aefca69f2a4f8bbd4ab8 Mon Sep 17 00:00:00 2001 From: Cho Date: Wed, 26 Feb 2014 20:21:05 +0000 Subject: Changed SLShare photo upload filename to Untitled for the sake of default Flickr title --- indra/newview/llfacebookconnect.cpp | 2 +- indra/newview/llflickrconnect.cpp | 2 +- indra/newview/lltwitterconnect.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index e3ddb31935..ec7d0f7c50 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -518,7 +518,7 @@ void LLFacebookConnect::sharePhoto(LLPointer image, const std: << caption << "\r\n"; body << "--" << boundary << "\r\n" - << "Content-Disposition: form-data; name=\"image\"; filename=\"snapshot." << imageFormat << "\"\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" << "Content-Type: image/" << imageFormat << "\r\n\r\n"; // Insert the image data. diff --git a/indra/newview/llflickrconnect.cpp b/indra/newview/llflickrconnect.cpp index c09e738a26..1898842478 100644 --- a/indra/newview/llflickrconnect.cpp +++ b/indra/newview/llflickrconnect.cpp @@ -401,7 +401,7 @@ void LLFlickrConnect::uploadPhoto(LLPointer image, const std:: << safety_level << "\r\n"; body << "--" << boundary << "\r\n" - << "Content-Disposition: form-data; name=\"image\"; filename=\"snapshot." << imageFormat << "\"\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" << "Content-Type: image/" << imageFormat << "\r\n\r\n"; // Insert the image data. diff --git a/indra/newview/lltwitterconnect.cpp b/indra/newview/lltwitterconnect.cpp index 350da84f69..cfdbca1b81 100644 --- a/indra/newview/lltwitterconnect.cpp +++ b/indra/newview/lltwitterconnect.cpp @@ -386,7 +386,7 @@ void LLTwitterConnect::uploadPhoto(LLPointer image, const std: << status << "\r\n"; body << "--" << boundary << "\r\n" - << "Content-Disposition: form-data; name=\"image\"; filename=\"snapshot." << imageFormat << "\"\r\n" + << "Content-Disposition: form-data; name=\"image\"; filename=\"Untitled." << imageFormat << "\"\r\n" << "Content-Type: image/" << imageFormat << "\r\n\r\n"; // Insert the image data. -- cgit v1.2.3 From ed38a0aede09f42c4fe7eb4dd53ecd6490d12ca0 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Wed, 26 Feb 2014 17:22:16 -0800 Subject: ACME-1327 : WIP : Make rescale of preview isotropic, make preview button a toggle --- indra/newview/llfloaterbigpreview.cpp | 33 ++++++++++++---------- indra/newview/llfloaterbigpreview.h | 4 +-- indra/newview/llfloaterflickr.cpp | 31 +++++++++++++++----- indra/newview/llfloaterflickr.h | 1 + indra/newview/llsnapshotlivepreview.h | 1 + .../skins/default/xui/en/panel_flickr_photo.xml | 5 ++-- 6 files changed, 48 insertions(+), 27 deletions(-) diff --git a/indra/newview/llfloaterbigpreview.cpp b/indra/newview/llfloaterbigpreview.cpp index d5f25d5f95..b516e9dd01 100644 --- a/indra/newview/llfloaterbigpreview.cpp +++ b/indra/newview/llfloaterbigpreview.cpp @@ -28,8 +28,6 @@ #include "llviewerprecompiledheaders.h" #include "llfloaterbigpreview.h" - -#include "llfloaterreg.h" #include "llsnapshotlivepreview.h" /////////////////////// @@ -57,7 +55,7 @@ void LLFloaterBigPreview::onCancel() void LLFloaterBigPreview::closeOnFloaterOwnerClosing(LLFloater* floaterp) { - if (floaterp == mFloaterOwner) + if (isFloaterOwner(floaterp)) { closeFloater(); } @@ -76,21 +74,25 @@ void LLFloaterBigPreview::draw() LLSnapshotLivePreview * previewp = static_cast(mPreviewHandle.get()); // Display the preview if one is available - // HACK!!! We use the puny thumbnail image for the moment - // *TODO : Use the real large preview if (previewp && previewp->getBigThumbnailImage()) { + // Get the preview rect const LLRect& preview_rect = mPreviewPlaceholder->getRect(); -// const S32 thumbnail_w = previewp->getThumbnailWidth(); -// const S32 thumbnail_h = previewp->getThumbnailHeight(); - // calc preview offset within the preview rect -// const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; -// const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; - const S32 local_offset_x = 0 ; - const S32 local_offset_y = 0 ; + // Get the preview texture size + S32 thumbnail_w = previewp->getBigThumbnailWidth(); + S32 thumbnail_h = previewp->getBigThumbnailHeight(); + + // Compute the scaling ratio and the size of the final texture in the rect: we want to prevent anisotropic scaling (distorted in x and y) + F32 ratio = llmax((F32)(thumbnail_w)/(F32)(preview_rect.getWidth()), (F32)(thumbnail_h)/(F32)(preview_rect.getHeight())); + thumbnail_w = (S32)((F32)(thumbnail_w)/ratio); + thumbnail_h = (S32)((F32)(thumbnail_h)/ratio); - // calc preview offset within the floater rect + // Compute the preview offset within the preview rect: we want to center that preview in the available rect + const S32 local_offset_x = (preview_rect.getWidth() - thumbnail_w) / 2 ; + const S32 local_offset_y = (preview_rect.getHeight() - thumbnail_h) / 2 ; + + // Compute preview offset within the floater rect S32 offset_x = preview_rect.mLeft + local_offset_x; S32 offset_y = preview_rect.mBottom + local_offset_y; @@ -98,9 +100,10 @@ void LLFloaterBigPreview::draw() // Apply floater transparency to the texture unless the floater is focused. F32 alpha = getTransparencyType() == TT_ACTIVE ? 1.0f : getCurrentTransparency(); LLColor4 color = LLColor4::white; + + // Draw the preview texture gl_draw_scaled_image(offset_x, offset_y, - //thumbnail_w, thumbnail_h, - preview_rect.getWidth(), preview_rect.getHeight(), + thumbnail_w, thumbnail_h, previewp->getBigThumbnailImage(), color % alpha); } } diff --git a/indra/newview/llfloaterbigpreview.h b/indra/newview/llfloaterbigpreview.h index 91b0968e88..63c6784d36 100644 --- a/indra/newview/llfloaterbigpreview.h +++ b/indra/newview/llfloaterbigpreview.h @@ -28,9 +28,6 @@ #define LL_LLFLOATERBIGPREVIEW_H #include "llfloater.h" -#include "llviewertexture.h" - -//class LLSnapshotLivePreview; class LLFloaterBigPreview : public LLFloater { @@ -44,6 +41,7 @@ public: void setPreview(LLView* previewp) { mPreviewHandle = previewp->getHandle(); } void setFloaterOwner(LLFloater* floaterp) { mFloaterOwner = floaterp; } + bool isFloaterOwner(LLFloater* floaterp) const { return (mFloaterOwner == floaterp); } void closeOnFloaterOwnerClosing(LLFloater* floaterp); private: diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index 21c619730c..e93adf1570 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -66,6 +66,7 @@ LLFlickrPhotoPanel::LLFlickrPhotoPanel() : mSnapshotPanel(NULL), mResolutionComboBox(NULL), mRefreshBtn(NULL), +mBtnPreview(NULL), mWorkingLabel(NULL), mThumbnailPlaceholder(NULL), mTitleTextBox(NULL), @@ -98,6 +99,7 @@ BOOL LLFlickrPhotoPanel::postBuild() mFilterComboBox = getChild("filters_combobox"); mFilterComboBox->setCommitCallback(boost::bind(&LLFlickrPhotoPanel::updateResolution, this, TRUE)); mRefreshBtn = getChild("new_snapshot_btn"); + mBtnPreview = getChild("big_preview_btn"); mWorkingLabel = getChild("working_lbl"); mThumbnailPlaceholder = getChild("thumbnail_placeholder"); mTitleTextBox = getChild("photo_title"); @@ -162,8 +164,14 @@ void LLFlickrPhotoPanel::draw() mResolutionComboBox->setEnabled(no_ongoing_connection); mFilterComboBox->setEnabled(no_ongoing_connection); mRefreshBtn->setEnabled(no_ongoing_connection); + mBtnPreview->setEnabled(no_ongoing_connection); mLocationCheckbox->setEnabled(no_ongoing_connection); + // Toggle the button state as appropriate + LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); + bool preview_active = (big_preview_floater && big_preview_floater->getVisible() && big_preview_floater->isFloaterOwner(getParentByType())); + mBtnPreview->setToggleState(preview_active); + // Display the preview if one is available if (previewp && previewp->getThumbnailImage()) { @@ -256,13 +264,22 @@ void LLFlickrPhotoPanel::onClickNewSnapshot() void LLFlickrPhotoPanel::onClickBigPreview() { LLFloaterBigPreview* big_preview_floater = dynamic_cast(LLFloaterReg::getInstance("big_preview")); - if (big_preview_floater) - { - LLSnapshotLivePreview* previewp = getPreviewView(); - big_preview_floater->setPreview(previewp); - big_preview_floater->setFloaterOwner(getParentByType()); - } - LLFloaterReg::showInstance("big_preview"); + bool preview_active = (big_preview_floater && big_preview_floater->getVisible() && big_preview_floater->isFloaterOwner(getParentByType())); + // Toggle the preview + if (preview_active) + { + LLFloaterReg::hideInstance("big_preview"); + } + else + { + if (big_preview_floater) + { + LLSnapshotLivePreview* previewp = getPreviewView(); + big_preview_floater->setPreview(previewp); + big_preview_floater->setFloaterOwner(getParentByType()); + } + LLFloaterReg::showInstance("big_preview"); + } } void LLFlickrPhotoPanel::onSend() diff --git a/indra/newview/llfloaterflickr.h b/indra/newview/llfloaterflickr.h index 9fa4a258e2..8a346c3166 100644 --- a/indra/newview/llfloaterflickr.h +++ b/indra/newview/llfloaterflickr.h @@ -76,6 +76,7 @@ private: LLUICtrl * mRatingComboBox; LLUICtrl * mPostButton; LLUICtrl * mCancelButton; + LLButton * mBtnPreview; }; class LLFlickrAccountPanel : public LLPanel diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index baf3531e69..0e918d165e 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -28,6 +28,7 @@ #define LL_LLSNAPSHOTLIVEPREVIEW_H #include "llpanelsnapshot.h" +#include "llviewertexture.h" #include "llviewerwindow.h" class LLImageJPEG; diff --git a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml index 350c385cc3..8d8ef45c0d 100644 --- a/indra/newview/skins/default/xui/en/panel_flickr_photo.xml +++ b/indra/newview/skins/default/xui/en/panel_flickr_photo.xml @@ -95,11 +95,12 @@ Refreshing... + 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: Thu, 27 Feb 2014 16:03:35 -0800 Subject: ACME-1333 : Allow Facebook panel to be resized, fixed ensuing follow positioning issues in all subpanels --- indra/newview/skins/default/xui/en/floater_facebook.xml | 7 +++++-- indra/newview/skins/default/xui/en/panel_facebook_account.xml | 2 ++ indra/newview/skins/default/xui/en/panel_facebook_friends.xml | 1 + indra/newview/skins/default/xui/en/panel_facebook_photo.xml | 9 +++++---- indra/newview/skins/default/xui/en/panel_facebook_place.xml | 7 ++++--- indra/newview/skins/default/xui/en/panel_facebook_status.xml | 7 ++++--- 6 files changed, 21 insertions(+), 12 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_facebook.xml b/indra/newview/skins/default/xui/en/floater_facebook.xml index 544c443c76..4535b9084e 100644 --- a/indra/newview/skins/default/xui/en/floater_facebook.xml +++ b/indra/newview/skins/default/xui/en/floater_facebook.xml @@ -2,7 +2,7 @@ diff --git a/indra/newview/skins/default/xui/en/panel_facebook_friends.xml b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml index d772dde0c5..07cbd06afa 100644 --- a/indra/newview/skins/default/xui/en/panel_facebook_friends.xml +++ b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml @@ -2,6 +2,7 @@ height="400" width="304" layout="topleft" + follows="all" name="panel_facebook_friends">