summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupnotices.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelgroupnotices.cpp')
-rw-r--r--indra/newview/llpanelgroupnotices.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index 15ae374447..f06342ebfc 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -58,6 +58,9 @@
#include "llviewermessage.h"
#include "llnotifications.h"
+static LLRegisterPanelClassWrapper<LLPanelGroupNotices> t_panel_group_notices("panel_group_notices");
+
+
/////////////////////////
// LLPanelGroupNotices //
/////////////////////////
@@ -207,12 +210,13 @@ std::string build_notice_date(const U32& the_time)
return dateStr;
}
-LLPanelGroupNotices::LLPanelGroupNotices(const LLUUID& group_id) :
- LLPanelGroupTab(group_id),
+LLPanelGroupNotices::LLPanelGroupNotices() :
+ LLPanelGroupTab(),
mInventoryItem(NULL),
mInventoryOffer(NULL)
{
- sInstances[group_id] = this;
+
+
}
LLPanelGroupNotices::~LLPanelGroupNotices()
@@ -228,12 +232,6 @@ LLPanelGroupNotices::~LLPanelGroupNotices()
}
}
-// static
-void* LLPanelGroupNotices::createTab(void* data)
-{
- LLUUID* group_id = static_cast<LLUUID*>(data);
- return new LLPanelGroupNotices(*group_id);
-}
BOOL LLPanelGroupNotices::isVisibleByAgent(LLAgent* agentp)
{
@@ -590,3 +588,17 @@ void LLPanelGroupNotices::arrangeNoticeView(ENoticeView view_type)
mBtnOpenAttachment->setEnabled(FALSE);
}
}
+void LLPanelGroupNotices::setGroupID(const LLUUID& id)
+{
+ sInstances.erase(mGroupID);
+ LLPanelGroupTab::setGroupID(id);
+ sInstances[mGroupID] = this;
+
+ mBtnNewMessage->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_NOTICES_SEND));
+
+ LLGroupDropTarget* target = getChild<LLGroupDropTarget> ("drop_target");
+ target->setPanel (this);
+ target->setGroup (mGroupID);
+
+ activate();
+}