summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelprofileview.cpp10
-rw-r--r--indra/newview/llpanelprofileview.h1
2 files changed, 10 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());
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 153496bfd0..c6d921fdc4 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -74,6 +74,7 @@ public:
protected:
void onBackBtnClick();
+ void onCopyToClipboard();
bool isGrantedToSeeOnlineStatus();
/**