From fa344fdcd987ec66fa08f6286b504cb126c9a45c Mon Sep 17 00:00:00 2001 From: dolphin Date: Thu, 17 Oct 2013 13:58:52 -0700 Subject: Updated experience profile to remove the permission buttons on privileged experiences and fix the enabling of the save button with the checkbox controls. --- indra/newview/llfloaterexperienceprofile.cpp | 11 ++-- .../default/xui/en/floater_experienceprofile.xml | 64 +++++++++++----------- 2 files changed, 40 insertions(+), 35 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index e1667a39b7..740e800a07 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -67,6 +67,7 @@ #define PNL_LOC "location panel" #define PNL_MRKT "marketplace panel" #define PNL_GROUP "group_panel" +#define PNL_PERMS "perm panel" #define BTN_EDIT "edit_btn" #define BTN_ALLOW "allow_btn" @@ -249,8 +250,8 @@ BOOL LLFloaterExperienceProfile::postBuild() getChild(EDIT TF_MRKT)->setKeystrokeCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL); getChild(EDIT TF_NAME)->setKeystrokeCallback(boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL); - childSetAction(EDIT BTN_ENABLE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this)); - childSetAction(EDIT BTN_PRIVATE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this)); + childSetCommitCallback(EDIT BTN_ENABLE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL); + childSetCommitCallback(EDIT BTN_PRIVATE, boost::bind(&LLFloaterExperienceProfile::onFieldChanged, this), NULL); getChild(EDIT TF_DESC)->setCommitOnFocusLost(TRUE); @@ -364,6 +365,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) LLLayoutPanel* locationPanel = getChild(PNL_LOC); LLLayoutPanel* marketplacePanel = getChild(PNL_MRKT); LLLayoutPanel* topPanel = getChild(PNL_TOP); + LLLayoutPanel* permPanel = getChild(PNL_PERMS); imagePanel->setVisible(FALSE); @@ -433,6 +435,9 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) child->setVisible(TRUE); child->setText(LLTrans::getString("GRID_WIDE")); } + + + permPanel->setVisible((properties & LLExperienceCache::PROPERTY_PRIVILEGED) == 0); value=experience[LLExperienceCache::METADATA].asString(); if(value.empty()) @@ -490,7 +495,6 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) } mDirty=false; - setCanClose(!mDirty); mForceClose = false; getChild(BTN_SAVE)->setEnabled(mDirty); } @@ -548,7 +552,6 @@ void LLFloaterExperienceProfile::setPreferences( const LLSD& content ) void LLFloaterExperienceProfile::onFieldChanged() { mDirty=true; - setCanClose(!mDirty); getChild(BTN_SAVE)->setEnabled(mDirty); } diff --git a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml index e70151c64e..2b936b79c9 100644 --- a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml +++ b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml @@ -359,37 +359,38 @@ top="5" width="313" auto_resize="false" + visible="false" name="perm panel"> -