From faa70a5986e0d322f53c16d60d439d3f7441cfa6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed <nat@lindenlab.com> Date: Wed, 28 Oct 2009 17:27:06 +0000 Subject: DEV-41929: implement event API to query About-box info --- indra/newview/llfloaterabout.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index c0446d9668..63ea990d14 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -63,6 +63,7 @@ #include "llwindow.h" #include "stringize.h" #include "llsdutil_math.h" +#include "lleventdispatcher.h" #if LL_WINDOWS #include "lldxhardware.h" @@ -299,6 +300,27 @@ static std::string get_viewer_release_notes_url() return LLWeb::escapeURL(url.str()); } +class LLFloaterAboutListener: public LLDispatchListener +{ +public: + LLFloaterAboutListener(): + LLDispatchListener("LLFloaterAbout", "op") + { + add("getInfo", &LLFloaterAboutListener::getInfo, LLSD().insert("reply", LLSD())); + } + +private: + void getInfo(const LLSD& request) const + { + LLReqID reqid(request); + LLSD reply(LLFloaterAbout::getInfo()); + reqid.stamp(reply); + LLEventPumps::instance().obtain(request["reply"]).post(reply); + } +}; + +static LLFloaterAboutListener floaterAboutListener; + void LLFloaterAbout::onClickCopyToClipboard() { LLViewerTextEditor *support_widget = -- cgit v1.2.3