From f74e3d40fdf2ca82c73490dc5d0cb1dd7b4ec028 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 9 Oct 2009 00:57:36 +0000 Subject: Added safety checks wherever getSpeakerManager() is called. Removed a meaningless (and misleading) const qualifier to a LLPointer return value. Added a getter for LLSpeakerMgr::mVoiceChannel to replace some very incorrect code casting LLIMSpeakerMgr to LLVoiceChannelP2P Reviewed by Leyla --- indra/newview/llimpanel.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'indra/newview/llimpanel.cpp') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 4435bba0ed..99f331d087 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1162,8 +1162,12 @@ void LLFloaterIMPanel::draw() childSetEnabled("start_call_btn", enable_connect); childSetEnabled("send_btn", !childGetValue("chat_editor").asString().empty()); + LLPointer self_speaker; LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID); - LLPointer self_speaker = speaker_mgr->findSpeaker(gAgent.getID()); + if (speaker_mgr) + { + self_speaker = speaker_mgr->findSpeaker(gAgent.getID()); + } if(!mTextIMPossible) { mInputEditor->setEnabled(FALSE); @@ -1751,8 +1755,9 @@ void LLFloaterIMPanel::setTyping(BOOL typing) // Will send typing state after a short delay. mSentTypingState = FALSE; } - - speaker_mgr->setSpeakerTyping(gAgent.getID(), TRUE); + + if (speaker_mgr) + speaker_mgr->setSpeakerTyping(gAgent.getID(), TRUE); } else { @@ -1762,7 +1767,8 @@ void LLFloaterIMPanel::setTyping(BOOL typing) sendTypingState(FALSE); mSentTypingState = TRUE; } - speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); + if (speaker_mgr) + speaker_mgr->setSpeakerTyping(gAgent.getID(), FALSE); } mTyping = typing; @@ -1822,7 +1828,11 @@ void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info) mHistoryEditor->removeTextFromEnd(chars_to_remove); if (im_info) { - LLIMModel::getInstance()->getSpeakerManager(mSessionUUID)->setSpeakerTyping(im_info->mFromID, FALSE); + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionUUID); + if (speaker_mgr) + { + speaker_mgr->setSpeakerTyping(im_info->mFromID, FALSE); + } } } } -- cgit v1.2.3 From 406927f6293efa416b174cfa1c88689aab9615f7 Mon Sep 17 00:00:00 2001 From: Adam Moss Date: Wed, 14 Oct 2009 10:40:56 +0000 Subject: Merge a big bunch of fixes from maint-viewer. Hooray. svn merge -r136066:136073 svn+ssh://svn.lindenlab.com/svn/linden/branches/maint-viewer/maint-viewer-24-qa-9 DEV-8553 New Server Tools - Prep Land For Sale DEV-32942 (QAR-1521) Bad border crossings or TP / Ruthing issues DEV-32942 (QAR-1521) Bad border crossings or TP / Ruthing issues DEV-33239 VWR-13816: Resizing the Search Window Causes the Results to Refresh back to First Page DEV-27746 Running a dev build of Second Life will make console window show up on non-dev builds (Windows) DEV-33209 Linux 1.24.0.120778 client fails to run DEV-29123 SVC-3871: Crash of viewer when clicking on ghost objects at (0,0,0) on a sim DEV-35433 Attempting to upload wrong file type crashes viewer DEV-33499 viewer2009 is not using KDU DEV-33912 Griefing viewer crashes others' viewers with malformed sound files DEV-3784 VWR-138: Animation Priority not working correctly, Can't create new AOs DEV-20678 VWR-9069: Region variable says 'Region Name' in AR if no object is selected DEV-19934 Help->About Second Life doesn't differentiate between 32- and 64-bit Vista DEV-6604 Restored folders have 'Purge Item' and 'Restore Item' options DEV-12867 VWR-5717: Selected Text is not replaced by Input text when Japanese IME is on DEV-11894 Notecards/Texture windows don't open completely when opened from inventory DEV-10641 VWR-4955: Local Chat doesn't show end of last conversation DEV-30039 VWR-12620: Viewer build fails on Linux when compiled with -O2 (--type=Release) DEV-20944 VWR-9065: (intermittent) Right Click >profile on avatar does not display profile DEV-24828 Menu accelerator prefixes shouldn't be hard-coded DEV-34529 VWR-14267: Clicking send in an IM window does not add the sent text to the line editor history DEV-34124 Invite to group, search by name will not show resident if their first name is two characters DEV-20930 VWR-9248: On Mac: the "--url" option causes a command line parsing error DEV-35306 Adult keyword filter triggers multiple warnings DEV-35503 VWR-3595: "Second Life requires True Color (32-bit) to run in a window" message is incorrect DEV-35656 VWR-12995: FTBFS: error: format '%-3d' expects type 'int', but argument 3 has type 'size_t' DEV-30043 VWR-12533: Linux viewer build for OpenAL fails during packaging unless FMOD library is available DEV-31898 VWR-13202: Right clicking mouse triggers arrow key control events DEV-32610 Keyboard shortcuts on OSX viewer overridden by OSX DEV-27067 Coverity Prevent: EVALUATION_ORDER defects DEV-26188 VWR-2242: Specially formatted .BVH file can cause avatar distortion DEV-25475 About Land dialog no longer shows Area: field DEV-19897 OSX Viewer Installer (for an RC) opens with poor positioning DEV-22837 Inventory> Search Recent Items highlighting incorrect characters DEV-21709 VWR-9377: Mapping will default to leave exact sim name listing first. (Searching Gar forces Gar to come up and not Garden of Dreams) DEV-23079 implement volume serial for linux client DEV-13930 VWR-6432: Space Navigator operation with vehicles is broken DEV-27666 VWR-10829: Linux Viewer: CLICK_ACTION_PAY shows CLICK_ACTION_PLAY icon DEV-23670 Viewer crashes on startup if installed into a custom folder with Korean, Japanese or Chinese characters in path DEV-19313 VWR-8454: PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS not highlighted in script editor DEV-19918 VWR-8885: Move character/*.xml files to source bundle DEV-25555 VWR-11172: A source coding mistake prevents number-pad keys from specifying Ctrl+digit shortcuts on Windows DEV-8536 VWR-4057: Multi-line chat display bug - first character in line missing DEV-29592 Mac LLFastTimer uses wall clock instead of Intel PMU DEV-29644 VWR-12587: Cmake install target has a hard coded secondlife-bin reference remaining DEV-25320 VWR-11128: Python not always detected by develop.py DEV-30040 VWR-12617: Poor type name that violates Coding Standard breaks compatibility with system header files DEV-30380 indra/newview/res-sdl/toolpay.BMP is modified during ./develop.py configure DEV-31247 VWR-12763: non-portable printf specifier used with size_t causes FTBFS on 64bit (due to -Werror) DEV-29565 VWR-12569: A comment in lluistring.h contains undefined UTF-8 code sequences DEV-22100 VWR-9620: send_parcel_select_objects in newview/llfloaterland.cpp uses the wrong datatype for the ReturnType field causing a warning DEV-31911 Selected objects / primitives should be greyed out when nothing is selected DEV-3667 Windows: Accelerator keys should be "Ctrl+X" rather than "Ctrl-X" DEV-27223 disable gstreamer on 64-bit linux DEV-8172 We Need a Linden Sale Option to Sell Land to Anyone DEV-25511 VWR-10311: Enable LipSync by default DEV-20443 Revamp group creation confirmation dialog to be more communicative DEV-20132 VWR-7800: Joystick / SpaceNavigator. Camera should remain in position when exiting flycam mode into avatar mode. DEV-18420 VWR-8393: Have build scripts copy fmod from an external location DEV-24841 VWR-10717: Right Space Navigator button should toggle fly in avatar movment, not jump/flyup. DEV-28457 change auto-populate value in buy L$ window from 1000 to 2000 DEV-15545 VWR-3725: Please add resize option to the SEARCH window UI --- indra/newview/llimpanel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llimpanel.cpp') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 99f331d087..c2d515f158 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -1654,6 +1654,8 @@ void LLFloaterIMPanel::sendMsg() LLWString text = mInputEditor->getConvertedText(); if(!text.empty()) { + // store sent line in history, duplicates will get filtered + if (mInputEditor) mInputEditor->updateHistory(); // Truncate and convert to UTF8 for transport std::string utf8_text = wstring_to_utf8str(text); utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); -- cgit v1.2.3 From b5ffeaff1ab53008a8f1ee72cd1f398bd1ff21c2 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 14 Oct 2009 20:37:03 +0000 Subject: 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 --- indra/newview/llimpanel.cpp | 62 ++++++++++++++------------------------------- 1 file changed, 19 insertions(+), 43 deletions(-) (limited to 'indra/newview/llimpanel.cpp') 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++; -- cgit v1.2.3