From a530d21bb01e721f9dfae02426d1cbd7806979db Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 14 Mar 2011 16:20:44 -0700 Subject: Added copy text button to Help > About Imprudence and tabbed the info. Ported from Singularity, patch by Siana Gearz --- linden/indra/newview/llfloaterabout.cpp | 20 ++++ linden/indra/newview/llfloaterabout.h | 2 + .../skins/default/xui/en-us/floater_about.xml | 133 ++++++++++++--------- 3 files changed, 101 insertions(+), 54 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llfloaterabout.cpp b/linden/indra/newview/llfloaterabout.cpp index f7163ee..a5d2c98 100644 --- a/linden/indra/newview/llfloaterabout.cpp +++ b/linden/indra/newview/llfloaterabout.cpp @@ -57,6 +57,7 @@ #include "lltrans.h" #include "llappviewer.h" #include "llglheaders.h" +#include "llviewerwindow.h" #include "llwindow.h" #include "viewerversion.h" @@ -106,6 +107,8 @@ LLFloaterAbout::LLFloaterAbout() return; } + childSetAction("copy_btn", onClickCopy, this); + // For some reason, adding style doesn't work unless this is true. support_widget->setParseHTML(TRUE); @@ -294,6 +297,23 @@ void LLFloaterAbout::show(void*) sInstance->open(); /*Flawfinder: ignore*/ } +// static +void LLFloaterAbout::onClickCopy(void* user_data) +{ + LLFloaterAbout* self = (LLFloaterAbout*)user_data; + + if (self) + { + LLViewerTextEditor* support_widget = self->getChild("support_editor", true); + + if (support_widget) + { + std::string buffer = support_widget->getText(); + gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); + } + } +} + static std::string get_viewer_release_notes_url() { diff --git a/linden/indra/newview/llfloaterabout.h b/linden/indra/newview/llfloaterabout.h index 7564b8e..44241ca 100644 --- a/linden/indra/newview/llfloaterabout.h +++ b/linden/indra/newview/llfloaterabout.h @@ -46,6 +46,8 @@ public: private: static LLFloaterAbout* sInstance; + + static void onClickCopy(void* user_data); }; diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_about.xml b/linden/indra/newview/skins/default/xui/en-us/floater_about.xml index db4e11d..0b73d9b 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_about.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_about.xml @@ -3,69 +3,94 @@ can_resize="false" height="440" min_height="100" min_width="100" name="floater_about" rect_control="FloaterAboutRect" title="About Second Life" width="470"> - - The Imprudence Viewer was rocked hard by: - Jacek Antonelli, McCabe Maxsted, Armin Weatherwax, Elektra Hesse, and CodeBastard Redgrave. - http://kokuaviewer.org/ - - Imprudence is so awesome thanks to contributions from many generous people: - - For their patches and code contributions, we thank Admiral Admiral, Aimee Trescothick, Aleric Inglewood, Alissa Sabre, Archimedies Plutonian, Angus Boyd, Ansariel Hiller, Ardy Lay, Asuka Neely, Balp Allen, Carjay McGinnis, Chalice Yao, Dale Glass, Damian Delacrois, Danny Nolan, Felix Duesenburg, Geneko Nemeth, Henri Beauchamp, Katharine Berry, KirstenLee Cinquetti, Kitty Barnett, Latif Khalifa, Lilly Zenovka, Makomk Makosen, Mana Janus, Matthew Dowd, Michelle2 Zenovka, Mm Alder, Nemurimasu Neiro, Nicholaz Beresford, Patrick Sapinski, Paul Churchill, Peter Lameth, Robin Cornelius, Stephen Zenith, Thickbrick Sleaford, Thomas Shikami, Tom Meta, tx Oh, Vaalith Jinn, Vadim Bigbear, Vex Streeter, Zi Ree, and Zwagoth Klaar. - - For their WindLight presets, we thank Ana Lutetia, CodeBastard Redgrave, and Torley Linden. - - Thanks also to the developer(s) of the Emerald Viewer, Hippo Viewer, Cool VL Viewer, Snowglobe Viewer, Meta7 Viewer, FrozenGlobe Viewer, and Meerkat Viewer for viewer enhancements we have incorporated, as well as Kitty Barnett for RLVa. Special thanks to the folks at Linden Lab for releasing the viewer source, without which this endeavor would have been impossible. - - For a complete list of who did what, read the release notes! - + + + +