Merge branch 'Cupcake' of https://github.com/LightDrake/SingularityViewer into Frosting
This commit is contained in:
@@ -38,6 +38,8 @@
|
|||||||
#include "lllistener_openal.h"
|
#include "lllistener_openal.h"
|
||||||
|
|
||||||
|
|
||||||
|
const float LLAudioEngine_OpenAL::WIND_BUFFER_SIZE_SEC = 0.05f;
|
||||||
|
|
||||||
LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
|
LLAudioEngine_OpenAL::LLAudioEngine_OpenAL()
|
||||||
:
|
:
|
||||||
mWindGen(NULL),
|
mWindGen(NULL),
|
||||||
@@ -185,6 +187,8 @@ LLAudioChannelOpenAL::~LLAudioChannelOpenAL()
|
|||||||
void LLAudioChannelOpenAL::cleanup()
|
void LLAudioChannelOpenAL::cleanup()
|
||||||
{
|
{
|
||||||
alSourceStop(mALSource);
|
alSourceStop(mALSource);
|
||||||
|
alSourcei(mALSource, AL_BUFFER, AL_NONE);
|
||||||
|
|
||||||
mCurrentBufferp = NULL;
|
mCurrentBufferp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +328,14 @@ void LLAudioBufferOpenAL::cleanup()
|
|||||||
{
|
{
|
||||||
if(mALBuffer != AL_NONE)
|
if(mALBuffer != AL_NONE)
|
||||||
{
|
{
|
||||||
|
alGetError(); // clear error
|
||||||
alDeleteBuffers(1, &mALBuffer);
|
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;
|
mALBuffer = AL_NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -441,6 +452,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
|
|||||||
F64 pitch;
|
F64 pitch;
|
||||||
F64 center_freq;
|
F64 center_freq;
|
||||||
ALenum error;
|
ALenum error;
|
||||||
|
ALuint *buffers = NULL;
|
||||||
|
|
||||||
if (!mEnableWind)
|
if (!mEnableWind)
|
||||||
return;
|
return;
|
||||||
@@ -484,58 +496,68 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
|
|||||||
mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
|
mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
|
||||||
|
|
||||||
//llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
|
//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;
|
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
|
||||||
ALenum error;
|
}
|
||||||
alGetError(); /* clear error */
|
else
|
||||||
alSourceUnqueueBuffers(mWindSource, 1, &buffer);
|
{
|
||||||
error = alGetError();
|
alDeleteBuffers(processed, &buffers[0]);
|
||||||
if(error != AL_NO_ERROR)
|
}
|
||||||
{
|
// We dont need to keep track of the buffers' id now.
|
||||||
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
|
delete[] buffers;
|
||||||
}
|
buffers = NULL;
|
||||||
else
|
|
||||||
{
|
//create the buffers for the empty wind buffers
|
||||||
alDeleteBuffers(1, &buffer);
|
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;
|
//fill the buffers with generated wind.
|
||||||
while (mNumEmptyWindALBuffers > 0) // fill+queue new buffers
|
int errors = 0;
|
||||||
|
for(int i = 0; i < mNumEmptyWindALBuffers; i++)
|
||||||
{
|
{
|
||||||
ALuint buffer;
|
alBufferData(buffers[i],
|
||||||
alGetError(); /* clear error */
|
AL_FORMAT_STEREO16,
|
||||||
alGenBuffers(1,&buffer);
|
mWindGen->windGenerate(mWindBuf,
|
||||||
if((error=alGetError()) != AL_NO_ERROR)
|
mWindBufSamples),
|
||||||
{
|
mWindBufBytes,
|
||||||
llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl;
|
mWindBufFreq);
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
alBufferData(buffer,
|
|
||||||
AL_FORMAT_STEREO16,
|
|
||||||
mWindGen->windGenerate(mWindBuf,
|
|
||||||
mWindBufSamples),
|
|
||||||
mWindBufBytes,
|
|
||||||
mWindBufFreq);
|
|
||||||
error = alGetError();
|
error = alGetError();
|
||||||
if(error != AL_NO_ERROR)
|
if(error != AL_NO_ERROR)
|
||||||
{
|
{
|
||||||
llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
|
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;
|
ALint playing;
|
||||||
alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
|
alGetSourcei(mWindSource, AL_SOURCE_STATE, &playing);
|
||||||
if(playing != AL_PLAYING)
|
if(playing != AL_PLAYING)
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ class LLAudioEngine_OpenAL : public LLAudioEngine
|
|||||||
ALuint mWindSource;
|
ALuint mWindSource;
|
||||||
int mNumEmptyWindALBuffers;
|
int mNumEmptyWindALBuffers;
|
||||||
|
|
||||||
static const int MAX_NUM_WIND_BUFFERS = 80;
|
static const int MAX_NUM_WIND_BUFFERS = 80;
|
||||||
static const float WIND_BUFFER_SIZE_SEC = 0.05f; // 1/20th sec
|
static const float WIND_BUFFER_SIZE_SEC; // 1/20th sec
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLAudioChannelOpenAL : public LLAudioChannel
|
class LLAudioChannelOpenAL : public LLAudioChannel
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ void LLSingleton<DERIVED_TYPE>::createInstance(SingletonInstanceData& data)
|
|||||||
|
|
||||||
if (data.mInitState == INITIALIZING)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
// Locally used constants
|
// Locally used constants
|
||||||
//
|
//
|
||||||
const U32 SEC_PER_DAY = 86400;
|
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 U64 SEC_TO_MICROSEC_U64 = 1000000;
|
||||||
const F64 USEC_TO_SEC_F64 = 0.000001;
|
const F64 USEC_TO_SEC_F64 = 0.000001;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
class AIHTTPHeaders;
|
class AIHTTPHeaders;
|
||||||
class AICurlEasyRequestStateMachine;
|
class AICurlEasyRequestStateMachine;
|
||||||
class AITransferInfo;
|
struct AITransferInfo;
|
||||||
|
|
||||||
namespace AICurlPrivate {
|
namespace AICurlPrivate {
|
||||||
|
|
||||||
@@ -406,8 +406,8 @@ class BufferedCurlEasyRequest : public CurlEasyRequest {
|
|||||||
//U32 mBodyLimit; // From the old LLURLRequestDetail::mBodyLimit, but never used.
|
//U32 mBodyLimit; // From the old LLURLRequestDetail::mBodyLimit, but never used.
|
||||||
U32 mStatus; // HTTP status, decoded from the first header line.
|
U32 mStatus; // HTTP status, decoded from the first header line.
|
||||||
std::string mReason; // The "reason" from the same header line.
|
std::string mReason; // The "reason" from the same header line.
|
||||||
S32 mRequestTransferedBytes;
|
U32 mRequestTransferedBytes;
|
||||||
S32 mResponseTransferedBytes;
|
U32 mResponseTransferedBytes;
|
||||||
AIBufferedCurlEasyRequestEvents* mBufferEventsTarget;
|
AIBufferedCurlEasyRequestEvents* mBufferEventsTarget;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -89,6 +89,9 @@ class AIHTTPTimeoutPolicy {
|
|||||||
U16 curl_transaction,
|
U16 curl_transaction,
|
||||||
U16 total_delay);
|
U16 total_delay);
|
||||||
|
|
||||||
|
// Destructor.
|
||||||
|
virtual ~AIHTTPTimeoutPolicy() { }
|
||||||
|
|
||||||
void sanity_checks(void) const;
|
void sanity_checks(void) const;
|
||||||
|
|
||||||
// Accessors.
|
// Accessors.
|
||||||
|
|||||||
@@ -315,11 +315,11 @@ LLAlertDialog::LLAlertDialog( LLNotificationPtr notification, bool modal)
|
|||||||
|
|
||||||
if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE)
|
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)
|
else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE)
|
||||||
{
|
{
|
||||||
setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label);
|
setCheckBox(LLNotificationTemplates::instance().getGlobalString("alwayschoose"), ignore_label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,10 +100,10 @@ private:
|
|||||||
|
|
||||||
for (LLNotificationSet::iterator it = mItems.begin(); it != mItems.end(); ++it)
|
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
|
// only store notifications flagged as persisting
|
||||||
LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate((*it)->getName());
|
LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate((*it)->getName());
|
||||||
if (!templatep->mPersist) continue;
|
if (!templatep->mPersist) continue;
|
||||||
|
|
||||||
data.append((*it)->asLLSD());
|
data.append((*it)->asLLSD());
|
||||||
@@ -228,7 +228,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLXMLNodeP
|
|||||||
LLXMLNodePtr child = xml_node->getFirstChild();
|
LLXMLNodePtr child = xml_node->getFirstChild();
|
||||||
while(child)
|
while(child)
|
||||||
{
|
{
|
||||||
child = LLNotifications::instance().checkForXMLTemplate(child);
|
child = LLNotificationTemplates::instance().checkForXMLTemplate(child);
|
||||||
|
|
||||||
LLSD item_entry;
|
LLSD item_entry;
|
||||||
std::string element_name = child->getName()->mString;
|
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)
|
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;
|
if (!mTemplatep) return;
|
||||||
|
|
||||||
const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
|
const LLStringUtil::format_map_t& default_args = LLTrans::getDefaultArgs();
|
||||||
@@ -1098,12 +1098,19 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN
|
|||||||
return p->second;
|
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.
|
// this function is called once at construction time, after the object is constructed.
|
||||||
void LLNotifications::initSingleton()
|
void LLNotifications::initSingleton()
|
||||||
{
|
{
|
||||||
loadTemplates();
|
loadNotifications();
|
||||||
createDefaultChannels();
|
// Cannot create default channels here, since that recursively accesses the singleton.
|
||||||
|
// Instead we call createDefaultChannels() from LLAppViewer::init().
|
||||||
|
//createDefaultChannels();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLNotifications::createDefaultChannels()
|
void LLNotifications::createDefaultChannels()
|
||||||
@@ -1142,7 +1149,7 @@ void LLNotifications::createDefaultChannels()
|
|||||||
static std::string sStringSkipNextTime("Skip this dialog next time");
|
static std::string sStringSkipNextTime("Skip this dialog next time");
|
||||||
static std::string sStringAlwaysChoose("Always choose this option");
|
static std::string sStringAlwaysChoose("Always choose this option");
|
||||||
|
|
||||||
bool LLNotifications::addTemplate(const std::string &name,
|
bool LLNotificationTemplates::addTemplate(const std::string &name,
|
||||||
LLNotificationTemplatePtr theTemplate)
|
LLNotificationTemplatePtr theTemplate)
|
||||||
{
|
{
|
||||||
if (mTemplates.count(name))
|
if (mTemplates.count(name))
|
||||||
@@ -1154,7 +1161,7 @@ bool LLNotifications::addTemplate(const std::string &name,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLNotificationTemplatePtr LLNotifications::getTemplate(const std::string& name)
|
LLNotificationTemplatePtr LLNotificationTemplates::getTemplate(const std::string& name)
|
||||||
{
|
{
|
||||||
if (mTemplates.count(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);
|
return (mTemplates.count(name) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLNotifications::clearTemplates()
|
void LLNotificationTemplates::clearTemplates()
|
||||||
{
|
{
|
||||||
mTemplates.clear();
|
mTemplates.clear();
|
||||||
}
|
}
|
||||||
@@ -1192,7 +1199,7 @@ void LLNotifications::forceResponse(const LLNotification::Params& params, S32 op
|
|||||||
temp_notify->respond(response);
|
temp_notify->respond(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
LLNotifications::TemplateNames LLNotifications::getTemplateNames() const
|
LLNotificationTemplates::TemplateNames LLNotificationTemplates::getTemplateNames() const
|
||||||
{
|
{
|
||||||
TemplateNames names;
|
TemplateNames names;
|
||||||
for (TemplateMap::const_iterator it = mTemplates.begin(); it != mTemplates.end(); ++it)
|
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
|
// 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
|
// can do with this node, false if you should keep processing (it may have
|
||||||
// replaced the contents of the node referred to)
|
// replaced the contents of the node referred to)
|
||||||
LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item)
|
LLXMLNodePtr LLNotificationTemplates::checkForXMLTemplate(LLXMLNodePtr item)
|
||||||
{
|
{
|
||||||
if (item->hasName("usetemplate"))
|
if (item->hasName("usetemplate"))
|
||||||
{
|
{
|
||||||
@@ -1271,7 +1278,7 @@ LLXMLNodePtr LLNotifications::checkForXMLTemplate(LLXMLNodePtr item)
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LLNotifications::loadTemplates()
|
bool LLNotificationTemplates::loadTemplates()
|
||||||
{
|
{
|
||||||
const std::string xml_filename = "notifications.xml";
|
const std::string xml_filename = "notifications.xml";
|
||||||
LLXMLNodePtr root;
|
LLXMLNodePtr root;
|
||||||
@@ -1289,11 +1296,6 @@ bool LLNotifications::loadTemplates()
|
|||||||
for (LLXMLNodePtr item = root->getFirstChild();
|
for (LLXMLNodePtr item = root->getFirstChild();
|
||||||
item.notNull(); item = item->getNextSibling())
|
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"))
|
if (item->hasName("global"))
|
||||||
{
|
{
|
||||||
std::string global_name;
|
std::string global_name;
|
||||||
@@ -1321,7 +1323,35 @@ bool LLNotifications::loadTemplates()
|
|||||||
" found in " << xml_filename << llendl;
|
" found in " << xml_filename << llendl;
|
||||||
continue;
|
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
|
// now we know we have a notification entry, so let's build it
|
||||||
LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate());
|
LLNotificationTemplatePtr pTemplate(new LLNotificationTemplate());
|
||||||
|
|
||||||
@@ -1369,7 +1399,7 @@ bool LLNotifications::loadTemplates()
|
|||||||
for (LLXMLNodePtr child = item->getFirstChild();
|
for (LLXMLNodePtr child = item->getFirstChild();
|
||||||
!child.isNull(); child = child->getNextSibling())
|
!child.isNull(); child = child->getNextSibling())
|
||||||
{
|
{
|
||||||
child = checkForXMLTemplate(child);
|
child = LLNotificationTemplates::instance().checkForXMLTemplate(child);
|
||||||
|
|
||||||
// <url>
|
// <url>
|
||||||
if (child->hasName("url"))
|
if (child->hasName("url"))
|
||||||
@@ -1405,7 +1435,7 @@ bool LLNotifications::loadTemplates()
|
|||||||
pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child));
|
pTemplate->mForm = LLNotificationFormPtr(new LLNotificationForm(pTemplate->mName, child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addTemplate(pTemplate->mName, pTemplate);
|
LLNotificationTemplates::instance().addTemplate(pTemplate->mName, pTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::ostringstream ostream;
|
//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));
|
LLNotificationPtr target = LLNotificationPtr(new LLNotification(uuid));
|
||||||
LLNotificationSet::iterator it=mItems.find(target);
|
LLNotificationSet::iterator it=mItems.find(target);
|
||||||
@@ -1505,7 +1535,7 @@ void LLNotifications::forEachNotification(NotificationProcess process)
|
|||||||
std::for_each(mItems.begin(), mItems.end(), 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);
|
GlobalStringMap::const_iterator it = mGlobalStrings.find(key);
|
||||||
if (it != mGlobalStrings.end())
|
if (it != mGlobalStrings.end())
|
||||||
|
|||||||
@@ -679,45 +679,20 @@ private:
|
|||||||
LLNotificationComparator mComparator;
|
LLNotificationComparator mComparator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLNotificationTemplates :
|
||||||
|
public LLSingleton<LLNotificationTemplates>
|
||||||
class LLNotifications :
|
|
||||||
public LLSingleton<LLNotifications>,
|
|
||||||
public LLNotificationChannelBase
|
|
||||||
{
|
{
|
||||||
LOG_CLASS(LLNotifications);
|
LOG_CLASS(LLNotificationTemplates);
|
||||||
|
|
||||||
|
friend class LLSingleton<LLNotificationTemplates>;
|
||||||
|
|
||||||
|
// This class may not use LLNotifications.
|
||||||
|
typedef char LLNotifications;
|
||||||
|
|
||||||
friend class LLSingleton<LLNotifications>;
|
|
||||||
public:
|
public:
|
||||||
// load notification descriptions from file;
|
|
||||||
// OK to call more than once because it will reload
|
|
||||||
bool loadTemplates();
|
bool loadTemplates();
|
||||||
LLXMLNodePtr checkForXMLTemplate(LLXMLNodePtr item);
|
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<void (LLNotificationPtr)> NotificationProcess;
|
|
||||||
|
|
||||||
void forEachNotification(NotificationProcess process);
|
|
||||||
|
|
||||||
// This is all stuff for managing the templates
|
// This is all stuff for managing the templates
|
||||||
// take your template out
|
// take your template out
|
||||||
LLNotificationTemplatePtr getTemplate(const std::string& name);
|
LLNotificationTemplatePtr getTemplate(const std::string& name);
|
||||||
@@ -736,17 +711,67 @@ public:
|
|||||||
// useful if you're reloading the file
|
// useful if you're reloading the file
|
||||||
void clearTemplates(); // erase all templates
|
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<std::string, LLXMLNodePtr> XMLTemplateMap;
|
||||||
|
XMLTemplateMap mXmlTemplates;
|
||||||
|
|
||||||
|
typedef std::map<std::string, std::string> GlobalStringMap;
|
||||||
|
GlobalStringMap mGlobalStrings;
|
||||||
|
};
|
||||||
|
|
||||||
|
class LLNotifications :
|
||||||
|
public LLSingleton<LLNotifications>,
|
||||||
|
public LLNotificationChannelBase
|
||||||
|
{
|
||||||
|
LOG_CLASS(LLNotifications);
|
||||||
|
|
||||||
|
friend class LLSingleton<LLNotifications>;
|
||||||
|
public:
|
||||||
|
// load notification descriptions from file;
|
||||||
|
// OK to call more than once because it will reload
|
||||||
|
bool loadNotifications();
|
||||||
void createDefaultChannels();
|
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<std::string, LLNotificationChannelPtr> ChannelMap;
|
typedef std::map<std::string, LLNotificationChannelPtr> ChannelMap;
|
||||||
ChannelMap mChannels;
|
ChannelMap mChannels;
|
||||||
|
|
||||||
void addChannel(LLNotificationChannelPtr pChan);
|
void addChannel(LLNotificationChannelPtr pChan);
|
||||||
LLNotificationChannelPtr getChannel(const std::string& channelName);
|
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<void (LLNotificationPtr)> NotificationProcess;
|
||||||
|
void forEachNotification(NotificationProcess process);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// we're a singleton, so we don't have a public constructor
|
// we're a singleton, so we don't have a public constructor
|
||||||
@@ -760,22 +785,11 @@ private:
|
|||||||
bool uniqueFilter(LLNotificationPtr pNotification);
|
bool uniqueFilter(LLNotificationPtr pNotification);
|
||||||
bool uniqueHandler(const LLSD& payload);
|
bool uniqueHandler(const LLSD& payload);
|
||||||
bool failedUniquenessTest(const LLSD& payload);
|
bool failedUniquenessTest(const LLSD& payload);
|
||||||
|
|
||||||
LLNotificationChannelPtr pHistoryChannel;
|
LLNotificationChannelPtr pHistoryChannel;
|
||||||
LLNotificationChannelPtr pExpirationChannel;
|
LLNotificationChannelPtr pExpirationChannel;
|
||||||
|
|
||||||
// put your template in
|
|
||||||
bool addTemplate(const std::string& name, LLNotificationTemplatePtr theTemplate);
|
|
||||||
TemplateMap mTemplates;
|
|
||||||
|
|
||||||
std::string mFileName;
|
|
||||||
|
|
||||||
typedef std::map<std::string, LLXMLNodePtr> XMLTemplateMap;
|
|
||||||
XMLTemplateMap mXmlTemplates;
|
|
||||||
|
|
||||||
LLNotificationMap mUniqueNotifications;
|
LLNotificationMap mUniqueNotifications;
|
||||||
|
|
||||||
typedef std::map<std::string, std::string> GlobalStringMap;
|
|
||||||
GlobalStringMap mGlobalStrings;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -483,7 +483,6 @@ static void settings_to_globals()
|
|||||||
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
|
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
|
||||||
|
|
||||||
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
|
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
|
||||||
|
|
||||||
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
|
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
|
||||||
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
|
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
|
||||||
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
|
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
|
||||||
@@ -714,7 +713,7 @@ bool LLAppViewer::init()
|
|||||||
LLTrans::parseStrings("strings.xml", default_trans_args);
|
LLTrans::parseStrings("strings.xml", default_trans_args);
|
||||||
|
|
||||||
// Setup notifications after LLUI::initClass() has been called.
|
// Setup notifications after LLUI::initClass() has been called.
|
||||||
LLNotifications::instance();
|
LLNotifications::instance().createDefaultChannels();
|
||||||
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
|
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
|
||||||
|
|
||||||
writeSystemInfo();
|
writeSystemInfo();
|
||||||
@@ -876,7 +875,7 @@ bool LLAppViewer::init()
|
|||||||
{
|
{
|
||||||
// can't use an alert here since we're exiting and
|
// can't use an alert here since we're exiting and
|
||||||
// all hell breaks lose.
|
// all hell breaks lose.
|
||||||
std::string msg = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
|
std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedGLRequirements");
|
||||||
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
||||||
OSMessageBox(
|
OSMessageBox(
|
||||||
msg,
|
msg,
|
||||||
@@ -891,7 +890,7 @@ bool LLAppViewer::init()
|
|||||||
{
|
{
|
||||||
// can't use an alert here since we're exiting and
|
// can't use an alert here since we're exiting and
|
||||||
// all hell breaks lose.
|
// all hell breaks lose.
|
||||||
std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
|
std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2");
|
||||||
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
||||||
OSMessageBox(
|
OSMessageBox(
|
||||||
msg,
|
msg,
|
||||||
@@ -905,7 +904,7 @@ bool LLAppViewer::init()
|
|||||||
{
|
{
|
||||||
// can't use an alert here since we're exiting and
|
// can't use an alert here since we're exiting and
|
||||||
// all hell breaks lose.
|
// all hell breaks lose.
|
||||||
std::string msg = LNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
|
std::string msg = LNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2");
|
||||||
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
|
||||||
OSMessageBox(
|
OSMessageBox(
|
||||||
msg,
|
msg,
|
||||||
@@ -923,31 +922,31 @@ bool LLAppViewer::init()
|
|||||||
std::string minSpecs;
|
std::string minSpecs;
|
||||||
|
|
||||||
// get cpu data from xml
|
// get cpu data from xml
|
||||||
std::stringstream minCPUString(LLNotifications::instance().getGlobalString("UnsupportedCPUAmount"));
|
std::stringstream minCPUString(LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUAmount"));
|
||||||
S32 minCPU = 0;
|
S32 minCPU = 0;
|
||||||
minCPUString >> minCPU;
|
minCPUString >> minCPU;
|
||||||
|
|
||||||
// get RAM data from XML
|
// get RAM data from XML
|
||||||
std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount"));
|
std::stringstream minRAMString(LLNotificationTemplates::instance().getGlobalString("UnsupportedRAMAmount"));
|
||||||
U64 minRAM = 0;
|
U64 minRAM = 0;
|
||||||
minRAMString >> minRAM;
|
minRAMString >> minRAM;
|
||||||
minRAM = minRAM * 1024 * 1024;
|
minRAM = minRAM * 1024 * 1024;
|
||||||
|
|
||||||
if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
|
if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
|
||||||
{
|
{
|
||||||
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedGPU");
|
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedGPU");
|
||||||
minSpecs += "\n";
|
minSpecs += "\n";
|
||||||
unsupported = true;
|
unsupported = true;
|
||||||
}
|
}
|
||||||
if(gSysCPU.getMHz() < minCPU)
|
if(gSysCPU.getMHz() < minCPU)
|
||||||
{
|
{
|
||||||
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
|
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedCPU");
|
||||||
minSpecs += "\n";
|
minSpecs += "\n";
|
||||||
unsupported = true;
|
unsupported = true;
|
||||||
}
|
}
|
||||||
if(gSysMemory.getPhysicalMemoryClamped() < minRAM)
|
if(gSysMemory.getPhysicalMemoryClamped() < minRAM)
|
||||||
{
|
{
|
||||||
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM");
|
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedRAM");
|
||||||
minSpecs += "\n";
|
minSpecs += "\n";
|
||||||
unsupported = true;
|
unsupported = true;
|
||||||
}
|
}
|
||||||
@@ -980,6 +979,11 @@ bool LLAppViewer::init()
|
|||||||
|
|
||||||
LLViewerJoystick::getInstance()->init(false);
|
LLViewerJoystick::getInstance()->init(false);
|
||||||
|
|
||||||
|
// Finish windlight initialization.
|
||||||
|
LLWLParamManager::instance().initHack();
|
||||||
|
// Use prefered Environment.
|
||||||
|
LLEnvManagerNew::instance().usePrefs();
|
||||||
|
|
||||||
gGLActive = FALSE;
|
gGLActive = FALSE;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -484,8 +484,8 @@ void LLFastTimerView::draw()
|
|||||||
sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey;
|
sTimerColors[&LLFastTimer::NamedTimer::getRootNamedTimer()] = LLColor4::grey;
|
||||||
|
|
||||||
F32 hue = 0.f;
|
F32 hue = 0.f;
|
||||||
|
// <ALCH:LL> Move color generation down to be in the next loop.
|
||||||
for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
|
/*for (timer_tree_iterator_t it = begin_timer_tree(LLFastTimer::NamedTimer::getRootNamedTimer());
|
||||||
it != timer_tree_iterator_t();
|
it != timer_tree_iterator_t();
|
||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
@@ -502,7 +502,8 @@ void LLFastTimerView::draw()
|
|||||||
child_color.setHSL(hue, saturation, lightness);
|
child_color.setHSL(hue, saturation, lightness);
|
||||||
|
|
||||||
sTimerColors[idp] = child_color;
|
sTimerColors[idp] = child_color;
|
||||||
}
|
}*/
|
||||||
|
// </ALCH:LL>
|
||||||
|
|
||||||
const S32 LEGEND_WIDTH = 220;
|
const S32 LEGEND_WIDTH = 220;
|
||||||
{
|
{
|
||||||
@@ -516,6 +517,20 @@ void LLFastTimerView::draw()
|
|||||||
++it)
|
++it)
|
||||||
{
|
{
|
||||||
LLFastTimer::NamedTimer* idp = (*it);
|
LLFastTimer::NamedTimer* idp = (*it);
|
||||||
|
// <ALCH:LL> 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;
|
||||||
|
// </ALCH:LL>
|
||||||
|
|
||||||
// <FS:LO> Making the ledgend part of fast timers scrollable
|
// <FS:LO> Making the ledgend part of fast timers scrollable
|
||||||
if(mScrollOffset_tmp)
|
if(mScrollOffset_tmp)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success,
|
|||||||
// We might have a localized string for this message
|
// We might have a localized string for this message
|
||||||
// error_args will usually be empty from the server.
|
// error_args will usually be empty from the server.
|
||||||
if (!error_tag.empty()
|
if (!error_tag.empty()
|
||||||
&& LLNotifications::getInstance()->templateExists(error_tag))
|
&& LLNotificationTemplates::getInstance()->templateExists(error_tag))
|
||||||
{
|
{
|
||||||
LLNotifications::instance().add(error_tag);
|
LLNotifications::instance().add(error_tag);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -187,8 +187,8 @@ BOOL LLFloaterNotificationConsole::postBuild()
|
|||||||
getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
|
||||||
|
|
||||||
LLComboBox* notifications = getChild<LLComboBox>("notification_types");
|
LLComboBox* notifications = getChild<LLComboBox>("notification_types");
|
||||||
LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames();
|
LLNotificationTemplates::TemplateNames names = LLNotificationTemplates::instance().getTemplateNames();
|
||||||
for (LLNotifications::TemplateNames::iterator template_it = names.begin();
|
for (LLNotificationTemplates::TemplateNames::iterator template_it = names.begin();
|
||||||
template_it != names.end();
|
template_it != names.end();
|
||||||
++template_it)
|
++template_it)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -107,13 +107,20 @@ LLPanelDirBrowser::LLPanelDirBrowser(const std::string& name, LLFloaterDirectory
|
|||||||
|
|
||||||
BOOL LLPanelDirBrowser::postBuild()
|
BOOL LLPanelDirBrowser::postBuild()
|
||||||
{
|
{
|
||||||
childSetCommitCallback("results", onCommitList, this);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("results"))
|
||||||
|
ctrl->setCommitCallback(onCommitList, this);
|
||||||
|
|
||||||
childSetAction("< Prev", onClickPrev, this);
|
if (LLButton* btn = findChild<LLButton>("< Prev"))
|
||||||
childHide("< Prev");
|
{
|
||||||
|
childSetAction("< Prev", onClickPrev, this);
|
||||||
|
btn->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
childSetAction("Next >", onClickNext, this);
|
if (LLButton* btn = findChild<LLButton>("Next >"))
|
||||||
childHide("Next >");
|
{
|
||||||
|
childSetAction("Next >", onClickNext, this);
|
||||||
|
btn->setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -136,7 +143,7 @@ void LLPanelDirBrowser::draw()
|
|||||||
if (mLastResultTimer.getElapsedTimeF32() > 0.5)
|
if (mLastResultTimer.getElapsedTimeF32() > 0.5)
|
||||||
{
|
{
|
||||||
if (!mDidAutoSelect &&
|
if (!mDidAutoSelect &&
|
||||||
!childHasFocus("results"))
|
hasChild("results") && !childHasFocus("results"))
|
||||||
{
|
{
|
||||||
LLCtrlListInterface *list = childGetListInterface("results");
|
LLCtrlListInterface *list = childGetListInterface("results");
|
||||||
if (list)
|
if (list)
|
||||||
@@ -171,7 +178,8 @@ void LLPanelDirBrowser::nextPage()
|
|||||||
void LLPanelDirBrowser::prevPage()
|
void LLPanelDirBrowser::prevPage()
|
||||||
{
|
{
|
||||||
mSearchStart -= mResultsPerPage;
|
mSearchStart -= mResultsPerPage;
|
||||||
childSetVisible("< Prev", mSearchStart > 0);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("< Prev"))
|
||||||
|
ctrl->setVisible(mSearchStart > 0);
|
||||||
|
|
||||||
performQuery();
|
performQuery();
|
||||||
}
|
}
|
||||||
@@ -180,14 +188,17 @@ void LLPanelDirBrowser::prevPage()
|
|||||||
void LLPanelDirBrowser::resetSearchStart()
|
void LLPanelDirBrowser::resetSearchStart()
|
||||||
{
|
{
|
||||||
mSearchStart = 0;
|
mSearchStart = 0;
|
||||||
childHide("Next >");
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Next >"))
|
||||||
childHide("< Prev");
|
ctrl->setVisible(false);
|
||||||
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("< Prev"))
|
||||||
|
ctrl->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// protected
|
// protected
|
||||||
void LLPanelDirBrowser::updateResultCount()
|
void LLPanelDirBrowser::updateResultCount()
|
||||||
{
|
{
|
||||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
|
LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results");
|
||||||
|
if (!list) return;
|
||||||
|
|
||||||
S32 result_count = list->getItemCount();
|
S32 result_count = list->getItemCount();
|
||||||
std::string result_text;
|
std::string result_text;
|
||||||
@@ -218,7 +229,7 @@ void LLPanelDirBrowser::updateResultCount()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
childEnable("results");
|
list->setEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,7 +330,7 @@ void LLPanelDirBrowser::updateMaturityCheckbox()
|
|||||||
|
|
||||||
void LLPanelDirBrowser::selectByUUID(const LLUUID& id)
|
void LLPanelDirBrowser::selectByUUID(const LLUUID& id)
|
||||||
{
|
{
|
||||||
LLCtrlListInterface *list = childGetListInterface("results");
|
LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
BOOL found = list->setCurrentByID(id);
|
BOOL found = list->setCurrentByID(id);
|
||||||
if (found)
|
if (found)
|
||||||
@@ -363,7 +374,7 @@ U32 LLPanelDirBrowser::getSelectedEventID() const
|
|||||||
|
|
||||||
void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type)
|
void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type)
|
||||||
{
|
{
|
||||||
LLCtrlListInterface *list = childGetListInterface("results");
|
LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
LLSD id_sd = childGetValue("results");
|
LLSD id_sd = childGetValue("results");
|
||||||
@@ -379,7 +390,7 @@ void LLPanelDirBrowser::getSelectedInfo(LLUUID* id, S32 *type)
|
|||||||
void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data)
|
void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data)
|
||||||
{
|
{
|
||||||
LLPanelDirBrowser* self = (LLPanelDirBrowser*)data;
|
LLPanelDirBrowser* self = (LLPanelDirBrowser*)data;
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
// Start with everyone invisible
|
// Start with everyone invisible
|
||||||
@@ -515,7 +526,7 @@ void LLPanelDirBrowser::processDirPeopleReply(LLMessageSystem *msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -610,7 +621,7 @@ void LLPanelDirBrowser::processDirPlacesReply(LLMessageSystem* msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -696,7 +707,7 @@ void LLPanelDirBrowser::processDirEventsReply(LLMessageSystem* msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -835,7 +846,7 @@ void LLPanelDirBrowser::processDirGroupsReply(LLMessageSystem* msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -932,7 +943,7 @@ void LLPanelDirBrowser::processDirClassifiedReply(LLMessageSystem* msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -1005,7 +1016,7 @@ void LLPanelDirBrowser::processDirLandReply(LLMessageSystem *msg, void**)
|
|||||||
|
|
||||||
self->mHaveSearchResults = TRUE;
|
self->mHaveSearchResults = TRUE;
|
||||||
|
|
||||||
LLCtrlListInterface *list = self->childGetListInterface("results");
|
LLScrollListCtrl* list = self->findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (!list->getCanSelect())
|
if (!list->getCanSelect())
|
||||||
@@ -1184,7 +1195,7 @@ LLSD LLPanelDirBrowser::createLandSale(const LLUUID& parcel_id, BOOL is_auction,
|
|||||||
|
|
||||||
void LLPanelDirBrowser::newClassified()
|
void LLPanelDirBrowser::newClassified()
|
||||||
{
|
{
|
||||||
LLCtrlListInterface *list = childGetListInterface("results");
|
LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results");
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
if (mFloaterDirectory->mPanelClassifiedp)
|
if (mFloaterDirectory->mPanelClassifiedp)
|
||||||
@@ -1212,8 +1223,6 @@ void LLPanelDirBrowser::newClassified()
|
|||||||
|
|
||||||
void LLPanelDirBrowser::setupNewSearch()
|
void LLPanelDirBrowser::setupNewSearch()
|
||||||
{
|
{
|
||||||
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
|
|
||||||
|
|
||||||
gDirBrowserInstances.removeData(mSearchID);
|
gDirBrowserInstances.removeData(mSearchID);
|
||||||
// Make a new query ID
|
// Make a new query ID
|
||||||
mSearchID.generate();
|
mSearchID.generate();
|
||||||
@@ -1221,9 +1230,12 @@ void LLPanelDirBrowser::setupNewSearch()
|
|||||||
gDirBrowserInstances.addData(mSearchID, this);
|
gDirBrowserInstances.addData(mSearchID, this);
|
||||||
|
|
||||||
// ready the list for results
|
// ready the list for results
|
||||||
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
if (LLScrollListCtrl* list = findChild<LLScrollListCtrl>("results"))
|
||||||
list->setCommentText(LLTrans::getString("Searching"));
|
{
|
||||||
childDisable("results");
|
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
|
||||||
|
list->setCommentText(LLTrans::getString("Searching"));
|
||||||
|
list->setEnabled(false);
|
||||||
|
}
|
||||||
|
|
||||||
mResultsReceived = 0;
|
mResultsReceived = 0;
|
||||||
mHaveSearchResults = FALSE;
|
mHaveSearchResults = FALSE;
|
||||||
|
|||||||
@@ -75,8 +75,6 @@ BOOL LLPanelDirEvents::postBuild()
|
|||||||
|
|
||||||
childSetAction("Today", onClickToday, this);
|
childSetAction("Today", onClickToday, this);
|
||||||
|
|
||||||
childSetCommitCallback("mature", onCommitMature, this);
|
|
||||||
|
|
||||||
childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this);
|
childSetAction("Search", LLPanelDirBrowser::onClickSearchCore, this);
|
||||||
setDefaultBtn("Search");
|
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
|
// static
|
||||||
void LLPanelDirEvents::onClickDelete(void *userdata)
|
void LLPanelDirEvents::onClickDelete(void *userdata)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ protected:
|
|||||||
static void onBackBtn(void* data);
|
static void onBackBtn(void* data);
|
||||||
static void onForwardBtn(void* data);
|
static void onForwardBtn(void* data);
|
||||||
static void onClickToday(void *userdata);
|
static void onClickToday(void *userdata);
|
||||||
static void onCommitMature(LLUICtrl* ctrl, void* data);
|
|
||||||
static void onClickSearch(void *data);
|
static void onClickSearch(void *data);
|
||||||
static void onClickDelete(void *data);
|
static void onClickDelete(void *data);
|
||||||
|
|
||||||
|
|||||||
@@ -108,12 +108,16 @@ BOOL LLPanelDirFind::postBuild()
|
|||||||
LLPanelDirBrowser::postBuild();
|
LLPanelDirBrowser::postBuild();
|
||||||
|
|
||||||
childSetAction("back_btn", onClickBack, this);
|
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("forward_btn", onClickForward, this);
|
||||||
childSetAction("reload_btn", onClickRefresh, this);
|
childSetAction("reload_btn", onClickRefresh, this);
|
||||||
childSetCommitCallback("search_editor", onCommitSearch, this);
|
if (hasChild("search_editor"))
|
||||||
childSetAction("search_btn", onClickSearch, this);
|
childSetCommitCallback("search_editor", onCommitSearch, this);
|
||||||
childSetAction("?", onClickHelp, 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
|
// showcase doesn't have maturity flags -- it's all PG
|
||||||
if (hasChild("incmature"))
|
if (hasChild("incmature"))
|
||||||
@@ -161,7 +165,8 @@ BOOL LLPanelDirFind::postBuild()
|
|||||||
navigateToDefaultPage();
|
navigateToDefaultPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
childSetVisible("filter_gaming", (gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL));
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("filter_gaming"))
|
||||||
|
ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -257,7 +262,8 @@ void LLPanelDirFindAll::search(const std::string& search_text)
|
|||||||
|
|
||||||
void LLPanelDirFind::focus()
|
void LLPanelDirFind::focus()
|
||||||
{
|
{
|
||||||
childSetFocus("search_editor");
|
if (hasChild("search_editor"))
|
||||||
|
childSetFocus("search_editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPanelDirFind::navigateToDefaultPage()
|
void LLPanelDirFind::navigateToDefaultPage()
|
||||||
@@ -291,17 +297,20 @@ void LLPanelDirFind::navigateToDefaultPage()
|
|||||||
start_url += "panel=" + getName() + "&";
|
start_url += "panel=" + getName() + "&";
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL inc_pg = childGetValue("incpg").asBoolean();
|
if (hasChild("incmature"))
|
||||||
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
|
bool inc_pg = childGetValue("incpg").asBoolean();
|
||||||
// this case because it's a default page.
|
bool inc_mature = childGetValue("incmature").asBoolean();
|
||||||
inc_pg = true;
|
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;
|
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())
|
if (!gHippoGridManager->getConnectedGrid()->isSecondLife())
|
||||||
{
|
{
|
||||||
substring = "[DICE]";
|
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");
|
childDisable("Search");
|
||||||
setDefaultBtn( "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<LLUICtrl>("filter_gaming"))
|
||||||
|
ctrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_FIND_ALL_CLASSIC));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -634,7 +644,7 @@ void LLPanelDirFindAllOld::onClickSearch(void *userdata)
|
|||||||
scope |= DFQ_INC_ADULT;
|
scope |= DFQ_INC_ADULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self->childGetValue("filter_gaming").asBoolean())
|
if (self->hasChild("filter_gaming") && self->childGetValue("filter_gaming").asBoolean())
|
||||||
{
|
{
|
||||||
scope |= DFQ_FILTER_GAMING;
|
scope |= DFQ_FILTER_GAMING;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ BOOL LLPanelDirLand::postBuild()
|
|||||||
childSetAction("Search", onClickSearchCore, this);
|
childSetAction("Search", onClickSearchCore, this);
|
||||||
setDefaultBtn("Search");
|
setDefaultBtn("Search");
|
||||||
|
|
||||||
childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
|
||||||
childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||||
childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ BOOL LLPanelGroupTab::isVisibleByAgent(LLAgent* agentp)
|
|||||||
BOOL LLPanelGroupTab::postBuild()
|
BOOL LLPanelGroupTab::postBuild()
|
||||||
{
|
{
|
||||||
// Hook up the help button callback.
|
// Hook up the help button callback.
|
||||||
LLButton* button = getChild<LLButton>("help_button");
|
LLButton* button = findChild<LLButton>("help_button");
|
||||||
if (button)
|
if (button)
|
||||||
{
|
{
|
||||||
button->setClickedCallback(boost::bind(&LLPanelGroupTab::onClickHelp,this));
|
button->setClickedCallback(boost::bind(&LLPanelGroupTab::onClickHelp,this));
|
||||||
|
|||||||
@@ -515,7 +515,7 @@ BOOL LLPanelGroupSubTab::postBuild()
|
|||||||
delete icon;
|
delete icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
icon = getChild<LLIconCtrl>("power_all_have_icon",no_recurse);
|
icon = getChild<LLIconCtrl>("power_all_have_icon",no_recurse, false);
|
||||||
if (icon && !icon->getImageName().empty())
|
if (icon && !icon->getImageName().empty())
|
||||||
{
|
{
|
||||||
mActionIcons["full"] = icon->getImageName();
|
mActionIcons["full"] = icon->getImageName();
|
||||||
@@ -523,7 +523,7 @@ BOOL LLPanelGroupSubTab::postBuild()
|
|||||||
delete icon;
|
delete icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
icon = getChild<LLIconCtrl>("power_partial_icon",no_recurse);
|
icon = getChild<LLIconCtrl>("power_partial_icon",no_recurse, false);
|
||||||
if (icon && !icon->getImageName().empty())
|
if (icon && !icon->getImageName().empty())
|
||||||
{
|
{
|
||||||
mActionIcons["partial"] = icon->getImageName();
|
mActionIcons["partial"] = icon->getImageName();
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in
|
|||||||
disabled_popups.deleteAllItems();
|
disabled_popups.deleteAllItems();
|
||||||
enabled_popups.deleteAllItems();
|
enabled_popups.deleteAllItems();
|
||||||
|
|
||||||
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
|
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
|
||||||
iter != LLNotifications::instance().templatesEnd();
|
iter != LLNotificationTemplates::instance().templatesEnd();
|
||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
LLNotificationTemplatePtr templatep = iter->second;
|
LLNotificationTemplatePtr templatep = iter->second;
|
||||||
@@ -175,8 +175,8 @@ void LLPanelMsgs::cancel()
|
|||||||
|
|
||||||
void LLPanelMsgs::resetAllIgnored()
|
void LLPanelMsgs::resetAllIgnored()
|
||||||
{
|
{
|
||||||
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
|
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
|
||||||
iter != LLNotifications::instance().templatesEnd();
|
iter != LLNotificationTemplates::instance().templatesEnd();
|
||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
|
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
|
||||||
@@ -188,8 +188,8 @@ void LLPanelMsgs::resetAllIgnored()
|
|||||||
|
|
||||||
void LLPanelMsgs::setAllIgnored()
|
void LLPanelMsgs::setAllIgnored()
|
||||||
{
|
{
|
||||||
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
|
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
|
||||||
iter != LLNotifications::instance().templatesEnd();
|
iter != LLNotificationTemplates::instance().templatesEnd();
|
||||||
++iter)
|
++iter)
|
||||||
{
|
{
|
||||||
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
|
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
|
||||||
@@ -210,7 +210,7 @@ void LLPanelMsgs::onClickEnablePopup(void* user_data)
|
|||||||
std::vector<LLScrollListItem*>::iterator itor;
|
std::vector<LLScrollListItem*>::iterator itor;
|
||||||
for (itor = items.begin(); itor != items.end(); ++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);
|
gSavedSettings.setWarning(templatep->mName, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ BOOL LLPanelPlace::postBuild()
|
|||||||
mDescEditor = getChild<LLTextEditor>("desc_editor");
|
mDescEditor = getChild<LLTextEditor>("desc_editor");
|
||||||
|
|
||||||
mInfoEditor = getChild<LLTextBox>("info_editor");
|
mInfoEditor = getChild<LLTextBox>("info_editor");
|
||||||
mLandTypeEditor = getChild<LLTextBox>("land_type_display");
|
mLandTypeEditor = findChild<LLTextBox>("land_type_display");
|
||||||
|
|
||||||
mLocationDisplay = getChild<LLTextBox>("location_editor");
|
mLocationDisplay = getChild<LLTextBox>("location_editor");
|
||||||
|
|
||||||
@@ -145,7 +145,8 @@ void LLPanelPlace::resetLocation()
|
|||||||
mNameEditor->setText( LLStringUtil::null );
|
mNameEditor->setText( LLStringUtil::null );
|
||||||
mDescEditor->setText( LLStringUtil::null );
|
mDescEditor->setText( LLStringUtil::null );
|
||||||
mInfoEditor->setText( LLStringUtil::null );
|
mInfoEditor->setText( LLStringUtil::null );
|
||||||
mLandTypeEditor->setText( LLStringUtil::null );
|
if (mLandTypeEditor)
|
||||||
|
mLandTypeEditor->setText(LLStringUtil::null);
|
||||||
mLocationDisplay->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)
|
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)
|
void LLPanelPlace::setErrorStatus(U32 status, const std::string& reason)
|
||||||
|
|||||||
@@ -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
|
// only assert shape if not hosted in a multifloater
|
||||||
if (!getHost())
|
if (!getHost())
|
||||||
@@ -135,18 +136,20 @@ LLPreviewNotecard::LLPreviewNotecard(const std::string& name,
|
|||||||
setRect(curRect);
|
setRect(curRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
childSetVisible("lock", FALSE);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("lock"))
|
||||||
|
ctrl->setVisible(false);
|
||||||
|
|
||||||
const LLInventoryItem* item = getItem();
|
if (hasChild("desc", true))
|
||||||
|
{
|
||||||
childSetCommitCallback("desc", LLPreview::onText, this);
|
childSetCommitCallback("desc", LLPreview::onText, this);
|
||||||
if (item)
|
if (const LLInventoryItem* item = getItem())
|
||||||
childSetText("desc", item->getDescription());
|
childSetText("desc", item->getDescription());
|
||||||
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe);
|
||||||
|
}
|
||||||
|
|
||||||
setTitle(title);
|
setTitle(title);
|
||||||
|
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
|
||||||
if (editor)
|
if (editor)
|
||||||
{
|
{
|
||||||
@@ -166,7 +169,7 @@ LLPreviewNotecard::~LLPreviewNotecard()
|
|||||||
|
|
||||||
BOOL LLPreviewNotecard::postBuild()
|
BOOL LLPreviewNotecard::postBuild()
|
||||||
{
|
{
|
||||||
LLViewerTextEditor *ed = getChild<LLViewerTextEditor>("Notecard Editor");
|
LLViewerTextEditor* ed = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
if (ed)
|
if (ed)
|
||||||
{
|
{
|
||||||
ed->setNotecardInfo(mNotecardItemID, mObjectID);
|
ed->setNotecardInfo(mNotecardItemID, mObjectID);
|
||||||
@@ -192,27 +195,27 @@ bool LLPreviewNotecard::saveItem(LLPointer<LLInventoryItem>* itemptr)
|
|||||||
|
|
||||||
void LLPreviewNotecard::setEnabled( BOOL enabled )
|
void LLPreviewNotecard::setEnabled( BOOL enabled )
|
||||||
{
|
{
|
||||||
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
if (editor)
|
||||||
|
editor->setEnabled(enabled);
|
||||||
childSetEnabled("Notecard Editor", enabled);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("lock"))
|
||||||
childSetVisible("lock", !enabled);
|
ctrl->setVisible(!enabled);
|
||||||
childSetEnabled("desc", enabled);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("desc"))
|
||||||
childSetEnabled("Save", enabled && editor && (!editor->isPristine()));
|
ctrl->setEnabled(enabled);
|
||||||
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Save"))
|
||||||
|
ctrl->setEnabled(enabled && editor && !editor->isPristine());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LLPreviewNotecard::draw()
|
void LLPreviewNotecard::draw()
|
||||||
{
|
{
|
||||||
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
BOOL script_changed = editor && !editor->isPristine();
|
||||||
|
|
||||||
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("Save"))
|
||||||
//childSetFocus("Save", FALSE);
|
ctrl->setEnabled(script_changed && getEnabled());
|
||||||
|
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
BOOL script_changed = !editor->isPristine();
|
|
||||||
|
|
||||||
childSetEnabled("Save", script_changed && getEnabled());
|
|
||||||
|
|
||||||
LLPreview::draw();
|
LLPreview::draw();
|
||||||
}
|
}
|
||||||
@@ -228,7 +231,7 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
|
|||||||
|
|
||||||
if ('F' == key && (mask & MASK_CONTROL) && !(mask & (MASK_SHIFT | MASK_ALT)))
|
if ('F' == key && (mask & MASK_CONTROL) && !(mask & (MASK_SHIFT | MASK_ALT)))
|
||||||
{
|
{
|
||||||
LLFloaterSearchReplace::show(getChild<LLViewerTextEditor>("Notecard Editor"));
|
LLFloaterSearchReplace::show(findChild<LLViewerTextEditor>("Notecard Editor"));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -238,9 +241,9 @@ BOOL LLPreviewNotecard::handleKeyHere(KEY key, MASK mask)
|
|||||||
// virtual
|
// virtual
|
||||||
BOOL LLPreviewNotecard::canClose()
|
BOOL LLPreviewNotecard::canClose()
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
|
||||||
if(mForceClose || editor->isPristine())
|
if (mForceClose || (editor && editor->isPristine()))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -255,9 +258,7 @@ BOOL LLPreviewNotecard::canClose()
|
|||||||
|
|
||||||
const LLInventoryItem* LLPreviewNotecard::getDragItem()
|
const LLInventoryItem* LLPreviewNotecard::getDragItem()
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
if (LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
|
|
||||||
if(editor)
|
|
||||||
{
|
{
|
||||||
return editor->getDragItem();
|
return editor->getDragItem();
|
||||||
}
|
}
|
||||||
@@ -266,10 +267,9 @@ const LLInventoryItem* LLPreviewNotecard::getDragItem()
|
|||||||
|
|
||||||
bool LLPreviewNotecard::hasEmbeddedInventory()
|
bool LLPreviewNotecard::hasEmbeddedInventory()
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = NULL;
|
if (LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->hasEmbeddedInventory();
|
||||||
if (!editor) return false;
|
return false;
|
||||||
return editor->hasEmbeddedInventory();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPreviewNotecard::refreshFromInventory()
|
void LLPreviewNotecard::refreshFromInventory()
|
||||||
@@ -280,15 +280,13 @@ void LLPreviewNotecard::refreshFromInventory()
|
|||||||
|
|
||||||
void LLPreviewNotecard::loadAsset()
|
void LLPreviewNotecard::loadAsset()
|
||||||
{
|
{
|
||||||
// request the asset.
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
const LLInventoryItem* item = getItem();
|
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
|
|
||||||
if (!editor)
|
if (!editor)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// request the asset.
|
||||||
if(item)
|
if (const LLInventoryItem* item = getItem())
|
||||||
{
|
{
|
||||||
if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),
|
if (gAgent.allowOperation(PERM_COPY, item->getPermissions(),
|
||||||
GP_OBJECT_MANIPULATE)
|
GP_OBJECT_MANIPULATE)
|
||||||
@@ -355,7 +353,8 @@ void LLPreviewNotecard::loadAsset()
|
|||||||
// <edit> You can always save in task inventory
|
// <edit> You can always save in task inventory
|
||||||
if(!mObjectUUID.isNull()) editor->setEnabled(TRUE);
|
if(!mObjectUUID.isNull()) editor->setEnabled(TRUE);
|
||||||
// </edit>
|
// </edit>
|
||||||
childSetVisible("lock", TRUE);
|
if (LLUICtrl* ctrl = findChild<LLUICtrl>("lock"))
|
||||||
|
ctrl->setVisible(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -391,22 +390,23 @@ void LLPreviewNotecard::onLoadComplete(LLVFS *vfs,
|
|||||||
buffer[file_length] = 0;
|
buffer[file_length] = 0;
|
||||||
|
|
||||||
|
|
||||||
LLViewerTextEditor* previewEditor = preview->getChild<LLViewerTextEditor>("Notecard Editor");
|
if (LLViewerTextEditor* previewEditor = preview->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
|
|
||||||
if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
|
|
||||||
{
|
{
|
||||||
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();
|
const LLInventoryItem* item = preview->getItem();
|
||||||
BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY,
|
BOOL modifiable = item && gAgent.allowOperation(PERM_MODIFY,
|
||||||
@@ -466,42 +466,37 @@ void LLPreviewNotecard::onClickSave(void* user_data)
|
|||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onClickGetItems(void* user_data)
|
void LLPreviewNotecard::onClickGetItems(void* user_data)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* preview = (LLPreviewNotecard*)user_data;
|
LLPreviewNotecard* preview = static_cast<LLPreviewNotecard*>(user_data);
|
||||||
if(preview)
|
if (LLViewerTextEditor* editor = preview->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = preview->getChild<LLViewerTextEditor>("Notecard Editor");
|
std::vector<LLPointer<LLInventoryItem> > items = editor->getEmbeddedItems();
|
||||||
if(editor)
|
if (items.size())
|
||||||
{
|
{
|
||||||
std::vector<LLPointer<LLInventoryItem> > items = editor->getEmbeddedItems();
|
std::vector<LLPointer<LLInventoryItem> >::iterator iter = items.begin();
|
||||||
if(items.size())
|
std::vector<LLPointer<LLInventoryItem> >::iterator end = items.end();
|
||||||
|
for ( ; iter != end; ++iter)
|
||||||
{
|
{
|
||||||
const BOOL use_caps = FALSE;
|
LLInventoryItem* item = static_cast<LLInventoryItem*>(*iter);
|
||||||
|
#if 0 //use_caps
|
||||||
std::vector<LLPointer<LLInventoryItem> >::iterator iter = items.begin();
|
|
||||||
std::vector<LLPointer<LLInventoryItem> >::iterator end = items.end();
|
|
||||||
for( ; iter != end; ++iter)
|
|
||||||
{
|
{
|
||||||
LLInventoryItem* item = static_cast<LLInventoryItem*>(*iter);
|
copy_inventory_from_notecard(LLUUID::null, preview->getObjectID(), preview->getNotecardItemID(), item, 0);
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
#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<LLViewerTextEditor>("Notecard Editor");
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
|
||||||
if(!editor->isPristine())
|
if (editor && !editor->isPristine())
|
||||||
{
|
{
|
||||||
// We need to update the asset information
|
// We need to update the asset information
|
||||||
LLTransactionID tid;
|
LLTransactionID tid;
|
||||||
@@ -602,8 +597,8 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
|
|||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
|
void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data, S32 status, LLExtStat ext_status) // StoreAssetData callback (fixed)
|
||||||
{
|
{
|
||||||
LLSaveNotecardInfo* info = (LLSaveNotecardInfo*)user_data;
|
LLSaveNotecardInfo* info = static_cast<LLSaveNotecardInfo*>(user_data);
|
||||||
if(info && (0 == status))
|
if (0 == status)
|
||||||
{
|
{
|
||||||
if(info->mObjectUUID.isNull())
|
if(info->mObjectUUID.isNull())
|
||||||
{
|
{
|
||||||
@@ -647,8 +642,7 @@ void LLPreviewNotecard::onSaveComplete(const LLUUID& asset_uuid, void* user_data
|
|||||||
// Perform item copy to inventory
|
// Perform item copy to inventory
|
||||||
if (info->mCopyItem.notNull())
|
if (info->mCopyItem.notNull())
|
||||||
{
|
{
|
||||||
LLViewerTextEditor* editor = info->mSelf->getChild<LLViewerTextEditor>("Notecard Editor");
|
if (LLViewerTextEditor* editor = info->mSelf->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
if (editor)
|
|
||||||
{
|
{
|
||||||
editor->copyInventory(info->mCopyItem);
|
editor->copyInventory(info->mCopyItem);
|
||||||
}
|
}
|
||||||
@@ -741,10 +735,10 @@ void LLPreviewNotecard::saveAs_continued(AIFilePicker* filepicker)
|
|||||||
if (!filepicker->hasFilename())
|
if (!filepicker->hasFilename())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
LLViewerTextEditor* editor = getChild<LLViewerTextEditor>("Notecard Editor");
|
LLViewerTextEditor* editor = findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
if (!editor->exportBuffer(buffer))
|
if (editor && !editor->exportBuffer(buffer))
|
||||||
{
|
{
|
||||||
// FIXME: Notify the user!
|
// FIXME: Notify the user!
|
||||||
return;
|
return;
|
||||||
@@ -782,7 +776,7 @@ LLUUID LLPreviewNotecard::getItemID()
|
|||||||
|
|
||||||
LLTextEditor* LLPreviewNotecard::getEditor()
|
LLTextEditor* LLPreviewNotecard::getEditor()
|
||||||
{
|
{
|
||||||
return getChild<LLViewerTextEditor>("Notecard Editor");
|
return findChild<LLViewerTextEditor>("Notecard Editor");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLPreviewNotecard::initMenu()
|
void LLPreviewNotecard::initMenu()
|
||||||
@@ -823,183 +817,128 @@ void LLPreviewNotecard::initMenu()
|
|||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onSearchMenu(void* userdata)
|
void LLPreviewNotecard::onSearchMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
LLFloaterSearchReplace::show(editor);
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
LLFloaterSearchReplace::show(editor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onUndoMenu(void* userdata)
|
void LLPreviewNotecard::onUndoMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->undo();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->undo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onRedoMenu(void* userdata)
|
void LLPreviewNotecard::onRedoMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->redo();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->redo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onCutMenu(void* userdata)
|
void LLPreviewNotecard::onCutMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->cut();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->cut();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onCopyMenu(void* userdata)
|
void LLPreviewNotecard::onCopyMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->copy();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->copy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onPasteMenu(void* userdata)
|
void LLPreviewNotecard::onPasteMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->paste();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->paste();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onSelectAllMenu(void* userdata)
|
void LLPreviewNotecard::onSelectAllMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->selectAll();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->selectAll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLPreviewNotecard::onDeselectMenu(void* userdata)
|
void LLPreviewNotecard::onDeselectMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (self)
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
{
|
editor->deselect();
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
|
||||||
if (editor)
|
|
||||||
{
|
|
||||||
editor->deselect();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableUndoMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableUndoMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canUndo();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canUndo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableRedoMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableRedoMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canRedo();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canRedo();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableCutMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableCutMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canCut();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canCut();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableCopyMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableCopyMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canCopy();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canCopy();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enablePasteMenu(void* userdata)
|
BOOL LLPreviewNotecard::enablePasteMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canPaste();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canPaste();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableSelectAllMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableSelectAllMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canSelectAll();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canSelectAll();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
BOOL LLPreviewNotecard::enableDeselectMenu(void* userdata)
|
BOOL LLPreviewNotecard::enableDeselectMenu(void* userdata)
|
||||||
{
|
{
|
||||||
LLPreviewNotecard* self = (LLPreviewNotecard*)userdata;
|
LLPreviewNotecard* self = static_cast<LLPreviewNotecard*>(userdata);
|
||||||
if (!self) return FALSE;
|
if (LLViewerTextEditor* editor = self->findChild<LLViewerTextEditor>("Notecard Editor"))
|
||||||
LLViewerTextEditor* editor = self->getChild<LLViewerTextEditor>("Notecard Editor");
|
return editor->canDeselect();
|
||||||
if (!editor) return FALSE;
|
return false;
|
||||||
return editor->canDeselect();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EOF
|
// EOF
|
||||||
|
|||||||
@@ -6131,7 +6131,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
|
|||||||
// notification was specified using the new mechanism, so we can just handle it here
|
// notification was specified using the new mechanism, so we can just handle it here
|
||||||
std::string notificationID;
|
std::string notificationID;
|
||||||
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
|
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
|
||||||
if (!LLNotifications::getInstance()->templateExists(notificationID))
|
if (!LLNotificationTemplates::getInstance()->templateExists(notificationID))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -6309,7 +6309,7 @@ void process_alert_core(const std::string& message, BOOL modal)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string new_msg =LLNotifications::instance().getGlobalString(text);
|
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(text);
|
||||||
args["MESSAGE"] = new_msg;
|
args["MESSAGE"] = new_msg;
|
||||||
LLNotificationsUtil::add("SystemMessage", args);
|
LLNotificationsUtil::add("SystemMessage", args);
|
||||||
}
|
}
|
||||||
@@ -6317,7 +6317,7 @@ void process_alert_core(const std::string& message, BOOL modal)
|
|||||||
else if (modal)
|
else if (modal)
|
||||||
{
|
{
|
||||||
LLSD args;
|
LLSD args;
|
||||||
std::string new_msg =LLNotifications::instance().getGlobalString(message);
|
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message);
|
||||||
args["ERROR_MESSAGE"] = new_msg;
|
args["ERROR_MESSAGE"] = new_msg;
|
||||||
LLNotificationsUtil::add("ErrorMessage", args);
|
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 )
|
if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos )
|
||||||
{
|
{
|
||||||
LLSD args;
|
LLSD args;
|
||||||
std::string new_msg =LLNotifications::instance().getGlobalString(message);
|
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message);
|
||||||
|
|
||||||
std::string localized_msg;
|
std::string localized_msg;
|
||||||
bool is_message_localized = LLTrans::findString(localized_msg, new_msg);
|
bool is_message_localized = LLTrans::findString(localized_msg, new_msg);
|
||||||
|
|||||||
@@ -588,7 +588,10 @@ void LLWaterParamManager::initSingleton()
|
|||||||
|
|
||||||
loadAllPresets();
|
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
|
// static
|
||||||
|
|||||||
@@ -775,14 +775,19 @@ boost::signals2::connection LLWLParamManager::setPresetListChangeCallback(const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// static
|
|
||||||
void LLWLParamManager::initSingleton()
|
void LLWLParamManager::initSingleton()
|
||||||
{
|
{
|
||||||
LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL;
|
LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL;
|
||||||
|
|
||||||
loadAllPresets();
|
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
|
// load the day
|
||||||
std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName();
|
std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName();
|
||||||
if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay))
|
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
|
// but use linden time sets it to what the estate is
|
||||||
mAnimator.setTimeType(LLWLAnimator::TIME_LINDEN);
|
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
|
// static
|
||||||
|
|||||||
@@ -341,6 +341,9 @@ private:
|
|||||||
std::map<LLWLParamKey, LLWLParamSet> mParamList;
|
std::map<LLWLParamKey, LLWLParamSet> mParamList;
|
||||||
|
|
||||||
preset_list_signal_t mPresetListChangeSignal;
|
preset_list_signal_t mPresetListChangeSignal;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void initHack();
|
||||||
};
|
};
|
||||||
|
|
||||||
inline F32 LLWLParamManager::getDomeOffset(void) const
|
inline F32 LLWLParamManager::getDomeOffset(void) const
|
||||||
|
|||||||
@@ -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"
|
font="SansSerifSmall" height="16" initial_value="false"
|
||||||
label="Adult content" left_delta="110" mouse_opaque="true"
|
label="Adult content" left_delta="110" mouse_opaque="true"
|
||||||
name="incadult" width="204" />
|
name="incadult" width="204" />
|
||||||
|
<check_box name="filter_gaming" label="Hide Gaming" control_name="FilterGamingGroups" follows="right|top" bottom="-46" left_delta="110"/>
|
||||||
<scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true"
|
<scroll_list background_visible="true" bottom="-513" column_padding="0" draw_border="true"
|
||||||
draw_heading="true"
|
draw_heading="true"
|
||||||
follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true"
|
follows="left|top|right|bottom" height="464" left="4" mouse_opaque="true"
|
||||||
|
|||||||
@@ -103,9 +103,9 @@ vote on open proposals, and view old proposals.
|
|||||||
mouse_opaque="true" name="majority"
|
mouse_opaque="true" name="majority"
|
||||||
text_disabled_color="0.67647, 0.76275, 0.93529, 0.45"
|
text_disabled_color="0.67647, 0.76275, 0.93529, 0.45"
|
||||||
tool_tip="Majority of total votes needed to win." width="107">
|
tool_tip="Majority of total votes needed to win." width="107">
|
||||||
Simple Majority
|
<radio_item follows="all" bottom="-18" left_delta="2">Simple Majority</radio_item>
|
||||||
2/3 Majority
|
<radio_item follows="all" bottom_delta="-9">2/3 Majority</radio_item>
|
||||||
Unanimous
|
<radio_item follows="all" bottom_delta="-10">Unanimous</radio_item>
|
||||||
</radio_group>
|
</radio_group>
|
||||||
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||||
bottom_delta="-72" drop_shadow_visible="true" follows="left|top"
|
bottom_delta="-72" drop_shadow_visible="true" follows="left|top"
|
||||||
|
|||||||
Reference in New Issue
Block a user