summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2011-02-17 19:28:34 -0500
committerNat Goodspeed <nat@lindenlab.com>2011-02-17 19:28:34 -0500
commit89258376ffc3d1e6d9e40a9136e4901e643187c8 (patch)
tree71955ae12838cb282d48337f5ff37790c4b50612 /indra/llui
parent930710ceecf32c12af5d6e416a4697f9eb9df8aa (diff)
parent5946d84eef30caeae6dee63767fabdcf81613984 (diff)
Automated merge with http://pdp47.lindenlab.com/cgi-bin/hgwebdir.cgi/brad/viewer-development/
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloaterreglistener.cpp13
-rw-r--r--indra/llui/llfloaterreglistener.h1
-rw-r--r--indra/llui/tests/llurlentry_stub.cpp4
3 files changed, 16 insertions, 2 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;
};
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);