From a904e887bdee8656694551697e860a06bbfe9b6c Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 27 Jan 2010 19:00:12 +0200 Subject: Fixed normal bug (EXT-4700) Creating a landmark brings up the Landmark sidepanel info twice. - Disabled "Close" and "Back" buttons to prevent closing "Create Landmark" panel until created landmark is loaded. --HG-- branch : product-engine --- indra/newview/llpanelplaces.cpp | 26 ++++++++++++++++++-------- indra/newview/llpanelplaces.h | 2 ++ indra/newview/llviewermessage.cpp | 5 +++-- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 7272a8a652..29cfbbe606 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -272,11 +272,11 @@ BOOL LLPanelPlaces::postBuild() if (!mPlaceProfile || !mLandmarkInfo) return FALSE; - LLButton* back_btn = mPlaceProfile->getChild("back_btn"); - back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); + mPlaceProfileBackBtn = mPlaceProfile->getChild("back_btn"); + mPlaceProfileBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); - back_btn = mLandmarkInfo->getChild("back_btn"); - back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); + mLandmarkInfoBackBtn = mLandmarkInfo->getChild("back_btn"); + mLandmarkInfoBackBtn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); LLLineEditor* title_editor = mLandmarkInfo->getChild("title_editor"); title_editor->setKeystrokeCallback(boost::bind(&LLPanelPlaces::onEditButtonClicked, this), NULL); @@ -327,9 +327,12 @@ void LLPanelPlaces::onOpen(const LLSD& key) mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - // Disable Save button because there is no item to save yet. - // The button will be enabled in onLandmarkLoaded callback. + // Disabling "Save", "Close" and "Back" buttons to prevent closing "Create Landmark" + // panel before created landmark is loaded. + // These buttons will be enabled when created landmark is added to inventory. mSaveBtn->setEnabled(FALSE); + mCloseBtn->setEnabled(FALSE); + mLandmarkInfoBackBtn->setEnabled(FALSE); } else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { @@ -437,6 +440,8 @@ void LLPanelPlaces::setItem(LLInventoryItem* item) mEditBtn->setEnabled(is_landmark_editable); mSaveBtn->setEnabled(is_landmark_editable); + mCloseBtn->setEnabled(TRUE); + mLandmarkInfoBackBtn->setEnabled(TRUE); if (is_landmark_editable) { @@ -488,8 +493,6 @@ void LLPanelPlaces::onLandmarkLoaded(LLLandmark* landmark) landmark->getGlobalPos(mPosGlobal); mLandmarkInfo->displayParcelInfo(region_id, mPosGlobal); - mSaveBtn->setEnabled(TRUE); - updateVerbs(); } @@ -1030,6 +1033,13 @@ void LLPanelPlaces::updateVerbs() { mTeleportBtn->setEnabled(have_3d_pos); } + + // Do not enable landmark info Back button when we are waiting + // for newly created landmark to load. + if (!is_create_landmark_visible) + { + mLandmarkInfoBackBtn->setEnabled(TRUE); + } } else { diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index a098974659..5de78b1595 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -115,6 +115,8 @@ private: LLToggleableMenu* mPlaceMenu; LLToggleableMenu* mLandmarkMenu; + LLButton* mPlaceProfileBackBtn; + LLButton* mLandmarkInfoBackBtn; LLButton* mTeleportBtn; LLButton* mShowOnMapBtn; LLButton* mEditBtn; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d6ce356c4b..36710e7532 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -906,7 +906,7 @@ void open_inventory_offer(const std::vector& items, const std::string& f if ("inventory_handler" == from_name) { //we have to filter inventory_handler messages to avoid notification displaying - LLSideTray::getInstance()->showPanel("panel_places", + LLSideTray::getInstance()->showPanel("panel_places", LLSD().with("type", "landmark").with("id", item->getUUID())); } else if("group_offer" == from_name) @@ -925,8 +925,9 @@ void open_inventory_offer(const std::vector& items, const std::string& f args["FOLDER_NAME"] = std::string(parent_folder ? parent_folder->getName() : "unknown"); LLNotificationsUtil::add("LandmarkCreated", args); // Created landmark is passed to Places panel to allow its editing. In fact panel should be already displayed. + // If the panel is closed we don't reopen it until created landmark is loaded. //TODO*:: dserduk(7/12/09) remove LLPanelPlaces dependency from here - LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", LLSD())); + LLPanelPlaces *places_panel = dynamic_cast(LLSideTray::getInstance()->getPanel("panel_places")); if (places_panel) { // we are creating a landmark -- cgit v1.2.3 From f5344270f24702711df67f02160b9225d269669b Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 27 Jan 2010 21:18:13 +0200 Subject: Fixed normal bug (EXT-4592) Negative 'new balance' value in Buy L$ floater - Restricted currency purchase amount to a 10 digit number. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/floater_buy_currency.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 8f67f564a2..703a02d995 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -114,6 +114,7 @@ Date: Wed, 27 Jan 2010 11:53:17 -0800 Subject: CID-417 Checker: UNINIT_CTOR Function: LLFoundData::LLFoundData() File: /indra/newview/llappearancemgr.cpp --- indra/newview/llappearancemgr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 1dec8c7bd8..8f4ce4498e 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -292,11 +292,11 @@ private: struct LLFoundData { - LLFoundData() {} + LLFoundData() : mAssetType(LLAssetType::AT_NONE), mWearable(NULL) {} LLFoundData(const LLUUID& item_id, - const LLUUID& asset_id, - const std::string& name, - LLAssetType::EType asset_type) : + const LLUUID& asset_id, + const std::string& name, + LLAssetType::EType asset_type) : mItemID(item_id), mAssetID(asset_id), mName(name), -- cgit v1.2.3 From 3acf25d5fc7d3efcc2e13096ff781897ebf31346 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 11:55:34 -0800 Subject: CID-416 Checker: NULL_RETURNS Function: LLTabContainer::onTabBtn(const LLSD &, LLPanel *) File: /indra/llui/lltabcontainer.cpp --- indra/llui/lltabcontainer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index dcb3542e18..6be76605fd 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1590,7 +1590,10 @@ void LLTabContainer::onTabBtn( const LLSD& data, LLPanel* panel ) LLTabTuple* tuple = getTabByPanel(panel); selectTabPanel( panel ); - tuple->mTabPanel->setFocus(TRUE); + if (tuple) + { + tuple->mTabPanel->setFocus(TRUE); + } } void LLTabContainer::onNextBtn( const LLSD& data ) -- cgit v1.2.3 From f714e527c57741a6e60fe4bf5fa242b5d8e3d861 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 11:57:55 -0800 Subject: CID-415 Checker: DEADCODE Function: LLToolPie::handleTooltipObject(LLViewerObject *, std::basic_string, std::allocator>, std::basic_string, std::allocator>) File: /indra/newview/lltoolpie.cpp --- indra/newview/lltoolpie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index c79a66892d..39e71974fd 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -922,7 +922,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL; if (mep) { - viewer_media_t media_impl = mep ? LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()) : NULL; + viewer_media_t media_impl = LLViewerMedia::getMediaImplFromTextureID(mep->getMediaID()); LLPluginClassMedia* media_plugin = NULL; if (media_impl.notNull() && (media_impl->hasMedia())) -- cgit v1.2.3 From 73665e5ad68ebbe2a6058128f92d251da4cd9d3b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 11:59:55 -0800 Subject: CID-1 Checker: BAD_COMPARE Function: checkExceptionHandler() File: /indra/llplugin/slplugin/slplugin.cpp (not a bug, but rearranged a little) --- indra/llplugin/slplugin/slplugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 23dc532ba5..77240ce546 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -156,7 +156,7 @@ bool checkExceptionHandler() if (prev_filter == NULL) { ok = FALSE; - if (myWin32ExceptionHandler == NULL) + if (NULL == myWin32ExceptionHandler) { LL_WARNS("AppInit") << "Exception handler uninitialized." << LL_ENDL; } -- cgit v1.2.3 From a0bc58aac498dff7f06070bf3be025b5e396f84f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 12:07:05 -0800 Subject: CID-26 Checker: CTOR_DTOR_LEAK Function: LLViewerWindow::LLViewerWindow(const std::basic_string, std::allocator>&, const std::basic_string, std::allocator>&, int, int, int, int, int, int) File: /indra/newview/llviewerwindow.cpp --- indra/newview/llviewerwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c1817496b1..424b84a756 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1659,6 +1659,9 @@ LLViewerWindow::~LLViewerWindow() { llinfos << "Destroying Window" << llendl; destroyWindow(); + + delete mDebugText; + mDebugText = NULL; } -- cgit v1.2.3 From 2f062b9e5c761bce6d4d29e1a40283e37dfdfd53 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:02:19 -0800 Subject: CID-105 Checker: INVALIDATE_ITERATOR Function: LLLocationHistory::addItem(const LLLocationHistoryItem &) File: /indra/newview/lllocationhistory.cpp --- indra/newview/lllocationhistory.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index ae1b8f8540..f494f7d7c1 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -50,18 +50,19 @@ void LLLocationHistory::addItem(const LLLocationHistoryItem& item) { // check if this item doesn't duplicate any existing one location_list_t::iterator item_iter = std::find(mItems.begin(), mItems.end(),item); - if(item_iter != mItems.end()){ + if(item_iter != mItems.end()) // if it already exists, erase the old one + { mItems.erase(item_iter); } mItems.push_back(item); - // If the vector size exceeds the maximum, purge the oldest items. - if ((S32)mItems.size() > max_items) { - for(location_list_t::iterator i = mItems.begin(); i != mItems.end()-max_items; ++i) { - mItems.erase(i); - } + // If the vector size exceeds the maximum, purge the oldest items (at the start of the mItems vector). + if ((S32)mItems.size() > max_items) + { + mItems.erase(mItems.begin(), mItems.end()-max_items); } + llassert(mItems.size() <= max_items); } /* -- cgit v1.2.3 From c48f2d7873568c26d835d6ce1d80c3c3533854a6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:04:22 -0800 Subject: CID-104 Checker: INVALIDATE_ITERATOR Function: LLViewerWindowListener::saveSnapshot(const LLSD &) const File: /indra/newview/llviewerwindowlistener.cpp not a bug. --- indra/newview/llviewerwindowlistener.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerwindowlistener.cpp b/indra/newview/llviewerwindowlistener.cpp index de57788271..fae98cf49a 100644 --- a/indra/newview/llviewerwindowlistener.cpp +++ b/indra/newview/llviewerwindowlistener.cpp @@ -77,6 +77,7 @@ void LLViewerWindowListener::saveSnapshot(const LLSD& event) const { LL_ERRS("LLViewerWindowListener") << "LLViewerWindowListener::saveSnapshot(): " << "unrecognized type " << event["type"] << LL_ENDL; + return; } type = found->second; } -- cgit v1.2.3 From 706fd4d0735e446ea6c9eab7387990375af53c48 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:06:26 -0800 Subject: CID-103 Checker: INVALIDATE_ITERATOR Function: LLMenuGL::scrollItemsDown() File: /indra/llui/llmenugl.cpp --- indra/llui/llmenugl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index c172a2b714..171269e30d 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1883,7 +1883,8 @@ void LLMenuGL::scrollItemsDown() } } - if ((*next_item_iter)->getVisible()) + if (next_item_iter != mItems.end() && + (*next_item_iter)->getVisible()) { mFirstVisibleItem = *next_item_iter; } -- cgit v1.2.3 From 668e72e2901ebf377661572fd30954d41e0e7c15 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:08:15 -0800 Subject: CID-103 Checker: INVALIDATE_ITERATOR Function: LLMenuGL::scrollItemsDown() File: /indra/llui/llmenugl.cpp --- indra/llui/llmenugl.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 171269e30d..ead28426cd 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1875,18 +1875,21 @@ void LLMenuGL::scrollItemsDown() item_list_t::iterator next_item_iter; - for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++) + if (cur_item_iterator != mItems.end()) { - if( (*next_item_iter)->getVisible()) + for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++) { - break; + if( (*next_item_iter)->getVisible()) + { + break; + } + } + + if (next_item_iter != mItems.end() && + (*next_item_iter)->getVisible()) + { + mFirstVisibleItem = *next_item_iter; } - } - - if (next_item_iter != mItems.end() && - (*next_item_iter)->getVisible()) - { - mFirstVisibleItem = *next_item_iter; } mNeedsArrange = TRUE; -- cgit v1.2.3 From 05260ba76d020072e5b08bd07fa77408aee4442e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:09:25 -0800 Subject: follow-up fix --- indra/llui/llmenugl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index ead28426cd..ceb1e9820e 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -1875,7 +1875,7 @@ void LLMenuGL::scrollItemsDown() item_list_t::iterator next_item_iter; - if (cur_item_iterator != mItems.end()) + if (cur_item_iter != mItems.end()) { for (next_item_iter = ++cur_item_iter; next_item_iter != mItems.end(); next_item_iter++) { -- cgit v1.2.3 From 599e96f32815733eb2bbd9aef5984d410644a10a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:11:02 -0800 Subject: CID-102 Checker: INVALIDATE_ITERATOR Function: LLNotifications::getChannel(const std::basic_string, std::allocator>&) File: /indra/llui/llnotifications.cpp not a bug. --- indra/llui/llnotifications.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 86989012ee..a67094b8ce 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1058,6 +1058,7 @@ LLNotificationChannelPtr LLNotifications::getChannel(const std::string& channelN if(p == mChannels.end()) { llerrs << "Did not find channel named " << channelName << llendl; + return LLNotificationChannelPtr(); } return p->second; } -- cgit v1.2.3 From 3aed137a33712f9000333aa814f76183158183cb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:15:13 -0800 Subject: CID-101 Checker: INVALIDATE_ITERATOR Function: LLTextureCache::writeComplete(unsigned int, bool) File: /indra/newview/lltexturecache.cpp not really a bug, but rearranged a little. --- indra/newview/lltexturecache.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 051c189013..7dfd0c83fa 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1617,20 +1617,19 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mWriters.find(handle); - llassert_always(iter != mWriters.end()); - LLTextureCacheWorker* worker = iter->second; - if (worker->complete() || abort) + if (llverify(iter != mWriters.end())) { - mWriters.erase(handle); - unlockWorkers(); - worker->scheduleDelete(); - return true; - } - else - { - unlockWorkers(); - return false; + LLTextureCacheWorker* worker = iter->second; + if (worker->complete() || abort) + { + mWriters.erase(handle); + unlockWorkers(); + worker->scheduleDelete(); + return true; + } } + unlockWorkers(); + return false; } void LLTextureCache::prioritizeWrite(handle_t handle) -- cgit v1.2.3 From c69ee5ced1ba3b8e96a08e2f0344eedd971ef3c1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:18:49 -0800 Subject: CID-100 Checker: INVALIDATE_ITERATOR Function: buildBlock(unsigned char *, int, const LLMessageBlock *, LLMsgData *) File: /indra/llmessage/lltemplatemessagebuilder.cpp --- indra/llmessage/lltemplatemessagebuilder.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index 6400310c46..55379fc6fd 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -737,10 +737,14 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat } --block_count; - ++block_iter; + if (block_iter != message_data->mMemberBlocks.end()) { - mbci = block_iter->second; + ++block_iter; + if (block_iter != message_data->mMemberBlocks.end()) + { + mbci = block_iter->second; + } } } -- cgit v1.2.3 From eeb30616f601a8e75403d7eb8ffed272a5915a17 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:26:05 -0800 Subject: CID-99 Checker: INVALIDATE_ITERATOR Function: LLAllocatorHeapProfile::parse(const std::basic_string, std::allocator>&) File: /indra/llcommon/llallocator_heap_profile.cpp not a bug, but make it clearer to coverity. --- indra/llcommon/llallocator_heap_profile.cpp | 31 ++++++++++++++++------------- indra/newview/lltexturecache.cpp | 3 ++- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index 0a807702d0..d01b33c8c4 100644 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -113,20 +113,23 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) ++j; while(j != line_elems.end() && j->empty()) { ++j; } // skip any separator tokens - llassert_always(j != line_elems.end()); - ++j; // skip the '@' - - mLines.push_back(line(live_count, live_size, tot_count, tot_size)); - line & current_line = mLines.back(); - - for(; j != line_elems.end(); ++j) - { - if(!j->empty()) { - U32 marker = boost::lexical_cast(*j); - current_line.mTrace.push_back(marker); - } - } - } + llassert(j != line_elems.end()); + if (j != line_elems.end()) + { + ++j; // skip the '@' + + mLines.push_back(line(live_count, live_size, tot_count, tot_size)); + line & current_line = mLines.back(); + + for(; j != line_elems.end(); ++j) + { + if(!j->empty()) + { + U32 marker = boost::lexical_cast(*j); + current_line.mTrace.push_back(marker); + } + } + } // *TODO - parse MAPPED_LIBRARIES section here if we're ever interested in it } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 7dfd0c83fa..a7f26f1df1 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1617,7 +1617,8 @@ bool LLTextureCache::writeComplete(handle_t handle, bool abort) { lockWorkers(); handle_map_t::iterator iter = mWriters.find(handle); - if (llverify(iter != mWriters.end())) + llassert(iter != mWriters.end()); + if (iter != mWriters.end()) { LLTextureCacheWorker* worker = iter->second; if (worker->complete() || abort) -- cgit v1.2.3 From 3616ed1e996f276b3ad195e1f2c9b2f87a5b1455 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:28:13 -0800 Subject: sigh, follow-up fix. --- indra/llcommon/llallocator_heap_profile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp index d01b33c8c4..e50d59fd4b 100644 --- a/indra/llcommon/llallocator_heap_profile.cpp +++ b/indra/llcommon/llallocator_heap_profile.cpp @@ -130,7 +130,7 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text) } } } - + } // *TODO - parse MAPPED_LIBRARIES section here if we're ever interested in it } -- cgit v1.2.3 From bada10e2f2fcd15eff4aeec82288c4c64ad258ef Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:32:21 -0800 Subject: CID-114 Checker: MISSING_BREAK Function: renderBoundingBox(LLDrawable *, int) File: /indra/newview/llspatialpartition.cpp --- indra/newview/llspatialpartition.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 514d8facb4..465221c494 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2607,6 +2607,7 @@ void renderBoundingBox(LLDrawable* drawable, BOOL set_color = TRUE) break; case LL_PCODE_LEGACY_TREE: gGL.color4f(0,0.5f,0,1); + break; default: gGL.color4f(1,0,1,1); break; -- cgit v1.2.3 From 5aedcb39362b64c22fc5e70135b44d1388cbd5a2 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:34:49 -0800 Subject: CID-112 Checker: MISSING_BREAK Function: LLViewerObject::processUpdateMessage(LLMessageSystem *, void **, unsigned int, e_object_update_type, LLDataPacker *) File: /indra/newview/llviewerobject.cpp not a bug. commented. --- indra/newview/llviewerobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 3c79045cc5..037393a8f9 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -1172,6 +1172,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: // this is a terse 32 update // pos @@ -1211,6 +1212,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: // this is a terse 16 update this_update_precision = 16; -- cgit v1.2.3 From c84aa46ac8544704861a1fe12ef217d38e3f6276 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:36:27 -0800 Subject: CID-111 Checker: MISSING_BREAK Function: LLViewerObject::processUpdateMessage(LLMessageSystem *, void **, unsigned int, e_object_update_type, LLDataPacker *) File: /indra/newview/llviewerobject.cpp not a bug. commented. --- indra/newview/llviewerobject.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 037393a8f9..886f1d9ef5 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -861,6 +861,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 60: this_update_precision = 32; // this is a terse update @@ -900,6 +901,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, htonmemcpy(collision_plane.mV, &data[count], MVT_LLVector4, sizeof(LLVector4)); ((LLVOAvatar*)this)->setFootPlane(collision_plane); count += sizeof(LLVector4); + // fall through case 32: this_update_precision = 16; test_pos_parent.quantize16(-0.5f*size, 1.5f*size, MIN_HEIGHT, MAX_HEIGHT); -- cgit v1.2.3 From e67d2bb5556adbccedc9e75443f7ac873c8d8259 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:37:45 -0800 Subject: CID-110 Checker: MISSING_BREAK Function: LLTransferSourceChannel::updateTransfers() File: /indra/llmessage/lltransfermanager.cpp not a bug, commented. --- indra/llmessage/lltransfermanager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index d67911e8e2..0a71ad95f2 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -855,6 +855,7 @@ void LLTransferSourceChannel::updateTransfers() break; case LLTS_ERROR: llwarns << "Error in transfer dataCallback!" << llendl; + // fall through case LLTS_DONE: // We need to clean up this transfer source. //llinfos << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << llendl; -- cgit v1.2.3 From 4421a51cfeb43b3be6de520acb9f94052fc7e2df Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:39:59 -0800 Subject: CID-109 Checker: MISSING_BREAK Function: operator <<(std::basic_ostream>&, const LLNameValue &) File: /indra/llmessage/llnamevalue.cpp --- indra/llmessage/llnamevalue.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index 01e922eba2..43429b0ab3 100644 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -963,6 +963,7 @@ std::ostream& operator<<(std::ostream& s, const LLNameValue &a) U64_to_str(*a.mNameValueReference.u64, u64_string, sizeof(u64_string)); s << u64_string; } + break; case NVT_VEC3: s << *(a.mNameValueReference.vec3); break; -- cgit v1.2.3 From 481bf863c2194400fec15c3ebaac4a0f4d69ed6d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:49:44 -0800 Subject: CID-129 Checker: NO_EFFECT Function: LLTexLayerTemplate::getLayer(unsigned int) File: /indra/newview/lltexlayer.cpp --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 84c8b9d5f0..b8419e088a 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -1860,7 +1860,7 @@ U32 LLTexLayerTemplate::updateWearableCache() } LLTexLayer* LLTexLayerTemplate::getLayer(U32 i) { - if (mWearableCache.size() <= i || i < 0) + if (mWearableCache.size() <= i) { return NULL; } -- cgit v1.2.3 From e998513aa5e0aad186a16518e1d693fd2b3cf2b7 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:53:40 -0800 Subject: CID-128 Checker: NO_EFFECT Function: LLSpatialGroup::~LLSpatialGroup() File: /indra/newview/llspatialpartition.cpp --- indra/newview/llspatialpartition.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 465221c494..2a57d48f16 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -294,7 +294,7 @@ LLSpatialGroup::~LLSpatialGroup() sNodeCount--; - if (gGLManager.mHasOcclusionQuery && mOcclusionQuery) + if (gGLManager.mHasOcclusionQuery && mOcclusionQuery[LLViewerCamera::sCurCameraID]) { sQueryPool.release(mOcclusionQuery[LLViewerCamera::sCurCameraID]); } -- cgit v1.2.3 From f7f4dae3d82d8ea97f60170c3468fa622639a6ad Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:56:53 -0800 Subject: CID-127 Checker: NO_EFFECT Function: LLOctreeNode::updateMinMax() File: /indra/llmath/lloctree.h --- indra/llmath/lloctree.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index ba8776690a..2f34fb1bb0 100644 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -183,7 +183,6 @@ public: { mMax.mdV[i] = mCenter.mdV[i] + mSize.mdV[i]; mMin.mdV[i] = mCenter.mdV[i] - mSize.mdV[i]; - mCenter.mdV[i] = mCenter.mdV[i]; } } -- cgit v1.2.3 From 132cb6dbfe256cbf1a7b7558b091a63f99a364be Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:58:04 -0800 Subject: CID-126 Checker: NO_EFFECT Function: LLFontBitmapCache::getImageGL(unsigned int) const File: /indra/llrender/llfontbitmapcache.cpp --- indra/llrender/llfontbitmapcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index f01878642a..cc9a012f98 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -72,7 +72,7 @@ LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const LLImageGL *LLFontBitmapCache::getImageGL(U32 bitmap_num) const { - if ((bitmap_num < 0) || (bitmap_num >= mImageGLVec.size())) + if (bitmap_num >= mImageGLVec.size()) return NULL; return mImageGLVec[bitmap_num]; -- cgit v1.2.3 From ccacd7d7acb1a24b754008cd35e9552fed93a1d1 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 13:58:48 -0800 Subject: CID-125 Checker: NO_EFFECT Function: LLFontBitmapCache::getImageRaw(unsigned int) const File: /indra/llrender/llfontbitmapcache.cpp --- indra/llrender/llfontbitmapcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llrender/llfontbitmapcache.cpp b/indra/llrender/llfontbitmapcache.cpp index cc9a012f98..fa231c9e6a 100644 --- a/indra/llrender/llfontbitmapcache.cpp +++ b/indra/llrender/llfontbitmapcache.cpp @@ -64,7 +64,7 @@ void LLFontBitmapCache::init(S32 num_components, LLImageRaw *LLFontBitmapCache::getImageRaw(U32 bitmap_num) const { - if ((bitmap_num < 0) || (bitmap_num >= mImageRawVec.size())) + if (bitmap_num >= mImageRawVec.size()) return NULL; return mImageRawVec[bitmap_num]; -- cgit v1.2.3 From d3f361752e5988800228cff11fcc50289b2f88c7 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Wed, 27 Jan 2010 14:00:02 -0800 Subject: Plumb getting and setting the system audio mute through appviewer Next step is to actually implement the OS-specific calls to do so. Until then, behavior is the same; the status bar will mute/unmute the "master" audio for the viewer *only* --- indra/newview/llappviewer.cpp | 14 +++++++++++++- indra/newview/llappviewer.h | 4 ++++ indra/newview/llappviewermacosx.cpp | 14 ++++++++++++++ indra/newview/llappviewermacosx.h | 3 +++ indra/newview/llstatusbar.cpp | 6 +++--- 5 files changed, 37 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 0e248ff88b..9aa15789ed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2685,7 +2685,7 @@ void LLAppViewer::handleViewerCrash() gMessageSystem->stopLogging(); } - LLWorld::getInstance()->getInfo(gDebugInfo); + if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo); // Close the debug file pApp->writeDebugInfo(); @@ -4405,3 +4405,15 @@ void LLAppViewer::launchUpdater() // LLAppViewer::instance()->forceQuit(); } + +//virtual +void LLAppViewer::setMasterSystemAudioMute(bool mute) +{ + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewer::getMasterSystemAudioMute() +{ + return gSavedSettings.getBOOL("MuteAudio"); +} diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 40e74061b5..a011c5ebfd 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -168,6 +168,10 @@ public: void purgeCache(); // Clear the local cache. + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 1282e437f2..cc38a0940c 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -444,6 +444,20 @@ std::string LLAppViewerMacOSX::generateSerialNumber() return serial_md5; } +//virtual +void LLAppViewerMacOSX::setMasterSystemAudioMute(bool mute) +{ + // XXX TODO: make this actually set the OS's audio mute state + gSavedSettings.setBOOL("MuteAudio", mute); +} + +//virtual +bool LLAppViewerMacOSX::getMasterSystemAudioMute() +{ + // XXX TODO: make this actually get the OS's audio mute state + return gSavedSettings.getBOOL("MuteAudio"); +} + OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) { OSErr result = noErr; diff --git a/indra/newview/llappviewermacosx.h b/indra/newview/llappviewermacosx.h index bc841fc3a7..cbf7e6c209 100644 --- a/indra/newview/llappviewermacosx.h +++ b/indra/newview/llappviewermacosx.h @@ -48,6 +48,9 @@ public: // virtual bool init(); // Override to do application initialization + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); protected: virtual bool restoreErrorTrap(); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 8a36475510..bff32af228 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -354,7 +354,7 @@ void LLStatusBar::refresh() childSetEnabled("stat_btn", net_stats_visible); // update the master volume button state - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); mBtnVolume->setToggleState(mute_audio); } @@ -523,8 +523,8 @@ void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) static void onClickVolume(void* data) { // toggle the master mute setting - BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); - gSavedSettings.setBOOL("MuteAudio", !mute_audio); + bool mute_audio = LLAppViewer::instance()->getMasterSystemAudioMute(); + LLAppViewer::instance()->setMasterSystemAudioMute(!mute_audio); } // sets the static variables necessary for the date -- cgit v1.2.3 From e70d7fca4b55d15547082a67101d5f8935d3a40a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:04:02 -0800 Subject: CID-155 Checker: OVERRUN_DYNAMIC Function: LLImageGL::updatePickMask(int, int, const unsigned char *) File: /indra/llrender/llimagegl.cpp not a bug, AFAICT. --- indra/llrender/llimagegl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 46478ba3c9..8bcc4723ae 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -1716,10 +1716,7 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) { U32 pick_idx = pick_bit/8; U32 pick_offset = pick_bit%8; - if (pick_idx >= size) - { - llerrs << "WTF?" << llendl; - } + llassert(pick_idx < size); mPickMask[pick_idx] |= 1 << pick_offset; } -- cgit v1.2.3 From 78f725cb97cd05e5c716b0014b3cb4d30066d1ca Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:08:40 -0800 Subject: CID-161 Checker: OVERRUN_STATIC Function: LLViewerLogin::setGridChoice(EGridInfo) File: /indra/newview/llviewernetwork.cpp not a bug. clarified for coverity. --- indra/newview/llviewernetwork.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index d7b55d7e97..987d23630a 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -169,6 +169,7 @@ void LLViewerLogin::setGridChoice(EGridInfo grid) if(grid < 0 || grid >= GRID_INFO_COUNT) { llerrs << "Invalid grid index specified." << llendl; + return; } if(mGridChoice != grid || gSavedSettings.getS32("ServerChoice") != grid) -- cgit v1.2.3 From 68422d9505ecf78e793bb5fb29eb8db58e6b6f89 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:15:02 -0800 Subject: CID 159 CID 158 CID 157 Checker: OVERRUN_STATIC Function: LLVertexBuffer::drawRange(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int) const File: /indra/llrender/llvertexbuffer.cpp --- indra/llrender/llvertexbuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 572ae13909..ecfe845b34 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -237,7 +237,7 @@ void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indi llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; @@ -267,7 +267,7 @@ void LLVertexBuffer::draw(U32 mode, U32 count, U32 indices_offset) const llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; @@ -292,7 +292,7 @@ void LLVertexBuffer::drawArrays(U32 mode, U32 first, U32 count) const llerrs << "Wrong vertex buffer bound." << llendl; } - if (mode > LLRender::NUM_MODES) + if (mode >= LLRender::NUM_MODES) { llerrs << "Invalid draw mode: " << mode << llendl; return; -- cgit v1.2.3 From f257f26746eb68e5d192021120e1818800a626a3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:27:57 -0800 Subject: CID 201 Checker: RESOURCE_LEAK Function: LLInitialWearablesFetch::processWearablesMessage() File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index c21cdf9508..acb9e2ebb1 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2527,8 +2527,13 @@ void LLInitialWearablesFetch::processWearablesMessage() { llinfos << "Invalid wearable, type " << wearable_data->mType << " itemID " << wearable_data->mItemID << " assetID " << wearable_data->mAssetID << llendl; + delete wearable_data; } } + else + { + delete wearable_data; + } // Add all current attachments to the requested items as well. LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); -- cgit v1.2.3 From 744def1ae9520a5085057b94f7053bca1b03ddee Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:34:07 -0800 Subject: CID-200 Checker: RESOURCE_LEAK Function: LLPanelEstateInfo::onKickUserCommit(const std::vector, std::allocator>, std::allocator, std::allocator>>> &, std::vector>&) File: /indra/newview/llfloaterregioninfo.cpp we don't use this structure, all the way back to 1.23 --- indra/newview/llfloaterregioninfo.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 85353ce308..d54736e942 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1521,11 +1521,6 @@ void LLPanelEstateInfo::onClickRemoveEstateManager(void* user_data) //--------------------------------------------------------------------------- // Kick from estate methods //--------------------------------------------------------------------------- -struct LLKickFromEstateInfo -{ - LLPanelEstateInfo *mEstatePanelp; - LLUUID mAgentID; -}; void LLPanelEstateInfo::onClickKickUser() { @@ -1547,11 +1542,6 @@ void LLPanelEstateInfo::onKickUserCommit(const std::vector& names, return; } - //keep track of what user they want to kick and other misc info - LLKickFromEstateInfo *kick_info = new LLKickFromEstateInfo(); - kick_info->mEstatePanelp = this; - kick_info->mAgentID = ids[0]; - //Bring up a confirmation dialog LLSD args; args["EVIL_USER"] = names[0]; -- cgit v1.2.3 From 0345701368d9c125c801b98d8f8c0621429e90b5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:37:59 -0800 Subject: CID-199 Checker: RESOURCE_LEAK Function: LLTaskInvFVBridge::removeItem() File: /indra/newview/llpanelobjectinventory.cpp we haven't actually used this new()'d structure, all the way back to 1.23 :/ --- indra/newview/llpanelobjectinventory.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index d4376550d6..5c5c35141e 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -463,10 +463,6 @@ BOOL LLTaskInvFVBridge::removeItem() } else { - remove_data_t* data = new remove_data_t; - data->first = mPanel; - data->second.first = mPanel->getTaskUUID(); - data->second.second.push_back(mUUID); LLSD payload; payload["task_id"] = mPanel->getTaskUUID(); payload["inventory_ids"].append(mUUID); -- cgit v1.2.3 From da3ee22daad52806bbf788a4acee7e7a653ef7d3 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:39:59 -0800 Subject: CID-198 Checker: RESOURCE_LEAK Function: LLTextureFetchWorker::doWork(int) File: /indra/newview/lltexturefetch.cpp --- indra/newview/lltexturefetch.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 5ce6884239..404b79bfaf 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -661,6 +661,8 @@ bool LLTextureFetchWorker::doWork(S32 param) } setPriority(LLWorkerThread::PRIORITY_HIGH | mWorkPriority); mState = SEND_HTTP_REQ; + delete responder; + responder = NULL; } } -- cgit v1.2.3 From 45e15b0b50bca05aba333d9f2a41748bfc1e9496 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:42:32 -0800 Subject: CID-197 Checker: RESOURCE_LEAK Function: LLToolDragAndDrop::giveInventoryCategory(const LLUUID &, LLInventoryCategory *, const LLUUID &) File: /indra/newview/lltooldraganddrop.cpp --- indra/newview/lltooldraganddrop.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 4420b046d8..125c62474e 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -1404,18 +1404,6 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj, gFloaterTools->dirty(); } -struct LLGiveInventoryInfo -{ - LLUUID mToAgentID; - LLUUID mInventoryObjectID; - LLUUID mIMSessionID; - LLGiveInventoryInfo(const LLUUID& to_agent, const LLUUID& obj_id, const LLUUID &im_session_id = LLUUID::null) : - mToAgentID(to_agent), - mInventoryObjectID(obj_id), - mIMSessionID(im_session_id) - {} -}; - void LLToolDragAndDrop::giveInventory(const LLUUID& to_agent, LLInventoryItem* item, const LLUUID& im_session_id) @@ -1584,8 +1572,6 @@ void LLToolDragAndDrop::giveInventoryCategory(const LLUUID& to_agent, } else { - LLGiveInventoryInfo* info = NULL; - info = new LLGiveInventoryInfo(to_agent, cat->getUUID(), im_session_id); LLSD args; args["COUNT"] = llformat("%d",giveable.countNoCopy()); LLSD payload; -- cgit v1.2.3 From f8f34c14c4913d008182a5853613ffbf154d9a26 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:45:44 -0800 Subject: follow-up fix to leak fix. --- indra/newview/llagentwearables.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index acb9e2ebb1..401d74c4ef 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -2530,10 +2530,6 @@ void LLInitialWearablesFetch::processWearablesMessage() delete wearable_data; } } - else - { - delete wearable_data; - } // Add all current attachments to the requested items as well. LLVOAvatarSelf* avatar = gAgent.getAvatarObject(); -- cgit v1.2.3 From b6684dce80db985803c7866c6955d1ca896b1b5c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:54:06 -0800 Subject: CID-196 Checker: RESOURCE_LEAK Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp partial fix. either coverity doesn't grok that the remaining case gets freed way down the line by the callbacks, or.. it really doesnt. --- indra/newview/llpanelgroup.cpp | 8 ++++---- indra/newview/llviewermessage.cpp | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 1d447a22d7..ac58c35b06 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -560,10 +560,10 @@ void LLPanelGroup::chatGroup() } void LLPanelGroup::showNotice(const std::string& subject, - const std::string& message, - const bool& has_inventory, - const std::string& inventory_name, - LLOfferInfo* inventory_offer) + const std::string& message, + const bool& has_inventory, + const std::string& inventory_name, + LLOfferInfo* inventory_offer) { LLPanelGroupNotices* panel_notices = findChild("group_notices_tab_panel"); if(!panel_notices) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 36710e7532..764c54da1a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1987,6 +1987,10 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLPanelGroup::showNotice(subj,mes,group_id,has_inventory,item_name,info); } + else + { + delete info; + } } break; case IM_GROUP_INVITATION: -- cgit v1.2.3 From 576c69dfd9b4418263caa7e14d2d3e52ea8cf5e4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 14:57:02 -0800 Subject: CID-196 Checker: RESOURCE_LEAK Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 764c54da1a..29b7324a0d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2051,6 +2051,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (sizeof(offer_agent_bucket_t) != binary_bucket_size) { LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL; + delete info; break; } bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0]; @@ -2062,6 +2063,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (sizeof(S8) != binary_bucket_size) { LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL; + delete info; break; } info->mType = (LLAssetType::EType) binary_bucket[0]; -- cgit v1.2.3 From 7dc1e2eedbf29396b6614f8e7e39b7938dd5e301 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:04:12 -0800 Subject: CID-195 Checker: RESOURCE_LEAK Function: LLAgentWearables::addLocalTextureObject(EWearableType, LLVOAvatarDefines::ETextureIndex, unsigned int) File: /indra/newview/llagentwearables.cpp --- indra/newview/llagentwearables.cpp | 3 ++- indra/newview/llwearable.cpp | 4 ++-- indra/newview/llwearable.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 401d74c4ef..b0ff3a5626 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1130,8 +1130,9 @@ void LLAgentWearables::addLocalTextureObject(const EWearableType wearable_type, if (!wearable) { llerrs << "Tried to add local texture object to invalid wearable with type " << wearable_type << " and index " << wearable_index << llendl; + return; } - LLLocalTextureObject* lto = new LLLocalTextureObject(); + LLLocalTextureObject lto; wearable->setLocalTextureObject(texture_type, lto); } diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index b789bd3650..8cfb8b1103 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -818,7 +818,7 @@ const LLLocalTextureObject* LLWearable::getConstLocalTextureObject(S32 index) co return NULL; } -void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto) +void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject <o) { if( mTEMap.find(index) != mTEMap.end() ) { @@ -826,7 +826,7 @@ void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject *lto) } if( lto ) { - mTEMap[index] = new LLLocalTextureObject(*lto); + mTEMap[index] = new LLLocalTextureObject(lto); } } diff --git a/indra/newview/llwearable.h b/indra/newview/llwearable.h index 7a579b248e..dae983bcf3 100644 --- a/indra/newview/llwearable.h +++ b/indra/newview/llwearable.h @@ -114,7 +114,7 @@ public: LLLocalTextureObject* getLocalTextureObject(S32 index); const LLLocalTextureObject* getConstLocalTextureObject(S32 index) const; - void setLocalTextureObject(S32 index, LLLocalTextureObject *lto); + void setLocalTextureObject(S32 index, LLLocalTextureObject <o); void addVisualParam(LLVisualParam *param); void setVisualParams(); void setVisualParamWeight(S32 index, F32 value, BOOL upload_bake); -- cgit v1.2.3 From c5abe04923c8968c38fbca67182d7e3fbd0723d9 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:07:04 -0800 Subject: CID-188 Checker: RESOURCE_LEAK Function: LLTemplateParser::LLTemplateParser(LLTemplateTokenizer &) File: /indra/llmessage/llmessagetemplateparser.cpp --- indra/llmessage/llmessagetemplateparser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 283547ea00..2ddbf3e0df 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -403,6 +403,10 @@ LLTemplateParser::LLTemplateParser(LLTemplateTokenizer & tokens): { mMessages.push_back(templatep); } + else + { + delete templatep; + } } if(!tokens.wantEOF()) -- cgit v1.2.3 From 635290cc8774f0db67d2ee633d287ecf7d767907 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:09:25 -0800 Subject: CID-186 Checker: RESOURCE_LEAK Function: LLStringUtilBase::addCRLF(std::basic_string, std::allocator>&) File: /indra/llcommon/llstring.h --- indra/llcommon/llstring.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h index 31e70e0fe4..62cedcde4e 100644 --- a/indra/llcommon/llstring.h +++ b/indra/llcommon/llstring.h @@ -882,6 +882,7 @@ void LLStringUtilBase::addCRLF(std::basic_string& string) } string.assign(t, size); + delete[] t; } } -- cgit v1.2.3 From fa886566b66639d65db4a7d4399cdbf2552a3d50 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:10:34 -0800 Subject: CID-184 Checker: RESOURCE_LEAK Function: LLPluginProcessChild::receiveMessageRaw(const std::basic_string, std::allocator>&) File: /indra/llplugin/llpluginprocesschild.cpp --- indra/llplugin/llpluginprocesschild.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp index 07fc82c770..11c924cadf 100644 --- a/indra/llplugin/llpluginprocesschild.cpp +++ b/indra/llplugin/llpluginprocesschild.cpp @@ -359,6 +359,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message) else { LL_WARNS("Plugin") << "Couldn't create a shared memory segment!" << LL_ENDL; + delete region; } } -- cgit v1.2.3 From 43218577740fa97a99160008568e6e0a36f892e5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:37:28 -0800 Subject: CID-220 Checker: STREAM_FORMAT_STATE Function: encode_character(std::basic_ostream>&, char) File: /indra/llcommon/lluri.cpp --- indra/llcommon/lluri.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp index f6e8f01f0e..9d4f3a98f0 100644 --- a/indra/llcommon/lluri.cpp +++ b/indra/llcommon/lluri.cpp @@ -46,10 +46,21 @@ void encode_character(std::ostream& ostr, std::string::value_type val) { - ostr << "%" << std::uppercase << std::hex << std::setw(2) << std::setfill('0') + ostr << "%" + + << std::uppercase + << std::hex + << std::setw(2) + << std::setfill('0') + // VWR-4010 Cannot cast to U32 because sign-extension on // chars > 128 will result in FFFFFFC3 instead of F3. - << static_cast(static_cast(val)); + << static_cast(static_cast(val)) + + // reset stream state + << std::nouppercase + << std::dec + << std::setfill(' '); } // static -- cgit v1.2.3 From a7c3fde789b0f15f0ccf650e59dc352451fc4e4a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:45:07 -0800 Subject: partial fix for CID-219 Checker: STREAM_FORMAT_STATE Function: LLDate::toStream(std::basic_ostream>&) const File: /indra/llcommon/lldate.cpp --- indra/llcommon/lldate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index ca7e471bf2..e3323fcfbf 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -152,7 +152,8 @@ void LLDate::toStream(std::ostream& s) const s << '.' << std::setw(2) << (int)(exp_time.tm_usec / (LL_APR_USEC_PER_SEC / 100)); } - s << 'Z'; + s << 'Z' + << setfill(' '); } bool LLDate::split(S32 *year, S32 *month, S32 *day, S32 *hour, S32 *min, S32 *sec) const -- cgit v1.2.3 From 9e2ba40d13cd03525ce137435fd817a55758bc8c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:45:41 -0800 Subject: less dumb partial fix for CID-219 --- indra/llcommon/lldate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/lldate.cpp b/indra/llcommon/lldate.cpp index e3323fcfbf..de7f2ead74 100644 --- a/indra/llcommon/lldate.cpp +++ b/indra/llcommon/lldate.cpp @@ -153,7 +153,7 @@ void LLDate::toStream(std::ostream& s) const << (int)(exp_time.tm_usec / (LL_APR_USEC_PER_SEC / 100)); } s << 'Z' - << setfill(' '); + << std::setfill(' '); } bool LLDate::split(S32 *year, S32 *month, S32 *day, S32 *hour, S32 *min, S32 *sec) const -- cgit v1.2.3 From e133a9824695d0286ca7717b1eb6a1c57748b898 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:49:22 -0800 Subject: CID-227 Checker: STRING_OVERFLOW Function: CProcessor::AnalyzeIntelProcessor() File: /indra/llcommon/llprocessor.cpp --- indra/llcommon/llprocessor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index 469e544b16..8a4a4a8f9a 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -281,7 +281,8 @@ bool CProcessor::AnalyzeIntelProcessor() // already have a string here from GetCPUInfo(). JC if ( CPUInfo.uiBrandID < LL_ARRAY_SIZE(INTEL_BRAND) ) { - strcpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID]); + strncpy(CPUInfo.strBrandID, INTEL_BRAND[CPUInfo.uiBrandID], sizeof(CPUInfo.strBrandID)-1); + CPUInfo.strBrandID[sizeof(CPUInfo.strBrandID)-1]='\0'; if (CPUInfo.uiBrandID == 3 && CPUInfo.uiModel == 6) { -- cgit v1.2.3 From e7c17cb29b63fb85bf345133ed78a026a224af30 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:53:56 -0800 Subject: a follow-up fix. --- indra/newview/llwearable.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llwearable.cpp b/indra/newview/llwearable.cpp index 8cfb8b1103..d093031bea 100644 --- a/indra/newview/llwearable.cpp +++ b/indra/newview/llwearable.cpp @@ -824,10 +824,7 @@ void LLWearable::setLocalTextureObject(S32 index, LLLocalTextureObject <o) { mTEMap.erase(index); } - if( lto ) - { - mTEMap[index] = new LLLocalTextureObject(lto); - } + mTEMap[index] = new LLLocalTextureObject(lto); } -- cgit v1.2.3 From 94e5625f2c5bfef9d6cd7e5ffdda3a0e64717d93 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:58:02 -0800 Subject: CID-255 Checker: UNINIT Function: process_improved_im(LLMessageSystem *, void **) File: /indra/newview/llviewermessage.cpp --- indra/newview/llviewermessage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 29b7324a0d..aa77c9602f 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1933,7 +1933,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) if (has_inventory) { - info = new LLOfferInfo; + info = new LLOfferInfo(); info->mIM = IM_GROUP_NOTICE; info->mFromID = from_id; -- cgit v1.2.3 From b3c1d0dc07a16b47626968ae55b5e6a725d8d722 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 15:59:56 -0800 Subject: CID-254 Checker: UNINIT Function: LLCacheName::Impl::processUUIDRequest(LLMessageSystem *, bool) File: /indra/llmessage/llcachename.cpp --- indra/llmessage/llcachename.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 3078d80552..dbec2816c8 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -125,7 +125,7 @@ private: }; ReplySender::ReplySender(LLMessageSystem* msg) - : mMsg(msg), mPending(false) + : mMsg(msg), mPending(false), mCurrIsGroup(false) { } ReplySender::~ReplySender() -- cgit v1.2.3 From 1afc7ecc142c9ec066e5761497a4011698b50c8e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:11:32 -0800 Subject: CID-388 Checker: UNINIT_CTOR Function: LLPanelPlaceInfo::LLPanelPlaceInfo() File: /indra/newview/llpanelplaceinfo.cpp --- indra/newview/llpanellandmarkinfo.cpp | 2 +- indra/newview/llpanellandmarkinfo.h | 2 +- indra/newview/llpanelplaceinfo.cpp | 3 ++- indra/newview/llpanelplaceinfo.h | 8 +++++--- indra/newview/llpanelplaceprofile.cpp | 2 +- indra/newview/llpanelplaceprofile.h | 2 +- 6 files changed, 11 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index c792fd4fe3..7a17d4a1f0 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -108,7 +108,7 @@ void LLPanelLandmarkInfo::resetLocation() } // virtual -void LLPanelLandmarkInfo::setInfoType(INFO_TYPE type) +void LLPanelLandmarkInfo::setInfoType(EInfoType type) { LLPanel* landmark_info_panel = getChild("landmark_info_panel"); diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 2a9949ae41..b3dc3f5ad9 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -49,7 +49,7 @@ public: /*virtual*/ void resetLocation(); - /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void setInfoType(EInfoType type); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index 5f75668722..9ebc8ca2b9 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -58,6 +58,7 @@ LLPanelPlaceInfo::LLPanelPlaceInfo() mPosRegion(), mScrollingPanelMinHeight(0), mScrollingPanelWidth(0), + mInfoType(UNKNOWN), mScrollingPanel(NULL), mScrollContainer(NULL) {} @@ -120,7 +121,7 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id) } //virtual -void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) +void LLPanelPlaceInfo::setInfoType(EInfoType type) { mTitle->setText(mCurrentTitle); diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index 3091f7ed24..deedbd2b0f 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -54,8 +54,10 @@ class LLViewerInventoryCategory; class LLPanelPlaceInfo : public LLPanel, LLRemoteParcelInfoObserver { public: - enum INFO_TYPE + enum EInfoType { + UNKNOWN, + AGENT, CREATE_LANDMARK, LANDMARK, @@ -79,7 +81,7 @@ public: // Depending on how the panel was triggered // (from landmark or current location, or other) // sets a corresponding title and contents. - virtual void setInfoType(INFO_TYPE type); + virtual void setInfoType(EInfoType type); // Requests remote parcel info by parcel ID. void sendParcelInfoRequest(); @@ -114,7 +116,7 @@ protected: std::string mCurrentTitle; S32 mScrollingPanelMinHeight; S32 mScrollingPanelWidth; - INFO_TYPE mInfoType; + EInfoType mInfoType; LLScrollContainer* mScrollContainer; LLPanel* mScrollingPanel; diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 3c798639d4..8d689b2c5e 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -207,7 +207,7 @@ void LLPanelPlaceProfile::resetLocation() } // virtual -void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) +void LLPanelPlaceProfile::setInfoType(EInfoType type) { bool is_info_type_agent = type == AGENT; diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index 8ca9526875..e77b441567 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -48,7 +48,7 @@ public: /*virtual*/ void resetLocation(); - /*virtual*/ void setInfoType(INFO_TYPE type); + /*virtual*/ void setInfoType(EInfoType type); /*virtual*/ void processParcelInfo(const LLParcelData& parcel_data); -- cgit v1.2.3 From 23147ee1ee3fd37025fb777507a8e19810d94f3b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:13:11 -0800 Subject: CID-387 Checker: UNINIT_CTOR Function: LLTeleportHistoryPanel::ContextMenu::ContextMenu() File: /indra/newview/llpanelteleporthistory.cpp --- indra/newview/llpanelteleporthistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 1b8fb49641..6005881148 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -308,7 +308,7 @@ void LLTeleportHistoryFlatItemStorage::purge() //////////////////////////////////////////////////////////////////////////////// LLTeleportHistoryPanel::ContextMenu::ContextMenu() : - mMenu(NULL) + mMenu(NULL), mIndex(0) { } -- cgit v1.2.3 From 7814eaec0082dfc505076afca33b51eeb6f591fe Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:16:28 -0800 Subject: CID-386 Checker: UNINIT_CTOR Function: LLFolderBridge::LLFolderBridge(LLInventoryPanel *, const LLUUID &) File: /indra/newview/llinventorybridge.h --- indra/newview/llinventorybridge.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 759d0cba18..eeb8246b11 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -320,8 +320,12 @@ public: LLViewerInventoryCategory* getCategory() const; protected: - LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) : - LLInvFVBridge(inventory, uuid), mCallingCards(FALSE), mWearables(FALSE) {} + LLFolderBridge(LLInventoryPanel* inventory, const LLUUID& uuid) + : LLInvFVBridge(inventory, uuid), + + mCallingCards(FALSE), + mWearables(FALSE), + mMenu(NULL) {} // menu callbacks static void pasteClipboard(void* user_data); -- cgit v1.2.3 From bfda8b2cfee5512f6737ea2802b69bdac66ed3ab Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:19:32 -0800 Subject: CID-385 Checker: UNINIT_CTOR Function: LLToolBar::LLToolBar() File: /indra/newview/lltoolbar.cpp --- indra/newview/lltoolbar.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index edbaa0d45a..6df574a21a 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -95,9 +95,12 @@ F32 LLToolBar::sInventoryAutoOpenTime = 1.f; // LLToolBar::LLToolBar() -: LLPanel() + : LLPanel(), + + mInventoryAutoOpen(FALSE), + mNumUnreadIMs(0) #if LL_DARWIN - , mResizeHandle(NULL) + , mResizeHandle(NULL), #endif // LL_DARWIN { setIsChrome(TRUE); -- cgit v1.2.3 From bfd21c0886ccb9ebbb1f32785b008134c20e3de5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:20:44 -0800 Subject: CID-384 Checker: UNINIT_CTOR Function: LLSelectNode::LLSelectNode(const LLSelectNode&) File: /indra/newview/llselectmgr.cpp --- indra/newview/llselectmgr.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 60a095506b..6f76715e73 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5093,6 +5093,7 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep) mName = nodep.mName; mDescription = nodep.mDescription; mCategory = nodep.mCategory; + mInventorySerial = 0; mSavedPositionLocal = nodep.mSavedPositionLocal; mSavedPositionGlobal = nodep.mSavedPositionGlobal; mSavedScale = nodep.mSavedScale; -- cgit v1.2.3 From 344eaeb39bc8fa059960d44b0b0853d92530c411 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:27:02 -0800 Subject: CID-376 Checker: UNINIT_CTOR Function: LLViewerPart::LLViewerPart() File: /indra/newview/llviewerpartsim.cpp --- indra/newview/llviewerpartsim.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp index 841a7ccc5e..6b480ccf8e 100644 --- a/indra/newview/llviewerpartsim.cpp +++ b/indra/newview/llviewerpartsim.cpp @@ -81,6 +81,7 @@ F32 calc_desired_size(LLViewerCamera* camera, LLVector3 pos, LLVector2 scale) LLViewerPart::LLViewerPart() : mPartID(0), mLastUpdateTime(0.f), + mSkipOffset(0.f), mVPCallback(NULL), mImagep(NULL) { -- cgit v1.2.3 From 0ea467ad06acc8e90f46cf9b97d1509e287bbe5d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:31:41 -0800 Subject: CID-375 Checker: UNINIT_CTOR Function: LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw *, int) File: /indra/newview/llviewertexture.cpp --- indra/newview/llviewertexture.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index b80dc7d902..0ad269392d 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1029,6 +1029,8 @@ void LLViewerFetchedTexture::init(bool firstinit) // does not contain this image. mIsMissingAsset = FALSE; + mLoadedCallbackDesiredDiscardLevel = 0; + mNeedsCreateTexture = FALSE; mIsRawImageValid = FALSE; @@ -1041,6 +1043,7 @@ void LLViewerFetchedTexture::init(bool firstinit) mFetchPriority = 0; mDownloadProgress = 0.f; mFetchDeltaTime = 999999.f; + mRequestDeltaTime = 0.f; mForSculpt = FALSE ; mIsFetched = FALSE ; -- cgit v1.2.3 From 73d92f0847936f51fc0e8f12140d0880f73a2b11 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:38:02 -0800 Subject: CID-374 Checker: UNINIT_CTOR Function: LLPickInfo::LLPickInfo(const LLCoordGL &, unsigned int, int, int, void (*)(const LLPickInfo&)) File: /indra/newview/llviewerwindow.cpp remove some fat, dead members. --- indra/newview/llviewerwindow.cpp | 8 ++++---- indra/newview/llviewerwindow.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 424b84a756..b4c73dba26 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4849,10 +4849,10 @@ LLPickInfo::LLPickInfo() } LLPickInfo::LLPickInfo(const LLCoordGL& mouse_pos, - MASK keyboard_mask, - BOOL pick_transparent, - BOOL pick_uv_coords, - void (*pick_callback)(const LLPickInfo& pick_info)) + MASK keyboard_mask, + BOOL pick_transparent, + BOOL pick_uv_coords, + void (*pick_callback)(const LLPickInfo& pick_info)) : mMousePt(mouse_pos), mKeyMask(keyboard_mask), mPickCallback(pick_callback), diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index b488276a18..c0a9180b53 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -126,9 +126,6 @@ private: void updateXYCoords(); BOOL mWantSurfaceInfo; // do we populate mUVCoord, mNormal, mBinormal? - U8 mPickBuffer[PICK_DIAMETER * PICK_DIAMETER * 4]; - F32 mPickDepthBuffer[PICK_DIAMETER * PICK_DIAMETER]; - BOOL mPickParcelWall; }; -- cgit v1.2.3 From 373f6264082256a5c7877fb8b99336bf9cf1ca6b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:41:11 -0800 Subject: CID-373 Checker: UNINIT_CTOR Function: LLTexLayerSet::LLTexLayerSet(LLVOAvatarSelf *) File: /indra/newview/lltexlayer.cpp --- indra/newview/lltexlayer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index b8419e088a..ddb6405c41 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -567,6 +567,7 @@ LLTexLayerSet::LLTexLayerSet(LLVOAvatarSelf* const avatar) : mAvatar( avatar ), mUpdatesEnabled( FALSE ), mIsVisible( TRUE ), + mBakedTexIndex(LLVOAvatarDefines::BAKED_HEAD), mInfo( NULL ) { } -- cgit v1.2.3 From f2e202e6a4bd033e3d9aad3197f5aa491076245b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:43:48 -0800 Subject: CID-368 Checker: UNINIT_CTOR Function: LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject *, LLFlexibleObjectData *) File: /indra/newview/llflexibleobject.cpp --- indra/newview/llflexibleobject.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp index fc8790c172..aea2de8e92 100644 --- a/indra/newview/llflexibleobject.cpp +++ b/indra/newview/llflexibleobject.cpp @@ -66,6 +66,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD mInitializedRes = -1; mSimulateRes = 0; mFrameNum = 0; + mCollisionSphereRadius = 0.f; mRenderRes = 1; if(mVO->mDrawable.notNull()) -- cgit v1.2.3 From 8bf32990fcb2426a9d177da6db631a0eda2d3219 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:45:42 -0800 Subject: CID-367 Checker: UNINIT_CTOR Function: LLFace::LLFace(LLDrawable *, LLViewerObject *) File: /indra/newview/llface.h --- indra/newview/llface.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index eef774426a..965ac1cad0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -157,6 +157,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mGeomIndex = 0; mIndicesCount = 0; mIndicesIndex = 0; + mIndexInTex = 0; mTexture = NULL; mTEOffset = -1; -- cgit v1.2.3 From 6c92a724a1893eceac644a65ff5660e73ba6d42e Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 27 Jan 2010 16:48:09 -0800 Subject: Implemented LLAppViewerMacOSX::setMasterSystemAudioMute() and LLAppViewerMacOSX::getMasterSystemAudioMute() using CoreAudio APIs. This required adding a reference to the CoreAudio framework in indra/newview/CMakeLists.txt --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llappviewermacosx.cpp | 50 +++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7ddeb90d29..4c0c895a7d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1064,11 +1064,13 @@ if (DARWIN) find_library(APPKIT_LIBRARY AppKit) find_library(COCOA_LIBRARY Cocoa) find_library(IOKIT_LIBRARY IOKit) + find_library(COREAUDIO_LIBRARY CoreAudio) set(viewer_LIBRARIES ${COCOA_LIBRARY} ${AGL_LIBRARY} ${IOKIT_LIBRARY} + ${COREAUDIO_LIBRARY} ) # Add resource files to the project. diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index cc38a0940c..f8f8f50cd6 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -50,6 +50,7 @@ #include #include "lldir.h" #include +#include // for systemwide mute class LLMediaCtrl; // for LLURLDispatcher namespace @@ -444,18 +445,57 @@ std::string LLAppViewerMacOSX::generateSerialNumber() return serial_md5; } +static AudioDeviceID get_default_audio_output_device(void) +{ + AudioDeviceID device = 0; + UInt32 size; + OSStatus err; + + size = sizeof(device); + err = AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &size, &device); + if(err != noErr) + { + LL_DEBUGS("SystemMute") << "Couldn't get default audio output device (0x" << std::hex << err << ")" << LL_ENDL; + } + + return device; +} + //virtual -void LLAppViewerMacOSX::setMasterSystemAudioMute(bool mute) +void LLAppViewerMacOSX::setMasterSystemAudioMute(bool new_mute) { - // XXX TODO: make this actually set the OS's audio mute state - gSavedSettings.setBOOL("MuteAudio", mute); + AudioDeviceID device = get_default_audio_output_device(); + + if(device != 0) + { + UInt32 mute = new_mute; + OSStatus err = AudioDeviceSetProperty(device, NULL, 0, false, kAudioDevicePropertyMute, sizeof(mute), &mute); + if(err != noErr) + { + LL_INFOS("SystemMute") << "Couldn't set audio mute property (0x" << std::hex << err << ")" << LL_ENDL; + } + } } //virtual bool LLAppViewerMacOSX::getMasterSystemAudioMute() { - // XXX TODO: make this actually get the OS's audio mute state - return gSavedSettings.getBOOL("MuteAudio"); + // Assume the system isn't muted + UInt32 mute = 0; + + AudioDeviceID device = get_default_audio_output_device(); + + if(device != 0) + { + UInt32 size = sizeof(mute); + OSStatus err = AudioDeviceGetProperty(device, 0, false, kAudioDevicePropertyMute, &size, &mute); + if(err != noErr) + { + LL_DEBUGS("SystemMute") << "Couldn't get audio mute property (0x" << std::hex << err << ")" << LL_ENDL; + } + } + + return (mute != 0); } OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) -- cgit v1.2.3 From 63aef899bc6274d2b7fd90de8ed7e01cb6bb7359 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:49:51 -0800 Subject: CID-365 Checker: UNINIT_CTOR Function: LLSurfacePatch::LLSurfacePatch() File: /indra/newview/llsurfacepatch.cpp --- indra/newview/llsurfacepatch.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra') diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 0ce794addb..48e4a6ccc7 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -60,6 +60,7 @@ LLSurfacePatch::LLSurfacePatch() : mHeightsGenerated(FALSE), mDataOffset(0), mDataZ(NULL), + mDataNorm(NULL), mVObjp(NULL), mOriginRegion(0.f, 0.f, 0.f), mCenterRegion(0.f, 0.f, 0.f), @@ -355,12 +356,14 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride) normal %= c2; normal.normVec(); + llassert(mDataNorm); *(mDataNorm + surface_stride * y + x) = normal; } const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const { U32 surface_stride = mSurfacep->getGridsPerEdge(); + llassert(mDataNorm); return *(mDataNorm + surface_stride * y + x); } @@ -402,6 +405,7 @@ void LLSurfacePatch::updateVerticalStats() U32 i, j, k; F32 z, total; + llassert(mDataZ); z = *(mDataZ); mMinZ = z; -- cgit v1.2.3 From 056ca2ae5c1a145483c75e85fa7b1bee746b2627 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:51:46 -0800 Subject: CID-359 Checker: UNINIT_CTOR Function: LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture *, const LLUUID &) File: /indra/newview/lllocaltextureobject.cpp --- indra/newview/lllocaltextureobject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lllocaltextureobject.cpp b/indra/newview/lllocaltextureobject.cpp index 6bcbe6f58c..69eb5fce2f 100644 --- a/indra/newview/lllocaltextureobject.cpp +++ b/indra/newview/lllocaltextureobject.cpp @@ -47,7 +47,9 @@ LLLocalTextureObject::LLLocalTextureObject() : mImage = NULL; } -LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id) +LLLocalTextureObject::LLLocalTextureObject(LLViewerFetchedTexture* image, const LLUUID& id) : + mIsBakedReady(FALSE), + mDiscard(MAX_DISCARD_LEVEL+1) { mImage = image; gGL.getTexUnit(0)->bind(mImage); -- cgit v1.2.3 From ce436d20f09269dd3715b29a1ed0addb132b35cb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:53:18 -0800 Subject: CID-360 Checker: UNINIT_CTOR Function: LLViewerVisualParamInfo::LLViewerVisualParamInfo() File: /indra/newview/llviewervisualparam.cpp --- indra/newview/llviewervisualparam.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewervisualparam.cpp b/indra/newview/llviewervisualparam.cpp index b088ef0730..fad398e00b 100644 --- a/indra/newview/llviewervisualparam.cpp +++ b/indra/newview/llviewervisualparam.cpp @@ -46,6 +46,7 @@ LLViewerVisualParamInfo::LLViewerVisualParamInfo() : mWearableType( WT_INVALID ), + mCrossWearable(FALSE), mCamDist( 0.5f ), mCamAngle( 0.f ), mCamElevation( 0.f ), -- cgit v1.2.3 From d9661c3d2a26dd4379a6f57dc8227ee2e73f8ec6 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:57:10 -0800 Subject: CID-358 Checker: UNINIT_CTOR Function: LLTextureCache::Entry::Entry() File: /indra/newview/lltexturecache.h --- indra/newview/lltexturecache.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltexturecache.h b/indra/newview/lltexturecache.h index 4203cbbc43..64ec881fc3 100644 --- a/indra/newview/lltexturecache.h +++ b/indra/newview/lltexturecache.h @@ -59,7 +59,12 @@ private: }; struct Entry { - Entry() {} + Entry() : + mBodySize(0), + mImageSize(0), + mTime(0) + { + } Entry(const LLUUID& id, S32 imagesize, S32 bodysize, U32 time) : mID(id), mImageSize(imagesize), mBodySize(bodysize), mTime(time) {} void init(const LLUUID& id, U32 time) { mID = id, mImageSize = 0; mBodySize = 0; mTime = time; } -- cgit v1.2.3 From 6d68de504f7ffd356f465916fe8bac26de47d5ae Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 16:58:58 -0800 Subject: CID-355 Checker: UNINIT_CTOR Function: LLVOVolume::LLVOVolume(const LLUUID &, unsigned char, LLViewerRegion *) File: /indra/newview/llvovolume.cpp --- indra/newview/llvovolume.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 295c0c8010..bfe38c14ba 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -180,8 +180,10 @@ LLVOVolume::LLVOVolume(const LLUUID &id, const LLPCode pcode, LLViewerRegion *re mRelativeXform.setIdentity(); mRelativeXformInvTrans.setIdentity(); + mFaceMappingChanged = FALSE; mLOD = MIN_LOD; mTextureAnimp = NULL; + mVolumeChanged = FALSE; mVObjRadius = LLVector3(1,1,0.5f).length(); mNumFaces = 0; mLODChanged = FALSE; -- cgit v1.2.3 From 6e55c9549a31550b7dc73972462334c8b1e32f7c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:01:02 -0800 Subject: CID-354 Checker: UNINIT_CTOR Function: LLViewerJointMesh::LLViewerJointMesh() File: /indra/newview/llviewerjointmesh.cpp --- indra/newview/llviewerjointmesh.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp index 5b8902dec4..1a67fc0966 100644 --- a/indra/newview/llviewerjointmesh.cpp +++ b/indra/newview/llviewerjointmesh.cpp @@ -147,6 +147,7 @@ LLViewerJointMesh::LLViewerJointMesh() mTexture( NULL ), mLayerSet( NULL ), mTestImageName( 0 ), + mFaceIndexCount(0), mIsTransparent(FALSE) { -- cgit v1.2.3 From e48e9db756f55f1834256abfcc37038799cca8c0 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:04:43 -0800 Subject: CID-353 Checker: UNINIT_CTOR Function: LLViewerJoint::LLViewerJoint() File: /indra/newview/llviewerjoint.cpp --- indra/newview/llviewerjoint.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index c2591ac8d7..c425d95ff8 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -66,6 +66,7 @@ LLViewerJoint::LLViewerJoint() mMinPixelArea = DEFAULT_LOD; mPickName = PN_DEFAULT; mVisible = TRUE; + mMeshID = 0; } -- cgit v1.2.3 From 0d2ce43c545b40a3ce5a90bc894b79ae8b11b726 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 27 Jan 2010 17:06:49 -0800 Subject: CID-348 Checker: UNINIT_CTOR Function: LLViewerShaderMgr::LLViewerShaderMgr() File: /indra/newview/llviewershadermgr.cpp --- indra/newview/llviewershadermgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index 6dc9f5c465..86b1a8c910 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -135,7 +135,8 @@ LLGLSLShader gLuminanceGatherProgram; GLint gAvatarMatrixParam; LLViewerShaderMgr::LLViewerShaderMgr() : - mVertexShaderLevel(SHADER_COUNT, 0) + mVertexShaderLevel(SHADER_COUNT, 0), + mMaxAvatarShaderLevel(0) { /// Make sure WL Sky is the first program mShaderList.push_back(&gWLSkyProgram); -- cgit v1.2.3 From 52bd13e1f5cd661ff359e36be8c0496d06c19d1c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Wed, 27 Jan 2010 17:21:16 -0800 Subject: Fix for broken mac build (surplus comma in the LLToolBar constructor initializers). --- indra/newview/lltoolbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 6df574a21a..e7dc7ae522 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -100,7 +100,7 @@ LLToolBar::LLToolBar() mInventoryAutoOpen(FALSE), mNumUnreadIMs(0) #if LL_DARWIN - , mResizeHandle(NULL), + , mResizeHandle(NULL) #endif // LL_DARWIN { setIsChrome(TRUE); -- cgit v1.2.3 From ab68d36518dc8a320b465217e89e1207ee4b00fd Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 28 Jan 2010 08:22:26 +0200 Subject: working on normal EXT-4261 Cannot use Keyboard to navigate to search result in my landmarks tab --HG-- branch : product-engine --- indra/newview/llfolderview.cpp | 100 +++++++++++++++++++++++++++++++ indra/newview/llfolderview.h | 5 ++ indra/newview/llplacesinventorypanel.cpp | 17 ++++++ indra/newview/llplacesinventorypanel.h | 2 + 4 files changed, 124 insertions(+) (limited to 'indra') diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index b833c611bf..c6135d3bc3 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -1508,10 +1508,26 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { if (next == last_selected) { + //special case for LLAccordionCtrl + if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed + { + clearSelection(); + return TRUE; + } return FALSE; } setSelection( next, FALSE, TRUE ); } + else + { + //special case for LLAccordionCtrl + if(notifyParent(LLSD().with("action","select_next")) > 0 )//message was processed + { + clearSelection(); + return TRUE; + } + return FALSE; + } } scrollToShowSelection(); mSearchString.clear(); @@ -1556,6 +1572,13 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask ) { if (prev == this) { + // If case we are in accordion tab notify parent to go to the previous accordion + if(notifyParent(LLSD().with("action","select_prev")) > 0 )//message was processed + { + clearSelection(); + return TRUE; + } + return FALSE; } setSelection( prev, FALSE, TRUE ); @@ -2241,6 +2264,83 @@ void LLFolderView::updateRenamerPosition() } } +bool LLFolderView::selectFirstItem() +{ + for (folders_t::iterator iter = mFolders.begin(); + iter != mFolders.end();) + { + LLFolderViewFolder* folder = (*iter ); + if (folder->getVisible()) + { + LLFolderViewItem* itemp = folder->getNextFromChild(0,true); + if(itemp) + setSelection(itemp,FALSE,TRUE); + return true; + } + + } + for(items_t::iterator iit = mItems.begin(); + iit != mItems.end(); ++iit) + { + LLFolderViewItem* itemp = (*iit); + if (itemp->getVisible()) + { + setSelection(itemp,FALSE,TRUE); + return true; + } + } + return false; +} +bool LLFolderView::selectLastItem() +{ + for(items_t::reverse_iterator iit = mItems.rbegin(); + iit != mItems.rend(); ++iit) + { + LLFolderViewItem* itemp = (*iit); + if (itemp->getVisible()) + { + setSelection(itemp,FALSE,TRUE); + return true; + } + } + for (folders_t::reverse_iterator iter = mFolders.rbegin(); + iter != mFolders.rend();) + { + LLFolderViewFolder* folder = (*iter); + if (folder->getVisible()) + { + LLFolderViewItem* itemp = folder->getPreviousFromChild(0,true); + if(itemp) + setSelection(itemp,FALSE,TRUE); + return true; + } + } + return false; +} + + +S32 LLFolderView::notify(const LLSD& info) +{ + if(info.has("action")) + { + std::string str_action = info["action"]; + if(str_action == "select_first") + { + setFocus(true); + selectFirstItem(); + return 1; + + } + else if(str_action == "select_last") + { + setFocus(true); + selectLastItem(); + return 1; + } + } + return 0; +} + ///---------------------------------------------------------------------------- /// Local function definitions diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index 89e1865e35..56ebdfcf79 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -266,6 +266,8 @@ public: LLPanel* getParentPanel() { return mParentPanel; } // DEBUG only void dumpSelectionInformation(); + + virtual S32 notify(const LLSD& info) ; private: void updateRenamerPosition(); @@ -278,6 +280,9 @@ protected: void finishRenamingItem( void ); void closeRenamer( void ); + + bool selectFirstItem(); + bool selectLastItem(); protected: LLHandle mPopupMenuHandle; diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp index 4de953a59d..8edeebaeeb 100644 --- a/indra/newview/llplacesinventorypanel.cpp +++ b/indra/newview/llplacesinventorypanel.cpp @@ -143,6 +143,23 @@ void LLPlacesInventoryPanel::restoreFolderState() getRootFolder()->scrollToShowSelection(); } +S32 LLPlacesInventoryPanel::notify(const LLSD& info) +{ + if(info.has("action")) + { + std::string str_action = info["action"]; + if(str_action == "select_first") + { + return getRootFolder()->notify(info); + } + else if(str_action == "select_last") + { + return getRootFolder()->notify(info); + } + } + return 0; +} + /************************************************************************/ /* PROTECTED METHODS */ /************************************************************************/ diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h index 7b34045d32..86937e7c7f 100644 --- a/indra/newview/llplacesinventorypanel.h +++ b/indra/newview/llplacesinventorypanel.h @@ -57,6 +57,8 @@ public: void saveFolderState(); void restoreFolderState(); + virtual S32 notify(const LLSD& info) ; + private: LLSaveFolderState* mSavedFolderState; }; -- cgit v1.2.3 From 3c616d627bcaa28e0e7d31eb8f6c04e3847adb3d Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 28 Jan 2010 09:16:13 +0200 Subject: fix for EXT-4742 Group Info panel state resets on save --HG-- branch : product-engine --- indra/newview/llpanelgroup.cpp | 15 ++++++++++++--- indra/newview/llpanelgroup.h | 7 +------ 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 1d447a22d7..23db7ad226 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -89,8 +89,8 @@ BOOL LLPanelGroupTab::postBuild() LLPanelGroup::LLPanelGroup() : LLPanel(), LLGroupMgrObserver( LLUUID() ), - mAllowEdit( TRUE ) - ,mShowingNotifyDialog(false) + mSkipRefresh(FALSE), + mShowingNotifyDialog(false) { // Set up the factory callbacks. // Roles sub tabs @@ -168,7 +168,6 @@ BOOL LLPanelGroup::postBuild() button = getChild("btn_refresh"); button->setClickedCallback(onBtnRefresh, this); - button->setVisible(mAllowEdit); getChild("btn_create")->setVisible(false); @@ -492,7 +491,12 @@ bool LLPanelGroup::apply(LLPanelGroupTab* tab) std::string apply_mesg; if(tab->apply( apply_mesg ) ) + { + //we skip refreshing group after ew manually apply changes since its very annoying + //for those who are editing group + mSkipRefresh = TRUE; return true; + } if ( !apply_mesg.empty() ) { @@ -539,6 +543,11 @@ void LLPanelGroup::draw() void LLPanelGroup::refreshData() { + if(mSkipRefresh) + { + mSkipRefresh = FALSE; + return; + } LLGroupMgr::getInstance()->clearGroupData(getID()); setGroupID(getID()); diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 8c84695677..6e23eedffb 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -85,9 +85,6 @@ public: virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - void setAllowEdit(BOOL v) { mAllowEdit = v; } - - static void refreshCreatedGroup(const LLUUID& group_id); static void showNotice(const std::string& subject, @@ -126,7 +123,7 @@ protected: LLTimer mRefreshTimer; - BOOL mAllowEdit; + BOOL mSkipRefresh; std::string mDefaultNeedsApplyMesg; std::string mWantApplyMesg; @@ -169,8 +166,6 @@ public: virtual BOOL isVisibleByAgent(LLAgent* agentp); - void setAllowEdit(BOOL v) { mAllowEdit = v; } - virtual void setGroupID(const LLUUID& id) {mGroupID = id;}; void notifyObservers() {}; -- cgit v1.2.3 From 1631ca7173d77576ed18fb35b1843c5a28cbb5e4 Mon Sep 17 00:00:00 2001 From: Ychebotarev ProductEngine Date: Thu, 28 Jan 2010 10:34:12 +0200 Subject: fix for normal EXT-4512 [BSI] Can't minimize Mini-Map also this fix EXT-2119 even if its marked as fixed... --HG-- branch : product-engine --- indra/newview/llfloatermap.cpp | 1 + indra/newview/skins/default/xui/en/floater_map.xml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llfloatermap.cpp b/indra/newview/llfloatermap.cpp index d18f127f85..568f4b254e 100644 --- a/indra/newview/llfloatermap.cpp +++ b/indra/newview/llfloatermap.cpp @@ -112,6 +112,7 @@ BOOL LLFloaterMap::postBuild() sendChildToBack(getDragHandle()); setIsChrome(TRUE); + getDragHandle()->setTitleVisible(TRUE); // keep onscreen gFloaterView->adjustToFitScreen(this, FALSE); diff --git a/indra/newview/skins/default/xui/en/floater_map.xml b/indra/newview/skins/default/xui/en/floater_map.xml index 3a5ceed5fb..3ddb7bc349 100644 --- a/indra/newview/skins/default/xui/en/floater_map.xml +++ b/indra/newview/skins/default/xui/en/floater_map.xml @@ -1,14 +1,17 @@ Date: Thu, 28 Jan 2010 11:32:02 +0200 Subject: fix for normal EXT-3807 ABOUT LAND/OBJECTS: (i) icon is badly positioned now I wonder how was this working before... --HG-- branch : product-engine --- indra/llui/llscrolllistctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 78386220d9..478e270c98 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -1534,7 +1534,7 @@ LLRect LLScrollListCtrl::getCellRect(S32 row_index, S32 column_index) S32 rect_bottom = getRowOffsetFromIndex(row_index); LLScrollListColumn* columnp = getColumn(column_index); cell_rect.setOriginAndSize(rect_left, rect_bottom, - rect_left + columnp->getWidth(), mLineHeight); + /*rect_left + */columnp->getWidth(), mLineHeight); return cell_rect; } -- cgit v1.2.3 From b1fa6bb3421f5a281b36156a04fcbe0ab6b4bcfb Mon Sep 17 00:00:00 2001 From: Denis Serdjuk Date: Thu, 28 Jan 2010 11:42:20 +0200 Subject: fix for EXT-4186 List items are displayed as links in the FlatList if match URL regexp allow_html attribute was updated for titles of group list items, group info panel, landmark info panel and for a title of floaters. --HG-- branch : product-engine --- indra/llui/lldraghandle.cpp | 1 + indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml | 1 + indra/newview/skins/default/xui/en/panel_group_list_item.xml | 1 + indra/newview/skins/default/xui/en/panel_landmark_info.xml | 1 + indra/newview/skins/default/xui/en/panel_place_profile.xml | 2 ++ 5 files changed, 6 insertions(+) (limited to 'indra') diff --git a/indra/llui/lldraghandle.cpp b/indra/llui/lldraghandle.cpp index a93c666648..832f148902 100644 --- a/indra/llui/lldraghandle.cpp +++ b/indra/llui/lldraghandle.cpp @@ -113,6 +113,7 @@ void LLDragHandleTop::setTitle(const std::string& title) params.follows.flags(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); params.font_shadow(LLFontGL::DROP_SHADOW_SOFT); params.use_ellipses = true; + params.allow_html = false; //cancel URL replacement in floater title mTitleBox = LLUICtrlFactory::create (params); addChild( mTitleBox ); } diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 0893c204e7..1968d96205 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -37,6 +37,7 @@ background_visible="true" top="2" width="23" /> Date: Thu, 28 Jan 2010 15:51:49 +0200 Subject: fixed EXT-3841 [BSI] "Send IM..." choosable in IM floater context menu --HG-- branch : product-engine --- indra/llcommon/llchat.h | 4 +++- indra/newview/llchathistory.cpp | 8 ++++++++ indra/newview/llimfloater.cpp | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/llchat.h b/indra/llcommon/llchat.h index 5af7991006..46456882ba 100644 --- a/indra/llcommon/llchat.h +++ b/indra/llcommon/llchat.h @@ -87,7 +87,8 @@ public: mTimeStr(), mPosAgent(), mURL(), - mChatStyle(CHAT_STYLE_NORMAL) + mChatStyle(CHAT_STYLE_NORMAL), + mSessionID() { } std::string mText; // UTF-8 line of text @@ -102,6 +103,7 @@ public: LLVector3 mPosAgent; std::string mURL; EChatStyle mChatStyle; + LLUUID mSessionID; }; #endif diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d6a7edee5b..2cdbd18996 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -34,6 +34,7 @@ #include "llinstantmessage.h" +#include "llimview.h" #include "llchathistory.h" #include "llpanel.h" #include "lluictrlfactory.h" @@ -183,6 +184,7 @@ public: void setup(const LLChat& chat,const LLStyle::Params& style_params) { mAvatarID = chat.mFromID; + mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; gCacheName->get(mAvatarID, FALSE, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3, _4)); if(chat.mFromID.isNull()) @@ -305,6 +307,11 @@ protected: menu->setItemEnabled("Remove Friend", false); } + if (mSessionID == LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, mAvatarID)) + { + menu->setItemVisible("Send IM", false); + } + menu->buildDrawLabels(); menu->updateParent(LLMenuGL::sMenuContainer); LLMenuGL::showPopup(this, menu, x, y); @@ -344,6 +351,7 @@ protected: std::string mFirstName; std::string mLastName; std::string mFrom; + LLUUID mSessionID; S32 mMinUserNameWidth; }; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 73597e7de3..c0f22fcea2 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -599,6 +599,7 @@ void LLIMFloater::updateMessages() LLChat chat; chat.mFromID = from_id; + chat.mSessionID = mSessionID; chat.mFromName = from; chat.mText = message; chat.mTimeStr = time; -- cgit v1.2.3 From da08cc05af85ac334cabd943a5d9fcbcaa1500b6 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 28 Jan 2010 18:28:08 +0200 Subject: fixed win build --HG-- branch : product-engine --- indra/newview/lllocationhistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index f494f7d7c1..47139758e5 100644 --- a/indra/newview/lllocationhistory.cpp +++ b/indra/newview/lllocationhistory.cpp @@ -62,7 +62,7 @@ void LLLocationHistory::addItem(const LLLocationHistoryItem& item) { { mItems.erase(mItems.begin(), mItems.end()-max_items); } - llassert(mItems.size() <= max_items); + llassert((S32) mItems.size() <= max_items); } /* -- cgit v1.2.3 From 70b6d603ed5b8915c6dace4ba6d017bbc1484955 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 28 Jan 2010 18:30:58 +0200 Subject: got rid of LLFloaterIMPanel usage for EXT-1196 Stalls on startup in LLPanelFriends::refreshNames --HG-- branch : product-engine --- indra/newview/llfloaterchatterbox.cpp | 4 +- indra/newview/llimview.cpp | 237 ++-------------------------------- indra/newview/llimview.h | 28 +--- indra/newview/llmutelist.cpp | 6 - indra/newview/lltoolbar.cpp | 12 +- 5 files changed, 19 insertions(+), 268 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 84b423399e..774caaec90 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -216,11 +216,11 @@ void LLFloaterChatterBox::onOpen(const LLSD& key) } else if (key.isDefined()) { - LLFloaterIMPanel* impanel = gIMMgr->findFloaterBySession(key.asUUID()); + /*LLFloaterIMPanel* impanel = gIMMgr->findFloaterBySession(key.asUUID()); if (impanel) { impanel->openFloater(); - } + }*/ } } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c4b1d7a9f4..213862df4b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -538,13 +538,6 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con gIMMgr->startCall(new_session_id); } } - - //*TODO remove this "floater" stuff when Communicate Floater is gone - LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(old_session_id); - if (floater) - { - floater->sessionInitReplyReceived(new_session_id); - } } void LLIMModel::testMessages() @@ -679,15 +672,6 @@ bool LLIMModel::proccessOnlineOfflineNotification( const LLUUID& session_id, const std::string& utf8_text) { - // Add message to old one floater - LLFloaterIMPanel *floater = gIMMgr->findFloaterBySession(session_id); - if ( floater ) - { - if ( !utf8_text.empty() ) - { - floater->addHistoryLine(utf8_text, LLUIColorTable::instance().getColor("SystemChatColor")); - } - } // Add system message to history return addMessage(session_id, SYSTEM_FROM, LLUUID::null, utf8_text); } @@ -955,9 +939,6 @@ void LLIMModel::sendMessage(const std::string& utf8_text, history_echo += ": " + utf8_text; - LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id); - if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID()); - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); if (speaker_mgr) { @@ -1275,33 +1256,16 @@ LLUUID LLIMMgr::computeSessionID( return session_id; } -inline LLFloater* getFloaterBySessionID(const LLUUID session_id) -{ - LLFloater* floater = NULL; - if ( gIMMgr ) - { - floater = dynamic_cast < LLFloater* > - ( gIMMgr->findFloaterBySession(session_id) ); - } - if ( !floater ) - { - floater = dynamic_cast < LLFloater* > - ( LLIMFloater::findInstance(session_id) ); - } - return floater; -} - void LLIMMgr::showSessionStartError( const std::string& error_string, const LLUUID session_id) { - const LLFloater* floater = getFloaterBySessionID (session_id); - if (!floater) return; + if (!hasSession(session_id)) return; LLSD args; args["REASON"] = LLTrans::getString(error_string); - args["RECIPIENT"] = floater->getTitle(); + args["RECIPIENT"] = LLIMModel::getInstance()->getName(session_id); LLSD payload; payload["session_id"] = session_id; @@ -1339,12 +1303,11 @@ LLIMMgr::showSessionForceClose( const std::string& reason_string, const LLUUID session_id) { - const LLFloater* floater = getFloaterBySessionID (session_id); - if (!floater) return; + if (!hasSession(session_id)) return; LLSD args; - args["NAME"] = floater->getTitle(); + args["NAME"] = LLIMModel::getInstance()->getName(session_id); args["REASON"] = LLTrans::getString(reason_string); LLSD payload; @@ -1366,7 +1329,7 @@ LLIMMgr::onConfirmForceCloseError( //only 1 option really LLUUID session_id = notification["payload"]["session_id"]; - LLFloater* floater = getFloaterBySessionID (session_id); + LLFloater* floater = LLIMFloater::findInstance(session_id); if ( floater ) { floater->closeFloater(FALSE); @@ -2144,7 +2107,6 @@ void LLIMMgr::addMessage( return; } - LLFloaterIMPanel* floater; LLUUID new_session_id = session_id; if (new_session_id.isNull()) { @@ -2163,32 +2125,7 @@ void LLIMMgr::addMessage( if (new_session) { LLIMModel::getInstance()->newSession(new_session_id, fixed_session_name, dialog, other_participant_id); - } - - floater = findFloaterBySession(new_session_id); - if (!floater) - { - floater = findFloaterBySession(other_participant_id); - if (floater) - { - llinfos << "found the IM session " << session_id - << " by participant " << other_participant_id << llendl; - } - } - - // create IM window as necessary - if(!floater) - { - floater = createFloater( - new_session_id, - other_participant_id, - fixed_session_name, - dialog, - FALSE); - } - if (new_session) - { // When we get a new IM, and if you are a god, display a bit // of information about the source. This is to help liaisons // when answering questions. @@ -2207,50 +2144,13 @@ void LLIMMgr::addMessage( //<< "*** region_id: " << region_id << std::endl //<< "*** position: " << position << std::endl; - floater->addHistoryLine(bonus_info.str(), LLUIColorTable::instance().getColor("SystemChatColor")); LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, bonus_info.str()); } make_ui_sound("UISndNewIncomingIMSession"); } - // now add message to floater - bool is_from_system = target_id.isNull() || (from == SYSTEM_FROM); - const LLColor4& color = ( is_from_system ? - LLUIColorTable::instance().getColor("SystemChatColor") : - LLUIColorTable::instance().getColor("IMChatColor")); - if ( !link_name ) - { - floater->addHistoryLine(msg,color); // No name to prepend, so just add the message normally - } - else - { - floater->addHistoryLine(msg, color, true, other_participant_id, from); // Insert linked name to front of message - } - LLIMModel::instance().addMessage(new_session_id, from, other_participant_id, msg); - - if( !LLFloaterReg::instanceVisible("communicate") && !floater->getVisible()) - { - LLFloaterChatterBox* chat_floater = LLFloaterChatterBox::getInstance(); - - //if the IM window is not open and the floater is not visible (i.e. not torn off) - LLFloater* previouslyActiveFloater = chat_floater->getActiveFloater(); - - // select the newly added floater (or the floater with the new line added to it). - // it should be there. - chat_floater->selectFloater(floater); - - //there was a previously unseen IM, make that old tab flashing - //it is assumed that the most recently unseen IM tab is the one current selected/active - if ( previouslyActiveFloater && getIMReceived() ) - { - chat_floater->setFloaterFlashing(previouslyActiveFloater, TRUE); - } - - //notify of a new IM - notifyNewIM(); - } } void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& message_name, const LLSD& args) @@ -2414,21 +2314,6 @@ LLUUID LLIMMgr::addSession( LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice); } - //*TODO remove this "floater" thing when Communicate Floater's gone - LLFloaterIMPanel* floater = findFloaterBySession(session_id); - if(!floater) - { - // On creation, use the first element of ids as the - // "other_participant_id" - floater = createFloater( - session_id, - other_participant_id, - name, - dialog, - TRUE, - ids); - } - //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; @@ -2439,7 +2324,7 @@ LLUUID LLIMMgr::addSession( // Only warn for regular IMs - not group IMs if( dialog == IM_NOTHING_SPECIAL ) { - noteMutedUsers(session_id, floater, ids); + noteMutedUsers(session_id, ids); } return session_id; @@ -2460,14 +2345,6 @@ void LLIMMgr::removeSession(const LLUUID& session_id) { llassert_always(hasSession(session_id)); - //*TODO remove this floater thing when Communicate Floater is being deleted (IB) - LLFloaterIMPanel* floater = findFloaterBySession(session_id); - if(floater) - { - mFloaters.erase(floater->getHandle()); - LLFloaterChatterBox::getInstance()->removeFloater(floater); - } - clearPendingInvitation(session_id); clearPendingAgentListUpdates(session_id); @@ -2577,50 +2454,12 @@ void LLIMMgr::onInviteNameLookup(LLSD payload, const LLUUID& id, const std::stri LLFloaterReg::showInstance("incoming_call", payload, TRUE); } +//*TODO disconnects all sessions void LLIMMgr::disconnectAllSessions() { - LLFloaterIMPanel* floater = NULL; - std::set >::iterator handle_it; - for(handle_it = mFloaters.begin(); - handle_it != mFloaters.end(); - ) - { - floater = (LLFloaterIMPanel*)handle_it->get(); - - // MUST do this BEFORE calling floater->onClose() because that may remove the item from the set, causing the subsequent increment to crash. - ++handle_it; - - if (floater) - { - floater->setEnabled(FALSE); - floater->closeFloater(TRUE); - } - } + //*TODO disconnects all IM sessions } - -// This method returns the im panel corresponding to the uuid -// provided. The uuid can either be a session id or an agent -// id. Returns NULL if there is no matching panel. -LLFloaterIMPanel* LLIMMgr::findFloaterBySession(const LLUUID& session_id) -{ - LLFloaterIMPanel* rv = NULL; - std::set >::iterator handle_it; - for(handle_it = mFloaters.begin(); - handle_it != mFloaters.end(); - ++handle_it) - { - rv = (LLFloaterIMPanel*)handle_it->get(); - if(rv && session_id == rv->getSessionID()) - { - break; - } - rv = NULL; - } - return rv; -} - - BOOL LLIMMgr::hasSession(const LLUUID& session_id) { return LLIMModel::getInstance()->findIMSession(session_id) != NULL; @@ -2804,49 +2643,14 @@ bool LLIMMgr::isVoiceCall(const LLUUID& session_id) return im_session->mStartedAsIMCall; } -// create a floater and update internal representation for -// consistency. Returns the pointer, caller (the class instance since -// it is a private method) is not responsible for deleting the -// pointer. Add the floater to this but do not select it. -LLFloaterIMPanel* LLIMMgr::createFloater( - const LLUUID& session_id, - const LLUUID& other_participant_id, - const std::string& session_label, - EInstantMessage dialog, - BOOL user_initiated, - const LLDynamicArray& ids) -{ - if (session_id.isNull()) - { - llwarns << "Creating LLFloaterIMPanel with null session ID" << llendl; - } - - llinfos << "LLIMMgr::createFloater: from " << other_participant_id - << " in session " << session_id << llendl; - LLFloaterIMPanel* floater = new LLFloaterIMPanel(session_label, - session_id, - other_participant_id, - ids, - dialog); - LLTabContainer::eInsertionPoint i_pt = user_initiated ? LLTabContainer::RIGHT_OF_CURRENT : LLTabContainer::END; - LLFloaterChatterBox::getInstance()->addFloater(floater, FALSE, i_pt); - mFloaters.insert(floater->getHandle()); - return floater; -} - void LLIMMgr::noteOfflineUsers( const LLUUID& session_id, - LLFloaterIMPanel* floater, const LLDynamicArray& ids) { S32 count = ids.count(); if(count == 0) { const std::string& only_user = LLTrans::getString("only_user_message"); - if (floater) - { - floater->addHistoryLine(only_user, LLUIColorTable::instance().getColor("SystemChatColor")); - } LLIMModel::getInstance()->addMessage(session_id, SYSTEM_FROM, LLUUID::null, only_user); } else @@ -2870,7 +2674,7 @@ void LLIMMgr::noteOfflineUsers( } } -void LLIMMgr::noteMutedUsers(const LLUUID& session_id, LLFloaterIMPanel* floater, +void LLIMMgr::noteMutedUsers(const LLUUID& session_id, const LLDynamicArray& ids) { // Don't do this if we don't have a mute list. @@ -2891,9 +2695,6 @@ void LLIMMgr::noteMutedUsers(const LLUUID& session_id, LLFloaterIMPanel* floater { LLUIString muted = LLTrans::getString("muted_message"); - //*TODO remove this "floater" thing when Communicate Floater's gone - floater->addHistoryLine(muted); - im_model->addMessage(session_id, SYSTEM_FROM, LLUUID::null, muted); break; } @@ -2914,12 +2715,6 @@ void LLIMMgr::processIMTypingStop(const LLIMInfo* im_info) void LLIMMgr::processIMTypingCore(const LLIMInfo* im_info, BOOL typing) { LLUUID session_id = computeSessionID(im_info->mIMType, im_info->mFromID); - LLFloaterIMPanel* floater = findFloaterBySession(session_id); - if (floater) - { - floater->processIMTyping(im_info, typing); - } - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if ( im_floater ) { @@ -2965,15 +2760,6 @@ public: speaker_mgr->updateSpeakers(gIMMgr->getPendingAgentListUpdates(session_id)); } - LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(session_id); - if (floaterp) - { - if ( body.has("session_info") ) - { - floaterp->processSessionUpdate(body["session_info"]); - } - } - LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if ( im_floater ) { @@ -3068,11 +2854,6 @@ public: const LLSD& input) const { LLUUID session_id = input["body"]["session_id"].asUUID(); - LLFloaterIMPanel* floaterp = gIMMgr->findFloaterBySession(session_id); - if (floaterp) - { - floaterp->processSessionUpdate(input["body"]["info"]); - } LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if ( im_floater ) { diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 0386ff234d..17406025f2 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -41,7 +41,6 @@ class LLFloaterChatterBox; class LLUUID; -class LLFloaterIMPanel; class LLFriendObserver; class LLCallDialogManager; class LLIMSpeakerMgr; @@ -386,11 +385,6 @@ public: BOOL hasSession(const LLUUID& session_id); - // This method returns the im panel corresponding to the uuid - // provided. The uuid must be a session id. Returns NULL if there - // is no matching panel. - LLFloaterIMPanel* findFloaterBySession(const LLUUID& session_id); - static LLUUID computeSessionID(EInstantMessage dialog, const LLUUID& other_participant_id); void clearPendingInvitation(const LLUUID& session_id); @@ -402,10 +396,6 @@ public: const LLSD& updates); void clearPendingAgentListUpdates(const LLUUID& session_id); - //HACK: need a better way of enumerating existing session, or listening to session create/destroy events - //@deprecated, is used only by LLToolBox, which is not used anywhere, right? (IB) - const std::set >& getIMFloaterHandles() { return mFloaters; } - void addSessionObserver(LLIMSessionObserver *); void removeSessionObserver(LLIMSessionObserver *); @@ -436,23 +426,12 @@ private: */ void removeSession(const LLUUID& session_id); - // create a panel and update internal representation for - // consistency. Returns the pointer, caller (the class instance - // since it is a private method) is not responsible for deleting - // the pointer. - LLFloaterIMPanel* createFloater(const LLUUID& session_id, - const LLUUID& target_id, - const std::string& name, - EInstantMessage dialog, - BOOL user_initiated = FALSE, - const LLDynamicArray& ids = LLDynamicArray()); - // This simple method just iterates through all of the ids, and // prints a simple message if they are not online. Used to help // reduce 'hello' messages to the linden employees unlucky enough // to have their calling card in the default inventory. - void noteOfflineUsers(const LLUUID& session_id, LLFloaterIMPanel* panel, const LLDynamicArray& ids); - void noteMutedUsers(const LLUUID& session_id, LLFloaterIMPanel* panel, const LLDynamicArray& ids); + void noteOfflineUsers(const LLUUID& session_id, const LLDynamicArray& ids); + void noteMutedUsers(const LLUUID& session_id, const LLDynamicArray& ids); void processIMTypingCore(const LLIMInfo* im_info, BOOL typing); @@ -464,9 +443,6 @@ private: private: - //*TODO should be deleted when Communicate Floater is being deleted - std::set > mFloaters; - typedef std::list session_observers_list_t; session_observers_list_t mSessionObservers; diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index c1666f5666..45e5408b1e 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -472,12 +472,6 @@ void notify_automute_callback(const LLUUID& agent_id, const std::string& first_n if (reason == LLMuteList::AR_IM) { - LLFloaterIMPanel *timp = gIMMgr->findFloaterBySession(agent_id); - if (timp) - { - timp->addHistoryLine(message); - } - LLIMModel::getInstance()->addMessage(agent_id, SYSTEM_FROM, LLUUID::null, message); } } diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index e7dc7ae522..4a66d88fa2 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -290,7 +290,7 @@ void LLToolBar::updateCommunicateList() std::set >::const_iterator floater_handle_it; - if (gIMMgr->getIMFloaterHandles().size() > 0) + /*if (gIMMgr->getIMFloaterHandles().size() > 0) { communicate_button->addSeparator(ADD_TOP); } @@ -316,7 +316,7 @@ void LLToolBar::updateCommunicateList() } itemp = communicate_button->addElement(im_sd, ADD_TOP); } - } + }*/ communicate_button->setValue(selected); } @@ -340,7 +340,7 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data) } else if (selected_option.asString() == "redock") { - LLFloaterChatterBox* chatterbox_instance = LLFloaterChatterBox::getInstance(); + /*LLFloaterChatterBox* chatterbox_instance = LLFloaterChatterBox::getInstance(); if(chatterbox_instance) { chatterbox_instance->addFloater(LLFloaterMyFriends::getInstance(), FALSE); @@ -361,7 +361,7 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data) } } LLFloaterReg::showInstance("communicate", session_to_show); - } + }*/ } else if (selected_option.asString() == "mute list") { @@ -369,11 +369,11 @@ void LLToolBar::onClickCommunicate(LLUICtrl* ctrl, const LLSD& user_data) } else if (selected_option.isUndefined()) // user just clicked the communicate button, treat as toggle { - LLFloaterReg::toggleInstance("communicate"); + /*LLFloaterReg::toggleInstance("communicate");*/ } else // otherwise selection_option is undifined or a specific IM session id { - LLFloaterReg::showInstance("communicate", selected_option); + /*LLFloaterReg::showInstance("communicate", selected_option);*/ } } -- cgit v1.2.3 From 69c676c6eb90be2cf251db1cdc57e94e0357e706 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 28 Jan 2010 18:34:42 +0200 Subject: got rid of llimpanel.h includes for EXT-1196 Stalls on startup in LLPanelFriends::refreshNames --HG-- branch : product-engine --- indra/newview/llmutelist.cpp | 1 - indra/newview/lltoolbar.cpp | 1 - indra/newview/llviewerfloaterreg.cpp | 1 - 3 files changed, 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 45e5408b1e..2d3c4b187e 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -58,7 +58,6 @@ #include "llagent.h" #include "llviewergenericmessage.h" // for gGenericDispatcher #include "llworld.h" //for particle system banning -#include "llimpanel.h" #include "llimview.h" #include "llnotifications.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 4a66d88fa2..1177aba84e 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -70,7 +70,6 @@ #include "llviewerwindow.h" #include "lltoolgrab.h" #include "llcombobox.h" -#include "llimpanel.h" #include "lllayoutstack.h" #if LL_DARWIN diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index e87d380e4d..89afc7822b 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -69,7 +69,6 @@ #include "llfloaterhud.h" #include "llfloaterimagepreview.h" #include "llimfloater.h" -#include "llimpanel.h" #include "llfloaterinspect.h" #include "llfloaterinventory.h" #include "llfloaterjoystick.h" -- cgit v1.2.3 From cbde80b8795cddf21125652ef8987e023b650e32 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 28 Jan 2010 18:40:51 +0200 Subject: got rid of llfloaterfriends.h includes for EXT-1196 Stalls on startup in LLPanelFriends::refreshNames --HG-- branch : product-engine --- indra/newview/lltoolbar.cpp | 7 +++---- indra/newview/llviewerfloaterreg.cpp | 1 - indra/newview/llvoiceclient.cpp | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltoolbar.cpp b/indra/newview/lltoolbar.cpp index 1177aba84e..404eab9249 100644 --- a/indra/newview/lltoolbar.cpp +++ b/indra/newview/lltoolbar.cpp @@ -54,7 +54,6 @@ #include "lltooldraganddrop.h" #include "llfloaterinventory.h" #include "llfloaterchatterbox.h" -#include "llfloaterfriends.h" #include "llfloatersnapshot.h" #include "llinventorypanel.h" #include "lltoolmgr.h" @@ -264,12 +263,12 @@ void LLToolBar::updateCommunicateList() communicate_button->removeall(); - LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater(); + //LLFloater* frontmost_floater = LLFloaterChatterBox::getInstance()->getActiveFloater(); LLScrollListItem* itemp = NULL; LLSD contact_sd; contact_sd["value"] = "contacts"; - contact_sd["columns"][0]["value"] = LLFloaterMyFriends::getInstance()->getShortTitle(); + /*contact_sd["columns"][0]["value"] = LLFloaterMyFriends::getInstance()->getShortTitle(); if (LLFloaterMyFriends::getInstance() == frontmost_floater) { contact_sd["columns"][0]["font"]["name"] = "SANSSERIF_SMALL"; @@ -279,7 +278,7 @@ void LLToolBar::updateCommunicateList() { selected = "contacts"; } - } + }*/ itemp = communicate_button->addElement(contact_sd, ADD_TOP); communicate_button->addSeparator(ADD_TOP); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 89afc7822b..3aca11963a 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -156,7 +156,6 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("contacts", "floater_my_friends.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 8ca0fd6ef6..02a2d8c8cf 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -72,8 +72,6 @@ #include "llvoavatarself.h" #include "llvoicechannel.h" -#include "llfloaterfriends.h" //VIVOX, inorder to refresh communicate panel - // for base64 decoding #include "apr_base64.h" -- cgit v1.2.3 From a67598f762fd64506c9a867160007456d2327cb8 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 29 Jan 2010 14:18:31 +0200 Subject: cleaned cmake list a bit from llimpanel, lltoolbar and lloverlaybar --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 4c0c895a7d..41b08942eb 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -241,7 +241,6 @@ set(viewer_SOURCE_FILES llimfloater.cpp llimfloatercontainer.cpp llimhandler.cpp - llimpanel.cpp llimview.cpp llinspect.cpp llinspectavatar.cpp @@ -297,7 +296,6 @@ set(viewer_SOURCE_FILES llnotificationscripthandler.cpp llnotificationtiphandler.cpp lloutputmonitorctrl.cpp - lloverlaybar.cpp llpanelavatar.cpp llpanelavatartag.cpp llpanelblockedlist.cpp @@ -418,7 +416,6 @@ set(viewer_SOURCE_FILES lltoastnotifypanel.cpp lltoastpanel.cpp lltool.cpp - lltoolbar.cpp lltoolbrush.cpp lltoolcomp.cpp lltooldraganddrop.cpp @@ -747,7 +744,6 @@ set(viewer_HEADER_FILES llhudview.h llimfloater.h llimfloatercontainer.h - llimpanel.h llimview.h llinspect.h llinspectavatar.h @@ -799,7 +795,6 @@ set(viewer_HEADER_FILES llnotificationhandler.h llnotificationmanager.h lloutputmonitorctrl.h - lloverlaybar.h llpanelavatar.h llpanelavatartag.h llpanelblockedlist.h @@ -923,7 +918,6 @@ set(viewer_HEADER_FILES lltoastnotifypanel.h lltoastpanel.h lltool.h - lltoolbar.h lltoolbrush.h lltoolcomp.h lltooldraganddrop.h -- cgit v1.2.3 From 56d06544376dea0704d139b28d17d44e3c6fadf9 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 29 Jan 2010 14:18:56 +0200 Subject: got rid from lltoolbar.h includes --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 2 -- indra/newview/llviewermenu.cpp | 1 - indra/newview/llviewerwindow.cpp | 1 - 3 files changed, 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9aa15789ed..9bb0977c1a 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -163,7 +163,6 @@ #include "llvotree.h" #include "llvoavatar.h" #include "llfolderview.h" -#include "lltoolbar.h" #include "llagentpilot.h" #include "llvovolume.h" #include "llflexibleobject.h" @@ -414,7 +413,6 @@ static void settings_to_globals() LLVOAvatar::sVisibleInFirstPerson = gSavedSettings.getBOOL("FirstPersonAvatarVisible"); // clamp auto-open time to some minimum usable value LLFolderView::sAutoOpenTime = llmax(0.25f, gSavedSettings.getF32("FolderAutoOpenDelay")); - LLToolBar::sInventoryAutoOpenTime = gSavedSettings.getF32("InventoryAutoOpenDelay"); LLSelectMgr::sRectSelectInclusive = gSavedSettings.getBOOL("RectangleSelectInclusive"); LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections"); LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 96251f7571..12e2fa5156 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -82,7 +82,6 @@ #include "llsidetray.h" #include "llstatusbar.h" #include "lltextureview.h" -#include "lltoolbar.h" #include "lltoolcomp.h" #include "lltoolmgr.h" #include "lltoolpie.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b4c73dba26..c43f58c8a2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -147,7 +147,6 @@ #include "lltexturefetch.h" #include "lltextureview.h" #include "lltool.h" -#include "lltoolbar.h" #include "lltoolcomp.h" #include "lltooldraganddrop.h" #include "lltoolface.h" -- cgit v1.2.3 From ac0fb461f6ad9e81349bd8814201a641a24f40a3 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 29 Jan 2010 14:42:57 +0200 Subject: got rid of lloverlaybar, llmediaremotectrl, llvoiceremotectrl dependencies, updated cmake list --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 4 ---- indra/newview/llviewercontrol.cpp | 31 ------------------------------- indra/newview/llviewerfloaterreg.cpp | 4 ---- indra/newview/llviewerparcelmgr.cpp | 1 - indra/newview/llviewerwindow.cpp | 1 - 5 files changed, 41 deletions(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 41b08942eb..3389ecbf4d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -272,7 +272,6 @@ set(viewer_SOURCE_FILES llmaniptranslate.cpp llmediactrl.cpp llmediadataclient.cpp - llmediaremotectrl.cpp llmemoryview.cpp llmenucommands.cpp llmetricperformancetester.cpp @@ -510,7 +509,6 @@ set(viewer_SOURCE_FILES llvoground.cpp llvoicechannel.cpp llvoiceclient.cpp - llvoiceremotectrl.cpp llvoicevisualizer.cpp llvoinventorylistener.cpp llvopartgroup.cpp @@ -776,7 +774,6 @@ set(viewer_HEADER_FILES llmaniptranslate.h llmediactrl.h llmediadataclient.h - llmediaremotectrl.h llmemoryview.h llmenucommands.h llmetricperformancetester.h @@ -1010,7 +1007,6 @@ set(viewer_HEADER_FILES llvoground.h llvoicechannel.h llvoiceclient.h - llvoiceremotectrl.h llvoicevisualizer.h llvoinventorylistener.h llvopartgroup.h diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 57434bd1e4..64eabe65cf 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -63,7 +63,6 @@ #include "llviewerjoystick.h" #include "llviewerparcelmgr.h" #include "llparcel.h" -#include "lloverlaybar.h" #include "llkeyboard.h" #include "llerrorcontrol.h" #include "llappviewer.h" @@ -257,35 +256,6 @@ static bool handleJoystickChanged(const LLSD& newvalue) return true; } -static bool handleAudioStreamMusicChanged(const LLSD& newvalue) -{ - if (gAudiop) - { - if ( newvalue.asBoolean() ) - { - if (LLViewerParcelMgr::getInstance()->getAgentParcel() - && !LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL().empty()) - { - // if music isn't playing, start it - if (gOverlayBar && !gOverlayBar->musicPlaying()) - { - LLOverlayBar::toggleMusicPlay(NULL); - } - } - } - else - { - // if music is playing, stop it. - if (gOverlayBar && gOverlayBar->musicPlaying()) - { - LLOverlayBar::toggleMusicPlay(NULL); - } - - } - } - return true; -} - static bool handleUseOcclusionChanged(const LLSD& newvalue) { LLPipeline::sUseOcclusion = (newvalue.asBoolean() && gGLManager.mHasOcclusionQuery @@ -592,7 +562,6 @@ void settings_setup_listeners() gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); - gSavedSettings.getControl("AudioStreamingMusic")->getSignal()->connect(boost::bind(&handleAudioStreamMusicChanged, _2)); gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); gSavedSettings.getControl("MuteMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _2)); diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 3aca11963a..f93d78bf33 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -115,7 +115,6 @@ #include "llinspectobject.h" #include "llinspectremoteobject.h" #include "llinspecttoast.h" -#include "llmediaremotectrl.h" #include "llmoveview.h" #include "llnearbychat.h" #include "llpanelblockedlist.h" @@ -263,8 +262,5 @@ void LLViewerFloaterReg::registerFloaters() // *NOTE: Please keep these alphabetized for easier merges - // debug use only - LLFloaterReg::add("media_remote_ctrl", "floater_media_remote.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving } diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 10a95443f1..e233356632 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -69,7 +69,6 @@ #include "llviewerparceloverlay.h" #include "llviewerregion.h" #include "llworld.h" -#include "lloverlaybar.h" #include "roles_constants.h" #include "llweb.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index c43f58c8a2..03cc6e1262 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -128,7 +128,6 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" -#include "lloverlaybar.h" #include "llpreviewtexture.h" #include "llprogressview.h" #include "llresmgr.h" -- cgit v1.2.3 From f8bde94b9f9c83202f32268b57539fbe5c7cf271 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Fri, 29 Jan 2010 15:41:41 +0200 Subject: completely got rid of Communicate floater and stuff --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 4 ---- indra/newview/llgroupactions.cpp | 3 ++- indra/newview/llimview.cpp | 23 ++--------------------- indra/newview/llimview.h | 13 ++----------- indra/newview/llinventorypanel.cpp | 4 +++- indra/newview/llviewerfloaterreg.cpp | 3 +-- indra/newview/llviewermenu.cpp | 1 - indra/newview/llviewerwindow.cpp | 5 ----- 8 files changed, 10 insertions(+), 46 deletions(-) (limited to 'indra') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 3389ecbf4d..1c32c690a8 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -156,13 +156,11 @@ set(viewer_SOURCE_FILES llfloaterbuycurrency.cpp llfloaterbuyland.cpp llfloatercamera.cpp - llfloaterchatterbox.cpp llfloatercolorpicker.cpp llfloatercustomize.cpp llfloaterdaycycle.cpp llfloaterenvsettings.cpp llfloaterfonttest.cpp - llfloaterfriends.cpp llfloatergesture.cpp llfloatergodtools.cpp llfloatergroupinvite.cpp @@ -658,13 +656,11 @@ set(viewer_HEADER_FILES llfloaterbuycurrency.h llfloaterbuyland.h llfloatercamera.h - llfloaterchatterbox.h llfloatercolorpicker.h llfloatercustomize.h llfloaterdaycycle.h llfloaterenvsettings.h llfloaterfonttest.h - llfloaterfriends.h llfloatergesture.h llfloatergodtools.h llfloatergroupinvite.h diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index d6e2bb0445..3653371d76 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -75,11 +75,12 @@ public: return false; } + //*TODO by what to replace showing groups floater? if (tokens[0].asString() == "list") { if (tokens[1].asString() == "show") { - LLFloaterReg::showInstance("contacts", "groups"); + //LLFloaterReg::showInstance("contacts", "groups"); return true; } return false; diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 213862df4b..675f73d43e 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -52,7 +52,6 @@ #include "llbottomtray.h" #include "llcallingcard.h" #include "llchat.h" -#include "llfloaterchatterbox.h" #include "llimfloater.h" #include "llgroupiconctrl.h" #include "llmd5.h" @@ -64,6 +63,7 @@ #include "llnotificationsutil.h" #include "llnearbychat.h" #include "llspeakers.h" //for LLIMSpeakerMgr +#include "lltextbox.h" #include "lltextutil.h" #include "llviewercontrol.h" #include "llviewerparcelmgr.h" @@ -2075,8 +2075,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response) // Member Functions // -LLIMMgr::LLIMMgr() : - mIMReceived(FALSE) +LLIMMgr::LLIMMgr() { mPendingInvitations = LLSD::emptyMap(); mPendingAgentListUpdates = LLSD::emptyMap(); @@ -2183,14 +2182,6 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess } } -void LLIMMgr::notifyNewIM() -{ - if(!LLFloaterReg::instanceVisible("communicate")) - { - mIMReceived = TRUE; - } -} - S32 LLIMMgr::getNumberOfUnreadIM() { std::map::iterator it; @@ -2217,16 +2208,6 @@ S32 LLIMMgr::getNumberOfUnreadParticipantMessages() return num; } -void LLIMMgr::clearNewIMNotification() -{ - mIMReceived = FALSE; -} - -BOOL LLIMMgr::getIMReceived() const -{ - return mIMReceived; -} - void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) { LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 17406025f2..b573490fa3 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -39,8 +39,8 @@ #include "lllogchat.h" #include "llvoicechannel.h" -class LLFloaterChatterBox; -class LLUUID; + + class LLFriendObserver; class LLCallDialogManager; class LLIMSpeakerMgr; @@ -360,15 +360,9 @@ public: void processIMTypingStart(const LLIMInfo* im_info); void processIMTypingStop(const LLIMInfo* im_info); - void notifyNewIM(); - void clearNewIMNotification(); - // automatically start a call once the session has initialized void autoStartCallOnStartup(const LLUUID& session_id); - // IM received that you haven't seen yet - BOOL getIMReceived() const; - // Calc number of all unread IMs S32 getNumberOfUnreadIM(); @@ -446,9 +440,6 @@ private: typedef std::list session_observers_list_t; session_observers_list_t mSessionObservers; - // An IM has been received that you haven't seen yet. - BOOL mIMReceived; - LLSD mPendingInvitations; LLSD mPendingAgentListUpdates; }; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 7e71ac90b4..12a2c370d2 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -759,7 +759,9 @@ bool LLInventoryPanel::beginIMSession() S32 count = item_array.count(); if(count > 0) { - LLFloaterReg::showInstance("communicate"); + //*TODO by what to replace that? + //LLFloaterReg::showInstance("communicate"); + // create the session LLAvatarTracker& at = LLAvatarTracker::instance(); LLUUID id; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index f93d78bf33..658d1c9ddd 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -54,7 +54,6 @@ #include "llfloaterbulkpermission.h" #include "llfloaterbump.h" #include "llfloatercamera.h" -#include "llfloaterchatterbox.h" #include "llfloaterdaycycle.h" #include "llfloatersearch.h" #include "llfloaterenvsettings.h" @@ -153,7 +152,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); //LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); + LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 12e2fa5156..f7f30a5136 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -53,7 +53,6 @@ #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" #include "llfloatercustomize.h" -#include "llfloaterchatterbox.h" #include "llfloatergodtools.h" #include "llfloaterinventory.h" #include "llfloaterland.h" diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 03cc6e1262..c70b830782 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -101,7 +101,6 @@ #include "llfloaterbuildoptions.h" #include "llfloaterbuyland.h" #include "llfloatercamera.h" -#include "llfloaterchatterbox.h" #include "llfloatercustomize.h" #include "llfloaterland.h" #include "llfloaterinspect.h" @@ -1461,10 +1460,6 @@ void LLViewerWindow::initWorldUI() bottom_tray_container->addChild(bottom_tray); bottom_tray_container->setVisible(TRUE); - // Pre initialize instance communicate instance; - // currently needs to happen before initializing chat or IM - LLFloaterReg::getInstance("communicate"); - LLRect morph_view_rect = full_window; morph_view_rect.stretch( -STATUS_BAR_HEIGHT ); morph_view_rect.mTop = full_window.mTop - 32; -- cgit v1.2.3