summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaternotificationsconsole.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaternotificationsconsole.cpp')
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 90db8988b2..105d7f9201 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -112,10 +112,15 @@ void LLNotificationChannelPanel::onClickNotification(void* user_data)
{
LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data;
if (!self) return;
- void* data = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected()->getUserdata();
- if (data)
+ LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notifications_list")->getFirstSelected();
+ llassert(firstselected);
+ if (firstselected)
{
- gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
+ void* data = firstselected->getUserdata();
+ if (data)
+ {
+ gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
+ }
}
}
@@ -124,10 +129,15 @@ void LLNotificationChannelPanel::onClickNotificationReject(void* user_data)
{
LLNotificationChannelPanel* self = (LLNotificationChannelPanel*)user_data;
if (!self) return;
- void* data = self->getChild<LLScrollListCtrl>("notification_rejects_list")->getFirstSelected()->getUserdata();
- if (data)
+ LLScrollListItem* firstselected = self->getChild<LLScrollListCtrl>("notification_rejects_list")->getFirstSelected();
+ llassert(firstselected);
+ if (firstselected)
{
- gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
+ void* data = firstselected->getUserdata();
+ if (data)
+ {
+ gFloaterView->getParentFloater(self)->addDependentFloater(new LLFloaterNotification((LLNotification*)data), TRUE);
+ }
}
}
@@ -174,7 +184,7 @@ BOOL LLFloaterNotificationConsole::postBuild()
addChannel("Ignore");
addChannel("Visible", true);
// all the ones below attach to the Visible channel
- addChannel("History");
+ addChannel("Persistent");
addChannel("Alerts");
addChannel("AlertModal");
addChannel("Group Notifications");
@@ -200,7 +210,7 @@ void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open
{
LLLayoutStack& stack = getChildRef<LLLayoutStack>("notification_channels");
LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(name);
- stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, TRUE, TRUE, LLLayoutStack::ANIMATE);
+ stack.addPanel(panelp, 0, NOTIFICATION_PANEL_HEADER_HEIGHT, S32_MAX, S32_MAX, TRUE, TRUE, LLLayoutStack::ANIMATE);
LLButton& header_button = panelp->getChildRef<LLButton>("header");
header_button.setToggleState(!open);