summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-07-13 01:21:19 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-07-13 01:21:19 +0300
commitb3ae56b42796490676422a60f57cee22f6085b5a (patch)
treebe58c0f1bfb6b41b1975170eb13b6b510ee49101 /indra
parent3e60211e47a0b42e43b2d715e03446f80e1681cd (diff)
parent85c0bec92c74e13c08dc316d2d1c3b0941dff536 (diff)
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml2
-rw-r--r--indra/newview/llcompilequeue.cpp60
-rw-r--r--indra/newview/llcompilequeue.h13
-rw-r--r--indra/newview/lleventpoll.cpp9
-rw-r--r--indra/newview/lleventpoll.h8
-rw-r--r--indra/newview/lltoast.cpp15
-rw-r--r--indra/newview/lltoast.h2
-rw-r--r--indra/newview/llviewermenu.cpp13
-rw-r--r--indra/newview/skins/default/xui/en/floater_script_queue.xml8
9 files changed, 94 insertions, 36 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 70b374969d..6106dde734 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3710,7 +3710,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>40.0</integer>
+ <real>300.0</real>
</map>
<key>FindLandArea</key>
<map>
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<LLScrollListCtrl>("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<LLFloaterCompileQueue> 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<LLFloaterCompileQueue> 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<LLFloaterCompileQueue> 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<LLFloaterScriptQueue>(),
- 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<LLFloaterScriptQueue> 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<LLViewerObject> obj = gObjectList.findObject(*itObj);
+ LLPointer<LLViewerObject> 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<ObjectData> object_data_list_t;
+
+ object_data_list_t mObjectList;
LLUUID mCurrentObjectID;
bool mDone;
@@ -95,7 +102,7 @@ protected:
bool mMono;
typedef boost::function<bool(const LLPointer<LLViewerObject> &, LLInventoryObject*, LLEventPump &)> fnQueueAction_t;
- static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, uuid_list_t objectList, fnQueueAction_t func);
+ static void objectScriptProcessingQueueCoro(std::string action, LLHandle<LLFloaterScriptQueue> hfloater, object_data_list_t objectList, fnQueueAction_t func);
};
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 7178042b32..cc77b407ae 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -40,12 +40,14 @@
#include "llcorehttputil.h"
#include "lleventfilter.h"
+#include "boost/make_shared.hpp"
+
namespace LLEventPolling
{
namespace Details
{
- class LLEventPollImpl
+ class LLEventPollImpl: public boost::enable_shared_from_this<LLEventPollImpl>
{
public:
LLEventPollImpl(const LLHost &sender);
@@ -113,7 +115,7 @@ namespace Details
{
std::string coroname =
LLCoros::instance().launch("LLEventPollImpl::eventPollCoro",
- boost::bind(&LLEventPollImpl::eventPollCoro, this, url));
+ boost::bind(&LLEventPollImpl::eventPollCoro, this->shared_from_this(), url));
LL_INFOS("LLEventPollImpl") << coroname << " with url '" << url << LL_ENDL;
}
}
@@ -273,8 +275,7 @@ namespace Details
LLEventPoll::LLEventPoll(const std::string& poll_url, const LLHost& sender):
mImpl()
{
- mImpl = boost::unique_ptr<LLEventPolling::Details::LLEventPollImpl>
- (new LLEventPolling::Details::LLEventPollImpl(sender));
+ mImpl = boost::make_shared<LLEventPolling::Details::LLEventPollImpl>(sender);
mImpl->start(poll_url);
}
diff --git a/indra/newview/lleventpoll.h b/indra/newview/lleventpoll.h
index e2afd9226b..65766dbb2a 100644
--- a/indra/newview/lleventpoll.h
+++ b/indra/newview/lleventpoll.h
@@ -27,12 +27,6 @@
#ifndef LL_LLEVENTPOLL_H
#define LL_LLEVENTPOLL_H
-#include "boost/move/unique_ptr.hpp"
-
-namespace boost
-{
- using ::boost::movelib::unique_ptr; // move unique_ptr into the boost namespace.
-}
class LLHost;
@@ -57,7 +51,7 @@ public:
private:
- boost::unique_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
+ boost::shared_ptr<LLEventPolling::Details::LLEventPollImpl> mImpl;
};
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();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 5790fa4c46..46f03f9971 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -6988,20 +6988,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
@@ -7017,7 +7022,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
</floater.string>
+ <floater.string
+ name="Timeout">
+ Timeout: [OBJECT_NAME]
+ </floater.string>
+ <floater.string
+ name="LoadingObjInv">
+ Loading inventory for: [OBJECT_NAME]
+ </floater.string>
<button
follows="right|bottom"
height="24"