diff options
Diffstat (limited to 'indra')
20 files changed, 78 insertions, 34 deletions
| diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 349dbc3405..919364be63 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2024,8 +2024,17 @@ S32 LLTextBase::getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round,  		}  		else if (hit_past_end_of_line && segmentp->getEnd() >= line_iter->mDocIndexEnd)  		{ -			// segment wraps to next line, so just set doc pos to the end of the line -			pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); +			if (getLineNumFromDocIndex(line_iter->mDocIndexEnd - 1) == line_iter->mLineNum) +			{ +				// if segment wraps to the next line we should step one char back +				// to compensate for the space char between words +				// which is removed due to wrapping +				pos = llclamp(line_iter->mDocIndexEnd - 1, 0, getLength()); +			} +			else +			{ +				pos = llclamp(line_iter->mDocIndexEnd, 0, getLength()); +			}  			break;  		}  		start_x += text_width; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 492cfe7c1b..642a1907f0 100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3356,8 +3356,8 @@ bool LLAgent::teleportCore(bool is_local)  	// hide the Region/Estate floater  	LLFloaterReg::hideInstance("region_info"); -	// hide the search floater (EXT-8276) -	LLFloaterReg::hideInstance("search"); +	// minimize the Search floater (STORM-1474) +	LLFloaterReg::getInstance("search")->setMinimized(TRUE);  	LLViewerParcelMgr::getInstance()->deselectLand();  	LLViewerMediaFocus::getInstance()->clearFocus(); diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 5501b8c2ac..2abfbf37ca 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -415,6 +415,15 @@ void LLExpandableTextBox::onTopLost()  	LLUICtrl::onTopLost();  } +void LLExpandableTextBox::updateTextShape() +{ +	// I guess this should be done on every reshape(), +	// but adding this code to reshape() currently triggers bug VWR-26455, +	// which makes the text virtually unreadable. +	llassert(!mExpanded); +	updateTextBoxRect(); +} +  void LLExpandableTextBox::setValue(const LLSD& value)  {  	collapseTextBox(); diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index f75ef954ff..399e48bea2 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -143,6 +143,10 @@ public:  	 */  	/*virtual*/ void onTopLost(); +	/** +	 * *HACK: Update the inner textbox shape. +	 */ +	void updateTextShape();  	/**  	 * Draws text box, collapses text box if its expanded and its parent's position changed diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 610142b5a9..5cfdd69f7b 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -529,7 +529,7 @@ void LLFloaterBuyLandUI::updateCovenantInfo()  	LLTextBox* region_type = getChild<LLTextBox>("region_type_text");  	if (region_type)  	{ -		region_type->setText(region->getSimProductName()); +		region_type->setText(region->getLocalizedSimProductName());  	}  	LLTextBox* resellable_clause = getChild<LLTextBox>("resellable_clause"); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 9b7593ce61..4746f93009 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -566,10 +566,7 @@ void LLPanelLandGeneral::refresh()  		if (regionp)  		{  			insert_maturity_into_textbox(mContentRating, gFloaterView->getParentFloater(this), MATURITY); - -			std::string land_type; -			bool is_land_type_localized = LLTrans::findString(land_type, regionp->getSimProductName()); -			mLandType->setText(is_land_type_localized ? land_type : regionp->getSimProductName()); +			mLandType->setText(regionp->getLocalizedSimProductName());  		}  		// estate owner/manager cannot edit other parts of the parcel @@ -2883,13 +2880,7 @@ void LLPanelLandCovenant::refresh()  	}  	LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); -	if (region_landtype) -	{ -		std::string land_type; -		bool is_land_type_localized = LLTrans::findString(land_type, region->getSimProductName()); - -		region_landtype->setText(is_land_type_localized ? land_type : region->getSimProductName()); -	} +	region_landtype->setText(region->getLocalizedSimProductName());  	LLTextBox* region_maturity = getChild<LLTextBox>("region_maturity_text");  	if (region_maturity) diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 538c5e3b88..9a99417e93 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -336,7 +336,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)  	LLViewerRegion* region = gAgent.getRegion();  	BOOL allow_modify = gAgent.isGodlike() || (region && region->canManageEstate()); -	// *TODO: Replace parcing msg with accessing the region info model. +	// *TODO: Replace parsing msg with accessing the region info model.  	LLRegionInfoModel& region_info = LLRegionInfoModel::instance();  	// extract message @@ -368,6 +368,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)  		msg->getSize("RegionInfo2", "ProductName") > 0)  	{  		msg->getString("RegionInfo2", "ProductName", sim_type); +		LLTrans::findString(sim_type, sim_type); // try localizing sim product name  	}  	// GENERAL PANEL @@ -2409,11 +2410,7 @@ bool LLPanelEstateCovenant::refreshFromRegion(LLViewerRegion* region)  	}  	LLTextBox* region_landtype = getChild<LLTextBox>("region_landtype_text"); -	if (region_landtype) -	{ -		region_landtype->setText(region->getSimProductName()); -	} -	 +	region_landtype->setText(region->getLocalizedSimProductName());  	// let the parent class handle the general data collection.   	bool rv = LLPanelRegionInfo::refreshFromRegion(region); diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 1e9ce58237..ce8057eead 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -32,6 +32,7 @@  #include "llparcel.h"  #include "message.h" +#include "llexpandabletextbox.h"  #include "lliconctrl.h"  #include "lllineeditor.h"  #include "lltextbox.h" @@ -227,6 +228,34 @@ void LLPanelPlaceProfile::setInfoType(EInfoType type)  	getChild<LLAccordionCtrl>("advanced_info_accordion")->setVisible(is_info_type_agent); +	// If we came from search we want larger description area, approx. 10 lines (see STORM-1311). +	// Don't use the maximum available space because that leads to nasty artifacts +	// in text editor and expandable text box. +	{ +		const S32 SEARCH_DESC_HEIGHT = 150; + +		// Remember original geometry (once). +		static const S32 sOrigDescVPad = getChildView("parcel_title")->getRect().mBottom - mDescEditor->getRect().mTop; +		static const S32 sOrigDescHeight = mDescEditor->getRect().getHeight(); +		static const S32 sOrigMRIconVPad = mDescEditor->getRect().mBottom - mMaturityRatingIcon->getRect().mTop; +		static const S32 sOrigMRTextVPad = mDescEditor->getRect().mBottom - mMaturityRatingText->getRect().mTop; + +		// Resize the description. +		const S32 desc_height = is_info_type_agent ? sOrigDescHeight : SEARCH_DESC_HEIGHT; +		const S32 desc_top = getChildView("parcel_title")->getRect().mBottom - sOrigDescVPad; +		LLRect desc_rect = mDescEditor->getRect(); +		desc_rect.setOriginAndSize(desc_rect.mLeft, desc_top - desc_height, desc_rect.getWidth(), desc_height); +		mDescEditor->reshape(desc_rect.getWidth(), desc_rect.getHeight()); +		mDescEditor->setRect(desc_rect); +		mDescEditor->updateTextShape(); + +		// Move the maturity rating icon/text accordingly. +		const S32 mr_icon_bottom = mDescEditor->getRect().mBottom - sOrigMRIconVPad - mMaturityRatingIcon->getRect().getHeight(); +		const S32 mr_text_bottom = mDescEditor->getRect().mBottom - sOrigMRTextVPad - mMaturityRatingText->getRect().getHeight(); +		mMaturityRatingIcon->setOrigin(mMaturityRatingIcon->getRect().mLeft, mr_icon_bottom); +		mMaturityRatingText->setOrigin(mMaturityRatingText->getRect().mLeft, mr_text_bottom); +	} +  	switch(type)  	{  		case AGENT: @@ -434,7 +463,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel,  	}  	mRegionNameText->setText(region->getName()); -	mRegionTypeText->setText(region->getSimProductName()); +	mRegionTypeText->setText(region->getLocalizedSimProductName());  	// Determine parcel owner  	if (parcel->isPublic()) diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index bb7170e0f7..d4e0831c33 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -558,6 +558,11 @@ const std::string LLViewerRegion::getSimAccessString() const  	return accessToString(mSimAccess);  } +std::string LLViewerRegion::getLocalizedSimProductName() const +{ +	std::string localized_spn; +	return LLTrans::findString(localized_spn, mProductName) ? localized_spn : mProductName; +}  // static  std::string LLViewerRegion::regionFlagsToString(U32 flags) diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h index f68b51ea65..a105ff625d 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -192,7 +192,7 @@ public:  	S32 getSimCPURatio()                   const { return mCPURatio; }  	const std::string& getSimColoName()    const { return mColoName; }  	const std::string& getSimProductSKU()  const { return mProductSKU; } -	const std::string& getSimProductName() const { return mProductName; } +	std::string getLocalizedSimProductName() const;  	// Returns "Sandbox", "Expensive", etc.  	static std::string regionFlagsToString(U32 flags); diff --git a/indra/newview/skins/default/xui/da/panel_places.xml b/indra/newview/skins/default/xui/da/panel_places.xml index fe8ca69f34..c555f2fb09 100644 --- a/indra/newview/skins/default/xui/da/panel_places.xml +++ b/indra/newview/skins/default/xui/da/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Vis flere valg"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Profil" name="profile_btn" tool_tip="Vis profil for sted"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/de/panel_places.xml b/indra/newview/skins/default/xui/de/panel_places.xml index 36c77d4fe1..602ffff94d 100644 --- a/indra/newview/skins/default/xui/de/panel_places.xml +++ b/indra/newview/skins/default/xui/de/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Zusätzliche Optionen anzeigen"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Profil" name="profile_btn" tool_tip="Ortsprofil anzeigen"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index daf571297f..b6b8a337a1 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -234,7 +234,7 @@ background_visible="true"  				height="23"  				layout="topleft"  				mouse_opaque="false" -				name="bottom_bar_ls3" +				name="bottom_bar_profile_ls"  				left="0"  				orientation="horizontal"  				top="0" diff --git a/indra/newview/skins/default/xui/es/panel_places.xml b/indra/newview/skins/default/xui/es/panel_places.xml index 4c90a7e6b4..e9984b4512 100644 --- a/indra/newview/skins/default/xui/es/panel_places.xml +++ b/indra/newview/skins/default/xui/es/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Ver más opciones"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Perfil" name="profile_btn" tool_tip="Mostrar el perfil del lugar"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/fr/panel_places.xml b/indra/newview/skins/default/xui/fr/panel_places.xml index e252c224f8..509d167704 100644 --- a/indra/newview/skins/default/xui/fr/panel_places.xml +++ b/indra/newview/skins/default/xui/fr/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Afficher d'autres options"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Profil" name="profile_btn" tool_tip="Afficher le profil de l'endroit"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/it/panel_places.xml b/indra/newview/skins/default/xui/it/panel_places.xml index 61830f186f..69995fb5de 100644 --- a/indra/newview/skins/default/xui/it/panel_places.xml +++ b/indra/newview/skins/default/xui/it/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Mostra ulteriori opzioni"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Profilo" name="profile_btn" tool_tip="Mostra il profilo del luogo"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/ja/panel_places.xml b/indra/newview/skins/default/xui/ja/panel_places.xml index e19b86e552..9d3925afdc 100644 --- a/indra/newview/skins/default/xui/ja/panel_places.xml +++ b/indra/newview/skins/default/xui/ja/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="オプションを表示します"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="プロフィール" name="profile_btn" tool_tip="場所のプロフィールを表示"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/pl/panel_places.xml b/indra/newview/skins/default/xui/pl/panel_places.xml index 34c105225d..d69d137d23 100644 --- a/indra/newview/skins/default/xui/pl/panel_places.xml +++ b/indra/newview/skins/default/xui/pl/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Pokaż opcje dodatkowe"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Profil" name="profile_btn" tool_tip="Pokaż profil miejsca"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/pt/panel_places.xml b/indra/newview/skins/default/xui/pt/panel_places.xml index 828ef3e469..69f0baf65f 100644 --- a/indra/newview/skins/default/xui/pt/panel_places.xml +++ b/indra/newview/skins/default/xui/pt/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button label="▼" name="overflow_btn" tool_tip="Mostrar opções adicionais"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="Perfil" name="profile_btn" tool_tip="Mostrar perfil do lugar"/>  					</layout_panel> diff --git a/indra/newview/skins/default/xui/zh/panel_places.xml b/indra/newview/skins/default/xui/zh/panel_places.xml index c141201ab2..6434a7279c 100644 --- a/indra/newview/skins/default/xui/zh/panel_places.xml +++ b/indra/newview/skins/default/xui/zh/panel_places.xml @@ -24,7 +24,7 @@  						<menu_button name="overflow_btn" tool_tip="顯示額外選項"/>  					</layout_panel>  				</layout_stack> -				<layout_stack name="bottom_bar_ls3"> +				<layout_stack name="bottom_bar_profile_ls">  					<layout_panel name="profile_btn_lp">  						<button label="檔案" name="profile_btn" tool_tip="顯示地點檔案"/>  					</layout_panel> | 
