EXP-971 FIX New Direct Delivery item does not sort as most recent item in Recent Tab if that tab is open when item delivered

master
Richard Linden 2011-07-05 23:40:19 -07:00
parent 9fb8b53999
commit e92d3dcf10
21 changed files with 89 additions and 35 deletions

View File

@ -33,7 +33,6 @@
#include "llagentwearablesfetch.h"
#include "llappearancemgr.h"
#include "llcallbacklist.h"
#include "llfolderview.h"
#include "llgesturemgr.h"
#include "llinventorybridge.h"
#include "llinventoryfunctions.h"
@ -45,6 +44,7 @@
#include "llsidepanelappearance.h"
#include "llsidetray.h"
#include "lltexlayer.h"
#include "lltooldraganddrop.h"
#include "llviewerregion.h"
#include "llvoavatarself.h"
#include "llwearable.h"

View File

@ -49,6 +49,7 @@
#include "llfloaterpay.h"
#include "llfloaterwebcontent.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
#include "llgiveinventory.h"
#include "llinventorybridge.h"
#include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType

View File

@ -31,6 +31,7 @@
#include "llinventoryfunctions.h"
#include "llinventoryitemslist.h"
#include "llinventorymodel.h"
#include "llviewerinventory.h"
LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)

View File

@ -58,22 +58,6 @@ class LLScrollContainer;
class LLUICtrl;
class LLTextBox;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderViewFunctor
//
// Simple abstract base class for applying a functor to folders and
// items in a folder view hierarchy. This is suboptimal for algorithms
// that only work folders or only work on items, but I'll worry about
// that later when it's determined to be too slow.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFolderViewFunctor
{
public:
virtual ~LLFolderViewFunctor() {}
virtual void doFolder(LLFolderViewFolder* folder) = 0;
virtual void doItem(LLFolderViewItem* item) = 0;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderView
//

View File

@ -33,6 +33,7 @@
#include "llviewerfoldertype.h"
#include "llinventorybridge.h" // for LLItemBridge in LLInventorySort::operator()
#include "llinventoryfilter.h"
#include "llinventoryfunctions.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llpanel.h"
#include "llviewercontrol.h" // gSavedSettings
@ -2042,7 +2043,7 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
requestArrange();
requestSort();
LLFolderViewFolder* parentp = getParentFolder();
while (parentp && !parentp->getCreationDate())
while (parentp && parentp->mSortFunction.isByDate())
{
// parent folder doesn't have a time stamp yet, so get it from us
parentp->requestSort();
@ -2068,7 +2069,7 @@ BOOL LLFolderViewFolder::addFolder(LLFolderViewFolder* folder)
folder->requestArrange(TRUE);
requestSort();
LLFolderViewFolder* parentp = getParentFolder();
while (parentp && !parentp->getCreationDate())
while (parentp && !parentp->mSortFunction.isByDate())
{
// parent folder doesn't have a time stamp yet, so get it from us
parentp->requestSort();

View File

@ -66,6 +66,7 @@ public:
// Returns true if order has changed
bool updateSort(U32 order);
U32 getSort() { return mSortOrder; }
bool isByDate() { return mByDate; }
bool operator()(const LLFolderViewItem* const& a, const LLFolderViewItem* const& b);
private:

View File

@ -40,6 +40,7 @@
#include "llfloateropenobject.h"
#include "llfloaterreg.h"
#include "llfloaterworldmap.h"
#include "llfolderview.h"
#include "llfriendcard.h"
#include "llgesturemgr.h"
#include "llgiveinventory.h"

View File

@ -28,9 +28,9 @@
#ifndef LL_LLINVENTORYFUNCTIONS_H
#define LL_LLINVENTORYFUNCTIONS_H
#include "llinventorytype.h"
#include "llfolderview.h"
#include "llfolderviewitem.h"
#include "llinventorymodel.h"
#include "llinventory.h"
#include "llwearabletype.h"
/********************************************************************************
** **
@ -417,6 +417,24 @@ public:
/** Inventory Collector Functions
** **
*******************************************************************************/
class LLFolderViewItem;
class LLFolderViewFolder;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLFolderViewFunctor
//
// Simple abstract base class for applying a functor to folders and
// items in a folder view hierarchy. This is suboptimal for algorithms
// that only work folders or only work on items, but I'll worry about
// that later when it's determined to be too slow.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLFolderViewFunctor
{
public:
virtual ~LLFolderViewFunctor() {}
virtual void doFolder(LLFolderViewFolder* folder) = 0;
virtual void doItem(LLFolderViewItem* item) = 0;
};
class LLInventoryState
{

View File

@ -31,7 +31,9 @@
#include "llappviewer.h"
#include "llcallbacklist.h"
#include "llinventorypanel.h"
#include "llinventorymodel.h"
#include "llviewercontrol.h"
#include "llviewerinventory.h"
#include "llviewermessage.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"

View File

@ -35,6 +35,7 @@
#include "llavataractions.h"
#include "llfloaterinventory.h"
#include "llfloaterreg.h"
#include "llfolderview.h"
#include "llimfloater.h"
#include "llimview.h"
#include "llinventorybridge.h"
@ -340,6 +341,17 @@ void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType
getFilter()->setFilterCategoryTypes(types);
}
U32 LLInventoryPanel::getFilterObjectTypes() const
{
return mFolderRoot->getFilterObjectTypes();
}
U32 LLInventoryPanel::getFilterPermMask() const
{
return mFolderRoot->getFilterPermissions();
}
void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask)
{
getFilter()->setFilterPermissions(filter_perm_mask);
@ -355,6 +367,12 @@ void LLInventoryPanel::setFilterSubString(const std::string& string)
getFilter()->setFilterSubString(string);
}
const std::string LLInventoryPanel::getFilterSubString()
{
return mFolderRoot->getFilterSubString();
}
void LLInventoryPanel::setSortOrder(U32 order)
{
getFilter()->setSortOrder(order);
@ -366,6 +384,12 @@ void LLInventoryPanel::setSortOrder(U32 order)
}
}
U32 LLInventoryPanel::getSortOrder() const
{
return mFolderRoot->getSortOrder();
}
void LLInventoryPanel::setSinceLogoff(BOOL sl)
{
getFilter()->setDateRangeLastLogoff(sl);
@ -537,6 +561,12 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
LLFolderView* LLInventoryPanel::getRootFolder()
{
return mFolderRoot;
}
// static
void LLInventoryPanel::onIdle(void *userdata)
{
@ -800,6 +830,12 @@ void LLInventoryPanel::openSelected()
bridge->openItem();
}
void LLInventoryPanel::unSelectAll()
{
mFolderRoot->setSelection(NULL, FALSE, FALSE);
}
BOOL LLInventoryPanel::handleHover(S32 x, S32 y, MASK mask)
{
BOOL handled = LLView::handleHover(x, y, mask);
@ -879,7 +915,7 @@ void LLInventoryPanel::setSelection(const LLUUID& obj_id, BOOL take_keyboard_foc
mFolderRoot->setSelectionByID(obj_id, take_keyboard_focus);
}
void LLInventoryPanel::setSelectCallback(const LLFolderView::signal_t::slot_type& cb)
void LLInventoryPanel::setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb)
{
if (mFolderRoot)
{

View File

@ -33,12 +33,12 @@
#include "llfloater.h"
#include "llinventory.h"
#include "llinventoryfilter.h"
#include "llfolderview.h"
#include "llinventorymodel.h"
#include "llscrollcontainer.h"
#include "lluictrlfactory.h"
#include <set>
class LLFolderView;
class LLFolderViewFolder;
class LLFolderViewItem;
class LLInventoryFilter;
@ -128,17 +128,17 @@ public:
// Call this method to set the selection.
void openAllFolders();
void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus);
void setSelectCallback(const LLFolderView::signal_t::slot_type& cb);
void setSelectCallback(const boost::function<void (const std::deque<LLFolderViewItem*>& items, BOOL user_action)>& cb);
void clearSelection();
LLInventoryFilter* getFilter();
const LLInventoryFilter* getFilter() const;
void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT);
U32 getFilterObjectTypes() const { return mFolderRoot->getFilterObjectTypes(); }
U32 getFilterObjectTypes() const;
void setFilterPermMask(PermissionMask filter_perm_mask);
U32 getFilterPermMask() const { return mFolderRoot->getFilterPermissions(); }
U32 getFilterPermMask() const;
void setFilterWearableTypes(U64 filter);
void setFilterSubString(const std::string& string);
const std::string getFilterSubString() { return mFolderRoot->getFilterSubString(); }
const std::string getFilterSubString();
void setSinceLogoff(BOOL sl);
void setHoursAgo(U32 hours);
BOOL getSinceLogoff();
@ -148,7 +148,7 @@ public:
LLInventoryFilter::EFolderShow getShowFolderState();
// This method is called when something has changed about the inventory.
void modelChanged(U32 mask);
LLFolderView* getRootFolder() { return mFolderRoot; }
LLFolderView* getRootFolder();
LLScrollContainer* getScrollableContainer() { return mScroller; }
void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action);
@ -163,7 +163,7 @@ public:
static void dumpSelectionInformation(void* user_data);
void openSelected();
void unSelectAll() { mFolderRoot->setSelection(NULL, FALSE, FALSE); }
void unSelectAll();
static void onIdle(void* user_data);
@ -204,7 +204,7 @@ public:
static const std::string INHERIT_SORT_ORDER;
void setSortOrder(U32 order);
U32 getSortOrder() const { return mFolderRoot->getSortOrder(); }
U32 getSortOrder() const;
private:
std::string mSortOrderSetting;

View File

@ -31,6 +31,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llviewerinventory.h"
//virtual
bool LLPanelAppearanceTab::canTakeOffSelected()

View File

@ -46,6 +46,7 @@
#include "llfolderviewitem.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llinventorypanel.h"
#include "llinventoryfunctions.h"
#include "lllandmarkactions.h"
#include "llmenubutton.h"
#include "llplacesinventorybridge.h"

View File

@ -31,6 +31,7 @@
#include "llappviewer.h"
#include "llbutton.h"
#include "llinventorypanel.h"
#include "llfolderview.h"
#include "llsidepanelinventory.h"

View File

@ -30,8 +30,6 @@
#include "llbadgeowner.h"
#include "llinventorypanel.h"
#include "llfolderviewitem.h"
class LLInboxInventoryPanel : public LLInventoryPanel
{
@ -48,7 +46,7 @@ public:
void buildFolderView(const LLInventoryPanel::Params& params);
// virtual
LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge);
class LLFolderViewFolder* createFolderViewFolder(LLInvFVBridge * bridge);
};

View File

@ -44,6 +44,7 @@
#include "llcallbacklist.h"
#include "llbuycurrencyhtml.h"
#include "llfloaterreg.h"
#include "llfolderview.h"
#include "llinventorybridge.h"
#include "llinventorydefines.h"
#include "llinventoryfilter.h"
@ -58,8 +59,10 @@
#include "llselectmgr.h"
#include "llsidetray.h"
#include "llstatusbar.h"
#include "lltooldraganddrop.h"
#include "lltrans.h"
#include "llviewerassettype.h"
#include "llviewerinventory.h"
#include "llviewerregion.h"
#include "llviewerobjectlist.h"
#include "llviewermessage.h"

View File

@ -36,7 +36,7 @@
#include "lloutfitobserver.h"
#include "llcofwearables.h"
#include "llfilteredwearablelist.h"
#include "llfolderviewitem.h"
#include "llfolderview.h"
#include "llinventory.h"
#include "llinventoryitemslist.h"
#include "llviewercontrol.h"

View File

@ -42,6 +42,7 @@
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llinventorymodelbackgroundfetch.h"
#include "llkeyboard.h"
#include "llmultigesture.h"
#include "llnotificationsutil.h"
#include "llradiogroup.h"

View File

@ -32,6 +32,7 @@
#include "llagentcamera.h"
#include "llagentwearables.h"
#include "llappearancemgr.h"
#include "llfolderview.h"
#include "llinventorypanel.h"
#include "llfiltereditor.h"
#include "llfloaterreg.h"

View File

@ -107,6 +107,7 @@
#include "lltrans.h"
#include "lleconomy.h"
#include "lltoolgrab.h"
#include "llwindow.h"
#include "boost/unordered_map.hpp"
using namespace LLVOAvatarDefines;

View File

@ -37,6 +37,7 @@
#include "lleconomy.h"
#include "lleventtimer.h"
#include "llfloaterreg.h"
#include "llfolderview.h"
#include "llfollowcamparams.h"
#include "llinventorydefines.h"
#include "lllslconstants.h"
@ -87,6 +88,7 @@
#include "lluri.h"
#include "llviewergenericmessage.h"
#include "llviewermenu.h"
#include "llviewerinventory.h"
#include "llviewerjoystick.h"
#include "llviewerobjectlist.h"
#include "llviewerparcelmgr.h"