From 5292a3181191179de180fd36bd248a3dba6113b1 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 10 Nov 2009 14:45:10 +0800 Subject: EXT-2078 --- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index c5e129cf2f..dbbf7ebede 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -203,7 +203,7 @@ name="snapshot_panel" width="40"> + Date: Tue, 10 Nov 2009 22:46:58 +0800 Subject: check for NULL to prevent crashing --- indra/newview/lltexturecache.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 69a2d1d7a6..6a4b967487 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1543,6 +1543,8 @@ bool LLTextureCache::readComplete(handle_t handle, bool abort) handle_map_t::iterator iter = mReaders.find(handle); llassert_always(iter != mReaders.end() || abort); LLTextureCacheWorker* worker = iter->second; + if (!worker) + return false; bool res = worker->complete(); if (res || abort) { -- cgit v1.2.3 From 26d481f3850ded5a20e183260eced4c32c9b7a84 Mon Sep 17 00:00:00 2001 From: angela Date: Tue, 10 Nov 2009 22:49:25 +0800 Subject: (EXT-2343) Preference > Chat > ColorSwatch 's LLUIColorTable is not working --- indra/llui/lluicolortable.cpp | 13 +++- indra/newview/llfloaterpreference.cpp | 69 ++++-------------- indra/newview/llfloaterpreference.h | 5 +- .../default/xui/en/panel_preferences_chat.xml | 82 +++++++++++++++++----- 4 files changed, 93 insertions(+), 76 deletions(-) (limited to 'indra') diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 851091f0ca..f1e3000547 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -69,7 +69,14 @@ void LLUIColorTable::insertFromParams(const Params& p) ColorEntryParams color_entry = *it; if(color_entry.color.value.isChosen()) { - setColor(color_entry.name, color_entry.color.value, mLoadedColors); + if(mUserSetColors.find(color_entry.name)!=mUserSetColors.end()) + { + setColor(color_entry.name, color_entry.color.value); + } + else + { + setColor(color_entry.name, color_entry.color.value, mLoadedColors); + } } else { @@ -213,7 +220,7 @@ bool LLUIColorTable::loadFromSettings() result |= loadFromFilename(current_filename); } - std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml"); + std::string user_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml"); loadFromFilename(user_filename); return result; @@ -239,7 +246,7 @@ void LLUIColorTable::saveUserSettings() const if(!output_node->isNull()) { - const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SKIN, "colors.xml"); + const std::string& filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "colors.xml"); LLFILE *fp = LLFile::fopen(filename, "w"); if(fp != NULL) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 2af1313db4..7bd1311815 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -348,6 +348,8 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key) mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this)); mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this)); mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2)); + mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2)); + mCommitCallbackRegistrar.add("Pref.getUIColor", boost::bind(&LLFloaterPreference::getUIColor, this ,_1, _2)); sSkin = gSavedSettings.getString("SkinCurrent"); @@ -1356,18 +1358,24 @@ void LLFloaterPreference::initWindowSizeControls(LLPanel* panelp) } +void LLFloaterPreference::applyUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue())); +} + +void LLFloaterPreference::getUIColor(LLUICtrl* ctrl, const LLSD& param) +{ + LLColorSwatchCtrl* color_swatch = (LLColorSwatchCtrl*) ctrl; + color_swatch->setOriginal(LLUIColorTable::instance().getColor(param.asString())); +} + //---------------------------------------------------------------------------- static LLRegisterPanelClassWrapper t_places("panel_preference"); LLPanelPreference::LLPanelPreference() : LLPanel() { - mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); -} - -static void applyUIColor(const std::string& color_name, LLUICtrl* ctrl, const LLSD& param) -{ - LLUIColorTable::instance().setColor(color_name, LLColor4(param)); + mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); } //virtual @@ -1496,55 +1504,6 @@ BOOL LLPanelPreference::postBuild() refresh(); } - - if(hasChild("user") && hasChild("agent") && hasChild("im") - && hasChild("system") && hasChild("script_error") && hasChild("objects") - && hasChild("owner") && hasChild("background") && hasChild("links")) - { - LLColorSwatchCtrl* color_swatch = getChild("user"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "UserChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("UserChatColor")); - - color_swatch = getChild("agent"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "AgentChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("AgentChatColor")); - - color_swatch = getChild("im"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "IMChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("IMChatColor")); - - color_swatch = getChild("system"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "SystemChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("SystemChatColor")); - - color_swatch = getChild("script_error"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ScriptErrorColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("ScriptErrorColor")); - - color_swatch = getChild("objects"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "ObjectChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("ObjectChatColor")); - - color_swatch = getChild("owner"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "llOwnerSayChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("llOwnerSayChatColor")); - - color_swatch = getChild("background"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "BackgroundChatColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("BackgroundChatColor")); - - color_swatch = getChild("links"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "HTMLLinkColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("HTMLLinkColor")); - } - - if(hasChild("effect_color_swatch")) - { - LLColorSwatchCtrl* color_swatch = getChild("effect_color_swatch"); - color_swatch->setCommitCallback(boost::bind(&applyUIColor, "EffectColor", _1, _2)); - color_swatch->setOriginal(LLUIColorTable::instance().getColor("EffectColor")); - } - apply(); return true; } diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index b1ad0348c0..10f39e46f1 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -133,7 +133,9 @@ public: void onCommitAutoDetectAspect(); void applyResolution(); void applyWindowSize(); - + void applyUIColor(LLUICtrl* ctrl, const LLSD& param); + void getUIColor(LLUICtrl* ctrl, const LLSD& param); + static void initWindowSizeControls(LLPanel* panelp); static void buildLists(void* data); @@ -159,6 +161,7 @@ public: virtual void apply(); virtual void cancel(); void setControlFalse(const LLSD& user_data); + private: typedef std::map control_values_map_t; control_values_map_t mSavedValues; diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 645863e7a4..5a4b0a3892 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -45,14 +45,20 @@ + width="44" > + + + + width="44" > + + + - + + + + + width="44" > + + + + width="44"> + + + + width="44" > + + + + width="44" > + + + + width="44" > + + +