From d1b7deda45f778e0fcfb92f38f9f5694ab285d1c Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 31 May 2016 18:04:05 +0300 Subject: MAINT-6452 No message is displayed when there is no outfits in Gallery --- indra/newview/lloutfitgallery.cpp | 18 ++++++++++++++++ indra/newview/lloutfitgallery.h | 3 +++ .../skins/default/xui/en/panel_outfit_gallery.xml | 24 ++++++++++++++++++++-- 3 files changed, 43 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 6a8256d41c..7bd9c0bd94 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -99,6 +99,7 @@ BOOL LLOutfitGallery::postBuild() BOOL rv = LLOutfitListBase::postBuild(); mScrollPanel = getChild("gallery_scroll_panel"); mGalleryPanel = getChild("gallery_panel"); + mMessageTextBox = getChild("no_outfits_txt"); mOutfitGalleryMenu = new LLOutfitGalleryContextMenu(this); return rv; } @@ -168,6 +169,7 @@ void LLOutfitGallery::reArrangeRows(S32 row_diff) applyFilter(*it,sFilterSubString); addToGallery(*it); } + updateMessageVisibility(); } void LLOutfitGallery::updateGalleryWidth() @@ -558,6 +560,22 @@ bool LLOutfitGallery::canWearSelected() return false; } +void LLOutfitGallery::updateMessageVisibility() +{ + if(mItems.empty()) + { + mMessageTextBox->setVisible(TRUE); + mScrollPanel->setVisible(FALSE); + std::string message = sFilterSubString.empty()? getString("no_outfits_msg") : getString("no_matched_outfits_msg"); + mMessageTextBox->setValue(message); + } + else + { + mScrollPanel->setVisible(TRUE); + mMessageTextBox->setVisible(FALSE); + } +} + LLOutfitListGearMenuBase* LLOutfitGallery::createGearMenu() { return new LLOutfitGalleryGearMenu(this); diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h index b3e699e0e7..ad3f2a7129 100644 --- a/indra/newview/lloutfitgallery.h +++ b/indra/newview/lloutfitgallery.h @@ -104,6 +104,8 @@ public: /*virtual*/ bool getHasExpandableFolders() { return FALSE; } + void updateMessageVisibility(); + void refreshTextures(const LLUUID& category_id); void refreshOutfit(const LLUUID& category_id); @@ -161,6 +163,7 @@ private: LLPanel* mLastRowPanel; LLUUID mOutfitLinkPending; LLUUID mOutfitRenamePending; + LLTextBox* mMessageTextBox; bool mGalleryCreated; int mRowCount; int mItemsAddedCount; diff --git a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml index c06c6a86c3..9a547f615d 100644 --- a/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml +++ b/indra/newview/skins/default/xui/en/panel_outfit_gallery.xml @@ -13,6 +13,26 @@ Photo of "[OUTFIT_NAME]" outfit + + You don't have any outfits yet. Try [secondlife:///app/search/all/ Search] + + + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. + + + Searching... + - - + +