diff options
Diffstat (limited to 'linden/indra/newview/llimpanel.cpp')
-rw-r--r-- | linden/indra/newview/llimpanel.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
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 |
3428 | void LLFloaterIMPanel::setOffline() | 3443 | void 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 |
3447 | void LLFloaterIMPanel::showSessionStartError( | 3462 | void 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$] | ||
3548 | bool 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$] | ||