summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileview.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-27 15:40:02 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-27 15:40:02 -0700
commit9a72f91c5ed4b78f4f131a4ae80338566b863f11 (patch)
tree7913e94f8fe626953b6abf4cf9adb60c6dc25da5 /indra/newview/llpanelprofileview.cpp
parent816d5201be3e6fc8deefbbd21b14cb3a8724e235 (diff)
hooked up copy to clipboard button
Diffstat (limited to 'indra/newview/llpanelprofileview.cpp')
-rw-r--r--indra/newview/llpanelprofileview.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index dfbd355247..bff589c392 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -30,6 +30,7 @@
#include "llavatarconstants.h"
#include "llavatarnamecache.h" // IDEVO
+#include "llclipboard.h"
#include "lluserrelations.h"
#include "llavatarpropertiesprocessor.h"
@@ -129,7 +130,8 @@ BOOL LLPanelProfileView::postBuild()
mStatusText->setVisible(false);
childSetCommitCallback("back",boost::bind(&LLPanelProfileView::onBackBtnClick,this),NULL);
-
+ childSetCommitCallback("copy_to_clipboard",boost::bind(&LLPanelProfileView::onCopyToClipboard,this),NULL);
+
return TRUE;
}
@@ -149,6 +151,12 @@ void LLPanelProfileView::onBackBtnClick()
}
}
+void LLPanelProfileView::onCopyToClipboard()
+{
+ std::string name = getChild<LLUICtrl>("user_name")->getValue().asString() + " (" + getChild<LLUICtrl>("user_slid")->getValue().asString() + ")";
+ gClipboard.copyFromString(utf8str_to_wstring(name));
+}
+
bool LLPanelProfileView::isGrantedToSeeOnlineStatus()
{
const LLRelationship* relationship = LLAvatarTracker::instance().getBuddyInfo(getAvatarId());