From e5d6a14f05f857ecbbbd9b464db3ece82d1d099f Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Fri, 9 Jan 2015 20:17:39 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - initial version Works: 1) All new notices shown on "Invites" tab of new floater "NOTIFICATIONS TABBED" in condensed view To be done: 1) Show other types of notices, like transactions and system 2) Separate notices between tabs "Invites", "System", "Transactions" 3) Design full notice view (in addition to condensed view) --- indra/newview/llfloaternotificationstabbed.cpp | 377 +++++++++++++++++++++++++ 1 file changed, 377 insertions(+) create mode 100644 indra/newview/llfloaternotificationstabbed.cpp (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp new file mode 100644 index 0000000000..09f0a0ed5e --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -0,0 +1,377 @@ +/** + * @file llfloaternotificationstabbed.cpp + * @brief // TODO + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" // must be first include +#include "llfloaternotificationstabbed.h" + +#include "llchiclet.h" +#include "llchicletbar.h" +#include "llflatlistview.h" +#include "llfloaterreg.h" +#include "llnotificationmanager.h" +#include "llnotificationsutil.h" +#include "llscriptfloater.h" +#include "llspeakers.h" +#include "lltoastpanel.h" +#include "lltoastnotifypanel.h" + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), + mChannel(NULL), + mMessageList(NULL), + mSysWellChiclet(NULL), + NOTIFICATION_TABBED_ANCHOR_NAME("notification_well_panel"), + IM_WELL_ANCHOR_NAME("im_well_panel"), + mIsReshapedByUser(false) + +{ + setOverlapsScreenChannel(true); + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} + +//--------------------------------------------------------------------------------- +BOOL LLFloaterNotificationsTabbed::postBuild() +{ + mMessageList = getChild("notification_list"); + + // get a corresponding channel + initChannel(); + BOOL rv = LLTransientDockableFloater::postBuild(); + + //LLNotificationWellWindow::postBuild() + //-------------------------- + setTitle(getString("title_notification_tabbed_window")); + return rv; +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize) +{ + LLTransientDockableFloater::setMinimized(minimize); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::handleReshape(const LLRect& rect, bool by_user) +{ + mIsReshapedByUser |= by_user; // mark floater that it is reshaped by user + LLTransientDockableFloater::handleReshape(rect, by_user); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask) +{ + // just set floater visible. Screen channels will be cleared. + setVisible(TRUE); +} + +void LLFloaterNotificationsTabbed::setSysWellChiclet(LLSysWellChiclet* chiclet) +{ + mSysWellChiclet = chiclet; + if(NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } +} + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed() +{ +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id) +{ + if(mMessageList->removeItemByValue(id)) + { + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } + reshapeWindow(); + } + else + { + LL_WARNS() << "Unable to remove notification from the list, ID: " << id + << LL_ENDL; + } + + // hide chiclet window if there are no items left + if(isWindowEmpty()) + { + setVisible(FALSE); + } +} + +//--------------------------------------------------------------------------------- +LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id) +{ + return mMessageList->getItemByValue(id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::initChannel() +{ + LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID( + LLUUID(gSavedSettings.getString("NotificationChannelUUID"))); + mChannel = dynamic_cast(channel); + if(NULL == mChannel) + { + LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL; + } + + //LLSysWellWindow::initChannel(); + //--------------------------------------------------------------------------------- + if(mChannel) + { + mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setVisible(BOOL visible) +{ + //LLNotificationWellWindow::setVisible + //-------------------------- + if (visible) + { + // when Notification channel is cleared, storable toasts will be added into the list. + clearScreenChannels(); + } + //-------------------------- + if (visible) + { + if (NULL == getDockControl() && getDockTongue().notNull()) + { + setDockControl(new LLDockControl( + LLChicletBar::getInstance()->getChild(getAnchorViewName()), this, + getDockTongue(), LLDockControl::BOTTOM)); + } + } + + // do not show empty window + if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + + LLTransientDockableFloater::setVisible(visible); + + // update notification channel state + initChannel(); // make sure the channel still exists + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setDocked(bool docked, bool pop_on_undock) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); + + // update notification channel state + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::reshapeWindow() +{ + // save difference between floater height and the list height to take it into account while calculating new window height + // it includes height from floater top to list top and from floater bottom and list bottom + static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + + if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. + { + S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); + + LLRect curRect = getRect(); + + S32 new_window_height = notif_list_height + parent_list_delta_height; + + if (new_window_height > MAX_WINDOW_HEIGHT) + { + new_window_height = MAX_WINDOW_HEIGHT; + } + S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); + + curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); + reshape(curRect.getWidth(), curRect.getHeight(), TRUE); + setRect(curRect); + } + + // update notification channel state + // update on a window reshape is important only when a window is visible and docked + if(mChannel && getVisible() && isDocked()) + { + mChannel->updateShowToastsState(); + } +} + +//--------------------------------------------------------------------------------- +bool LLFloaterNotificationsTabbed::isWindowEmpty() +{ + return mMessageList->size() == 0; +} + +LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChannel(LLFloaterNotificationsTabbed* notifications_tabbed_window) + : LLNotificationChannel(LLNotificationChannel::Params().name(notifications_tabbed_window->getPathname())), + mNotificationsTabbedWindow(notifications_tabbed_window) +{ + connectToChannel("Notifications"); + connectToChannel("Group Notifications"); + connectToChannel("Offer"); +} + +/* +LLFloaterNotificationsTabbed::LLNotificationWellWindow(const LLSD& key) + : LLSysWellWindow(key) +{ + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} +*/ + +// static +LLFloaterNotificationsTabbed* LLFloaterNotificationsTabbed::getInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::getTypedInstance("notification_well_window", key); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::addItem(LLNotificationTabbedItem::Params p) +{ + LLSD value = p.notification_id; + // do not add clones + if( mMessageList->getItemByValue(value)) + return; + + LLNotificationTabbedItem* new_item = new LLNotificationTabbedItem(p); + if (mMessageList->addItem(new_item, value, ADD_TOP)) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + reshapeWindow(); + new_item->setOnItemCloseCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClose, this, _1)); + new_item->setOnItemClickCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClick, this, _1)); + } + else + { + LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id + << ", title: " << p.title + << LL_ENDL; + + new_item->die(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector items; + mMessageList->getItems(items); + for (std::vector::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLNotificationTabbedItem* sys_well_item = dynamic_cast(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } +} + +////////////////////////////////////////////////////////////////////////// +// PRIVATE METHODS +//void LLFloaterNotificationsTabbed::initChannel() +//{ +// LLFloaterNotificationsTabbed::initChannel(); +// if(mChannel) +// { +// mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); +// } +//} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::clearScreenChannels() +{ + // 1 - remove StartUp toast and channel if present + if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown()) + { + LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose(); + } + + // 2 - remove toasts in Notification channel + if(mChannel) + { + mChannel->removeAndStoreAllStorableToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) +{ + LLNotificationTabbedItem::Params p; + p.notification_id = id; + p.title = static_cast(info_panel)->getTitle(); + LLNotificationsUI::LLToast* toast = mChannel->getToastByNotificationID(id); + LLSD payload = toast->getNotification()->getPayload(); + LLDate time_stamp = toast->getNotification()->getDate(); + p.group_id = payload["group_id"]; + p.sender = payload["name"]; + p.time_stamp = time_stamp; + addItem(p); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClick(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + LLFloaterReg::showInstance("inspect_toast", id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClose(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + + if(mChannel) + { + // removeItemByID() is invoked from killToastByNotificationID() and item will removed; + mChannel->killToastByNotificationID(id); + } + else + { + // removeItemByID() should be called one time for each item to remove it from notification well + removeItemByID(id); + } + +} + +void LLFloaterNotificationsTabbed::onAdd( LLNotificationPtr notify ) +{ + removeItemByID(notify->getID()); +} -- cgit v1.2.3 From 23ae6d098a9520d325354e15bdca60d3c44577e8 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Mon, 12 Jan 2015 18:25:28 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - fixed Mac build --- indra/newview/llfloaternotificationstabbed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 09f0a0ed5e..bdc10cfa63 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -341,7 +341,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLSD payload = toast->getNotification()->getPayload(); LLDate time_stamp = toast->getNotification()->getDate(); p.group_id = payload["group_id"]; - p.sender = payload["name"]; + p.sender = payload["name"].asString(); p.time_stamp = time_stamp; addItem(p); } -- cgit v1.2.3 From b31631934a7caa0fe331cd25e745e8b9c9485798 Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Tue, 3 Feb 2015 19:44:25 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - added code to sort notifications between tabs: Invites, Transactions, System messages - made cosmetic changes according to comment from 27/Jan/15 in Jira - added code to show correct number of notifications on each tab - added code to close all notifications on current tab via "Delete all" button --- indra/newview/llfloaternotificationstabbed.cpp | 300 ++++++++++++++++++------- 1 file changed, 225 insertions(+), 75 deletions(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index bdc10cfa63..b05ea6aa38 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -1,6 +1,6 @@ /** * @file llfloaternotificationstabbed.cpp - * @brief // TODO + * @brief * $LicenseInfo:firstyear=2000&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. @@ -40,8 +40,12 @@ //--------------------------------------------------------------------------------- LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), mChannel(NULL), - mMessageList(NULL), mSysWellChiclet(NULL), + mInviteMessageList(NULL), + mTransactionMessageList(NULL), + mSystemMessageList(NULL), + mNotificationsSeparator(NULL), + mNotificationsTabContainer(NULL), NOTIFICATION_TABBED_ANCHOR_NAME("notification_well_panel"), IM_WELL_ANCHOR_NAME("im_well_panel"), mIsReshapedByUser(false) @@ -49,19 +53,27 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL { setOverlapsScreenChannel(true); mNotificationUpdates.reset(new NotificationTabbedChannel(this)); + mNotificationsSeparator = new LLNotificationSeparator(); } //--------------------------------------------------------------------------------- BOOL LLFloaterNotificationsTabbed::postBuild() { - mMessageList = getChild("notification_list"); + mInviteMessageList = getChild("invite_notification_list"); + mTransactionMessageList = getChild("transaction_notification_list"); + mSystemMessageList = getChild("system_notification_list"); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getInviteTypes(), mInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getTransactionTypes(), mTransactionMessageList); + mNotificationsSeparator->initUnTaggedList(mSystemMessageList); + mNotificationsTabContainer = getChild("notifications_tab_container"); + + mDeleteAllBtn = getChild("delete_all_button"); + mDeleteAllBtn->setClickedCallback(boost::bind(&LLFloaterNotificationsTabbed::onClickDeleteAllBtn,this)); // get a corresponding channel initChannel(); BOOL rv = LLTransientDockableFloater::postBuild(); - //LLNotificationWellWindow::postBuild() - //-------------------------- setTitle(getString("title_notification_tabbed_window")); return rv; } @@ -101,15 +113,16 @@ LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed() } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id) +void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id, std::string type) { - if(mMessageList->removeItemByValue(id)) + if(mNotificationsSeparator->removeItemByID(type, id)) { if (NULL != mSysWellChiclet) { mSysWellChiclet->updateWidget(isWindowEmpty()); } reshapeWindow(); + updateNotificationCounters(); } else { @@ -125,9 +138,9 @@ void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id) } //--------------------------------------------------------------------------------- -LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id) +LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id, std::string type) { - return mMessageList->getItemByValue(id); + return mNotificationsSeparator->findItemByID(type, id); } //--------------------------------------------------------------------------------- @@ -141,8 +154,6 @@ void LLFloaterNotificationsTabbed::initChannel() LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL; } - //LLSysWellWindow::initChannel(); - //--------------------------------------------------------------------------------- if(mChannel) { mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); @@ -152,14 +163,11 @@ void LLFloaterNotificationsTabbed::initChannel() //--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::setVisible(BOOL visible) { - //LLNotificationWellWindow::setVisible - //-------------------------- if (visible) { // when Notification channel is cleared, storable toasts will be added into the list. clearScreenChannels(); } - //-------------------------- if (visible) { if (NULL == getDockControl() && getDockTongue().notNull()) @@ -171,7 +179,7 @@ void LLFloaterNotificationsTabbed::setVisible(BOOL visible) } // do not show empty window - if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + if (NULL == mNotificationsSeparator || isWindowEmpty()) visible = FALSE; LLTransientDockableFloater::setVisible(visible); @@ -202,26 +210,26 @@ void LLFloaterNotificationsTabbed::reshapeWindow() { // save difference between floater height and the list height to take it into account while calculating new window height // it includes height from floater top to list top and from floater bottom and list bottom - static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + //static S32 parent_list_delta_height = getRect().getHeight() - mInviteMessageList->getRect().getHeight(); - if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. - { - S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); + //if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. + //{ + // S32 notif_list_height = mInviteMessageList->getItemsRect().getHeight() + 2 * mInviteMessageList->getBorderWidth(); - LLRect curRect = getRect(); + // LLRect curRect = getRect(); - S32 new_window_height = notif_list_height + parent_list_delta_height; + // S32 new_window_height = notif_list_height + parent_list_delta_height; - if (new_window_height > MAX_WINDOW_HEIGHT) - { - new_window_height = MAX_WINDOW_HEIGHT; - } - S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); + // if (new_window_height > MAX_WINDOW_HEIGHT) + // { + // new_window_height = MAX_WINDOW_HEIGHT; + // } + // S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); - curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); - reshape(curRect.getWidth(), curRect.getHeight(), TRUE); - setRect(curRect); - } + // curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); + // reshape(curRect.getWidth(), curRect.getHeight(), TRUE); + // setRect(curRect); + //} // update notification channel state // update on a window reshape is important only when a window is visible and docked @@ -234,7 +242,7 @@ void LLFloaterNotificationsTabbed::reshapeWindow() //--------------------------------------------------------------------------------- bool LLFloaterNotificationsTabbed::isWindowEmpty() { - return mMessageList->size() == 0; + return mNotificationsSeparator->size() == 0; } LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChannel(LLFloaterNotificationsTabbed* notifications_tabbed_window) @@ -246,74 +254,98 @@ LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChann connectToChannel("Offer"); } -/* -LLFloaterNotificationsTabbed::LLNotificationWellWindow(const LLSD& key) - : LLSysWellWindow(key) -{ - mNotificationUpdates.reset(new NotificationTabbedChannel(this)); -} -*/ - // static LLFloaterNotificationsTabbed* LLFloaterNotificationsTabbed::getInstance(const LLSD& key /*= LLSD()*/) { return LLFloaterReg::getTypedInstance("notification_well_window", key); } +void LLFloaterNotificationsTabbed::updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName) +{ + LLStringUtil::format_map_t string_args; + string_args["[COUNT]"] = llformat("%d", counterValue); + std::string label = getString(stringName, string_args); + mNotificationsTabContainer->setPanelTitle(panelIndex, label); +} + +void LLFloaterNotificationsTabbed::updateNotificationCounters() +{ + updateNotificationCounter(0, mSystemMessageList->size(), "system_tab_title"); + updateNotificationCounter(1, mTransactionMessageList->size(), "transactions_tab_title"); + updateNotificationCounter(2, mInviteMessageList->size(), "invitations_tab_title"); +} + //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::addItem(LLNotificationTabbedItem::Params p) +void LLFloaterNotificationsTabbed::addItem(LLNotificationListItem::Params p) { - LLSD value = p.notification_id; // do not add clones - if( mMessageList->getItemByValue(value)) + if (mNotificationsSeparator->findItemByID(p.notification_name, p.notification_id)) return; - - LLNotificationTabbedItem* new_item = new LLNotificationTabbedItem(p); - if (mMessageList->addItem(new_item, value, ADD_TOP)) + LLNotificationListItem* new_item = LLNotificationListItem::create(p); + if (new_item == NULL) + { + return; + } + if (mNotificationsSeparator->addItem(new_item->getNotificationName(), new_item)) { mSysWellChiclet->updateWidget(isWindowEmpty()); reshapeWindow(); + updateNotificationCounters(); new_item->setOnItemCloseCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClose, this, _1)); new_item->setOnItemClickCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClick, this, _1)); } else { LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id - << ", title: " << p.title + << ", title: " << new_item->getTitle() << LL_ENDL; new_item->die(); } } -//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::closeAll() { // Need to clear notification channel, to add storable toasts into the list. clearScreenChannels(); - std::vector items; - mMessageList->getItems(items); - for (std::vector::iterator - iter = items.begin(), - iter_end = items.end(); - iter != iter_end; ++iter) + + std::vector items; + mNotificationsSeparator->getItems(items); + std::vector::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) { - LLNotificationTabbedItem* sys_well_item = dynamic_cast(*iter); - if (sys_well_item) - onItemClose(sys_well_item); + onItemClose(*iter); } } -////////////////////////////////////////////////////////////////////////// -// PRIVATE METHODS -//void LLFloaterNotificationsTabbed::initChannel() -//{ -// LLFloaterNotificationsTabbed::initChannel(); -// if(mChannel) -// { -// mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); -// } -//} +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector items; + switch (mNotificationsTabContainer->getCurrentPanelIndex()) + { + case 0: + mSystemMessageList->getItems(items); + break; + case 1: + mTransactionMessageList->getItems(items); + break; + case 2: + mInviteMessageList->getItems(items); + break; + default: + return; + } + std::vector::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) + { + LLNotificationListItem* notify_item = dynamic_cast(*iter); + if (notify_item) + onItemClose(notify_item); + } +} //--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::clearScreenChannels() @@ -334,27 +366,27 @@ void LLFloaterNotificationsTabbed::clearScreenChannels() //--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) { - LLNotificationTabbedItem::Params p; + LLNotificationListItem::Params p; p.notification_id = id; p.title = static_cast(info_panel)->getTitle(); - LLNotificationsUI::LLToast* toast = mChannel->getToastByNotificationID(id); - LLSD payload = toast->getNotification()->getPayload(); - LLDate time_stamp = toast->getNotification()->getDate(); + LLNotificationPtr notify = mChannel->getToastByNotificationID(id)->getNotification(); + LLSD payload = notify->getPayload(); + p.notification_name = notify->getName(); p.group_id = payload["group_id"]; p.sender = payload["name"].asString(); - p.time_stamp = time_stamp; + p.time_stamp = notify->getDate(); addItem(p); } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::onItemClick(LLNotificationTabbedItem* item) +void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); LLFloaterReg::showInstance("inspect_toast", id); } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::onItemClose(LLNotificationTabbedItem* item) +void LLFloaterNotificationsTabbed::onItemClose(LLNotificationListItem* item) { LLUUID id = item->getID(); @@ -366,12 +398,130 @@ void LLFloaterNotificationsTabbed::onItemClose(LLNotificationTabbedItem* item) else { // removeItemByID() should be called one time for each item to remove it from notification well - removeItemByID(id); + removeItemByID(id, item->getNotificationName()); } } void LLFloaterNotificationsTabbed::onAdd( LLNotificationPtr notify ) { - removeItemByID(notify->getID()); + removeItemByID(notify->getID(), notify->getName()); +} + +void LLFloaterNotificationsTabbed::onClickDeleteAllBtn() +{ + closeAllOnCurrentTab(); +} + +void LLNotificationSeparator::initTaggedList(const std::string& tag, LLNotificationListView* list) +{ + mNotificationListMap.insert(notification_list_map_t::value_type(tag, list)); + mNotificationLists.push_back(list); +} + +void LLNotificationSeparator::initTaggedList(const std::set& tags, LLNotificationListView* list) +{ + std::set::const_iterator it = tags.begin(); + for(;it != tags.end();it++) + { + initTaggedList(*it, list); + } +} + +void LLNotificationSeparator::initUnTaggedList(LLNotificationListView* list) +{ + mUnTaggedList = list; +} + +bool LLNotificationSeparator::addItem(std::string& tag, LLNotificationListItem* item) +{ + notification_list_map_t::iterator it = mNotificationListMap.find(tag); + if (it != mNotificationListMap.end()) + { + return it->second->addNotification(item); + } + else if (mUnTaggedList != NULL) + { + return mUnTaggedList->addNotification(item); + } + return false; +} + +bool LLNotificationSeparator::removeItemByID(std::string& tag, const LLUUID& id) +{ + notification_list_map_t::iterator it = mNotificationListMap.find(tag); + if (it != mNotificationListMap.end()) + { + return it->second->removeItemByValue(id); + } + else if (mUnTaggedList != NULL) + { + return mUnTaggedList->removeItemByValue(id); + } + return false; +} + +U32 LLNotificationSeparator::size() const +{ + U32 size = 0; + notification_list_list_t::const_iterator it = mNotificationLists.begin(); + for (; it != mNotificationLists.end(); it++) + { + size = size + (*it)->size(); + } + if (mUnTaggedList != NULL) + { + size = size + mUnTaggedList->size(); + } + return size; } + +LLPanel* LLNotificationSeparator::findItemByID(std::string& tag, const LLUUID& id) +{ + notification_list_map_t::iterator it = mNotificationListMap.find(tag); + if (it != mNotificationListMap.end()) + { + return it->second->getItemByValue(id); + } + else if (mUnTaggedList != NULL) + { + return mUnTaggedList->getItemByValue(id); + } + + return NULL; +} + +//static +void LLNotificationSeparator::getItemsFromList(std::vector& items, LLNotificationListView* list) +{ + std::vector list_items; + list->getItems(list_items); + std::vector::iterator it = list_items.begin(); + for (; it != list_items.end(); ++it) + { + LLNotificationListItem* notify_item = dynamic_cast(*it); + if (notify_item) + items.push_back(notify_item); + } +} + +void LLNotificationSeparator::getItems(std::vector& items) const +{ + items.clear(); + notification_list_list_t::const_iterator lists_it = mNotificationLists.begin(); + for (; lists_it != mNotificationLists.end(); lists_it++) + { + getItemsFromList(items, *lists_it); + } + if (mUnTaggedList != NULL) + { + getItemsFromList(items, mUnTaggedList); + } +} + +LLNotificationSeparator::LLNotificationSeparator() + : mUnTaggedList(NULL) +{} + +LLNotificationSeparator::~LLNotificationSeparator() +{} -- cgit v1.2.3 From b147d659dc0c94a972f1c82f16536b374ee10c19 Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Tue, 17 Mar 2015 18:26:28 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) stripped off attachment field; 2) made logos (group's, sender's, etc) in expanded view the same size as in condensed view; 3) turned on notification showing upon click; 4) fixed cropped right border of Invite and Transactions notifications; 5) enabled "Collapse All" button; 6) stripped off unnecessary icons. --- indra/newview/llfloaternotificationstabbed.cpp | 93 +++++++++++++++++--------- 1 file changed, 60 insertions(+), 33 deletions(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index b05ea6aa38..05a0af01ce 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -1,9 +1,9 @@ /** * @file llfloaternotificationstabbed.cpp * @brief - * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. + * Copyright (C) 2015, Linden Research, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -51,7 +51,7 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL mIsReshapedByUser(false) { - setOverlapsScreenChannel(true); + setOverlapsScreenChannel(true); mNotificationUpdates.reset(new NotificationTabbedChannel(this)); mNotificationsSeparator = new LLNotificationSeparator(); } @@ -70,12 +70,15 @@ BOOL LLFloaterNotificationsTabbed::postBuild() mDeleteAllBtn = getChild("delete_all_button"); mDeleteAllBtn->setClickedCallback(boost::bind(&LLFloaterNotificationsTabbed::onClickDeleteAllBtn,this)); + mCollapseAllBtn = getChild("collapse_all_button"); + mCollapseAllBtn->setClickedCallback(boost::bind(&LLFloaterNotificationsTabbed::onClickCollapseAllBtn,this)); + // get a corresponding channel initChannel(); BOOL rv = LLTransientDockableFloater::postBuild(); setTitle(getString("title_notification_tabbed_window")); - return rv; + return rv; } //--------------------------------------------------------------------------------- @@ -98,6 +101,7 @@ void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask) setVisible(TRUE); } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::setSysWellChiclet(LLSysWellChiclet* chiclet) { mSysWellChiclet = chiclet; @@ -208,29 +212,6 @@ void LLFloaterNotificationsTabbed::setDocked(bool docked, bool pop_on_undock) //--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::reshapeWindow() { - // save difference between floater height and the list height to take it into account while calculating new window height - // it includes height from floater top to list top and from floater bottom and list bottom - //static S32 parent_list_delta_height = getRect().getHeight() - mInviteMessageList->getRect().getHeight(); - - //if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. - //{ - // S32 notif_list_height = mInviteMessageList->getItemsRect().getHeight() + 2 * mInviteMessageList->getBorderWidth(); - - // LLRect curRect = getRect(); - - // S32 new_window_height = notif_list_height + parent_list_delta_height; - - // if (new_window_height > MAX_WINDOW_HEIGHT) - // { - // new_window_height = MAX_WINDOW_HEIGHT; - // } - // S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); - - // curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); - // reshape(curRect.getWidth(), curRect.getHeight(), TRUE); - // setRect(curRect); - //} - // update notification channel state // update on a window reshape is important only when a window is visible and docked if(mChannel && getVisible() && isDocked()) @@ -245,8 +226,9 @@ bool LLFloaterNotificationsTabbed::isWindowEmpty() return mNotificationsSeparator->size() == 0; } +//--------------------------------------------------------------------------------- LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChannel(LLFloaterNotificationsTabbed* notifications_tabbed_window) - : LLNotificationChannel(LLNotificationChannel::Params().name(notifications_tabbed_window->getPathname())), + : LLNotificationChannel(LLNotificationChannel::Params().name(notifications_tabbed_window->getPathname())), mNotificationsTabbedWindow(notifications_tabbed_window) { connectToChannel("Notifications"); @@ -255,11 +237,13 @@ LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChann } // static +//--------------------------------------------------------------------------------- LLFloaterNotificationsTabbed* LLFloaterNotificationsTabbed::getInstance(const LLSD& key /*= LLSD()*/) { return LLFloaterReg::getTypedInstance("notification_well_window", key); } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName) { LLStringUtil::format_map_t string_args; @@ -268,6 +252,7 @@ void LLFloaterNotificationsTabbed::updateNotificationCounter(S32 panelIndex, S32 mNotificationsTabContainer->setPanelTitle(panelIndex, label); } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::updateNotificationCounters() { updateNotificationCounter(0, mSystemMessageList->size(), "system_tab_title"); @@ -304,6 +289,7 @@ void LLFloaterNotificationsTabbed::addItem(LLNotificationListItem::Params p) } } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::closeAll() { // Need to clear notification channel, to add storable toasts into the list. @@ -319,11 +305,8 @@ void LLFloaterNotificationsTabbed::closeAll() } //--------------------------------------------------------------------------------- -void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() +void LLFloaterNotificationsTabbed::getAllItemsOnCurrentTab(std::vector& items) const { - // Need to clear notification channel, to add storable toasts into the list. - clearScreenChannels(); - std::vector items; switch (mNotificationsTabContainer->getCurrentPanelIndex()) { case 0: @@ -336,8 +319,17 @@ void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() mInviteMessageList->getItems(items); break; default: - return; + break; } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector items; + getAllItemsOnCurrentTab(items); std::vector::iterator iter = items.begin(); for (; iter != items.end(); ++iter) { @@ -347,6 +339,20 @@ void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() } } +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::collapseAllOnCurrentTab() +{ + std::vector items; + getAllItemsOnCurrentTab(items); + std::vector::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) + { + LLNotificationListItem* notify_item = dynamic_cast(*iter); + if (notify_item) + notify_item->setExpanded(FALSE); + } +} + //--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::clearScreenChannels() { @@ -375,6 +381,8 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) p.group_id = payload["group_id"]; p.sender = payload["name"].asString(); p.time_stamp = notify->getDate(); + p.paid_from_id = payload["from_id"]; + p.paid_to_id = payload["dest_id"]; addItem(p); } @@ -403,22 +411,32 @@ void LLFloaterNotificationsTabbed::onItemClose(LLNotificationListItem* item) } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::onAdd( LLNotificationPtr notify ) { removeItemByID(notify->getID(), notify->getName()); } +//--------------------------------------------------------------------------------- void LLFloaterNotificationsTabbed::onClickDeleteAllBtn() { closeAllOnCurrentTab(); } +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onClickCollapseAllBtn() +{ + collapseAllOnCurrentTab(); +} + +//--------------------------------------------------------------------------------- void LLNotificationSeparator::initTaggedList(const std::string& tag, LLNotificationListView* list) { mNotificationListMap.insert(notification_list_map_t::value_type(tag, list)); mNotificationLists.push_back(list); } +//--------------------------------------------------------------------------------- void LLNotificationSeparator::initTaggedList(const std::set& tags, LLNotificationListView* list) { std::set::const_iterator it = tags.begin(); @@ -428,11 +446,13 @@ void LLNotificationSeparator::initTaggedList(const std::set& tags, } } +//--------------------------------------------------------------------------------- void LLNotificationSeparator::initUnTaggedList(LLNotificationListView* list) { mUnTaggedList = list; } +//--------------------------------------------------------------------------------- bool LLNotificationSeparator::addItem(std::string& tag, LLNotificationListItem* item) { notification_list_map_t::iterator it = mNotificationListMap.find(tag); @@ -447,6 +467,7 @@ bool LLNotificationSeparator::addItem(std::string& tag, LLNotificationListItem* return false; } +//--------------------------------------------------------------------------------- bool LLNotificationSeparator::removeItemByID(std::string& tag, const LLUUID& id) { notification_list_map_t::iterator it = mNotificationListMap.find(tag); @@ -461,6 +482,7 @@ bool LLNotificationSeparator::removeItemByID(std::string& tag, const LLUUID& id) return false; } +//--------------------------------------------------------------------------------- U32 LLNotificationSeparator::size() const { U32 size = 0; @@ -476,6 +498,7 @@ U32 LLNotificationSeparator::size() const return size; } +//--------------------------------------------------------------------------------- LLPanel* LLNotificationSeparator::findItemByID(std::string& tag, const LLUUID& id) { notification_list_map_t::iterator it = mNotificationListMap.find(tag); @@ -492,6 +515,7 @@ LLPanel* LLNotificationSeparator::findItemByID(std::string& tag, const LLUUID& i } //static +//--------------------------------------------------------------------------------- void LLNotificationSeparator::getItemsFromList(std::vector& items, LLNotificationListView* list) { std::vector list_items; @@ -505,6 +529,7 @@ void LLNotificationSeparator::getItemsFromList(std::vector& items) const { items.clear(); @@ -519,9 +544,11 @@ void LLNotificationSeparator::getItems(std::vector& ite } } +//--------------------------------------------------------------------------------- LLNotificationSeparator::LLNotificationSeparator() : mUnTaggedList(NULL) {} +//--------------------------------------------------------------------------------- LLNotificationSeparator::~LLNotificationSeparator() {} -- cgit v1.2.3 From 60d28437e616a6afda51a368ea40ad49a707d16c Mon Sep 17 00:00:00 2001 From: pavelk_productengine Date: Wed, 8 Apr 2015 19:51:39 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) added GroupNotice notification type and tab "Group" for it; 2) added Attachment field to group notice notifications which may contain inventory offers, notecards, etc; 3) added Fee field to Group Invite notifications; 4) added notification resize depending on attachment field. --- indra/newview/llfloaternotificationstabbed.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 05a0af01ce..fd5f1486d9 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -41,7 +41,8 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), mChannel(NULL), mSysWellChiclet(NULL), - mInviteMessageList(NULL), + mGroupInviteMessageList(NULL), + mGroupNoticeMessageList(NULL), mTransactionMessageList(NULL), mSystemMessageList(NULL), mNotificationsSeparator(NULL), @@ -59,10 +60,12 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL //--------------------------------------------------------------------------------- BOOL LLFloaterNotificationsTabbed::postBuild() { - mInviteMessageList = getChild("invite_notification_list"); + mGroupInviteMessageList = getChild("group_invite_notification_list"); + mGroupNoticeMessageList = getChild("group_notice_notification_list"); mTransactionMessageList = getChild("transaction_notification_list"); mSystemMessageList = getChild("system_notification_list"); - mNotificationsSeparator->initTaggedList(LLNotificationListItem::getInviteTypes(), mInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupInviteTypes(), mGroupInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupNoticeTypes(), mGroupNoticeMessageList); mNotificationsSeparator->initTaggedList(LLNotificationListItem::getTransactionTypes(), mTransactionMessageList); mNotificationsSeparator->initUnTaggedList(mSystemMessageList); mNotificationsTabContainer = getChild("notifications_tab_container"); @@ -257,7 +260,8 @@ void LLFloaterNotificationsTabbed::updateNotificationCounters() { updateNotificationCounter(0, mSystemMessageList->size(), "system_tab_title"); updateNotificationCounter(1, mTransactionMessageList->size(), "transactions_tab_title"); - updateNotificationCounter(2, mInviteMessageList->size(), "invitations_tab_title"); + updateNotificationCounter(2, mGroupInviteMessageList->size(), "group_invitations_tab_title"); + updateNotificationCounter(3, mGroupNoticeMessageList->size(), "group_notices_tab_title"); } //--------------------------------------------------------------------------------- @@ -316,7 +320,10 @@ void LLFloaterNotificationsTabbed::getAllItemsOnCurrentTab(std::vector mTransactionMessageList->getItems(items); break; case 2: - mInviteMessageList->getItems(items); + mGroupInviteMessageList->getItems(items); + break; + case 3: + mGroupNoticeMessageList->getItems(items); break; default: break; @@ -379,10 +386,15 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); p.group_id = payload["group_id"]; - p.sender = payload["name"].asString(); + p.fee = payload["fee"]; + p.subject = payload["subject"].asString(); + p.message = payload["message"].asString(); + p.sender = payload["sender_name"].asString(); p.time_stamp = notify->getDate(); + p.received_time = payload["received_time"].asDate(); p.paid_from_id = payload["from_id"]; p.paid_to_id = payload["dest_id"]; + p.inventory_offer = payload["inventory_offer"]; addItem(p); } -- cgit v1.2.3 From f479235aaa94555ee0ea7a663187ae9930d7d5f4 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Tue, 19 May 2015 13:20:46 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) disabled popup show (toast) when clicking on notification in expanded view; 2) made attachment in Group Notice notification clickable (copied logic from LLToastGroupNotifyPanel); 3) removed border around notification text in expanded view and made lighter background; 4) removed border around attachment field in expanded notification view. --- indra/newview/llfloaternotificationstabbed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index fd5f1486d9..70213680f3 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -402,7 +402,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); - LLFloaterReg::showInstance("inspect_toast", id); + //LLFloaterReg::showInstance("inspect_toast", id); } //--------------------------------------------------------------------------------- -- cgit v1.2.3 From 33c5a3974c210af259d3572193bcdcd65137d888 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 13 Jul 2015 17:52:42 +0300 Subject: MAINT-5369 FIXED Unable to accept group invite using Notification floater --- indra/newview/llfloaternotificationstabbed.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 70213680f3..57109c6763 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -385,6 +385,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLNotificationPtr notify = mChannel->getToastByNotificationID(id)->getNotification(); LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); + p.transaction_id = payload["transaction_id"]; p.group_id = payload["group_id"]; p.fee = payload["fee"]; p.subject = payload["subject"].asString(); -- cgit v1.2.3 From 5665c5320c50180e69e3616613b7796da919a721 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Fri, 31 Jul 2015 17:49:45 +0300 Subject: MAINT-5394 [Project Notice] The PERMISSION_DEBIT notification is not distinct enough on the Project Notice viewer. --- indra/newview/llfloaternotificationstabbed.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationstabbed.cpp') diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 57109c6763..5823983b76 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -396,6 +396,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) p.paid_from_id = payload["from_id"]; p.paid_to_id = payload["dest_id"]; p.inventory_offer = payload["inventory_offer"]; + p.notification_priority = notify->getPriority(); addItem(p); } @@ -403,7 +404,10 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); - //LLFloaterReg::showInstance("inspect_toast", id); + if (item->showPopup()) + { + LLFloaterReg::showInstance("inspect_toast", id); + } } //--------------------------------------------------------------------------------- -- cgit v1.2.3