DEV-41929: implement event API to query About-box info

master
Nat Goodspeed 2009-10-28 17:27:06 +00:00
parent 11f36ceab1
commit faa70a5986
1 changed files with 22 additions and 0 deletions

View File

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