summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2011-02-08 19:44:21 -0500
committerNat Goodspeed <nat@lindenlab.com>2011-02-08 19:44:21 -0500
commitc994d7937e502fe4a0b9bc46d876a77a34f0c3d5 (patch)
tree47ac0f3efe8a53d35e30288216ae6df189811188
parenta4d0a29c4942f9a4ba423358805e2dfe042144a1 (diff)
SWAT-481: add event wrapper for LLFloaterReg::instanceVisible()
-rw-r--r--indra/llui/llfloaterreglistener.cpp13
-rw-r--r--indra/llui/llfloaterreglistener.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index 821d4543ae..ec2ac6834e 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();
@@ -104,6 +109,14 @@ void LLFloaterRegListener::toggleInstance(const LLSD& event) const
LLFloaterReg::toggleInstance(event["name"], event["key"]);
}
+void LLFloaterRegListener::instanceVisible(const LLSD& event) const
+{
+ LLReqID reqID(event);
+ LLSD reply(reqID.makeResponse());
+ reply["visible"] = LLFloaterReg::instanceVisible(event["name"], event["key"]);
+ LLEventPumps::instance().obtain(event["reply"]).post(reply);
+}
+
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;
};