llfloaterabout.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /**
  2. * @file llfloaterabout.h
  3. * @brief The about box from Help -> About
  4. *
  5. * $LicenseInfo:firstyear=2001&license=viewergpl$
  6. *
  7. * Copyright (c) 2001-2009, Linden Research, Inc.
  8. * Copyright (c) 2009-2024, Henri Beauchamp.
  9. *
  10. * Second Life Viewer Source Code
  11. * The source code in this file ("Source Code") is provided by Linden Lab
  12. * to you under the terms of the GNU General Public License, version 2.0
  13. * ("GPL"), unless you have obtained a separate licensing agreement
  14. * ("Other License"), formally executed by you and Linden Lab. Terms of
  15. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  16. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  17. *
  18. * There are special exceptions to the terms and conditions of the GPL as
  19. * it is applied to this Source Code. View the full text of the exception
  20. * in the file doc/FLOSS-exception.txt in this software distribution, or
  21. * online at
  22. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  23. *
  24. * By copying, modifying or distributing this software, you acknowledge
  25. * that you have read and understood your obligations described above,
  26. * and agree to abide by those obligations.
  27. *
  28. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  29. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  30. * COMPLETENESS OR PERFORMANCE.
  31. * $/LicenseInfo$
  32. */
  33. #ifndef LL_LLFLOATERABOUT_H
  34. #define LL_LLFLOATERABOUT_H
  35. #include "boost/signals2.hpp"
  36. #include "llfloater.h"
  37. class LLTextEditor;
  38. class LLFloaterAbout : public LLFloater,
  39. public LLFloaterSingleton<LLFloaterAbout>
  40. {
  41. friend class LLUISingleton<LLFloaterAbout, VisibilityPolicy<LLFloater> >;
  42. protected:
  43. LOG_CLASS(LLFloaterAbout);
  44. public:
  45. bool postBuild() override;
  46. void draw() override;
  47. void updateServerReleaseNotesURL(const std::string& url);
  48. private:
  49. // Open only via LLFloaterSingleton interface, i.e. showInstance() or
  50. // toggleInstance().
  51. LLFloaterAbout(const LLSD&);
  52. ~LLFloaterAbout() override;
  53. void setSupportText();
  54. static void onClickCopyToClipboard(void* userdata);
  55. static void onClickClose(void* userdata);
  56. static void startFetchServerReleaseNotes(const std::string& cap_url);
  57. static void handleServerReleaseNotes(const LLSD& results);
  58. static std::string getHardCodedURL();
  59. private:
  60. LLTextEditor* mSupportTextEditor;
  61. std::string mServerReleaseNotesUrl;
  62. std::string mLastBrowserVersion;
  63. boost::signals2::connection mRegionChangedConnection;
  64. };
  65. #endif // LL_LLFLOATERABOUT_H