DEV-41929: implement event API to query About-box info
parent
11f36ceab1
commit
faa70a5986
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Reference in New Issue