diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-14 20:37:03 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-14 20:37:03 +0000 |
commit | b5ffeaff1ab53008a8f1ee72cd1f398bd1ff21c2 (patch) | |
tree | e12431a5c6945b2ece16765bcdb04c241c4d9a96 /indra/newview/llimpanel.cpp | |
parent | 7475ec05fc81e358a6979f3e9d7050ab91511c57 (diff) |
merge -r 2014-2032 https://svn.aws.productengine.com/secondlife/pe/stable-2 -> viewer-2.0.0-3
* Bugs: EXT-1005 EXT-1488 EXT-320 EXT-1236 EXT-1236 EXT-1002 EXT-1030
* New Dev: EXT-1293 EXT-1416
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r-- | indra/newview/llimpanel.cpp | 62 |
1 files changed, 19 insertions, 43 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index c2d515f158..0ff3bd24e9 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1013,33 +1013,28 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& session_label, (void *)this); } - if ( !mSessionInitialized ) + //*TODO we probably need the same "awaiting message" thing in LLIMFloater + LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mSessionUUID); + if (!im_session) { - if ( !LLIMModel::instance().sendStartSession( - mSessionUUID, - mOtherParticipantUUID, - mSessionInitialTargetIDs, - mDialog) ) - { - //we don't need to need to wait for any responses - //so we're already initialized - mSessionInitialized = TRUE; - mSessionStartMsgPos = 0; - } - else - { - //locally echo a little "starting session" message - LLUIString session_start = sSessionStartString; + llerror("im session with id " + mSessionUUID.asString() + " does not exist!", 0); + return; + } - session_start.setArg("[NAME]", getTitle()); - mSessionStartMsgPos = - mHistoryEditor->getWText().length(); + mSessionInitialized = im_session->mSessionInitialized; + if (!mSessionInitialized) + { + //locally echo a little "starting session" message + LLUIString session_start = sSessionStartString; - addHistoryLine( - session_start, - LLUIColorTable::instance().getColor("SystemChatColor"), - false); - } + session_start.setArg("[NAME]", getTitle()); + mSessionStartMsgPos = + mHistoryEditor->getWText().length(); + + addHistoryLine( + session_start, + LLUIColorTable::instance().getColor("SystemChatColor"), + false); } } @@ -1346,25 +1341,6 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 mHistoryEditor->appendText(utf8msg, prepend_newline, LLStyle::Params().color(color)); mHistoryEditor->blockUndo(); - S32 im_log_option = gSavedPerAccountSettings.getS32("IMLogOptions"); - if (log_to_file && (im_log_option!=LOG_CHAT)) - { - std::string histstr; - if (gSavedPerAccountSettings.getBOOL("LogTimestamp")) - histstr = LLLogChat::timestamp(gSavedPerAccountSettings.getBOOL("LogTimestampDate")) + name + separator_string + utf8msg; - else - histstr = name + separator_string + utf8msg; - - if(im_log_option==LOG_BOTH_TOGETHER) - { - LLLogChat::saveHistory(std::string("chat"),histstr); - } - else - { - LLLogChat::saveHistory(getTitle(),histstr); - } - } - if (!isInVisibleChain()) { mNumUnreadMessages++; |