diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterpreference.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterpreference.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_setup.xml | 1 |
3 files changed, 11 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index ff6df548c4..41f85ae29d 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -323,8 +323,9 @@ BOOL LLFloaterPreference::postBuild() if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); + getChild<LLUICtrl>("cache_location")->setEnabled(FALSE); // make it read-only but selectable (STORM-227) std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); - getChild<LLUICtrl>("cache_location")->setValue(cache_location); + setCacheLocation(cache_location); // if floater is opened before login set default localized busy message if (LLStartUp::getStartupState() < STATE_STARTED) @@ -414,7 +415,7 @@ void LLFloaterPreference::apply() fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); std::string cache_location = gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""); - getChild<LLUICtrl>("cache_location")->setValue(cache_location); + setCacheLocation(cache_location); LLViewerMedia::setCookiesEnabled(getChild<LLUICtrl>("cookies_enabled")->getValue()); @@ -1310,6 +1311,12 @@ void LLFloaterPreference::getUIColor(LLUICtrl* ctrl, const LLSD& param) color_swatch->setOriginal(LLUIColorTable::instance().getColor(param.asString())); } +void LLFloaterPreference::setCacheLocation(const LLStringExplicit& location) +{ + LLUICtrl* cache_location_editor = getChild<LLUICtrl>("cache_location"); + cache_location_editor->setValue(location); + cache_location_editor->setToolTip(location); +} //---------------------------------------------------------------------------- static LLRegisterPanelClassWrapper<LLPanelPreference> t_places("panel_preference"); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index d1e15d5ab8..e99731b92e 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -103,6 +103,8 @@ protected: public: + void setCacheLocation(const LLStringExplicit& location); + void onClickSetCache(); void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml index 879781f746..140d16e37f 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_setup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_setup.xml @@ -195,7 +195,6 @@ control_name="CacheLocationTopFolder" border_style="line" border_thickness="1" - enabled="false" follows="left|top" font="SansSerif" height="23" |