diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2011-02-21 15:44:16 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2011-02-21 15:44:16 -0500 |
commit | dbaef6ef1fa6461373cd7117f20f5b8fd4e8db6c (patch) | |
tree | 3d02f98489fd74488b38cdef80d327b9e24233fd /indra/llui | |
parent | 1a79aeca54db6ee5bf1fb2968c2642f8a3306091 (diff) | |
parent | 25d754c26b8ee749b805d5fa0d1b0d7971756a4b (diff) |
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloaterreglistener.cpp | 17 | ||||
-rw-r--r-- | indra/llui/llfloaterreglistener.h | 1 | ||||
-rw-r--r-- | indra/llui/tests/llurlentry_stub.cpp | 4 |
3 files changed, 16 insertions, 6 deletions
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp index 821d4543ae..7525b8cab3 100644 --- a/indra/llui/llfloaterreglistener.cpp +++ b/indra/llui/llfloaterreglistener.cpp @@ -60,6 +60,11 @@ LLFloaterRegListener::LLFloaterRegListener(): "Ask to toggle the state of the floater specified in [\"name\"]", &LLFloaterRegListener::toggleInstance, requiredName); + add("instanceVisible", + "Return on [\"reply\"] an event whose [\"visible\"] indicates the visibility " + "of the floater specified in [\"name\"]", + &LLFloaterRegListener::instanceVisible, + requiredName); LLSD requiredNameButton; requiredNameButton["name"] = LLSD(); requiredNameButton["button"] = LLSD(); @@ -71,9 +76,7 @@ LLFloaterRegListener::LLFloaterRegListener(): void LLFloaterRegListener::getBuildMap(const LLSD& event) const { - // Honor the "reqid" convention by echoing event["reqid"] in our reply packet. - LLReqID reqID(event); - LLSD reply(reqID.makeResponse()); + LLSD reply; // Build an LLSD map that mirrors sBuildMap. Since we have no good way to // represent a C++ callable in LLSD, the only part of BuildData we can // store is the filename. For each LLSD map entry, it would be more @@ -86,7 +89,7 @@ void LLFloaterRegListener::getBuildMap(const LLSD& event) const reply[mi->first] = mi->second.mFile; } // Send the reply to the LLEventPump named in event["reply"]. - LLEventPumps::instance().obtain(event["reply"]).post(reply); + sendReply(reply, event); } void LLFloaterRegListener::showInstance(const LLSD& event) const @@ -104,6 +107,12 @@ void LLFloaterRegListener::toggleInstance(const LLSD& event) const LLFloaterReg::toggleInstance(event["name"], event["key"]); } +void LLFloaterRegListener::instanceVisible(const LLSD& event) const +{ + sendReply(LLSDMap("visible", LLFloaterReg::instanceVisible(event["name"], event["key"])), + event); +} + void LLFloaterRegListener::clickButton(const LLSD& event) const { // If the caller requests a reply, build the reply. diff --git a/indra/llui/llfloaterreglistener.h b/indra/llui/llfloaterreglistener.h index 586656667c..24311a2dfa 100644 --- a/indra/llui/llfloaterreglistener.h +++ b/indra/llui/llfloaterreglistener.h @@ -47,6 +47,7 @@ private: void showInstance(const LLSD& event) const; void hideInstance(const LLSD& event) const; void toggleInstance(const LLSD& event) const; + void instanceVisible(const LLSD& event) const; void clickButton(const LLSD& event) const; }; diff --git a/indra/llui/tests/llurlentry_stub.cpp b/indra/llui/tests/llurlentry_stub.cpp index 96ebe83826..c11ad11de9 100644 --- a/indra/llui/tests/llurlentry_stub.cpp +++ b/indra/llui/tests/llurlentry_stub.cpp @@ -193,8 +193,8 @@ LLFontGL* LLFontGL::getFontDefault() return NULL; } -char* _PREHASH_AgentData = "AgentData"; -char* _PREHASH_AgentID = "AgentID"; +char* _PREHASH_AgentData = const_cast<char*>("AgentData"); +char* _PREHASH_AgentID = const_cast<char*>("AgentID"); LLHost LLHost::invalid(INVALID_PORT,INVALID_HOST_IP_ADDRESS); |