diff options
| author | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
|---|---|---|
| committer | Nat Goodspeed <nat@lindenlab.com> | 2009-09-26 18:08:24 -0400 |
| commit | bc4444cd78067cbf11d3ffb210375a31a33f96bd (patch) | |
| tree | d9b8e78db237869e630fec6c71335d1294cec101 /indra/newview/llfloaterabout.cpp | |
| parent | 8ddc0c0ac43e9d10bf0262cd1ab3c0e79808fc14 (diff) | |
| parent | 09bf3c1fec107e9e66514837d208ef62a6b67b91 (diff) | |
Merge into viewer/viewer-20 yesterday's lindenlab/svn-imports-viewer-20
Diffstat (limited to 'indra/newview/llfloaterabout.cpp')
| -rw-r--r-- | indra/newview/llfloaterabout.cpp | 69 |
1 files changed, 52 insertions, 17 deletions
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index caa10e9452..e28d223a10 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -35,32 +35,32 @@ #include "llfloaterabout.h" -#include "llsys.h" -#include "llgl.h" -#include "llui.h" // for tr() -#include "v3dmath.h" - -#include "llcurl.h" -#include "llimagej2c.h" -#include "llaudioengine.h" - +// Viewer includes +#include "llagent.h" +#include "llappviewer.h" +#include "llsecondlifeurls.h" +#include "lluictrlfactory.h" #include "llviewertexteditor.h" #include "llviewercontrol.h" -#include "llagent.h" #include "llviewerstats.h" #include "llviewerregion.h" #include "llversionviewer.h" #include "llviewerbuild.h" -#include "lluictrlfactory.h" -#include "lluri.h" #include "llweb.h" -#include "llsecondlifeurls.h" -#include "lltrans.h" -#include "llappviewer.h" -#include "llglheaders.h" -#include "llwindow.h" +// Linden library includes +#include "llaudioengine.h" #include "llbutton.h" +#include "llcurl.h" +#include "llglheaders.h" +#include "llfloater.h" +#include "llfloaterreg.h" +#include "llimagej2c.h" +#include "llsys.h" +#include "lltrans.h" +#include "lluri.h" +#include "v3dmath.h" +#include "llwindow.h" #if LL_WINDOWS #include "lldxhardware.h" @@ -76,6 +76,19 @@ static std::string get_viewer_release_notes_url(); ///---------------------------------------------------------------------------- /// Class LLFloaterAbout ///---------------------------------------------------------------------------- +class LLFloaterAbout + : public LLFloater +{ + friend class LLFloaterReg; +private: + LLFloaterAbout(const LLSD& key); + virtual ~LLFloaterAbout(); + +public: + /*virtual*/ BOOL postBuild(); + void onClickCopyToClipboard(); +}; + // Default constructor LLFloaterAbout::LLFloaterAbout(const LLSD& key) @@ -99,6 +112,9 @@ BOOL LLFloaterAbout::postBuild() LLViewerTextEditor *credits_widget = getChild<LLViewerTextEditor>("credits_editor", true); + getChild<LLUICtrl>("copy_btn")->setCommitCallback( + boost::bind(&LLFloaterAbout::onClickCopyToClipboard, this)); + // make sure that we handle hyperlinks in the About text support_widget->setParseHTML(TRUE); @@ -255,3 +271,22 @@ static std::string get_viewer_release_notes_url() return LLWeb::escapeURL(url.str()); } + +void LLFloaterAbout::onClickCopyToClipboard() +{ + LLViewerTextEditor *support_widget = + getChild<LLViewerTextEditor>("support_editor", true); + support_widget->selectAll(); + support_widget->copy(); + support_widget->deselect(); +} + +///---------------------------------------------------------------------------- +/// LLFloaterAboutUtil +///---------------------------------------------------------------------------- +void LLFloaterAboutUtil::registerFloater() +{ + LLFloaterReg::add("sl_about", "floater_about.xml", + &LLFloaterReg::build<LLFloaterAbout>); + +} |
