diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp index 887c79179..17c5d860f 100644 --- a/indra/llaudio/llaudioengine_openal.cpp +++ b/indra/llaudio/llaudioengine_openal.cpp @@ -38,6 +38,8 @@ #include "lllistener_openal.h" +const float LLAudioEngine_OpenAL::WIND_BUFFER_SIZE_SEC = 0.05f; + LLAudioEngine_OpenAL::LLAudioEngine_OpenAL() : mWindGen(NULL), @@ -185,6 +187,8 @@ LLAudioChannelOpenAL::~LLAudioChannelOpenAL() void LLAudioChannelOpenAL::cleanup() { alSourceStop(mALSource); + alSourcei(mALSource, AL_BUFFER, AL_NONE); + mCurrentBufferp = NULL; } @@ -324,7 +328,14 @@ void LLAudioBufferOpenAL::cleanup() { if(mALBuffer != AL_NONE) { + alGetError(); // clear error alDeleteBuffers(1, &mALBuffer); + + ALenum error = alutGetError(); + if(ALC_NO_ERROR != error) + { + LL_WARNS("OpenAL") << "Error: " << alutGetErrorString( error ) << " when cleaning up a buffer" << LL_ENDL; + } mALBuffer = AL_NONE; } } @@ -441,6 +452,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) F64 pitch; F64 center_freq; ALenum error; + ALuint *buffers = NULL; if (!mEnableWind) return; @@ -484,58 +496,68 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; - - while(processed--) // unqueue old buffers + + //delete the old wind buffers + buffers = new ALuint[processed]; + alGetError(); /* clear error */ + alSourceUnqueueBuffers(mWindSource, processed, &buffers[0]); + error = alGetError(); + if(error != AL_NO_ERROR) { - ALuint buffer; - ALenum error; - alGetError(); /* clear error */ - alSourceUnqueueBuffers(mWindSource, 1, &buffer); - error = alGetError(); - if(error != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; - } - else - { - alDeleteBuffers(1, &buffer); - } + llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; + } + else + { + alDeleteBuffers(processed, &buffers[0]); + } + // We dont need to keep track of the buffers' id now. + delete[] buffers; + buffers = NULL; + + //create the buffers for the empty wind buffers + unprocessed += mNumEmptyWindALBuffers; + buffers = new ALuint[mNumEmptyWindALBuffers]; + alGetError(); /* clear error */ + alGenBuffers(mNumEmptyWindALBuffers,&buffers[0]); + if((error=alGetError()) != AL_NO_ERROR) + { + llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; + //break; } - unprocessed += mNumEmptyWindALBuffers; - while (mNumEmptyWindALBuffers > 0) // fill+queue new buffers + //fill the buffers with generated wind. + int errors = 0; + for(int i = 0; i < mNumEmptyWindALBuffers; i++) { - ALuint buffer; - alGetError(); /* clear error */ - alGenBuffers(1,&buffer); - if((error=alGetError()) != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl; - break; - } - - alBufferData(buffer, - AL_FORMAT_STEREO16, - mWindGen->windGenerate(mWindBuf, - mWindBufSamples), - mWindBufBytes, - mWindBufFreq); + alBufferData(buffers[i], + AL_FORMAT_STEREO16, + mWindGen->windGenerate(mWindBuf, + mWindBufSamples), + mWindBufBytes, + mWindBufFreq); error = alGetError(); if(error != AL_NO_ERROR) { llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; + errors++; } - - alSourceQueueBuffers(mWindSource, 1, &buffer); - error = alGetError(); - if(error != AL_NO_ERROR) - { - llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; - } - - --mNumEmptyWindALBuffers; } + //queue the buffers + alSourceQueueBuffers(mWindSource, mNumEmptyWindALBuffers, &buffers[0]); + error = alGetError(); + if(error != AL_NO_ERROR) + { + llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; + } + + mNumEmptyWindALBuffers = errors; + // We dont need to keep track of the buffers' id now. + delete[] buffers; + buffers = NULL; + + + //restart playing if not playing ALint playing; alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing); if(playing != AL_PLAYING) diff --git a/indra/llaudio/llaudioengine_openal.h b/indra/llaudio/llaudioengine_openal.h index f274c2185..ecfdbfe77 100644 --- a/indra/llaudio/llaudioengine_openal.h +++ b/indra/llaudio/llaudioengine_openal.h @@ -72,8 +72,8 @@ class LLAudioEngine_OpenAL : public LLAudioEngine ALuint mWindSource; int mNumEmptyWindALBuffers; - static const int MAX_NUM_WIND_BUFFERS = 80; - static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec + static const int MAX_NUM_WIND_BUFFERS = 80; + static const float WIND_BUFFER_SIZE_SEC; // 1/20th sec }; class LLAudioChannelOpenAL : public LLAudioChannel diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 45aae60e8..78b8f95be 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -226,7 +226,7 @@ void LLSingleton::createInstance(SingletonInstanceData& data) if (data.mInitState == INITIALIZING) { - lldebugs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from initSingleton(), using half-initialized object" << llendl; + llerrs << "Tried to access singleton " << typeid(DERIVED_TYPE).name() << " from initSingleton(), using half-initialized object" << llendl; return; } diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index fa81302cb..7e5d648fa 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -48,7 +48,7 @@ // Locally used constants // const U32 SEC_PER_DAY = 86400; -const F64 SEC_TO_MICROSEC = 1000000.f; +const F64 SEC_TO_MICROSEC = 1000000.0; const U64 SEC_TO_MICROSEC_U64 = 1000000; const F64 USEC_TO_SEC_F64 = 0.000001; diff --git a/indra/llmath/llcalcparser.cpp b/indra/llmath/llcalcparser.cpp deleted file mode 100644 index fd55376fa..000000000 --- a/indra/llmath/llcalcparser.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * LLCalcParser.cpp - * SecondLife - * - * Created by Aimee Walton on 28/09/2008. - * Copyright 2008 Aimee Walton. - * - */ - -#include "linden_common.h" - -#include "llcalcparser.h" -using namespace boost::spirit::classic; - -F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const -{ - LLCalc::calc_map_t::iterator iter; - - std::string name(start, end); - - if (mConstants) - { - iter = mConstants->find(name); - if (iter != mConstants->end()) - { - return (*iter).second; - } - } - else - { - // This should never happen! - throw_(end, std::string("Missing constants table")); - } - - if (mVariables) - { - iter = mVariables->find(name); - if (iter != mVariables->end()) - { - return (*iter).second; - } - } - - throw_(end, std::string("Unknown symbol " + name)); - return 0.f; -} diff --git a/indra/llmessage/aicurlprivate.h b/indra/llmessage/aicurlprivate.h index 3b2777b40..42912c240 100644 --- a/indra/llmessage/aicurlprivate.h +++ b/indra/llmessage/aicurlprivate.h @@ -40,7 +40,7 @@ class AIHTTPHeaders; class AICurlEasyRequestStateMachine; -class AITransferInfo; +struct AITransferInfo; namespace AICurlPrivate { @@ -406,8 +406,8 @@ class BufferedCurlEasyRequest : public CurlEasyRequest { //U32 mBodyLimit; // From the old LLURLRequestDetail::mBodyLimit, but never used. U32 mStatus; // HTTP status, decoded from the first header line. std::string mReason; // The "reason" from the same header line. - S32 mRequestTransferedBytes; - S32 mResponseTransferedBytes; + U32 mRequestTransferedBytes; + U32 mResponseTransferedBytes; AIBufferedCurlEasyRequestEvents* mBufferEventsTarget; public: diff --git a/indra/llmessage/aihttptimeoutpolicy.h b/indra/llmessage/aihttptimeoutpolicy.h index a8bb80ca5..6c8fa0683 100644 --- a/indra/llmessage/aihttptimeoutpolicy.h +++ b/indra/llmessage/aihttptimeoutpolicy.h @@ -89,6 +89,9 @@ class AIHTTPTimeoutPolicy { U16 curl_transaction, U16 total_delay); + // Destructor. + virtual ~AIHTTPTimeoutPolicy() { } + void sanity_checks(void) const; // Accessors. diff --git a/indra/llui/llalertdialog.cpp b/indra/llui/llalertdialog.cpp index 27700ca20..712683021 100644 --- a/indra/llui/llalertdialog.cpp +++ b/indra/llui/llalertdialog.cpp @@ -315,11 +315,11 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal) if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE) { - setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label); + setCheckBox(LLNotificationTemplates::instance().getGlobalString("skipnexttime"), ignore_label); } else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE) { - setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label); + setCheckBox(LLNotificationTemplates::instance().getGlobalString("alwayschoose"), ignore_label); } } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 89b43f212..8c11a50b8 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -100,10 +100,10 @@ private: for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it) { - if (!LLNotifications::instance().templateExists((*it)->getName())) continue; + if (!LLNotificationTemplates::instance().templateExists((*it)->getName())) continue; // only store notifications flagged as persisting - LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName()); + LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate((*it)->getName()); if (!templatep->mPersist) continue; data.append((*it)->asLLSD()); @@ -228,7 +228,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP LLXMLNodePtr child = xml_node->getFirstChild(); while(child) { - child = LLNotifications::instance().checkForXMLTemplate(child); + child = LLNotificationTemplates::instance().checkForXMLTemplate(child); LLSD item_entry; std::string element_name = child->getName()->mString; @@ -662,7 +662,7 @@ bool LLNotification::isEquivalentTo(LLNotificationPtr that) const void LLNotification::init(const std::string& template_name, const LLSD& form_elements) { - mTemplatep = LLNotifications::instance().getTemplate(template_name); + mTemplatep = LLNotificationTemplates::instance().getTemplate(template_name); if (!mTemplatep) return; const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs(); @@ -1098,12 +1098,19 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN return p->second; } +// this function is called once at construction time, after the object is constructed. +void LLNotificationTemplates::initSingleton() +{ + loadTemplates(); +} // this function is called once at construction time, after the object is constructed. void LLNotifications::initSingleton() { - loadTemplates(); - createDefaultChannels(); + loadNotifications(); + // Cannot create default channels here, since that recursively accesses the singleton. + // Instead we call createDefaultChannels() from LLAppViewer::init(). + //createDefaultChannels(); } void LLNotifications::createDefaultChannels() @@ -1142,7 +1149,7 @@ void LLNotifications::createDefaultChannels() static std::string sStringSkipNextTime("Skip this dialog next time"); static std::string sStringAlwaysChoose("Always choose this option"); -bool LLNotifications::addTemplate(const std::string &name, +bool LLNotificationTemplates::addTemplate(const std::string &name, LLNotificationTemplatePtr theTemplate) { if (mTemplates.count(name)) @@ -1154,7 +1161,7 @@ bool LLNotifications::addTemplate(const std::string &name, return true; } -LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name) +LLNotificationTemplatePtr LLNotificationTemplates::getTemplate(const std::string& name) { if (mTemplates.count(name)) { @@ -1166,12 +1173,12 @@ LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name) } } -bool LLNotifications::templateExists(const std::string& name) +bool LLNotificationTemplates::templateExists(const std::string& name) { return (mTemplates.count(name) != 0); } -void LLNotifications::clearTemplates() +void LLNotificationTemplates::clearTemplates() { mTemplates.clear(); } @@ -1192,7 +1199,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op temp_notify->respond(response); } -LLNotifications::TemplateNames LLNotifications::getTemplateNames() const +LLNotificationTemplates::TemplateNames LLNotificationTemplates::getTemplateNames() const { TemplateNames names; for (TemplateMap::const_iterator it = mTemplates.begin(); it != mTemplates.end(); ++it) @@ -1242,7 +1249,7 @@ void replaceSubstitutionStrings(LLXMLNodePtr node, StringMap& replacements) // returns true if the template request was invalid and there's nothing else we // can do with this node, false if you should keep processing (it may have // replaced the contents of the node referred to) -LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item) +LLXMLNodePtr LLNotificationTemplates::checkForXMLTemplate(LLXMLNodePtr item) { if (item->hasName("usetemplate")) { @@ -1271,7 +1278,7 @@ LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item) return item; } -bool LLNotifications::loadTemplates() +bool LLNotificationTemplates::loadTemplates() { const std::string xml_filename = "notifications.xml"; LLXMLNodePtr root; @@ -1289,11 +1296,6 @@ bool LLNotifications::loadTemplates() for (LLXMLNodePtr item = root->getFirstChild(); item.notNull(); item = item->getNextSibling()) { - // we do this FIRST so that item can be changed if we - // encounter a usetemplate -- we just replace the - // current xml node and keep processing - item = checkForXMLTemplate(item); - if (item->hasName("global")) { std::string global_name; @@ -1321,7 +1323,35 @@ bool LLNotifications::loadTemplates() " found in " << xml_filename << llendl; continue; } + } + + return true; +} +bool LLNotifications::loadNotifications() +{ + const std::string xml_filename = "notifications.xml"; + LLXMLNodePtr root; + + BOOL success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root); + + if (!success || root.isNull() || !root->hasName( "notifications" )) + { + llerrs << "Problem reading UI Notifications file: " << xml_filename << llendl; + return false; + } + + for (LLXMLNodePtr item = root->getFirstChild(); + item.notNull(); item = item->getNextSibling()) + { + // we do this FIRST so that item can be changed if we + // encounter a usetemplate -- we just replace the + // current xml node and keep processing + item = LLNotificationTemplates::instance().checkForXMLTemplate(item); + + if (!item->hasName("notification")) + continue; + // now we know we have a notification entry, so let's build it LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate()); @@ -1369,7 +1399,7 @@ bool LLNotifications::loadTemplates() for (LLXMLNodePtr child = item->getFirstChild(); !child.isNull(); child = child->getNextSibling()) { - child = checkForXMLTemplate(child); + child = LLNotificationTemplates::instance().checkForXMLTemplate(child); // if (child->hasName("url")) @@ -1405,7 +1435,7 @@ bool LLNotifications::loadTemplates() pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child)); } } - addTemplate(pTemplate->mName, pTemplate); + LLNotificationTemplates::instance().addTemplate(pTemplate->mName, pTemplate); } //std::ostringstream ostream; @@ -1485,7 +1515,7 @@ void LLNotifications::update(const LLNotificationPtr pNotif) } -LLNotificationPtr LLNotifications::find(LLUUID uuid) +LLNotificationPtr LLNotifications::find(LLUUID const& uuid) { LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid)); LLNotificationSet::iterator it=mItems.find(target); @@ -1505,7 +1535,7 @@ void LLNotifications::forEachNotification(NotificationProcess process) std::for_each(mItems.begin(), mItems.end(), process); } -std::string LLNotifications::getGlobalString(const std::string& key) const +std::string LLNotificationTemplates::getGlobalString(const std::string& key) const { GlobalStringMap::const_iterator it = mGlobalStrings.find(key); if (it != mGlobalStrings.end()) diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index b6ee760f3..1585f35f4 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -679,45 +679,20 @@ private: LLNotificationComparator mComparator; }; - - -class LLNotifications : - public LLSingleton, - public LLNotificationChannelBase +class LLNotificationTemplates : + public LLSingleton { - LOG_CLASS(LLNotifications); + LOG_CLASS(LLNotificationTemplates); + + friend class LLSingleton; + + // This class may not use LLNotifications. + typedef char LLNotifications; - friend class LLSingleton; public: - // load notification descriptions from file; - // OK to call more than once because it will reload bool loadTemplates(); LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item); - // we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions = LLSD(), - const LLSD& payload = LLSD()); - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - const std::string& functor_name); - LLNotificationPtr add(const std::string& name, - const LLSD& substitutions, - const LLSD& payload, - LLNotificationFunctorRegistry::ResponseFunctor functor); - LLNotificationPtr add(const LLNotification::Params& p); - - void add(const LLNotificationPtr pNotif); - void cancel(LLNotificationPtr pNotif); - void update(const LLNotificationPtr pNotif); - - LLNotificationPtr find(LLUUID uuid); - - typedef boost::function NotificationProcess; - - void forEachNotification(NotificationProcess process); - // This is all stuff for managing the templates // take your template out LLNotificationTemplatePtr getTemplate(const std::string& name); @@ -736,17 +711,67 @@ public: // useful if you're reloading the file void clearTemplates(); // erase all templates - void forceResponse(const LLNotification::Params& params, S32 option); + // put your template in (should only be called from LLNotifications). + bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate); + std::string getGlobalString(const std::string& key) const; + +private: + // we're a singleton, so we don't have a public constructor + LLNotificationTemplates() { } + /*virtual*/ void initSingleton(); + + TemplateMap mTemplates; + + typedef std::map XMLTemplateMap; + XMLTemplateMap mXmlTemplates; + + typedef std::map GlobalStringMap; + GlobalStringMap mGlobalStrings; +}; + +class LLNotifications : + public LLSingleton, + public LLNotificationChannelBase +{ + LOG_CLASS(LLNotifications); + + friend class LLSingleton; +public: + // load notification descriptions from file; + // OK to call more than once because it will reload + bool loadNotifications(); void createDefaultChannels(); + // we provide a collection of simple add notification functions so that it's reasonable to create notifications in one line + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions = LLSD(), + const LLSD& payload = LLSD()); + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + const std::string& functor_name); + LLNotificationPtr add(const std::string& name, + const LLSD& substitutions, + const LLSD& payload, + LLNotificationFunctorRegistry::ResponseFunctor functor); + LLNotificationPtr add(const LLNotification::Params& p); + + void forceResponse(const LLNotification::Params& params, S32 option); + typedef std::map ChannelMap; ChannelMap mChannels; void addChannel(LLNotificationChannelPtr pChan); LLNotificationChannelPtr getChannel(const std::string& channelName); + + void add(const LLNotificationPtr pNotif); + void cancel(LLNotificationPtr pNotif); + void update(const LLNotificationPtr pNotif); + LLNotificationPtr find(LLUUID const& uuid); - std::string getGlobalString(const std::string& key) const; + typedef boost::function NotificationProcess; + void forEachNotification(NotificationProcess process); private: // we're a singleton, so we don't have a public constructor @@ -760,22 +785,11 @@ private: bool uniqueFilter(LLNotificationPtr pNotification); bool uniqueHandler(const LLSD& payload); bool failedUniquenessTest(const LLSD& payload); + LLNotificationChannelPtr pHistoryChannel; LLNotificationChannelPtr pExpirationChannel; - - // put your template in - bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate); - TemplateMap mTemplates; - - std::string mFileName; - - typedef std::map XMLTemplateMap; - XMLTemplateMap mXmlTemplates; LLNotificationMap mUniqueNotifications; - - typedef std::map GlobalStringMap; - GlobalStringMap mGlobalStrings; }; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 734c1d8c0..4321e0fcc 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -483,7 +483,6 @@ static void settings_to_globals() LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize")); LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile"); - LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic"); LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures"); LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor"); @@ -714,7 +713,7 @@ bool LLAppViewer::init() LLTrans::parseStrings("strings.xml", default_trans_args); // Setup notifications after LLUI::initClass() has been called. - LLNotifications::instance(); + LLNotifications::instance().createDefaultChannels(); LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ; writeSystemInfo(); @@ -876,7 +875,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements"); + std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedGLRequirements"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -891,7 +890,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2"); + std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -905,7 +904,7 @@ bool LLAppViewer::init() { // can't use an alert here since we're exiting and // all hell breaks lose. - std::string msg = LNotifications::instance().getGlobalString("UnsupportedCPUSSE2"); + std::string msg = LNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2"); LLStringUtil::format(msg,LLTrans::getDefaultArgs()); OSMessageBox( msg, @@ -923,31 +922,31 @@ bool LLAppViewer::init() std::string minSpecs; // get cpu data from xml - std::stringstream minCPUString(LLNotifications::instance().getGlobalString("UnsupportedCPUAmount")); + std::stringstream minCPUString(LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUAmount")); S32 minCPU = 0; minCPUString >> minCPU; // get RAM data from XML - std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount")); + std::stringstream minRAMString(LLNotificationTemplates::instance().getGlobalString("UnsupportedRAMAmount")); U64 minRAM = 0; minRAMString >> minRAM; minRAM = minRAM * 1024 * 1024; if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedGPU"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedGPU"); minSpecs += "\n"; unsupported = true; } if(gSysCPU.getMHz() < minCPU) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedCPU"); minSpecs += "\n"; unsupported = true; } if(gSysMemory.getPhysicalMemoryClamped() < minRAM) { - minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM"); + minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedRAM"); minSpecs += "\n"; unsupported = true; } @@ -980,6 +979,11 @@ bool LLAppViewer::init() LLViewerJoystick::getInstance()->init(false); + // Finish windlight initialization. + LLWLParamManager::instance().initHack(); + // Use prefered Environment. + LLEnvManagerNew::instance().usePrefs(); + gGLActive = FALSE; return true; } diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 6dc930df1..30864755c 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -484,8 +484,8 @@ void LLFastTimerView::draw() sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey; F32 hue = 0.f; - - for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); + // Move color generation down to be in the next loop. + /*for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer()); it != timer_tree_iterator_t(); ++it) { @@ -502,7 +502,8 @@ void LLFastTimerView::draw() child_color.setHSL(hue, saturation, lightness); sTimerColors[idp] = child_color; - } + }*/ + // const S32 LEGEND_WIDTH = 220; { @@ -516,6 +517,20 @@ void LLFastTimerView::draw() ++it) { LLFastTimer::NamedTimer* idp = (*it); + // Move color generation down to be in the next loop. + const F32 HUE_INCREMENT = 0.23f; + hue = fmodf(hue + HUE_INCREMENT, 1.f); + // saturation increases with depth + F32 saturation = clamp_rescale((F32)idp->getDepth(), 0.f, 3.f, 0.f, 1.f); + // lightness alternates with depth + F32 lightness = idp->getDepth() % 2 ? 0.5f : 0.6f; + + LLColor4 child_color; + child_color.setHSL(hue, saturation, lightness); + + sTimerColors[idp] = child_color; + // + // Making the ledgend part of fast timers scrollable if(mScrollOffset_tmp) { diff --git a/indra/newview/llfloaterdisplayname.cpp b/indra/newview/llfloaterdisplayname.cpp index 20138b063..a00cfb8bf 100644 --- a/indra/newview/llfloaterdisplayname.cpp +++ b/indra/newview/llfloaterdisplayname.cpp @@ -165,7 +165,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success, // We might have a localized string for this message // error_args will usually be empty from the server. if (!error_tag.empty() - && LLNotifications::getInstance()->templateExists(error_tag)) + && LLNotificationTemplates::getInstance()->templateExists(error_tag)) { LLNotifications::instance().add(error_tag); return; diff --git a/indra/newview/llfloaternotificationsconsole.cpp b/indra/newview/llfloaternotificationsconsole.cpp index 5d6b771d5..ec9bf09b0 100644 --- a/indra/newview/llfloaternotificationsconsole.cpp +++ b/indra/newview/llfloaternotificationsconsole.cpp @@ -187,8 +187,8 @@ BOOL LLFloaterNotificationConsole::postBuild() getChild("add_notification")->setClickedCallback(onClickAdd, this); LLComboBox* notifications = getChild("notification_types"); - LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames(); - for (LLNotifications::TemplateNames::iterator template_it = names.begin(); + LLNotificationTemplates::TemplateNames names = LLNotificationTemplates::instance().getTemplateNames(); + for (LLNotificationTemplates::TemplateNames::iterator template_it = names.begin(); template_it != names.end(); ++template_it) { diff --git a/indra/newview/llpaneldirbrowser.cpp b/indra/newview/llpaneldirbrowser.cpp index 5dee332b3..19201c56d 100644 --- a/indra/newview/llpaneldirbrowser.cpp +++ b/indra/newview/llpaneldirbrowser.cpp @@ -107,13 +107,20 @@ LLPanelDirBrowser::LLPanelDirBrowser(const std::string& name, LLFloaterDirectory BOOL LLPanelDirBrowser::postBuild() { - childSetCommitCallback("results", onCommitList, this); + if (LLUICtrl* ctrl = findChild("results")) + ctrl->setCommitCallback(onCommitList, this); - childSetAction("< Prev", onClickPrev, this); - childHide("< Prev"); + if (LLButton* btn = findChild("< Prev")) + { + childSetAction("< Prev", onClickPrev, this); + btn->setVisible(false); + } - childSetAction("Next >", onClickNext, this); - childHide("Next >"); + if (LLButton* btn = findChild("Next >")) + { + childSetAction("Next >", onClickNext, this); + btn->setVisible(false); + } return TRUE; } @@ -136,7 +143,7 @@ void LLPanelDirBrowser::draw() if (mLastResultTimer.getElapsedTimeF32() > 0.5) { if (!mDidAutoSelect && - !childHasFocus("results")) + hasChild("results") && !childHasFocus("results")) { LLCtrlListInterface *list = childGetListInterface("results"); if (list) @@ -171,7 +178,8 @@ void LLPanelDirBrowser::nextPage() void LLPanelDirBrowser::prevPage() { mSearchStart -= mResultsPerPage; - childSetVisible("< Prev", mSearchStart > 0); + if (LLUICtrl* ctrl = findChild("< Prev")) + ctrl->setVisible(mSearchStart > 0); performQuery(); } @@ -180,14 +188,17 @@ void LLPanelDirBrowser::prevPage() void LLPanelDirBrowser::resetSearchStart() { mSearchStart = 0; - childHide("Next >"); - childHide("< Prev"); + if (LLUICtrl* ctrl = findChild("Next >")) + ctrl->setVisible(false); + if (LLUICtrl* ctrl = findChild("< Prev")) + ctrl->setVisible(false); } // protected void LLPanelDirBrowser::updateResultCount() { - LLScrollListCtrl* list = getChild("results"); + LLScrollListCtrl* list = findChild("results"); + if (!list) return; S32 result_count = list->getItemCount(); std::string result_text; @@ -218,7 +229,7 @@ void LLPanelDirBrowser::updateResultCount() } else { - childEnable("results"); + list->setEnabled(true); } } @@ -319,7 +330,7 @@ void LLPanelDirBrowser::updateMaturityCheckbox() void LLPanelDirBrowser::selectByUUID(const LLUUID& id) { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; BOOL found = list->setCurrentByID(id); if (found) @@ -363,7 +374,7 @@ U32 LLPanelDirBrowser::getSelectedEventID() const void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type) { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; LLSD id_sd = childGetValue("results"); @@ -379,7 +390,7 @@ void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type) void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data) { LLPanelDirBrowser* self = (LLPanelDirBrowser*)data; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; // Start with everyone invisible @@ -515,7 +526,7 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -610,7 +621,7 @@ void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -696,7 +707,7 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -835,7 +846,7 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -932,7 +943,7 @@ void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -1005,7 +1016,7 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**) self->mHaveSearchResults = TRUE; - LLCtrlListInterface *list = self->childGetListInterface("results"); + LLScrollListCtrl* list = self->findChild("results"); if (!list) return; if (!list->getCanSelect()) @@ -1184,7 +1195,7 @@ LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, BOOL is_auction, void LLPanelDirBrowser::newClassified() { - LLCtrlListInterface *list = childGetListInterface("results"); + LLScrollListCtrl* list = findChild("results"); if (!list) return; if (mFloaterDirectory->mPanelClassifiedp) @@ -1212,8 +1223,6 @@ void LLPanelDirBrowser::newClassified() void LLPanelDirBrowser::setupNewSearch() { - LLScrollListCtrl* list = getChild("results"); - gDirBrowserInstances.removeData(mSearchID); // Make a new query ID mSearchID.generate(); @@ -1221,9 +1230,12 @@ void LLPanelDirBrowser::setupNewSearch() gDirBrowserInstances.addData(mSearchID, this); // ready the list for results - list->operateOnAll(LLCtrlListInterface::OP_DELETE); - list->setCommentText(LLTrans::getString("Searching")); - childDisable("results"); + if (LLScrollListCtrl* list = findChild("results")) + { + list->operateOnAll(LLCtrlListInterface::OP_DELETE); + list->setCommentText(LLTrans::getString("Searching")); + list->setEnabled(false); + } mResultsReceived = 0; mHaveSearchResults = FALSE; diff --git a/indra/newview/llpaneldirevents.cpp b/indra/newview/llpaneldirevents.cpp index bded7d142..7f087d9dc 100644 --- a/indra/newview/llpaneldirevents.cpp +++ b/indra/newview/llpaneldirevents.cpp @@ -75,8 +75,6 @@ BOOL LLPanelDirEvents::postBuild() childSetAction("Today", onClickToday, this); - childSetCommitCallback("mature", onCommitMature, this); - childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this); setDefaultBtn("Search"); @@ -296,14 +294,6 @@ void LLPanelDirEvents::onForwardBtn(void* data) } -// static -void LLPanelDirEvents::onCommitMature(LLUICtrl* ctrl, void* data) -{ - // just perform another search - onClickSearchCore(data); -} - - // static void LLPanelDirEvents::onClickDelete(void *userdata) { diff --git a/indra/newview/llpaneldirevents.h b/indra/newview/llpaneldirevents.h index dce31b597..a74f1b3a4 100644 --- a/indra/newview/llpaneldirevents.h +++ b/indra/newview/llpaneldirevents.h @@ -61,7 +61,6 @@ protected: static void onBackBtn(void* data); static void onForwardBtn(void* data); static void onClickToday(void *userdata); - static void onCommitMature(LLUICtrl* ctrl, void* data); static void onClickSearch(void *data); static void onClickDelete(void *data); diff --git a/indra/newview/llpaneldirfind.cpp b/indra/newview/llpaneldirfind.cpp index 2ba9aac2c..a442a40a0 100644 --- a/indra/newview/llpaneldirfind.cpp +++ b/indra/newview/llpaneldirfind.cpp @@ -108,12 +108,16 @@ BOOL LLPanelDirFind::postBuild() LLPanelDirBrowser::postBuild(); childSetAction("back_btn", onClickBack, this); - childSetAction("home_btn", onClickHome, this); + if (hasChild("home_btn")) + childSetAction("home_btn", onClickHome, this); childSetAction("forward_btn", onClickForward, this); childSetAction("reload_btn", onClickRefresh, this); - childSetCommitCallback("search_editor", onCommitSearch, this); - childSetAction("search_btn", onClickSearch, this); - childSetAction("?", onClickHelp, this); + if (hasChild("search_editor")) + childSetCommitCallback("search_editor", onCommitSearch, this); + if (hasChild("search_btn")) + childSetAction("search_btn", onClickSearch, this); + if (hasChild("?")) + childSetAction("?", onClickHelp, this); // showcase doesn't have maturity flags -- it's all PG if (hasChild("incmature")) @@ -161,7 +165,8 @@ BOOL LLPanelDirFind::postBuild() navigateToDefaultPage(); } - childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL)); + if (LLUICtrl* ctrl = findChild("filter_gaming")) + ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL)); return TRUE; } @@ -257,7 +262,8 @@ void LLPanelDirFindAll::search(const std::string& search_text) void LLPanelDirFind::focus() { - childSetFocus("search_editor"); + if (hasChild("search_editor")) + childSetFocus("search_editor"); } void LLPanelDirFind::navigateToDefaultPage() @@ -291,17 +297,20 @@ void LLPanelDirFind::navigateToDefaultPage() start_url += "panel=" + getName() + "&"; } - BOOL inc_pg = childGetValue("incpg").asBoolean(); - BOOL inc_mature = childGetValue("incmature").asBoolean(); - BOOL inc_adult = childGetValue("incadult").asBoolean(); - if (!(inc_pg || inc_mature || inc_adult)) + if (hasChild("incmature")) { - // if nothing's checked, just go for pg; we don't notify in - // this case because it's a default page. - inc_pg = true; - } + bool inc_pg = childGetValue("incpg").asBoolean(); + bool inc_mature = childGetValue("incmature").asBoolean(); + bool inc_adult = childGetValue("incadult").asBoolean(); + if (!(inc_pg || inc_mature || inc_adult)) + { + // if nothing's checked, just go for pg; we don't notify in + // this case because it's a default page. + inc_pg = true; + } - start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, true); + start_url += getSearchURLSuffix(inc_pg, inc_mature, inc_adult, true); + } } llinfos << "default web search url: " << start_url << llendl; @@ -433,7 +442,7 @@ const std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_matur if (!gHippoGridManager->getConnectedGrid()->isSecondLife()) { substring = "[DICE]"; - url.replace(url.find(substring), substring.length(), childGetValue("filter_gaming").asBoolean() ? "y" : "n"); + url.replace(url.find(substring), substring.length(), (hasChild("filter_gaming") && childGetValue("filter_gaming").asBoolean()) ? "y" : "n"); } } } @@ -570,7 +579,8 @@ BOOL LLPanelDirFindAllOld::postBuild() childDisable("Search"); setDefaultBtn( "Search" ); - childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC)); + if (LLUICtrl* ctrl = findChild("filter_gaming")) + ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC)); return TRUE; } @@ -634,7 +644,7 @@ void LLPanelDirFindAllOld::onClickSearch(void *userdata) scope |= DFQ_INC_ADULT; } - if (self->childGetValue("filter_gaming").asBoolean()) + if (self->hasChild("filter_gaming") && self->childGetValue("filter_gaming").asBoolean()) { scope |= DFQ_FILTER_GAMING; } diff --git a/indra/newview/llpaneldirland.cpp b/indra/newview/llpaneldirland.cpp index 199426a6d..06b34570d 100644 --- a/indra/newview/llpaneldirland.cpp +++ b/indra/newview/llpaneldirland.cpp @@ -103,7 +103,6 @@ BOOL LLPanelDirLand::postBuild() childSetAction("Search", onClickSearchCore, this); setDefaultBtn("Search"); - childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 49b59720d..e45f0608a 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -69,7 +69,7 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp) BOOL LLPanelGroupTab::postBuild() { // Hook up the help button callback. - LLButton* button = getChild("help_button"); + LLButton* button = findChild("help_button"); if (button) { button->setClickedCallback(boost::bind(&LLPanelGroupTab::onClickHelp,this)); diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 20701dd6e..630a28128 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -515,7 +515,7 @@ BOOL LLPanelGroupSubTab::postBuild() delete icon; } - icon = getChild("power_all_have_icon",no_recurse); + icon = getChild("power_all_have_icon",no_recurse, false); if (icon && !icon->getImageName().empty()) { mActionIcons["full"] = icon->getImageName(); @@ -523,7 +523,7 @@ BOOL LLPanelGroupSubTab::postBuild() delete icon; } - icon = getChild("power_partial_icon",no_recurse); + icon = getChild("power_partial_icon",no_recurse, false); if (icon && !icon->getImageName().empty()) { mActionIcons["partial"] = icon->getImageName(); diff --git a/indra/newview/llpanelmsgs.cpp b/indra/newview/llpanelmsgs.cpp index 54e2f7dbe..e1afe8a1f 100644 --- a/indra/newview/llpanelmsgs.cpp +++ b/indra/newview/llpanelmsgs.cpp @@ -83,8 +83,8 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in disabled_popups.deleteAllItems(); enabled_popups.deleteAllItems(); - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { LLNotificationTemplatePtr templatep = iter->second; @@ -175,8 +175,8 @@ void LLPanelMsgs::cancel() void LLPanelMsgs::resetAllIgnored() { - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) @@ -188,8 +188,8 @@ void LLPanelMsgs::resetAllIgnored() void LLPanelMsgs::setAllIgnored() { - for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); - iter != LLNotifications::instance().templatesEnd(); + for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin(); + iter != LLNotificationTemplates::instance().templatesEnd(); ++iter) { if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO) @@ -210,7 +210,7 @@ void LLPanelMsgs::onClickEnablePopup(void* user_data) std::vector::iterator itor; for (itor = items.begin(); itor != items.end(); ++itor) { - LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); + LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata())); gSavedSettings.setWarning(templatep->mName, TRUE); } diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp index 5bbf93ed3..ba12d60a0 100644 --- a/indra/newview/llpanelplace.cpp +++ b/indra/newview/llpanelplace.cpp @@ -97,7 +97,7 @@ BOOL LLPanelPlace::postBuild() mDescEditor = getChild("desc_editor"); mInfoEditor = getChild("info_editor"); - mLandTypeEditor = getChild("land_type_display"); + mLandTypeEditor = findChild("land_type_display"); mLocationDisplay = getChild("location_editor"); @@ -145,7 +145,8 @@ void LLPanelPlace::resetLocation() mNameEditor->setText( LLStringUtil::null ); mDescEditor->setText( LLStringUtil::null ); mInfoEditor->setText( LLStringUtil::null ); - mLandTypeEditor->setText( LLStringUtil::null ); + if (mLandTypeEditor) + mLandTypeEditor->setText(LLStringUtil::null); mLocationDisplay->setText( LLStringUtil::null ); } @@ -198,7 +199,8 @@ void LLPanelPlace::setLocationString(const std::string& location) void LLPanelPlace::setLandTypeString(const std::string& land_type) { - mLandTypeEditor->setText(land_type); + if (mLandTypeEditor) + mLandTypeEditor->setText(land_type); } void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason) diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 45de56e14..affd4bbce 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -126,7 +126,8 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, } } } - childSetAction("Save",onClickSave,this); + if (hasChild("Save", true)) + childSetAction("Save",onClickSave,this); // only assert shape if not hosted in a multifloater if (!getHost()) @@ -135,18 +136,20 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name, setRect(curRect); } - childSetVisible("lock", FALSE); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(false); - const LLInventoryItem* item = getItem(); - - childSetCommitCallback("desc", LLPreview::onText, this); - if (item) - childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + if (hasChild("desc", true)) + { + childSetCommitCallback("desc", LLPreview::onText, this); + if (const LLInventoryItem* item = getItem()) + childSetText("desc", item->getDescription()); + childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + } setTitle(title); - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); if (editor) { @@ -166,7 +169,7 @@ LLPreviewNotecard::~LLPreviewNotecard() BOOL LLPreviewNotecard::postBuild() { - LLViewerTextEditor *ed = getChild("Notecard Editor"); + LLViewerTextEditor* ed = findChild("Notecard Editor"); if (ed) { ed->setNotecardInfo(mNotecardItemID, mObjectID); @@ -192,27 +195,27 @@ bool LLPreviewNotecard::saveItem(LLPointer* itemptr) void LLPreviewNotecard::setEnabled( BOOL enabled ) { + LLViewerTextEditor* editor = findChild("Notecard Editor"); - LLViewerTextEditor* editor = getChild("Notecard Editor"); - - childSetEnabled("Notecard Editor", enabled); - childSetVisible("lock", !enabled); - childSetEnabled("desc", enabled); - childSetEnabled("Save", enabled && editor && (!editor->isPristine())); + if (editor) + editor->setEnabled(enabled); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(!enabled); + if (LLUICtrl* ctrl = findChild("desc")) + ctrl->setEnabled(enabled); + if (LLUICtrl* ctrl = findChild("Save")) + ctrl->setEnabled(enabled && editor && !editor->isPristine()); } void LLPreviewNotecard::draw() { + LLViewerTextEditor* editor = findChild("Notecard Editor"); + BOOL script_changed = editor && !editor->isPristine(); - - //childSetFocus("Save", FALSE); - - LLViewerTextEditor* editor = getChild("Notecard Editor"); - BOOL script_changed = !editor->isPristine(); - - childSetEnabled("Save", script_changed && getEnabled()); + if (LLUICtrl* ctrl = findChild("Save")) + ctrl->setEnabled(script_changed && getEnabled()); LLPreview::draw(); } @@ -228,7 +231,7 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) if ('F' == key && (mask & MASK_CONTROL) && !(mask & (MASK_SHIFT | MASK_ALT))) { - LLFloaterSearchReplace::show(getChild("Notecard Editor")); + LLFloaterSearchReplace::show(findChild("Notecard Editor")); return TRUE; } @@ -238,9 +241,9 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask) // virtual BOOL LLPreviewNotecard::canClose() { - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); - if(mForceClose || editor->isPristine()) + if (mForceClose || (editor && editor->isPristine())) { return TRUE; } @@ -255,9 +258,7 @@ BOOL LLPreviewNotecard::canClose() const LLInventoryItem* LLPreviewNotecard::getDragItem() { - LLViewerTextEditor* editor = getChild("Notecard Editor"); - - if(editor) + if (LLViewerTextEditor* editor = findChild("Notecard Editor")) { return editor->getDragItem(); } @@ -266,10 +267,9 @@ const LLInventoryItem* LLPreviewNotecard::getDragItem() bool LLPreviewNotecard::hasEmbeddedInventory() { - LLViewerTextEditor* editor = NULL; - editor = getChild("Notecard Editor"); - if (!editor) return false; - return editor->hasEmbeddedInventory(); + if (LLViewerTextEditor* editor = findChild("Notecard Editor")) + return editor->hasEmbeddedInventory(); + return false; } void LLPreviewNotecard::refreshFromInventory() @@ -280,15 +280,13 @@ void LLPreviewNotecard::refreshFromInventory() void LLPreviewNotecard::loadAsset() { - // request the asset. - const LLInventoryItem* item = getItem(); - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); if (!editor) return; - - if(item) + // request the asset. + if (const LLInventoryItem* item = getItem()) { if (gAgent.allowOperation(PERM_COPY, item->getPermissions(), GP_OBJECT_MANIPULATE) @@ -355,7 +353,8 @@ void LLPreviewNotecard::loadAsset() // You can always save in task inventory if(!mObjectUUID.isNull()) editor->setEnabled(TRUE); // - childSetVisible("lock", TRUE); + if (LLUICtrl* ctrl = findChild("lock")) + ctrl->setVisible(true); } } else @@ -391,22 +390,23 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs, buffer[file_length] = 0; - LLViewerTextEditor* previewEditor = preview->getChild("Notecard Editor"); - - if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) ) + if (LLViewerTextEditor* previewEditor = preview->findChild("Notecard Editor")) { - if( !previewEditor->importBuffer( buffer, file_length+1 ) ) + if ((file_length > 19) && !strncmp(buffer, "Linden text version", 19)) { - llwarns << "Problem importing notecard" << llendl; + if (!previewEditor->importBuffer(buffer, file_length+1)) + { + llwarns << "Problem importing notecard" << llendl; + } + } + else + { + // Version 0 (just text, doesn't include version number) + previewEditor->setText(LLStringExplicit(buffer)); } - } - else - { - // Version 0 (just text, doesn't include version number) - previewEditor->setText(LLStringExplicit(buffer)); - } - previewEditor->makePristine(); + previewEditor->makePristine(); + } const LLInventoryItem* item = preview->getItem(); BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY, @@ -466,42 +466,37 @@ void LLPreviewNotecard::onClickSave(void* user_data) // static void LLPreviewNotecard::onClickGetItems(void* user_data) { - LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data; - if(preview) + LLPreviewNotecard* preview = static_cast(user_data); + if (LLViewerTextEditor* editor = preview->findChild("Notecard Editor")) { - LLViewerTextEditor* editor = preview->getChild("Notecard Editor"); - if(editor) + std::vector > items = editor->getEmbeddedItems(); + if (items.size()) { - std::vector > items = editor->getEmbeddedItems(); - if(items.size()) + std::vector >::iterator iter = items.begin(); + std::vector >::iterator end = items.end(); + for ( ; iter != end; ++iter) { - const BOOL use_caps = FALSE; - - std::vector >::iterator iter = items.begin(); - std::vector >::iterator end = items.end(); - for( ; iter != end; ++iter) + LLInventoryItem* item = static_cast(*iter); + #if 0 //use_caps { - LLInventoryItem* item = static_cast(*iter); - if(use_caps) - { - copy_inventory_from_notecard(LLUUID::null, preview->getObjectID(), preview->getNotecardItemID(), item, 0); - } - else - { - // Only one item per message actually works - gMessageSystem->newMessageFast(_PREHASH_CopyInventoryFromNotecard); - gMessageSystem->nextBlockFast(_PREHASH_AgentData); - gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); - gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); - gMessageSystem->nextBlockFast(_PREHASH_NotecardData); - gMessageSystem->addUUIDFast(_PREHASH_NotecardItemID, preview->getNotecardItemID()); - gMessageSystem->addUUIDFast(_PREHASH_ObjectID, preview->getObjectID()); - gMessageSystem->nextBlockFast(_PREHASH_InventoryData); - gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID()); - gMessageSystem->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType()))); - gAgent.sendReliableMessage(); - } + copy_inventory_from_notecard(LLUUID::null, preview->getObjectID(), preview->getNotecardItemID(), item, 0); } + #else + { + // Only one item per message actually works + gMessageSystem->newMessageFast(_PREHASH_CopyInventoryFromNotecard); + gMessageSystem->nextBlockFast(_PREHASH_AgentData); + gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + gMessageSystem->nextBlockFast(_PREHASH_NotecardData); + gMessageSystem->addUUIDFast(_PREHASH_NotecardItemID, preview->getNotecardItemID()); + gMessageSystem->addUUIDFast(_PREHASH_ObjectID, preview->getObjectID()); + gMessageSystem->nextBlockFast(_PREHASH_InventoryData); + gMessageSystem->addUUIDFast(_PREHASH_ItemID, item->getUUID()); + gMessageSystem->addUUIDFast(_PREHASH_FolderID, gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(item->getType()))); + gAgent.sendReliableMessage(); + } + #endif } } } @@ -530,9 +525,9 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) } - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); - if(!editor->isPristine()) + if (editor && !editor->isPristine()) { // We need to update the asset information LLTransactionID tid; @@ -602,8 +597,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem) // static void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed) { - LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data; - if(info && (0 == status)) + LLSaveNotecardInfo* info = static_cast(user_data); + if (0 == status) { if(info->mObjectUUID.isNull()) { @@ -647,8 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data // Perform item copy to inventory if (info->mCopyItem.notNull()) { - LLViewerTextEditor* editor = info->mSelf->getChild("Notecard Editor"); - if (editor) + if (LLViewerTextEditor* editor = info->mSelf->findChild("Notecard Editor")) { editor->copyInventory(info->mCopyItem); } @@ -741,10 +735,10 @@ void LLPreviewNotecard::saveAs_continued(AIFilePicker* filepicker) if (!filepicker->hasFilename()) return; - LLViewerTextEditor* editor = getChild("Notecard Editor"); + LLViewerTextEditor* editor = findChild("Notecard Editor"); std::string buffer; - if (!editor->exportBuffer(buffer)) + if (editor && !editor->exportBuffer(buffer)) { // FIXME: Notify the user! return; @@ -782,7 +776,7 @@ LLUUID LLPreviewNotecard::getItemID() LLTextEditor* LLPreviewNotecard::getEditor() { - return getChild("Notecard Editor"); + return findChild("Notecard Editor"); } void LLPreviewNotecard::initMenu() @@ -823,183 +817,128 @@ void LLPreviewNotecard::initMenu() // static void LLPreviewNotecard::onSearchMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - LLFloaterSearchReplace::show(editor); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + LLFloaterSearchReplace::show(editor); } // static void LLPreviewNotecard::onUndoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->undo(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->undo(); } // static void LLPreviewNotecard::onRedoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->redo(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->redo(); } // static void LLPreviewNotecard::onCutMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->cut(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->cut(); } // static void LLPreviewNotecard::onCopyMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->copy(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->copy(); } // static void LLPreviewNotecard::onPasteMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->paste(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->paste(); } // static void LLPreviewNotecard::onSelectAllMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->selectAll(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->selectAll(); } // static void LLPreviewNotecard::onDeselectMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (self) - { - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (editor) - { - editor->deselect(); - } - } + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + editor->deselect(); } // static BOOL LLPreviewNotecard::enableUndoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canUndo(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canUndo(); + return false; } // static BOOL LLPreviewNotecard::enableRedoMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canRedo(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canRedo(); + return false; } // static BOOL LLPreviewNotecard::enableCutMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canCut(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canCut(); + return false; } // static BOOL LLPreviewNotecard::enableCopyMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canCopy(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canCopy(); + return false; } // static BOOL LLPreviewNotecard::enablePasteMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canPaste(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canPaste(); + return false; } // static BOOL LLPreviewNotecard::enableSelectAllMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canSelectAll(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canSelectAll(); + return false; } // static BOOL LLPreviewNotecard::enableDeselectMenu(void* userdata) { - LLPreviewNotecard* self = (LLPreviewNotecard*)userdata; - if (!self) return FALSE; - LLViewerTextEditor* editor = self->getChild("Notecard Editor"); - if (!editor) return FALSE; - return editor->canDeselect(); + LLPreviewNotecard* self = static_cast(userdata); + if (LLViewerTextEditor* editor = self->findChild("Notecard Editor")) + return editor->canDeselect(); + return false; } // EOF diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 00f6c939c..3efe1822a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6131,7 +6131,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) // notification was specified using the new mechanism, so we can just handle it here std::string notificationID; msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID); - if (!LLNotifications::getInstance()->templateExists(notificationID)) + if (!LLNotificationTemplates::getInstance()->templateExists(notificationID)) { return false; } @@ -6309,7 +6309,7 @@ void process_alert_core(const std::string& message, BOOL modal) } else { - std::string new_msg =LLNotifications::instance().getGlobalString(text); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(text); args["MESSAGE"] = new_msg; LLNotificationsUtil::add("SystemMessage", args); } @@ -6317,7 +6317,7 @@ void process_alert_core(const std::string& message, BOOL modal) else if (modal) { LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message); args["ERROR_MESSAGE"] = new_msg; LLNotificationsUtil::add("ErrorMessage", args); } @@ -6328,7 +6328,7 @@ void process_alert_core(const std::string& message, BOOL modal) if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos ) { LLSD args; - std::string new_msg =LLNotifications::instance().getGlobalString(message); + std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message); std::string localized_msg; bool is_message_localized = LLTrans::findString(localized_msg, new_msg); diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index 08f1d85a8..a39530724 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -588,7 +588,10 @@ void LLWaterParamManager::initSingleton() loadAllPresets(); - LLEnvManagerNew::instance().usePrefs(); + // This shouldn't be called here. It has nothing to do with the initialization of this singleton. + // Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry + // of LLWaterParamManager::initSingleton(). + //LLEnvManagerNew::instance().usePrefs(); } // static diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index cbcd5ec4e..95eba470f 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -775,14 +775,19 @@ boost::signals2::connection LLWLParamManager::setPresetListChangeCallback(const } - -// static void LLWLParamManager::initSingleton() { LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL; loadAllPresets(); + // Here it used to call LLWLParamManager::initHack(), but we can't do that since it calls + // LLWLParamManager::initSingleton() recursively. Instead, call it from LLAppViewer::init(). +} + +// This is really really horrible, but can't be fixed without a rewrite. +void LLWLParamManager::initHack() +{ // load the day std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName(); if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay)) @@ -810,7 +815,10 @@ void LLWLParamManager::initSingleton() // but use linden time sets it to what the estate is mAnimator.setTimeType(LLWLAnimator::TIME_LINDEN); - LLEnvManagerNew::instance().usePrefs(); + // This shouldn't be called here. It has nothing to do with the initialization of this singleton. + // Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry + // of LLWLParamManager::initSingleton(). + //LLEnvManagerNew::instance().usePrefs(); } // static diff --git a/indra/newview/llwlparammanager.h b/indra/newview/llwlparammanager.h index c65cbcb36..d244d4c47 100644 --- a/indra/newview/llwlparammanager.h +++ b/indra/newview/llwlparammanager.h @@ -341,6 +341,9 @@ private: std::map mParamList; preset_list_signal_t mPresetListChangeSignal; + +public: + void initHack(); }; inline F32 LLWLParamManager::getDomeOffset(void) const diff --git a/indra/newview/skins/default/xui/en-us/floater_directory.xml b/indra/newview/skins/default/xui/en-us/floater_directory.xml index 02c9f2a83..3a3983bb1 100644 --- a/indra/newview/skins/default/xui/en-us/floater_directory.xml +++ b/indra/newview/skins/default/xui/en-us/floater_directory.xml @@ -672,6 +672,7 @@ To buy direct, visit the land and click on the place name in the title bar. font="SansSerifSmall" height="16" initial_value="false" label="Adult content" left_delta="110" mouse_opaque="true" name="incadult" width="204" /> + - Simple Majority - 2/3 Majority - Unanimous + Simple Majority + 2/3 Majority + Unanimous