From e5d6a14f05f857ecbbbd9b464db3ece82d1d099f Mon Sep 17 00:00:00 2001 From: pavelk_productengine <none@none> 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/CMakeLists.txt | 2 + indra/newview/llchannelmanager.cpp | 4 +- indra/newview/llchiclet.cpp | 10 +- indra/newview/llchicletbar.cpp | 4 +- indra/newview/llfloaternotificationstabbed.cpp | 377 +++++++++++++++++++++ indra/newview/llfloaternotificationstabbed.h | 143 ++++++++ indra/newview/llsyswellitem.cpp | 80 +++++ indra/newview/llsyswellitem.h | 54 +++ indra/newview/llviewerfloaterreg.cpp | 6 +- .../textures/icons/Icon_Attachment_Large.png | Bin 0 -> 4182 bytes .../textures/icons/Icon_Attachment_Small.png | Bin 0 -> 3774 bytes .../default/textures/icons/Icon_Group_Large.png | Bin 0 -> 12280 bytes .../default/textures/icons/Icon_Group_Small.png | Bin 0 -> 4473 bytes .../textures/icons/Icon_Notification_Condense.png | Bin 0 -> 262 bytes .../textures/icons/Icon_Notification_Expand.png | Bin 0 -> 239 bytes indra/newview/skins/default/textures/textures.xml | 7 + .../xui/en/floater_notifications_tabbed.xml | 134 ++++++++ .../skins/default/xui/en/language_settings.xml | 2 +- indra/newview/skins/default/xui/en/menu_login.xml | 2 +- .../xui/en/panel_notification_tabbed_item.xml | 53 +++ 20 files changed, 870 insertions(+), 8 deletions(-) create mode 100644 indra/newview/llfloaternotificationstabbed.cpp create mode 100644 indra/newview/llfloaternotificationstabbed.h create mode 100644 indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Large.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Group_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png create mode 100644 indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png create mode 100644 indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml create mode 100644 indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index e8f4144e70..b17811d644 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -262,6 +262,7 @@ set(viewer_SOURCE_FILES llfloatermodeluploadbase.cpp llfloaternamedesc.cpp llfloaternotificationsconsole.cpp + llfloaternotificationstabbed.cpp llfloaterobjectweights.cpp llfloateropenobject.cpp llfloateroutbox.cpp @@ -870,6 +871,7 @@ set(viewer_HEADER_FILES llfloatermodeluploadbase.h llfloaternamedesc.h llfloaternotificationsconsole.h + llfloaternotificationstabbed.h llfloaterobjectweights.h llfloateropenobject.h llfloateroutbox.h diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index b0537a83f1..49a71b0018 100755 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -35,6 +35,7 @@ #include "llviewerwindow.h" #include "llrootview.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" #include "llfloaterreg.h" #include <algorithm> @@ -131,7 +132,8 @@ 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(&LLNotificationWellWindow::onStartUpToastClick, LLNotificationWellWindow::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 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<LLChicletPanel> t1("chiclet_panel"); static LLDefaultChildRegistry::Register<LLNotificationChiclet> 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; diff --git a/indra/newview/llchicletbar.cpp b/indra/newview/llchicletbar.cpp index 28e367fbe1..45510d0824 100755 --- a/indra/newview/llchicletbar.cpp +++ b/indra/newview/llchicletbar.cpp @@ -31,6 +31,7 @@ #include "lllayoutstack.h" #include "llpaneltopinfobar.h" #include "llsyswellwindow.h" +#include "llfloaternotificationstabbed.h" namespace { @@ -59,7 +60,8 @@ BOOL LLChicletBar::postBuild() mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mChicletPanel = getChild<LLChicletPanel>("chiclet_list"); - showWellButton("notification_well", !LLNotificationWellWindow::getInstance()->isWindowEmpty()); + //showWellButton("notification_well", !LLNotificationWellWindow::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 new file mode 100644 index 0000000000..09f0a0ed5e --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -0,0 +1,377 @@ +/** + * @file llfloaternotificationstabbed.cpp + * @brief // TODO + * $LicenseInfo:firstyear=2000&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" // must be first include +#include "llfloaternotificationstabbed.h" + +#include "llchiclet.h" +#include "llchicletbar.h" +#include "llflatlistview.h" +#include "llfloaterreg.h" +#include "llnotificationmanager.h" +#include "llnotificationsutil.h" +#include "llscriptfloater.h" +#include "llspeakers.h" +#include "lltoastpanel.h" +#include "lltoastnotifypanel.h" + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), + mChannel(NULL), + mMessageList(NULL), + mSysWellChiclet(NULL), + NOTIFICATION_TABBED_ANCHOR_NAME("notification_well_panel"), + IM_WELL_ANCHOR_NAME("im_well_panel"), + mIsReshapedByUser(false) + +{ + setOverlapsScreenChannel(true); + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} + +//--------------------------------------------------------------------------------- +BOOL LLFloaterNotificationsTabbed::postBuild() +{ + mMessageList = getChild<LLFlatListView>("notification_list"); + + // get a corresponding channel + initChannel(); + BOOL rv = LLTransientDockableFloater::postBuild(); + + //LLNotificationWellWindow::postBuild() + //-------------------------- + setTitle(getString("title_notification_tabbed_window")); + return rv; +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setMinimized(BOOL minimize) +{ + LLTransientDockableFloater::setMinimized(minimize); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::handleReshape(const LLRect& rect, bool by_user) +{ + mIsReshapedByUser |= by_user; // mark floater that it is reshaped by user + LLTransientDockableFloater::handleReshape(rect, by_user); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStartUpToastClick(S32 x, S32 y, MASK mask) +{ + // just set floater visible. Screen channels will be cleared. + setVisible(TRUE); +} + +void LLFloaterNotificationsTabbed::setSysWellChiclet(LLSysWellChiclet* chiclet) +{ + mSysWellChiclet = chiclet; + if(NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } +} + +//--------------------------------------------------------------------------------- +LLFloaterNotificationsTabbed::~LLFloaterNotificationsTabbed() +{ +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::removeItemByID(const LLUUID& id) +{ + if(mMessageList->removeItemByValue(id)) + { + if (NULL != mSysWellChiclet) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + } + reshapeWindow(); + } + else + { + LL_WARNS() << "Unable to remove notification from the list, ID: " << id + << LL_ENDL; + } + + // hide chiclet window if there are no items left + if(isWindowEmpty()) + { + setVisible(FALSE); + } +} + +//--------------------------------------------------------------------------------- +LLPanel * LLFloaterNotificationsTabbed::findItemByID(const LLUUID& id) +{ + return mMessageList->getItemByValue(id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::initChannel() +{ + LLNotificationsUI::LLScreenChannelBase* channel = LLNotificationsUI::LLChannelManager::getInstance()->findChannelByID( + LLUUID(gSavedSettings.getString("NotificationChannelUUID"))); + mChannel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>(channel); + if(NULL == mChannel) + { + LL_WARNS() << "LLSysWellWindow::initChannel() - could not get a requested screen channel" << LL_ENDL; + } + + //LLSysWellWindow::initChannel(); + //--------------------------------------------------------------------------------- + if(mChannel) + { + mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setVisible(BOOL visible) +{ + //LLNotificationWellWindow::setVisible + //-------------------------- + if (visible) + { + // when Notification channel is cleared, storable toasts will be added into the list. + clearScreenChannels(); + } + //-------------------------- + if (visible) + { + if (NULL == getDockControl() && getDockTongue().notNull()) + { + setDockControl(new LLDockControl( + LLChicletBar::getInstance()->getChild<LLView>(getAnchorViewName()), this, + getDockTongue(), LLDockControl::BOTTOM)); + } + } + + // do not show empty window + if (NULL == mMessageList || isWindowEmpty()) visible = FALSE; + + LLTransientDockableFloater::setVisible(visible); + + // update notification channel state + initChannel(); // make sure the channel still exists + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::setDocked(bool docked, bool pop_on_undock) +{ + LLTransientDockableFloater::setDocked(docked, pop_on_undock); + + // update notification channel state + if(mChannel) + { + mChannel->updateShowToastsState(); + mChannel->redrawToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::reshapeWindow() +{ + // save difference between floater height and the list height to take it into account while calculating new window height + // it includes height from floater top to list top and from floater bottom and list bottom + static S32 parent_list_delta_height = getRect().getHeight() - mMessageList->getRect().getHeight(); + + if (!mIsReshapedByUser) // Don't reshape Well window, if it ever was reshaped by user. See EXT-5715. + { + S32 notif_list_height = mMessageList->getItemsRect().getHeight() + 2 * mMessageList->getBorderWidth(); + + LLRect curRect = getRect(); + + S32 new_window_height = notif_list_height + parent_list_delta_height; + + if (new_window_height > MAX_WINDOW_HEIGHT) + { + new_window_height = MAX_WINDOW_HEIGHT; + } + S32 newWidth = curRect.getWidth() < MIN_WINDOW_WIDTH ? MIN_WINDOW_WIDTH : curRect.getWidth(); + + curRect.setLeftTopAndSize(curRect.mLeft, curRect.mTop, newWidth, new_window_height); + reshape(curRect.getWidth(), curRect.getHeight(), TRUE); + setRect(curRect); + } + + // update notification channel state + // update on a window reshape is important only when a window is visible and docked + if(mChannel && getVisible() && isDocked()) + { + mChannel->updateShowToastsState(); + } +} + +//--------------------------------------------------------------------------------- +bool LLFloaterNotificationsTabbed::isWindowEmpty() +{ + return mMessageList->size() == 0; +} + +LLFloaterNotificationsTabbed::NotificationTabbedChannel::NotificationTabbedChannel(LLFloaterNotificationsTabbed* notifications_tabbed_window) + : LLNotificationChannel(LLNotificationChannel::Params().name(notifications_tabbed_window->getPathname())), + mNotificationsTabbedWindow(notifications_tabbed_window) +{ + connectToChannel("Notifications"); + connectToChannel("Group Notifications"); + connectToChannel("Offer"); +} + +/* +LLFloaterNotificationsTabbed::LLNotificationWellWindow(const LLSD& key) + : LLSysWellWindow(key) +{ + mNotificationUpdates.reset(new NotificationTabbedChannel(this)); +} +*/ + +// static +LLFloaterNotificationsTabbed* LLFloaterNotificationsTabbed::getInstance(const LLSD& key /*= LLSD()*/) +{ + return LLFloaterReg::getTypedInstance<LLFloaterNotificationsTabbed>("notification_well_window", key); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::addItem(LLNotificationTabbedItem::Params p) +{ + LLSD value = p.notification_id; + // do not add clones + if( mMessageList->getItemByValue(value)) + return; + + LLNotificationTabbedItem* new_item = new LLNotificationTabbedItem(p); + if (mMessageList->addItem(new_item, value, ADD_TOP)) + { + mSysWellChiclet->updateWidget(isWindowEmpty()); + reshapeWindow(); + new_item->setOnItemCloseCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClose, this, _1)); + new_item->setOnItemClickCallback(boost::bind(&LLFloaterNotificationsTabbed::onItemClick, this, _1)); + } + else + { + LL_WARNS() << "Unable to add Notification into the list, notification ID: " << p.notification_id + << ", title: " << p.title + << LL_ENDL; + + new_item->die(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::closeAll() +{ + // Need to clear notification channel, to add storable toasts into the list. + clearScreenChannels(); + std::vector<LLPanel*> items; + mMessageList->getItems(items); + for (std::vector<LLPanel*>::iterator + iter = items.begin(), + iter_end = items.end(); + iter != iter_end; ++iter) + { + LLNotificationTabbedItem* sys_well_item = dynamic_cast<LLNotificationTabbedItem*>(*iter); + if (sys_well_item) + onItemClose(sys_well_item); + } +} + +////////////////////////////////////////////////////////////////////////// +// PRIVATE METHODS +//void LLFloaterNotificationsTabbed::initChannel() +//{ +// LLFloaterNotificationsTabbed::initChannel(); +// if(mChannel) +// { +// mChannel->addOnStoreToastCallback(boost::bind(&LLFloaterNotificationsTabbed::onStoreToast, this, _1, _2)); +// } +//} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::clearScreenChannels() +{ + // 1 - remove StartUp toast and channel if present + if(!LLNotificationsUI::LLScreenChannel::getStartUpToastShown()) + { + LLNotificationsUI::LLChannelManager::getInstance()->onStartUpToastClose(); + } + + // 2 - remove toasts in Notification channel + if(mChannel) + { + mChannel->removeAndStoreAllStorableToasts(); + } +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) +{ + LLNotificationTabbedItem::Params p; + p.notification_id = id; + p.title = static_cast<LLToastPanel*>(info_panel)->getTitle(); + LLNotificationsUI::LLToast* toast = mChannel->getToastByNotificationID(id); + LLSD payload = toast->getNotification()->getPayload(); + LLDate time_stamp = toast->getNotification()->getDate(); + p.group_id = payload["group_id"]; + p.sender = payload["name"]; + p.time_stamp = time_stamp; + addItem(p); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClick(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + LLFloaterReg::showInstance("inspect_toast", id); +} + +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::onItemClose(LLNotificationTabbedItem* item) +{ + LLUUID id = item->getID(); + + if(mChannel) + { + // removeItemByID() is invoked from killToastByNotificationID() and item will removed; + mChannel->killToastByNotificationID(id); + } + else + { + // removeItemByID() should be called one time for each item to remove it from notification well + removeItemByID(id); + } + +} + +void LLFloaterNotificationsTabbed::onAdd( LLNotificationPtr notify ) +{ + removeItemByID(notify->getID()); +} diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h new file mode 100644 index 0000000000..1fd60826cb --- /dev/null +++ b/indra/newview/llfloaternotificationstabbed.h @@ -0,0 +1,143 @@ +/** + * @file llfloaternotificationstabbed.h + * @brief // TODO + * + * $LicenseInfo:firstyear=2003&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_FLOATERNOTIFICATIONSTABBED_H +#define LL_FLOATERNOTIFICATIONSTABBED_H + +#include "llimview.h" +#include "llnotifications.h" +#include "llscreenchannel.h" +#include "llsyswellitem.h" +#include "lltransientdockablefloater.h" + +class LLAvatarName; +class LLChiclet; +class LLFlatListView; +class LLIMChiclet; +class LLScriptChiclet; +class LLSysWellChiclet; + +class LLFloaterNotificationsTabbed : public LLTransientDockableFloater +{ +public: + LOG_CLASS(LLFloaterNotificationsTabbed); + + LLFloaterNotificationsTabbed(const LLSD& key); + virtual ~LLFloaterNotificationsTabbed(); + BOOL postBuild(); + + // other interface functions + // check is window empty + bool isWindowEmpty(); + + // Operating with items + void removeItemByID(const LLUUID& id); + LLPanel * findItemByID(const LLUUID& id); + + // Operating with outfit + virtual void setVisible(BOOL visible); + void adjustWindowPosition();//not used - ? + + /*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); + + void onStartUpToastClick(S32 x, S32 y, MASK mask); + + void setSysWellChiclet(LLSysWellChiclet* chiclet); + + // size constants for the window and for its elements + static const S32 MAX_WINDOW_HEIGHT = 200; + static const S32 MIN_WINDOW_WIDTH = 318; + +protected: + // init Window's channel + virtual void initChannel(); + + const std::string NOTIFICATION_TABBED_ANCHOR_NAME; + const std::string IM_WELL_ANCHOR_NAME; + //virtual const std::string& getAnchorViewName() = 0; + + void reshapeWindow(); + + // 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 + */ + LLSysWellChiclet* mSysWellChiclet; + + 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()); + } + + LLFloaterNotificationsTabbed* mNotificationsTabbedWindow; + }; + + LLNotificationChannelPtr mNotificationUpdates; + virtual const std::string& getAnchorViewName() { return NOTIFICATION_TABBED_ANCHOR_NAME; } + +private: + // init Window's channel + // void initChannel(); + void clearScreenChannels(); + + void onStoreToast(LLPanel* info_panel, LLUUID id); + + // Handlers + void onItemClick(LLNotificationTabbedItem* item); + void onItemClose(LLNotificationTabbedItem* item); + + // ID of a toast loaded by user (by clicking notification well item) + LLUUID mLoadedToastId; +}; + +#endif // LL_FLOATERNOTIFICATIONSTABBED_H + + + diff --git a/indra/newview/llsyswellitem.cpp b/indra/newview/llsyswellitem.cpp index 057d80457c..bc8333d5fc 100755 --- a/indra/newview/llsyswellitem.cpp +++ b/indra/newview/llsyswellitem.cpp @@ -31,6 +31,7 @@ #include "llwindow.h" #include "v4color.h" +#include "lltrans.h" #include "lluicolortable.h" //--------------------------------------------------------------------------------- @@ -90,4 +91,83 @@ void LLSysWellItem::onMouseLeave(S32 x, S32 y, MASK mask) //--------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------- +LLNotificationTabbedItem::LLNotificationTabbedItem(const Params& p) : LLPanel(p), + mTitle(NULL), + mSender(NULL), + mCloseBtn(NULL) +{ + buildFromFile( "panel_notification_tabbed_item.xml"); + + mTitle = getChild<LLTextBox>("GroupName_NoticeTitle"); + mSender = getChild<LLTextBox>("Sender_Resident"); + mTimeBox = getChild<LLTextBox>("Time_Box"); + mGroupIcon = getChild<LLIconCtrl>("group_icon_small"); + mCloseBtn = getChild<LLButton>("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" )); +} diff --git a/indra/newview/llsyswellitem.h b/indra/newview/llsyswellitem.h index d961708a01..4379b8dc22 100755 --- a/indra/newview/llsyswellitem.h +++ b/indra/newview/llsyswellitem.h @@ -32,6 +32,8 @@ #include "llbutton.h" #include "lliconctrl.h" +#include "llgroupmgr.h" + #include <string> class LLSysWellItem : public LLPanel @@ -76,6 +78,58 @@ private: LLUUID mID; }; +class LLNotificationTabbedItem : public LLPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLPanel::Params> + { + 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<void (LLNotificationTabbedItem* item)> item_callback_t; + typedef boost::signals2::signal<void (LLNotificationTabbedItem* item)> 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/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e19fe9ca75..d20b8e342a 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -85,6 +85,7 @@ #include "llfloatermodelpreview.h" #include "llfloaternamedesc.h" #include "llfloaternotificationsconsole.h" +#include "llfloaternotificationstabbed.h" #include "llfloaterobjectweights.h" #include "llfloateropenobject.h" #include "llfloateroutbox.h" @@ -255,7 +256,10 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("mini_map", "floater_map.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMap>); LLFloaterReg::add("notifications_console", "floater_notifications_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationConsole>); - LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>); + + LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationsTabbed>); + //LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>); + //LLFloaterReg::add("notifications_tabbed", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationsTabbed>); LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>); diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png new file mode 100644 index 0000000000..0732a33d93 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Attachment_Large.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png new file mode 100644 index 0000000000..8124554902 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Attachment_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Group_Large.png b/indra/newview/skins/default/textures/icons/Icon_Group_Large.png new file mode 100644 index 0000000000..6dc0cbda0b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Group_Large.png 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 new file mode 100644 index 0000000000..ef2b521a1f Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Group_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png new file mode 100644 index 0000000000..4d245eb57a Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Notification_Condense.png differ diff --git a/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png new file mode 100644 index 0000000000..186822da43 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Icon_Notification_Expand.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 1f10d966d5..0744962064 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -795,4 +795,11 @@ with the same filename but different name <texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/> <texture name="NavBar Separator" file_name="navbar/separator.png"/> + <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Icon_Group_Small" file_name="icons/Icon_Group_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Icon_Group_Large" file_name="icons/Icon_Group_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + </textures> diff --git a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml new file mode 100644 index 0000000000..b627707056 --- /dev/null +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + legacy_header_height="18" + bevel_style="in" + layout="topleft" + name="floater_notifications_tabbed" + help_topic="notification_chiclet" + save_rect="true" + title="NOTIFICATIONS" + width="350" + min_width="320" + height="550" + can_minimize="false" + can_tear_off="false" + can_resize="true" + can_drag_on_left="false" + can_dock="true" + save_dock_state="true" + save_visibility="true" + single_instance="true" +> + <string + name="title_notification_tabbed_window"> + NOTIFICATIONS TABBED + </string> + <layout_stack width="336" height="550" enabled="true" orientation="vertical" name="TabButtonsStack" follows="left|top|right|bottom"> + <layout_panel width="336" height="550" enabled="true" name="TabButtonsLayoutPanel"> + <tab_container + follows="left|top|right|bottom" + halign="center" + layout="topleft" + tab_position="top" + left="7" + top="24" + width="336" + height="491" + mouse_opaque="true" + name="NotificationsTab"> + <panel + border="true" + bevel_style="none" + follows="left|top|right|bottom" + label="System (2)" + layout="topleft" + name="SystemNotificationsTab"> + </panel> + <panel + border="true" + bevel_style="none" + follows="left|top|right|bottom" + label="Transactions (15)" + layout="topleft" + name="TransactionNotificationsTab"> + </panel> + <panel + border="true" + bevel_style="none" + follows="left|top|right|bottom" + label="Invites (2)" + layout="topleft" + name="InviteNotificationsTab"> + <flat_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="notification_list" + left="0" + top="5" + height="0" + width="330"/> + </panel> + </tab_container> + + <layout_stack width="336" height="26" enabled="true" orientation="horizontal" follows="left|right" name="ButtonsStack"> + <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="CondenseAllButtonPanel"> + <button width="93" height="21" left="2" label="Condense All" name="CondenseAllButton"> + </button> + </layout_panel> + <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="GapLayoutPanel"> + <panel width="90" height="21" left="2" label="Condense All" border="false" name="GapPanel"> + </panel> + </layout_panel> + <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="DeleteAllButtonPanel"> + <button width="93" height="21" left="2" label="Delete All" name="DeleteAllButton"> + </button> + </layout_panel> + </layout_stack> + </layout_panel> + </layout_stack> + </floater> + +<!-- +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<floater + legacy_header_height="18" + bevel_style="in" + layout="topleft" + name="notifications_tabbed_window" + help_topic="notification_chiclet" + save_rect="true" + title="NOTIFICATIONS" + width="320" + min_width="320" + height="23" + can_minimize="false" + can_tear_off="false" + can_resize="true" + can_drag_on_left="false" + can_dock="true" + save_dock_state="true" + save_visibility="true" + single_instance="true" +> + <string + name="title_im_well_window"> + CONVERSATIONS + </string> + <string + name="title_notification_well_window"> + NOTIFICATIONS1 + </string> + + <flat_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="notification_list" + left="1" + top="20" + height="0" + width="318"/> +</floater> +--> + diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index 51779e4bfd..3ad0f04469 100755 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -50,7 +50,7 @@ <string name="LTimeSec">second,datetime,local</string> <string name="LTimeHour">hour,datetime,local</string> <string name="LTimeMin">min,datetime,local</string> - <string name="LTimeYear">year,datetime,local</string> + <string name="LTimeYear">year,datetime,local</string> <string name="UTCTimeWeek">weekday,datetime,utc</string> <string name="UTCTimeDay">day,datetime,utc</string> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index e91eea04d1..0d9612990d 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 @@ <menu_item_call label="Show Notifications Console" name="Show Notifications Console" - visible="false" + visible="true" shortcut="control|shift|5"> <on_click function="Floater.Toggle" 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 new file mode 100644 index 0000000000..bc4f90858b --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- All our XML is utf-8 encoded. --> +<panel + translate="false" + name="sys_well_item" + title="sys_well_item" + visible="true" + top="0" + left="0" + width="331" + height="50" + can_resize="false" + layout="topleft" + follows="left|right" + background_opaque="false" + background_visible="true" + bg_alpha_color="SysWellItemUnselected" > + + <panel border="true" top="0" left="3" width="327" height="44" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> + <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="HorizontalStack"> + <layout_panel width="30" height="22" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_small" tool_tip="Group" default_icon_name="Generic_Group"/> + </layout_panel> + <layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> + <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="MainInfoBlockPanel"> + <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> + <text allow_scroll="false" font="SansSerifLarge" top="2" left="0" width="267" height="17" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="true" mouse_opaque="false" name="GroupName_NoticeTitle" > + Group Name:Notice Title + </text> + <icon top="0" right="-1" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> + </panel> + <panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="SenderAndTimePanel" height="15"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="true" mouse_opaque="false" name="Sender_Resident" > + Sender.Resident + </text> + <text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="Time_Box" right="-5" value="2014/12/24 23:30" /> + </panel> + </panel> + </layout_panel> + <layout_panel name="LayoutPanel3" width="18" height="39" orientation="horizontal" follows="left|top|right|bottom"> + <panel name="CloseExpandButtonsPanel" border="false" top="0" left="0" width="17" height="39" bevel_style="none" follows="left|top|right|bottom" layout="topleft"> + <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> + <button top="22" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> + </panel> + </layout_panel> + </layout_stack> + </panel> +</panel> -- cgit v1.2.3 From 23ae6d098a9520d325354e15bdca60d3c44577e8 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <none@none> Date: Mon, 12 Jan 2015 18:25:28 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - fixed Mac build --- indra/newview/llfloaternotificationstabbed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 09f0a0ed5e..bdc10cfa63 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -341,7 +341,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLSD payload = toast->getNotification()->getPayload(); LLDate time_stamp = toast->getNotification()->getDate(); p.group_id = payload["group_id"]; - p.sender = payload["name"]; + p.sender = payload["name"].asString(); p.time_stamp = time_stamp; addItem(p); } -- cgit v1.2.3 From b31631934a7caa0fe331cd25e745e8b9c9485798 Mon Sep 17 00:00:00 2001 From: pavelk_productengine <none@none> 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 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<LLFlatListView>("notification_list"); + mInviteMessageList = getChild<LLNotificationListView>("invite_notification_list"); + mTransactionMessageList = getChild<LLNotificationListView>("transaction_notification_list"); + mSystemMessageList = getChild<LLNotificationListView>("system_notification_list"); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getInviteTypes(), mInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getTransactionTypes(), mTransactionMessageList); + mNotificationsSeparator->initUnTaggedList(mSystemMessageList); + mNotificationsTabContainer = getChild<LLTabContainer>("notifications_tab_container"); + + mDeleteAllBtn = getChild<LLButton>("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<LLFloaterNotificationsTabbed>("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<LLPanel*> items; - mMessageList->getItems(items); - for (std::vector<LLPanel*>::iterator - iter = items.begin(), - iter_end = items.end(); - iter != iter_end; ++iter) + + std::vector<LLNotificationListItem*> items; + mNotificationsSeparator->getItems(items); + std::vector<LLNotificationListItem*>::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) { - LLNotificationTabbedItem* sys_well_item = dynamic_cast<LLNotificationTabbedItem*>(*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<LLPanel*> 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<LLPanel*>::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) + { + LLNotificationListItem* notify_item = dynamic_cast<LLNotificationListItem*>(*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<LLToastPanel*>(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<std::string>& tags, LLNotificationListView* list) +{ + std::set<std::string>::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<LLNotificationListItem*>& items, LLNotificationListView* list) +{ + std::vector<LLPanel*> list_items; + list->getItems(list_items); + std::vector<LLPanel*>::iterator it = list_items.begin(); + for (; it != list_items.end(); ++it) + { + LLNotificationListItem* notify_item = dynamic_cast<LLNotificationListItem*>(*it); + if (notify_item) + items.push_back(notify_item); + } +} + +void LLNotificationSeparator::getItems(std::vector<LLNotificationListItem*>& 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<std::string>& 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<LLNotificationListItem*>& items) const; + U32 size() const; +private: + static void getItemsFromList(std::vector<LLNotificationListItem*>& items, LLNotificationListView* list); + + typedef std::map<std::string, LLNotificationListView*> notification_list_map_t; + notification_list_map_t mNotificationListMap; + typedef std::list<LLNotificationListView*> 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<LLTextBox>("GroupName_NoticeTitle"); + mTimeBox = getChild<LLTextBox>("Time_Box"); + mCloseBtn = getChild<LLButton>("close_btn"); + mSenderBox = getChild<LLTextBox>("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<std::string> LLNotificationListItem::getInviteTypes() +{ + return LLInviteNotificationListItem::getTypes(); +} + +//static +std::set<std::string> LLNotificationListItem::getTransactionTypes() +{ + return LLTransactionNotificationListItem::getTypes(); +} + +std::set<std::string> LLInviteNotificationListItem::getTypes() +{ + std::set<std::string> types; + types.insert("JoinGroup"); + return types; +} + +std::set<std::string> LLTransactionNotificationListItem::getTypes() +{ + std::set<std::string> types; + types.insert("PaymentReceived"); + types.insert("PaymentSent"); + return types; +} + +std::set<std::string> LLSystemNotificationListItem::getTypes() +{ + std::set<std::string> 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<LLIconCtrl>("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 <string> + +class LLNotificationListItem : public LLPanel +{ +public: + struct Params : public LLInitParam::Block<Params, LLPanel::Params> + { + 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<std::string> getInviteTypes(); + static std::set<std::string> 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<void (LLNotificationListItem* item)> item_callback_t; + typedef boost::signals2::signal<void (LLNotificationListItem* item)> 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<std::string> 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<std::string> getTypes(); +private: + friend class LLNotificationListItem; + LLTransactionNotificationListItem(const Params& p); + LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); + LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); +}; + +class LLSystemNotificationListItem : public LLNotificationListItem +{ +public: + static std::set<std::string> 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<LLNotificationListView> 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<Params, LLFlatListView::Params> {}; + + 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<LLTextBox>("GroupName_NoticeTitle"); - mSender = getChild<LLTextBox>("Sender_Resident"); - mTimeBox = getChild<LLTextBox>("Time_Box"); - mGroupIcon = getChild<LLIconCtrl>("group_icon_small"); - mCloseBtn = getChild<LLButton>("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<Params, LLPanel::Params> - { - 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<void (LLNotificationTabbedItem* item)> item_callback_t; - typedef boost::signals2::signal<void (LLNotificationTabbedItem* item)> 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" > + <floater.string + name="system_tab_title"> + System ([COUNT]) + </floater.string> + <floater.string + name="transactions_tab_title"> + Transactions ([COUNT]) + </floater.string> + <floater.string + name="invitations_tab_title"> + Invitations ([COUNT]) + </floater.string> + <string name="title_notification_tabbed_window"> - NOTIFICATIONS TABBED + NOTIFICATIONS </string> <layout_stack width="336" height="550" enabled="true" orientation="vertical" name="TabButtonsStack" follows="left|top|right|bottom"> <layout_panel width="336" height="550" enabled="true" name="TabButtonsLayoutPanel"> @@ -35,35 +48,53 @@ width="336" height="491" mouse_opaque="true" - name="NotificationsTab"> + name="notifications_tab_container"> <panel border="true" bevel_style="none" follows="left|top|right|bottom" - label="System (2)" + label="System (0)" layout="topleft" - name="SystemNotificationsTab"> + name="system_notification_list_tab"> + <notification_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="system_notification_list" + left="0" + top="5" + height="0" + width="330"/> </panel> <panel border="true" bevel_style="none" follows="left|top|right|bottom" - label="Transactions (15)" + label="Transactions (0)" layout="topleft" name="TransactionNotificationsTab"> + <notification_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="transaction_notification_list" + left="0" + top="5" + height="0" + width="330"/> </panel> <panel border="true" bevel_style="none" follows="left|top|right|bottom" - label="Invites (2)" + label="Invitations (0)" layout="topleft" name="InviteNotificationsTab"> - <flat_list_view + <notification_list_view color="FloaterDefaultBackgroundColor" follows="all" layout="topleft" - name="notification_list" + name="invite_notification_list" left="0" top="5" height="0" @@ -73,15 +104,15 @@ <layout_stack width="336" height="26" enabled="true" orientation="horizontal" follows="left|right" name="ButtonsStack"> <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="CondenseAllButtonPanel"> - <button width="93" height="21" left="2" label="Condense All" name="CondenseAllButton"> + <button width="93" height="21" left="2" label="Collapse all" name="CondenseAllButton"> </button> </layout_panel> <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="GapLayoutPanel"> - <panel width="90" height="21" left="2" label="Condense All" border="false" name="GapPanel"> + <panel width="90" height="21" left="2" label="Gap Panel" border="false" name="GapPanel"> </panel> </layout_panel> <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="DeleteAllButtonPanel"> - <button width="93" height="21" left="2" label="Delete All" name="DeleteAllButton"> + <button width="93" height="21" left="2" label="Delete all" name="delete_all_button"> </button> </layout_panel> </layout_stack> 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 @@ <!-- All our XML is utf-8 encoded. --> <panel translate="false" - name="sys_well_item" - title="sys_well_item" + name="panel_notification_tabbed_item" + title="panel_notification_tabbed_item" visible="true" top="0" left="0" @@ -15,6 +15,10 @@ background_opaque="false" background_visible="true" bg_alpha_color="SysWellItemUnselected" > + <panel.string + name="sender_resident_text"> + Sender: "[SENDER_RESIDENT]" + </panel.string> <panel border="true" top="0" left="3" width="327" height="44" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="HorizontalStack"> @@ -24,16 +28,16 @@ <layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="MainInfoBlockPanel"> <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> - <text allow_scroll="false" font="SansSerifLarge" top="2" left="0" width="267" height="17" layout="topleft" follows="right|left" text_color="White" + <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="245" height="12" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="true" mouse_opaque="false" name="GroupName_NoticeTitle" > - 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 </text> - <icon top="0" right="-1" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> + <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> </panel> <panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="SenderAndTimePanel" height="15"> <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" use_ellipses="true" word_wrap="true" mouse_opaque="false" name="Sender_Resident" > - Sender.Resident + Sender:Resident </text> <text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="Time_Box" right="-5" value="2014/12/24 23:30" /> 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 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<notification_list_view + allow_select="false" + color="PanelFocusBackgroundColor" + item_pad="0" + keep_one_selected="false" + multi_select="false" + opaque="true"> + <flat_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="notification_list" + left="1" + top="20" + height="0" + width="318"/> +</notification_list_view> \ No newline at end of file -- cgit v1.2.3 From 5f96f3bba20fcacbe7115b7d27bc50cad56850d4 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <none@none> Date: Wed, 4 Feb 2015 15:48:22 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - fixed Mac build --- indra/newview/llnotificationlistitem.cpp | 2 +- indra/newview/llnotificationlistitem.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index a55c7b8541..4fdd6b1a54 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -179,7 +179,7 @@ LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) if (!p.sender.empty()) { LLStringUtil::format_map_t string_args; - string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender); + string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender.c_str()); std::string sender_text = getString("sender_resident_text", string_args); mSenderBox->setValue(sender_text); mSenderBox->setVisible(TRUE); diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index bc77d873a4..89de0487be 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -60,8 +60,8 @@ public: // get item's ID LLUUID getID() { return mID; } - std::string getTitle() { return mTitle; } - std::string getNotificationName() { return mNotificationName; } + std::string& getTitle() { return mTitle; } + std::string& getNotificationName() { return mNotificationName; } // handlers virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); -- cgit v1.2.3 From 9d8bbe16007ef9292a04856f55f71016cf1220bf Mon Sep 17 00:00:00 2001 From: pavelk_productengine <pavelkproductengine@lindenlab.com> Date: Tue, 10 Feb 2015 19:56:32 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - introduced different design for System, Incoming/Outcoming Transactions, Invites --- indra/newview/llnotificationlistitem.cpp | 120 ++++++++++++++------- indra/newview/llnotificationlistitem.h | 14 ++- .../textures/icons/Incoming_Transaction_Small.png | Bin 0 -> 1666 bytes .../textures/icons/Outcoming_Transaction_Small.png | Bin 0 -> 1322 bytes .../textures/icons/System_Notification_Small.png | Bin 0 -> 661 bytes indra/newview/skins/default/textures/textures.xml | 3 + .../xui/en/panel_notification_list_item.xml | 60 +++++++++++ .../xui/en/panel_notification_tabbed_item.xml | 57 ---------- 8 files changed, 155 insertions(+), 99 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png create mode 100644 indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png create mode 100644 indra/newview/skins/default/textures/icons/System_Notification_Small.png create mode 100644 indra/newview/skins/default/xui/en/panel_notification_list_item.xml delete mode 100644 indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 4fdd6b1a54..7f0e3460b1 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -35,25 +35,26 @@ #include "lluicolortable.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), + mParams(p), mTitleBox(NULL), - mCloseBtn(NULL), - mSenderBox(NULL) + mCloseBtn(NULL) { - buildFromFile( "panel_notification_tabbed_item.xml"); + mID = p.notification_id; + mNotificationName = p.notification_name; +} - mTitleBox = getChild<LLTextBox>("GroupName_NoticeTitle"); - mTimeBox = getChild<LLTextBox>("Time_Box"); +BOOL LLNotificationListItem::postBuild() +{ + BOOL rv = LLPanel::postBuild(); + mTitleBox = getChild<LLTextBox>("notification_title"); + mTimeBox = getChild<LLTextBox>("notification_time"); mCloseBtn = getChild<LLButton>("close_btn"); - mSenderBox = getChild<LLTextBox>("Sender_Resident"); - mTitleBox->setValue(p.title); - mTimeBox->setValue(buildNotificationDate(p.time_stamp)); - mSenderBox->setVisible(FALSE); + mTitleBox->setValue(mParams.title); + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); - - mID = p.notification_id; - mNotificationName = p.notification_name; + return rv; } LLNotificationListItem::~LLNotificationListItem() @@ -151,46 +152,87 @@ std::set<std::string> LLTransactionNotificationListItem::getTypes() std::set<std::string> LLSystemNotificationListItem::getTypes() { std::set<std::string> 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 + //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) + : LLNotificationListItem(p), + mSenderBox(NULL) { - mGroupIcon = getChild<LLIconCtrl>("group_icon_small"); - mGroupIcon->setValue(p.group_id); - mGroupID = p.group_id; - if (!p.sender.empty()) + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLInviteNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); + mGroupIcon->setValue(mParams.group_id); + mGroupIcon->setVisible(TRUE); + mGroupID = mParams.group_id; + mSenderBox = getChild<LLTextBox>("sender_resident"); + if (!mParams.sender.empty()) { LLStringUtil::format_map_t string_args; - string_args["[SENDER_RESIDENT]"] = llformat("%s", p.sender.c_str()); + 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); - } + } else { + mSenderBox->setVisible(FALSE); + } + return rv; } LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) - : LLNotificationListItem(p) -{} + : LLNotificationListItem(p), + mTransactionIcon(NULL) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLTransactionNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + if (mParams.notification_name == "PaymentReceived") + { + mTransactionIcon = getChild<LLIconCtrl>("incoming_transaction_icon"); + } + else if (mParams.notification_name == "PaymentSent") + { + mTransactionIcon = getChild<LLIconCtrl>("outcoming_transaction_icon"); + } + if(mTransactionIcon) + mTransactionIcon->setVisible(TRUE); + return rv; +} LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) - :LLNotificationListItem(p) -{} + : LLNotificationListItem(p), + mSystemNotificationIcon(NULL) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLSystemNotificationListItem::postBuild() +{ + BOOL rv = LLNotificationListItem::postBuild(); + mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon"); + if (mSystemNotificationIcon) + mSystemNotificationIcon->setVisible(TRUE); + return rv; +} diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 89de0487be..da6d792fb8 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -30,7 +30,7 @@ #include "llpanel.h" #include "lltextbox.h" #include "llbutton.h" -#include "lliconctrl.h" +#include "llgroupiconctrl.h" #include "llgroupmgr.h" @@ -76,6 +76,7 @@ public: boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } + virtual BOOL postBuild(); protected: LLNotificationListItem(const Params& p); virtual ~LLNotificationListItem(); @@ -83,13 +84,13 @@ protected: static std::string buildNotificationDate(const LLDate&); void onClickCloseBtn(); + Params mParams; LLTextBox* mTitleBox; LLTextBox* mTimeBox; LLButton* mCloseBtn; LLUUID mID; std::string mTitle; std::string mNotificationName; - LLTextBox* mSenderBox; }; class LLInviteNotificationListItem : public LLNotificationListItem @@ -99,36 +100,43 @@ public: //void setGroupIconID(const LLUUID& group_icon_id); //void setGroupName(const std::string& group_name); static std::set<std::string> getTypes(); + + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLInviteNotificationListItem(const Params& p); LLInviteNotificationListItem(const LLInviteNotificationListItem &); LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); - LLIconCtrl* mGroupIcon; + LLGroupIconCtrl* mGroupIcon; LLUUID mGroupID; + LLTextBox* mSenderBox; }; class LLTransactionNotificationListItem : public LLNotificationListItem { public: static std::set<std::string> getTypes(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLTransactionNotificationListItem(const Params& p); LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); + LLIconCtrl* mTransactionIcon; }; class LLSystemNotificationListItem : public LLNotificationListItem { public: static std::set<std::string> getTypes(); + virtual BOOL postBuild(); private: friend class LLNotificationListItem; LLSystemNotificationListItem(const Params& p); LLSystemNotificationListItem(const LLSystemNotificationListItem &); LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); + LLIconCtrl* mSystemNotificationIcon; }; #endif // LL_LLNOTIFICATIONLISTITEM_H diff --git a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png new file mode 100644 index 0000000000..8b39770c63 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png 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 new file mode 100644 index 0000000000..96c6150f3b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png differ diff --git a/indra/newview/skins/default/textures/icons/System_Notification_Small.png b/indra/newview/skins/default/textures/icons/System_Notification_Small.png new file mode 100644 index 0000000000..027a8446d8 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/System_Notification_Small.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 0744962064..66fe119848 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -801,5 +801,8 @@ with the same filename but different name <texture name="Icon_Group_Large" file_name="icons/Icon_Group_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="System_Notification_Small" file_name="icons/System_Notification_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Incoming_Transaction_Small" file_name="icons/Incoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Outcoming_Transaction_Small" file_name="icons/Outcoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> </textures> diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml new file mode 100644 index 0000000000..9bd9742a20 --- /dev/null +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes"?> +<!-- All our XML is utf-8 encoded. --> +<panel + translate="false" + name="panel_notification_list_item" + title="panel_notification_list_item" + visible="true" + top="0" + left="0" + width="331" + height="50" + can_resize="false" + layout="topleft" + follows="left|right" + background_opaque="false" + background_visible="true" + bg_alpha_color="SysWellItemUnselected" > + <panel.string + name="sender_resident_text"> + Sender: "[SENDER_RESIDENT]" + </panel.string> + + <panel border="true" top="0" left="3" width="327" height="44" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="group_name_notice_title_panel"> + <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="HorizontalStack"> + <layout_panel width="30" height="22" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_1"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification_Small" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="incoming_transaction_icon" tool_tip="Icon" image_name="Incoming_Transaction_Small" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="outcoming_transaction_icon" tool_tip="Icon" image_name="Outcoming_Transaction_Small" visible="false"/> + </layout_panel> + <layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_2"> + <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel"> + <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel"> + <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="245" height="12" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 + </text> + <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> + </panel> + <panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel" height="15"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="true" mouse_opaque="false" name="sender_resident" visible="false"> + Sender:Resident + </text> + <text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="notification_time" right="-5" value="2014/12/24 23:30" /> + </panel> + </panel> + </layout_panel> + <layout_panel name="layout_panel_3" width="18" height="39" orientation="horizontal" follows="left|top|right|bottom"> + <panel name="close_expand_panel" border="false" top="0" left="0" width="17" height="39" bevel_style="none" follows="left|top|right|bottom" layout="topleft"> + <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> + <button top="22" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> + </panel> + </layout_panel> + </layout_stack> + </panel> +</panel> 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 deleted file mode 100644 index 603a3312e0..0000000000 --- a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<!-- All our XML is utf-8 encoded. --> -<panel - translate="false" - name="panel_notification_tabbed_item" - title="panel_notification_tabbed_item" - visible="true" - top="0" - left="0" - width="331" - height="50" - can_resize="false" - layout="topleft" - follows="left|right" - background_opaque="false" - background_visible="true" - bg_alpha_color="SysWellItemUnselected" > - <panel.string - name="sender_resident_text"> - Sender: "[SENDER_RESIDENT]" - </panel.string> - - <panel border="true" top="0" left="3" width="327" height="44" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> - <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="HorizontalStack"> - <layout_panel width="30" height="22" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> - <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_small" tool_tip="Group" default_icon_name="Generic_Group"/> - </layout_panel> - <layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> - <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="MainInfoBlockPanel"> - <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="GroupNameNoticeTitlePanel"> - <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="245" height="12" layout="topleft" follows="right|left" text_color="White" - use_ellipses="true" word_wrap="true" mouse_opaque="false" name="GroupName_NoticeTitle" > - 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 - </text> - <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> - </panel> - <panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="SenderAndTimePanel" height="15"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="true" mouse_opaque="false" name="Sender_Resident" > - Sender:Resident - </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" - name="Time_Box" right="-5" value="2014/12/24 23:30" /> - </panel> - </panel> - </layout_panel> - <layout_panel name="LayoutPanel3" width="18" height="39" orientation="horizontal" follows="left|top|right|bottom"> - <panel name="CloseExpandButtonsPanel" border="false" top="0" left="0" width="17" height="39" bevel_style="none" follows="left|top|right|bottom" layout="topleft"> - <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button top="22" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> - </panel> - </layout_panel> - </layout_stack> - </panel> -</panel> -- cgit v1.2.3 From 575b750d1c1d3de2c86ad80759a2ba51d671344a Mon Sep 17 00:00:00 2001 From: pavelk_productengine <pavelkproductengine@lindenlab.com> Date: Tue, 24 Feb 2015 17:27:00 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - introduced expanded notification view and general condense/expand behaviour for all types of notifications --- indra/newview/llgroupiconctrl.cpp | 2 +- indra/newview/llnotificationlistitem.cpp | 192 +++++++++++++++++---- indra/newview/llnotificationlistitem.h | 36 +++- indra/newview/skins/default/colors.xml | 7 +- .../textures/icons/Outcoming_Transaction_Large.png | Bin 0 -> 4662 bytes .../textures/icons/System_Notification_Large.png | Bin 0 -> 1804 bytes indra/newview/skins/default/textures/textures.xml | 3 + .../xui/en/panel_notification_list_item.xml | 113 ++++++++++-- 8 files changed, 296 insertions(+), 57 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png create mode 100644 indra/newview/skins/default/textures/icons/System_Notification_Large.png diff --git a/indra/newview/llgroupiconctrl.cpp b/indra/newview/llgroupiconctrl.cpp index 6abf9ea637..26680e1ea5 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 7f0e3460b1..f280dc0ed3 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -37,9 +37,13 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), mTitleBox(NULL), - mCloseBtn(NULL) + mExpandBtn(NULL), + mCondenseBtn(NULL), + mCloseBtn(NULL), + mCondensedViewPanel(NULL), + mExpandedViewPanel(NULL), + mMainPanel(NULL) { - mID = p.notification_id; mNotificationName = p.notification_name; } @@ -47,13 +51,42 @@ BOOL LLNotificationListItem::postBuild() { BOOL rv = LLPanel::postBuild(); mTitleBox = getChild<LLTextBox>("notification_title"); + mTitleBoxExp = getChild<LLTextBox>("notification_title_exp"); + mNoticeTextExp = getChild<LLTextBox>("notification_text_exp"); + mTimeBox = getChild<LLTextBox>("notification_time"); + mTimeBoxExp = getChild<LLTextBox>("notification_time_exp"); + mExpandBtn = getChild<LLButton>("expand_btn"); + mCondenseBtn = getChild<LLButton>("condense_btn"); mCloseBtn = getChild<LLButton>("close_btn"); + mCloseBtnExp = getChild<LLButton>("close_expanded_btn"); + mVerticalStack = getChild<LLLayoutStack>("item_vertical_stack"); mTitleBox->setValue(mParams.title); + mTitleBoxExp->setValue(mParams.title); + mNoticeTextExp->setValue(mParams.title); + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp)); + mExpandBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickExpandBtn,this)); + mCondenseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCondenseBtn,this)); + + //mCloseBtn and mCloseExpandedBtn share the same callback mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); + mCloseBtnExp->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); + + mCondensedViewPanel = getChild<LLPanel>("layout_panel_condensed_view"); + mExpandedViewPanel = getChild<LLPanel>("layout_panel_expanded_view"); + mMainPanel = getChild<LLPanel>("main_panel"); + + std::string expanded_heigt_str = getString("item_expanded_height"); + std::string condensed_heigt_str = getString("item_condensed_height"); + + mExpandedHeight = (S32)atoi(expanded_heigt_str.c_str()); + mCondensedHeight = (S32)atoi(condensed_heigt_str.c_str()); + + setExpanded(FALSE); return rv; } @@ -90,10 +123,9 @@ void LLNotificationListItem::onClickCloseBtn() 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); + //mOnItemClick(this); return res; } @@ -134,6 +166,36 @@ std::set<std::string> LLNotificationListItem::getTransactionTypes() return LLTransactionNotificationListItem::getTypes(); } +void LLNotificationListItem::onClickExpandBtn() +{ + setExpanded(TRUE); +} + +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); + if (value) + { + setPanelSize(this, 331, mExpandedHeight, FALSE); + } + else + { + setPanelSize(this, 331, mCondensedHeight, FALSE); + } +} + std::set<std::string> LLInviteNotificationListItem::getTypes() { std::set<std::string> types; @@ -179,11 +241,21 @@ LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) BOOL LLInviteNotificationListItem::postBuild() { BOOL rv = LLNotificationListItem::postBuild(); + mGroupIcon = getChild<LLGroupIconCtrl>("group_icon"); + mGroupIconExp = getChild<LLGroupIconCtrl>("group_icon_exp"); + mGroupNameBoxExp = getChild<LLTextBox>("group_name_exp"); + mGroupIcon->setValue(mParams.group_id); - mGroupIcon->setVisible(TRUE); - mGroupID = mParams.group_id; - mSenderBox = getChild<LLTextBox>("sender_resident"); + mGroupIconExp->setValue(mParams.group_id); + + mGroupIcon->setVisible(TRUE); + mGroupIconExp->setVisible(TRUE); + + mGroupId = mParams.group_id; + + mSenderBox = getChild<LLTextBox>("sender_resident"); + mSenderBoxExp = getChild<LLTextBox>("sender_resident_exp"); if (!mParams.sender.empty()) { LLStringUtil::format_map_t string_args; @@ -191,48 +263,106 @@ BOOL LLInviteNotificationListItem::postBuild() 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); - } + mSenderBox->setVisible(FALSE); + mSenderBoxExp->setVisible(FALSE); + } + + LLSD value(mParams.group_id); + setGroupId(value); + return rv; } +void LLInviteNotificationListItem::changed(LLGroupChange gc) +{ + if (GC_PROPERTIES == gc) + { + updateFromCache(); + } +} + +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); + } + return true; +} + +void LLInviteNotificationListItem::setGroupId(const LLUUID& value) +{ + LLGroupMgr* gm = LLGroupMgr::getInstance(); + if (mGroupId.notNull()) + { + gm->removeObserver(this); + } + + mID = mGroupId; // set LLGroupMgrObserver::mID to make callbacks work + + // Check if cache already contains image_id for that group + if (!updateFromCache()) + { + gm->addObserver(this); + gm->sendGroupPropertiesRequest(mGroupId); + } +} + LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) : LLNotificationListItem(p), - mTransactionIcon(NULL) + mTransactionIcon(NULL) { - buildFromFile("panel_notification_list_item.xml"); + buildFromFile("panel_notification_list_item.xml"); } BOOL LLTransactionNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); - if (mParams.notification_name == "PaymentReceived") - { - mTransactionIcon = getChild<LLIconCtrl>("incoming_transaction_icon"); - } - else if (mParams.notification_name == "PaymentSent") - { - mTransactionIcon = getChild<LLIconCtrl>("outcoming_transaction_icon"); - } - if(mTransactionIcon) - mTransactionIcon->setVisible(TRUE); - return rv; + BOOL rv = LLNotificationListItem::postBuild(); + if (mParams.notification_name == "PaymentReceived") + { + mTransactionIcon = getChild<LLIconCtrl>("incoming_transaction_icon"); + mTransactionIconExp = getChild<LLIconCtrl>("incoming_transaction_icon_exp"); + } + else if (mParams.notification_name == "PaymentSent") + { + mTransactionIcon = getChild<LLIconCtrl>("outcoming_transaction_icon"); + mTransactionIconExp = getChild<LLIconCtrl>("outcoming_transaction_icon_exp"); + } + if(mTransactionIcon) + mTransactionIcon->setVisible(TRUE); + if(mTransactionIconExp) + mTransactionIconExp->setVisible(TRUE); + return rv; } LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) : LLNotificationListItem(p), - mSystemNotificationIcon(NULL) + mSystemNotificationIcon(NULL) { - buildFromFile("panel_notification_list_item.xml"); + buildFromFile("panel_notification_list_item.xml"); } BOOL LLSystemNotificationListItem::postBuild() { - BOOL rv = LLNotificationListItem::postBuild(); - mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon"); - if (mSystemNotificationIcon) - mSystemNotificationIcon->setVisible(TRUE); - return rv; + BOOL rv = LLNotificationListItem::postBuild(); + mSystemNotificationIcon = getChild<LLIconCtrl>("system_notification_icon"); + mSystemNotificationIconExp = getChild<LLIconCtrl>("system_notification_icon_exp"); + if (mSystemNotificationIcon) + mSystemNotificationIcon->setVisible(TRUE); + if (mSystemNotificationIconExp) + mSystemNotificationIconExp->setVisible(TRUE); + return rv; } - diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index da6d792fb8..f5cd9422b5 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -28,6 +28,7 @@ #define LL_LLNOTIFICATIONLISTITEM_H #include "llpanel.h" +#include "lllayoutstack.h" #include "lltextbox.h" #include "llbutton.h" #include "llgroupiconctrl.h" @@ -59,7 +60,7 @@ public: void setTitle( std::string title ); // get item's ID - LLUUID getID() { return mID; } + LLUUID getID() { return mParams.notification_id; } std::string& getTitle() { return mTitle; } std::string& getNotificationName() { return mNotificationName; } @@ -82,18 +83,34 @@ protected: virtual ~LLNotificationListItem(); static std::string buildNotificationDate(const LLDate&); + void setExpanded(BOOL value); + void onClickExpandBtn(); + void onClickCondenseBtn(); void onClickCloseBtn(); Params mParams; LLTextBox* mTitleBox; + LLTextBox* mTitleBoxExp; + LLTextBox* mNoticeTextExp; LLTextBox* mTimeBox; + LLTextBox* mTimeBoxExp; + LLButton* mExpandBtn; + LLButton* mCondenseBtn; LLButton* mCloseBtn; - LLUUID mID; + LLButton* mCloseBtnExp; + LLLayoutStack* mVerticalStack; + LLPanel* mCondensedViewPanel; + LLPanel* mExpandedViewPanel; + LLPanel* mMainPanel; + //LLUUID mID; std::string mTitle; std::string mNotificationName; + S32 mCondensedHeight; + S32 mExpandedHeight; }; -class LLInviteNotificationListItem : public LLNotificationListItem +class LLInviteNotificationListItem + : public LLNotificationListItem, public LLGroupMgrObserver { public: //void setGroupID(const LLUUID& group_id); @@ -102,15 +119,24 @@ public: static std::set<std::string> getTypes(); virtual BOOL postBuild(); + + void setGroupId(const LLUUID& value); + // LLGroupMgrObserver observer trigger + virtual void changed(LLGroupChange gc); private: friend class LLNotificationListItem; LLInviteNotificationListItem(const Params& p); LLInviteNotificationListItem(const LLInviteNotificationListItem &); LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); + bool updateFromCache(); + LLGroupIconCtrl* mGroupIcon; - LLUUID mGroupID; + LLGroupIconCtrl* mGroupIconExp; + LLUUID mGroupId; LLTextBox* mSenderBox; + LLTextBox* mSenderBoxExp; + LLTextBox* mGroupNameBoxExp; }; class LLTransactionNotificationListItem : public LLNotificationListItem @@ -124,6 +150,7 @@ private: LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); LLIconCtrl* mTransactionIcon; + LLIconCtrl* mTransactionIconExp; }; class LLSystemNotificationListItem : public LLNotificationListItem @@ -137,6 +164,7 @@ private: LLSystemNotificationListItem(const LLSystemNotificationListItem &); LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); LLIconCtrl* mSystemNotificationIcon; + LLIconCtrl* mSystemNotificationIconExp; }; #endif // LL_LLNOTIFICATIONLISTITEM_H diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index bdc884885f..8533625e50 100755 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -873,8 +873,11 @@ <color name="ToolbarDropZoneColor" value=".48 .69 1 .5" /> - - <!-- Generic color names (legacy) --> + <color + name="PanelNotificationListItem" + value="0.3 0.3 0.3 .3" /> + + <!-- Generic color names (legacy) --> <color name="white" value="1 1 1 1"/> diff --git a/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png new file mode 100644 index 0000000000..79011edd8b Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Large.png differ diff --git a/indra/newview/skins/default/textures/icons/System_Notification_Large.png b/indra/newview/skins/default/textures/icons/System_Notification_Large.png new file mode 100644 index 0000000000..434ce3e8b6 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/System_Notification_Large.png differ diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 66fe119848..eef7d56e75 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -802,7 +802,10 @@ with the same filename but different name <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="System_Notification_Small" file_name="icons/System_Notification_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="System_Notification_Large" file_name="icons/System_Notification_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="Incoming_Transaction_Small" file_name="icons/Incoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Incoming_Transaction_Large" file_name="icons/Incoming_Transaction_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> <texture name="Outcoming_Transaction_Small" file_name="icons/Outcoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> + <texture name="Outcoming_Transaction_Large" file_name="icons/Outcoming_Transaction_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> </textures> diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 9bd9742a20..05b721000f 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -2,34 +2,49 @@ <!-- All our XML is utf-8 encoded. --> <panel translate="false" - name="panel_notification_list_item" + name="main_panel" title="panel_notification_list_item" visible="true" top="0" left="0" width="331" - height="50" - can_resize="false" + height="200" + can_resize="true" layout="topleft" - follows="left|right" + follows="left|top|right|bottom" background_opaque="false" background_visible="true" - bg_alpha_color="SysWellItemUnselected" > + bg_alpha_color="PanelNotificationListItem" > <panel.string name="sender_resident_text"> Sender: "[SENDER_RESIDENT]" </panel.string> + <panel.string + name="group_name_text"> + Group: "[GROUP_NAME]" + </panel.string> + <panel.string + name="item_condensed_height"> + 50 + </panel.string> + <panel.string + name="item_expanded_height"> + 200 + </panel.string> - <panel border="true" top="0" left="3" width="327" height="44" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="group_name_notice_title_panel"> - <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="HorizontalStack"> - <layout_panel width="30" height="22" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_1"> - <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="false"/> + <panel top="0" left="0" width="331" height="196" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_total_view"> + <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack"> + <layout_panel top="0" left="0" height="30" layout="topleft" follows="left|top|right|bottom" name="layout_panel_condensed_view" visible="false"> + <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view"> + <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> + <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification_Small" visible="false"/> <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="incoming_transaction_icon" tool_tip="Icon" image_name="Incoming_Transaction_Small" visible="false"/> <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="outcoming_transaction_icon" tool_tip="Icon" image_name="Outcoming_Transaction_Small" visible="false"/> </layout_panel> - <layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_2"> - <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel"> + <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle"> + <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel"> <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel"> <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="245" height="12" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_title" > @@ -37,24 +52,84 @@ </text> <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> </panel> - <panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel" height="15"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" + <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" use_ellipses="true" word_wrap="true" mouse_opaque="false" name="sender_resident" visible="false"> Sender:Resident </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" - name="notification_time" right="-5" value="2014/12/24 23:30" /> + <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="notification_time" value="2014/12/24 23:30" /> </panel> </panel> </layout_panel> - <layout_panel name="layout_panel_3" width="18" height="39" orientation="horizontal" follows="left|top|right|bottom"> - <panel name="close_expand_panel" border="false" top="0" left="0" width="17" height="39" bevel_style="none" follows="left|top|right|bottom" layout="topleft"> - <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" + <layout_panel width="18" height="48" orientation="horizontal" follows="left|top" name="layout_panel_right"> + <panel top="0" left="0" width="17" height="39" follows="left|top" layout="topleft" name="close_expand_panel"> + <button top="0" left="1" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button top="22" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" + <button top="25" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> </panel> </layout_panel> + </layout_stack> + </panel> + </layout_panel> + <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> + <panel border="true" top="0" left="5" height="193" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> + <layout_stack top="0" left="0" width="325" height="193" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> + <layout_panel width="60" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> + <group_icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> + <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification_Large" visible="false"/> + <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="incoming_transaction_icon_exp" tool_tip="Icon" image_name="Incoming_Transaction_Large" visible="false"/> + <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="outcoming_transaction_icon_exp" tool_tip="Icon" image_name="Outcoming_Transaction_Large" visible="false"/> + <icon top="142" right="65" width="22" height="25" image_name="Icon_Attachment_Large" follows="right" mouse_opaque="true" name="icon_attachment_large" tool_tip="Attachment"/> + </layout_panel> + <layout_panel width="230" height="170" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> + <panel border="false" top="0" width="230" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> + <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> + <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> + Notice Title Notice Title N o t i c e T i t l e + </text> + <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false"> + Group Name Group Name Group Na m e e + </text> + </panel> + <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="143" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_resident_exp" visible="false"> + Sender: "Resident R e s i d e n t R e s i d e n t" + </text> + <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="notification_time_exp" value="2014/12/24 23:30" /> + </panel> + <panel border="true" left="1" width="230" height="90" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="full_notice_text_panel_exp" visible="true" + bg_visible="true"> + <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="80" layout="topleft" follows="left|top|right|bottom" + use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="400" name="notification_text_exp" > + 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 . + </text> + </panel> + <panel border="true" left="1" width="230" height="21" bevel_style="none" follows="left|bottom|right" layout="topleft" name="full_notice_attach_panel_exp" visible="true" + bg_visible="true"> + <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" + use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="96" name="notification_full_text"> + 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 . + </text> + </panel> + </panel> + </layout_panel> + <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> + <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp"> + <button top="0" left="1" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> + <button top="175" left="0" width="17" height="17" layout="topleft" follows="top" name="condense_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" /> + </panel> + </layout_panel> </layout_stack> </panel> + </layout_panel> +</layout_stack> +</panel> </panel> -- cgit v1.2.3 From 1891c5a8e0f9323e5657e6be775b1a97763ddf09 Mon Sep 17 00:00:00 2001 From: pavelk_productengine <pavelkproductengine@lindenlab.com> Date: Tue, 24 Feb 2015 17:31:19 +0200 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) - minor fix: added large incoming payment icon --- .../textures/icons/Incoming_Transaction_Large.png | Bin 0 -> 4939 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png diff --git a/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png new file mode 100644 index 0000000000..e73dfe2695 Binary files /dev/null and b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Large.png differ -- cgit v1.2.3 From b147d659dc0c94a972f1c82f16536b374ee10c19 Mon Sep 17 00:00:00 2001 From: pavelk_productengine <pavelkproductengine@lindenlab.com> 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 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<LLLayoutStack>("toolbar_stack"); mChicletPanel = getChild<LLChicletPanel>("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<LLButton>("delete_all_button"); mDeleteAllBtn->setClickedCallback(boost::bind(&LLFloaterNotificationsTabbed::onClickDeleteAllBtn,this)); + mCollapseAllBtn = getChild<LLButton>("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<LLFloaterNotificationsTabbed>("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<LLPanel*>& items) const { - // Need to clear notification channel, to add storable toasts into the list. - clearScreenChannels(); - std::vector<LLPanel*> 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<LLPanel*> items; + getAllItemsOnCurrentTab(items); std::vector<LLPanel*>::iterator iter = items.begin(); for (; iter != items.end(); ++iter) { @@ -347,6 +339,20 @@ void LLFloaterNotificationsTabbed::closeAllOnCurrentTab() } } +//--------------------------------------------------------------------------------- +void LLFloaterNotificationsTabbed::collapseAllOnCurrentTab() +{ + std::vector<LLPanel*> items; + getAllItemsOnCurrentTab(items); + std::vector<LLPanel*>::iterator iter = items.begin(); + for (; iter != items.end(); ++iter) + { + LLNotificationListItem* notify_item = dynamic_cast<LLNotificationListItem*>(*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<std::string>& tags, LLNotificationListView* list) { std::set<std::string>::const_iterator it = tags.begin(); @@ -428,11 +446,13 @@ void LLNotificationSeparator::initTaggedList(const std::set<std::string>& 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<LLNotificationListItem*>& items, LLNotificationListView* list) { std::vector<LLPanel*> list_items; @@ -505,6 +529,7 @@ void LLNotificationSeparator::getItemsFromList(std::vector<LLNotificationListIte } } +//--------------------------------------------------------------------------------- void LLNotificationSeparator::getItems(std::vector<LLNotificationListItem*>& items) const { items.clear(); @@ -519,9 +544,11 @@ void LLNotificationSeparator::getItems(std::vector<LLNotificationListItem*>& 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<LLPanel*>& 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<std::string> LLTransactionNotificationListItem::getTypes() return types; } -std::set<std::string> LLSystemNotificationListItem::getTypes() -{ - std::set<std::string> 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<LLTextBox>("sender_resident"); mSenderBoxExp = getChild<LLTextBox>("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<LLAvatarIconCtrl>("avatar_icon"); + mAvatarIconExp = getChild<LLAvatarIconCtrl>("avatar_icon_exp"); if (mParams.notification_name == "PaymentReceived") { - mTransactionIcon = getChild<LLIconCtrl>("incoming_transaction_icon"); - mTransactionIconExp = getChild<LLIconCtrl>("incoming_transaction_icon_exp"); + mAvatarIcon->setValue(mParams.paid_from_id); + mAvatarIconExp->setValue(mParams.paid_from_id); } else if (mParams.notification_name == "PaymentSent") { - mTransactionIcon = getChild<LLIconCtrl>("outcoming_transaction_icon"); - mTransactionIconExp = getChild<LLIconCtrl>("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<Params, LLPanel::Params> + struct Params : public LLInitParam::Block<Params, LLPanel::Params> { - 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<void (LLNotificationListItem* item)> item_callback_t; typedef boost::signals2::signal<void (LLNotificationListItem* item)> 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<std::string> 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<std::string> 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<std::string> 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 <string> 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<LLNotificationWellWindow>("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<LLPanel*> items; - mMessageList->getItems(items); - for (std::vector<LLPanel*>::iterator - iter = items.begin(), - iter_end = items.end(); - iter != iter_end; ++iter) - { - LLSysWellItem* sys_well_item = dynamic_cast<LLSysWellItem*>(*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<LLToastPanel*>(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<LLFloaterNotificationConsole>); - LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationsTabbed>); - //LLFloaterReg::add("notification_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNotificationWellWindow>); - //LLFloaterReg::add("notifications_tabbed", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationsTabbed>); + LLFloaterReg::add("notification_well_window", "floater_notifications_tabbed.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterNotificationsTabbed>); LLFloaterReg::add("object_weights", "floater_object_weights.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterObjectWeights>); LLFloaterReg::add("openobject", "floater_openobject.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterOpenObject>); 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 <texture name="Camera_Drag_Dot" file_name="world/CameraDragDot.png"/> <texture name="NavBar Separator" file_name="navbar/separator.png"/> - <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Icon_Group_Small" file_name="icons/Icon_Group_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Icon_Group_Large" file_name="icons/Icon_Group_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="System_Notification_Small" file_name="icons/System_Notification_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="System_Notification_Large" file_name="icons/System_Notification_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Incoming_Transaction_Small" file_name="icons/Incoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Incoming_Transaction_Large" file_name="icons/Incoming_Transaction_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Outcoming_Transaction_Small" file_name="icons/Outcoming_Transaction_Small.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - <texture name="Outcoming_Transaction_Large" file_name="icons/Outcoming_Transaction_Large.png" preload="true" scale.left="2" scale.top="13" scale.right="13" scale.bottom="2" /> - + <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true"/> + <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true"/> + <texture name="System_Notification" file_name="icons/SL_Logo.png" preload="true"/> </textures> 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"/> </panel> <panel border="true" @@ -98,13 +98,13 @@ left="0" top="5" height="0" - width="330"/> + width="328"/> </panel> </tab_container> <layout_stack width="336" height="26" enabled="true" orientation="horizontal" follows="left|right" name="ButtonsStack"> <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="CondenseAllButtonPanel"> - <button width="93" height="21" left="2" label="Collapse all" name="CondenseAllButton"> + <button width="93" height="21" left="2" label="Collapse all" name="collapse_all_button"> </button> </layout_panel> <layout_panel width="336" height="30" enabled="true" orientation="horizontal" name="GapLayoutPanel"> @@ -118,48 +118,4 @@ </layout_stack> </layout_panel> </layout_stack> - </floater> - -<!-- -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<floater - legacy_header_height="18" - bevel_style="in" - layout="topleft" - name="notifications_tabbed_window" - help_topic="notification_chiclet" - save_rect="true" - title="NOTIFICATIONS" - width="320" - min_width="320" - height="23" - can_minimize="false" - can_tear_off="false" - can_resize="true" - can_drag_on_left="false" - can_dock="true" - save_dock_state="true" - save_visibility="true" - single_instance="true" -> - <string - name="title_im_well_window"> - CONVERSATIONS - </string> - <string - name="title_notification_well_window"> - NOTIFICATIONS1 - </string> - - <flat_list_view - color="FloaterDefaultBackgroundColor" - follows="all" - layout="topleft" - name="notification_list" - left="1" - top="20" - height="0" - width="318"/> </floater> ---> - 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 </string> - <string - name="title_notification_well_window"> - NOTIFICATIONS - </string> <flat_list_view color="FloaterDefaultBackgroundColor" diff --git a/indra/newview/skins/default/xui/en/language_settings.xml b/indra/newview/skins/default/xui/en/language_settings.xml index 3ad0f04469..51779e4bfd 100755 --- a/indra/newview/skins/default/xui/en/language_settings.xml +++ b/indra/newview/skins/default/xui/en/language_settings.xml @@ -50,7 +50,7 @@ <string name="LTimeSec">second,datetime,local</string> <string name="LTimeHour">hour,datetime,local</string> <string name="LTimeMin">min,datetime,local</string> - <string name="LTimeYear">year,datetime,local</string> + <string name="LTimeYear">year,datetime,local</string> <string name="UTCTimeWeek">weekday,datetime,utc</string> <string name="UTCTimeDay">day,datetime,utc</string> 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 @@ <menu_item_call label="Show Notifications Console" name="Show Notifications Console" - visible="true" + visible="false" shortcut="control|shift|5"> <on_click function="Floater.Toggle" diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 05b721000f..55456723a2 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -39,23 +39,21 @@ <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> - <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification_Small" visible="false"/> - <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="incoming_transaction_icon" tool_tip="Icon" image_name="Incoming_Transaction_Small" visible="false"/> - <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="outcoming_transaction_icon" tool_tip="Icon" image_name="Outcoming_Transaction_Small" visible="false"/> + <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification" visible="false"/> </layout_panel> <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle"> <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel"> <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel"> - <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="245" height="12" layout="topleft" follows="right|left" text_color="White" + <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="260" height="12" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 </text> - <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="icon_attachment_small" tool_tip="Attachment"/> </panel> <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="250" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="true" mouse_opaque="false" name="sender_resident" visible="false"> - Sender:Resident + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_resident" visible="false"> + Sender: "Resident R e s i d e n t R e s i d e n t" </text> <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time" value="2014/12/24 23:30" /> @@ -76,19 +74,17 @@ <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> <panel border="true" top="0" left="5" height="193" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> <layout_stack top="0" left="0" width="325" height="193" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> - <layout_panel width="60" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> - <group_icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> - <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification_Large" visible="false"/> - <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="incoming_transaction_icon_exp" tool_tip="Icon" image_name="Incoming_Transaction_Large" visible="false"/> - <icon left="5" top="6" width="55" height="55" mouse_opaque="true" name="outcoming_transaction_icon_exp" tool_tip="Icon" image_name="Outcoming_Transaction_Large" visible="false"/> - <icon top="142" right="65" width="22" height="25" image_name="Icon_Attachment_Large" follows="right" mouse_opaque="true" name="icon_attachment_large" tool_tip="Attachment"/> + <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> + <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/> </layout_panel> <layout_panel width="230" height="170" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> <panel border="false" top="0" width="230" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> - 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 </text> <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false"> @@ -96,27 +92,20 @@ </text> </panel> <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="143" height="13" layout="topleft" follows="right|left" + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_resident_exp" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" </text> <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time_exp" value="2014/12/24 23:30" /> </panel> - <panel border="true" left="1" width="230" height="90" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="full_notice_text_panel_exp" visible="true" + <panel border="true" left="1" width="230" height="115" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="full_notice_text_panel_exp" visible="true" bg_visible="true"> <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="80" layout="topleft" follows="left|top|right|bottom" use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="400" name="notification_text_exp" > 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 . </text> </panel> - <panel border="true" left="1" width="230" height="21" bevel_style="none" follows="left|bottom|right" layout="topleft" name="full_notice_attach_panel_exp" visible="true" - bg_visible="true"> - <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" - use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="96" name="notification_full_text"> - 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 . - </text> - </panel> </panel> </layout_panel> <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> -- cgit v1.2.3 From 60d28437e616a6afda51a368ea40ad49a707d16c Mon Sep 17 00:00:00 2001 From: pavelk_productengine <pavelkproductengine@lindenlab.com> Date: Wed, 8 Apr 2015 19:51:39 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) added GroupNotice notification type and tab "Group" for it; 2) added Attachment field to group notice notifications which may contain inventory offers, notecards, etc; 3) added Fee field to Group Invite notifications; 4) added notification resize depending on attachment field. --- indra/newview/llfloaternotificationstabbed.cpp | 24 ++- indra/newview/llfloaternotificationstabbed.h | 3 +- indra/newview/llnotificationlistitem.cpp | 166 ++++++++++++++++----- indra/newview/llnotificationlistitem.h | 82 +++++++--- indra/newview/lltoastgroupnotifypanel.cpp | 2 +- indra/newview/llviewermessage.cpp | 1 + indra/newview/skins/default/textures/textures.xml | 2 + .../xui/en/floater_notifications_tabbed.xml | 29 +++- .../xui/en/panel_notification_list_item.xml | 69 ++++++--- 9 files changed, 289 insertions(+), 89 deletions(-) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 05a0af01ce..fd5f1486d9 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -41,7 +41,8 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LLTransientDockableFloater(NULL, true, key), mChannel(NULL), mSysWellChiclet(NULL), - mInviteMessageList(NULL), + mGroupInviteMessageList(NULL), + mGroupNoticeMessageList(NULL), mTransactionMessageList(NULL), mSystemMessageList(NULL), mNotificationsSeparator(NULL), @@ -59,10 +60,12 @@ LLFloaterNotificationsTabbed::LLFloaterNotificationsTabbed(const LLSD& key) : LL //--------------------------------------------------------------------------------- BOOL LLFloaterNotificationsTabbed::postBuild() { - mInviteMessageList = getChild<LLNotificationListView>("invite_notification_list"); + mGroupInviteMessageList = getChild<LLNotificationListView>("group_invite_notification_list"); + mGroupNoticeMessageList = getChild<LLNotificationListView>("group_notice_notification_list"); mTransactionMessageList = getChild<LLNotificationListView>("transaction_notification_list"); mSystemMessageList = getChild<LLNotificationListView>("system_notification_list"); - mNotificationsSeparator->initTaggedList(LLNotificationListItem::getInviteTypes(), mInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupInviteTypes(), mGroupInviteMessageList); + mNotificationsSeparator->initTaggedList(LLNotificationListItem::getGroupNoticeTypes(), mGroupNoticeMessageList); mNotificationsSeparator->initTaggedList(LLNotificationListItem::getTransactionTypes(), mTransactionMessageList); mNotificationsSeparator->initUnTaggedList(mSystemMessageList); mNotificationsTabContainer = getChild<LLTabContainer>("notifications_tab_container"); @@ -257,7 +260,8 @@ void LLFloaterNotificationsTabbed::updateNotificationCounters() { updateNotificationCounter(0, mSystemMessageList->size(), "system_tab_title"); updateNotificationCounter(1, mTransactionMessageList->size(), "transactions_tab_title"); - updateNotificationCounter(2, mInviteMessageList->size(), "invitations_tab_title"); + updateNotificationCounter(2, mGroupInviteMessageList->size(), "group_invitations_tab_title"); + updateNotificationCounter(3, mGroupNoticeMessageList->size(), "group_notices_tab_title"); } //--------------------------------------------------------------------------------- @@ -316,7 +320,10 @@ void LLFloaterNotificationsTabbed::getAllItemsOnCurrentTab(std::vector<LLPanel*> mTransactionMessageList->getItems(items); break; case 2: - mInviteMessageList->getItems(items); + mGroupInviteMessageList->getItems(items); + break; + case 3: + mGroupNoticeMessageList->getItems(items); break; default: break; @@ -379,10 +386,15 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); p.group_id = payload["group_id"]; - p.sender = payload["name"].asString(); + p.fee = payload["fee"]; + p.subject = payload["subject"].asString(); + p.message = payload["message"].asString(); + p.sender = payload["sender_name"].asString(); p.time_stamp = notify->getDate(); + p.received_time = payload["received_time"].asDate(); p.paid_from_id = payload["from_id"]; p.paid_to_id = payload["dest_id"]; + p.inventory_offer = payload["inventory_offer"]; addItem(p); } diff --git a/indra/newview/llfloaternotificationstabbed.h b/indra/newview/llfloaternotificationstabbed.h index 5191b783f6..8dd20b18c4 100644 --- a/indra/newview/llfloaternotificationstabbed.h +++ b/indra/newview/llfloaternotificationstabbed.h @@ -158,7 +158,8 @@ private: // ID of a toast loaded by user (by clicking notification well item) LLUUID mLoadedToastId; - LLNotificationListView* mInviteMessageList; + LLNotificationListView* mGroupInviteMessageList; + LLNotificationListView* mGroupNoticeMessageList; LLNotificationListView* mTransactionMessageList; LLNotificationListView* mSystemMessageList; LLNotificationSeparator* mNotificationsSeparator; diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 4c4dd07d7f..6b674fcc7d 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -29,10 +29,13 @@ #include "llnotificationlistitem.h" +#include "llagent.h" +#include "llinventoryicon.h" #include "llwindow.h" #include "v4color.h" #include "lltrans.h" #include "lluicolortable.h" +#include "message.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), @@ -42,7 +45,9 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mCloseBtn(NULL), mCondensedViewPanel(NULL), mExpandedViewPanel(NULL), - mMainPanel(NULL) + mCondensedHeight(0), + mExpandedHeight(0), + mExpandedHeightResize(0) { mNotificationName = p.notification_name; } @@ -60,7 +65,6 @@ BOOL LLNotificationListItem::postBuild() mCondenseBtn = getChild<LLButton>("condense_btn"); mCloseBtn = getChild<LLButton>("close_btn"); mCloseBtnExp = getChild<LLButton>("close_expanded_btn"); - mVerticalStack = getChild<LLLayoutStack>("item_vertical_stack"); mTitleBox->setValue(mParams.title); mTitleBoxExp->setValue(mParams.title); @@ -78,14 +82,13 @@ BOOL LLNotificationListItem::postBuild() mCondensedViewPanel = getChild<LLPanel>("layout_panel_condensed_view"); mExpandedViewPanel = getChild<LLPanel>("layout_panel_expanded_view"); - mMainPanel = getChild<LLPanel>("main_panel"); - std::string expanded_heigt_str = getString("item_expanded_height"); - std::string condensed_heigt_str = getString("item_condensed_height"); - - mExpandedHeight = (S32)atoi(expanded_heigt_str.c_str()); - mCondensedHeight = (S32)atoi(condensed_heigt_str.c_str()); + std::string expanded_height_str = getString("item_expanded_height"); + std::string condensed_height_str = getString("item_condensed_height"); + mExpandedHeight = (S32)atoi(expanded_height_str.c_str()); + mCondensedHeight = (S32)atoi(condensed_height_str.c_str()); + setExpanded(FALSE); return rv; } @@ -124,9 +127,13 @@ BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) //static LLNotificationListItem* LLNotificationListItem::create(const Params& p) { - if (LLNotificationListItem::getInviteTypes().count(p.notification_name)) + if (LLNotificationListItem::getGroupInviteTypes().count(p.notification_name)) + { + return new LLGroupInviteNotificationListItem(p); + } + else if (LLNotificationListItem::getGroupNoticeTypes().count(p.notification_name)) { - return new LLInviteNotificationListItem(p); + return new LLGroupNoticeNotificationListItem(p); } else if (LLNotificationListItem::getTransactionTypes().count(p.notification_name)) { @@ -136,9 +143,15 @@ LLNotificationListItem* LLNotificationListItem::create(const Params& p) } //static -std::set<std::string> LLNotificationListItem::getInviteTypes() +std::set<std::string> LLNotificationListItem::getGroupInviteTypes() +{ + return LLGroupInviteNotificationListItem::getTypes(); +} + + +std::set<std::string> LLNotificationListItem::getGroupNoticeTypes() { - return LLInviteNotificationListItem::getTypes(); + return LLGroupNoticeNotificationListItem::getTypes(); } //static @@ -164,7 +177,7 @@ void LLNotificationListItem::setExpanded(BOOL value) S32 width = this->getRect().getWidth(); if (value) { - this->reshape(width, mExpandedHeight, FALSE); + this->reshape(width, mExpandedHeight + mExpandedHeightResize, FALSE); } else { @@ -172,13 +185,20 @@ void LLNotificationListItem::setExpanded(BOOL value) } } -std::set<std::string> LLInviteNotificationListItem::getTypes() +std::set<std::string> LLGroupInviteNotificationListItem::getTypes() { std::set<std::string> types; types.insert("JoinGroup"); return types; } +std::set<std::string> LLGroupNoticeNotificationListItem::getTypes() +{ + std::set<std::string> types; + types.insert("GroupNotice"); + return types; +} + std::set<std::string> LLTransactionNotificationListItem::getTypes() { std::set<std::string> types; @@ -187,14 +207,94 @@ std::set<std::string> LLTransactionNotificationListItem::getTypes() return types; } -LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) +LLGroupNotificationListItem::LLGroupNotificationListItem(const Params& p) : LLNotificationListItem(p), - mSenderBox(NULL) + mSenderOrFeeBox(NULL) +{ +} + +LLGroupInviteNotificationListItem::LLGroupInviteNotificationListItem(const Params& p) + : LLGroupNotificationListItem(p) +{ + buildFromFile("panel_notification_list_item.xml"); +} + +BOOL LLGroupInviteNotificationListItem::postBuild() +{ + BOOL rv = LLGroupNotificationListItem::postBuild(); + setFee(mParams.fee); + return rv; +} + +void LLGroupInviteNotificationListItem::setFee(S32 fee) +{ + LLStringUtil::format_map_t string_args; + string_args["[GROUP_FEE]"] = llformat("%d", fee); + std::string fee_text = getString("group_fee_text", string_args); + mSenderOrFeeBox->setValue(fee_text); + mSenderOrFeeBoxExp->setValue(fee_text); + mSenderOrFeeBox->setVisible(TRUE); + mSenderOrFeeBoxExp->setVisible(TRUE); +} + +LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Params& p) + : LLGroupNotificationListItem(p), + mAttachmentPanel(NULL), + mAttachmentTextBox(NULL), + mAttachmentIcon(NULL), + mAttachmentIconExp(NULL), + mInventoryOffer(NULL) { + if (mParams.inventory_offer.isDefined()) + { + mInventoryOffer = new LLOfferInfo(mParams.inventory_offer); + } + buildFromFile("panel_notification_list_item.xml"); } -BOOL LLInviteNotificationListItem::postBuild() +BOOL LLGroupNoticeNotificationListItem::postBuild() +{ + BOOL rv = LLGroupNotificationListItem::postBuild(); + + mAttachmentTextBox = getChild<LLTextBox>("attachment_text"); + mAttachmentIcon = getChild<LLIconCtrl>("attachment_icon"); + mAttachmentIconExp = getChild<LLIconCtrl>("attachment_icon_exp"); + mAttachmentPanel = getChild<LLPanel>("attachment_panel"); + mAttachmentPanel->setVisible(FALSE); + + + mTitleBox->setValue(mParams.subject); + mTitleBoxExp->setValue(mParams.subject); + mNoticeTextExp->setValue(mParams.message); + //Workaround: in case server timestamp is 0 - we use the time when notification was actually received + if (mParams.time_stamp.isNull()) + { + mTimeBox->setValue(buildNotificationDate(mParams.received_time)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time)); + } + setSender(mParams.sender); + + if (mInventoryOffer != NULL) + { + mAttachmentTextBox->setValue(mInventoryOffer->mDesc); + mAttachmentIcon->setVisible(TRUE); + + std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, + LLInventoryType::IT_TEXTURE); + + mAttachmentIconExp->setValue(icon_name); + mAttachmentIconExp->setVisible(TRUE); + + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); + mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); + + mAttachmentPanel->setVisible(TRUE); + } + return rv; +} + +BOOL LLGroupNotificationListItem::postBuild() { BOOL rv = LLNotificationListItem::postBuild(); @@ -210,10 +310,8 @@ BOOL LLInviteNotificationListItem::postBuild() mGroupId = mParams.group_id; - mSenderBox = getChild<LLTextBox>("sender_resident"); - mSenderBoxExp = getChild<LLTextBox>("sender_resident_exp"); - - setSender(mParams.sender); + mSenderOrFeeBox = getChild<LLTextBox>("sender_or_fee_box"); + mSenderOrFeeBoxExp = getChild<LLTextBox>("sender_or_fee_box_exp"); LLSD value(mParams.group_id); setGroupId(value); @@ -221,7 +319,7 @@ BOOL LLInviteNotificationListItem::postBuild() return rv; } -void LLInviteNotificationListItem::changed(LLGroupChange gc) +void LLGroupNotificationListItem::changed(LLGroupChange gc) { if (GC_PROPERTIES == gc) { @@ -229,7 +327,7 @@ void LLInviteNotificationListItem::changed(LLGroupChange gc) } } -bool LLInviteNotificationListItem::updateFromCache() +bool LLGroupNotificationListItem::updateFromCache() { LLGroupMgrGroupData* group_data = LLGroupMgr::getInstance()->getGroupData(mGroupId); if (!group_data) return false; @@ -237,7 +335,7 @@ bool LLInviteNotificationListItem::updateFromCache() return true; } -void LLInviteNotificationListItem::setGroupId(const LLUUID& value) +void LLGroupNotificationListItem::setGroupId(const LLUUID& value) { LLGroupMgr* gm = LLGroupMgr::getInstance(); if (mGroupId.notNull()) @@ -255,7 +353,7 @@ void LLInviteNotificationListItem::setGroupId(const LLUUID& value) } } -void LLInviteNotificationListItem::setGroupName(std::string name) +void LLGroupNotificationListItem::setGroupName(std::string name) { if (!name.empty()) { @@ -272,22 +370,22 @@ void LLInviteNotificationListItem::setGroupName(std::string name) } } -void LLInviteNotificationListItem::setSender(std::string sender) +void LLGroupNoticeNotificationListItem::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); + mSenderOrFeeBox->setValue(sender_text); + mSenderOrFeeBoxExp->setValue(sender_text); + mSenderOrFeeBox->setVisible(TRUE); + mSenderOrFeeBoxExp->setVisible(TRUE); } else { - mSenderBox->setValue(LLStringUtil::null); - mSenderBoxExp->setValue(LLStringUtil::null); - mSenderBox->setVisible(FALSE); - mSenderBoxExp->setVisible(FALSE); + mSenderOrFeeBox->setValue(LLStringUtil::null); + mSenderOrFeeBoxExp->setValue(LLStringUtil::null); + mSenderOrFeeBox->setVisible(FALSE); + mSenderOrFeeBoxExp->setVisible(FALSE); } } diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 22003a3a6a..bd76d17fe8 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -35,6 +35,7 @@ #include "llavatariconctrl.h" #include "llgroupmgr.h" +#include "llviewermessage.h" #include <string> @@ -49,15 +50,21 @@ public: LLUUID paid_to_id; std::string notification_name; std::string title; + std::string subject; + std::string message; std::string sender; - LLDate time_stamp; + S32 fee; + LLDate time_stamp; + LLDate received_time; + LLSD inventory_offer; Params() {}; }; static LLNotificationListItem* create(const Params& p); - static std::set<std::string> getInviteTypes(); static std::set<std::string> getTransactionTypes(); + static std::set<std::string> getGroupInviteTypes(); + static std::set<std::string> getGroupNoticeTypes(); // title void setTitle( std::string title ); @@ -99,43 +106,80 @@ protected: LLButton* mCondenseBtn; LLButton* mCloseBtn; LLButton* mCloseBtnExp; - LLLayoutStack* mVerticalStack; LLPanel* mCondensedViewPanel; LLPanel* mExpandedViewPanel; - LLPanel* mMainPanel; std::string mTitle; std::string mNotificationName; - S32 mCondensedHeight; - S32 mExpandedHeight; + S32 mCondensedHeight; + S32 mExpandedHeight; + S32 mExpandedHeightResize; }; -class LLInviteNotificationListItem +class LLGroupNotificationListItem : public LLNotificationListItem, public LLGroupMgrObserver { public: - static std::set<std::string> getTypes(); virtual BOOL postBuild(); void setGroupId(const LLUUID& value); // LLGroupMgrObserver observer trigger virtual void changed(LLGroupChange gc); -private: - friend class LLNotificationListItem; - LLInviteNotificationListItem(const Params& p); - LLInviteNotificationListItem(const LLInviteNotificationListItem &); - LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); - void setSender(std::string sender); - void setGroupName(std::string name); - - bool updateFromCache(); + friend class LLNotificationListItem; +protected: + LLGroupNotificationListItem(const Params& p); LLGroupIconCtrl* mGroupIcon; LLGroupIconCtrl* mGroupIconExp; LLUUID mGroupId; - LLTextBox* mSenderBox; - LLTextBox* mSenderBoxExp; + LLTextBox* mSenderOrFeeBox; + LLTextBox* mSenderOrFeeBoxExp; LLTextBox* mGroupNameBoxExp; + +private: + LLGroupNotificationListItem(const LLGroupNotificationListItem &); + LLGroupNotificationListItem & operator=(LLGroupNotificationListItem &); + + void setGroupName(std::string name); + bool updateFromCache(); +}; + +class LLGroupInviteNotificationListItem + : public LLGroupNotificationListItem +{ +public: + static std::set<std::string> getTypes(); + virtual BOOL postBuild(); + +private: + friend class LLNotificationListItem; + LLGroupInviteNotificationListItem(const Params& p); + LLGroupInviteNotificationListItem(const LLGroupInviteNotificationListItem &); + LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &); + + void setFee(S32 fee); +}; + +class LLGroupNoticeNotificationListItem + : public LLGroupNotificationListItem +{ +public: + static std::set<std::string> getTypes(); + virtual BOOL postBuild(); + +private: + friend class LLNotificationListItem; + LLGroupNoticeNotificationListItem(const Params& p); + LLGroupNoticeNotificationListItem(const LLGroupNoticeNotificationListItem &); + LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &); + + void setSender(std::string sender); + + LLPanel* mAttachmentPanel; + LLTextBox* mAttachmentTextBox; + LLIconCtrl* mAttachmentIcon; + LLIconCtrl* mAttachmentIconExp; + LLOfferInfo* mInventoryOffer; }; class LLTransactionNotificationListItem : public LLNotificationListItem diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index e00b18dedb..def5a0ac7c 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -92,7 +92,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi +LLTrans::getString("UTCTimeSec")+"] [" +LLTrans::getString("UTCTimeTimezone")+"]"; const LLDate timeStamp = notification->getDate(); - LLDate notice_date = timeStamp.notNull() ? timeStamp : LLDate::now(); + LLDate notice_date = timeStamp.notNull() ? timeStamp : payload["received_time"]; LLSD substitution; substitution["datetime"] = (S32) notice_date.secondsSinceEpoch(); LLStringUtil::format(timeStr, substitution); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6507794cdd..99db3ff093 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2681,6 +2681,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["sender_name"] = name; payload["group_id"] = group_id; payload["inventory_name"] = item_name; + payload["received_time"] = LLDate::now(); if(info && info->asLLSD()) { payload["inventory_offer"] = info->asLLSD(); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e47e0c03f1..4f8962182e 100755 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -798,4 +798,6 @@ with the same filename but different name <texture name="Notification_Condense" file_name="icons/Icon_Notification_Condense.png" preload="true"/> <texture name="Notification_Expand" file_name="icons/Icon_Notification_Expand.png" preload="true"/> <texture name="System_Notification" file_name="icons/SL_Logo.png" preload="true"/> + <texture name="Icon_Attachment_Small" file_name="icons/Icon_Attachment_Small.png" preload="true"/> + <texture name="Icon_Attachment_Large" file_name="icons/Icon_Attachment_Large.png" preload="true"/> </textures> 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 55ecfb637b..0fdd9ed0c6 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -28,9 +28,13 @@ Transactions ([COUNT]) </floater.string> <floater.string - name="invitations_tab_title"> + name="group_invitations_tab_title"> Invitations ([COUNT]) </floater.string> + <floater.string + name="group_notices_tab_title"> + Group ([COUNT]) + </floater.string> <string name="title_notification_tabbed_window"> @@ -72,7 +76,7 @@ follows="left|top|right|bottom" label="Transactions (0)" layout="topleft" - name="TransactionNotificationsTab"> + name="transaction_notifications_tab"> <notification_list_view color="FloaterDefaultBackgroundColor" follows="all" @@ -89,12 +93,29 @@ follows="left|top|right|bottom" label="Invitations (0)" layout="topleft" - name="InviteNotificationsTab"> + name="group_invite_notifications_tab"> + <notification_list_view + color="FloaterDefaultBackgroundColor" + follows="all" + layout="topleft" + name="group_invite_notification_list" + left="0" + top="5" + height="0" + width="328"/> + </panel> + <panel + border="true" + bevel_style="none" + follows="left|top|right|bottom" + label="Group (0)" + layout="topleft" + name="group_notice_notifications_tab"> <notification_list_view color="FloaterDefaultBackgroundColor" follows="all" layout="topleft" - name="invite_notification_list" + name="group_notice_notification_list" left="0" top="5" height="0" diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 55456723a2..7b57cddd7b 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -8,7 +8,7 @@ top="0" left="0" width="331" - height="200" + height="202" can_resize="true" layout="topleft" follows="left|top|right|bottom" @@ -23,18 +23,26 @@ name="group_name_text"> Group: "[GROUP_NAME]" </panel.string> + <panel.string + name="group_fee_text"> + Fee: [GROUP_FEE] + </panel.string> <panel.string name="item_condensed_height"> 50 </panel.string> <panel.string name="item_expanded_height"> - 200 + 175 + </panel.string> + <panel.string + name="expanded_height_resize_for_attachment"> + 27 </panel.string> <panel top="0" left="0" width="331" height="196" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_total_view"> <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack"> - <layout_panel top="0" left="0" height="30" layout="topleft" follows="left|top|right|bottom" name="layout_panel_condensed_view" visible="false"> + <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false"> <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view"> <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> @@ -49,10 +57,11 @@ use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 </text> + <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/> </panel> <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_resident" visible="false"> + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" </text> <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" @@ -60,27 +69,30 @@ </panel> </panel> </layout_panel> - <layout_panel width="18" height="48" orientation="horizontal" follows="left|top" name="layout_panel_right"> - <panel top="0" left="0" width="17" height="39" follows="left|top" layout="topleft" name="close_expand_panel"> - <button top="0" left="1" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" + <layout_panel width="18" height="48" orientation="horizontal" follows="right|top|bottom" name="layout_panel_right"> + <panel top="0" left="0" width="17" height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel"> + <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button top="25" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true" + <button bottom="-16" right="15" width="17" height="17" layout="topleft" follows="bottom" name="expand_btn" mouse_opaque="true" tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> </panel> </layout_panel> </layout_stack> - </panel> + </panel> </layout_panel> <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> - <panel border="true" top="0" left="5" height="193" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> - <layout_stack top="0" left="0" width="325" height="193" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> + <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> + <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/> + <icon left="12" top="144" width="20" height="20" name="attachment_icon_exp" tool_tip="Attachment" image_name="Icon_Attachment_Large" follows="left" mouse_opaque="true" visible="false"/> </layout_panel> - <layout_panel width="230" height="170" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> - <panel border="false" top="0" width="230" height="38" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> + <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> + <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> + <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack"> + <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true"> <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> @@ -93,32 +105,41 @@ </panel> <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_resident_exp" visible="false"> + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" </text> <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time_exp" value="2014/12/24 23:30" /> </panel> - <panel border="true" left="1" width="230" height="115" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="full_notice_text_panel_exp" visible="true" + <panel border="true" left="1" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true" + bg_visible="true"> + <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="70" layout="topleft" follows="left|top|right|bottom" + use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="370" name="notification_text_exp" > + 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 . + </text> + </panel> + <panel border="true" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false" bg_visible="true"> - <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="80" layout="topleft" follows="left|top|right|bottom" - use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="400" name="notification_text_exp" > - 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 . + <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" + use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="96" name="attachment_text"> + 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 . </text> </panel> + </layout_panel> + </layout_stack> </panel> </layout_panel> <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp"> - <button top="0" left="1" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" + <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button top="175" left="0" width="17" height="17" layout="topleft" follows="top" name="condense_btn" mouse_opaque="true" + <button bottom="5" left="0" width="17" height="17" layout="topleft" follows="bottom" name="condense_btn" mouse_opaque="true" tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" /> </panel> </layout_panel> - </layout_stack> + </layout_stack> + </panel> + </layout_panel> + </layout_stack> </panel> - </layout_panel> -</layout_stack> -</panel> </panel> -- cgit v1.2.3 From 7669f953a76d615801cec788783ca6a77528886b Mon Sep 17 00:00:00 2001 From: pavelkproductengine <none@none> Date: Thu, 9 Apr 2015 17:16:47 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) fixed Mac build; 2) moved attachment icon in condensed view 1 pixel down. --- indra/newview/lltoastgroupnotifypanel.cpp | 2 +- indra/newview/skins/default/xui/en/panel_notification_list_item.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index def5a0ac7c..e22f527a65 100755 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -92,7 +92,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(const LLNotificationPtr& notifi +LLTrans::getString("UTCTimeSec")+"] [" +LLTrans::getString("UTCTimeTimezone")+"]"; const LLDate timeStamp = notification->getDate(); - LLDate notice_date = timeStamp.notNull() ? timeStamp : payload["received_time"]; + LLDate notice_date = timeStamp.notNull() ? timeStamp : payload["received_time"].asDate(); LLSD substitution; substitution["datetime"] = (S32) notice_date.secondsSinceEpoch(); LLStringUtil::format(timeStr, substitution); diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 7b57cddd7b..56f3c36df6 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -57,7 +57,7 @@ use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 </text> - <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/> + <icon top="1" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/> </panel> <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left" -- cgit v1.2.3 From f479235aaa94555ee0ea7a663187ae9930d7d5f4 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <pavelkproductengine@lindenlab.com> Date: Tue, 19 May 2015 13:20:46 +0300 Subject: MAINT-4734 (Separate transaction notices from group notice/invites) 1) disabled popup show (toast) when clicking on notification in expanded view; 2) made attachment in Group Notice notification clickable (copied logic from LLToastGroupNotifyPanel); 3) removed border around notification text in expanded view and made lighter background; 4) removed border around attachment field in expanded notification view. --- indra/newview/llfloaternotificationstabbed.cpp | 2 +- indra/newview/llnotificationlistitem.cpp | 55 +++++- indra/newview/llnotificationlistitem.h | 52 +++--- .../xui/en/panel_notification_list_item.xml | 196 ++++++++++----------- 4 files changed, 180 insertions(+), 125 deletions(-) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index fd5f1486d9..70213680f3 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -402,7 +402,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); - LLFloaterReg::showInstance("inspect_toast", id); + //LLFloaterReg::showInstance("inspect_toast", id); } //--------------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 6b674fcc7d..8e7671897d 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -57,7 +57,7 @@ BOOL LLNotificationListItem::postBuild() BOOL rv = LLPanel::postBuild(); mTitleBox = getChild<LLTextBox>("notification_title"); mTitleBoxExp = getChild<LLTextBox>("notification_title_exp"); - mNoticeTextExp = getChild<LLTextBox>("notification_text_exp"); + mNoticeTextExp = getChild<LLViewerTextEditor>("notification_text_exp"); mTimeBox = getChild<LLTextBox>("notification_time"); mTimeBoxExp = getChild<LLTextBox>("notification_time_exp"); @@ -115,6 +115,7 @@ std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_sta void LLNotificationListItem::onClickCloseBtn() { mOnItemClose(this); + close(); } BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) @@ -278,14 +279,17 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() if (mInventoryOffer != NULL) { mAttachmentTextBox->setValue(mInventoryOffer->mDesc); + mAttachmentTextBox->setVisible(TRUE); mAttachmentIcon->setVisible(TRUE); std::string icon_name = LLInventoryIcon::getIconName(mInventoryOffer->mType, LLInventoryType::IT_TEXTURE); - mAttachmentIconExp->setValue(icon_name); mAttachmentIconExp->setVisible(TRUE); + mAttachmentTextBox->setClickedCallback(boost::bind( + &LLGroupNoticeNotificationListItem::onClickAttachment, this)); + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); @@ -388,6 +392,53 @@ void LLGroupNoticeNotificationListItem::setSender(std::string sender) mSenderOrFeeBoxExp->setVisible(FALSE); } } +void LLGroupNoticeNotificationListItem::close() +{ + // The group notice dialog may be an inventory offer. + // If it has an inventory save button and that button is still enabled + // Then we need to send the inventory declined message + if (mInventoryOffer != NULL) + { + mInventoryOffer->forceResponse(IOR_DECLINE); + mInventoryOffer = NULL; + } +} + +void LLGroupNoticeNotificationListItem::onClickAttachment() +{ + if (mInventoryOffer != NULL) { + mInventoryOffer->forceResponse(IOR_ACCEPT); + + static const LLUIColor textColor = LLUIColorTable::instance().getColor( + "GroupNotifyDimmedTextColor"); + mAttachmentTextBox->setColor(textColor); + mAttachmentIconExp->setEnabled(FALSE); + + //if attachment isn't openable - notify about saving + if (!isAttachmentOpenable(mInventoryOffer->mType)) { + LLNotifications::instance().add("AttachmentSaved", LLSD(), LLSD()); + } + + mInventoryOffer = NULL; + } +} + +//static +bool LLGroupNoticeNotificationListItem::isAttachmentOpenable(LLAssetType::EType type) +{ + switch (type) + { + case LLAssetType::AT_LANDMARK: + case LLAssetType::AT_NOTECARD: + case LLAssetType::AT_IMAGE_JPEG: + case LLAssetType::AT_IMAGE_TGA: + case LLAssetType::AT_TEXTURE: + case LLAssetType::AT_TEXTURE_TGA: + return true; + default: + return false; + } +} LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) : LLNotificationListItem(p), diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index bd76d17fe8..f8d9fc0330 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -30,6 +30,7 @@ #include "llpanel.h" #include "lllayoutstack.h" #include "lltextbox.h" +#include "llviewertexteditor.h" #include "llbutton.h" #include "llgroupiconctrl.h" #include "llavatariconctrl.h" @@ -95,24 +96,25 @@ protected: void onClickExpandBtn(); void onClickCondenseBtn(); void onClickCloseBtn(); - - Params mParams; - LLTextBox* mTitleBox; - LLTextBox* mTitleBoxExp; - LLTextBox* mNoticeTextExp; - LLTextBox* mTimeBox; - LLTextBox* mTimeBoxExp; - LLButton* mExpandBtn; - LLButton* mCondenseBtn; - LLButton* mCloseBtn; - LLButton* mCloseBtnExp; - LLPanel* mCondensedViewPanel; - LLPanel* mExpandedViewPanel; - std::string mTitle; - std::string mNotificationName; - S32 mCondensedHeight; - S32 mExpandedHeight; - S32 mExpandedHeightResize; + virtual void close() {}; + + Params mParams; + LLTextBox* mTitleBox; + LLTextBox* mTitleBoxExp; + LLViewerTextEditor* mNoticeTextExp; + LLTextBox* mTimeBox; + LLTextBox* mTimeBoxExp; + LLButton* mExpandBtn; + LLButton* mCondenseBtn; + LLButton* mCloseBtn; + LLButton* mCloseBtnExp; + LLPanel* mCondensedViewPanel; + LLPanel* mExpandedViewPanel; + std::string mTitle; + std::string mNotificationName; + S32 mCondensedHeight; + S32 mExpandedHeight; + S32 mExpandedHeightResize; }; class LLGroupNotificationListItem @@ -174,12 +176,16 @@ private: LLGroupNoticeNotificationListItem & operator=(LLGroupNoticeNotificationListItem &); void setSender(std::string sender); + void onClickAttachment(); + /*virtual*/ void close(); + + static bool isAttachmentOpenable(LLAssetType::EType); - LLPanel* mAttachmentPanel; - LLTextBox* mAttachmentTextBox; - LLIconCtrl* mAttachmentIcon; - LLIconCtrl* mAttachmentIconExp; - LLOfferInfo* mInventoryOffer; + LLPanel* mAttachmentPanel; + LLTextBox* mAttachmentTextBox; + LLIconCtrl* mAttachmentIcon; + LLIconCtrl* mAttachmentIconExp; + LLOfferInfo* mInventoryOffer; }; class LLTransactionNotificationListItem : public LLNotificationListItem diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 7b57cddd7b..971042eee7 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -11,10 +11,10 @@ height="202" can_resize="true" layout="topleft" - follows="left|top|right|bottom" - background_opaque="false" - background_visible="true" - bg_alpha_color="PanelNotificationListItem" > + follows="left|top|right|bottom" > + <!-- background_opaque="false" --> + <!-- background_visible="true"> --> + <!-- bg_alpha_color="PanelNotificationListItem"> --> <panel.string name="sender_resident_text"> Sender: "[SENDER_RESIDENT]" @@ -41,105 +41,103 @@ </panel.string> <panel top="0" left="0" width="331" height="196" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_total_view"> - <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack"> - <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false"> - <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view"> - <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> - <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> - <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> - <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> - <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification" visible="false"/> - </layout_panel> - <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle"> - <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel"> - <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel"> - <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="260" height="12" layout="topleft" follows="right|left" text_color="White" - use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 - </text> - <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/> - </panel> - <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false"> - Sender: "Resident R e s i d e n t R e s i d e n t" - </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" - name="notification_time" value="2014/12/24 23:30" /> - </panel> - </panel> - </layout_panel> - <layout_panel width="18" height="48" orientation="horizontal" follows="right|top|bottom" name="layout_panel_right"> - <panel top="0" left="0" width="17" height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel"> - <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button bottom="-16" right="15" width="17" height="17" layout="topleft" follows="bottom" name="expand_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> - </panel> - </layout_panel> - </layout_stack> - </panel> - </layout_panel> - <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> - <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> - <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> - <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> - <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> - <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> - <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/> - <icon left="12" top="144" width="20" height="20" name="attachment_icon_exp" tool_tip="Attachment" image_name="Icon_Attachment_Large" follows="left" mouse_opaque="true" visible="false"/> - </layout_panel> - <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> - <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> - <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack"> - <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true"> - <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> - <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> - 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 - </text> - <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false"> - Group Name Group Name Group Na m e e - </text> - </panel> - <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> - <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false"> - Sender: "Resident R e s i d e n t R e s i d e n t" - </text> - <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" - name="notification_time_exp" value="2014/12/24 23:30" /> - </panel> - <panel border="true" left="1" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true" - bg_visible="true"> - <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="70" layout="topleft" follows="left|top|right|bottom" - use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="370" name="notification_text_exp" > - 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 . - </text> - </panel> - <panel border="true" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false" - bg_visible="true"> - <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" - use_ellipses="true" word_wrap="true" mouse_opaque="false" max_length="96" name="attachment_text"> - 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 . - </text> - </panel> - </layout_panel> + <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack"> + <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false"> + <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view"> + <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> + <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> + <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon" tool_tip="Icon" image_name="System_Notification" visible="false"/> + </layout_panel> + <layout_panel width="260" height="50" orientation="horizontal" name="layout_panel_middle"> + <panel border="false" top="0" width="260" height="38" bevel_style="none" follows="left|top|right" layout="topleft" name="main_info_panel"> + <panel border="false" top="0" left="0" width="260" height="19" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="notification_title_panel"> + <text allow_scroll="false" font="SansSerifSmall" top="6" left="0" width="260" height="12" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="true" mouse_opaque="false" name="notification_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 + </text> + <icon top="0" left="242" width="21" height="21" image_name="Icon_Attachment_Small" follows="right" mouse_opaque="true" name="attachment_icon" tool_tip="Attachment" visible="false"/> + </panel> + <panel border="false" top="23" left="0" width="260" height="15" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="sender_time_panel"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="170" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box" visible="false"> + Sender: "Resident R e s i d e n t R e s i d e n t" + </text> + <text allow_scroll="false" font="SansSerifSmall" top="0" right="-5" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="notification_time" value="2014/12/24 23:30" /> + </panel> + </panel> + </layout_panel> + <layout_panel width="18" height="48" orientation="horizontal" follows="right|top|bottom" name="layout_panel_right"> + <panel top="0" left="0" width="17" height="39" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel"> + <button top="0" left="0" width="17" height="17" layout="topleft" follows="top" name="close_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> + <button bottom="-16" right="15" width="17" height="17" layout="topleft" follows="bottom" name="expand_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Notification_Expand" image_selected="Notification_Expand" /> + </panel> + </layout_panel> </layout_stack> </panel> </layout_panel> - <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> - <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp"> - <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> - <button bottom="5" left="0" width="17" height="17" layout="topleft" follows="bottom" name="condense_btn" mouse_opaque="true" - tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" /> + <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> + <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> + <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> + <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> + <group_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="group_icon_exp" tool_tip="Group" default_icon_name="Generic_Group" visible="true"/> + <avatar_icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="avatar_icon_exp" tool_tip="Avatar" default_icon_name="Generic_Person" visible="false"/> + <icon left="5" top="6" width="25" height="25" mouse_opaque="true" name="system_notification_icon_exp" tool_tip="Icon" image_name="System_Notification" visible="false"/> + <icon left="12" top="144" width="20" height="20" name="attachment_icon_exp" tool_tip="Attachment" image_name="Icon_Attachment_Large" follows="left" mouse_opaque="true" visible="false"/> + </layout_panel> + <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> + <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> + <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack"> + <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true"> + <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> + <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> + 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 + </text> + <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false"> + Group Name Group Name Group Na m e e + </text> + </panel> + <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> + <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left" + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false"> + Sender: "Resident R e s i d e n t R e s i d e n t" + </text> + <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" + name="notification_time_exp" value="2014/12/24 23:30" /> + </panel> + <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true"> + <text_editor enabled="false" top="0" left="0" width="230" height="110" layout="topleft" follows="left|top|right|bottom" + word_wrap="true" max_length="65536" name="notification_text_exp" > + 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 . + </text_editor> + </panel> + <panel border="false" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false"> + <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" + use_ellipses="true" word_wrap="true" max_length="96" name="attachment_text"> + 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 . + </text> + </panel> + </layout_panel> + </layout_stack> + </panel> + </layout_panel> + <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> + <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp"> + <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Icon_Close_Foreground" image_selected="Icon_Close_Press" /> + <button bottom="5" left="0" width="17" height="17" layout="topleft" follows="bottom" name="condense_btn" mouse_opaque="true" + tab_stop="false" image_unselected="Notification_Condense" image_selected="Notification_Condense" /> + </panel> + </layout_panel> + </layout_stack> </panel> </layout_panel> - </layout_stack> - </panel> - </layout_panel> - </layout_stack> + </layout_stack> </panel> </panel> -- cgit v1.2.3 From 33c5a3974c210af259d3572193bcdcd65137d888 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 13 Jul 2015 17:52:42 +0300 Subject: MAINT-5369 FIXED Unable to accept group invite using Notification floater --- indra/newview/llfloaternotificationstabbed.cpp | 1 + indra/newview/llnotificationlistitem.cpp | 64 +++++++++++++++++++++- indra/newview/llnotificationlistitem.h | 10 ++++ .../xui/en/panel_notification_list_item.xml | 9 ++- 4 files changed, 81 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 70213680f3..57109c6763 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -385,6 +385,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) LLNotificationPtr notify = mChannel->getToastByNotificationID(id)->getNotification(); LLSD payload = notify->getPayload(); p.notification_name = notify->getName(); + p.transaction_id = payload["transaction_id"]; p.group_id = payload["group_id"]; p.fee = payload["fee"]; p.subject = payload["subject"].asString(); diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 8e7671897d..23a2399ed3 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -30,13 +30,14 @@ #include "llnotificationlistitem.h" #include "llagent.h" +#include "llgroupactions.h" #include "llinventoryicon.h" #include "llwindow.h" #include "v4color.h" #include "lltrans.h" #include "lluicolortable.h" #include "message.h" - +#include "llnotificationsutil.h" LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), mTitleBox(NULL), @@ -224,9 +225,70 @@ BOOL LLGroupInviteNotificationListItem::postBuild() { BOOL rv = LLGroupNotificationListItem::postBuild(); setFee(mParams.fee); + mInviteButtonPanel = getChild<LLPanel>("button_panel"); + mInviteButtonPanel->setVisible(TRUE); + mJoinBtn = getChild<LLButton>("join_btn"); + mDeclineBtn = getChild<LLButton>("decline_btn"); + mInfoBtn = getChild<LLButton>("info_btn"); + + mJoinBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickJoinBtn,this)); + mDeclineBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickDeclineBtn,this)); + mInfoBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickInfoBtn,this)); + + std::string expanded_height_resize_str = getString("expanded_height_resize_for_attachment"); + mExpandedHeightResize = (S32)atoi(expanded_height_resize_str.c_str()); + return rv; } +void LLGroupInviteNotificationListItem::onClickJoinBtn() +{ + if (!gAgent.canJoinGroups()) + { + LLNotificationsUtil::add("JoinedTooManyGroups"); + return; + } + + if(mParams.fee > 0) + { + LLSD args; + args["COST"] = llformat("%d", mParams.fee); + // Set the fee for next time to 0, so that we don't keep + // asking about a fee. + LLSD next_payload; + next_payload["group_id"]= mParams.group_id; + next_payload["transaction_id"]= mParams.transaction_id; + next_payload["fee"] = 0; + LLNotificationsUtil::add("JoinGroupCanAfford", args, next_payload); + } + else + { + send_improved_im(mParams.group_id, + std::string("name"), + std::string("message"), + IM_ONLINE, + IM_GROUP_INVITATION_ACCEPT, + mParams.transaction_id); + } + LLNotificationListItem::onClickCloseBtn(); +} + +void LLGroupInviteNotificationListItem::onClickDeclineBtn() +{ + send_improved_im(mParams.group_id, + std::string("name"), + std::string("message"), + IM_ONLINE, + IM_GROUP_INVITATION_DECLINE, + mParams.transaction_id); + LLNotificationListItem::onClickCloseBtn(); +} + +void LLGroupInviteNotificationListItem::onClickInfoBtn() +{ + LLGroupActions::show(mParams.group_id); +} + void LLGroupInviteNotificationListItem::setFee(S32 fee) { LLStringUtil::format_map_t string_args; diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index f8d9fc0330..6801e77342 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -46,6 +46,7 @@ public: struct Params : public LLInitParam::Block<Params, LLPanel::Params> { LLUUID notification_id; + LLUUID transaction_id; LLUUID group_id; LLUUID paid_from_id; LLUUID paid_to_id; @@ -160,6 +161,15 @@ private: LLGroupInviteNotificationListItem & operator=(LLGroupInviteNotificationListItem &); void setFee(S32 fee); + + void onClickJoinBtn(); + void onClickDeclineBtn(); + void onClickInfoBtn(); + + LLPanel* mInviteButtonPanel; + LLButton* mJoinBtn; + LLButton* mDeclineBtn; + LLButton* mInfoBtn; }; class LLGroupNoticeNotificationListItem diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 3dbe11387a..6af0115a07 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -123,10 +123,15 @@ 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 . </text> </panel> + <panel border="false" left="0" bottom="-4" height="30" bevel_style="none" follows="left|right|bottom" layout="topleft" name="button_panel" visible="false"> + <button top="2" left="0" width="65" height="23" layout="topleft" follows="left|top|bottom" name="join_btn" mouse_opaque="true" tab_stop="false" label = "Join"/> + <button top="2" left_pad="12" width="65" height="23" layout="topleft" follows="left|top|bottom" name="decline_btn" mouse_opaque="true" tab_stop="false" label = "Decline"/> + <button top="2" left_pad="12" width="65" height="23" layout="topleft" follows="left|top|bottom" name="info_btn" mouse_opaque="true" tab_stop="false" label = "Info"/> + </panel> </layout_panel> </layout_stack> - </panel> - </layout_panel> + </panel> + </layout_panel> <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> <panel top="0" left="0" width="17" follows="left|top|right|bottom" layout="topleft" name="close_expand_panel_exp"> <button top="0" left="2" width="17" height="17" layout="topleft" follows="top" name="close_expanded_btn" mouse_opaque="true" -- cgit v1.2.3 From 3d4433de504c0ac17f2d3d98d3cbc43955cc1dda Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 14 Jul 2015 14:08:28 +0300 Subject: MAINT-5380 FIXED Links are not clickable in group notices --- indra/newview/skins/default/xui/en/panel_notification_list_item.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 6af0115a07..344ba70290 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -113,7 +113,7 @@ </panel> <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true"> <text_editor enabled="false" top="0" left="0" width="230" height="110" layout="topleft" follows="left|top|right|bottom" - word_wrap="true" max_length="65536" name="notification_text_exp" > + word_wrap="true" max_length="65536" name="notification_text_exp" parse_highlights="true" parse_urls="true"> 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 . </text_editor> </panel> -- cgit v1.2.3 From 8b498ab961f14cfb03834422c4b2b33a91f91f6e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 16 Jul 2015 13:19:14 +0300 Subject: MAINT-5396 FIXED Group notice timestamps are no longer GMT --- indra/newview/llnotificationlistitem.cpp | 42 +++++++++++++++++++++++++------- indra/newview/llnotificationlistitem.h | 10 +++++++- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 23a2399ed3..ddbc5f3916 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -99,14 +99,35 @@ LLNotificationListItem::~LLNotificationListItem() } //static -std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_stamp) +std::string LLNotificationListItem::buildNotificationDate(const LLDate& time_stamp, ETimeType time_type) { - std::string timeStr = "[" + LLTrans::getString("LTimeMthNum") + "]/[" - +LLTrans::getString("LTimeDay")+"]/[" - +LLTrans::getString("LTimeYear")+"] [" - +LLTrans::getString("LTimeHour")+"]:[" - +LLTrans::getString("LTimeMin")+"]"; - + std::string timeStr; + switch(time_type) + { + case Local: + timeStr = "[" + LLTrans::getString("LTimeMthNum") + "]/[" + +LLTrans::getString("LTimeDay")+"]/[" + +LLTrans::getString("LTimeYear")+"] [" + +LLTrans::getString("LTimeHour")+"]:[" + +LLTrans::getString("LTimeMin")+ "]"; + break; + case UTC: + timeStr = "[" + LLTrans::getString("UTCTimeMth") + "]/[" + +LLTrans::getString("UTCTimeDay")+"]/[" + +LLTrans::getString("UTCTimeYr")+"] [" + +LLTrans::getString("UTCTimeHr")+"]:[" + +LLTrans::getString("UTCTimeMin")+"] [" + +LLTrans::getString("UTCTimeTimezone")+"]"; + break; + case SLT: + default: + timeStr = "[" + LLTrans::getString("TimeMonth") + "]/[" + +LLTrans::getString("TimeDay")+"]/[" + +LLTrans::getString("TimeYear")+"] [" + +LLTrans::getString("TimeHour")+"]:[" + +LLTrans::getString("TimeMin")+"]"; + break; + } LLSD substitution; substitution["datetime"] = time_stamp; LLStringUtil::format(timeStr, substitution); @@ -330,11 +351,14 @@ BOOL LLGroupNoticeNotificationListItem::postBuild() mTitleBox->setValue(mParams.subject); mTitleBoxExp->setValue(mParams.subject); mNoticeTextExp->setValue(mParams.message); + + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp, UTC)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp, UTC)); //Workaround: in case server timestamp is 0 - we use the time when notification was actually received if (mParams.time_stamp.isNull()) { - mTimeBox->setValue(buildNotificationDate(mParams.received_time)); - mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time)); + mTimeBox->setValue(buildNotificationDate(mParams.received_time, UTC)); + mTimeBoxExp->setValue(buildNotificationDate(mParams.received_time, UTC)); } setSender(mParams.sender); diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 6801e77342..d00016fc15 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -89,11 +89,19 @@ public: void setExpanded(BOOL value); virtual BOOL postBuild(); + + typedef enum e_time_type + { + SLT = 1, + Local = 2, + UTC = 3, + }ETimeType; + protected: LLNotificationListItem(const Params& p); virtual ~LLNotificationListItem(); - static std::string buildNotificationDate(const LLDate&); + static std::string buildNotificationDate(const LLDate& time_stamp, ETimeType time_type = SLT); void onClickExpandBtn(); void onClickCondenseBtn(); void onClickCloseBtn(); -- cgit v1.2.3 From da0f280ec3989789db4d502f4b34797c03dea9fa Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 20 Jul 2015 16:38:57 +0300 Subject: MAINT-5414 FIXED Viewer crashes after opening Group info panel --- indra/newview/llnotificationlistitem.cpp | 28 ++++++++++++++++++---------- indra/newview/llnotificationlistitem.h | 1 + 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index ddbc5f3916..67f3d0720f 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -337,6 +337,11 @@ LLGroupNoticeNotificationListItem::LLGroupNoticeNotificationListItem(const Param buildFromFile("panel_notification_list_item.xml"); } +LLGroupNoticeNotificationListItem::~LLGroupNoticeNotificationListItem() +{ + LLGroupMgr::getInstance()->removeObserver(this); +} + BOOL LLGroupNoticeNotificationListItem::postBuild() { BOOL rv = LLGroupNotificationListItem::postBuild(); @@ -413,7 +418,8 @@ void LLGroupNotificationListItem::changed(LLGroupChange gc) { if (GC_PROPERTIES == gc) { - updateFromCache(); + updateFromCache(); + LLGroupMgr::getInstance()->removeObserver(this); } } @@ -427,19 +433,20 @@ bool LLGroupNotificationListItem::updateFromCache() void LLGroupNotificationListItem::setGroupId(const LLUUID& value) { - LLGroupMgr* gm = LLGroupMgr::getInstance(); - if (mGroupId.notNull()) + LLGroupMgr* gm = LLGroupMgr::getInstance(); + if (mGroupId.notNull()) { gm->removeObserver(this); - } - mID = mGroupId; - // Check if cache already contains image_id for that group - if (!updateFromCache()) - { - gm->addObserver(this); - gm->sendGroupPropertiesRequest(mGroupId); + mID = mGroupId; + + // Check if cache already contains image_id for that group + if (!updateFromCache()) + { + gm->addObserver(this); + gm->sendGroupPropertiesRequest(mGroupId); + } } } @@ -488,6 +495,7 @@ void LLGroupNoticeNotificationListItem::close() mInventoryOffer->forceResponse(IOR_DECLINE); mInventoryOffer = NULL; } + LLGroupMgr::getInstance()->removeObserver(this); } void LLGroupNoticeNotificationListItem::onClickAttachment() diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index d00016fc15..86b1128de0 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -184,6 +184,7 @@ class LLGroupNoticeNotificationListItem : public LLGroupNotificationListItem { public: + ~LLGroupNoticeNotificationListItem(); static std::set<std::string> getTypes(); virtual BOOL postBuild(); -- cgit v1.2.3 From 74a54037298a19bb9c20331098182e82280a23ab Mon Sep 17 00:00:00 2001 From: andreykproductengine <akleshchev@productengine.com> Date: Mon, 20 Jul 2015 16:51:21 +0300 Subject: MAINT-5370 FIXED [Notice] Hard to operate with notification window controls --- .../default/xui/en/floater_notifications_tabbed.xml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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 0fdd9ed0c6..b18c6b1e82 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -40,15 +40,26 @@ name="title_notification_tabbed_window"> NOTIFICATIONS </string> - <layout_stack width="336" height="550" enabled="true" orientation="vertical" name="TabButtonsStack" follows="left|top|right|bottom"> - <layout_panel width="336" height="550" enabled="true" name="TabButtonsLayoutPanel"> + <layout_stack + width="336" + height="533" + enabled="true" + orientation="vertical" + name="TabButtonsStack" + follows="left|top|right|bottom" + top="17"> + <layout_panel + width="336" + height="530" + enabled="true" + name="TabButtonsLayoutPanel"> <tab_container follows="left|top|right|bottom" halign="center" layout="topleft" tab_position="top" left="7" - top="24" + top="7" width="336" height="491" mouse_opaque="true" -- cgit v1.2.3 From 0905e4cc55764500b1a980f65ad1c710c7bd0e59 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 21 Jul 2015 14:53:10 +0300 Subject: MAINT-5425 FIXED No icon is shown for certain transaction notifications. --- indra/newview/llnotificationlistitem.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 67f3d0720f..a22da59a5d 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -546,6 +546,9 @@ BOOL LLTransactionNotificationListItem::postBuild() BOOL rv = LLNotificationListItem::postBuild(); mAvatarIcon = getChild<LLAvatarIconCtrl>("avatar_icon"); mAvatarIconExp = getChild<LLAvatarIconCtrl>("avatar_icon_exp"); + mAvatarIcon->setValue("System_Notification"); + mAvatarIconExp->setValue("System_Notification"); + if (mParams.notification_name == "PaymentReceived") { mAvatarIcon->setValue(mParams.paid_from_id); -- cgit v1.2.3 From f0f95036a4dade0b918d6be152b9789905bdaa22 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <pavelkproductengine@lindenlab.com> Date: Mon, 27 Jul 2015 16:39:08 +0300 Subject: MAINT-5424 FIXED [Project Notice] No link visible in System tab when items returned. --- indra/newview/skins/default/xui/en/panel_notification_list_item.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 344ba70290..00f75a1209 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -113,7 +113,7 @@ </panel> <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true"> <text_editor enabled="false" top="0" left="0" width="230" height="110" layout="topleft" follows="left|top|right|bottom" - word_wrap="true" max_length="65536" name="notification_text_exp" parse_highlights="true" parse_urls="true"> + word_wrap="true" max_length="65536" name="notification_text_exp" parse_urls="true"> 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 . </text_editor> </panel> -- cgit v1.2.3 From 5665c5320c50180e69e3616613b7796da919a721 Mon Sep 17 00:00:00 2001 From: pavelkproductengine <pavelkproductengine@lindenlab.com> Date: Fri, 31 Jul 2015 17:49:45 +0300 Subject: MAINT-5394 [Project Notice] The PERMISSION_DEBIT notification is not distinct enough on the Project Notice viewer. --- indra/newview/llfloaternotificationstabbed.cpp | 6 +++++- indra/newview/llnotificationlistitem.cpp | 12 +++++++++++- indra/newview/llnotificationlistitem.h | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 57109c6763..5823983b76 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -396,6 +396,7 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) p.paid_from_id = payload["from_id"]; p.paid_to_id = payload["dest_id"]; p.inventory_offer = payload["inventory_offer"]; + p.notification_priority = notify->getPriority(); addItem(p); } @@ -403,7 +404,10 @@ void LLFloaterNotificationsTabbed::onStoreToast(LLPanel* info_panel, LLUUID id) void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLUUID id = item->getID(); - //LLFloaterReg::showInstance("inspect_toast", id); + if (item->showPopup()) + { + LLFloaterReg::showInstance("inspect_toast", id); + } } //--------------------------------------------------------------------------------- diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index a22da59a5d..2b10457e99 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -566,9 +566,19 @@ BOOL LLTransactionNotificationListItem::postBuild() LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p) : LLNotificationListItem(p), - mSystemNotificationIcon(NULL) + mSystemNotificationIcon(NULL), + mIsCaution(false) { buildFromFile("panel_notification_list_item.xml"); + mIsCaution = p.notification_priority >= NOTIFICATION_PRIORITY_HIGH; + if (mIsCaution) + { + mTitleBox->setColor(LLUIColorTable::instance().getColor("NotifyCautionBoxColor")); + mTitleBoxExp->setColor(LLUIColorTable::instance().getColor("NotifyCautionBoxColor")); + mNoticeTextExp->setReadOnlyColor(LLUIColorTable::instance().getColor("NotifyCautionBoxColor")); + mTimeBox->setColor(LLUIColorTable::instance().getColor("NotifyCautionBoxColor")); + mTimeBoxExp->setColor(LLUIColorTable::instance().getColor("NotifyCautionBoxColor")); + } } BOOL LLSystemNotificationListItem::postBuild() diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 86b1128de0..4df21951a1 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -59,6 +59,7 @@ public: LLDate time_stamp; LLDate received_time; LLSD inventory_offer; + e_notification_priority notification_priority; Params() {}; }; @@ -87,6 +88,7 @@ public: boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } + virtual bool showPopup() { return true; } void setExpanded(BOOL value); virtual BOOL postBuild(); @@ -162,6 +164,8 @@ public: static std::set<std::string> getTypes(); virtual BOOL postBuild(); + /*virtual*/ bool showPopup() { return false; } + private: friend class LLNotificationListItem; LLGroupInviteNotificationListItem(const Params& p); @@ -188,6 +192,8 @@ public: static std::set<std::string> getTypes(); virtual BOOL postBuild(); + /*virtual*/ bool showPopup() { return false; } + private: friend class LLNotificationListItem; LLGroupNoticeNotificationListItem(const Params& p); @@ -232,6 +238,7 @@ private: LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); LLIconCtrl* mSystemNotificationIcon; LLIconCtrl* mSystemNotificationIconExp; + bool mIsCaution; }; #endif // LL_LLNOTIFICATIONLISTITEM_H -- cgit v1.2.3 From 374a5b7dbe248eb62ab0fd919c13dd4fe41de3a2 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 4 Aug 2015 16:46:50 +0300 Subject: MAINT-5427 FIXED Highlight notifications when hovering mouse. --- indra/newview/llnotificationlistitem.cpp | 13 +++++++++++++ indra/newview/llnotificationlistitem.h | 2 ++ .../skins/default/xui/en/panel_notification_list_item.xml | 6 +++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 2b10457e99..6e2cc39a06 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -91,6 +91,7 @@ BOOL LLNotificationListItem::postBuild() mCondensedHeight = (S32)atoi(condensed_height_str.c_str()); setExpanded(FALSE); + return rv; } @@ -147,6 +148,18 @@ BOOL LLNotificationListItem::handleMouseUp(S32 x, S32 y, MASK mask) return res; } +void LLNotificationListItem::onMouseEnter(S32 x, S32 y, MASK mask) +{ + mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" )); + mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "ScrollHoveredColor" )); +} + +void LLNotificationListItem::onMouseLeave(S32 x, S32 y, MASK mask) +{ + mCondensedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); + mExpandedViewPanel->setTransparentColor(LLUIColorTable::instance().getColor( "SysWellItemUnselected" )); +} + //static LLNotificationListItem* LLNotificationListItem::create(const Params& p) { diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 4df21951a1..950b75c39a 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -79,6 +79,8 @@ public: // handlers virtual BOOL handleMouseUp(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<void (LLNotificationListItem* item)> item_callback_t; diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 00f75a1209..73f90f73aa 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -42,7 +42,7 @@ <panel top="0" left="0" width="331" height="196" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_total_view"> <layout_stack top="0" left="0" width="331" height="196" orientation="vertical" follows="left|top|right|bottom" name="item_vertical_stack"> - <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false"> + <layout_panel top="0" left="0" height="30" follows="left|top|right|bottom" layout="topleft" name="layout_panel_condensed_view" visible="false" background_opaque="false" background_visible="true" bg_alpha_color="SysWellItemUnselected"> <panel border="true" top="0" left="5" height="30" bevel_style="none" layout="topleft" follows="left|top|right|bottom" name="panel_condensed_view"> <layout_stack top="0" left="0" width="325" height="50" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> <layout_panel width="30" height="39" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_right"> @@ -80,7 +80,7 @@ </layout_stack> </panel> </layout_panel> - <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true"> + <layout_panel top="0" left="0" height="196" follows="left|top|right|bottom" layout="topleft" name="layout_panel_expanded_view" visible="true" background_opaque="false" background_visible="true" bg_alpha_color="SysWellItemUnselected"> <panel border="true" top="0" left="5" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="panel_expanded_view"> <layout_stack top="0" left="0" width="325" height="196" orientation="horizontal" follows="left|top|right|bottom" name="horizontal_stack"> <layout_panel width="30" height="170" orientation="horizontal" follows="left|top|bottom" name="layout_panel_right_exp"> @@ -93,7 +93,7 @@ <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack"> <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true"> - <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp"> + <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp" > <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> 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 -- cgit v1.2.3 From f5f042de003b62af17f9974dd86319b638990a9d Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 15 Sep 2015 16:43:32 +0300 Subject: MAINT-5427 Group notices and invitation will expand on left-clicking --- indra/newview/llfloaternotificationstabbed.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llfloaternotificationstabbed.cpp b/indra/newview/llfloaternotificationstabbed.cpp index 5823983b76..4b5fe4989a 100644 --- a/indra/newview/llfloaternotificationstabbed.cpp +++ b/indra/newview/llfloaternotificationstabbed.cpp @@ -408,6 +408,10 @@ void LLFloaterNotificationsTabbed::onItemClick(LLNotificationListItem* item) { LLFloaterReg::showInstance("inspect_toast", id); } + else + { + item->setExpanded(TRUE); + } } //--------------------------------------------------------------------------------- -- cgit v1.2.3 From 1dd2a17f6876fdb2f8856a2f2fb2b69d2bb4b265 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 18 Sep 2015 15:59:53 +0300 Subject: MAINT-5427 Expand notifications according to message length --- indra/newview/llnotificationlistitem.cpp | 22 +++++++++++++++++++--- indra/newview/llnotificationlistitem.h | 6 ++++-- .../xui/en/floater_notifications_tabbed.xml | 3 ++- .../xui/en/panel_notification_list_item.xml | 18 +++++++----------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 6e2cc39a06..62b3ee3093 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -38,6 +38,7 @@ #include "lluicolortable.h" #include "message.h" #include "llnotificationsutil.h" + LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), mTitleBox(NULL), @@ -48,7 +49,8 @@ LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mExpandedViewPanel(NULL), mCondensedHeight(0), mExpandedHeight(0), - mExpandedHeightResize(0) + mExpandedHeightResize(0), + mExpanded(false) { mNotificationName = p.notification_name; } @@ -58,7 +60,7 @@ BOOL LLNotificationListItem::postBuild() BOOL rv = LLPanel::postBuild(); mTitleBox = getChild<LLTextBox>("notification_title"); mTitleBoxExp = getChild<LLTextBox>("notification_title_exp"); - mNoticeTextExp = getChild<LLViewerTextEditor>("notification_text_exp"); + mNoticeTextExp = getChild<LLChatEntry>("notification_text_exp"); mTimeBox = getChild<LLTextBox>("notification_time"); mTimeBoxExp = getChild<LLTextBox>("notification_time_exp"); @@ -70,6 +72,8 @@ BOOL LLNotificationListItem::postBuild() mTitleBox->setValue(mParams.title); mTitleBoxExp->setValue(mParams.title); mNoticeTextExp->setValue(mParams.title); + mNoticeTextExp->setEnabled(FALSE); + mNoticeTextExp->setTextExpandedCallback(boost::bind(&LLNotificationListItem::reshapeNotification, this)); mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp)); @@ -206,19 +210,31 @@ void LLNotificationListItem::onClickCondenseBtn() setExpanded(FALSE); } +void LLNotificationListItem::reshapeNotification() +{ + if(mExpanded) + { + S32 width = this->getRect().getWidth(); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); + } +} + void LLNotificationListItem::setExpanded(BOOL value) { mCondensedViewPanel->setVisible(!value); mExpandedViewPanel->setVisible(value); S32 width = this->getRect().getWidth(); + if (value) { - this->reshape(width, mExpandedHeight + mExpandedHeightResize, FALSE); + this->reshape(width, mNoticeTextExp->getRect().getHeight() + mExpandedHeight, FALSE); } else { this->reshape(width, mCondensedHeight, FALSE); } + mExpanded = value; + } std::set<std::string> LLGroupInviteNotificationListItem::getTypes() diff --git a/indra/newview/llnotificationlistitem.h b/indra/newview/llnotificationlistitem.h index 950b75c39a..9a4ce2be4b 100644 --- a/indra/newview/llnotificationlistitem.h +++ b/indra/newview/llnotificationlistitem.h @@ -34,7 +34,7 @@ #include "llbutton.h" #include "llgroupiconctrl.h" #include "llavatariconctrl.h" - +#include "llchatentry.h" #include "llgroupmgr.h" #include "llviewermessage.h" @@ -93,6 +93,7 @@ public: virtual bool showPopup() { return true; } void setExpanded(BOOL value); virtual BOOL postBuild(); + void reshapeNotification(); typedef enum e_time_type { @@ -114,7 +115,7 @@ protected: Params mParams; LLTextBox* mTitleBox; LLTextBox* mTitleBoxExp; - LLViewerTextEditor* mNoticeTextExp; + LLChatEntry* mNoticeTextExp; LLTextBox* mTimeBox; LLTextBox* mTimeBoxExp; LLButton* mExpandBtn; @@ -128,6 +129,7 @@ protected: S32 mCondensedHeight; S32 mExpandedHeight; S32 mExpandedHeightResize; + bool mExpanded; }; class LLGroupNotificationListItem 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 b18c6b1e82..afc609de52 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -8,8 +8,9 @@ save_rect="true" title="NOTIFICATIONS" width="350" - min_width="320" + min_width="435" height="550" + min_height="150" can_minimize="false" can_tear_off="false" can_resize="true" diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 73f90f73aa..0c173261a3 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -33,7 +33,7 @@ </panel.string> <panel.string name="item_expanded_height"> - 175 + 87 </panel.string> <panel.string name="expanded_height_resize_for_attachment"> @@ -91,9 +91,7 @@ </layout_panel> <layout_panel width="230" height="196" orientation="horizontal" follows="left|top|right|bottom" name="layout_panel_middle_exp"> <panel border="false" top="0" width="230" height="196" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="main_info_panel_expanded"> - <layout_stack top="0" left="0" width="230" height="196" orientation="vertical" follows="left|top|right|bottom" name="main_info_panel_vertical_stack"> - <layout_panel top="0" left="0" width="230" height="30" layout="topleft" follows="left|top|right|bottom" name="notification_title_layout_panel" visible="true"> - <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp" > + <panel border="false" top="0" left="0" width="230" height="30" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_title_panel_exp" > <text allow_scroll="false" font="SansSerif" top="6" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="notification_title_exp"> 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 @@ -103,7 +101,7 @@ Group Name Group Name Group Na m e e </text> </panel> - <panel border="false" left="0" width="230" height="12" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> + <panel border="false" left="0" width="230" height="15" bevel_style="none" follows="left|top|right" layout="topleft" name="sender_time_panel_exp"> <text allow_scroll="false" font="SansSerifSmall" top="0" left="0" width="145" height="13" layout="topleft" follows="right|left" use_ellipses="true" word_wrap="false" mouse_opaque="false" name="sender_or_fee_box_exp" visible="false"> Sender: "Resident R e s i d e n t R e s i d e n t" @@ -111,11 +109,11 @@ <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time_exp" value="2014/12/24 23:30" /> </panel> - <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|top|right" layout="topleft" name="notification_text_panel_exp" visible="true"> - <text_editor enabled="false" top="0" left="0" width="230" height="110" layout="topleft" follows="left|top|right|bottom" + <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|right" layout="topleft" name="notification_text_panel_exp" visible="true"> + <chat_editor is_expandable="true" top="0" left="0" width="230" height="110" layout="topleft" follows="left|right" word_wrap="true" max_length="65536" name="notification_text_exp" parse_urls="true"> 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 . - </text_editor> + </chat_editor> </panel> <panel border="false" left="1" bottom="-5" width="230" height="22" bevel_style="none" follows="left|right|bottom" layout="topleft" name="attachment_panel" visible="false"> <text allow_scroll="false" font="SansSerifSmall" top="4" left="5" width="220" height="12" layout="topleft" follows="left|top|right|bottom" @@ -123,13 +121,11 @@ 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 . </text> </panel> - <panel border="false" left="0" bottom="-4" height="30" bevel_style="none" follows="left|right|bottom" layout="topleft" name="button_panel" visible="false"> + <panel border="false" left="1" bottom="-5" height="55" bevel_style="none" follows="left|right|bottom" layout="topleft" name="button_panel" visible="false"> <button top="2" left="0" width="65" height="23" layout="topleft" follows="left|top|bottom" name="join_btn" mouse_opaque="true" tab_stop="false" label = "Join"/> <button top="2" left_pad="12" width="65" height="23" layout="topleft" follows="left|top|bottom" name="decline_btn" mouse_opaque="true" tab_stop="false" label = "Decline"/> <button top="2" left_pad="12" width="65" height="23" layout="topleft" follows="left|top|bottom" name="info_btn" mouse_opaque="true" tab_stop="false" label = "Info"/> </panel> - </layout_panel> - </layout_stack> </panel> </layout_panel> <layout_panel width="18" orientation="horizontal" follows="right|top|bottom" name="layout_panel_left_exp"> -- cgit v1.2.3 From ca4160639866d37802f6d4f77821521cc9f3ed7f Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Fri, 18 Sep 2015 18:01:46 +0300 Subject: MAINT-5427 Min width changed --- indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 afc609de52..43198f46f3 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -7,7 +7,7 @@ help_topic="notification_chiclet" save_rect="true" title="NOTIFICATIONS" - width="350" + width="435" min_width="435" height="550" min_height="150" -- cgit v1.2.3 From c84fe50f18d39adf1bb712927a71628d343781d0 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Mon, 21 Sep 2015 14:32:36 +0300 Subject: MAINT-5425 FIXED No icon is shown for certain transaction notifications. --- indra/newview/llnotificationlistitem.cpp | 11 +++++++++-- .../skins/default/xui/en/floater_notifications_tabbed.xml | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 62b3ee3093..8005fa6239 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -578,6 +578,14 @@ BOOL LLTransactionNotificationListItem::postBuild() mAvatarIcon->setValue("System_Notification"); mAvatarIconExp->setValue("System_Notification"); + mAvatarIcon->setVisible(TRUE); + mAvatarIconExp->setVisible(TRUE); + if((GOVERNOR_LINDEN_ID == mParams.paid_to_id) || + (GOVERNOR_LINDEN_ID == mParams.paid_from_id)) + { + return rv; + } + if (mParams.notification_name == "PaymentReceived") { mAvatarIcon->setValue(mParams.paid_from_id); @@ -588,8 +596,7 @@ BOOL LLTransactionNotificationListItem::postBuild() mAvatarIcon->setValue(mParams.paid_to_id); mAvatarIconExp->setValue(mParams.paid_to_id); } - mAvatarIcon->setVisible(TRUE); - mAvatarIconExp->setVisible(TRUE); + return rv; } 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 43198f46f3..afc609de52 100644 --- a/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml +++ b/indra/newview/skins/default/xui/en/floater_notifications_tabbed.xml @@ -7,7 +7,7 @@ help_topic="notification_chiclet" save_rect="true" title="NOTIFICATIONS" - width="435" + width="350" min_width="435" height="550" min_height="150" -- cgit v1.2.3 From e13d8087ea1ce652a2652fa3903c2b963a9d71bf Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 6 Oct 2015 16:11:42 +0300 Subject: MAINT-5694 FIXED Links on the 1st line of a group notice message are sometimes not clickable. --- indra/newview/skins/default/xui/en/panel_notification_list_item.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml index 0c173261a3..a909028f9f 100644 --- a/indra/newview/skins/default/xui/en/panel_notification_list_item.xml +++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml @@ -97,7 +97,7 @@ 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 </text> <text allow_scroll="false" font="SansSerif" left="0" width="233" height="10" layout="topleft" follows="right|left" text_color="White" - use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" visible="false"> + use_ellipses="true" word_wrap="false" mouse_opaque="false" name="group_name_exp" parse_urls="false" visible="false"> Group Name Group Name Group Na m e e </text> </panel> @@ -109,7 +109,7 @@ <text allow_scroll="false" font="SansSerifSmall" top="0" right="-1" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" name="notification_time_exp" value="2014/12/24 23:30" /> </panel> - <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="left|right" layout="topleft" name="notification_text_panel_exp" visible="true"> + <panel border="false" left="0" height="115" width="230" bevel_style="none" follows="all" layout="topleft" name="notification_text_panel_exp" visible="true"> <chat_editor is_expandable="true" top="0" left="0" width="230" height="110" layout="topleft" follows="left|right" word_wrap="true" max_length="65536" name="notification_text_exp" parse_urls="true"> 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 . -- cgit v1.2.3 From bbedc51d1df3a9705deda43c0c267be45846acff Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Thu, 8 Oct 2015 17:06:04 +0300 Subject: MAINT-5708 FIXED Images shouldn't be displayed in notification titles --- indra/newview/llnotificationlistitem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index 8005fa6239..f0159149d1 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -75,6 +75,10 @@ BOOL LLNotificationListItem::postBuild() mNoticeTextExp->setEnabled(FALSE); mNoticeTextExp->setTextExpandedCallback(boost::bind(&LLNotificationListItem::reshapeNotification, this)); + mTitleBox->setContentTrusted(false); + mTitleBoxExp->setContentTrusted(false); + mNoticeTextExp->setContentTrusted(false); + mTimeBox->setValue(buildNotificationDate(mParams.time_stamp)); mTimeBoxExp->setValue(buildNotificationDate(mParams.time_stamp)); -- cgit v1.2.3 From 4ec4bf3711757c71ea9007ed939efb17312fe0b6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine <mnikolenko@productengine.com> Date: Tue, 13 Oct 2015 14:53:07 +0300 Subject: MAINT-5730 FIXED Text overlapping in group invites with non-default group role --- indra/newview/llnotificationlistitem.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp index f0159149d1..8cdc2d7c0b 100644 --- a/indra/newview/llnotificationlistitem.cpp +++ b/indra/newview/llnotificationlistitem.cpp @@ -38,6 +38,7 @@ #include "lluicolortable.h" #include "message.h" #include "llnotificationsutil.h" +#include <boost/regex.hpp> LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), @@ -285,6 +286,16 @@ BOOL LLGroupInviteNotificationListItem::postBuild() mDeclineBtn = getChild<LLButton>("decline_btn"); mInfoBtn = getChild<LLButton>("info_btn"); + //invitation with any non-default group role, doesn't have newline characters at the end unlike simple invitations + std::string invitation_desc = mNoticeTextExp->getValue().asString(); + boost::regex pattern = boost::regex("\n\n$", boost::regex::perl|boost::regex::icase); + boost::match_results<std::string::const_iterator> matches; + if(!boost::regex_search(invitation_desc, matches, pattern)) + { + invitation_desc += "\n\n"; + mNoticeTextExp->setValue(invitation_desc); + } + mJoinBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickJoinBtn,this)); mDeclineBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickDeclineBtn,this)); mInfoBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickInfoBtn,this)); -- cgit v1.2.3 From 63cf1b477f5d814ec45fff8a0a5a07da26b3e9ab Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 26 Oct 2015 17:06:20 -0400 Subject: Added tag 3.8.6-release for changeset 5a5bd148943b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index a7b8fd0a66..0a97b4b9a5 100755 --- a/.hgtags +++ b/.hgtags @@ -509,3 +509,4 @@ d07f76c5b9860fb87924d00ca729f7d4532534d6 3.7.29-release 60572f718879f786f6bc8b5c9373ebebf4693078 3.8.3-release 27e3cf444c4cc645884960a61325a9ee0e9a2d0f 3.8.4-release e821ef17c6edea4a59997719d8ba416d8c16e143 3.8.5-release +5a5bd148943bfb46cf2ff2ccf376c42dee93d19b 3.8.6-release -- cgit v1.2.3 From 84150294b912d04e345007b65670c0230a2e4d79 Mon Sep 17 00:00:00 2001 From: Oz Linden <oz@lindenlab.com> Date: Mon, 26 Oct 2015 17:06:20 -0400 Subject: increment viewer version to 3.8.7 --- indra/newview/VIEWER_VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index 2e14a9557d..4351a7e3a3 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -3.8.6 +3.8.7 -- cgit v1.2.3