diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 96 | ||||
| -rw-r--r-- | indra/llui/llflatlistview.h | 6 | ||||
| -rw-r--r-- | indra/llui/llview.h | 2 | ||||
| -rw-r--r-- | indra/newview/llchathistory.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llchathistory.h | 1 | ||||
| -rw-r--r-- | indra/newview/llchatitemscontainerctrl.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/llnearbychathandler.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llpanelgroupnotices.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_my_profile.xml | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_picks.xml | 5 | 
11 files changed, 116 insertions, 58 deletions
| diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index f4a5f1c990..d4c3cfb7b6 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -689,6 +689,17 @@ LLRect LLFlatListView::getSelectedItemsRect()  	return rc;  } +void LLFlatListView::selectFirstItem	() +{ +	selectItemPair(mItemPairs.front(), true); +} + +void LLFlatListView::selectLastItem		() +{ +	selectItemPair(mItemPairs.back(), true); +} + +  // virtual  bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selection)  { @@ -696,53 +707,53 @@ bool LLFlatListView::selectNextItemPair(bool is_up_direction, bool reset_selecti  	if ( !mItemPairs.size() )  		return false; -	item_pair_t* cur_sel_pair = NULL; +	  	item_pair_t* to_sel_pair = NULL; - +	item_pair_t* cur_sel_pair = NULL;  	if ( mSelectedItemPairs.size() )  	{  		// Take the last selected pair  		cur_sel_pair = mSelectedItemPairs.back(); -	} -	else -	{ -		// If there weren't selected items then choose the first one bases on given direction -		cur_sel_pair = (is_up_direction) ? mItemPairs.back() : mItemPairs.front(); -		// Force selection to first item -		to_sel_pair = cur_sel_pair; -	} - -	// Bases on given direction choose next item to select -	if ( is_up_direction ) -	{ -		// Find current selected item position in mItemPairs list -		pairs_list_t::reverse_iterator sel_it = std::find(mItemPairs.rbegin(), mItemPairs.rend(), cur_sel_pair); - -		for (;++sel_it != mItemPairs.rend();) +		// Bases on given direction choose next item to select +		if ( is_up_direction )  		{ -			// skip invisible items -			if ( (*sel_it)->first->getVisible() ) +			// Find current selected item position in mItemPairs list +			pairs_list_t::reverse_iterator sel_it = std::find(mItemPairs.rbegin(), mItemPairs.rend(), cur_sel_pair); + +			for (;++sel_it != mItemPairs.rend();)  			{ -				to_sel_pair = *sel_it; -				break; +				// skip invisible items +				if ( (*sel_it)->first->getVisible() ) +				{ +					to_sel_pair = *sel_it; +					break; +				}  			}  		} -	} -	else -	{ -		// Find current selected item position in mItemPairs list -		pairs_list_t::iterator sel_it = std::find(mItemPairs.begin(), mItemPairs.end(), cur_sel_pair); - -		for (;++sel_it != mItemPairs.end();) +		else  		{ -			// skip invisible items -			if ( (*sel_it)->first->getVisible() ) +			// Find current selected item position in mItemPairs list +			pairs_list_t::iterator sel_it = std::find(mItemPairs.begin(), mItemPairs.end(), cur_sel_pair); + +			for (;++sel_it != mItemPairs.end();)  			{ -				to_sel_pair = *sel_it; -				break; +				// skip invisible items +				if ( (*sel_it)->first->getVisible() ) +				{ +					to_sel_pair = *sel_it; +					break; +				}  			}  		}  	} +	else +	{ +		// If there weren't selected items then choose the first one bases on given direction +		cur_sel_pair = (is_up_direction) ? mItemPairs.back() : mItemPairs.front(); +		// Force selection to first item +		to_sel_pair = cur_sel_pair; +	} +  	if ( to_sel_pair )  	{ @@ -920,4 +931,23 @@ void LLFlatListView::onFocusLost()  	mSelectedItemsBorder->setVisible(FALSE);  } +//virtual  +void LLFlatListView::notify(const LLSD& info) +{ +	if(info.has("action")) +	{ +		std::string str_action = info["action"]; +		if(str_action == "select_first") +		{ +			setFocus(true); +			selectFirstItem(); +		} +		else if(str_action == "select_last") +		{ +			setFocus(true); +			selectLastItem(); +		} +	} +} +  //EOF diff --git a/indra/llui/llflatlistview.h b/indra/llui/llflatlistview.h index 3867e910c0..9e1e0f90fc 100644 --- a/indra/llui/llflatlistview.h +++ b/indra/llui/llflatlistview.h @@ -279,6 +279,12 @@ public:  	bool updateValue(const LLSD& old_value, const LLSD& new_value); + +	void selectFirstItem	(); +	void selectLastItem		(); + +	virtual void	notify(const LLSD& info) ; +  protected:  	/** Pairs LLpanel representing a single item LLPanel and LLSD associated with it */ diff --git a/indra/llui/llview.h b/indra/llui/llview.h index d485244a05..c611e4c85f 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -514,6 +514,8 @@ public:  	virtual void	notifyParent(const LLSD& info);  	virtual void	notifyChildren(const LLSD& info); +	virtual void	notify(const LLSD& info) {}; +  	static const LLViewDrawContext& getDrawContext();  protected: diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5e17770314..5f1bbc7615 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -355,6 +355,7 @@ void LLChatHistory::clear()  {  	mLastFromName.clear();  	LLTextEditor::clear(); +	mLastFromID = LLUUID::null;  }  void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params) @@ -389,9 +390,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_  		LLDate new_message_time = LLDate::now(); -		if (mLastFromName == chat.mFromName &&  -			mLastMessageTime.notNull() && -			(new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0 ) +		if (mLastFromName == chat.mFromName  +			&& mLastFromID == chat.mFromID +			&& mLastMessageTime.notNull()  +			&& (new_message_time.secondsSinceEpoch() - mLastMessageTime.secondsSinceEpoch()) < 60.0  +			)  		{  			view = getSeparator();  			p.top_pad = mTopSeparatorPad; @@ -419,6 +422,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_  		appendWidget(p, header_text, false);  		mLastFromName = chat.mFromName; +		mLastFromID = chat.mFromID;  		mLastMessageTime = new_message_time;  	}  	//Handle IRC styled /me messages. diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index d2cfa53d8b..8ca7dd1d58 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -114,6 +114,7 @@ class LLChatHistory : public LLTextEditor  	private:  		std::string mLastFromName; +		LLUUID mLastFromID;  		LLDate mLastMessageTime;  		std::string mMessageHeaderFilename;  		std::string mMessageSeparatorFilename; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index efdaff3f6a..92df281307 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -122,7 +122,6 @@ void LLNearbyChatToastPanel::addMessage(LLSD& notification)  		if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC)  		{ -			messageText = messageText.substr(3);  			style_params.font.style = "ITALIC";  		}  		else if( chat_type == CHAT_TYPE_SHOUT) @@ -208,7 +207,6 @@ void LLNearbyChatToastPanel::init(LLSD& notification)  		if(notification["chat_style"].asInteger()== CHAT_STYLE_IRC)  		{ -			messageText = messageText.substr(3);  			style_params.font.style = "ITALIC";  		}  		else if( chat_type == CHAT_TYPE_SHOUT) diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index ee3be0a5e3..18e5169930 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -54,10 +54,11 @@  #include "llstylemap.h"  #include "lldraghandle.h" -#include "lltrans.h" +  #include "llbottomtray.h"  #include "llnearbychatbar.h"  #include "llfloaterreg.h" +#include "lltrans.h"  static const S32 RESIZE_BAR_THICKNESS = 3; @@ -146,6 +147,7 @@ std::string appendTime()  	return timeStr;  } +  void	LLNearbyChat::addMessage(const LLChat& chat,bool archive)  {  	if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) @@ -167,18 +169,15 @@ void	LLNearbyChat::addMessage(const LLChat& chat,bool archive)  		}  	} +	LLChat& tmp_chat = const_cast<LLChat&>(chat); + +	if(tmp_chat.mTimeStr.empty()) +		tmp_chat.mTimeStr = appendTime(); +  	bool use_plain_text_chat_history = gSavedSettings.getBOOL("PlainTextChatHistory");  	if (!chat.mMuted)  	{ -		std::string message = chat.mText; - - -		LLChat& tmp_chat = const_cast<LLChat&>(chat); - -		if(tmp_chat.mTimeStr.empty()) -			tmp_chat.mTimeStr = appendTime(); -		  		if (chat.mChatStyle == CHAT_STYLE_IRC)  		{  			LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); @@ -191,17 +190,9 @@ void	LLNearbyChat::addMessage(const LLChat& chat,bool archive)  			append_style_params.readonly_color(txt_color);  			append_style_params.font.name(font_name);  			append_style_params.font.size(font_size); -			if (chat.mFromName.size() > 0) -			{ -				append_style_params.font.style = "ITALIC"; -				LLChat add_chat=chat; -				add_chat.mText = chat.mFromName + " "; -				mChatHistory->appendMessage(add_chat, use_plain_text_chat_history, append_style_params); -			} -			 -			message = message.substr(3);  			append_style_params.font.style = "ITALIC"; -			mChatHistory->appendText(message, FALSE, append_style_params); + +			mChatHistory->appendMessage(chat, use_plain_text_chat_history, append_style_params);  		}  		else  		{ diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index b0b6db682c..169560f688 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -318,6 +318,8 @@ void LLNearbyChatHandler::initChannel()  	mChannel->init(channel_right_bound - channel_width, channel_right_bound);  } + +  void LLNearbyChatHandler::processChat(const LLChat& chat_msg)  {  	if(chat_msg.mMuted == TRUE) @@ -327,6 +329,22 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg)  	if(chat_msg.mText.empty())  		return;//don't process empty messages + +	LLChat& tmp_chat = const_cast<LLChat&>(chat_msg); + +	if (tmp_chat.mChatStyle == CHAT_STYLE_IRC) +	{ +		if(!tmp_chat.mFromName.empty()) +			tmp_chat.mText = tmp_chat.mFromName + " " + tmp_chat.mText.substr(3); +		else +			tmp_chat.mText = tmp_chat.mText.substr(3); +	} +	 +	{ +		//sometimes its usefull to have no name at all... +		//if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) +		//	tmp_chat.mFromName = tmp_chat.mFromID.asString(); +	}  	LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD());  	nearby_chat->addMessage(chat_msg); diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 5834c50fbb..6210973dae 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -304,6 +304,9 @@ BOOL LLPanelGroupNotices::postBuild()  void LLPanelGroupNotices::activate()  { +	if(mNoticesList) +		mNoticesList->deleteAllItems(); +	  	BOOL can_send = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_SEND);  	BOOL can_receive = gAgent.hasPowerInGroup(mGroupID,GP_NOTICES_RECEIVE); diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index fe3e010cf9..3c87331199 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -416,6 +416,7 @@           left="10"           label="Edit Profile"           name="edit_profile_btn" +         tool_tip="Edit your personal information"           width="130" />          <button           follows="bottom|right" @@ -423,6 +424,7 @@           label="Edit Appearance"           left_pad="10"           name="edit_appearance_btn" +         tool_tip="Create/edit your appearance: physical data, clothes and etc."           right="-10"           width="130" />   </panel> diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 4c2bd67337..52bc72fe86 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -106,7 +106,7 @@               layout="topleft"               left_pad="15"               name="new_btn" -             tool_tip="Create new pick at current location" +             tool_tip="Create new pick or classified at current location"               top="5"               width="18" />              <button @@ -138,6 +138,7 @@           left="5"           name="info_btn"           tab_stop="false" +         tool_tip="Show pic information"           top="0"           width="55" />          <button @@ -149,6 +150,7 @@           left_pad="5"           name="teleport_btn"           tab_stop="false" +         tool_tip="Teleport to the corresponding area"           top="0"           width="77" />          <button @@ -160,6 +162,7 @@           left_pad="5"           name="show_on_map_btn"           tab_stop="false" +         tool_tip="Show corresponding area on the world map"           top="0"           width="50" />          </panel> | 
