Merge from default branch

--HG--
branch : product-engine
meow-7.2.2
Vadim Savchuk 2010-07-16 18:22:59 +03:00
commit e2eca8bd24
11 changed files with 66 additions and 108 deletions

View File

@ -269,9 +269,6 @@ void LLTextBase::initFromParams(const LLTextBase::Params& p)
{
mReadOnly = p.read_only;
}
// HACK: text editors always need to be enabled so that we can scroll
LLView::setEnabled(true);
}
bool LLTextBase::truncate()

View File

@ -119,6 +119,17 @@ BOOL LLTextBox::handleHover(S32 x, S32 y, MASK mask)
return handled;
}
void LLTextBox::setEnabled(BOOL enabled)
{
// just treat enabled as read-only flag
bool read_only = !enabled;
if (read_only != mReadOnly)
{
LLTextBase::setReadOnly(read_only);
updateSegments();
}
}
void LLTextBox::setText(const LLStringExplicit& text , const LLStyle::Params& input_params )
{
// does string argument insertion

View File

@ -58,6 +58,8 @@ public:
/*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask);
/*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask);
/*virtual*/ void setEnabled(BOOL enabled);
/*virtual*/ void setText( const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params() );
void setRightAlign() { mHAlign = LLFontGL::RIGHT; }

View File

@ -289,6 +289,9 @@ void LLTextEditor::initFromParams( const LLTextEditor::Params& p)
{
LLTextBase::initFromParams(p);
// HACK: text editors always need to be enabled so that we can scroll
LLView::setEnabled(true);
if (p.commit_on_focus_lost.isProvided())
{
mCommitOnFocusLost = p.commit_on_focus_lost;

View File

@ -505,8 +505,6 @@ void LLPanelFace::getState()
// Texture scale
{
childSetEnabled("tex scale",editable);
//mLabelTexScale->setEnabled( editable );
F32 scale_s = 1.f;
struct f2 : public LLSelectedTEGetFunctor<F32>
{
@ -577,7 +575,6 @@ void LLPanelFace::getState()
// Texture rotation
{
childSetEnabled("tex rotate",editable);
F32 rotation = 0.f;
struct f6 : public LLSelectedTEGetFunctor<F32>
{
@ -720,14 +717,9 @@ void LLPanelFace::getState()
if (selected_texgen == 1)
{
childSetText("tex scale",getString("string repeats per meter"));
childSetValue("TexScaleU", 2.0f * childGetValue("TexScaleU").asReal() );
childSetValue("TexScaleV", 2.0f * childGetValue("TexScaleV").asReal() );
}
else
{
childSetText("tex scale",getString("string repeats per face"));
}
}
@ -802,9 +794,7 @@ void LLPanelFace::getState()
}
childSetEnabled("color trans",FALSE);
childSetEnabled("rpt",FALSE);
childSetEnabled("tex scale",FALSE);
childSetEnabled("tex offset",FALSE);
childSetEnabled("tex rotate",FALSE);
childSetEnabled("tex gen",FALSE);
childSetEnabled("label shininess",FALSE);
childSetEnabled("label bumpiness",FALSE);

View File

@ -107,7 +107,6 @@ void LLPanelMediaSettingsPermissions::draw()
if(mPermsGroupName)
{
mPermsGroupName->setNameID(group_id, true);
mPermsGroupName->setEnabled(true);
};
}
else
@ -116,7 +115,6 @@ void LLPanelMediaSettingsPermissions::draw()
{
mPermsGroupName->setNameID(LLUUID::null, TRUE);
mPermsGroupName->refresh(LLUUID::null, LLStringUtil::null, LLStringUtil::null, true);
mPermsGroupName->setEnabled(false);
};
};
}
@ -142,6 +140,12 @@ void LLPanelMediaSettingsPermissions::clearValues( void* userdata, bool editable
self->mPermsGroupControl->setEnabled(editable);
self->mPermsWorldInteract->setEnabled(editable);
self->mPermsWorldControl->setEnabled(editable);
self->getChild< LLTextBox >("controls_label")->setEnabled(editable);
self->getChild< LLTextBox >("owner_label")->setEnabled(editable);
self->getChild< LLTextBox >("group_label")->setEnabled(editable);
self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable);
self->getChild< LLTextBox >("anyone_label")->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////
@ -216,13 +220,11 @@ void LLPanelMediaSettingsPermissions::initValues( void* userdata, const LLSD& me
self->mPermsWorldControl->setEnabled(false);
}
self->childSetEnabled("media_perms_label_owner", editable );
self->childSetText("media_perms_label_owner", LLTrans::getString("Media Perms Owner") );
self->childSetEnabled("media_perms_label_group", editable );
self->childSetText("media_perms_label_group", LLTrans::getString("Media Perms Group") );
self->childSetEnabled("media_perms_label_anyone", editable );
self->childSetText("media_perms_label_anyone", LLTrans::getString("Media Perms Anyone") );
self->getChild< LLTextBox >("controls_label")->setEnabled(editable);
self->getChild< LLTextBox >("owner_label")->setEnabled(editable);
self->getChild< LLTextBox >("group_label")->setEnabled(editable);
self->getChild< LLNameBox >("perms_group_name")->setEnabled(editable);
self->getChild< LLTextBox >("anyone_label")->setEnabled(editable);
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -2322,6 +2322,7 @@ even though the user gets a free copy.
layout="topleft"
left_pad="15"
name="color trans"
text_readonly_color="LabelDisabledColor"
top="6"
width="110">
Transparency %
@ -2346,6 +2347,7 @@ even though the user gets a free copy.
layout="topleft"
left_delta="0"
name="glow label"
text_readonly_color="LabelDisabledColor"
top_pad="8"
width="80">
Glow
@ -2376,6 +2378,7 @@ even though the user gets a free copy.
layout="topleft"
left="10"
name="tex gen"
text_readonly_color="LabelDisabledColor"
top_pad="5"
width="90">
Mapping
@ -2404,6 +2407,7 @@ even though the user gets a free copy.
layout="topleft"
name="label shininess"
left_pad="4"
text_readonly_color="LabelDisabledColor"
top_pad="-36"
width="90">
Shininess
@ -2440,6 +2444,7 @@ even though the user gets a free copy.
layout="topleft"
left_pad="4"
name="label bumpiness"
text_readonly_color="LabelDisabledColor"
top_pad="-36"
width="90">
Bumpiness
@ -2565,7 +2570,8 @@ even though the user gets a free copy.
height="10"
layout="topleft"
left="10"
name="tex scale"
name="rpt"
text_readonly_color="LabelDisabledColor"
top_pad="4"
width="200">
Repeats / Face
@ -2654,6 +2660,7 @@ even though the user gets a free copy.
layout="topleft"
left="10"
name="tex offset"
text_readonly_color="LabelDisabledColor"
width="200">
Texture Offset
</text>
@ -2737,9 +2744,9 @@ even though the user gets a free copy.
follows="top|left"
tool_tip="Edit this Media"
height="12"
image_disabled="Icon_Gear_Foreground"
image_selected="Icon_Gear_Background"
image_unselected="Icon_Gear_Press"
image_disabled="Icon_Gear_Background"
image_selected="Icon_Gear_Press"
image_unselected="Icon_Gear_Foreground"
layout="topleft"
left_pad="10"
name="edit_media"

View File

@ -16,7 +16,8 @@
follows="top|left"
height="15"
left="10"
name="controls_label">
name="controls_label"
text_readonly_color="LabelDisabledColor">
Controls:
</text>
<combo_box
@ -46,7 +47,8 @@
follows="top|left"
height="15"
left="10"
name="owner_label">
name="owner_label"
text_readonly_color="LabelDisabledColor">
Owner
</text>
@ -83,8 +85,9 @@
enabled="false"
follows="top|left"
height="15"
left="10"
name="group_label">
left="10"
name="group_label"
text_readonly_color="LabelDisabledColor">
Group:
</text>
@ -95,6 +98,7 @@
font="SansSerif"
height="20" left="60"
name="perms_group_name"
text_readonly_color="LabelDisabledColor"
value =""
width="200" />
@ -132,7 +136,8 @@
follows="top|left"
height="15"
left="10"
name="anyone_label">
name="anyone_label"
text_readonly_color="LabelDisabledColor">
Anyone
</text>

View File

@ -8,7 +8,7 @@
halign="left"
h_pad="0"
allow_scroll="false"
text_readonly_color="LabelDisabledColor"
text_readonly_color="LabelTextColor"
bg_writeable_color="FloaterDefaultBackgroundColor"
use_ellipses="false"
bg_visible="false"

View File

@ -2,4 +2,5 @@
<!-- Core parameters are in simple_text_editor.xml -->
<text_editor
allow_html="false"
text_readonly_color="LabelDisabledColor"
show_context_menu="true"/>

View File

@ -35,6 +35,7 @@
#include "../llviewernetwork.h"
#include "../test/lltut.h"
#include "../llsecapi.h"
#include "../llsechandler_basic.h"
#include "../../llxml/llcontrol.h"
@ -56,82 +57,21 @@ std::string LLControlGroup::getString(const std::string& name)
LLControlGroup gSavedSettings("test");
class LLSecAPIBasicHandler : public LLSecAPIHandler
{
protected:
LLPointer<LLCertificateChain> mCertChain;
LLPointer<LLCertificate> mCert;
LLPointer<LLCertificateStore> mCertStore;
LLSD mLLSD;
public:
LLSecAPIBasicHandler() {}
virtual ~LLSecAPIBasicHandler() {}
// instantiate a certificate from a pem string
virtual LLPointer<LLCertificate> getCertificate(const std::string& pem_cert)
{
return mCert;
}
// instiate a certificate from an openssl X509 structure
virtual LLPointer<LLCertificate> getCertificate(X509* openssl_cert)
{
return mCert;
}
// instantiate a chain from an X509_STORE_CTX
virtual LLPointer<LLCertificateChain> getCertificateChain(const X509_STORE_CTX* chain)
{
return mCertChain;
}
// instantiate a cert store given it's id. if a persisted version
// exists, it'll be loaded. If not, one will be created (but not
// persisted)
virtual LLPointer<LLCertificateStore> getCertificateStore(const std::string& store_id)
{
return mCertStore;
}
// persist data in a protected store
virtual void setProtectedData(const std::string& data_type,
const std::string& data_id,
const LLSD& data) {}
// retrieve protected data
virtual LLSD getProtectedData(const std::string& data_type,
const std::string& data_id)
{
return mLLSD;
}
virtual void deleteProtectedData(const std::string& data_type,
const std::string& data_id)
{
}
virtual LLPointer<LLCredential> createCredential(const std::string& grid,
const LLSD& identifier,
const LLSD& authenticator)
{
LLPointer<LLCredential> cred = NULL;
return cred;
}
virtual LLPointer<LLCredential> loadCredential(const std::string& grid)
{
LLPointer<LLCredential> cred = NULL;
return cred;
}
virtual void saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {}
virtual void deleteCredential(LLPointer<LLCredential> cred) {}
};
LLSecAPIBasicHandler::LLSecAPIBasicHandler() {}
void LLSecAPIBasicHandler::init() {}
LLSecAPIBasicHandler::~LLSecAPIBasicHandler() {}
LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(const std::string& pem_cert) { return NULL; }
LLPointer<LLCertificate> LLSecAPIBasicHandler::getCertificate(X509* openssl_cert) { return NULL; }
LLPointer<LLCertificateChain> LLSecAPIBasicHandler::getCertificateChain(const X509_STORE_CTX* chain) { return NULL; }
LLPointer<LLCertificateStore> LLSecAPIBasicHandler::getCertificateStore(const std::string& store_id) { return NULL; }
void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) {}
LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, const std::string& data_id) { return LLSD(); }
void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, const std::string& data_id) {}
LLPointer<LLCredential> LLSecAPIBasicHandler::createCredential(const std::string& grid, const LLSD& identifier, const LLSD& authenticator) { return NULL; }
LLPointer<LLCredential> LLSecAPIBasicHandler::loadCredential(const std::string& grid) { return NULL; }
void LLSecAPIBasicHandler::saveCredential(LLPointer<LLCredential> cred, bool save_authenticator) {}
void LLSecAPIBasicHandler::deleteCredential(LLPointer<LLCredential> cred) {}
// -------------------------------------------------------------------------------------------
// TUT