From 39469edac48b64698e22edfa54b75457ad6bb19f Mon Sep 17 00:00:00 2001 From: Beeks Date: Mon, 23 Aug 2010 05:26:57 -0400 Subject: [PATCH] Handling for Command Line, fixes to OOC Completion (Still not in IM, sorry), tweaks to the preference menus in general. --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llchatbar.cpp | 65 ++++----- .../en-us/panel_preferences_ascent_system.xml | 136 +++++++++++++++++- .../en-us/panel_preferences_ascent_vanity.xml | 57 ++++++-- 4 files changed, 207 insertions(+), 53 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 98b231165..fe715f2d7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -128,7 +128,7 @@ AscentCmdLineClearChat Comment - Clear chat hsitory to stop lag from chat spam + Clear chat history to stop lag from chat spam Persist 1 Type diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 823f55238..59c5eb8d8 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -407,51 +407,38 @@ void LLChatBar::sendChat( EChatType type ) std::string utf8_revised_text; if (0 == channel) { + llinfos << "Checking for OOC handling" << llendl; if (gSavedSettings.getBOOL("AscentAutoCloseOOC")) { + llinfos << "OOC Handling occurring" << llendl; // Chalice - OOC autoclosing patch based on code by Henri Beauchamp int needsClosingType=0; + //Check if it needs the end-of-chat brackets -HgB if (utf8text.find("((") == 0 && utf8text.find("))") == -1) - needsClosingType=1; - else if(utf8text.find("[[") == 0 && utf8text.find("]]") == -1) - needsClosingType=2; - if(needsClosingType==1) { - // Chalice - OOC autoclosing patch based on code by Henri Beauchamp - int needsClosingType=0; - if (utf8text.find("((") == 0 && utf8text.find("))") == -1) - needsClosingType=1; - else if(utf8text.find("[[") == 0 && utf8text.find("]]") == -1) - needsClosingType=2; - if(needsClosingType==1) - { - if(utf8text.at(utf8text.length() - 1) == ')') - utf8text+=" "; - utf8text+="))"; - } - else if(needsClosingType==2) - { - if(utf8text.at(utf8text.length() - 1) == ']') - utf8text+=" "; - utf8text+="]]"; - } - needsClosingType=0; - if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2)) - needsClosingType=1; - else if (utf8text.find("[[") == -1 && utf8text.find("]]") == (utf8text.length() - 2)) - needsClosingType=2; - if(needsClosingType==1) - { - if(utf8text.at(0) == '(') - utf8text.insert(0," "); - utf8text.insert(0,"(("); - } - else if(needsClosingType==2) - { - if(utf8text.at(0) == '[') - utf8text.insert(0," "); - utf8text.insert(0,"[["); - } + if(utf8text.at(utf8text.length() - 1) == ')') + utf8text+=" "; + utf8text+="))"; + } + else if(utf8text.find("[[") == 0 && utf8text.find("]]") == -1) + { + if(utf8text.at(utf8text.length() - 1) == ']') + utf8text+=" "; + utf8text+="]]"; + } + //Check if it needs the start-of-chat brackets -HgB + needsClosingType=0; + if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2)) + { + if(utf8text.at(0) == '(') + utf8text.insert(0," "); + utf8text.insert(0,"(("); + } + else if (utf8text.find("[[") == -1 && utf8text.find("]]") == (utf8text.length() - 2)) + { + if(utf8text.at(0) == '[') + utf8text.insert(0," "); + utf8text.insert(0,"[["); } } // Convert MU*s style poses into IRC emotes here. diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index d17c73b90..7b8fc9e31 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -8,26 +8,31 @@ @@ -41,11 +46,25 @@ + + @@ -79,6 +99,7 @@