From c20bd2dfee1068d5a23eef9a10d21c2035c0b324 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 15:00:51 -0700 Subject: cleaned up LLUICtrlFactory... removed redundant functionality moved buildPanel to LLPanel --- indra/newview/llfloaternotificationsconsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 105d7f9201..9e3422c2b2 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -65,7 +65,7 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channe mChannelRejectsPtr = LLNotificationChannelPtr( LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), !boost::bind(mChannelPtr->getFilter(), _1))); - LLUICtrlFactory::instance().buildPanel(this, "panel_notifications_channel.xml"); + buildPanel(this, "panel_notifications_channel.xml"); } BOOL LLNotificationChannelPanel::postBuild() -- cgit v1.2.3 From 124bc854dd7c3dffc044f306cf836a5d6c68bd2e Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Mon, 16 Aug 2010 17:44:23 -0700 Subject: moved buildFloater out of lluictrlfactory to llfloater.cpp --- indra/newview/llfloaternotificationsconsole.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 9e3422c2b2..b7bca5c6cd 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -173,8 +173,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() @@ -254,7 +252,6 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) : LLFloater(LLSD()), mNote(note) { - LLUICtrlFactory::instance().buildFloater(this, "floater_notification.xml", NULL); } BOOL LLFloaterNotification::postBuild() -- cgit v1.2.3 From 02d8197019dcecec7aee80a104c4644ddb4807ca Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 20 Aug 2010 10:14:28 -0700 Subject: changed buildPanel/buildFloater to member functions buildFromFile streamlined LLUICtrlFactory's interface --- indra/newview/llfloaternotificationsconsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index b7bca5c6cd..3d37c878ad 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -65,7 +65,7 @@ LLNotificationChannelPanel::LLNotificationChannelPanel(const std::string& channe mChannelRejectsPtr = LLNotificationChannelPtr( LLNotificationChannel::buildChannel(channel_name + "rejects", mChannelPtr->getParentChannelName(), !boost::bind(mChannelPtr->getFilter(), _1))); - buildPanel(this, "panel_notifications_channel.xml"); + buildFromFile( "panel_notifications_channel.xml"); } BOOL LLNotificationChannelPanel::postBuild() -- cgit v1.2.3 From 0daa627db4f1bba2f69ec717426b26593674d14c Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 24 Aug 2010 11:44:28 -0700 Subject: removed LLLayoutStack::fromXML custom xml parsing --- indra/newview/llfloaternotificationsconsole.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 3d37c878ad..0a4d5b64f3 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -43,10 +43,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: @@ -58,12 +58,12 @@ 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))); buildFromFile( "panel_notifications_channel.xml"); } @@ -207,8 +207,13 @@ BOOL LLFloaterNotificationConsole::postBuild() void LLFloaterNotificationConsole::addChannel(const std::string& name, bool open) { LLLayoutStack& stack = getChildRef("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("header"); header_button.setToggleState(!open); -- cgit v1.2.3 From e7884bbab54d172957f5ee05df8dad3a4f8931bd Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Wed, 8 Sep 2010 19:00:50 -0700 Subject: DEV-53094 FIX Selecting texture picker causes viewer to crash overzealous elimination of xml parsing --- indra/newview/llfloaternotificationsconsole.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llfloaternotificationsconsole.cpp') diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 08bab95654..42dc60f9e0 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -251,6 +251,7 @@ LLFloaterNotification::LLFloaterNotification(LLNotification* note) : LLFloater(LLSD()), mNote(note) { + buildFromFile("floater_notification.xml"); } BOOL LLFloaterNotification::postBuild() -- cgit v1.2.3