SWAT-481: add event wrapper for LLFloaterReg::instanceVisible()

master
Nat Goodspeed 2011-02-08 19:44:21 -05:00
parent a4d0a29c49
commit c994d7937e
2 changed files with 14 additions and 0 deletions

View File

@ -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.

View File

@ -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;
};