diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-05-31 18:04:05 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-05-31 18:04:05 +0300 |
commit | d1b7deda45f778e0fcfb92f38f9f5694ab285d1c (patch) | |
tree | 77eb5f6ed3c7e0c7f88f216bedc3b12da4fe4a58 | |
parent | 2b9927863ff6826bc448379e2f829b1de5e6c3fb (diff) |
MAINT-6452 No message is displayed when there is no outfits in Gallery
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 18 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_outfit_gallery.xml | 24 |
3 files changed, 43 insertions, 2 deletions
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<LLScrollContainer>("gallery_scroll_panel"); mGalleryPanel = getChild<LLPanel>("gallery_panel"); + mMessageTextBox = getChild<LLTextBox>("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 @@ <string name="outfit_photo_string"> Photo of "[OUTFIT_NAME]" outfit </string> + <string name="no_outfits_msg"> + You don't have any outfits yet. Try [secondlife:///app/search/all/ Search] + </string> + <string name="no_matched_outfits_msg"> + Didn't find what you're looking for? Try [secondlife:///app/search/all/[SEARCH_TERM] Search]. + </string> + <text + type="string" + clip_partial="false" + follows="left|top" + layout="topleft" + left="13" + name="no_outfits_txt" + top="0" + height="32" + valign="center" + parse_urls="true" + wrap="true"> + Searching... + </text> <scroll_container border="true" bevel_style="none" @@ -66,8 +86,8 @@ <outfit_gallery_item layout="topleft" left="10" name="preview_outfit2" height="175" width="150" follows="left|top"/> </layout_panel> </layout_stack--> - <!--</panel>--> - </scroll_container> + <!--</panel>--> + </scroll_container> <panel background_visible="true" follows="bottom|left|right" |