diff options
author | Mm Alder | 2010-01-03 15:00:06 -0500 |
---|---|---|
committer | Mm Alder | 2010-01-03 15:00:06 -0500 |
commit | 1c28af54addf5673f06cb2e992ccbe1173a0509b (patch) | |
tree | 430e32dd98c3a20a5de1b9ca5d2fd48631c82d58 /linden/indra | |
parent | VWR-4232 Some particles don't disappear when UI is hidden (diff) | |
download | meta-impy-1c28af54addf5673f06cb2e992ccbe1173a0509b.zip meta-impy-1c28af54addf5673f06cb2e992ccbe1173a0509b.tar.gz meta-impy-1c28af54addf5673f06cb2e992ccbe1173a0509b.tar.bz2 meta-impy-1c28af54addf5673f06cb2e992ccbe1173a0509b.tar.xz |
SNOW-376 Clean up handling of the maximum length of chat messages
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llchatbar.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/llimpanel.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/llvoavatar.cpp | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp index 44d1ad1..1146c44 100644 --- a/linden/indra/newview/llchatbar.cpp +++ b/linden/indra/newview/llchatbar.cpp | |||
@@ -154,7 +154,7 @@ BOOL LLChatBar::postBuild() | |||
154 | mInputEditor->setPassDelete(TRUE); | 154 | mInputEditor->setPassDelete(TRUE); |
155 | mInputEditor->setReplaceNewlinesWithSpaces(FALSE); | 155 | mInputEditor->setReplaceNewlinesWithSpaces(FALSE); |
156 | 156 | ||
157 | mInputEditor->setMaxTextLength(1023); | 157 | mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN); |
158 | mInputEditor->setEnableLineHistory(TRUE); | 158 | mInputEditor->setEnableLineHistory(TRUE); |
159 | } | 159 | } |
160 | 160 | ||
@@ -624,8 +624,12 @@ void LLChatBar::sendChatFromViewer(const LLWString &wtext, EChatType type, BOOL | |||
624 | 624 | ||
625 | LLWString out_text = stripChannelNumber(wtext, &channel); | 625 | LLWString out_text = stripChannelNumber(wtext, &channel); |
626 | std::string utf8_out_text = wstring_to_utf8str(out_text); | 626 | std::string utf8_out_text = wstring_to_utf8str(out_text); |
627 | std::string utf8_text = wstring_to_utf8str(wtext); | 627 | if (!utf8_out_text.empty()) |
628 | { | ||
629 | utf8_out_text = utf8str_truncate(utf8_out_text, MAX_MSG_STR_LEN); | ||
630 | } | ||
628 | 631 | ||
632 | std::string utf8_text = wstring_to_utf8str(wtext); | ||
629 | utf8_text = utf8str_trim(utf8_text); | 633 | utf8_text = utf8str_trim(utf8_text); |
630 | if (!utf8_text.empty()) | 634 | if (!utf8_text.empty()) |
631 | { | 635 | { |
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index a5950ce..326694a 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -1197,7 +1197,7 @@ void LLFloaterIMPanel::init(const std::string& session_label) | |||
1197 | 1197 | ||
1198 | setTitle(mSessionLabel); | 1198 | setTitle(mSessionLabel); |
1199 | 1199 | ||
1200 | mInputEditor->setMaxTextLength(1023); | 1200 | mInputEditor->setMaxTextLength(DB_IM_MSG_STR_LEN); |
1201 | // enable line history support for instant message bar | 1201 | // enable line history support for instant message bar |
1202 | mInputEditor->setEnableLineHistory(TRUE); | 1202 | mInputEditor->setEnableLineHistory(TRUE); |
1203 | 1203 | ||
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 7e1c6ca..afee0a1 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -169,7 +169,7 @@ const F32 TIME_BEFORE_MESH_CLEANUP = 5.f; // seconds | |||
169 | const S32 AVATAR_RELEASE_THRESHOLD = 10; // number of avatar instances before releasing memory | 169 | const S32 AVATAR_RELEASE_THRESHOLD = 10; // number of avatar instances before releasing memory |
170 | const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f; | 170 | const F32 FOOT_GROUND_COLLISION_TOLERANCE = 0.25f; |
171 | const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f; | 171 | const F32 AVATAR_LOD_TWEAK_RANGE = 0.7f; |
172 | const S32 MAX_BUBBLE_CHAT_LENGTH = 1023; | 172 | const S32 MAX_BUBBLE_CHAT_LENGTH = DB_CHAT_MSG_STR_LEN; |
173 | const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12; | 173 | const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12; |
174 | const F32 CHAT_FADE_TIME = 8.0; | 174 | const F32 CHAT_FADE_TIME = 8.0; |
175 | const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; | 175 | const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f; |