Skip to content
Snippets Groups Projects
Commit 9d8bbe16 authored by pavelk_productengine's avatar pavelk_productengine
Browse files

MAINT-4734 (Separate transaction notices from group notice/invites)

- introduced different design for System, Incoming/Outcoming Transactions, Invites
parent 5f96f3bb
No related branches found
No related tags found
No related merge requests found
...@@ -35,25 +35,26 @@ ...@@ -35,25 +35,26 @@
#include "lluicolortable.h" #include "lluicolortable.h"
LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p),
mParams(p),
mTitleBox(NULL), mTitleBox(NULL),
mCloseBtn(NULL), mCloseBtn(NULL)
mSenderBox(NULL)
{ {
buildFromFile( "panel_notification_tabbed_item.xml"); mID = p.notification_id;
mNotificationName = p.notification_name;
}
mTitleBox = getChild<LLTextBox>("GroupName_NoticeTitle"); BOOL LLNotificationListItem::postBuild()
mTimeBox = getChild<LLTextBox>("Time_Box"); {
BOOL rv = LLPanel::postBuild();
mTitleBox = getChild<LLTextBox>("notification_title");
mTimeBox = getChild<LLTextBox>("notification_time");
mCloseBtn = getChild<LLButton>("close_btn"); mCloseBtn = getChild<LLButton>("close_btn");
mSenderBox = getChild<LLTextBox>("Sender_Resident");
mTitleBox->setValue(p.title); mTitleBox->setValue(mParams.title);
mTimeBox->setValue(buildNotificationDate(p.time_stamp)); mTimeBox->setValue(buildNotificationDate(mParams.time_stamp));
mSenderBox->setVisible(FALSE);
mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this)); mCloseBtn->setClickedCallback(boost::bind(&LLNotificationListItem::onClickCloseBtn,this));
return rv;
mID = p.notification_id;
mNotificationName = p.notification_name;
} }
LLNotificationListItem::~LLNotificationListItem() LLNotificationListItem::~LLNotificationListItem()
...@@ -151,46 +152,87 @@ std::set<std::string> LLTransactionNotificationListItem::getTypes() ...@@ -151,46 +152,87 @@ std::set<std::string> LLTransactionNotificationListItem::getTypes()
std::set<std::string> LLSystemNotificationListItem::getTypes() std::set<std::string> LLSystemNotificationListItem::getTypes()
{ {
std::set<std::string> types; std::set<std::string> types;
types.insert("AddPrimitiveFailure"); //types.insert("AddPrimitiveFailure");
types.insert("AddToNavMeshNoCopy"); //types.insert("AddToNavMeshNoCopy");
types.insert("AssetServerTimeoutObjReturn"); //types.insert("AssetServerTimeoutObjReturn");
types.insert("AvatarEjected"); //types.insert("AvatarEjected");
types.insert("AutoUnmuteByIM"); //types.insert("AutoUnmuteByIM");
types.insert("AutoUnmuteByInventory"); //types.insert("AutoUnmuteByInventory");
types.insert("AutoUnmuteByMoney"); //types.insert("AutoUnmuteByMoney");
types.insert("BuyInventoryFailedNoMoney"); //types.insert("BuyInventoryFailedNoMoney");
types.insert("DeactivatedGesturesTrigger"); //types.insert("DeactivatedGesturesTrigger");
types.insert("DeedFailedNoPermToDeedForGroup"); //types.insert("DeedFailedNoPermToDeedForGroup");
types.insert("WhyAreYouTryingToWearShrubbery"); //types.insert("WhyAreYouTryingToWearShrubbery");
types.insert("YouDiedAndGotTPHome"); //types.insert("YouDiedAndGotTPHome");
types.insert("YouFrozeAvatar"); //types.insert("YouFrozeAvatar");
//types.insert("OfferCallingCard");
types.insert("OfferCallingCard");
//ExpireExplanation
return types; return types;
} }
LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p) LLInviteNotificationListItem::LLInviteNotificationListItem(const Params& p)
: LLNotificationListItem(p) : LLNotificationListItem(p),
mSenderBox(NULL)
{ {
mGroupIcon = getChild<LLIconCtrl>("group_icon_small"); buildFromFile("panel_notification_list_item.xml");
mGroupIcon->setValue(p.group_id); }
mGroupID = p.group_id;
if (!p.sender.empty()) 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; 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); std::string sender_text = getString("sender_resident_text", string_args);
mSenderBox->setValue(sender_text); mSenderBox->setValue(sender_text);
mSenderBox->setVisible(TRUE); mSenderBox->setVisible(TRUE);
} } else {
mSenderBox->setVisible(FALSE);
}
return rv;
} }
LLTransactionNotificationListItem::LLTransactionNotificationListItem(const Params& p) 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) 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;
}
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "llpanel.h" #include "llpanel.h"
#include "lltextbox.h" #include "lltextbox.h"
#include "llbutton.h" #include "llbutton.h"
#include "lliconctrl.h" #include "llgroupiconctrl.h"
#include "llgroupmgr.h" #include "llgroupmgr.h"
...@@ -76,6 +76,7 @@ class LLNotificationListItem : public LLPanel ...@@ -76,6 +76,7 @@ class LLNotificationListItem : public LLPanel
boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); } boost::signals2::connection setOnItemCloseCallback(item_callback_t cb) { return mOnItemClose.connect(cb); }
boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); } boost::signals2::connection setOnItemClickCallback(item_callback_t cb) { return mOnItemClick.connect(cb); }
virtual BOOL postBuild();
protected: protected:
LLNotificationListItem(const Params& p); LLNotificationListItem(const Params& p);
virtual ~LLNotificationListItem(); virtual ~LLNotificationListItem();
...@@ -83,13 +84,13 @@ class LLNotificationListItem : public LLPanel ...@@ -83,13 +84,13 @@ class LLNotificationListItem : public LLPanel
static std::string buildNotificationDate(const LLDate&); static std::string buildNotificationDate(const LLDate&);
void onClickCloseBtn(); void onClickCloseBtn();
Params mParams;
LLTextBox* mTitleBox; LLTextBox* mTitleBox;
LLTextBox* mTimeBox; LLTextBox* mTimeBox;
LLButton* mCloseBtn; LLButton* mCloseBtn;
LLUUID mID; LLUUID mID;
std::string mTitle; std::string mTitle;
std::string mNotificationName; std::string mNotificationName;
LLTextBox* mSenderBox;
}; };
class LLInviteNotificationListItem : public LLNotificationListItem class LLInviteNotificationListItem : public LLNotificationListItem
...@@ -99,36 +100,43 @@ class LLInviteNotificationListItem : public LLNotificationListItem ...@@ -99,36 +100,43 @@ class LLInviteNotificationListItem : public LLNotificationListItem
//void setGroupIconID(const LLUUID& group_icon_id); //void setGroupIconID(const LLUUID& group_icon_id);
//void setGroupName(const std::string& group_name); //void setGroupName(const std::string& group_name);
static std::set<std::string> getTypes(); static std::set<std::string> getTypes();
virtual BOOL postBuild();
private: private:
friend class LLNotificationListItem; friend class LLNotificationListItem;
LLInviteNotificationListItem(const Params& p); LLInviteNotificationListItem(const Params& p);
LLInviteNotificationListItem(const LLInviteNotificationListItem &); LLInviteNotificationListItem(const LLInviteNotificationListItem &);
LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &); LLInviteNotificationListItem & operator=(LLInviteNotificationListItem &);
LLIconCtrl* mGroupIcon; LLGroupIconCtrl* mGroupIcon;
LLUUID mGroupID; LLUUID mGroupID;
LLTextBox* mSenderBox;
}; };
class LLTransactionNotificationListItem : public LLNotificationListItem class LLTransactionNotificationListItem : public LLNotificationListItem
{ {
public: public:
static std::set<std::string> getTypes(); static std::set<std::string> getTypes();
virtual BOOL postBuild();
private: private:
friend class LLNotificationListItem; friend class LLNotificationListItem;
LLTransactionNotificationListItem(const Params& p); LLTransactionNotificationListItem(const Params& p);
LLTransactionNotificationListItem(const LLTransactionNotificationListItem &); LLTransactionNotificationListItem(const LLTransactionNotificationListItem &);
LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &); LLTransactionNotificationListItem & operator=(LLTransactionNotificationListItem &);
LLIconCtrl* mTransactionIcon;
}; };
class LLSystemNotificationListItem : public LLNotificationListItem class LLSystemNotificationListItem : public LLNotificationListItem
{ {
public: public:
static std::set<std::string> getTypes(); static std::set<std::string> getTypes();
virtual BOOL postBuild();
private: private:
friend class LLNotificationListItem; friend class LLNotificationListItem;
LLSystemNotificationListItem(const Params& p); LLSystemNotificationListItem(const Params& p);
LLSystemNotificationListItem(const LLSystemNotificationListItem &); LLSystemNotificationListItem(const LLSystemNotificationListItem &);
LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &); LLSystemNotificationListItem & operator=(LLSystemNotificationListItem &);
LLIconCtrl* mSystemNotificationIcon;
}; };
#endif // LL_LLNOTIFICATIONLISTITEM_H #endif // LL_LLNOTIFICATIONLISTITEM_H
......
indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png

1.63 KiB

indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png

1.29 KiB

indra/newview/skins/default/textures/icons/System_Notification_Small.png

661 B

...@@ -801,5 +801,8 @@ with the same filename but different name ...@@ -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_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_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="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> </textures>
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<!-- All our XML is utf-8 encoded. --> <!-- All our XML is utf-8 encoded. -->
<panel <panel
translate="false" translate="false"
name="panel_notification_tabbed_item" name="panel_notification_list_item"
title="panel_notification_tabbed_item" title="panel_notification_list_item"
visible="true" visible="true"
top="0" top="0"
left="0" left="0"
...@@ -20,32 +20,35 @@ ...@@ -20,32 +20,35 @@
Sender: "[SENDER_RESIDENT]" Sender: "[SENDER_RESIDENT]"
</panel.string> </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"> <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_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"> <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_small" tool_tip="Group" default_icon_name="Generic_Group"/> <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>
<layout_panel width="260" height="50" orientation="horizontal" follows="left|top|right|bottom" name="LayoutPanel"> <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="MainInfoBlockPanel"> <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="GroupNameNoticeTitlePanel"> <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="245" height="12" layout="topleft" follows="right|left" text_color="White"
use_ellipses="true" word_wrap="true" mouse_opaque="false" name="GroupName_NoticeTitle" > 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 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> </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"/> <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>
<panel border="false" top="23" left="0" width="260" bevel_style="none" follows="left|top|right|bottom" layout="topleft" name="SenderAndTimePanel" height="15"> <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" <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" > use_ellipses="true" word_wrap="true" mouse_opaque="false" name="sender_resident" visible="false">
Sender:Resident Sender:Resident
</text> </text>
<text allow_scroll="false" font="SansSerifSmall" top="0" width="95" height="13" follows="right" halign="right" layout="topleft" left_pad="5" <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" /> name="notification_time" right="-5" value="2014/12/24 23:30" />
</panel> </panel>
</panel> </panel>
</layout_panel> </layout_panel>
<layout_panel name="LayoutPanel3" width="18" height="39" orientation="horizontal" follows="left|top|right|bottom"> <layout_panel name="layout_panel_3" 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"> <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" <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" /> 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="22" left="0" width="17" height="17" layout="topleft" follows="top" name="expand_btn" mouse_opaque="true"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment