diff options
author | James Cook <james@lindenlab.com> | 2009-11-17 16:07:48 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2009-11-17 16:07:48 -0800 |
commit | 15cbc0abd89d97ab06ed8f0c2a4bb2245e75535c (patch) | |
tree | 5ccf97ad27df2def606db57de9a96cb07ec70eb6 /indra/newview | |
parent | 6d6ee6af54cb1c1e1a73ae5697b5d9865e9dac42 (diff) |
EXT-2403 Object name, description now forced to be ASCII characters only
Also fixes EXT-172, EXT-2399. Semantics now are:
Object name, object desc, parcel name, region name, inventory item name
all are ASCII only.
Parcel desc allows arbitrary Unicode chars.
Group names force ASCII only.
Reviewed with Leyla
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatergodtools.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterland.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llfloaternamedesc.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterproperties.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfolderview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelgroupgeneral.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llpanellogin.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelpermissions.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpreviewanim.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewgesture.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewnotecard.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewsound.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpreviewtexture.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llsidepaneliteminfo.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsidepaneltaskinfo.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_test_line_editor.xml | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_tools.xml | 8 |
18 files changed, 37 insertions, 32 deletions
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 886f5ec924..cd3432190b 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -415,7 +415,7 @@ LLPanelRegionTools::LLPanelRegionTools() BOOL LLPanelRegionTools::postBuild() { getChild<LLLineEditor>("region name")->setKeystrokeCallback(onChangeSimName, this); - childSetPrevalidate("region name", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("region name", &LLLineEditor::prevalidateASCIIPrintableNoPipe); childSetPrevalidate("estate", &LLLineEditor::prevalidatePositiveS32); childSetPrevalidate("parentestate", &LLLineEditor::prevalidatePositiveS32); childDisable("parentestate"); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 015a947d91..22d6098d5b 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -347,13 +347,14 @@ BOOL LLPanelLandGeneral::postBuild() { mEditName = getChild<LLLineEditor>("Name"); mEditName->setCommitCallback(onCommitAny, this); - childSetPrevalidate("Name", LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("Name", LLLineEditor::prevalidateASCIIPrintableNoPipe); mEditDesc = getChild<LLTextEditor>("Description"); mEditDesc->setCommitOnFocusLost(TRUE); mEditDesc->setCommitCallback(onCommitAny, this); - childSetPrevalidate("Description", LLLineEditor::prevalidatePrintableNotPipe); - + // No prevalidate function - historically the prevalidate function was broken, + // allowing residents to put in characters like U+2661 WHITE HEART SUIT, so + // preserve that ability. mTextSalePending = getChild<LLTextBox>("SalePending"); mTextOwnerLabel = getChild<LLTextBox>("Owner:"); diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index b7296518d4..810761e034 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -111,7 +111,7 @@ BOOL LLFloaterNameDesc::postBuild() if (NameEditor) { NameEditor->setMaxTextLength(DB_INV_ITEM_NAME_STR_LEN); - NameEditor->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe); + NameEditor->setPrevalidate(&LLLineEditor::prevalidateASCIIPrintableNoPipe); } y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f); @@ -123,7 +123,7 @@ BOOL LLFloaterNameDesc::postBuild() if (DescEditor) { DescEditor->setMaxTextLength(DB_INV_ITEM_DESC_STR_LEN); - DescEditor->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe); + DescEditor->setPrevalidate(&LLLineEditor::prevalidateASCIIPrintableNoPipe); } y -= llfloor(PREVIEW_LINE_HEIGHT * 1.2f); diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index e0d4a59d9d..ff9002787c 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -130,9 +130,9 @@ BOOL LLFloaterProperties::postBuild() { // build the UI // item name & description - childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe); getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLFloaterProperties::onCommitName,this)); - childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe); getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLFloaterProperties:: onCommitDescription, this)); // Creator information getChild<LLUICtrl>("BtnCreator")->setCommitCallback(boost::bind(&LLFloaterProperties::onClickCreator,this)); diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 4192c6a586..955bc64e05 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -220,7 +220,7 @@ LLFolderView::LLFolderView(const Params& p) params.font(getLabelFontForStyle(LLFontGL::NORMAL)); params.max_length_bytes(DB_INV_ITEM_NAME_STR_LEN); params.commit_callback.function(boost::bind(&LLFolderView::commitRename, this, _2)); - params.prevalidate_callback(&LLLineEditor::prevalidatePrintableNotPipe); + params.prevalidate_callback(&LLLineEditor::prevalidateASCIIPrintableNoPipe); params.commit_on_focus_lost(true); params.visible(false); mRenamer = LLUICtrlFactory::create<LLLineEditor> (params); diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 1c2875bf46..a1d54367c9 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -213,6 +213,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group) } mFounderName = panel_group->getChild<LLNameBox>("founder_name"); mGroupNameEditor = panel_group->getChild<LLLineEditor>("group_name_editor"); + mGroupNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII ); } // static diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index b3e14eb2fb..78f3469f0e 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -210,8 +210,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, } #if !USE_VIEWER_AUTH - childSetPrevalidate("first_name_edit", LLLineEditor::prevalidatePrintableNoSpace); - childSetPrevalidate("last_name_edit", LLLineEditor::prevalidatePrintableNoSpace); + childSetPrevalidate("first_name_edit", LLLineEditor::prevalidateASCIIPrintableNoSpace); + childSetPrevalidate("last_name_edit", LLLineEditor::prevalidateASCIIPrintableNoSpace); childSetCommitCallback("password_edit", mungePassword, this); getChild<LLLineEditor>("password_edit")->setKeystrokeCallback(onPassKey, this); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 1051326e72..0dc010e2e7 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -80,9 +80,9 @@ LLPanelPermissions::LLPanelPermissions() : BOOL LLPanelPermissions::postBuild() { childSetCommitCallback("Object Name",LLPanelPermissions::onCommitName,this); - childSetPrevalidate("Object Name",LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe); childSetCommitCallback("Object Description",LLPanelPermissions::onCommitDesc,this); - childSetPrevalidate("Object Description",LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe); getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLPanelPermissions::onClickGroup,this)); diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp index 604faf8eb4..92bd4dc62b 100644 --- a/indra/newview/llpreviewanim.cpp +++ b/indra/newview/llpreviewanim.cpp @@ -79,7 +79,7 @@ BOOL LLPreviewAnim::postBuild() childSetAction("Anim audition btn",auditionAnim, this); childSetCommitCallback("desc", LLPreview::onText, this); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); return LLPreview::postBuild(); } diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 7b3a20d102..49a2a3723d 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -493,7 +493,7 @@ BOOL LLPreviewGesture::postBuild() { childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); } return LLPreview::postBuild(); diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index ab9cfbf850..ce81077d80 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -96,7 +96,7 @@ BOOL LLPreviewNotecard::postBuild() childSetCommitCallback("desc", LLPreview::onText, this); if (item) childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); return LLPreview::postBuild(); } diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 2382befcfa..4e4711f8fb 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -956,7 +956,7 @@ BOOL LLPreviewLSL::postBuild() childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); return LLPreview::postBuild(); } diff --git a/indra/newview/llpreviewsound.cpp b/indra/newview/llpreviewsound.cpp index 7659c50ed3..d7fd252fb6 100644 --- a/indra/newview/llpreviewsound.cpp +++ b/indra/newview/llpreviewsound.cpp @@ -75,7 +75,7 @@ BOOL LLPreviewSound::postBuild() button->setSoundFlags(LLView::SILENT); childSetCommitCallback("desc", LLPreview::onText, this); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); return LLPreview::postBuild(); } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 13d02b7dec..41cf402d6f 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -152,7 +152,7 @@ BOOL LLPreviewTexture::postBuild() { childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); - childSetPrevalidate("desc", &LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); } } diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index a3efea7b7e..ff6e2d7363 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -111,9 +111,9 @@ BOOL LLSidepanelItemInfo::postBuild() // build the UI
// item name & description
- childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidatePrintableNotPipe);
+ childSetPrevalidate("LabelItemName",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
//getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
- childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidatePrintableNotPipe);
+ childSetPrevalidate("LabelItemDesc",&LLLineEditor::prevalidateASCIIPrintableNoPipe);
//getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Creator information
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index 01c832d7d5..4396cce545 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -100,8 +100,8 @@ BOOL LLSidepanelTaskInfo::postBuild() mBuyBtn = getChild<LLButton>("buy_btn"); mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this)); - childSetPrevalidate("Object Name",LLLineEditor::prevalidatePrintableNotPipe); - childSetPrevalidate("Object Description",LLLineEditor::prevalidatePrintableNotPipe); + childSetPrevalidate("Object Name",LLLineEditor::prevalidateASCIIPrintableNoPipe); + childSetPrevalidate("Object Description",LLLineEditor::prevalidateASCIIPrintableNoPipe); // getChild<LLUICtrl>("button set group")->setCommitCallback(boost::bind(&LLSidepanelTaskInfo::onClickGroup,this)); // childSetAction("button deed",LLSidepanelTaskInfo::onClickDeedToGroup,this); diff --git a/indra/newview/skins/default/xui/en/floater_test_line_editor.xml b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml index e017d404c6..0531b52e5a 100644 --- a/indra/newview/skins/default/xui/en/floater_test_line_editor.xml +++ b/indra/newview/skins/default/xui/en/floater_test_line_editor.xml @@ -18,7 +18,18 @@ Enabled line editor </line_editor> <line_editor - enabled="false" + height="20" + layout="topleft" + left_delta="0" + name="ascii_line_editor" + prevalidate_callback="ascii" + tool_tip="ascii line editor" + top_pad="10" + width="200"> + ASCII only line editor + </line_editor> + <line_editor + enabled="false" height="20" layout="topleft" left_delta="0" diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index b2f46bc433..944b4cda98 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -809,11 +809,8 @@ Mixed Sale </panel.string> <text - type="string" - length="1" follows="left|top" height="10" - layout="topleft" left="10" name="Name:" top="0" @@ -823,7 +820,6 @@ <line_editor follows="left|top|right" height="19" - layout="topleft" left_pad="0" max_length="63" name="Object Name" @@ -831,11 +827,8 @@ top_delta="0" width="170" /> <text - type="string" - length="1" follows="left|top" height="10" - layout="topleft" left="10" name="Description:" top_pad="3" @@ -845,7 +838,6 @@ <line_editor follows="left|top|right" height="19" - layout="topleft" left_pad="0" max_length="127" name="Object Description" |