aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/app_settings/settings.xml16
-rw-r--r--linden/indra/newview/llfirstuse.cpp2
-rw-r--r--linden/indra/newview/llimpanel.cpp32
-rw-r--r--linden/indra/newview/llimpanel.h1
-rw-r--r--linden/indra/newview/llimview.cpp4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml4
6 files changed, 53 insertions, 6 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index e55684a..b7e7196 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -221,6 +221,22 @@
221 <key>Value</key> 221 <key>Value</key>
222 <integer>0</integer> 222 <integer>0</integer>
223 </map> 223 </map>
224 <key>IMEncryptedChatColor</key>
225 <map>
226 <key>Comment</key>
227 <string>Color of encrypted instant messages from other residents</string>
228 <key>Persist</key>
229 <integer>1</integer>
230 <key>Type</key>
231 <string>Color4</string>
232 <key>Value</key>
233 <array>
234 <real>1.0</real>
235 <real>1.0</real>
236 <real>0.8</real>
237 <real>1.0</real>
238 </array>
239 </map>
224<!--[$PLOTR$/]--> 240<!--[$PLOTR$/]-->
225 <key>AppearanceAnimate</key> 241 <key>AppearanceAnimate</key>
226 <map> 242 <map>
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp
index a377959..50917f7 100644
--- a/linden/indra/newview/llfirstuse.cpp
+++ b/linden/indra/newview/llfirstuse.cpp
@@ -369,7 +369,7 @@ void LLFirstUse::callbackEmeraldOTR(const LLSD &notification, const LLSD &respon
369 gSavedSettings.setWarning("EmeraldOTR", FALSE); 369 gSavedSettings.setWarning("EmeraldOTR", FALSE);
370 370
371 S32 option = LLNotification::getSelectedOption(notification, response); 371 S32 option = LLNotification::getSelectedOption(notification, response);
372 372
373 if ( option == 0 ) 373 if ( option == 0 )
374 { 374 {
375 gSavedSettings.setU32("EmeraldUseOTR",(U32)1); 375 gSavedSettings.setU32("EmeraldUseOTR",(U32)1);
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp
index 3f531aa..75872e0 100644
--- a/linden/indra/newview/llimpanel.cpp
+++ b/linden/indra/newview/llimpanel.cpp
@@ -89,7 +89,6 @@
89#include "otr_wrapper.h" 89#include "otr_wrapper.h"
90#include "otr_floater_smp_dialog.h" 90#include "otr_floater_smp_dialog.h"
91#include "otr_floater_smp_progress.h" 91#include "otr_floater_smp_progress.h"
92#include "mfdKeywordFloater.h"
93#endif // USE_OTR // [/$PLOTR$] 92#endif // USE_OTR // [/$PLOTR$]
94 93
95// 94//
@@ -1412,6 +1411,7 @@ BOOL LLFloaterIMPanel::postBuild()
1412 1411
1413#if USE_OTR // [$PLOTR$] 1412#if USE_OTR // [$PLOTR$]
1414 if (!gOTR) OTR_Wrapper::init(); 1413 if (!gOTR) OTR_Wrapper::init();
1414 llinfos << "$PLOTR$ gOTR is " << gOTR << llendl;
1415 if (gOTR && (IM_NOTHING_SPECIAL == mDialog)) 1415 if (gOTR && (IM_NOTHING_SPECIAL == mDialog))
1416 { 1416 {
1417 LLComboBox *combo = getChild<LLComboBox>("otr_combo"); 1417 LLComboBox *combo = getChild<LLComboBox>("otr_combo");
@@ -3183,16 +3183,31 @@ void LLFloaterIMPanel::sendMsg()
3183 std::string prefix = utf8_text.substr(0, 4); 3183 std::string prefix = utf8_text.substr(0, 4);
3184 if (prefix == "/me " || prefix == "/me'") 3184 if (prefix == "/me " || prefix == "/me'")
3185 { 3185 {
3186#if USE_OTR // [$PLOTR$]
3187 if (isEncrypted())
3188 utf8_text.replace(0,3,"\xe2\x80\xa7");
3189 else
3190#endif // USE_OTR // [/$PLOTR$]
3186 utf8_text.replace(0,3,""); 3191 utf8_text.replace(0,3,"");
3187 } 3192 }
3188 else 3193 else
3189 { 3194 {
3195#if USE_OTR // [$PLOTR$]
3196 if (isEncrypted())
3197 history_echo += "\xe2\x80\xa7: ";
3198 else
3199#endif // USE_OTR // [/$PLOTR$]
3190 history_echo += ": "; 3200 history_echo += ": ";
3191 } 3201 }
3192 history_echo += utf8_text; 3202 history_echo += utf8_text;
3193 3203
3194 BOOL other_was_typing = mOtherTyping; 3204 BOOL other_was_typing = mOtherTyping;
3195 3205
3206#if USE_OTR // [$PLOTR$]
3207 if (isEncrypted())
3208 addHistoryLine(history_echo, gSavedSettings.getColor("IMEncryptedChatColor"), true, gAgent.getID());
3209 else
3210#endif // USE_OTR // [/$PLOTR$]
3196 addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID()); 3211 addHistoryLine(history_echo, gSavedSettings.getColor("IMChatColor"), true, gAgent.getID());
3197 3212
3198 if (other_was_typing) 3213 if (other_was_typing)
@@ -3423,7 +3438,7 @@ void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string
3423 //self->addHistoryLine(line, LLColor4::grey, FALSE); 3438 //self->addHistoryLine(line, LLColor4::grey, FALSE);
3424 self->mHistoryEditor->appendColoredText(message, false, true, LLColor4::grey); 3439 self->mHistoryEditor->appendColoredText(message, false, true, LLColor4::grey);
3425} 3440}
3426/* 3441#if 0
3427// user is known to be offline when we receive this 3442// user is known to be offline when we receive this
3428void LLFloaterIMPanel::setOffline() 3443void LLFloaterIMPanel::setOffline()
3429{ 3444{
@@ -3443,7 +3458,7 @@ void LLFloaterIMPanel::setOffline()
3443 } 3458 }
3444#endif // USE_OTR // [/$PLOTR$] 3459#endif // USE_OTR // [/$PLOTR$]
3445} 3460}
3446*/ 3461#endif // 0
3447void LLFloaterIMPanel::showSessionStartError( 3462void LLFloaterIMPanel::showSessionStartError(
3448 const std::string& error_string) 3463 const std::string& error_string)
3449{ 3464{
@@ -3529,3 +3544,14 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
3529} 3544}
3530 3545
3531 3546
3547#if USE_OTR // [$PLOTR$]
3548bool LLFloaterIMPanel::isEncrypted()
3549{
3550 if (gOTR)
3551 {
3552 ConnContext *context = getOtrContext();
3553 if (context && (context->msgstate == OTRL_MSGSTATE_ENCRYPTED)) return true;
3554 }
3555 return false;
3556}
3557#endif // USE_OTR // [/$PLOTR$]
diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h
index 5a36648..cb77c24 100644
--- a/linden/indra/newview/llimpanel.h
+++ b/linden/indra/newview/llimpanel.h
@@ -356,6 +356,7 @@ private:
356 OtrlMessageState mOtrLastStatus; 356 OtrlMessageState mOtrLastStatus;
357 OtrFloaterSmpDialog *mOtrSmpDialog; 357 OtrFloaterSmpDialog *mOtrSmpDialog;
358 OtrFloaterSmpProgress *mOtrSmpProgress; 358 OtrFloaterSmpProgress *mOtrSmpProgress;
359 bool isEncrypted();
359#endif // USE_OTR // [/$PLOTR$] 360#endif // USE_OTR // [/$PLOTR$]
360 361
361private: 362private:
diff --git a/linden/indra/newview/llimview.cpp b/linden/indra/newview/llimview.cpp
index ea4070b..cba442b 100644
--- a/linden/indra/newview/llimview.cpp
+++ b/linden/indra/newview/llimview.cpp
@@ -681,6 +681,10 @@ void LLIMMgr::addMessage(
681 LLColor4 color; 681 LLColor4 color;
682 if (is_from_system) 682 if (is_from_system)
683 color = gSavedSettings.getColor4("SystemChatColor"); 683 color = gSavedSettings.getColor4("SystemChatColor");
684 else if ((msg.substr(0, 3) == "\xe2\x80\xa7"))
685 {
686 color = gSavedSettings.getColor("IMEncryptedChatColor");
687 }
684 else 688 else
685 { 689 {
686 std::string new_line = std::string(msg); 690 std::string new_line = std::string(msg);
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
index 94e5c6a..8e72c69 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
@@ -183,8 +183,8 @@ To use spellcheck, right-click a misspelled word
183 183
184 <!--[$PLOTR$]--> 184 <!--[$PLOTR$]-->
185 <panel border="true" bottom="-580" follows="left|top|right|bottom" 185 <panel border="true" bottom="-580" follows="left|top|right|bottom"
186 height="525" label="SpellCheck" 186 height="525" label="OTR"
187 left="1" mouse_opaque="true" name="SpellCheck" width="418"> 187 left="1" mouse_opaque="true" name="OTR" width="418">
188 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" 188 <button bottom_delta="0" follows="left|top" font="SansSerifSmall"
189 height="18" right="470" 189 height="18" right="470"
190 name="otr_help_btn" width="98" label="What is OTR?"/> 190 name="otr_help_btn" width="98" label="What is OTR?"/>