STORM-227 FIXED Made long cache location in Preferences->Setup readable.
Changes: - The line editor is now scrollable. - Its value is duplicated in the tool-tip. Technical notes: If you set the "enabled" param of a line editor to "false", that will disable text selection in the widget. However, if a line editor is initially enabled and then gets disabled with setEnabled(FALSE), it will remain selectable. It looks like bug, but I'm not going to fix it now to not introduce issues like this one. Instead, I'm applying to workaround which is to enable the widget initially and disable later, thus keeping it read-only but selectable.meow-7.2.2
parent
cb3042d84d
commit
4f3339ff99
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ protected:
|
|||
|
||||
public:
|
||||
|
||||
void setCacheLocation(const LLStringExplicit& location);
|
||||
|
||||
void onClickSetCache();
|
||||
void onClickResetCache();
|
||||
void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata);
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@
|
|||
control_name="CacheLocationTopFolder"
|
||||
border_style="line"
|
||||
border_thickness="1"
|
||||
enabled="false"
|
||||
follows="left|top"
|
||||
font="SansSerif"
|
||||
height="23"
|
||||
|
|
|
|||
Loading…
Reference in New Issue