diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 10:00:41 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-23 10:00:41 +0200 |
commit | 633c15570a52082030667ec2d096058f16ccf228 (patch) | |
tree | 674de11ffa2ee17e36e226e698a327ec55aa1481 /indra/newview/llpanelavatar.cpp | |
parent | 4d9762eb846ae1894f0c31eecb6230803018e730 (diff) | |
parent | 0a98034641267ea57360fdd369acb8b94ff9bc20 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelavatar.cpp')
-rw-r--r-- | indra/newview/llpanelavatar.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index ffe7f57167..e9131a342e 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -403,6 +403,11 @@ void LLPanelProfileTab::updateButtons() ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// +bool enable_god() +{ + return gAgent.isGodlike(); +} + LLPanelAvatarProfile::LLPanelAvatarProfile() : LLPanelProfileTab() { @@ -423,6 +428,13 @@ BOOL LLPanelAvatarProfile::postBuild() LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; registrar.add("Profile.Pay", boost::bind(&LLPanelAvatarProfile::pay, this)); registrar.add("Profile.Share", boost::bind(&LLPanelAvatarProfile::share, this)); + registrar.add("Profile.Kick", boost::bind(&LLPanelAvatarProfile::kick, this)); + registrar.add("Profile.Freeze", boost::bind(&LLPanelAvatarProfile::freeze, this)); + registrar.add("Profile.Unfreeze", boost::bind(&LLPanelAvatarProfile::unfreeze, this)); + registrar.add("Profile.CSR", boost::bind(&LLPanelAvatarProfile::csr, this)); + + LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable; + enable.add("Profile.EnableGod", boost::bind(&enable_god)); mProfileMenu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>("menu_profile_overflow.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -622,6 +634,28 @@ void LLPanelAvatarProfile::share() LLAvatarActions::share(getAvatarId()); } +void LLPanelAvatarProfile::kick() +{ + LLAvatarActions::kick(getAvatarId()); +} + +void LLPanelAvatarProfile::freeze() +{ + LLAvatarActions::freeze(getAvatarId()); +} + +void LLPanelAvatarProfile::unfreeze() +{ + LLAvatarActions::unfreeze(getAvatarId()); +} + +void LLPanelAvatarProfile::csr() +{ + std::string name; + gCacheName->getFullName(getAvatarId(), name); + LLAvatarActions::csr(getAvatarId(), name); +} + void LLPanelAvatarProfile::onUrlTextboxClicked(const std::string& url) { LLWeb::loadURL(url); |