diff options
author | dolphin <dolphin@lindenlab.com> | 2013-09-17 19:58:20 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-09-17 19:58:20 -0700 |
commit | f5b7343238626f52ea45ee74ed06294ae1f22a74 (patch) | |
tree | 7fda561743cfbecc7ea8e75c4676cfa5cccba095 /indra | |
parent | 07cb32449f601e2d47e83d781af3bb9df2474d5c (diff) |
Updated position of the edit button the experience profile and added the Grid Wide tag.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llmessage/llexperiencecache.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llfloaterexperienceprofile.cpp | 74 | ||||
-rw-r--r-- | indra/newview/llfloaterexperienceprofile.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_experienceprofile.xml | 221 |
4 files changed, 177 insertions, 142 deletions
diff --git a/indra/llmessage/llexperiencecache.cpp b/indra/llmessage/llexperiencecache.cpp index b131156905..921c1edc2e 100644 --- a/indra/llmessage/llexperiencecache.cpp +++ b/indra/llmessage/llexperiencecache.cpp @@ -251,7 +251,7 @@ namespace LLExperienceCache sCache[public_key]=it->second; } - LL_INFOS("ExperienceCache") << "loaded " << sCache.size() << LL_ENDL; + LL_DEBUGS("ExperienceCache") << "importFile() loaded " << sCache.size() << LL_ENDL; } void exportFile(std::ostream& ostr) @@ -298,7 +298,7 @@ namespace LLExperienceCache LLUUID public_key = row[EXPERIENCE_ID].asUUID(); - LL_INFOS("ExperienceCache") << "Received result for " << public_key + LL_DEBUGS("ExperienceCache") << "Received result for " << public_key << " display '" << row[LLExperienceCache::NAME].asString() << "'" << LL_ENDL ; processExperience(public_key, row); @@ -317,10 +317,10 @@ namespace LLExperienceCache exp[QUOTA] = DEFAULT_QUOTA; processExperience(id, exp); - LL_INFOS("ExperienceCache") << "Error result for " << id << LL_ENDL ; + LL_WARNS("ExperienceCache") << "LLExperienceResponder::result() error result for " << id << LL_ENDL ; } - LL_INFOS("ExperienceCache") << sCache.size() << " cached experiences" << LL_ENDL; + LL_DEBUGS("ExperienceCache") << sCache.size() << " cached experiences" << LL_ENDL; } virtual void error(U32 status, const std::string& reason) @@ -351,7 +351,6 @@ namespace LLExperienceCache exp[QUOTA] = DEFAULT_QUOTA; LLExperienceCache::processExperience(it->first, exp); - LL_INFOS("ExperienceCache") << "Error result for " << it->first << LL_ENDL ; } } @@ -443,7 +442,7 @@ namespace LLExperienceCache if(ostr.tellp() > EXP_URL_SEND_THRESHOLD) { - LL_INFOS("ExperienceCache") << " query: " << ostr.str() << LL_ENDL; + LL_DEBUGS("ExperienceCache") << "requestExperiences() query: " << ostr.str() << LL_ENDL; LLHTTPClient::get(ostr.str(), new LLExperienceResponder(keys)); ostr.clear(); ostr.str(sLookupURL); @@ -454,7 +453,7 @@ namespace LLExperienceCache if(ostr.tellp() > sLookupURL.size()) { - LL_INFOS("ExperienceCache") << " query: " << ostr.str() << LL_ENDL; + LL_DEBUGS("ExperienceCache") << "requestExperiences() query 2: " << ostr.str() << LL_ENDL; LLHTTPClient::get(ostr.str(), new LLExperienceResponder(keys)); } @@ -539,7 +538,7 @@ namespace LLExperienceCache { if(!exp.has(EXPERIENCE_ID)) { - LL_INFOS("ExperienceCache") << "Removing experience with no id " << LL_ENDL ; + LL_WARNS("ExperienceCache") << "Removing experience with no id " << LL_ENDL ; sCache.erase(cur); } else @@ -552,7 +551,7 @@ namespace LLExperienceCache } else { - LL_INFOS("ExperienceCache") << "Removing invalid experience " << id << LL_ENDL ; + LL_WARNS("ExperienceCache") << "Removing invalid experience " << id << LL_ENDL ; sCache.erase(cur); } } @@ -565,7 +564,7 @@ namespace LLExperienceCache { if(!key.isNull() && !isRequestPending(key) && (refresh || sCache.find(key)==sCache.end())) { - LL_INFOS("ExperienceCache") << " queue request for " << EXPERIENCE_ID << " " << key << LL_ENDL ; + LL_DEBUGS("ExperienceCache") << " queue request for " << EXPERIENCE_ID << " " << key << LL_ENDL ; sAskQueue[key]=EXPERIENCE_ID; return true; 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<LLButton>(BTN_EDIT)->setVisible(enabled && content["status"].asBoolean()); + if(enabled && content["status"].asBoolean()) + { + parent->getChild<LLLayoutPanel>(PNL_TOP)->setVisible(TRUE); + parent->getChild<LLButton>(BTN_EDIT)->setVisible(TRUE); + } } }; BOOL LLFloaterExperienceProfile::postBuild() { - mImagePanel = getChild<LLLayoutPanel>(PNL_IMAGE); - mDescriptionPanel = getChild<LLLayoutPanel>(PNL_DESC); - mLocationPanel = getChild<LLLayoutPanel>(PNL_LOC); - mMarketplacePanel = getChild<LLLayoutPanel>(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<LLLayoutPanel>(PNL_IMAGE); + LLLayoutPanel* descriptionPanel = getChild<LLLayoutPanel>(PNL_DESC); + LLLayoutPanel* locationPanel = getChild<LLLayoutPanel>(PNL_LOC); + LLLayoutPanel* marketplacePanel = getChild<LLLayoutPanel>(PNL_MRKT); + LLLayoutPanel* topPanel = getChild<LLLayoutPanel>(PNL_TOP); + + + imagePanel->setVisible(FALSE); + descriptionPanel->setVisible(FALSE); + locationPanel->setVisible(FALSE); + marketplacePanel->setVisible(FALSE); + topPanel->setVisible(FALSE); + LLTextBox* child = getChild<LLTextBox>(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<LLExpandableTextBox>(TF_DESC); exchild->setText(value); - mDescriptionPanel->setVisible(value.length()>0); + descriptionPanel->setVisible(value.length()>0); LLTextEditor* edit_child = getChild<LLTextEditor>(EDIT TF_DESC); edit_child->setText(value); @@ -352,7 +356,7 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) value = experience[LLExperienceCache::SLURL].asString(); child = getChild<LLTextBox>(TF_SLURL); child->setText(value); - mLocationPanel->setVisible(value.length()>0); + locationPanel->setVisible(value.length()>0); linechild = getChild<LLLineEditor>(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<LLCheckBoxCtrl>(EDIT BTN_ENABLE); + S32 properties = mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger(); + enable->set(properties & LLExperienceCache::PROPERTY_DISABLED); + + enable = getChild<LLCheckBoxCtrl>(EDIT BTN_PRIVATE); + enable->set(properties & LLExperienceCache::PROPERTY_PRIVATE); + + if(properties & LLExperienceCache::PROPERTY_GRID) + { + topPanel->setVisible(TRUE); + getChild<LLTextBox>(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<LLTextBox>(TF_MRKT); child->setText(value); - mMarketplacePanel->setVisible(TRUE); + marketplacePanel->setVisible(TRUE); } else { - mMarketplacePanel->setVisible(FALSE); + marketplacePanel->setVisible(FALSE); } linechild = getChild<LLLineEditor>(EDIT TF_MRKT); @@ -405,18 +422,17 @@ void LLFloaterExperienceProfile::refreshExperience( const LLSD& experience ) { LLTextureCtrl* logo = getChild<LLTextureCtrl>(IMG_LOGO); logo->setImageAssetID(data[IMG_LOGO].asUUID()); - mImagePanel->setVisible(TRUE); + imagePanel->setVisible(TRUE); logo = getChild<LLTextureCtrl>(EDIT IMG_LOGO); logo->setImageAssetID(data[IMG_LOGO].asUUID()); } } - - LLCheckBoxCtrl* enable = getChild<LLCheckBoxCtrl>(EDIT BTN_ENABLE); - enable->set( 0 == (mExperienceDetails[LLExperienceCache::PROPERTIES].asInteger() & LLExperienceCache::PROPERTY_DISABLED)); - - enable = getChild<LLCheckBoxCtrl>(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"/> <tab_container hide_tabs="true" @@ -64,7 +63,7 @@ width="330"> <panel bg_alpha_color="DkGray2" - follows="top|left" + follows="top|left|right" height="480" layout="topleft" left="0" @@ -83,6 +82,41 @@ width="315"> <layout_panel follows="all" + height="29" + layout="topleft" + left="0" + top="0" + auto_resize="false" + visible="false" + width="315" + name="top panel"> + <text + type="string" + length="1" + follows="left|top|right" + font="SansSerif" + height="19" + top="10" + layout="topleft" + left="10" + right="-123" + visible="false" + name="grid_wide"> + Grid-wide + </text> + <button + follows="top|right" + height="23" + label="Edit" + layout="topleft" + name="edit_btn" + width="100" + visible="false" + top_pad="-23" + right="-14"/> + </layout_panel> + <layout_panel + follows="all" height="197" layout="topleft" left="0" @@ -109,8 +143,7 @@ left="0" top="5" width="313" - auto_resize="false" - > + auto_resize="false"> <text follows="left|top|right" font="SansSerifLarge" @@ -118,10 +151,9 @@ layout="topleft" left="10" name="experience_title" - text_color="white" top="0" use_ellipses="true" - value="Kyle's Superhero RPG" + value="" width="288"/> </layout_panel> <layout_panel @@ -142,20 +174,19 @@ left="7" name="experience_description" top="0" - value="It is mainly just a lot of men in tights on patrol for evil-doers. It is mainly just a lot of men in tights on patrol for evil-doers. It is mainly just a lot of men in tights on patrol for evil-doers. It is mainly just a lot of men in tights on patrol for evil-doers. It is mainly just a lot of men in tights on patrol for evil-doers. " + value="" width="293"/> </layout_panel> <layout_panel - follows="all" - height="46" + follows="" + height="18" layout="topleft" left="0" - top="5" - width="313" - visible="false" + top="0" auto_resize="false" - name="location panel" - > + width="315" + visible="true" + name="maturity panel"> <text type="string" length="1" @@ -163,9 +194,9 @@ height="16" layout="topleft" left="10" - name="Location" - width="290"> - Location: + name="ContentRating" + width="100"> + Rating: </text> <text type="string" @@ -173,25 +204,23 @@ follows="left|top|right" height="18" layout="topleft" - left="10" + left_pad="2" valign="center" - name="LocationTextText" - width="288"> - someplace + name="ContentRatingText" + top_delta="-3" + width="188"> </text> </layout_panel> <layout_panel follows="all" - height="53" + height="46" layout="topleft" left="0" top="5" width="313" visible="false" auto_resize="false" - name="marketplace panel" - - > + name="location panel"> <text type="string" length="1" @@ -199,8 +228,9 @@ height="16" layout="topleft" left="10" + name="Location" width="290"> - Marketplace store: + Location: </text> <text type="string" @@ -210,19 +240,20 @@ layout="topleft" left="10" valign="center" - name="marketplace" + name="LocationTextText" width="288"> - someplace </text> </layout_panel> <layout_panel - follows="left|top|right" - height="92" + follows="all" + height="53" + layout="topleft" left="0" - top="0" + top="5" + width="313" + visible="false" auto_resize="false" - width="315" - > + name="marketplace panel"> <text type="string" length="1" @@ -230,9 +261,8 @@ height="16" layout="topleft" left="10" - name="ContentRating" - width="100"> - Rating: + width="290"> + Marketplace store: </text> <text type="string" @@ -240,13 +270,19 @@ follows="left|top|right" height="18" layout="topleft" - left_pad="2" + left="10" valign="center" - name="ContentRatingText" - top_delta="-3" - width="188"> - Adult + name="marketplace" + width="288"> </text> + </layout_panel> + <layout_panel + follows="left|top|right" + height="75" + left="0" + top="0" + auto_resize="false" + width="315"> <text type="string" length="1" @@ -269,21 +305,10 @@ name="OwnerText" top_delta="-2" width="188"> - Kyle </text> <button follows="bottom|left" height="23" - label="Edit" - layout="topleft" - name="edit_btn" - top_pad="3" - width="120" - left="73" - visible="false"/> - <button - follows="bottom|left" - height="23" label="Allow" layout="topleft" name="allow_btn" @@ -394,51 +419,6 @@ right="-11" word_wrap="true"/> <text - type="string" - length="1" - follows="left|top|right" - height="14" - layout="topleft" - left="10" - top_pad="10" - name="edit_Location" - right="-10"> - Location: - </text> - <line_editor - type="string" - length="1" - follows="left|top|right" - height="19" - layout="topleft" - left="10" - max_length_bytes="255" - valign="center" - name="edit_LocationTextText" - right="-10"/> - <text - type="string" - length="1" - follows="left|top|right" - height="14" - top_pad="10" - layout="topleft" - left="10" - right="-10"> - Marketplace store: - </text> - <line_editor - type="string" - length="1" - follows="left|top|right" - height="19" - layout="topleft" - left="10" - max_length_bytes="255" - valign="center" - name="edit_marketplace" - right="-10"/> - <text top_pad="10" type="string" length="1" @@ -495,6 +475,51 @@ width="20"/> </icons_combo_box.item> </icons_combo_box> + <text + type="string" + length="1" + follows="left|top|right" + height="14" + layout="topleft" + left="10" + top_pad="10" + name="edit_Location" + right="-10"> + Location: + </text> + <line_editor + type="string" + length="1" + follows="left|top|right" + height="19" + layout="topleft" + left="10" + max_length_bytes="255" + valign="center" + name="edit_LocationTextText" + right="-10"/> + <text + type="string" + length="1" + follows="left|top|right" + height="14" + top_pad="10" + layout="topleft" + left="10" + right="-10"> + Marketplace store: + </text> + <line_editor + type="string" + length="1" + follows="left|top|right" + height="19" + layout="topleft" + left="10" + max_length_bytes="255" + valign="center" + name="edit_marketplace" + right="-10"/> <check_box width="140" height="21" left="10" |