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/llchiclet.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llchiclet.cpp') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index c0823182c0..6435c934b9 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -35,6 +35,7 @@ #include "llscriptfloater.h" #include "llsingleton.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" static LLDefaultChildRegistry::Register t1("chiclet_panel"); static LLDefaultChildRegistry::Register t2("chiclet_notification"); @@ -165,7 +166,8 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. - LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); + //LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); + LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); } void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) @@ -173,7 +175,8 @@ void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) std::string action = user_data.asString(); if("close all" == action) { - LLNotificationWellWindow::getInstance()->closeAll(); + //LLNotificationWellWindow::getInstance()->closeAll(); + LLFloaterNotificationsTabbed::getInstance()->closeAll(); LLIMWellWindow::getInstance()->closeAll(); } } @@ -224,7 +227,8 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo bool displayNotification; if ( (notification->getName() == "ScriptDialog") // special case for scripts // if there is no toast window for the notification, filter it - || (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) + //|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) + || (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID())) ) { displayNotification = false; -- cgit v1.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/CMakeLists.txt | 4 + indra/newview/llchiclet.cpp | 2 +- indra/newview/llfloaternotificationstabbed.cpp | 300 +++++++++++++++------ indra/newview/llfloaternotificationstabbed.h | 75 ++++-- indra/newview/llnotificationlistitem.cpp | 196 ++++++++++++++ indra/newview/llnotificationlistitem.h | 136 ++++++++++ indra/newview/llnotificationlistview.cpp | 44 +++ indra/newview/llnotificationlistview.h | 49 ++++ indra/newview/llsyswellitem.cpp | 83 +----- indra/newview/llsyswellitem.h | 52 ---- .../xui/en/floater_notifications_tabbed.xml | 53 +++- .../xui/en/panel_notification_tabbed_item.xml | 16 +- .../xui/en/widgets/notification_list_view.xml | 18 ++ 13 files changed, 777 insertions(+), 251 deletions(-) create mode 100644 indra/newview/llnotificationlistitem.cpp create mode 100644 indra/newview/llnotificationlistitem.h create mode 100644 indra/newview/llnotificationlistview.cpp create mode 100644 indra/newview/llnotificationlistview.h create mode 100644 indra/newview/skins/default/xui/en/widgets/notification_list_view.xml (limited to 'indra/newview/llchiclet.cpp') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b17811d644..4bf92f0f4e 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -397,6 +397,8 @@ set(viewer_SOURCE_FILES llnotificationgrouphandler.cpp llnotificationhandlerutil.cpp llnotificationhinthandler.cpp + llnotificationlistitem.cpp + llnotificationlistview.cpp llnotificationmanager.cpp llnotificationofferhandler.cpp llnotificationscripthandler.cpp @@ -999,6 +1001,8 @@ set(viewer_HEADER_FILES llnavigationbar.h llnetmap.h llnotificationhandler.h + llnotificationlistitem.h + llnotificationlistview.h llnotificationmanager.h llnotificationstorage.h lloutfitslist.h diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 6435c934b9..33cb0551b4 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -228,7 +228,7 @@ bool LLNotificationChiclet::ChicletNotificationChannel::filterNotification( LLNo if ( (notification->getName() == "ScriptDialog") // special case for scripts // if there is no toast window for the notification, filter it //|| (!LLNotificationWellWindow::getInstance()->findItemByID(notification->getID())) - || (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID())) + || (!LLFloaterNotificationsTabbed::getInstance()->findItemByID(notification->getID(), notification->getName())) ) { displayNotification = false; 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() +{} diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 1fd60826cb..36eee2f866 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -1,6 +1,6 @@ /** * @file llfloaternotificationstabbed.h - * @brief // TODO + * @brief * * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code @@ -32,6 +32,8 @@ #include "llscreenchannel.h" #include "llsyswellitem.h" #include "lltransientdockablefloater.h" +#include "llnotificationlistview.h" +#include "lltabcontainer.h" class LLAvatarName; class LLChiclet; @@ -40,6 +42,29 @@ class LLIMChiclet; class LLScriptChiclet; class LLSysWellChiclet; +class LLNotificationSeparator +{ +public: + LLNotificationSeparator(); + ~LLNotificationSeparator(); + void initTaggedList(const std::string& tag, LLNotificationListView* list); + void initTaggedList(const std::set& tags, LLNotificationListView* list); + void initUnTaggedList(LLNotificationListView* list); + bool addItem(std::string& tag, LLNotificationListItem* item); + LLPanel* findItemByID(std::string& tag, const LLUUID& id); + bool removeItemByID(std::string& tag, const LLUUID& id); + void getItems(std::vector& items) const; + U32 size() const; +private: + static void getItemsFromList(std::vector& items, LLNotificationListView* list); + + typedef std::map notification_list_map_t; + notification_list_map_t mNotificationListMap; + typedef std::list notification_list_list_t; + notification_list_list_t mNotificationLists; + LLNotificationListView* mUnTaggedList; +}; + class LLFloaterNotificationsTabbed : public LLTransientDockableFloater { public: @@ -54,8 +79,10 @@ public: bool isWindowEmpty(); // Operating with items - void removeItemByID(const LLUUID& id); - LLPanel * findItemByID(const LLUUID& id); + void removeItemByID(const LLUUID& id, std::string type); + LLPanel * findItemByID(const LLUUID& id, std::string type); + void updateNotificationCounters(); + void updateNotificationCounter(S32 panelIndex, S32 counterValue, std::string stringName); // Operating with outfit virtual void setVisible(BOOL visible); @@ -67,14 +94,18 @@ public: /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); + /*virtual*/ void onAdd(LLNotificationPtr notify); void setSysWellChiclet(LLSysWellChiclet* chiclet); + void closeAll(); + + static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements static const S32 MAX_WINDOW_HEIGHT = 200; static const S32 MIN_WINDOW_WIDTH = 318; -protected: +private: // init Window's channel virtual void initChannel(); @@ -86,7 +117,6 @@ protected: // pointer to a corresponding channel's instance LLNotificationsUI::LLScreenChannel* mChannel; - LLFlatListView* mMessageList; /** * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 @@ -95,25 +125,12 @@ protected: bool mIsReshapedByUser; -public: - static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); - - /*virtual*/ //BOOL postBuild(); - /*virtual*/ //void setVisible(BOOL visible); - /*virtual*/ void onAdd(LLNotificationPtr notify); - // Operating with items - void addItem(LLNotificationTabbedItem::Params p); - - // Closes all notifications and removes them from the Notification Well - void closeAll(); - -protected: struct NotificationTabbedChannel : public LLNotificationChannel { NotificationTabbedChannel(LLFloaterNotificationsTabbed*); void onDelete(LLNotificationPtr notify) { - mNotificationsTabbedWindow->removeItemByID(notify->getID()); + mNotificationsTabbedWindow->removeItemByID(notify->getID(), notify->getName()); } LLFloaterNotificationsTabbed* mNotificationsTabbedWindow; @@ -122,19 +139,29 @@ protected: LLNotificationChannelPtr mNotificationUpdates; virtual const std::string& getAnchorViewName() { return NOTIFICATION_TABBED_ANCHOR_NAME; } -private: // init Window's channel // void initChannel(); void clearScreenChannels(); + // Operating with items + void addItem(LLNotificationListItem::Params p); - void onStoreToast(LLPanel* info_panel, LLUUID id); + // Closes all notifications and removes them from the Notification Well + void closeAllOnCurrentTab(); + void onStoreToast(LLPanel* info_panel, LLUUID id); + void onClickDeleteAllBtn(); // Handlers - void onItemClick(LLNotificationTabbedItem* item); - void onItemClose(LLNotificationTabbedItem* item); - + void onItemClick(LLNotificationListItem* item); + void onItemClose(LLNotificationListItem* item); // ID of a toast loaded by user (by clicking notification well item) LLUUID mLoadedToastId; + + LLNotificationListView* mInviteMessageList; + LLNotificationListView* mTransactionMessageList; + LLNotificationListView* mSystemMessageList; + LLNotificationSeparator* mNotificationsSeparator; + LLTabContainer* mNotificationsTabContainer; + LLButton* mDeleteAllBtn; }; #endif // LL_FLOATERNOTIFICATIONSTABBED_H diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp new file mode 100644 index 0000000000..a55c7b8541 --- /dev/null +++ b/indra/newview/llnotificationlistitem.cpp @@ -0,0 +1,196 @@ +/** + * @file llnotificationlistitem.cpp + * @brief // TODO + * + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * 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 + * 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 "llnotificationlistitem.h" + +#include "llwindow.h" +#include "v4color.h" +#include "lltrans.h" +#include "lluicolortable.h" + +LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), + mTitleBox(NULL), + mCloseBtn(NULL), + mSenderBox(NULL) +{ + buildFromFile( "panel_notification_tabbed_item.xml"); + + mTitleBox = getChild("GroupName_NoticeTitle"); + mTimeBox = getChild("Time_Box"); + mCloseBtn = getChild("close_btn"); + mSenderBox = getChild("Sender_Resident"); + + mTitleBox->setValue(p.title); + mTimeBox->setValue(buildNotificationDate(p.time_stamp)); + mSenderBox->setVisible(FALSE); + + mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); + + mID = p.notification_id; + mNotificationName = p.notification_name; +} + +LLNotificationListItem::~LLNotificationListItem() +{ +} + +//static +std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_stamp) +{ + std::string timeStr = "[" + LLTrans::getString("LTimeMthNum") + "]/[" + +LLTrans::getString("LTimeDay")+"]/[" + +LLTrans::getString("LTimeYear")+"] [" + +LLTrans::getString("LTimeHour")+"]:[" + +LLTrans::getString("LTimeMin")+"]"; + + LLSD substitution; + substitution["datetime"] = time_stamp; + LLStringUtil::format(timeStr, substitution); + return timeStr; +} + +//--------------------------------------------------------------------------------- +//void LLNotificationTabbedItem::setTitle( std::string title ) +//{ +// mTitleBox->setValue(title); +//} + +void LLNotificationListItem::onClickCloseBtn() +{ + mOnItemClose(this); +} + +BOOL LLNotificationListItem::handleMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL res = LLPanel::handleMouseDown(x, y, mask); + if(!mCloseBtn->getRect().pointInRect(x, y)) + //if(!mCloseBtn->getRect().pointInRect(x, y)) + //if(!mCloseBtn->getLocalRect().pointInRect(x, y)) + mOnItemClick(this); + + return res; +} + +void LLNotificationListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemSelected" )); +} + +void LLNotificationListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); +} + +//static +LLNotificationListItem* LLNotificationListItem::create(const Params& p) +{ + if (LLNotificationListItem::getInviteTypes().count(p.notification_name)) + { + return new LLInviteNotificationListItem(p); + } + else if (LLNotificationListItem::getTransactionTypes().count(p.notification_name)) + { + return new LLTransactionNotificationListItem(p); + } + return new LLSystemNotificationListItem(p); +} + +//static +std::set LLNotificationListItem::getInviteTypes() +{ + return LLInviteNotificationListItem::getTypes(); +} + +//static +std::set LLNotificationListItem::getTransactionTypes() +{ + return LLTransactionNotificationListItem::getTypes(); +} + +std::set LLInviteNotificationListItem::getTypes() +{ + std::set types; + types.insert("JoinGroup"); + return types; +} + +std::set LLTransactionNotificationListItem::getTypes() +{ + std::set types; + types.insert("PaymentReceived"); + types.insert("PaymentSent"); + return types; +} + +std::set LLSystemNotificationListItem::getTypes() +{ + std::set types; + types.insert("AddPrimitiveFailure"); + types.insert("AddToNavMeshNoCopy"); + types.insert("AssetServerTimeoutObjReturn"); + types.insert("AvatarEjected"); + types.insert("AutoUnmuteByIM"); + types.insert("AutoUnmuteByInventory"); + types.insert("AutoUnmuteByMoney"); + types.insert("BuyInventoryFailedNoMoney"); + types.insert("DeactivatedGesturesTrigger"); + types.insert("DeedFailedNoPermToDeedForGroup"); + types.insert("WhyAreYouTryingToWearShrubbery"); + types.insert("YouDiedAndGotTPHome"); + types.insert("YouFrozeAvatar"); + + types.insert("OfferCallingCard"); + //ExpireExplanation + return types; +} + +LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) + : LLNotificationListItem(p) +{ + mGroupIcon = getChild("group_icon_small"); + mGroupIcon->setValue(p.group_id); + mGroupID = p.group_id; + if (!p.sender.empty()) + { + LLStringUtil::format_map_t string_args; + string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender); + std::string sender_text = getString("sender_resident_text", string_args); + mSenderBox->setValue(sender_text); + mSenderBox->setVisible(TRUE); + } +} + +LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) + : LLNotificationListItem(p) +{} + +LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) + :LLNotificationListItem(p) +{} + diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h new file mode 100644 index 0000000000..bc77d873a4 --- /dev/null +++ b/indra/newview/llnotificationlistitem.h @@ -0,0 +1,136 @@ +/** + * @file llnotificationlistitem.h + * @brief // TODO + * + * $LicenseInfo:firstyear=2003&license=viewerlgpl$ + * Second Life Viewer Source Code + * 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 + * 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$ + */ + +#ifndef LL_LLNOTIFICATIONLISTITEM_H +#define LL_LLNOTIFICATIONLISTITEM_H + +#include "llpanel.h" +#include "lltextbox.h" +#include "llbutton.h" +#include "lliconctrl.h" + +#include "llgroupmgr.h" + +#include + +class LLNotificationListItem : public LLPanel +{ +public: + struct Params : public LLInitParam::Block + { + LLUUID notification_id; + LLUUID group_id; + std::string notification_name; + std::string title; + std::string sender; + LLDate time_stamp; + Params() {}; + }; + + static LLNotificationListItem* create(const Params& p); + + static std::set getInviteTypes(); + static std::set getTransactionTypes(); + + // title + void setTitle( std::string title ); + + // get item's ID + LLUUID getID() { return mID; } + std::string getTitle() { return mTitle; } + std::string getNotificationName() { return mNotificationName; } + + // handlers + virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); + virtual void onMouseEnter(S32 x, S32 y, MASK mask); + virtual void onMouseLeave(S32 x, S32 y, MASK mask); + + //callbacks + typedef boost::function item_callback_t; + typedef boost::signals2::signal item_signal_t; + item_signal_t mOnItemClose; + item_signal_t mOnItemClick; + boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } + boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } + +protected: + LLNotificationListItem(const Params& p); + virtual ~LLNotificationListItem(); + + static std::string buildNotificationDate(const LLDate&); + void onClickCloseBtn(); + + LLTextBox* mTitleBox; + LLTextBox* mTimeBox; + LLButton* mCloseBtn; + LLUUID mID; + std::string mTitle; + std::string mNotificationName; + LLTextBox* mSenderBox; +}; + +class LLInviteNotificationListItem : public LLNotificationListItem +{ +public: + //void setGroupID(const LLUUID& group_id); + //void setGroupIconID(const LLUUID& group_icon_id); + //void setGroupName(const std::string& group_name); + static std::set getTypes(); +private: + friend class LLNotificationListItem; + LLInviteNotificationListItem(const Params& p); + LLInviteNotificationListItem(const LLInviteNotificationListItem &); + LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); + + LLIconCtrl* mGroupIcon; + LLUUID mGroupID; +}; + +class LLTransactionNotificationListItem : public LLNotificationListItem +{ +public: + static std::set getTypes(); +private: + friend class LLNotificationListItem; + LLTransactionNotificationListItem(const Params& p); + LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); + LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); +}; + +class LLSystemNotificationListItem : public LLNotificationListItem +{ +public: + static std::set getTypes(); +private: + friend class LLNotificationListItem; + LLSystemNotificationListItem(const Params& p); + LLSystemNotificationListItem(const LLSystemNotificationListItem &); + LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); +}; + +#endif // LL_LLNOTIFICATIONLISTITEM_H + + diff --git a/indra/newview/llnotificationlistview.cpp b/indra/newview/llnotificationlistview.cpp new file mode 100644 index 0000000000..8690f185e9 --- /dev/null +++ b/indra/newview/llnotificationlistview.cpp @@ -0,0 +1,44 @@ +/** + * @file llnotificationlistview.cpp + * @brief + * + * $LicenseInfo:firstyear=2009&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" + +#include "llnotificationlistview.h" + +static const LLDefaultChildRegistry::Register notification_list_view("notification_list_view"); + +LLNotificationListView::LLNotificationListView(const Params& p) + : LLFlatListView(p) +{} + +LLNotificationListView::~LLNotificationListView() +{} + +bool LLNotificationListView::addNotification(LLNotificationListItem * item) +{ + return LLFlatListView::addItem(item, item->getID(), ADD_TOP); +} + +//EOF diff --git a/indra/newview/llnotificationlistview.h b/indra/newview/llnotificationlistview.h new file mode 100644 index 0000000000..9329826faf --- /dev/null +++ b/indra/newview/llnotificationlistview.h @@ -0,0 +1,49 @@ +/** + * @file llflatlistview.h + * @brief LLFlatListView base class and extension to support messages for several cases of an empty list. + * + * $LicenseInfo:firstyear=2009&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$ + */ + +#ifndef LL_LLNOTIFICATIONLISTVIEW_H +#define LL_LLNOTIFICATIONLISTVIEW_H + +#include "llflatlistview.h" +#include "llnotificationlistitem.h" + +/** + * Notification list + */ +class LLNotificationListView : public LLFlatListView +{ + LOG_CLASS(LLNotificationListView); +public: + struct Params : public LLInitParam::Block {}; + + LLNotificationListView(const Params& p); + ~LLNotificationListView(); + friend class LLUICtrlFactory; + + virtual bool addNotification(LLNotificationListItem * item); +}; + +#endif \ No newline at end of file diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp index bc8333d5fc..31ff982399 100755 --- a/indra/newview/llsyswellitem.cpp +++ b/indra/newview/llsyswellitem.cpp @@ -89,85 +89,4 @@ void LLSysWellItem::onMouseLeave(S32 x, S32 y, MASK mask) setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); } -//--------------------------------------------------------------------------------- - -//--------------------------------------------------------------------------------- -LLNotificationTabbedItem::LLNotificationTabbedItem(const Params& p) : LLPanel(p), - mTitle(NULL), - mSender(NULL), - mCloseBtn(NULL) -{ - buildFromFile( "panel_notification_tabbed_item.xml"); - - mTitle = getChild("GroupName_NoticeTitle"); - mSender = getChild("Sender_Resident"); - mTimeBox = getChild("Time_Box"); - mGroupIcon = getChild("group_icon_small"); - mCloseBtn = getChild("close_btn"); - - mTitle->setValue(p.title); - mSender->setValue("Sender: " + p.sender); - mTimeBox->setValue(buildNotificationDate(p.time_stamp)); - mGroupIcon->setValue(p.group_id); - - mCloseBtn->setClickedCallback(boost::bind(&LLNotificationTabbedItem::onClickCloseBtn,this)); - - mID = p.notification_id; -} - -//--------------------------------------------------------------------------------- -LLNotificationTabbedItem::~LLNotificationTabbedItem() -{ -} - -//--------------------------------------------------------------------------------- -//static -std::string LLNotificationTabbedItem::buildNotificationDate(const LLDate& time_stamp) -{ - std::string timeStr = "[" + LLTrans::getString("LTimeMthNum") + "]/[" - +LLTrans::getString("LTimeDay")+"]/[" - +LLTrans::getString("LTimeYear")+"] [" - +LLTrans::getString("LTimeHour")+"]:[" - +LLTrans::getString("LTimeMin")+"]"; - - LLSD substitution; - substitution["datetime"] = time_stamp; - LLStringUtil::format(timeStr, substitution); - return timeStr; -} - -//--------------------------------------------------------------------------------- -void LLNotificationTabbedItem::setTitle( std::string title ) -{ - mTitle->setValue(title); -} - -//--------------------------------------------------------------------------------- -void LLNotificationTabbedItem::onClickCloseBtn() -{ - mOnItemClose(this); -} - -//--------------------------------------------------------------------------------- -BOOL LLNotificationTabbedItem::handleMouseDown(S32 x, S32 y, MASK mask) -{ - BOOL res = LLPanel::handleMouseDown(x, y, mask); - if(!mCloseBtn->getRect().pointInRect(x, y)) - //if(!mCloseBtn->getRect().pointInRect(x, y)) - //if(!mCloseBtn->getLocalRect().pointInRect(x, y)) - mOnItemClick(this); - - return res; -} - -//--------------------------------------------------------------------------------- -void LLNotificationTabbedItem::onMouseEnter(S32 x, S32 y, MASK mask) -{ - //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemSelected" )); -} - -//--------------------------------------------------------------------------------- -void LLNotificationTabbedItem::onMouseLeave(S32 x, S32 y, MASK mask) -{ - //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); -} +//--------------------------------------------------------------------------------- \ No newline at end of file diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h index 4379b8dc22..8763caa467 100755 --- a/indra/newview/llsyswellitem.h +++ b/indra/newview/llsyswellitem.h @@ -78,58 +78,6 @@ private: LLUUID mID; }; -class LLNotificationTabbedItem : public LLPanel -{ -public: - struct Params : public LLInitParam::Block - { - LLUUID notification_id; - LLUUID group_id; - std::string title; - std::string sender; - LLDate time_stamp; - Params() {}; - }; - - - LLNotificationTabbedItem(const Params& p); - virtual ~LLNotificationTabbedItem(); - - // title - void setTitle( std::string title ); - void setGroupID(const LLUUID& group_id); - void setGroupIconID(const LLUUID& group_icon_id); - void setGroupName(const std::string& group_name); - - // get item's ID - LLUUID getID() { return mID; } - - // handlers - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual void onMouseEnter(S32 x, S32 y, MASK mask); - virtual void onMouseLeave(S32 x, S32 y, MASK mask); - - //callbacks - typedef boost::function item_callback_t; - typedef boost::signals2::signal item_signal_t; - item_signal_t mOnItemClose; - item_signal_t mOnItemClick; - boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } - boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } - -private: - static std::string buildNotificationDate(const LLDate&); - void onClickCloseBtn(); - - LLTextBox* mTitle; - LLTextBox* mSender; - LLTextBox* mTimeBox; - LLIconCtrl* mGroupIcon; - LLButton* mCloseBtn; - LLUUID mID; - LLUUID mGroupID; -}; - #endif // LL_LLSYSWELLITEM_H diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml index b627707056..6162bc99b2 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -19,9 +19,22 @@ save_visibility="true" single_instance="true" > + + System ([COUNT]) + + + Transactions ([COUNT]) + + + Invitations ([COUNT]) + + - NOTIFICATIONS TABBED + NOTIFICATIONS @@ -35,35 +48,53 @@ width="336" height="491" mouse_opaque="true" - name="NotificationsTab"> + name="notifications_tab_container"> + name="system_notification_list_tab"> + + - - - + - diff --git a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml b/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml index bc4f90858b..603a3312e0 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml @@ -2,8 +2,8 @@ + + Sender: "[SENDER_RESIDENT]" + @@ -24,16 +28,16 @@ - - Group Name:Notice Title + Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle - + - Sender.Resident + Sender:Resident diff --git a/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml new file mode 100644 index 0000000000..150225af27 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/notification_list_view.xml @@ -0,0 +1,18 @@ + + + + \ No newline at end of file -- cgit v1.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/llavatariconctrl.cpp | 1 + indra/newview/llchannelmanager.cpp | 3 +- indra/newview/llchiclet.cpp | 6 +- indra/newview/llchicletbar.cpp | 3 +- indra/newview/llfloaternotificationstabbed.cpp | 93 ++++++++----- indra/newview/llfloaternotificationstabbed.h | 29 ++-- indra/newview/llgroupiconctrl.cpp | 2 +- indra/newview/llnotificationlistitem.cpp | 152 +++++++++------------ indra/newview/llnotificationlistitem.h | 78 ++++++----- indra/newview/llnotificationlistview.cpp | 4 +- indra/newview/llnotificationlistview.h | 10 +- indra/newview/llsyswellitem.cpp | 5 +- indra/newview/llsyswellitem.h | 2 - indra/newview/llsyswellwindow.cpp | 152 --------------------- indra/newview/llsyswellwindow.h | 51 ------- indra/newview/llviewerfloaterreg.cpp | 4 +- indra/newview/llviewermessage.cpp | 1 + .../default/textures/icons/Icon_Group_Large.png | Bin 12280 -> 0 bytes .../default/textures/icons/Icon_Group_Small.png | Bin 4473 -> 0 bytes .../textures/icons/Incoming_Transaction_Large.png | Bin 4939 -> 0 bytes .../textures/icons/Incoming_Transaction_Small.png | Bin 1666 -> 0 bytes .../textures/icons/Outcoming_Transaction_Large.png | Bin 4662 -> 0 bytes .../textures/icons/Outcoming_Transaction_Small.png | Bin 1322 -> 0 bytes indra/newview/skins/default/textures/textures.xml | 16 +-- .../xui/en/floater_notifications_tabbed.xml | 50 +------ .../skins/default/xui/en/floater_sys_well.xml | 4 - .../skins/default/xui/en/language_settings.xml | 2 +- indra/newview/skins/default/xui/en/menu_login.xml | 2 +- .../xui/en/panel_notification_list_item.xml | 37 ++--- 29 files changed, 214 insertions(+), 493 deletions(-) delete mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Large.png delete mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Small.png delete mode 100644 indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png delete mode 100644 indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png delete mode 100644 indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png delete mode 100644 indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png (limited to 'indra/newview/llchiclet.cpp') diff --git a/indra/newview/llavatariconctrl.cpp b/indra/newview/llavatariconctrl.cpp index 746b541f9d..d7c959ccd6 100755 --- a/indra/newview/llavatariconctrl.cpp +++ b/indra/newview/llavatariconctrl.cpp @@ -311,6 +311,7 @@ bool LLAvatarIconCtrl::updateFromCache() else { LLIconCtrl::setValue(mDefaultIconName); + return false; } return true; diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 49a71b0018..d6240838b6 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -132,8 +132,7 @@ void LLChannelManager::onLoginCompleted() S32 channel_right_bound = gViewerWindow->getWorldViewRectScaled().mRight - gSavedSettings.getS32("NotificationChannelRightMargin"); S32 channel_width = gSavedSettings.getS32("NotifyBoxWidth"); mStartUpChannel->init(channel_right_bound - channel_width, channel_right_bound); - //mStartUpChannel->setMouseDownCallback(boost::bind(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::getInstance(), _2, _3, _4)); - mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); + mStartUpChannel->setMouseDownCallback(boost::bind(&LLFloaterNotificationsTabbed::onStartUpToastClick, LLFloaterNotificationsTabbed::getInstance(), _2, _3, _4)); mStartUpChannel->setCommitCallback(boost::bind(&LLChannelManager::onStartUpToastClose, this)); mStartUpChannel->createStartUpToast(away_notifications, gSavedSettings.getS32("StartUpToastLifeTime")); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 33cb0551b4..ce8878b849 100755 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -166,8 +166,7 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) mNotificationChannel.reset(new ChicletNotificationChannel(this)); // ensure that notification well window exists, to synchronously // handle toast add/delete events. - //LLNotificationWellWindow::getInstance()->setSysWellChiclet(this); - LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); + LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this); } void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) @@ -175,8 +174,7 @@ void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data) std::string action = user_data.asString(); if("close all" == action) { - //LLNotificationWellWindow::getInstance()->closeAll(); - LLFloaterNotificationsTabbed::getInstance()->closeAll(); + LLFloaterNotificationsTabbed::getInstance()->closeAll(); LLIMWellWindow::getInstance()->closeAll(); } } diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 45510d0824..8d1a8c58f3 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -60,8 +60,7 @@ BOOL LLChicletBar::postBuild() mToolbarStack = getChild("toolbar_stack"); mChicletPanel = getChild("chiclet_list"); - //showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); - showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); + showWellButton("notification_well", !LLFloaterNotificationsTabbed::getInstance()->isWindowEmpty()); LLPanelTopInfoBar::instance().setResizeCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); LLPanelTopInfoBar::instance().setVisibleCallback(boost::bind(&LLChicletBar::fitWithTopInfoBar, this)); 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() {} diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 36eee2f866..5191b783f6 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -2,9 +2,9 @@ * @file llfloaternotificationstabbed.h * @brief * - * $LicenseInfo:firstyear=2003&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 @@ -68,11 +68,11 @@ private: class LLFloaterNotificationsTabbed : public LLTransientDockableFloater { public: - LOG_CLASS(LLFloaterNotificationsTabbed); + LOG_CLASS(LLFloaterNotificationsTabbed); LLFloaterNotificationsTabbed(const LLSD& key); virtual ~LLFloaterNotificationsTabbed(); - BOOL postBuild(); + BOOL postBuild(); // other interface functions // check is window empty @@ -86,12 +86,11 @@ public: // Operating with outfit virtual void setVisible(BOOL visible); - void adjustWindowPosition();//not used - ? - /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); + /*virtual*/ void setDocked(bool docked, bool pop_on_undock = true); // override LLFloater's minimization according to EXT-1216 - /*virtual*/ void setMinimized(BOOL minimize); - /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); + /*virtual*/ void setMinimized(BOOL minimize); + /*virtual*/ void handleReshape(const LLRect& rect, bool by_user); void onStartUpToastClick(S32 x, S32 y, MASK mask); /*virtual*/ void onAdd(LLNotificationPtr notify); @@ -102,8 +101,8 @@ public: static LLFloaterNotificationsTabbed* getInstance(const LLSD& key = LLSD()); // size constants for the window and for its elements - static const S32 MAX_WINDOW_HEIGHT = 200; - static const S32 MIN_WINDOW_WIDTH = 318; + static const S32 MAX_WINDOW_HEIGHT = 200; + static const S32 MIN_WINDOW_WIDTH = 318; private: // init Window's channel @@ -119,9 +118,9 @@ private: LLNotificationsUI::LLScreenChannel* mChannel; /** - * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 - */ - LLSysWellChiclet* mSysWellChiclet; + * Reference to an appropriate Well chiclet to release "new message" state. EXT-3147 + */ + LLSysWellChiclet* mSysWellChiclet; bool mIsReshapedByUser; @@ -144,12 +143,15 @@ private: void clearScreenChannels(); // Operating with items void addItem(LLNotificationListItem::Params p); + void getAllItemsOnCurrentTab(std::vector& items) const; // Closes all notifications and removes them from the Notification Well void closeAllOnCurrentTab(); + void collapseAllOnCurrentTab(); void onStoreToast(LLPanel* info_panel, LLUUID id); void onClickDeleteAllBtn(); + void onClickCollapseAllBtn(); // Handlers void onItemClick(LLNotificationListItem* item); void onItemClose(LLNotificationListItem* item); @@ -162,6 +164,7 @@ private: LLNotificationSeparator* mNotificationsSeparator; LLTabContainer* mNotificationsTabContainer; LLButton* mDeleteAllBtn; + LLButton* mCollapseAllBtn; }; #endif // LL_FLOATERNOTIFICATIONSTABBED_H diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 26680e1ea5..6abf9ea637 100755 --- a/indra/newview/llgroupiconctrl.cpp +++ b/indra/newview/llgroupiconctrl.cpp @@ -52,7 +52,7 @@ LLGroupIconCtrl::LLGroupIconCtrl(const LLGroupIconCtrl::Params& p) { LLSD value(p.group_id); setValue(value); - } + } else { LLIconCtrl::setValue(mDefaultIconName); diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index f280dc0ed3..4c4dd07d7f 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -1,8 +1,8 @@ /** * @file llnotificationlistitem.cpp - * @brief // TODO + * @brief * - * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2015, Linden Research, Inc. * @@ -109,37 +109,18 @@ std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_sta return timeStr; } -//--------------------------------------------------------------------------------- -//void LLNotificationTabbedItem::setTitle( std::string title ) -//{ -// mTitleBox->setValue(title); -//} - void LLNotificationListItem::onClickCloseBtn() { mOnItemClose(this); } -BOOL LLNotificationListItem::handleMouseDown(S32 x, S32 y, MASK mask) +BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) { - BOOL res = LLPanel::handleMouseDown(x, y, mask); - //if(!mCloseBtn->getRect().pointInRect(x, y)) - //if(!mCloseBtn->getLocalRect().pointInRect(x, y)) - //mOnItemClick(this); - + BOOL res = LLPanel::handleMouseUp(x, y, mask); + mOnItemClick(this); return res; } -void LLNotificationListItem::onMouseEnter(S32 x, S32 y, MASK mask) -{ - //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemSelected" )); -} - -void LLNotificationListItem::onMouseLeave(S32 x, S32 y, MASK mask) -{ - //setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); -} - //static LLNotificationListItem* LLNotificationListItem::create(const Params& p) { @@ -176,23 +157,18 @@ void LLNotificationListItem::onClickCondenseBtn() setExpanded(FALSE); } -void setPanelSize(LLView* panel, S32 width, S32 height, BOOL called_from_parent) -{ - LLRect rect = panel->getRect(); - panel->reshape(width, height, called_from_parent); -} - void LLNotificationListItem::setExpanded(BOOL value) { mCondensedViewPanel->setVisible(!value); mExpandedViewPanel->setVisible(value); + S32 width = this->getRect().getWidth(); if (value) { - setPanelSize(this, 331, mExpandedHeight, FALSE); + this->reshape(width, mExpandedHeight, FALSE); } - else + else { - setPanelSize(this, 331, mCondensedHeight, FALSE); + this->reshape(width, mCondensedHeight, FALSE); } } @@ -211,31 +187,11 @@ std::set LLTransactionNotificationListItem::getTypes() return types; } -std::set LLSystemNotificationListItem::getTypes() -{ - std::set types; - //types.insert("AddPrimitiveFailure"); - //types.insert("AddToNavMeshNoCopy"); - //types.insert("AssetServerTimeoutObjReturn"); - //types.insert("AvatarEjected"); - //types.insert("AutoUnmuteByIM"); - //types.insert("AutoUnmuteByInventory"); - //types.insert("AutoUnmuteByMoney"); - //types.insert("BuyInventoryFailedNoMoney"); - //types.insert("DeactivatedGesturesTrigger"); - //types.insert("DeedFailedNoPermToDeedForGroup"); - //types.insert("WhyAreYouTryingToWearShrubbery"); - //types.insert("YouDiedAndGotTPHome"); - //types.insert("YouFrozeAvatar"); - //types.insert("OfferCallingCard"); - return types; -} - LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) - : LLNotificationListItem(p), - mSenderBox(NULL) + : LLNotificationListItem(p), + mSenderBox(NULL) { - buildFromFile("panel_notification_list_item.xml"); + buildFromFile("panel_notification_list_item.xml"); } BOOL LLInviteNotificationListItem::postBuild() @@ -256,19 +212,8 @@ BOOL LLInviteNotificationListItem::postBuild() mSenderBox = getChild("sender_resident"); mSenderBoxExp = getChild("sender_resident_exp"); - if (!mParams.sender.empty()) - { - LLStringUtil::format_map_t string_args; - string_args["[SENDER_RESIDENT]"] = llformat("%s", mParams.sender.c_str()); - std::string sender_text = getString("sender_resident_text", string_args); - mSenderBox->setValue(sender_text); - mSenderBox->setVisible(TRUE); - mSenderBoxExp->setValue(sender_text); - mSenderBoxExp->setVisible(TRUE); - } else { - mSenderBox->setVisible(FALSE); - mSenderBoxExp->setVisible(FALSE); - } + + setSender(mParams.sender); LLSD value(mParams.group_id); setGroupId(value); @@ -288,18 +233,7 @@ bool LLInviteNotificationListItem::updateFromCache() { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mGroupId); if (!group_data) return false; - if (!group_data->mName.empty()) - { - LLStringUtil::format_map_t string_args; - string_args["[GROUP_NAME]"] = llformat("%s", group_data->mName.c_str()); - std::string group_name = getString("group_name_text", string_args); - mGroupNameBoxExp->setValue(group_name); - mGroupNameBoxExp->setVisible(TRUE); - } - else - { - mGroupNameBoxExp->setValue(LLStringUtil::null); - } + setGroupName(group_data->mName); return true; } @@ -311,7 +245,7 @@ void LLInviteNotificationListItem::setGroupId(const LLUUID& value) gm->removeObserver(this); } - mID = mGroupId; // set LLGroupMgrObserver::mID to make callbacks work + mID = mGroupId; // Check if cache already contains image_id for that group if (!updateFromCache()) @@ -321,9 +255,45 @@ void LLInviteNotificationListItem::setGroupId(const LLUUID& value) } } +void LLInviteNotificationListItem::setGroupName(std::string name) +{ + if (!name.empty()) + { + LLStringUtil::format_map_t string_args; + string_args["[GROUP_NAME]"] = llformat("%s", name.c_str()); + std::string group_box_str = getString("group_name_text", string_args); + mGroupNameBoxExp->setValue(group_box_str); + mGroupNameBoxExp->setVisible(TRUE); + } + else + { + mGroupNameBoxExp->setValue(LLStringUtil::null); + mGroupNameBoxExp->setVisible(FALSE); + } +} + +void LLInviteNotificationListItem::setSender(std::string sender) +{ + if (!sender.empty()) + { + LLStringUtil::format_map_t string_args; + string_args["[SENDER_RESIDENT]"] = llformat("%s", sender.c_str()); + std::string sender_text = getString("sender_resident_text", string_args); + mSenderBox->setValue(sender_text); + mSenderBox->setVisible(TRUE); + mSenderBoxExp->setValue(sender_text); + mSenderBoxExp->setVisible(TRUE); + } else { + mSenderBox->setValue(LLStringUtil::null); + mSenderBoxExp->setValue(LLStringUtil::null); + mSenderBox->setVisible(FALSE); + mSenderBoxExp->setVisible(FALSE); + } +} + LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) : LLNotificationListItem(p), - mTransactionIcon(NULL) + mAvatarIcon(NULL) { buildFromFile("panel_notification_list_item.xml"); } @@ -331,20 +301,20 @@ LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Param BOOL LLTransactionNotificationListItem::postBuild() { BOOL rv = LLNotificationListItem::postBuild(); + mAvatarIcon = getChild("avatar_icon"); + mAvatarIconExp = getChild("avatar_icon_exp"); if (mParams.notification_name == "PaymentReceived") { - mTransactionIcon = getChild("incoming_transaction_icon"); - mTransactionIconExp = getChild("incoming_transaction_icon_exp"); + mAvatarIcon->setValue(mParams.paid_from_id); + mAvatarIconExp->setValue(mParams.paid_from_id); } else if (mParams.notification_name == "PaymentSent") { - mTransactionIcon = getChild("outcoming_transaction_icon"); - mTransactionIconExp = getChild("outcoming_transaction_icon_exp"); + mAvatarIcon->setValue(mParams.paid_to_id); + mAvatarIconExp->setValue(mParams.paid_to_id); } - if(mTransactionIcon) - mTransactionIcon->setVisible(TRUE); - if(mTransactionIconExp) - mTransactionIconExp->setVisible(TRUE); + mAvatarIcon->setVisible(TRUE); + mAvatarIconExp->setVisible(TRUE); return rv; } diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index f5cd9422b5..22003a3a6a 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -1,8 +1,8 @@ /** * @file llnotificationlistitem.h - * @brief // TODO + * @brief * - * $LicenseInfo:firstyear=2003&license=viewerlgpl$ + * $LicenseInfo:firstyear=2015&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2015, Linden Research, Inc. * @@ -32,6 +32,7 @@ #include "lltextbox.h" #include "llbutton.h" #include "llgroupiconctrl.h" +#include "llavatariconctrl.h" #include "llgroupmgr.h" @@ -40,13 +41,15 @@ class LLNotificationListItem : public LLPanel { public: - struct Params : public LLInitParam::Block + struct Params : public LLInitParam::Block { - LLUUID notification_id; + LLUUID notification_id; LLUUID group_id; - std::string notification_name; - std::string title; - std::string sender; + LLUUID paid_from_id; + LLUUID paid_to_id; + std::string notification_name; + std::string title; + std::string sender; LLDate time_stamp; Params() {}; }; @@ -65,44 +68,41 @@ public: std::string& getNotificationName() { return mNotificationName; } // handlers - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual void onMouseEnter(S32 x, S32 y, MASK mask); - virtual void onMouseLeave(S32 x, S32 y, MASK mask); + virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); //callbacks typedef boost::function item_callback_t; typedef boost::signals2::signal item_signal_t; - item_signal_t mOnItemClose; - item_signal_t mOnItemClick; + item_signal_t mOnItemClose; + item_signal_t mOnItemClick; boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } - + + void setExpanded(BOOL value); virtual BOOL postBuild(); protected: LLNotificationListItem(const Params& p); - virtual ~LLNotificationListItem(); + virtual ~LLNotificationListItem(); static std::string buildNotificationDate(const LLDate&); - void setExpanded(BOOL value); - void onClickExpandBtn(); - void onClickCondenseBtn(); + void onClickExpandBtn(); + void onClickCondenseBtn(); void onClickCloseBtn(); Params mParams; - LLTextBox* mTitleBox; - LLTextBox* mTitleBoxExp; - LLTextBox* mNoticeTextExp; + LLTextBox* mTitleBox; + LLTextBox* mTitleBoxExp; + LLTextBox* mNoticeTextExp; LLTextBox* mTimeBox; LLTextBox* mTimeBoxExp; - LLButton* mExpandBtn; - LLButton* mCondenseBtn; - LLButton* mCloseBtn; - LLButton* mCloseBtnExp; + LLButton* mExpandBtn; + LLButton* mCondenseBtn; + LLButton* mCloseBtn; + LLButton* mCloseBtnExp; LLLayoutStack* mVerticalStack; LLPanel* mCondensedViewPanel; - LLPanel* mExpandedViewPanel; + LLPanel* mExpandedViewPanel; LLPanel* mMainPanel; - //LLUUID mID; std::string mTitle; std::string mNotificationName; S32 mCondensedHeight; @@ -113,11 +113,7 @@ class LLInviteNotificationListItem : public LLNotificationListItem, public LLGroupMgrObserver { public: - //void setGroupID(const LLUUID& group_id); - //void setGroupIconID(const LLUUID& group_icon_id); - //void setGroupName(const std::string& group_name); static std::set getTypes(); - virtual BOOL postBuild(); void setGroupId(const LLUUID& value); @@ -129,41 +125,43 @@ private: LLInviteNotificationListItem(const LLInviteNotificationListItem &); LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); + void setSender(std::string sender); + void setGroupName(std::string name); + bool updateFromCache(); LLGroupIconCtrl* mGroupIcon; LLGroupIconCtrl* mGroupIconExp; - LLUUID mGroupId; - LLTextBox* mSenderBox; - LLTextBox* mSenderBoxExp; - LLTextBox* mGroupNameBoxExp; + LLUUID mGroupId; + LLTextBox* mSenderBox; + LLTextBox* mSenderBoxExp; + LLTextBox* mGroupNameBoxExp; }; class LLTransactionNotificationListItem : public LLNotificationListItem { public: static std::set getTypes(); - virtual BOOL postBuild(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); - LLIconCtrl* mTransactionIcon; - LLIconCtrl* mTransactionIconExp; + LLAvatarIconCtrl* mAvatarIcon; + LLAvatarIconCtrl* mAvatarIconExp; }; class LLSystemNotificationListItem : public LLNotificationListItem { public: - static std::set getTypes(); - virtual BOOL postBuild(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); LLSystemNotificationListItem(const LLSystemNotificationListItem &); LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); - LLIconCtrl* mSystemNotificationIcon; + LLIconCtrl* mSystemNotificationIcon; LLIconCtrl* mSystemNotificationIconExp; }; diff --git a/indra/newview/llnotificationlistview.cpp b/indra/newview/llnotificationlistview.cpp index 8690f185e9..9dce68c9c6 100644 --- a/indra/newview/llnotificationlistview.cpp +++ b/indra/newview/llnotificationlistview.cpp @@ -2,9 +2,9 @@ * @file llnotificationlistview.cpp * @brief * - * $LicenseInfo:firstyear=2009&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 diff --git a/indra/newview/llnotificationlistview.h b/indra/newview/llnotificationlistview.h index 9329826faf..307ad87789 100644 --- a/indra/newview/llnotificationlistview.h +++ b/indra/newview/llnotificationlistview.h @@ -1,10 +1,10 @@ /** - * @file llflatlistview.h - * @brief LLFlatListView base class and extension to support messages for several cases of an empty list. + * @file llnotificationlistview.h + * @brief LLNotificationListView class to support notifications list contained in enclosing floater. * - * $LicenseInfo:firstyear=2009&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 @@ -46,4 +46,4 @@ public: virtual bool addNotification(LLNotificationListItem * item); }; -#endif \ No newline at end of file +#endif diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp index 31ff982399..057d80457c 100755 --- a/indra/newview/llsyswellitem.cpp +++ b/indra/newview/llsyswellitem.cpp @@ -31,7 +31,6 @@ #include "llwindow.h" #include "v4color.h" -#include "lltrans.h" #include "lluicolortable.h" //--------------------------------------------------------------------------------- @@ -89,4 +88,6 @@ void LLSysWellItem::onMouseLeave(S32 x, S32 y, MASK mask) setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); } -//--------------------------------------------------------------------------------- \ No newline at end of file +//--------------------------------------------------------------------------------- + + diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h index 8763caa467..d961708a01 100755 --- a/indra/newview/llsyswellitem.h +++ b/indra/newview/llsyswellitem.h @@ -32,8 +32,6 @@ #include "llbutton.h" #include "lliconctrl.h" -#include "llgroupmgr.h" - #include class LLSysWellItem : public LLPanel diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 8babb874f8..8f64cff47c 100755 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -295,158 +295,6 @@ BOOL LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mas return mChiclet->handleRightMouseDown(x, y, mask); } -/************************************************************************/ -/* LLNotificationWellWindow implementation */ -/************************************************************************/ - -////////////////////////////////////////////////////////////////////////// -// PUBLIC METHODS -LLNotificationWellWindow::WellNotificationChannel::WellNotificationChannel(LLNotificationWellWindow* well_window) -: LLNotificationChannel(LLNotificationChannel::Params().name(well_window->getPathname())), - mWellWindow(well_window) -{ - connectToChannel("Notifications"); - connectToChannel("Group Notifications"); - connectToChannel("Offer"); -} - -LLNotificationWellWindow::LLNotificationWellWindow(const LLSD& key) -: LLSysWellWindow(key) -{ - mNotificationUpdates.reset(new WellNotificationChannel(this)); -} - -// static -LLNotificationWellWindow* LLNotificationWellWindow::getInstance(const LLSD& key /*= LLSD()*/) -{ - return LLFloaterReg::getTypedInstance("notification_well_window", key); -} - -// virtual -BOOL LLNotificationWellWindow::postBuild() -{ - BOOL rv = LLSysWellWindow::postBuild(); - setTitle(getString("title_notification_well_window")); - return rv; -} - -// virtual -void LLNotificationWellWindow::setVisible(BOOL visible) -{ - if (visible) - { - // when Notification channel is cleared, storable toasts will be added into the list. - clearScreenChannels(); - } - - LLSysWellWindow::setVisible(visible); -} - -//--------------------------------------------------------------------------------- -void LLNotificationWellWindow::addItem(LLSysWellItem::Params p) -{ - LLSD value = p.notification_id; - // do not add clones - if( mMessageList->getItemByValue(value)) - return; - - LLSysWellItem* new_item = new LLSysWellItem(p); - if (mMessageList->addItem(new_item, value, ADD_TOP)) - { - mSysWellChiclet->updateWidget(isWindowEmpty()); - reshapeWindow(); - new_item->setOnItemCloseCallback(boost::bind(&LLNotificationWellWindow::onItemClose, this, _1)); - new_item->setOnItemClickCallback(boost::bind(&LLNotificationWellWindow::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 LLNotificationWellWindow::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) - { - LLSysWellItem* sys_well_item = dynamic_cast(*iter); - if (sys_well_item) - onItemClose(sys_well_item); - } -} - -////////////////////////////////////////////////////////////////////////// -// PRIVATE METHODS -void LLNotificationWellWindow::initChannel() -{ - LLSysWellWindow::initChannel(); - if(mChannel) - { - mChannel->addOnStoreToastCallback(boost::bind(&LLNotificationWellWindow::onStoreToast, this, _1, _2)); - } -} - -void LLNotificationWellWindow::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 LLNotificationWellWindow::onStoreToast(LLPanel* info_panel, LLUUID id) -{ - LLSysWellItem::Params p; - p.notification_id = id; - p.title = static_cast(info_panel)->getTitle(); - addItem(p); -} - -void LLNotificationWellWindow::onItemClick(LLSysWellItem* item) -{ - LLUUID id = item->getID(); - LLFloaterReg::showInstance("inspect_toast", id); -} - -void LLNotificationWellWindow::onItemClose(LLSysWellItem* 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 LLNotificationWellWindow::onAdd( LLNotificationPtr notify ) -{ - removeItemByID(notify->getID()); -} - /************************************************************************/ /* LLIMWellWindow implementation */ /************************************************************************/ diff --git a/indra/newview/llsyswellwindow.h b/indra/newview/llsyswellwindow.h index 71b41476f5..d02293e6ff 100755 --- a/indra/newview/llsyswellwindow.h +++ b/indra/newview/llsyswellwindow.h @@ -95,57 +95,6 @@ protected: bool mIsReshapedByUser; }; -/** - * Class intended to manage incoming notifications. - * - * It contains a list of notifications that have not been responded to. - */ -class LLNotificationWellWindow : public LLSysWellWindow -{ -public: - LLNotificationWellWindow(const LLSD& key); - static LLNotificationWellWindow* getInstance(const LLSD& key = LLSD()); - - /*virtual*/ BOOL postBuild(); - /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ void onAdd(LLNotificationPtr notify); - // Operating with items - void addItem(LLSysWellItem::Params p); - - // Closes all notifications and removes them from the Notification Well - void closeAll(); - -protected: - struct WellNotificationChannel : public LLNotificationChannel - { - WellNotificationChannel(LLNotificationWellWindow*); - void onDelete(LLNotificationPtr notify) - { - mWellWindow->removeItemByID(notify->getID()); - } - - LLNotificationWellWindow* mWellWindow; - }; - - LLNotificationChannelPtr mNotificationUpdates; - /*virtual*/ const std::string& getAnchorViewName() { return NOTIFICATION_WELL_ANCHOR_NAME; } - -private: - // init Window's channel - void initChannel(); - void clearScreenChannels(); - - void onStoreToast(LLPanel* info_panel, LLUUID id); - - // Handlers - void onItemClick(LLSysWellItem* item); - void onItemClose(LLSysWellItem* item); - - // ID of a toast loaded by user (by clicking notification well item) - LLUUID mLoadedToastId; - -}; - /** * Class intended to manage incoming messages in IM chats. * diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index d20b8e342a..a197c1fe1a 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -257,9 +257,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - //LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - //LLFloaterReg::add("notifications_tabbed", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 44eb4361f1..6507794cdd 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5622,6 +5622,7 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) } } final_args["MESSAGE"] = message; + payload["dest_id"] = dest_id; notification = success ? "PaymentSent" : "PaymentFailure"; } else { diff --git a/indra/newview/skins/default/textures/icons/Icon_Group_Large.png b/indra/newview/skins/default/textures/icons/Icon_Group_Large.png deleted file mode 100644 index 6dc0cbda0b..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Icon_Group_Large.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Group_Small.png b/indra/newview/skins/default/textures/icons/Icon_Group_Small.png deleted file mode 100644 index ef2b521a1f..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Icon_Group_Small.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png deleted file mode 100644 index e73dfe2695..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png deleted file mode 100644 index 8b39770c63..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png deleted file mode 100644 index 79011edd8b..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png deleted file mode 100644 index 96c6150f3b..0000000000 Binary files a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png and /dev/null differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index eef7d56e75..e47e0c03f1 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -795,17 +795,7 @@ with the same filename but different name - - - - - - - - - - - - - + + + diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml index 6162bc99b2..55ecfb637b 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -81,7 +81,7 @@ left="0" top="5" height="0" - width="330"/> + width="328"/> + width="328"/> - @@ -118,48 +118,4 @@ - - - - diff --git a/indra/newview/skins/default/xui/en/floater_sys_well.xml b/indra/newview/skins/default/xui/en/floater_sys_well.xml index ecedb27438..2c5176cf01 100755 --- a/indra/newview/skins/default/xui/en/floater_sys_well.xml +++ b/indra/newview/skins/default/xui/en/floater_sys_well.xml @@ -23,10 +23,6 @@ name="title_im_well_window"> CONVERSATIONS - - NOTIFICATIONS - second,datetime,local hour,datetime,local min,datetime,local - year,datetime,local + year,datetime,local weekday,datetime,utc day,datetime,utc diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 0d9612990d..e91eea04d1 100755 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -303,7 +303,7 @@ - - - + + - Group Name:Notice Title N o t i c e T i t l e N o t i c e T i t l e N o t i c e T i t l e N oticeTitle - - - Sender:Resident + + Sender: "Resident R e s i d e n t R e s i d e n t" @@ -76,19 +74,17 @@ - - - - - - + + + + - Notice Title Notice Title N o t i c e T i t l e + Notice Title Notice Title N o t i c e T i t l e N o t i c e T i t l e @@ -96,27 +92,20 @@ - Sender: "Resident R e s i d e n t R e s i d e n t" - Notice text goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla . - - - Attachment goes here b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a b l a bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla. bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla . - - -- cgit v1.3