Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer into Cupcake

Conflicts:
	indra/newview/llappviewer.cpp
This commit is contained in:
Drake Arconis
2013-03-20 08:31:04 -04:00
14 changed files with 168 additions and 103 deletions

View File

@@ -483,7 +483,6 @@ static void settings_to_globals()
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
@@ -714,7 +713,7 @@ bool LLAppViewer::init()
LLTrans::parseStrings("strings.xml", default_trans_args);
// Setup notifications after LLUI::initClass() has been called.
LLNotifications::instance();
LLNotifications::instance().createDefaultChannels();
LL_INFOS("InitInfo") << "Notifications initialized." << LL_ENDL ;
writeSystemInfo();
@@ -876,7 +875,7 @@ bool LLAppViewer::init()
{
// can't use an alert here since we're exiting and
// all hell breaks lose.
std::string msg = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedGLRequirements");
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
OSMessageBox(
msg,
@@ -891,7 +890,7 @@ bool LLAppViewer::init()
{
// can't use an alert here since we're exiting and
// all hell breaks lose.
std::string msg = LLNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
std::string msg = LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2");
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
OSMessageBox(
msg,
@@ -905,7 +904,7 @@ bool LLAppViewer::init()
{
// can't use an alert here since we're exiting and
// all hell breaks lose.
std::string msg = LNotifications::instance().getGlobalString("UnsupportedCPUSSE2");
std::string msg = LNotificationTemplates::instance().getGlobalString("UnsupportedCPUSSE2");
LLStringUtil::format(msg,LLTrans::getDefaultArgs());
OSMessageBox(
msg,
@@ -923,31 +922,31 @@ bool LLAppViewer::init()
std::string minSpecs;
// get cpu data from xml
std::stringstream minCPUString(LLNotifications::instance().getGlobalString("UnsupportedCPUAmount"));
std::stringstream minCPUString(LLNotificationTemplates::instance().getGlobalString("UnsupportedCPUAmount"));
S32 minCPU = 0;
minCPUString >> minCPU;
// get RAM data from XML
std::stringstream minRAMString(LLNotifications::instance().getGlobalString("UnsupportedRAMAmount"));
std::stringstream minRAMString(LLNotificationTemplates::instance().getGlobalString("UnsupportedRAMAmount"));
U64 minRAM = 0;
minRAMString >> minRAM;
minRAM = minRAM * 1024 * 1024;
if(!LLFeatureManager::getInstance()->isGPUSupported() && LLFeatureManager::getInstance()->getGPUClass() != GPU_CLASS_UNKNOWN)
{
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedGPU");
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedGPU");
minSpecs += "\n";
unsupported = true;
}
if(gSysCPU.getMHz() < minCPU)
{
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedCPU");
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedCPU");
minSpecs += "\n";
unsupported = true;
}
if(gSysMemory.getPhysicalMemoryClamped() < minRAM)
{
minSpecs += LLNotifications::instance().getGlobalString("UnsupportedRAM");
minSpecs += LLNotificationTemplates::instance().getGlobalString("UnsupportedRAM");
minSpecs += "\n";
unsupported = true;
}
@@ -980,6 +979,11 @@ bool LLAppViewer::init()
LLViewerJoystick::getInstance()->init(false);
// Finish windlight initialization.
LLWLParamManager::instance().initHack();
// Use prefered Environment.
LLEnvManagerNew::instance().usePrefs();
gGLActive = FALSE;
return true;
}

View File

@@ -165,7 +165,7 @@ void LLFloaterDisplayName::onCacheSetName(bool success,
// We might have a localized string for this message
// error_args will usually be empty from the server.
if (!error_tag.empty()
&& LLNotifications::getInstance()->templateExists(error_tag))
&& LLNotificationTemplates::getInstance()->templateExists(error_tag))
{
LLNotifications::instance().add(error_tag);
return;

View File

@@ -187,8 +187,8 @@ BOOL LLFloaterNotificationConsole::postBuild()
getChild<LLButton>("add_notification")->setClickedCallback(onClickAdd, this);
LLComboBox* notifications = getChild<LLComboBox>("notification_types");
LLNotifications::TemplateNames names = LLNotifications::instance().getTemplateNames();
for (LLNotifications::TemplateNames::iterator template_it = names.begin();
LLNotificationTemplates::TemplateNames names = LLNotificationTemplates::instance().getTemplateNames();
for (LLNotificationTemplates::TemplateNames::iterator template_it = names.begin();
template_it != names.end();
++template_it)
{

View File

@@ -83,8 +83,8 @@ void LLPanelMsgs::buildLists() //void LLFloaterPreference::buildPopupLists() in
disabled_popups.deleteAllItems();
enabled_popups.deleteAllItems();
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
iter != LLNotificationTemplates::instance().templatesEnd();
++iter)
{
LLNotificationTemplatePtr templatep = iter->second;
@@ -175,8 +175,8 @@ void LLPanelMsgs::cancel()
void LLPanelMsgs::resetAllIgnored()
{
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
iter != LLNotificationTemplates::instance().templatesEnd();
++iter)
{
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
@@ -188,8 +188,8 @@ void LLPanelMsgs::resetAllIgnored()
void LLPanelMsgs::setAllIgnored()
{
for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin();
iter != LLNotifications::instance().templatesEnd();
for (LLNotificationTemplates::TemplateMap::const_iterator iter = LLNotificationTemplates::instance().templatesBegin();
iter != LLNotificationTemplates::instance().templatesEnd();
++iter)
{
if (iter->second->mForm->getIgnoreType() != LLNotificationForm::IGNORE_NO)
@@ -210,7 +210,7 @@ void LLPanelMsgs::onClickEnablePopup(void* user_data)
std::vector<LLScrollListItem*>::iterator itor;
for (itor = items.begin(); itor != items.end(); ++itor)
{
LLNotificationTemplatePtr templatep = LLNotifications::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
LLNotificationTemplatePtr templatep = LLNotificationTemplates::instance().getTemplate(*(std::string*)((*itor)->getUserdata()));
gSavedSettings.setWarning(templatep->mName, TRUE);
}

View File

@@ -6131,7 +6131,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
// notification was specified using the new mechanism, so we can just handle it here
std::string notificationID;
msgsystem->getStringFast(_PREHASH_AlertInfo, _PREHASH_Message, notificationID);
if (!LLNotifications::getInstance()->templateExists(notificationID))
if (!LLNotificationTemplates::getInstance()->templateExists(notificationID))
{
return false;
}
@@ -6309,7 +6309,7 @@ void process_alert_core(const std::string& message, BOOL modal)
}
else
{
std::string new_msg =LLNotifications::instance().getGlobalString(text);
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(text);
args["MESSAGE"] = new_msg;
LLNotificationsUtil::add("SystemMessage", args);
}
@@ -6317,7 +6317,7 @@ void process_alert_core(const std::string& message, BOOL modal)
else if (modal)
{
LLSD args;
std::string new_msg =LLNotifications::instance().getGlobalString(message);
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message);
args["ERROR_MESSAGE"] = new_msg;
LLNotificationsUtil::add("ErrorMessage", args);
}
@@ -6328,7 +6328,7 @@ void process_alert_core(const std::string& message, BOOL modal)
if (message.find(AUTOPILOT_CANCELED_MSG) == std::string::npos )
{
LLSD args;
std::string new_msg =LLNotifications::instance().getGlobalString(message);
std::string new_msg =LLNotificationTemplates::instance().getGlobalString(message);
std::string localized_msg;
bool is_message_localized = LLTrans::findString(localized_msg, new_msg);

View File

@@ -588,7 +588,10 @@ void LLWaterParamManager::initSingleton()
loadAllPresets();
LLEnvManagerNew::instance().usePrefs();
// This shouldn't be called here. It has nothing to do with the initialization of this singleton.
// Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry
// of LLWaterParamManager::initSingleton().
//LLEnvManagerNew::instance().usePrefs();
}
// static

View File

@@ -775,14 +775,19 @@ boost::signals2::connection LLWLParamManager::setPresetListChangeCallback(const
}
// static
void LLWLParamManager::initSingleton()
{
LL_DEBUGS("Windlight") << "Initializing sky" << LL_ENDL;
loadAllPresets();
// Here it used to call LLWLParamManager::initHack(), but we can't do that since it calls
// LLWLParamManager::initSingleton() recursively. Instead, call it from LLAppViewer::init().
}
// This is really really horrible, but can't be fixed without a rewrite.
void LLWLParamManager::initHack()
{
// load the day
std::string preferred_day = LLEnvManagerNew::instance().getDayCycleName();
if (!LLDayCycleManager::instance().getPreset(preferred_day, mDay))
@@ -810,7 +815,10 @@ void LLWLParamManager::initSingleton()
// but use linden time sets it to what the estate is
mAnimator.setTimeType(LLWLAnimator::TIME_LINDEN);
LLEnvManagerNew::instance().usePrefs();
// This shouldn't be called here. It has nothing to do with the initialization of this singleton.
// Instead, call it one-time when the viewer starts. Calling it here causes a recursive entry
// of LLWLParamManager::initSingleton().
//LLEnvManagerNew::instance().usePrefs();
}
// static

View File

@@ -341,6 +341,9 @@ private:
std::map<LLWLParamKey, LLWLParamSet> mParamList;
preset_list_signal_t mPresetListChangeSignal;
public:
void initHack();
};
inline F32 LLWLParamManager::getDomeOffset(void) const