From d0dd18a9087d107fd2feec17f554bef4be81c1d5 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Tue, 8 Jun 2010 18:44:11 +0300 Subject: EXT-6934 FIXED method LLInventoryObject::rename does not change Name, if string is empty after correction. Problem description: LLInventoryObject::rename corrects incoming string and remove odd spaces, for example converts string " " to empty string "", as the result empty string can be set as InventoryObject name. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/505/ --HG-- branch : product-engine --- indra/llinventory/llinventory.cpp | 27 +++++++++++++-------------- indra/llinventory/llinventory.h | 6 +++++- 2 files changed, 18 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 2c767a4857..53830b1a14 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -85,10 +85,7 @@ LLInventoryObject::LLInventoryObject(const LLUUID& uuid, mType(type), mName(name) { - LLStringUtil::replaceNonstandardASCII(mName, ' '); - LLStringUtil::replaceChar(mName, '|', ' '); - LLStringUtil::trim(mName); - LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); + correctInventoryName(mName); } LLInventoryObject::LLInventoryObject() : @@ -155,12 +152,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid) void LLInventoryObject::rename(const std::string& n) { std::string new_name(n); - LLStringUtil::replaceNonstandardASCII(new_name, ' '); - LLStringUtil::replaceChar(new_name, '|', ' '); - LLStringUtil::trim(new_name); - LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); - - if( new_name != mName ) + correctInventoryName(new_name); + if( !new_name.empty() && new_name != mName ) { mName = new_name; } @@ -221,10 +214,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream) " %254s %254[^|]", keyword, valuestr); mName.assign(valuestr); - LLStringUtil::replaceNonstandardASCII(mName, ' '); - LLStringUtil::replaceChar(mName, '|', ' '); - LLStringUtil::trim(mName); - LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); + correctInventoryName(mName); } else { @@ -284,6 +274,15 @@ void LLInventoryObject::updateServer(BOOL) const llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl; } +inline +void LLInventoryObject::correctInventoryName(std::string& name) +{ + LLStringUtil::replaceNonstandardASCII(name, ' '); + LLStringUtil::replaceChar(name, '|', ' '); + LLStringUtil::trim(name); + LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN); +} + ///---------------------------------------------------------------------------- /// Class LLInventoryItem diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h index b083e305b1..4c6ac83ab8 100644 --- a/indra/llinventory/llinventory.h +++ b/indra/llinventory/llinventory.h @@ -92,9 +92,13 @@ public: void setParent(const LLUUID& new_parent); void setType(LLAssetType::EType type); +private: + // in place correction for inventory name string + void correctInventoryName(std::string& name); + //-------------------------------------------------------------------- // File Support - // Implemented here so that a minimal information set can be transmitted + // Implemented here so that a minimal information set can be transmitted // between simulator and viewer. //-------------------------------------------------------------------- public: -- cgit v1.2.3 From 9d1e7cbb4e9998c7ba460051c4d39198250c4965 Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Tue, 8 Jun 2010 21:41:28 +0300 Subject: EXT-6933 FIXED According to behavior in viewer-1.2: minimal price value was changed to 0. Problem description: Minimal price value was 1. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/510/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/sidepanel_item_info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml index c816fd1479..b736f5e29c 100644 --- a/indra/newview/skins/default/xui/en/sidepanel_item_info.xml +++ b/indra/newview/skins/default/xui/en/sidepanel_item_info.xml @@ -395,7 +395,7 @@ top_pad="10" label_width="75" left="120" width="170" - min_val="1" + min_val="0" height="23" max_val="999999999" top_pad="10"/> -- cgit v1.2.3 From d7eefeafeaea5e515c805c88058154a1e6a5d68e Mon Sep 17 00:00:00 2001 From: Vladimir Pchelko Date: Tue, 8 Jun 2010 22:14:56 +0300 Subject: EXT-7604 FIXED Button overlay image and size were changed. Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/518/ --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_notices.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_group_notices.xml b/indra/newview/skins/default/xui/en/panel_group_notices.xml index 19fe2ea874..6523b0d491 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -74,16 +74,14 @@ Maximum 200 per group daily