MAINT-7988 Received Items should be searchable via inventory
parent
6464016c11
commit
ab7c952645
|
|
@ -43,6 +43,7 @@
|
|||
#include "llfloatermarketplacelistings.h"
|
||||
#include "llfloateroutfitphotopreview.h"
|
||||
#include "llfloatersidepanelcontainer.h"
|
||||
#include "llsidepanelinventory.h"
|
||||
#include "llfloaterworldmap.h"
|
||||
#include "llfolderview.h"
|
||||
#include "llfriendcard.h"
|
||||
|
|
@ -1828,11 +1829,24 @@ void LLItemBridge::gotoItem()
|
|||
LLInventoryObject *obj = getInventoryObject();
|
||||
if (obj && obj->getIsLinkType())
|
||||
{
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if (active_panel)
|
||||
const LLUUID inbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX);
|
||||
if (gInventory.isObjectDescendentOf(obj->getLinkedUUID(), inbox_id))
|
||||
{
|
||||
active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
|
||||
LLSidepanelInventory *sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
|
||||
if (sidepanel_inventory && sidepanel_inventory->getInboxPanel())
|
||||
{
|
||||
sidepanel_inventory->getInboxPanel()->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel();
|
||||
if (active_panel)
|
||||
{
|
||||
active_panel->setSelection(obj->getLinkedUUID(), TAKE_FOCUS_NO);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
#include "llfloaterreg.h"
|
||||
#include "llmenubutton.h"
|
||||
#include "lloutfitobserver.h"
|
||||
#include "llpanelmarketplaceinbox.h"
|
||||
#include "llpreviewtexture.h"
|
||||
#include "llresmgr.h"
|
||||
#include "llscrollcontainer.h"
|
||||
|
|
@ -483,7 +484,7 @@ void LLPanelMainInventory::onClearSearch()
|
|||
if (mActivePanel && (getActivePanel() != mWornItemsPanel))
|
||||
{
|
||||
initially_active = mActivePanel->getFilter().isNotDefault();
|
||||
mActivePanel->setFilterSubString(LLStringUtil::null);
|
||||
setFilterSubString(LLStringUtil::null);
|
||||
mActivePanel->setFilterTypes(0xffffffffffffffffULL);
|
||||
mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS);
|
||||
}
|
||||
|
|
@ -503,6 +504,16 @@ void LLPanelMainInventory::onClearSearch()
|
|||
mActivePanel->getRootFolder()->scrollToShowSelection();
|
||||
}
|
||||
mFilterSubString = "";
|
||||
|
||||
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
|
||||
if (sidepanel_inventory)
|
||||
{
|
||||
LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
|
||||
if (inbox_panel)
|
||||
{
|
||||
inbox_panel->onClearSearch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
|
||||
|
|
@ -534,6 +545,16 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
|
|||
|
||||
// set new filter string
|
||||
setFilterSubString(mFilterSubString);
|
||||
|
||||
LLSidepanelInventory * sidepanel_inventory = LLFloaterSidePanelContainer::getPanel<LLSidepanelInventory>("inventory");
|
||||
if (sidepanel_inventory)
|
||||
{
|
||||
LLPanelMarketplaceInbox* inbox_panel = sidepanel_inventory->getChild<LLPanelMarketplaceInbox>("marketplace_inbox");
|
||||
if (inbox_panel)
|
||||
{
|
||||
inbox_panel->onFilterEdit(search_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -848,7 +869,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter()
|
|||
|
||||
// Get data needed for filter display
|
||||
U32 filter_types = mFilter->getFilterObjectTypes();
|
||||
std::string filter_string = mFilter->getFilterSubString();
|
||||
LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState();
|
||||
U32 hours = mFilter->getHoursAgo();
|
||||
U32 date_search_direction = mFilter->getDateSearchDirection();
|
||||
|
|
|
|||
|
|
@ -51,11 +51,15 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
|
|||
, mFreshCountCtrl(NULL)
|
||||
, mInboxButton(NULL)
|
||||
, mInventoryPanel(NULL)
|
||||
, mSavedFolderState(NULL)
|
||||
{
|
||||
mSavedFolderState = new LLSaveFolderState();
|
||||
mSavedFolderState->setApply(FALSE);
|
||||
}
|
||||
|
||||
LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
|
||||
{
|
||||
delete mSavedFolderState;
|
||||
}
|
||||
|
||||
// virtual
|
||||
|
|
@ -96,6 +100,7 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
|
|||
// Set the sort order newest to oldest
|
||||
mInventoryPanel->getFolderViewModel()->setSorter(LLInventoryFilter::SO_DATE);
|
||||
mInventoryPanel->getFilter().markDefault();
|
||||
mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||
|
||||
// Set selection callback for proper update of inventory status buttons
|
||||
mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
|
||||
|
|
@ -193,6 +198,38 @@ U32 LLPanelMarketplaceInbox::getTotalItemCount() const
|
|||
return item_count;
|
||||
}
|
||||
|
||||
void LLPanelMarketplaceInbox::onClearSearch()
|
||||
{
|
||||
if (mInventoryPanel)
|
||||
{
|
||||
mInventoryPanel->setFilterSubString(LLStringUtil::null);
|
||||
mSavedFolderState->setApply(TRUE);
|
||||
mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||
LLOpenFoldersWithSelection opener;
|
||||
mInventoryPanel->getRootFolder()->applyFunctorRecursively(opener);
|
||||
mInventoryPanel->getRootFolder()->scrollToShowSelection();
|
||||
}
|
||||
}
|
||||
|
||||
void LLPanelMarketplaceInbox::onFilterEdit(const std::string& search_string)
|
||||
{
|
||||
if (mInventoryPanel)
|
||||
{
|
||||
|
||||
if (search_string == "")
|
||||
{
|
||||
onClearSearch();
|
||||
}
|
||||
|
||||
if (!mInventoryPanel->getFilter().isNotDefault())
|
||||
{
|
||||
mSavedFolderState->setApply(FALSE);
|
||||
mInventoryPanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
|
||||
}
|
||||
mInventoryPanel->setFilterSubString(search_string);
|
||||
}
|
||||
}
|
||||
|
||||
std::string LLPanelMarketplaceInbox::getBadgeString() const
|
||||
{
|
||||
std::string item_count_str("");
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#define LL_LLPANELMARKETPLACEINBOX_H
|
||||
|
||||
#include "llpanel.h"
|
||||
|
||||
#include "llfolderview.h"
|
||||
class LLButton;
|
||||
class LLInventoryPanel;
|
||||
class LLUICtrl;
|
||||
|
|
@ -56,6 +56,9 @@ public:
|
|||
|
||||
LLInventoryPanel * setupInventoryPanel();
|
||||
|
||||
void onClearSearch();
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
|
||||
U32 getFreshItemCount() const;
|
||||
U32 getTotalItemCount() const;
|
||||
|
||||
|
|
@ -71,6 +74,7 @@ private:
|
|||
LLUICtrl * mFreshCountCtrl;
|
||||
LLButton * mInboxButton;
|
||||
LLInventoryPanel * mInventoryPanel;
|
||||
LLSaveFolderState* mSavedFolderState;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,12 @@ LLInboxInventoryPanel::LLInboxInventoryPanel(const LLInboxInventoryPanel::Params
|
|||
LLInboxInventoryPanel::~LLInboxInventoryPanel()
|
||||
{}
|
||||
|
||||
void LLInboxInventoryPanel::initFromParams(const LLInventoryPanel::Params& params)
|
||||
{
|
||||
LLInventoryPanel::initFromParams(params);
|
||||
getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX));
|
||||
}
|
||||
|
||||
LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop)
|
||||
{
|
||||
LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public:
|
|||
~LLInboxInventoryPanel();
|
||||
|
||||
// virtual
|
||||
void initFromParams(const LLInventoryPanel::Params&);
|
||||
LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge, bool allow_drop);
|
||||
LLFolderViewItem * createFolderViewItem(LLInvFVBridge * bridge);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue