diff options
author | McCabe Maxsted | 2011-03-14 16:20:44 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-03-14 16:59:55 -0700 |
commit | a530d21bb01e721f9dfae02426d1cbd7806979db (patch) | |
tree | 2cb26b8e0a931e91ea98b499435addf61842b5b7 /linden/indra/newview/llfloaterabout.cpp | |
parent | Fixed typo in 425b474 (diff) | |
download | meta-impy-a530d21bb01e721f9dfae02426d1cbd7806979db.zip meta-impy-a530d21bb01e721f9dfae02426d1cbd7806979db.tar.gz meta-impy-a530d21bb01e721f9dfae02426d1cbd7806979db.tar.bz2 meta-impy-a530d21bb01e721f9dfae02426d1cbd7806979db.tar.xz |
Added copy text button to Help > About Imprudence and tabbed the info. Ported from Singularity, patch by Siana Gearz
Diffstat (limited to 'linden/indra/newview/llfloaterabout.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterabout.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 @@ | |||
57 | #include "lltrans.h" | 57 | #include "lltrans.h" |
58 | #include "llappviewer.h" | 58 | #include "llappviewer.h" |
59 | #include "llglheaders.h" | 59 | #include "llglheaders.h" |
60 | #include "llviewerwindow.h" | ||
60 | #include "llwindow.h" | 61 | #include "llwindow.h" |
61 | #include "viewerversion.h" | 62 | #include "viewerversion.h" |
62 | 63 | ||
@@ -106,6 +107,8 @@ LLFloaterAbout::LLFloaterAbout() | |||
106 | return; | 107 | return; |
107 | } | 108 | } |
108 | 109 | ||
110 | childSetAction("copy_btn", onClickCopy, this); | ||
111 | |||
109 | // For some reason, adding style doesn't work unless this is true. | 112 | // For some reason, adding style doesn't work unless this is true. |
110 | support_widget->setParseHTML(TRUE); | 113 | support_widget->setParseHTML(TRUE); |
111 | 114 | ||
@@ -294,6 +297,23 @@ void LLFloaterAbout::show(void*) | |||
294 | sInstance->open(); /*Flawfinder: ignore*/ | 297 | sInstance->open(); /*Flawfinder: ignore*/ |
295 | } | 298 | } |
296 | 299 | ||
300 | // static | ||
301 | void LLFloaterAbout::onClickCopy(void* user_data) | ||
302 | { | ||
303 | LLFloaterAbout* self = (LLFloaterAbout*)user_data; | ||
304 | |||
305 | if (self) | ||
306 | { | ||
307 | LLViewerTextEditor* support_widget = self->getChild<LLViewerTextEditor>("support_editor", true); | ||
308 | |||
309 | if (support_widget) | ||
310 | { | ||
311 | std::string buffer = support_widget->getText(); | ||
312 | gViewerWindow->mWindow->copyTextToClipboard(utf8str_to_wstring(buffer)); | ||
313 | } | ||
314 | } | ||
315 | } | ||
316 | |||
297 | 317 | ||
298 | static std::string get_viewer_release_notes_url() | 318 | static std::string get_viewer_release_notes_url() |
299 | { | 319 | { |