From 9940ca5ae7698e89c0587733f7ab922027c8ddcc Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 15 Jun 2012 09:44:27 -0700 Subject: CHUI-101 WIP Make LLFolderView general purpose llfolderview refactornig --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 678e4f2843..1d079adfd3 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -29,6 +29,7 @@ #include "llpanelmarketplaceinboxinventory.h" #include "llfolderview.h" +#include "llfolderviewitem.h" #include "llfoldervieweventlistener.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -253,9 +254,9 @@ LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) #endif } -BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* root) +BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) { - BOOL retval = LLFolderViewItem::addToFolder(folder, root); + BOOL retval = LLFolderViewItem::addToFolder(folder); #if SUPPORTING_FRESH_ITEM_COUNT // Compute freshness if our parent is the root folder for the inbox -- cgit v1.2.3 From 9e49fb558f894a1960d208114b8c051536f58c9e Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 19 Jun 2012 22:36:12 -0700 Subject: CHUI-101 WIP Make LLFolderview general purpose added more casts to LLFolderViewModelItemInventory, etc. to fix compile errors --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 1d079adfd3..2947be3c2e 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -30,7 +30,7 @@ #include "llfolderview.h" #include "llfolderviewitem.h" -#include "llfoldervieweventlistener.h" +#include "llfolderviewmodel.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" #include "llpanellandmarks.h" -- cgit v1.2.3 From 3882e9c177190b22276e1ef3fc39e4cb910820fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 20 Jun 2012 00:19:05 -0700 Subject: CHUI-101 WIP Make LLFolderview general purpose more compilation fixes, just need to add getName() back to LLInventoryFilter et al --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 2947be3c2e..d2143783ad 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -208,7 +208,7 @@ void LLInboxFolderViewFolder::computeFreshness() if (last_expansion_utc > 0) { - mFresh = (mCreationDate > last_expansion_utc); + mFresh = (static_cast(getViewModelItem())->getCreationDate() > last_expansion_utc); #if DEBUGGING_FRESHNESS if (mFresh) @@ -230,15 +230,16 @@ void LLInboxFolderViewFolder::deFreshify() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) -{ - mCreationDate = creation_date_utc; - - if (mParentFolder == mRoot) - { - computeFreshness(); - } -} +// TODO RN: move this behavior to modelview? +//void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) +//{ +// mCreationDate = creation_date_utc; +// +// if (LLFolderViewItem::mParentFolder == mRoot) +// { +// computeFreshness(); +// } +//} // // LLInboxFolderViewItem Implementation @@ -304,7 +305,7 @@ void LLInboxFolderViewItem::computeFreshness() if (last_expansion_utc > 0) { - mFresh = (mCreationDate > last_expansion_utc); + mFresh = (static_cast(getViewModelItem())->getCreationDate() > last_expansion_utc); #if DEBUGGING_FRESHNESS if (mFresh) -- cgit v1.2.3 From 4775084000233ec9f0770f421771215397b987e7 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 21 Jun 2012 23:28:24 -0700 Subject: CHUI-101 WIP Make LLFolderview general purpose inventory item labels and icons displaying again --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index d2143783ad..f3096e862d 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -122,14 +122,6 @@ LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge LLInboxFolderViewFolder::Params params; params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.root = mFolderRoot; params.listener = bridge; params.tool_tip = params.name; @@ -142,14 +134,6 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b LLInboxFolderViewItem::Params params; params.name = bridge->getDisplayName(); - params.icon = bridge->getIcon(); - params.icon_open = bridge->getOpenIcon(); - - if (mShowItemLinkOverlays) // if false, then links show up just like normal items - { - params.icon_overlay = LLUI::getUIImage("Inv_Link"); - } - params.creation_date = bridge->getCreationDate(); params.root = mFolderRoot; params.listener = bridge; -- cgit v1.2.3 From ed7173c987cf4a5de2f3c9b9d792e5ac4006e833 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 28 Jun 2012 23:29:58 -0700 Subject: CHUI-101 WIP Make LLFolderview general purpose filtering mostly working --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index f3096e862d..6e5a522297 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -111,6 +111,7 @@ void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& para LLAssetType::AT_CATEGORY, LLInventoryType::IT_CATEGORY, this, + &mInventoryViewModel, NULL, root_id); -- cgit v1.2.3 From 4285cc271eacaca31a1d5d76c8e88debf00235c2 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 30 Jul 2012 15:15:42 -0700 Subject: CHUI-217 FIX Items are not visible in Merchant Outbox cleaned up a lot custom code for folder view item creation in inbox and outbox proper initialization of views from inventory panel starting folder --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 70 ++-------------------- 1 file changed, 6 insertions(+), 64 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 6e5a522297..8ad3929999 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -54,69 +54,11 @@ static LLDefaultChildRegistry::Register r3("inbox_folder_ // LLInboxInventoryPanel::LLInboxInventoryPanel(const LLInboxInventoryPanel::Params& p) - : LLInventoryPanel(p) -{ -} +: LLInventoryPanel(p) +{} LLInboxInventoryPanel::~LLInboxInventoryPanel() -{ -} - -// virtual -void LLInboxInventoryPanel::buildFolderView(const LLInventoryPanel::Params& params) -{ - // Determine the root folder in case specified, and - // build the views starting with that folder. - - LLUUID root_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX, false, false); - - // leslie -- temporary HACK to work around sim not creating inbox with proper system folder type - if (root_id.isNull()) - { - std::string start_folder_name(params.start_folder()); - - LLInventoryModel::cat_array_t* cats; - LLInventoryModel::item_array_t* items; - - gInventory.getDirectDescendentsOf(gInventory.getRootFolderID(), cats, items); - - if (cats) - { - for (LLInventoryModel::cat_array_t::const_iterator cat_it = cats->begin(); cat_it != cats->end(); ++cat_it) - { - LLInventoryCategory* cat = *cat_it; - - if (cat->getName() == start_folder_name) - { - root_id = cat->getUUID(); - break; - } - } - } - - if (root_id == LLUUID::null) - { - llwarns << "No category found that matches inbox inventory panel start_folder: " << start_folder_name << llendl; - } - } - // leslie -- end temporary HACK - - if (root_id == LLUUID::null) - { - llwarns << "Inbox inventory panel has no root folder!" << llendl; - root_id = LLUUID::generateNewID(); - } - - LLInvFVBridge* new_listener = mInvFVBridgeBuilder->createBridge(LLAssetType::AT_CATEGORY, - LLAssetType::AT_CATEGORY, - LLInventoryType::IT_CATEGORY, - this, - &mInventoryViewModel, - NULL, - root_id); - - mFolderRoot = createFolderView(new_listener, params.use_label_suffix()); -} +{} LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) { @@ -149,9 +91,9 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b // LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) - : LLFolderViewFolder(p) - , LLBadgeOwner(getHandle()) - , mFresh(false) +: LLFolderViewFolder(p), + LLBadgeOwner(getHandle()), + mFresh(false) { #if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -- cgit v1.2.3 From a204059d2e69fb33cb1a3c8d2fbed35d3967297c Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 1 Aug 2012 01:14:27 -0700 Subject: CHUI-267 FIX Full inventory listing not always shown for test account changed LLFolderViewModelInterface::getFilter() to return a reference, since it is never NULL removed sort order from filter, which was causing unneeded filtering --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 8ad3929999..0d3fbe66d7 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -182,9 +182,9 @@ LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) #endif } -BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) +void LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) { - BOOL retval = LLFolderViewItem::addToFolder(folder); + LLFolderViewItem::addToFolder(folder); #if SUPPORTING_FRESH_ITEM_COUNT // Compute freshness if our parent is the root folder for the inbox @@ -193,8 +193,6 @@ BOOL LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) computeFreshness(); } #endif - - return retval; } BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From 41cba389f89ff16c0e574ea26d6a1ceb60133ef7 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Thu, 16 Aug 2012 12:14:25 -0700 Subject: CHUI-269: Problem: When an item was purchased and delivered into the 'Received Items' panel, the badge icon and new item count would not show. This was due to the creation date of the folders not being set when a new item was added. Resolution: Now when an item is added into the 'Received Items' panel, the folder hierachy is updated, triggering the badge icon and new item count to show. --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 39 ++++++++++------------ 1 file changed, 18 insertions(+), 21 deletions(-) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 0d3fbe66d7..68aefa7fb7 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -95,22 +95,36 @@ LLInboxFolderViewFolder::LLInboxFolderViewFolder(const Params& p) LLBadgeOwner(getHandle()), mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif +} + +void LLInboxFolderViewFolder::addItem(LLFolderViewItem* item) +{ + LLFolderViewFolder::addItem(item); + + if(item) + { + LLInvFVBridge* itemBridge = static_cast(item->getViewModelItem()); + LLFolderBridge * bridge = static_cast(getViewModelItem()); + bridge->updateHierarchyCreationDate(itemBridge->getCreationDate()); + } + + // Compute freshness if our parent is the root folder for the inbox + if (mParentFolder == mRoot) + { + computeFreshness(); + } } // virtual void LLInboxFolderViewFolder::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewFolder::draw(); } @@ -157,17 +171,6 @@ void LLInboxFolderViewFolder::deFreshify() gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } -// TODO RN: move this behavior to modelview? -//void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) -//{ -// mCreationDate = creation_date_utc; -// -// if (LLFolderViewItem::mParentFolder == mRoot) -// { -// computeFreshness(); -// } -//} - // // LLInboxFolderViewItem Implementation // @@ -177,22 +180,18 @@ LLInboxFolderViewItem::LLInboxFolderViewItem(const Params& p) , LLBadgeOwner(getHandle()) , mFresh(false) { -#if SUPPORTING_FRESH_ITEM_COUNT initBadgeParams(p.new_badge()); -#endif } void LLInboxFolderViewItem::addToFolder(LLFolderViewFolder* folder) { LLFolderViewItem::addToFolder(folder); -#if SUPPORTING_FRESH_ITEM_COUNT // Compute freshness if our parent is the root folder for the inbox if (mParentFolder == mRoot) { computeFreshness(); } -#endif } BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) @@ -205,14 +204,12 @@ BOOL LLInboxFolderViewItem::handleDoubleClick(S32 x, S32 y, MASK mask) // virtual void LLInboxFolderViewItem::draw() { -#if SUPPORTING_FRESH_ITEM_COUNT if (!badgeHasParent()) { addBadgeToParentPanel(); } setBadgeVisibility(mFresh); -#endif LLFolderViewItem::draw(); } -- cgit v1.2.3 From 53471178fed23f32fbb967b6d001c58d8612e450 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 7 Dec 2012 20:06:30 -0800 Subject: CHUI-509, CHUI-585 : Fixed : Add font color parameters to received items and other inventory elements created --- indra/newview/llpanelmarketplaceinboxinventory.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llpanelmarketplaceinboxinventory.cpp') diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp index 68aefa7fb7..adfb2dee86 100644 --- a/indra/newview/llpanelmarketplaceinboxinventory.cpp +++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp @@ -40,6 +40,8 @@ #define DEBUGGING_FRESHNESS 0 +const LLColor4U DEFAULT_WHITE(255, 255, 255); + // // statics // @@ -62,18 +64,24 @@ LLInboxInventoryPanel::~LLInboxInventoryPanel() LLFolderViewFolder * LLInboxInventoryPanel::createFolderViewFolder(LLInvFVBridge * bridge) { + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + LLInboxFolderViewFolder::Params params; params.name = bridge->getDisplayName(); params.root = mFolderRoot; params.listener = bridge; params.tool_tip = params.name; + params.font_color = item_color; + params.font_highlight_color = item_color; return LLUICtrlFactory::create(params); } LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * bridge) { + LLUIColor item_color = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); + LLInboxFolderViewItem::Params params; params.name = bridge->getDisplayName(); @@ -82,6 +90,8 @@ LLFolderViewItem * LLInboxInventoryPanel::createFolderViewItem(LLInvFVBridge * b params.listener = bridge; params.rect = LLRect (0, 0, 0, 0); params.tool_tip = params.name; + params.font_color = item_color; + params.font_highlight_color = item_color; return LLUICtrlFactory::create(params); } -- cgit v1.2.3