summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaternotificationsconsole.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-08-27 16:58:33 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-08-27 16:58:33 -0700
commitb62b10dd260c8c01e82e5b206c17a410cedc79f4 (patch)
tree2ea582bb63476566ddabfbd5a0a8f3747eb3fc8e /indra/newview/llfloaternotificationsconsole.cpp
parentbef304c0a34bfcd7997bd7799995229ddcc1de31 (diff)
parent51311875b6e23fa9475c42b6d15637aa668729c5 (diff)
Post-convert merge by convert_monolith.py from ./viewer-experience
Diffstat (limited to 'indra/newview/llfloaternotificationsconsole.cpp')
-rw-r--r--indra/newview/llfloaternotificationsconsole.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp
index 08475b1e55..08bab95654 100644
--- a/indra/newview/llfloaternotificationsconsole.cpp
+++ b/indra/newview/llfloaternotificationsconsole.cpp
@@ -37,10 +37,10 @@
const S32 NOTIFICATION_PANEL_HEADER_HEIGHT = 20;
const S32 HEADER_PADDING = 38;
-class LLNotificationChannelPanel : public LLPanel
+class LLNotificationChannelPanel : public LLLayoutPanel
{
public:
- LLNotificationChannelPanel(const std::string& channel_name);
+ LLNotificationChannelPanel(const Params& p);
BOOL postBuild();
private:
@@ -52,14 +52,14 @@ private:
LLNotificationChannelPtr mChannelRejectsPtr;
};
-LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channel_name)
- : LLPanel()
+LLNotificationChannelPanel::LLNotificationChannelPanel(const LLNotificationChannelPanel::Params& p)
+: LLLayoutPanel(p)
{
- mChannelPtr = LLNotifications::instance().getChannel(channel_name);
+ mChannelPtr = LLNotifications::instance().getChannel(p.name);
mChannelRejectsPtr = LLNotificationChannelPtr(
- LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(),
+ LLNotificationChannel::buildChannel(p.name() + "rejects", mChannelPtr->getParentChannelName(),
!boost::bind(mChannelPtr->getFilter(), _1)));
- LLUICtrlFactory::instance().buildPanel(this, "panel_notifications_channel.xml");
+ buildFromFile( "panel_notifications_channel.xml");
}
BOOL LLNotificationChannelPanel::postBuild()
@@ -167,8 +167,6 @@ LLFloaterNotificationConsole::LLFloaterNotificationConsole(const LLSD& key)
: LLFloater(key)
{
mCommitCallbackRegistrar.add("ClickAdd", boost::bind(&LLFloaterNotificationConsole::onClickAdd, this));
-
- //LLUICtrlFactory::instance().buildFloater(this, "floater_notifications_console.xml");
}
BOOL LLFloaterNotificationConsole::postBuild()
@@ -203,8 +201,13 @@ BOOL LLFloaterNotificationConsole::postBuild()
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, S32_MAX, S32_MAX, TRUE, TRUE, LLLayoutStack::ANIMATE);
+ LLNotificationChannelPanel::Params p;
+ p.min_dim = NOTIFICATION_PANEL_HEADER_HEIGHT;
+ p.auto_resize = true;
+ p.user_resize = true;
+ p.name = name;
+ LLNotificationChannelPanel* panelp = new LLNotificationChannelPanel(p);
+ stack.addPanel(panelp, LLLayoutStack::ANIMATE);
LLButton& header_button = panelp->getChildRef<LLButton>("header");
header_button.setToggleState(!open);
@@ -248,7 +251,6 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note)
: LLFloater(LLSD()),
mNote(note)
{
- LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml", NULL);
}
BOOL LLFloaterNotification::postBuild()