From f5b7343238626f52ea45ee74ed06294ae1f22a74 Mon Sep 17 00:00:00 2001 From: dolphin Date: Tue, 17 Sep 2013 19:58:20 -0700 Subject: Updated position of the edit button the experience profile and added the Grid Wide tag. --- indra/newview/llfloaterexperienceprofile.cpp | 74 ++++--- indra/newview/llfloaterexperienceprofile.h | 5 - .../default/xui/en/floater_experienceprofile.xml | 221 ++++++++++++--------- 3 files changed, 168 insertions(+), 132 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp index a565b5c8e7..49dd2a59ac 100644 --- a/indra/newview/llfloaterexperienceprofile.cpp +++ b/indra/newview/llfloaterexperienceprofile.cpp @@ -54,10 +54,12 @@ #define TF_MRKT "marketplace" #define TF_MATURITY "ContentRatingText" #define TF_OWNER "OwnerText" +#define TF_GRID_WIDE "grid_wide" #define EDIT "edit_" #define IMG_LOGO "logo" +#define PNL_TOP "top panel" #define PNL_IMAGE "image_panel" #define PNL_DESC "description panel" #define PNL_LOC "location panel" @@ -76,10 +78,6 @@ LLFloaterExperienceProfile::LLFloaterExperienceProfile(const LLSD& data) : LLFloater(data) , mExperienceId(data.asUUID()) - , mImagePanel(NULL) - , mDescriptionPanel(NULL) - , mLocationPanel(NULL) - , mMarketplacePanel(NULL) , mSaveCompleteAction(NOTHING) , mDirty(false) , mForceClose(false) @@ -169,17 +167,16 @@ public: if(url.empty()) enabled = false; } - - parent->getChild(BTN_EDIT)->setVisible(enabled && content["status"].asBoolean()); + if(enabled && content["status"].asBoolean()) + { + parent->getChild(PNL_TOP)->setVisible(TRUE); + parent->getChild(BTN_EDIT)->setVisible(TRUE); + } } }; BOOL LLFloaterExperienceProfile::postBuild() { - mImagePanel = getChild(PNL_IMAGE); - mDescriptionPanel = getChild(PNL_DESC); - mLocationPanel = getChild(PNL_LOC); - mMarketplacePanel = getChild(PNL_MRKT); if (mExperienceId.notNull()) { @@ -327,13 +324,20 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) { mExperienceDetails = experience; - if(experience.has(LLExperienceCache::MISSING)) - { - mImagePanel->setVisible(FALSE); - mDescriptionPanel->setVisible(FALSE); - mLocationPanel->setVisible(FALSE); - mMarketplacePanel->setVisible(FALSE); - } + + LLLayoutPanel* imagePanel = getChild(PNL_IMAGE); + LLLayoutPanel* descriptionPanel = getChild(PNL_DESC); + LLLayoutPanel* locationPanel = getChild(PNL_LOC); + LLLayoutPanel* marketplacePanel = getChild(PNL_MRKT); + LLLayoutPanel* topPanel = getChild(PNL_TOP); + + + imagePanel->setVisible(FALSE); + descriptionPanel->setVisible(FALSE); + locationPanel->setVisible(FALSE); + marketplacePanel->setVisible(FALSE); + topPanel->setVisible(FALSE); + LLTextBox* child = getChild(TF_NAME); child->setText(experience[LLExperienceCache::NAME].asString()); @@ -344,7 +348,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) std::string value = experience[LLExperienceCache::DESCRIPTION].asString(); LLExpandableTextBox* exchild = getChild(TF_DESC); exchild->setText(value); - mDescriptionPanel->setVisible(value.length()>0); + descriptionPanel->setVisible(value.length()>0); LLTextEditor* edit_child = getChild(EDIT TF_DESC); edit_child->setText(value); @@ -352,7 +356,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) value = experience[LLExperienceCache::SLURL].asString(); child = getChild(TF_SLURL); child->setText(value); - mLocationPanel->setVisible(value.length()>0); + locationPanel->setVisible(value.length()>0); linechild = getChild(EDIT TF_SLURL); linechild->setText(value); @@ -372,7 +376,20 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) value = LLSLURL("agent", id, "inspect").getSLURLString(); } child->setText(value); - + + LLCheckBoxCtrl* enable = getChild(EDIT BTN_ENABLE); + S32 properties = mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger(); + enable->set(properties & LLExperienceCache::PROPERTY_DISABLED); + + enable = getChild(EDIT BTN_PRIVATE); + enable->set(properties & LLExperienceCache::PROPERTY_PRIVATE); + + if(properties & LLExperienceCache::PROPERTY_GRID) + { + topPanel->setVisible(TRUE); + getChild(TF_GRID_WIDE)->setVisible(TRUE); + } + value=experience[LLExperienceCache::METADATA].asString(); if(value.empty()) return; @@ -391,11 +408,11 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) child = getChild(TF_MRKT); child->setText(value); - mMarketplacePanel->setVisible(TRUE); + marketplacePanel->setVisible(TRUE); } else { - mMarketplacePanel->setVisible(FALSE); + marketplacePanel->setVisible(FALSE); } linechild = getChild(EDIT TF_MRKT); @@ -405,18 +422,17 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) { LLTextureCtrl* logo = getChild(IMG_LOGO); logo->setImageAssetID(data[IMG_LOGO].asUUID()); - mImagePanel->setVisible(TRUE); + imagePanel->setVisible(TRUE); logo = getChild(EDIT IMG_LOGO); logo->setImageAssetID(data[IMG_LOGO].asUUID()); } } - - LLCheckBoxCtrl* enable = getChild(EDIT BTN_ENABLE); - enable->set( 0 == (mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger() & LLExperienceCache::PROPERTY_DISABLED)); - - enable = getChild(EDIT BTN_PRIVATE); - enable->set( 0 != (mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger() & LLExperienceCache::PROPERTY_PRIVATE)); + else + { + marketplacePanel->setVisible(FALSE); + imagePanel->setVisible(FALSE); + } mDirty=false; setCanClose(!mDirty); diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h index 1f1e135c01..4aa9820a91 100644 --- a/indra/newview/llfloaterexperienceprofile.h +++ b/indra/newview/llfloaterexperienceprofile.h @@ -78,11 +78,6 @@ protected: void doSave( int success_action ); LLUUID mExperienceId; LLSD mExperienceDetails; - - LLLayoutPanel* mImagePanel; - LLLayoutPanel* mDescriptionPanel; - LLLayoutPanel* mLocationPanel; - LLLayoutPanel* mMarketplacePanel; int mSaveCompleteAction; bool mDirty; bool mForceClose; diff --git a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml index f47042ea33..8cf9714305 100644 --- a/indra/newview/skins/default/xui/en/floater_experienceprofile.xml +++ b/indra/newview/skins/default/xui/en/floater_experienceprofile.xml @@ -26,11 +26,10 @@ layout="topleft" left_pad="4" name="edit_title" - text_color="White" top="2" value="Experience Profile" use_ellipses="true" - left="3" + left="6" right="-3"/> + + + Grid-wide + +