Commit f9d8a5af authored by Kitty Barnett's avatar Kitty Barnett
Browse files

Merged with UI-Notifications tip

--HG--
branch : .Catznip
parents 471f82e7 a7d94b1b
......@@ -41,6 +41,7 @@ LLFloaterNotificationsFlat::~LLFloaterNotificationsFlat()
{
}
// virtual
BOOL LLFloaterNotificationsFlat::postBuild()
{
m_pMessageList = getChild<LLNotificationListView>("notification_list");
......@@ -55,6 +56,17 @@ BOOL LLFloaterNotificationsFlat::postBuild()
return LLFloaterNotifications::postBuild();
}
// virtual
void LLFloaterNotificationsFlat::onVisibilityChange(BOOL isVisible)
{
LLFloaterNotifications::onVisibilityChange(isVisible);
if ( (isVisible) && (m_NeedsSort) )
{
refreshSort();
}
}
bool LLFloaterNotificationsFlat::checkFilter(const LLNotificationListItem* pItem) const
{
bool fVisible = true;
......@@ -191,6 +203,19 @@ void LLFloaterNotificationsFlat::refreshFilter()
m_pMessageList->notify(LLSD().with("rearrange", LLSD()));
}
void LLFloaterNotificationsFlat::refreshSort()
{
if (getVisible())
{
m_pMessageList->sort();
m_NeedsSort = false;
}
else
{
m_NeedsSort = true;
}
}
bool LLFloaterNotificationsFlat::isWindowEmpty() const
{
// NOTE: consider all items, not just the visible ones
......@@ -202,7 +227,7 @@ bool LLFloaterNotificationsFlat::addNotification(LLNotificationListItem* pItem)
if (m_pMessageList->addNotification(pItem, false))
{
pItem->setVisible(checkFilter(pItem));
m_pMessageList->sort();
refreshSort();
return true;
}
return false;
......
......@@ -44,7 +44,8 @@ class LLFloaterNotificationsFlat : public LLFloaterNotifications
* Base class overrides
*/
public:
/*virtual*/ BOOL postBuild();
BOOL postBuild() override;
void onVisibilityChange(BOOL isVisible) override;
/*
* Helper functions
......@@ -62,6 +63,7 @@ class LLFloaterNotificationsFlat : public LLFloaterNotifications
bool checkFilter(const LLNotificationListItem* pItem) const;
void refreshFilter();
void refreshSort();
/*
* Pure virtual functions
......@@ -86,6 +88,7 @@ class LLFloaterNotificationsFlat : public LLFloaterNotifications
LLComboBox* m_pFilterType;
LLFilterEditor* m_pFilterText;
bool m_NeedsSort = false;
bool m_fSinceLogoff = false;
std::string m_strFilterText;
std::string m_strFilterType;
......
......@@ -2021,6 +2021,12 @@ bool idle_startup()
LLLandmark::registerCallbacks(msg);
display_startup();
// [SL:KB] - Patch: UI-Notifications | Checked: Catznip-6.1
// Create the inventory views
LL_INFOS() << "Creating Inventory Views" << LL_ENDL;
LLFloaterReg::getInstance("inventory");
display_startup();
// [/SL:KB]
// request mute list
LL_INFOS() << "Requesting Mute List" << LL_ENDL;
LLMuteList::getInstance()->requestFromServer(gAgent.getID());
......@@ -2033,10 +2039,10 @@ bool idle_startup()
LL_INFOS() << "Requesting Agent Data" << LL_ENDL;
gAgent.sendAgentDataUpdateRequest();
display_startup();
// Create the inventory views
LL_INFOS() << "Creating Inventory Views" << LL_ENDL;
LLFloaterReg::getInstance("inventory");
display_startup();
// // Create the inventory views
// LL_INFOS() << "Creating Inventory Views" << LL_ENDL;
// LLFloaterReg::getInstance("inventory");
// display_startup();
// [RLVa:KB] - Checked: RLVa-1.1.0
if (RlvHandler::isEnabled())
......
......@@ -114,15 +114,15 @@
right="-8"/>
<layout_stack left="140" width="200" height="26" enabled="true" orientation="horizontal" follows="right" name="ButtonsStack">
<layout_panel width="93" height="30" enabled="true" orientation="horizontal" name="CondenseAllButtonPanel">
<layout_panel width="93" height="30" enabled="true" name="CondenseAllButtonPanel">
<button width="93" height="21" left="2" label="Collapse all" name="collapse_all_button">
</button>
</layout_panel>
<layout_panel width="6" height="30" enabled="true" orientation="horizontal" name="GapLayoutPanel">
<layout_panel width="6" height="30" enabled="true" name="GapLayoutPanel">
<panel width="5" height="21" left="2" label="Gap Panel" border="false" name="GapPanel">
</panel>
</layout_panel>
<layout_panel width="93" height="30" enabled="true" orientation="horizontal" name="DeleteAllButtonPanel">
<layout_panel width="93" height="30" enabled="true" name="DeleteAllButtonPanel">
<button width="93" height="21" left="0" label="Delete all" follows="right" name="delete_all_button">
</button>
</layout_panel>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment