diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llchatbar.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llimpanel.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llsidetray.cpp | 11 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llvosky.h | 6 | 
5 files changed, 20 insertions, 9 deletions
diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 7d82ec3a71..d251931eca 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -126,7 +126,7 @@ BOOL LLChatBar::postBuild()  	mInputEditor->setPassDelete(TRUE);  	mInputEditor->setReplaceNewlinesWithSpaces(FALSE); -	mInputEditor->setMaxTextLength(1023); +	mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN);  	mInputEditor->setEnableLineHistory(TRUE);  	mIsBuilt = TRUE; @@ -569,8 +569,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL  	S32 channel = 0;  	LLWString out_text = stripChannelNumber(wtext, &channel);  	std::string utf8_out_text = wstring_to_utf8str(out_text); -	std::string utf8_text = wstring_to_utf8str(wtext); +	if (!utf8_out_text.empty()) +	{ +		utf8_out_text = utf8str_truncate(utf8_out_text, MAX_MSG_STR_LEN); +	} +	std::string utf8_text = wstring_to_utf8str(wtext);  	utf8_text = utf8str_trim(utf8_text);  	if (!utf8_text.empty())  	{ diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 5f7d1a2ffa..b3b0c93b99 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -168,7 +168,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label,  	LLUICtrlFactory::getInstance()->buildFloater(this, xml_filename, NULL);  	setTitle(mSessionLabel); -	mInputEditor->setMaxTextLength(1023); +	mInputEditor->setMaxTextLength(DB_IM_MSG_STR_LEN);  	// enable line history support for instant message bar  	mInputEditor->setEnableLineHistory(TRUE); diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp index 88e37b815f..b0914eee69 100644 --- a/indra/newview/llsidetray.cpp +++ b/indra/newview/llsidetray.cpp @@ -762,8 +762,15 @@ bool LLSideTray::removeTab(LLSideTrayTab* tab)  	// Deselect the tab.  	if (mActiveTab == tab)  	{ -		child_vector_iter_t next_tab_it = -				(tab_it < (mTabs.end() - 1)) ? tab_it + 1 : mTabs.begin(); +		// Select the next tab (or first one, if we're removing the last tab), +		// skipping the fake open/close tab (STORM-155). +		child_vector_iter_t next_tab_it = tab_it; +		do +		{ +			next_tab_it = (next_tab_it < (mTabs.end() - 1)) ? next_tab_it + 1 : mTabs.begin(); +		} +		while ((*next_tab_it)->getName() == "sidebar_openclose"); +  		selectTabByName((*next_tab_it)->getName(), true); // Don't hide the tab being removed.  	} diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index cab6fbdc93..46d8f65d23 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -176,7 +176,7 @@ const F32 TIME_BEFORE_MESH_CLEANUP = 5.f; // seconds  const S32 AVATAR_RELEASE_THRESHOLD = 10; // number of avatar instances before releasing memory  const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f;  const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f; -const S32 MAX_BUBBLE_CHAT_LENGTH = 1023; +const S32 MAX_BUBBLE_CHAT_LENGTH = DB_CHAT_MSG_STR_LEN;  const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;  const F32 CHAT_FADE_TIME = 8.0;  const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 0ac6b9117b..6b3e7873a1 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -139,10 +139,10 @@ protected:  	~LLSkyTex(); -	static S32 getResolution()						{ return sResolution; } +	static S32 getResolution()					{ return sResolution; }  	static S32 getCurrent()						{ return sCurrent; } -	static S32 stepCurrent()					{ return (sCurrent = (sCurrent + 1) % 2); } -	static S32 getNext()						{ return ((sCurrent+1) % 2); } +	static S32 stepCurrent()					{ sCurrent++; sCurrent &= 1; return sCurrent; } +	static S32 getNext()						{ return ((sCurrent+1) & 1); }  	static S32 getWhich(const BOOL curr)		{ return curr ? sCurrent : getNext(); }  	void initEmpty(const S32 tex);  | 
