diff options
| author | Leyla Farazha <leyla@lindenlab.com> | 2010-09-27 15:40:02 -0700 | 
|---|---|---|
| committer | Leyla Farazha <leyla@lindenlab.com> | 2010-09-27 15:40:02 -0700 | 
| commit | 9a72f91c5ed4b78f4f131a4ae80338566b863f11 (patch) | |
| tree | 7913e94f8fe626953b6abf4cf9adb60c6dc25da5 | |
| parent | 816d5201be3e6fc8deefbbd21b14cb3a8724e235 (diff) | |
hooked up copy to clipboard button
| -rw-r--r-- | indra/newview/llpanelprofileview.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llpanelprofileview.h | 1 | 
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();  	/** | 
