From 9ec432034dc3c45d7ce763eb02dae4cc7f6b8da8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Sun, 21 Jun 2009 08:04:56 +0000 Subject: merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3 ignore-dead-branch --- indra/newview/llfloaterpostprocess.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'indra/newview/llfloaterpostprocess.cpp') diff --git a/indra/newview/llfloaterpostprocess.cpp b/indra/newview/llfloaterpostprocess.cpp index de9b598b1e..a1015918d4 100644 --- a/indra/newview/llfloaterpostprocess.cpp +++ b/indra/newview/llfloaterpostprocess.cpp @@ -47,10 +47,20 @@ LLFloaterPostProcess* LLFloaterPostProcess::sPostProcess = NULL; -LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Process Floater")) +LLFloaterPostProcess::LLFloaterPostProcess() + : LLFloater() { LLUICtrlFactory::getInstance()->buildFloater(this, "floater_post_process.xml"); +} + +LLFloaterPostProcess::~LLFloaterPostProcess() +{ + + +} +BOOL LLFloaterPostProcess::postBuild() +{ /// Color Filter Callbacks childSetCommitCallback("ColorFilterToggle", &LLFloaterPostProcess::onBoolToggle, (char*)"enable_color_filter"); //childSetCommitCallback("ColorFilterGamma", &LLFloaterPostProcess::onFloatControlMoved, &(gPostProcess->tweaks.gamma())); @@ -78,19 +88,13 @@ LLFloaterPostProcess::LLFloaterPostProcess() : LLFloater(std::string("Post-Proce // Effect loading and saving. LLComboBox* comboBox = getChild("PPEffectsCombo"); childSetAction("PPLoadEffect", &LLFloaterPostProcess::onLoadEffect, comboBox); - comboBox->setCommitCallback(onChangeEffectName); + comboBox->setCommitCallback(boost::bind(&LLFloaterPostProcess::onChangeEffectName, this, _1)); LLLineEditor* editBox = getChild("PPEffectNameEditor"); childSetAction("PPSaveEffect", &LLFloaterPostProcess::onSaveEffect, editBox); syncMenu(); - -} - -LLFloaterPostProcess::~LLFloaterPostProcess() -{ - - + return TRUE; } LLFloaterPostProcess* LLFloaterPostProcess::instance() @@ -99,7 +103,7 @@ LLFloaterPostProcess* LLFloaterPostProcess::instance() if (!sPostProcess) { sPostProcess = new LLFloaterPostProcess(); - sPostProcess->open(); + sPostProcess->openFloater(); sPostProcess->setFocus(TRUE); } return sPostProcess; @@ -185,14 +189,13 @@ void LLFloaterPostProcess::onSaveEffect(void* userData) } } -void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl, void * userData) +void LLFloaterPostProcess::onChangeEffectName(LLUICtrl* ctrl) { // get the combo box and name - LLComboBox * comboBox = static_cast(ctrl); - LLLineEditor* editBox = sPostProcess->getChild("PPEffectNameEditor"); + LLLineEditor* editBox = getChild("PPEffectNameEditor"); // set the parameter's new name - editBox->setValue(comboBox->getSelectedValue()); + editBox->setValue(ctrl->getValue()); } bool LLFloaterPostProcess::saveAlertCallback(const LLSD& notification, const LLSD& response) @@ -215,7 +218,7 @@ void LLFloaterPostProcess::show() // and open the menu LLFloaterPostProcess* postProcess = instance(); postProcess->syncMenu(); - postProcess->open(); + postProcess->openFloater(); } // virtual -- cgit v1.2.3