summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-01 16:12:39 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-01 16:12:39 -0700
commit02658d9725435ee14b21183365388deacb5e88e5 (patch)
tree7358df4728501996e478554ab5fbb6074a89b41a
parentf1c01becf27ab92a39c90d725c5bc70c73286e65 (diff)
EXP-1001 FIX -- Newness is removed on next login if you log out or crash before opening inventory panel
EXP-1148 FIX -- New Tags can show in incorrect locations when opening folder with drop down arrow in Received Items panel EXP-1163 FIX -- When ordering a Direct Delivery item in Basic Mode, item is not shown as new on login to Advanced mode EXP-1172 FIX -- New tags not displayed for items delivered while not logged in on next login to viewer EXP-1173 FIX -- New tags are removed for all new items when Inventory side panel is opened * New tag now set when an item folder is added to the inbox. * Update to new tag only happens when a valid date exists. * Inbox collapsed time now only set when inbox panel is in a visible chain.
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp2
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.cpp40
-rw-r--r--indra/newview/llpanelmarketplaceinboxinventory.h4
-rw-r--r--indra/newview/llsidepanelinventory.cpp6
-rw-r--r--indra/newview/llsidetray.cpp2
5 files changed, 31 insertions, 23 deletions
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 5a835eadf1..a73742b68f 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -53,7 +53,7 @@ LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
{
- if (getVisible() && getChild<LLButton>("inbox_btn")->getToggleState())
+ if (isInVisibleChain() && getChild<LLButton>("inbox_btn")->getToggleState())
{
gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString());
}
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index e2f8af1280..f6a4b6e26b 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -174,19 +174,6 @@ LLInboxFolderViewFolder::~LLInboxFolderViewFolder()
}
// virtual
-time_t LLInboxFolderViewFolder::getCreationDate() const
-{
- time_t ret_val = LLFolderViewFolder::getCreationDate();
-
- if (!mCreationDate)
- {
- updateFlag();
- }
-
- return ret_val;
-}
-
-// virtual
void LLInboxFolderViewFolder::draw()
{
#if SUPPORTING_FRESH_ITEM_COUNT
@@ -201,32 +188,53 @@ void LLInboxFolderViewFolder::draw()
LLFolderViewFolder::draw();
}
+BOOL LLInboxFolderViewFolder::addToFolder(LLFolderViewFolder* folder, LLFolderView* root)
+{
+ BOOL retval = LLFolderViewFolder::addToFolder(folder, root);
+
+ // Only mark top-level inbox folders as fresh
+ mFresh = (mParentFolder == mRoot);
+
+ return retval;
+}
+
void LLInboxFolderViewFolder::updateFlag() const
{
const std::string& last_collapse = gSavedPerAccountSettings.getString("LastInventoryInboxCollapse");
+
if (!last_collapse.empty())
{
LLDate saved_freshness_date = LLDate(last_collapse);
+ //llinfos << "Saved freshness: " << saved_freshness_date.secondsSinceEpoch() << llendl;
+
mFresh = (mCreationDate > saved_freshness_date.secondsSinceEpoch());
+
+ //llinfos << " Creation date: " << mCreationDate << " -- fresh -- " << mFresh << " -- this -- " << (void*)&*(this) << llendl;
}
}
void LLInboxFolderViewFolder::selectItem()
{
- mFresh = false;
LLFolderViewFolder::selectItem();
+
+ mFresh = false;
}
void LLInboxFolderViewFolder::toggleOpen()
{
- mFresh = false;
LLFolderViewFolder::toggleOpen();
+
+ mFresh = false;
}
void LLInboxFolderViewFolder::setCreationDate(time_t creation_date_utc) const
{
mCreationDate = creation_date_utc;
- updateFlag();
+
+ if (mFresh)
+ {
+ updateFlag();
+ }
}
//
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.h b/indra/newview/llpanelmarketplaceinboxinventory.h
index 6cb243dbd5..06706539a0 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.h
+++ b/indra/newview/llpanelmarketplaceinboxinventory.h
@@ -73,10 +73,10 @@ public:
LLInboxFolderViewFolder(const Params& p);
~LLInboxFolderViewFolder();
- time_t getCreationDate() const;
-
void draw();
+ BOOL addToFolder(LLFolderViewFolder* folder, LLFolderView* root);
+
void updateFlag() const;
void selectItem();
void toggleOpen();
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 9290b7ebef..a8a9f4948b 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -500,7 +500,7 @@ bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLL
else
{
// NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate
- // propery to the child panels.
+ // properly to the child panels.
S32 new_height = inout_panel->getRect().getHeight();
@@ -527,7 +527,7 @@ void LLSidepanelInventory::onToggleInboxBtn()
bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel);
- if (!inbox_expanded && inboxPanel->getVisible())
+ if (!inbox_expanded && inboxPanel->isInVisibleChain())
{
gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString());
}
@@ -543,7 +543,7 @@ void LLSidepanelInventory::onToggleOutboxBtn()
bool inbox_was_expanded = inboxButton->getToggleState();
manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel);
- if (inbox_was_expanded && inboxPanel->getVisible())
+ if (inbox_was_expanded && inboxPanel->isInVisibleChain())
{
gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString());
}
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 651897a217..363c8543ed 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -1442,7 +1442,7 @@ void LLSideTray::updateSidetrayVisibility()
parent->setVisible(new_visibility);
// Signal change of visible width.
- llinfos << "Visible: " << new_visibility << llendl;
+ //llinfos << "Visible: " << new_visibility << llendl;
mVisibleWidthChangeSignal(this, new_visibility);
}
}