summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnotificationlistitem.cpp120
-rw-r--r--indra/newview/llnotificationlistitem.h14
-rw-r--r--indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.pngbin0 -> 1666 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.pngbin0 -> 1322 bytes
-rw-r--r--indra/newview/skins/default/textures/icons/System_Notification_Small.pngbin0 -> 661 bytes
-rwxr-xr-xindra/newview/skins/default/textures/textures.xml3
-rw-r--r--indra/newview/skins/default/xui/en/panel_notification_list_item.xml (renamed from indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml)31
7 files changed, 112 insertions, 56 deletions
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
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Incoming_Transaction_Small.png
Binary files 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
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/Outcoming_Transaction_Small.png
Binary files 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
--- /dev/null
+++ b/indra/newview/skins/default/textures/icons/System_Notification_Small.png
Binary files 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_tabbed_item.xml b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
index 603a3312e0..9bd9742a20 100644
--- a/indra/newview/skins/default/xui/en/panel_notification_tabbed_item.xml
+++ b/indra/newview/skins/default/xui/en/panel_notification_list_item.xml
@@ -2,8 +2,8 @@
<!-- All our XML is utf-8 encoded. -->
<panel
translate="false"
- name="panel_notification_tabbed_item"
- title="panel_notification_tabbed_item"
+ name="panel_notification_list_item"
+ title="panel_notification_list_item"
visible="true"
top="0"
left="0"
@@ -20,32 +20,35 @@
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">
+ <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="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 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="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">
+ <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="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
</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">
+ <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" >
+ 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="Time_Box" right="-5" value="2014/12/24 23:30" />
+ name="notification_time" 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">
+ <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"