diff options
| author | James Cook <james@lindenlab.com> | 2009-12-08 16:14:24 -0800 | 
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2009-12-08 16:14:24 -0800 | 
| commit | 85272b3d69b981329143cf40a28022a903a0ae9d (patch) | |
| tree | 89a2c6f288d6ba2d9bc41bd8767cc63618537950 | |
| parent | ae493ad72ffb6b5272cfb636a76a516a784e67f1 (diff) | |
| parent | 2fb6e2629bad808d50ee901c5dbdf2f1b71cc253 (diff) | |
Merge with Lis and Leyla' stuff
| -rw-r--r-- | indra/llui/lltextbase.cpp | 14 | ||||
| -rw-r--r-- | indra/llui/lltextbase.h | 8 | ||||
| -rw-r--r-- | indra/llui/lluiimage.cpp | 36 | ||||
| -rw-r--r-- | indra/llui/lluiimage.h | 9 | ||||
| -rw-r--r-- | indra/newview/llviewertexturelist.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/textures/textures.xml | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_notices.xml | 15 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_roles.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_main_inventory.xml | 9 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_preferences_sound.xml | 97 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 4 | 
11 files changed, 131 insertions, 68 deletions
| diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index e0750968ae..2a9515171a 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -2207,6 +2207,12 @@ LLNormalTextSegment::LLNormalTextSegment( const LLStyleSP& style, S32 start, S32  	mEditor(editor)  {  	mFontHeight = llceil(mStyle->getFont()->getLineHeight()); + +	LLUIImagePtr image = mStyle->getImage(); +	if (image.notNull()) +	{ +		mImageLoadedConnection = image->addLoadedCallback(boost::bind(&LLTextBase::needsReflow, &mEditor)); +	}  }  LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible)  @@ -2219,6 +2225,12 @@ LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32  	mFontHeight = llceil(mStyle->getFont()->getLineHeight());  } +LLNormalTextSegment::~LLNormalTextSegment() +{ +	mImageLoadedConnection.disconnect(); +} + +  F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRect& draw_rect)  {  	if( end - start > 0 ) @@ -2232,7 +2244,7 @@ F32 LLNormalTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selec  			// Center the image vertically  			S32 image_bottom = draw_rect.getCenterY() - (style_image_height/2);  			image->draw(draw_rect.mLeft, image_bottom,  -				style_image_width, style_image_height); +				style_image_width, style_image_height, color);  		}  		return drawClippedSegment( getStart() + start, getStart() + end, selection_start, selection_end, draw_rect); diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index c60b040655..0138ca3704 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -136,7 +136,6 @@ public:  	// TODO: move into LLTextSegment?  	void					createUrlContextMenu(S32 x, S32 y, const std::string &url); // create a popup context menu for the given Url -  	// Text accessors  	// TODO: add optional style parameter  	virtual void			setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style @@ -148,6 +147,8 @@ public:  	LLWString       		getWText() const;  	void					appendText(const std::string &new_text, bool prepend_newline, const LLStyle::Params& input_params = LLStyle::Params()); +	// force reflow of text +	void					needsReflow() { mReflowNeeded = TRUE; }  	S32						getLength() const { return getWText().length(); }  	S32						getLineCount() const { return mLineInfoList.size(); } @@ -162,7 +163,6 @@ public:  	S32						getVPad() { return mVPad; }  	S32						getHPad() { return mHPad; } -  	S32						getDocIndexFromLocalCoord( S32 local_x, S32 local_y, BOOL round ) const;  	LLRect					getLocalRectFromDocIndex(S32 pos) const;  	LLRect					getDocRectFromDocIndex(S32 pos) const; @@ -180,6 +180,7 @@ public:  	void					changePage( S32 delta );  	void					changeLine( S32 delta ); +  	const LLFontGL*			getDefaultFont() const					{ return mDefaultFont; }  public: @@ -303,7 +304,6 @@ protected:  	// misc  	void							updateRects(); -	void							needsReflow() { mReflowNeeded = TRUE; }  	void							needsScroll() { mScrollNeeded = TRUE; }  	void							replaceUrlLabel(const std::string &url, const std::string &label); @@ -426,6 +426,7 @@ class LLNormalTextSegment : public LLTextSegment  public:  	LLNormalTextSegment( const LLStyleSP& style, S32 start, S32 end, LLTextBase& editor );  	LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE); +	~LLNormalTextSegment();  	/*virtual*/ bool				getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;  	/*virtual*/ S32					getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const; @@ -457,6 +458,7 @@ protected:  	S32					mFontHeight;  	LLKeywordToken* 	mToken;  	std::string     	mTooltip; +	boost::signals2::connection mImageLoadedConnection;  };  class LLIndexSegment : public LLTextSegment diff --git a/indra/llui/lluiimage.cpp b/indra/llui/lluiimage.cpp index a8683e55c3..f941f391eb 100644 --- a/indra/llui/lluiimage.cpp +++ b/indra/llui/lluiimage.cpp @@ -39,18 +39,20 @@  #include "lluiimage.h"  #include "llui.h" -LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image) : -						mName(name), -						mImage(image), -						mScaleRegion(0.f, 1.f, 1.f, 0.f), -						mClipRegion(0.f, 1.f, 1.f, 0.f), -						mUniformScaling(TRUE), -						mNoClip(TRUE) +LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image) +:	mName(name), +	mImage(image), +	mScaleRegion(0.f, 1.f, 1.f, 0.f), +	mClipRegion(0.f, 1.f, 1.f, 0.f), +	mUniformScaling(TRUE), +	mNoClip(TRUE), +	mImageLoaded(NULL)  {  }  LLUIImage::~LLUIImage()  { +	delete mImageLoaded;  }  void LLUIImage::setClipRegion(const LLRectf& region)  @@ -138,6 +140,25 @@ S32 LLUIImage::getTextureHeight() const  	return mImage->getHeight(0);  } +boost::signals2::connection LLUIImage::addLoadedCallback( const image_loaded_signal_t::slot_type& cb )  +{ +	if (!mImageLoaded)  +	{ +		mImageLoaded = new image_loaded_signal_t(); +	} +	return mImageLoaded->connect(cb); +} + + +void LLUIImage::onImageLoaded() +{ +	if (mImageLoaded) +	{ +		(*mImageLoaded)(); +	} +} + +  namespace LLInitParam  {  	LLUIImage* TypedParam<LLUIImage*>::getValueFromBlock() const @@ -170,3 +191,4 @@ namespace LLInitParam  			return (a == b);  	}  } + diff --git a/indra/llui/lluiimage.h b/indra/llui/lluiimage.h index 9d734bcfdf..5fa9610ab2 100644 --- a/indra/llui/lluiimage.h +++ b/indra/llui/lluiimage.h @@ -39,6 +39,7 @@  #include "llrefcount.h"  #include "llrect.h"  #include <boost/function.hpp> +#include <boost/signals2.hpp>  #include "llinitparam.h"  #include "lltexture.h" @@ -47,6 +48,8 @@ extern const LLColor4 UI_VERTEX_COLOR;  class LLUIImage : public LLRefCount  {  public: +	typedef boost::signals2::signal<void (void)> image_loaded_signal_t; +  	LLUIImage(const std::string& name, LLPointer<LLTexture> image);  	virtual ~LLUIImage(); @@ -77,7 +80,13 @@ public:  	S32 getTextureWidth() const;  	S32 getTextureHeight() const; +	boost::signals2::connection addLoadedCallback( const image_loaded_signal_t::slot_type& cb ); + +	void onImageLoaded(); +  protected: +	image_loaded_signal_t* mImageLoaded; +  	std::string			mName;  	LLRectf				mScaleRegion;  	LLRectf				mClipRegion; diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 5be7f2945f..e066546bd8 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1454,6 +1454,8 @@ void LLUIImageList::onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_v  						llclamp((F32)scale_rect.mRight / (F32)imagep->getWidth(), 0.f, 1.f),  						llclamp((F32)scale_rect.mBottom / (F32)imagep->getHeight(), 0.f, 1.f)));  			} + +			imagep->onImageLoaded();  		}  	}  } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index e7579ec653..607df10048 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -57,6 +57,9 @@ with the same filename but different name    <texture name="Arrow_Small_Left" file_name="widgets/Arrow_Small_Left.png" preload="true" />    <texture name="Arrow_Small_Right" file_name="widgets/Arrow_Small_Right.png" preload="true" /> +  <texture name="Arrow_Down" file_name="widgets/Arrow_Down.png"	preload="true" /> +  <texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" /> +    <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" />    <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" />    <texture name="AudioMute_Press" file_name="icons/AudioMute_Press.png" preload="false" /> 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 0dea81eefe..1b70b95a93 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notices.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notices.xml @@ -10,11 +10,9 @@   width="310">      <panel.string       name="help_text"> -        Notices let you send a message and -an optionally attached item. Notices only go to -group members in Roles with the ability to -receive Notices. You can turn off Notices on -the General tab. +        Notices let you send a message and an optionally attached item. +Notices only go to group members in Roles with the ability to receive Notices. +You can turn off Notices on the General tab.      </panel.string>      <panel.string       name="no_notices_text"> @@ -31,7 +29,7 @@ the General tab.       name="lbl2"       top="5"       width="300"> -     Notices are kept for 14 days +     Notices are kept for 14 days.  Maximum 200 per group daily      </text>      <scroll_list @@ -93,6 +91,7 @@ Maximum 200 per group daily       layout="topleft"       name="refresh_notices"       right="-5" +     tool_tip="Refresh list of notices"       top_delta="0"       width="23" />      <panel @@ -192,7 +191,7 @@ Maximum 200 per group daily           top_pad="15"           word_wrap="true"           width="150"> -            Drag here to attach something -- > +            Drag and drop item here to attach it:          </text>          <icon           height="72" @@ -228,7 +227,7 @@ Maximum 200 per group daily           left="10"           layout="topleft"           name="drop_target" -         tool_tip="Drag an inventory item onto the message box to send it with the notice. You must have permission to copy and transfer the object to send it with the notice." +         tool_tip="Drag an inventory item onto this target box to send it with this notice. You must have permission to copy and transfer the item in order to attach it."           width="280" />     </panel>      <panel diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index a5bab3232c..9548119d58 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -258,7 +258,7 @@ things in this group. There's a broad variety of Abilities.           name="static"           top_pad="5"           width="300"> -            Assigned Roles +            Assigned Members          </text>          <scroll_list           draw_stripes="true" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 37d59de66f..aeb28e4c60 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -30,13 +30,16 @@       layout="topleft"       left_delta="-4"       name="inventory filter tabs" +     tab_min_width="70" +     tab_height="30"       tab_position="top" -     top_pad="4" +     top_pad="10" +     halign="center"       width="305">          <inventory_panel           follows="left|top|right|bottom"           height="295" -         label="All Items" +         label="ALL ITEMS"           layout="topleft"           left="1"           name="All Items" @@ -45,7 +48,7 @@          <inventory_panel           follows="left|top|right|bottom"           height="295" -         label="Recent Items" +         label="RECENT ITEMS"           layout="topleft"           left_delta="0"           name="Recent Items" diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index 214e39614e..854227619b 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -23,7 +23,7 @@       name="System Volume"       show_text="false"       slider_label.halign="right" -     top_pad="5" +     top="10"       volume="true"       width="350">          <slider.commit_callback @@ -230,12 +230,13 @@       width="22" />     <check_box       label_text.halign="left" -     follows="right|top" -    height="16" -    control_name ="EnableVoiceChat" -   disabled_control="CmdLineDisableVoice" -     label="Voice" -     left="50" +     follows="left|top" +     height="16" +     control_name ="EnableVoiceChat" +     disabled_control="CmdLineDisableVoice" +     label="Enable voice" +     layout="topleft" +     left="28"       name="enable_voice_check"       top_pad="5"       width="110" @@ -249,15 +250,16 @@       height="15"       increment="0.05"       initial_value="0.5" -     label_width="0" +     label="Voice" +     label_width="160"       layout="topleft" -     left="165" -     top_delta="0" +     left="0" +     top_delta="20"       name="Voice Volume"       show_text="false"       slider_label.halign="right"       volume="true" -     width="185"> +     width="350">          <slider.commit_callback           function="Pref.setControlFalse"           parameter="MuteVoice" /> @@ -283,63 +285,70 @@       follows="left|top"       height="13"       layout="topleft" -     left="170" +     left="30"       name="Listen from" -     width="200"> +     width="200" +     top="205">          Listen from:      </text>      <icon -	 follows="left" +	 follows="left|top"  	 height="18"  	 image_name="Cam_FreeCam_Off" +         layout="topleft"  	 name="camera_icon"  	 mouse_opaque="false"  	 visible="true" -	 width="18" /> +	 width="18" +         left="80" +         top="219"/>  	<icon -	 follows="left" +	 follows="left|top"  	 height="18"  	 image_name="Move_Walk_Off" +         layout="topleft"  	 name="avatar_icon"  	 mouse_opaque="false"  	 visible="true" -	 width="18" /> +	 width="18" +         top="239" +         left="80" +         />     <radio_group       enabled_control="EnableVoiceChat"       control_name="VoiceEarLocation"       draw_border="false" -	 follows="left" -     left_delta="20" -	 top = "210" -	 width="221" -	 height="38" -     name="ear_location"> -        <radio_item -         height="16" -         label="Camera position" -         left_pad="1" -	follows="topleft" -         name="0" -         top_delta="-30" -         width="200" /> -        <radio_item -         height="16" -	follows="topleft" -         label="Avatar position" -         left_delta="0" -         name="1" -         top_delta="19" -         width="200" /> -    </radio_group> +     follows="left|top" +     layout="topleft" +     left="100" +     width="221" +     height="38" +     name="ear_location" +     top="218"> +    <radio_item +     height="16" +     label="Camera position" +     follows="left|top" +     layout="topleft" +     name="0" +     width="200"/> +    <radio_item +     height="16" +     follows="left|top" +     label="Avatar position" +     layout="topleft" +     name="1" +     width="200" /> +   </radio_group>    <button     control_name="ShowDeviceSettings" -   follows="left|bottom" +   follows="left|top"     height="19"     is_toggle="true" -   label="Input/Output Devices" +   label="Input/Output devices"     layout="topleft" -   left="165" -   top_pad="12" +   left="30" +   top="270"     name="device_settings_btn"     width="190">    </button> diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3b32912fbf..7fafa63e57 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -1770,7 +1770,8 @@ Clears (deletes) the media and all params from the given face.  	<string name="tattoo">Tattoo</string>  	<string name="invalid">invalid</string> -	<!-- notify --> +	<!-- LLGroupNotify --> +	<!-- used in the construction of a Group Notice blue dialog box, buttons, tooltip etc. Seems to be no longer utilized by code in Viewer 2.0 -->  	<string name="next">Next</string>  	<string name="ok">OK</string>  	<string name="GroupNotifyGroupNotice">Group Notice</string> @@ -1780,6 +1781,7 @@ Clears (deletes) the media and all params from the given face.  	<string name="GroupNotifyViewPastNotices">View past notices or opt-out of receiving these messages here.</string>  	<string name="GroupNotifyOpenAttachment">Open Attachment</string>  	<string name="GroupNotifySaveAttachment">Save Attachment</string> +    <string name="TeleportOffer">Teleport offering</string>    <!-- start-up toast's string-->    <string name="StartUpNotifications">New notifications arrived while you were away.</string> | 
