From 8baafe6613e62a76c6a0b85842cc7d542d615e71 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 18 Aug 2011 14:33:54 -0700 Subject: EXP-1098 User can drag folders into Outbox with more than 3 levels of nested folders EXP-1100 Show tooltips when drag and drop operations are not allowed --- indra/newview/llfolderviewitem.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index e2b7c45eab..2f07e084ab 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -840,7 +840,7 @@ BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, BOOL handled = FALSE; if(mListener) { - accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data); + accepted = mListener->dragOrDrop(mask,drop,cargo_type,cargo_data, tooltip_msg); handled = accepted; if (accepted) { @@ -2162,7 +2162,7 @@ BOOL LLFolderViewFolder::handleDragAndDropFromChild(MASK mask, EAcceptance* accept, std::string& tooltip_msg) { - BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data); + BOOL accepted = mListener && mListener->dragOrDrop(mask,drop,c_type,cargo_data, tooltip_msg); if (accepted) { mDragAndDropTarget = TRUE; @@ -2254,7 +2254,7 @@ BOOL LLFolderViewFolder::handleDragAndDrop(S32 x, S32 y, MASK mask, if (!handled) { - BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data); + BOOL accepted = mListener && mListener->dragOrDrop(mask, drop,cargo_type,cargo_data, tooltip_msg); if (accepted) { -- cgit v1.2.3 From c2443b95d3cd9f0f26e5e8f5c2dbeb5f6c307447 Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Fri, 26 Aug 2011 16:33:47 -0700 Subject: EXP-1126 FIX -- Cannot use arrow keys to scroll up and down in Inbox and Outbox EXP-1003 FIX -- Renaming a folder in Received Items panel resets the New flag for that folder EXP-1001 FIX -- Newness is removed on next login if you log out or crash before opening inventory panel EXP-857 FIX -- Add context menu entries as alternate path to populate outbox EXP-858 FIX -- Outbox sync failure error handling EXP-1158 FIX -- Viewer crash when deleting items from Outbox when some folders are open * Made inbox, outbox and inventory panels all legit tab stops for keyboard focus * Added mouse over indication on inventory panel primarily for increased clarity on outbox error messages * Disabled "Rename" option on inbox items * Added context menu option to copy/move an item to the merchant outbox * Context menu option to copy/move to outbox is visible and/or enabled/disabled when appropriate * "LastInventoryInboxCollapse" no longer written out as a setting when the panel is not visible * Fixed up collapse time check to not try to parse empty string on first load (deminishes text spam in log greatly) * Disabled double-click as a way to equip items in the inbox or outbox * Viewer code no longer removes items from the outbox after sync. We rely on the sim to do this now. * Basic outbox sync error handling now displays error messages as tooltips along with badge over item in outbox * Moved some scroll container default values out of code and into xml --- indra/newview/llfolderviewitem.cpp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 2f07e084ab..72e2294196 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -132,7 +132,8 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) mIconOpen(p.icon_open), mIconOverlay(p.icon_overlay), mListener(p.listener), - mShowLoadStatus(false) + mShowLoadStatus(false), + mIsMouseOverTitle(false) { } @@ -724,6 +725,8 @@ BOOL LLFolderViewItem::handleMouseDown( S32 x, S32 y, MASK mask ) BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) { + mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); + if( hasMouseCapture() && isMovable() ) { S32 screen_x; @@ -830,6 +833,11 @@ BOOL LLFolderViewItem::handleMouseUp( S32 x, S32 y, MASK mask ) return TRUE; } +void LLFolderViewItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mIsMouseOverTitle = false; +} + BOOL LLFolderViewItem::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, @@ -879,6 +887,7 @@ void LLFolderViewItem::draw() static LLUIColor sLibraryColor = LLUIColorTable::instance().getColor("InventoryItemLibraryColor", DEFAULT_WHITE); static LLUIColor sLinkColor = LLUIColorTable::instance().getColor("InventoryItemLinkColor", DEFAULT_WHITE); static LLUIColor sSearchStatusColor = LLUIColorTable::instance().getColor("InventorySearchStatusColor", DEFAULT_WHITE); + static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE); const Params& default_params = LLUICtrlFactory::getDefaultParams(); const S32 TOP_PAD = default_params.item_top_pad; @@ -960,6 +969,14 @@ void LLFolderViewItem::draw() } } } + else if (mIsMouseOverTitle) + { + gl_rect_2d(FOCUS_LEFT, + focus_top, + getRect().getWidth() - 2, + focus_bottom, + sMouseOverColor, FALSE); + } //--------------------------------------------------------------------------------// // Draw DragNDrop highlight @@ -2299,6 +2316,8 @@ BOOL LLFolderViewFolder::handleRightMouseDown( S32 x, S32 y, MASK mask ) BOOL LLFolderViewFolder::handleHover(S32 x, S32 y, MASK mask) { + mIsMouseOverTitle = (y > (getRect().getHeight() - mItemHeight)); + BOOL handled = LLView::handleHover(x, y, mask); if (!handled) -- cgit v1.2.3 From b183b6f1413f2f534633f021480ccc4570235f2d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 6 Sep 2011 14:45:11 -0700 Subject: EXP-1196 FIX Fix param block template ordering changed ordering of template loading relative to constructor setting of params moved a lot of constructor-set params to template files reviewed by Leslie --- indra/newview/llfolderviewitem.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index e2b7c45eab..47e99b7f82 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -101,10 +101,7 @@ LLFolderViewItem::Params::Params() item_height("item_height"), item_top_pad("item_top_pad"), creation_date() -{ - mouse_opaque(true); - follows.flags(FOLLOWS_LEFT|FOLLOWS_TOP|FOLLOWS_RIGHT); -} +{} // Default constructor LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p) -- cgit v1.2.3 From 6bb2b2cb99740a00498f5441b8a48b0bf5a04985 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 7 Sep 2011 12:45:50 -0700 Subject: EXP-1194 FIX -- Update New tag behavior to update Newness timestamp when Received Items panel is open and do not auto open Received Items panel * Updated inbox freshness time setting name to "LastInventoryInboxActivity" * New time stamp reflects time of last activity performed on the inbox by the user * Selection and opening items in the inbox both count as activity on the inbox * Focus going to the inbox panel counts as activity on the inbox * Creation date of folders now computed based on date of items being added to them * Creation date of folders no longer relies on queries for creation date, as is done during sorting * Folders are assumed to be "new" if no inbox freshness time setting is saved --- indra/newview/llfolderviewitem.cpp | 62 ++++++++++++++------------------------ 1 file changed, 23 insertions(+), 39 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 72e2294196..00bc63326b 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2057,23 +2057,42 @@ BOOL LLFolderViewFolder::isRemovable() BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item) { mItems.push_back(item); + if (item->isSelected()) { recursiveIncrementNumDescendantsSelected(1); } + item->setRect(LLRect(0, 0, getRect().getWidth(), 0)); item->setVisible(FALSE); - addChild( item ); + + addChild(item); + item->dirtyFilter(); + + // Update the folder creation date if the child is newer than our current date + setCreationDate(llmax(mCreationDate, item->getCreationDate())); + + // Handle sorting requestArrange(); requestSort(); + + // Traverse parent folders and update creation date and resort, if necessary LLFolderViewFolder* parentp = getParentFolder(); - while (parentp && parentp->mSortFunction.isByDate()) + while (parentp) { - // parent folder doesn't have a time stamp yet, so get it from us - parentp->requestSort(); + // Update the folder creation date if the child is newer than our current date + parentp->setCreationDate(llmax(parentp->mCreationDate, item->getCreationDate())); + + if (parentp->mSortFunction.isByDate()) + { + // parent folder doesn't have a time stamp yet, so get it from us + parentp->requestSort(); + } + parentp = parentp->getParentFolder(); } + return TRUE; } @@ -2437,41 +2456,6 @@ void LLFolderViewFolder::draw() time_t LLFolderViewFolder::getCreationDate() const { - // folders have no creation date try to create one from an item somewhere in our folder hierarchy - if (!mCreationDate) - { - for (items_t::const_iterator iit = mItems.begin(); - iit != mItems.end(); ++iit) - { - LLFolderViewItem* itemp = (*iit); - - const time_t item_creation_date = itemp->getCreationDate(); - - if (item_creation_date) - { - setCreationDate(item_creation_date); - break; - } - } - - if (!mCreationDate) - { - for (folders_t::const_iterator fit = mFolders.begin(); - fit != mFolders.end(); ++fit) - { - LLFolderViewFolder* folderp = (*fit); - - const time_t folder_creation_date = folderp->getCreationDate(); - - if (folder_creation_date) - { - setCreationDate(folder_creation_date); - break; - } - } - } - } - return llmax(mCreationDate, mSubtreeCreationDate); } -- cgit v1.2.3 From 1d3f6ef432b714a7659e9a5ee62377e56a843006 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 15 Sep 2011 16:13:10 -0700 Subject: EXP-1215 FIX -- New tag toggles on and off during delivery of large purchases EXP-1216 FIX -- Not all inbox items are sorted properly for large item purchases * The inventory listener is no longer used to override the folder's creation date if the date it has is zero. --- indra/newview/llfolderviewitem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfolderviewitem.cpp') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 2888f779f4..622dcfe8dd 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -282,9 +282,9 @@ void LLFolderViewItem::refreshFromListener() setToolTip(mLabel); setIcon(mListener->getIcon()); time_t creation_date = mListener->getCreationDate(); - if (mCreationDate != creation_date) + if ((creation_date > 0) && (mCreationDate != creation_date)) { - setCreationDate(mListener->getCreationDate()); + setCreationDate(creation_date); dirtyFilter(); } if (mRoot->useLabelSuffix()) -- cgit v1.2.3