summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llinspecttexture.cpp5
-rw-r--r--indra/newview/lloutfitslist.cpp26
-rw-r--r--indra/newview/lloutfitslist.h23
3 files changed, 50 insertions, 4 deletions
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index da4e3c0949..76e428b7d0 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -84,7 +84,10 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p)
}
}
}
-
+ if ((!p.message.isProvided() || p.message().empty()))
+ {
+ return NULL;
+ }
// No or more than one texture found => show default tooltip
return LLUICtrlFactory::create<LLToolTip>(p);
}
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index fbb442a992..676444397f 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -37,6 +37,7 @@
#include "llappearancemgr.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
+#include "llinspecttexture.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llmenubutton.h"
@@ -62,7 +63,7 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL
return (LLStringUtil::compareDict(name1, name2) < 0);
}
-struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLAccordionCtrlTab::Params>
+struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLOutfitAccordionCtrlTab::Params>
{
Mandatory<LLWearableItemsList::Params> wearable_list;
@@ -144,7 +145,8 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
std::string name = cat->getName();
outfit_accordion_tab_params tab_params(get_accordion_tab_params());
- LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params);
+ tab_params.cat_id = cat_id;
+ LLOutfitAccordionCtrlTab *tab = LLUICtrlFactory::create<LLOutfitAccordionCtrlTab>(tab_params);
if (!tab) return;
LLWearableItemsList* wearable_list = LLUICtrlFactory::create<LLWearableItemsList>(tab_params.wearable_list);
wearable_list->setShape(tab->getLocalRect());
@@ -1307,4 +1309,24 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility()
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
+BOOL LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
+{
+ if (y >= getLocalRect().getHeight() - getHeaderHeight())
+ {
+ LLSD params;
+ params["inv_type"] = LLInventoryType::IT_CATEGORY;
+ params["thumbnail_id"] = gInventory.getCategory(mFolderID)->getThumbnailUUID();
+ params["item_id"] = mFolderID;
+
+ LLToolTipMgr::instance().show(LLToolTip::Params()
+ .message(getToolTip())
+ .sticky_rect(calcScreenRect())
+ .delay_time(LLView::getTooltipTimeout())
+ .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
+ .create_params(params));
+ return TRUE;
+ }
+
+ return LLAccordionCtrlTab::handleToolTip(x, y, mask);
+}
// EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 49f77e945d..6eeccddb07 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -31,6 +31,7 @@
#include "llpanel.h"
// newview
+#include "llaccordionctrltab.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
#include "llpanelappearancetab.h"
@@ -197,7 +198,27 @@ protected:
/*virtual*/ void onUpdateItemsVisibility();
};
-/**
+class LLOutfitAccordionCtrlTab : public LLAccordionCtrlTab
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLAccordionCtrlTab::Params>
+ {
+ Optional<LLUUID> cat_id;
+ Params() : cat_id("cat_id") {}
+ };
+
+ virtual BOOL handleToolTip(S32 x, S32 y, MASK mask);
+
+ protected:
+ LLOutfitAccordionCtrlTab(const LLOutfitAccordionCtrlTab::Params &p)
+ : LLAccordionCtrlTab(p),
+ mFolderID(p.cat_id)
+ {}
+ friend class LLUICtrlFactory;
+
+ LLUUID mFolderID;
+};
+ /**
* @class LLOutfitsList
*
* A list of agents's outfits from "My Outfits" inventory category