From 8d542a46c7b1c5eb1817076348c0793fa6d3f617 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 8 Jul 2016 18:50:19 +0300 Subject: MAINT-6534 Fixed the LLSD validation failure --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ce2d652c37..aaf41b68b4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 40.0 FindLandArea -- cgit v1.2.3 From 1c7548d3bfaa6f2351d8102e53b2dd90a5d864e7 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 8 Jul 2016 15:07:52 +0300 Subject: MAINT-6448 PERMISSION_DEBIT notification should default to Deny --- indra/newview/lltoast.cpp | 15 +++++++++++++++ indra/newview/lltoast.h | 2 ++ 2 files changed, 17 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 7020ac0c65..edde7c8076 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -202,6 +202,21 @@ void LLToast::hide() } } +/*virtual*/ +void LLToast::setFocus(BOOL b) +{ + if (b && !hasFocus() && mPanel) + { + LLModalDialog::setFocus(TRUE); + // mostly for buttons + mPanel->setFocus(TRUE); + } + else + { + LLModalDialog::setFocus(b); + } +} + void LLToast::onFocusLost() { if(mWrapperPanel && !isBackgroundVisible()) diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index f02d7c2a1a..cd92189012 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -150,6 +150,8 @@ public: // virtual void hide(); + /*virtual*/ void setFocus(BOOL b); + /*virtual*/ void onFocusLost(); /*virtual*/ void onFocusReceived(); -- cgit v1.2.3 From a3f63bce3c5f45e2275980363bbb598cd6861bc8 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 11 Jul 2016 16:23:18 +0300 Subject: MAINT-6534 Resetting scripts via the build menu no longer works on many scripted objects --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llcompilequeue.cpp | 60 ++++++++++++++++------ indra/newview/llcompilequeue.h | 13 +++-- indra/newview/llviewermenu.cpp | 13 +++-- .../skins/default/xui/en/floater_script_queue.xml | 8 +++ 5 files changed, 71 insertions(+), 25 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aaf41b68b4..6ccf89eabe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3710,7 +3710,7 @@ Type F32 Value - 40.0 + 300.0 FindLandArea diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index de7bc1e3c5..7721e67290 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -207,9 +207,10 @@ void LLFloaterScriptQueue::onCloseBtn(void* user_data) self->closeFloater(); } -void LLFloaterScriptQueue::addObject(const LLUUID& id) +void LLFloaterScriptQueue::addObject(const LLUUID& id, std::string name) { - mObjectIDs.insert(id); + ObjectData obj = { id, name }; + mObjectList.push_back(obj); } BOOL LLFloaterScriptQueue::start() @@ -218,7 +219,7 @@ BOOL LLFloaterScriptQueue::start() LLStringUtil::format_map_t args; args["[START]"] = mStartString; - args["[COUNT]"] = llformat ("%d", mObjectIDs.size()); + args["[COUNT]"] = llformat ("%d", mObjectList.size()); buffer = getString ("Starting", args); getChild("queue output")->addSimpleElement(buffer, ADD_BOTTOM); @@ -241,7 +242,7 @@ void LLFloaterScriptQueue::addStringMessage(const std::string &message) BOOL LLFloaterScriptQueue::isDone() const { - return (mCurrentObjectID.isNull() && (mObjectIDs.size() == 0)); + return (mCurrentObjectID.isNull() && (mObjectList.size() == 0)); } ///---------------------------------------------------------------------------- @@ -339,7 +340,7 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren LLCoros::instance().launch("ScriptQueueCompile", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, queue->mStartString, hFloater, - queue->mObjectIDs, + queue->mObjectList, fn)); } @@ -393,7 +394,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -443,7 +446,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -497,7 +502,9 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat { if (result.has("timeout") && result["timeout"].asBoolean()) { - std::string buffer = "Timeout: " + inventory->getName(); + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = inventory->getName(); + std::string buffer = that->getString("Timeout", args); that->addStringMessage(buffer); return true; } @@ -601,7 +608,7 @@ bool LLFloaterResetQueue::startQueue() LLCoros::instance().launch("ScriptResetQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, getDerivedHandle(), - mObjectIDs, + mObjectList, fn)); return true; @@ -655,7 +662,7 @@ bool LLFloaterRunQueue::startQueue() LLCoros::instance().launch("ScriptRunQueue", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -710,7 +717,7 @@ bool LLFloaterNotRunQueue::startQueue() LLCoros::instance().launch("ScriptQueueNotRun", boost::bind(LLFloaterScriptQueue::objectScriptProcessingQueueCoro, mStartString, hFloater, - mObjectIDs, + mObjectList, fn)); return true; @@ -730,7 +737,7 @@ void ObjectInventoryFetcher::inventoryChanged(LLViewerObject* object, } void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, - uuid_list_t objectList, fnQueueAction_t func) + object_data_list_t objectList, fnQueueAction_t func) { LLCoros::set_consuming(true); LLFloaterScriptQueue * floater(NULL); @@ -744,12 +751,13 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L // .with("[COUNT]", LLSD::Integer(objectList.size()))); // floater = NULL; - for (uuid_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) + for (object_data_list_t::iterator itObj(objectList.begin()); (itObj != objectList.end()); ++itObj) { bool firstForObject = true; - LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << (*itObj).asString() << LL_ENDL; + LLUUID object_id = (*itObj).mObjectId; + LL_INFOS("SCRIPTQ") << "Next object in queue with ID=" << object_id.asString() << LL_ENDL; - LLPointer obj = gObjectList.findObject(*itObj); + LLPointer obj = gObjectList.findObject(object_id); LLInventoryObject::object_list_t inventory; if (obj) { @@ -757,13 +765,31 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L fetcher->fetchInventory(); + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("LoadingObjInv", args)); + } + LLSD result = llcoro::suspendUntilEventOnWithTimeout(maildrop, fetch_timeout, LLSD().with("timeout", LLSD::Boolean(true))); if (result.has("timeout") && result["timeout"].asBoolean()) { - LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << (*itObj).asString() << + LL_WARNS("SCRIPTQ") << "Unable to retrieve inventory for object " << object_id.asString() << ". Skipping to next object." << LL_ENDL; + + // floater could have been closed + floater = hfloater.get(); + if (floater) + { + LLStringUtil::format_map_t args; + args["[OBJECT_NAME]"] = (*itObj).mObjectName; + floater->addStringMessage(floater->getString("Timeout", args)); + } + continue; } @@ -771,7 +797,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L } else { - LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << (*itObj) << + LL_WARNS("SCRIPTQ") << "Unable to retrieve object with ID of " << object_id << ". Skipping to next." << LL_ENDL; continue; } diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 271ac5e05d..1b3d8f83a0 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -61,7 +61,7 @@ public: void setMono(bool mono) { mMono = mono; } // addObject() accepts an object id. - void addObject(const LLUUID& id); + void addObject(const LLUUID& id, std::string name); // start() returns TRUE if the queue has started, otherwise FALSE. BOOL start(); @@ -87,7 +87,14 @@ protected: LLButton* mCloseBtn; // Object Queue - uuid_list_t mObjectIDs; + struct ObjectData + { + LLUUID mObjectId; + std::string mObjectName; + }; + typedef std::vector object_data_list_t; + + object_data_list_t mObjectList; LLUUID mCurrentObjectID; bool mDone; @@ -95,7 +102,7 @@ protected: bool mMono; typedef boost::function &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t; - static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, uuid_list_t objectList, fnQueueAction_t func); + static void objectScriptProcessingQueueCoro(std::string action, LLHandle hfloater, object_data_list_t objectList, fnQueueAction_t func); }; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 99a9ed1d75..f5b06fbd19 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -6986,20 +6986,25 @@ class LLAvatarCall : public view_listener_t namespace { - struct QueueObjects : public LLSelectedObjectFunctor + struct QueueObjects : public LLSelectedNodeFunctor { BOOL scripted; BOOL modifiable; LLFloaterScriptQueue* mQueue; QueueObjects(LLFloaterScriptQueue* q) : mQueue(q), scripted(FALSE), modifiable(FALSE) {} - virtual bool apply(LLViewerObject* obj) + virtual bool apply(LLSelectNode* node) { + LLViewerObject* obj = node->getObject(); + if (!obj) + { + return true; + } scripted = obj->flagScripted(); modifiable = obj->permModify(); if( scripted && modifiable ) { - mQueue->addObject(obj->getID()); + mQueue->addObject(obj->getID(), node->mName); return false; } else @@ -7015,7 +7020,7 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) QueueObjects func(q); LLSelectMgr *mgr = LLSelectMgr::getInstance(); LLObjectSelectionHandle selectHandle = mgr->getSelection(); - bool fail = selectHandle->applyToObjects(&func); + bool fail = selectHandle->applyToNodes(&func); if(fail) { if ( !func.scripted ) diff --git a/indra/newview/skins/default/xui/en/floater_script_queue.xml b/indra/newview/skins/default/xui/en/floater_script_queue.xml index f4aca7bb3d..0982683a7f 100644 --- a/indra/newview/skins/default/xui/en/floater_script_queue.xml +++ b/indra/newview/skins/default/xui/en/floater_script_queue.xml @@ -29,6 +29,14 @@ name="NotRunning"> Not running + + Timeout: [OBJECT_NAME] + + + Loading inventory for: [OBJECT_NAME] +