From 74a362ba1e49f6a2e7ea2a7cbd88abee96af41a3 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 27 Jan 2010 12:32:03 +0200 Subject: Fixed low bug EXT-4375 - Gestures floater Gear menu: menuitem 'Inspect' duplicates menuitem 'Edit'. --HG-- branch : product-engine --- indra/newview/llfloatergesture.cpp | 3 +-- indra/newview/skins/default/xui/en/menu_gesture_gear.xml | 10 ---------- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index de65c6f876..005213fb4a 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -401,8 +401,7 @@ bool LLFloaterGesture::isActionEnabled(const LLSD& command) } return false; } - else if("copy_uuid" == command_name || "edit_gesture" == command_name - || "inspect" == command_name) + else if("copy_uuid" == command_name || "edit_gesture" == command_name) { return mGestureList->getAllSelected().size() == 1; } diff --git a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml index d96f3c5494..649f0edff7 100644 --- a/indra/newview/skins/default/xui/en/menu_gesture_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_gesture_gear.xml @@ -62,14 +62,4 @@ function="Gesture.EnableAction" parameter="edit_gesture" /> - - - - -- cgit v1.2.3 From aea3d79be74210d537cb9f9afc54a4f2e240bc99 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Wed, 27 Jan 2010 15:31:22 +0200 Subject: Fixed low bug EXT-4381 - No visual difference between active and inactive gestures. --HG-- branch : product-engine --- indra/newview/llfloatergesture.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index 005213fb4a..b684e1f985 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -367,7 +367,14 @@ void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gestur element["columns"][3]["font"]["name"] = "SANSSERIF"; element["columns"][3]["font"]["style"] = font_style; } - list->addElement(element, ADD_BOTTOM); + + LLScrollListItem* sl_item = list->addElement(element, ADD_BOTTOM); + if(sl_item) + { + LLFontGL::StyleFlags style = LLGestureManager::getInstance()->isGestureActive(item_id) ? LLFontGL::BOLD : LLFontGL::NORMAL; + // *TODO find out why ["font"]["style"] does not affect font style + ((LLScrollListText*)sl_item->getColumn(0))->setFontStyle(style); + } } void LLFloaterGesture::getSelectedIds(std::vector& ids) -- cgit v1.2.3 From 837f6c7cbefa7ac1c64c9506d2fabd640ae652ec Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 27 Jan 2010 17:29:44 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- Implemented storage to save favorite landmarks order in local file. -- Previously implemented solution to store sort index in Landmark's name replaced with using the storage. For now all landmarks are shown as is (with sort LM prefix if it exists). -- Some deprecated methods are marked to be removed later -- Reverted fixes for: EXT-4306, EXT-1237, EXT-1615 as not necessary, these bugs should be verified again. --HG-- branch : product-engine --- indra/newview/llpanelgroupnotices.cpp | 2 +- indra/newview/llpanellandmarkinfo.cpp | 1 - indra/newview/lltoastgroupnotifypanel.cpp | 12 +-- indra/newview/llviewerinventory.cpp | 142 +++++++++++++++++++++++------- indra/newview/llviewerinventory.h | 1 - indra/newview/llviewermessage.cpp | 30 ------- 6 files changed, 114 insertions(+), 74 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 45fc3d4688..6210973dae 100644 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -614,7 +614,7 @@ void LLPanelGroupNotices::showNotice(const std::string& subject, mViewInventoryIcon->setVisible(TRUE); std::stringstream ss; - ss << " " << LLViewerInventoryItem::getDisplayName(inventory_name); + ss << " " << inventory_name; mViewInventoryName->setText(ss.str()); mBtnOpenAttachment->setEnabled(TRUE); diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index c792fd4fe3..c75fc39089 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -367,7 +367,6 @@ void LLPanelLandmarkInfo::createLandmark(const LLUUID& folder_id) } LLStringUtil::replaceChar(desc, '\n', ' '); - LLViewerInventoryItem::insertDefaultSortField(name); // If no folder chosen use the "Landmarks" folder. LLLandmarkActions::createLandmarkHere(name, desc, diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index e49044cdca..add61c00cf 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -127,17 +127,7 @@ LLToastGroupNotifyPanel::LLToastGroupNotifyPanel(LLNotificationPtr& notification pAttachLink->setVisible(hasInventory); pAttachIcon->setVisible(hasInventory); if (hasInventory) { - std::string dis_name; - std::string inv_name = payload["inventory_name"]; - - if (LLViewerInventoryItem::extractSortFieldAndDisplayName(inv_name, NULL, &dis_name)) - { - pAttachLink->setValue(dis_name); - } - else - { - pAttachLink->setValue(inv_name); - } + pAttachLink->setValue(payload["inventory_name"]); mInventoryOffer = new LLOfferInfo(payload["inventory_offer"]); childSetActionTextbox("attachment", boost::bind( diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index b330c1ba83..f7529dd553 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -34,6 +34,7 @@ #include "llviewerinventory.h" #include "llnotificationsutil.h" +#include "llsdserialize.h" #include "message.h" #include "indra_constants.h" @@ -1174,17 +1175,125 @@ const std::string& LLViewerInventoryItem::getName() const return getDisplayName(); } +/** + * Class to store sorting order of favorites landmarks in a local file. EXT-3985. + * It replaced previously implemented solution to store sort index in landmark's name as a "@" prefix. + */ +class LLFavoritesOrderStorage : public LLSingleton +{ +public: + /** + * Sets sort index for specified with LLUUID favorite landmark + */ + void setSortIndex(const LLUUID& inv_item_id, S32 sort_index); + + /** + * Gets sort index for specified with LLUUID favorite landmark + */ + S32 getSortIndex(const LLUUID& inv_item_id); + void removeSortIndex(const LLUUID& inv_item_id); + + const static S32 NO_INDEX; +private: + friend class LLSingleton; + LLFavoritesOrderStorage() { load(); } + ~LLFavoritesOrderStorage() { save(); } + + const static std::string SORTING_DATA_FILE_NAME; + + void load(); + void save(); + + typedef std::map sort_index_map_t; + sort_index_map_t mSortIndexes; +}; + +const std::string LLFavoritesOrderStorage::SORTING_DATA_FILE_NAME = "landmarks_sorting.xml"; +const S32 LLFavoritesOrderStorage::NO_INDEX = -1; + +void LLFavoritesOrderStorage::setSortIndex(const LLUUID& inv_item_id, S32 sort_index) +{ + mSortIndexes[inv_item_id] = sort_index; +} + +S32 LLFavoritesOrderStorage::getSortIndex(const LLUUID& inv_item_id) +{ + sort_index_map_t::const_iterator it = mSortIndexes.find(inv_item_id); + if (it != mSortIndexes.end()) + { + return it->second; + } + return NO_INDEX; +} + +void LLFavoritesOrderStorage::removeSortIndex(const LLUUID& inv_item_id) +{ + mSortIndexes.erase(inv_item_id); +} + +void LLFavoritesOrderStorage::load() +{ + // load per-resident sorting information + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + + LLSD settings_llsd; + llifstream file; + file.open(filename); + if (file.is_open()) + { + LLSDSerialize::fromXML(settings_llsd, file); + } + + for (LLSD::map_const_iterator iter = settings_llsd.beginMap(); + iter != settings_llsd.endMap(); ++iter) + { + mSortIndexes.insert(std::make_pair(LLUUID(iter->first), (S32)iter->second.asInteger())); + } +} + +void LLFavoritesOrderStorage::save() +{ + // If we quit from the login screen we will not have an SL account + // name. Don't try to save, otherwise we'll dump a file in + // C:\Program Files\SecondLife\ or similar. JC + std::string user_dir = gDirUtilp->getLindenUserDir(); + if (!user_dir.empty()) + { + std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, SORTING_DATA_FILE_NAME); + LLSD settings_llsd; + + for(sort_index_map_t::const_iterator iter = mSortIndexes.begin(); iter != mSortIndexes.end(); ++iter) + { + settings_llsd[iter->first.asString()] = iter->second; + } + + llofstream file; + file.open(filename); + LLSDSerialize::toPrettyXML(settings_llsd, file); + } +} + + + +// *TODO: mantipov: REMOVE, EXT-3985 const std::string& LLViewerInventoryItem::getDisplayName() const { + return LLInventoryItem::getName(); +/* std::string result; BOOL hasSortField = extractSortFieldAndDisplayName(0, &result); + mDisplayName = LLInventoryItem::getName(); + return mDisplayName = hasSortField ? result : LLInventoryItem::getName(); +*/ } +// *TODO: mantipov: REMOVE, EXT-3985 // static std::string LLViewerInventoryItem::getDisplayName(const std::string& name) { + llassert(false); std::string result; BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result); @@ -1193,34 +1302,12 @@ std::string LLViewerInventoryItem::getDisplayName(const std::string& name) S32 LLViewerInventoryItem::getSortField() const { - S32 result; - BOOL hasSortField = extractSortFieldAndDisplayName(&result, 0); - - return hasSortField ? result : -1; + return LLFavoritesOrderStorage::instance().getSortIndex(mUUID); } void LLViewerInventoryItem::setSortField(S32 sortField) { - using std::string; - - std::stringstream ss; - ss << sortField; - - string newSortField = ss.str(); - - const char separator = getSeparator(); - const string::size_type separatorPos = mName.find(separator, 0); - - if (separatorPos < string::npos) - { - // the name of the LLViewerInventoryItem already consists of sort field and display name. - mName = newSortField + separator + mName.substr(separatorPos + 1, string::npos); - } - else - { - // there is no sort field in the name of LLViewerInventoryItem, we should add it - mName = newSortField + separator + mName; - } + LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField); } void LLViewerInventoryItem::rename(const std::string& n) @@ -1334,6 +1421,7 @@ U32 LLViewerInventoryItem::getCRC32() const return LLInventoryItem::getCRC32(); } +// *TODO: mantipov: REMOVE, EXT-3985 BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) { using std::string; @@ -1369,12 +1457,6 @@ BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& na return result; } -void LLViewerInventoryItem::insertDefaultSortField(std::string& name) -{ - name.insert(0, std::string("1") + getSeparator()); -} - - // This returns true if the item that this item points to // doesn't exist in memory (i.e. LLInventoryModel). The baseitem // might still be in the database but just not loaded yet. diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 7f3f019b07..cf104503a8 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -82,7 +82,6 @@ public: virtual U32 getCRC32() const; // really more of a checksum. static BOOL extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName); - static void insertDefaultSortField(std::string& name); // construct a complete viewer inventory item LLViewerInventoryItem(const LLUUID& uuid, const LLUUID& parent_uuid, diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d6ce356c4b..96dd063a7c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1434,31 +1434,6 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const return false; } -std::string get_display_name(const std::string& name) -{ - // We receive landmark name as \'@name\' where is a number - // LLViewerInventoryItem::getDisplayName will remove \'@ though we need the \' - // Lets save all chars preceding @ and insert them back after @ was removed - - std::string saved; - - if(std::string::npos != name.find(LLViewerInventoryItem::getSeparator())) - { - int n = 0; - while(!isdigit(name[n]) && LLViewerInventoryItem::getSeparator() != name[n]) - { - ++n; - } - saved = name.substr(0, n); - } - - std::string d_name = LLViewerInventoryItem::getDisplayName(name); - d_name.insert(0, saved); - LLStringUtil::trim(d_name); - - return d_name; -} - void inventory_offer_handler(LLOfferInfo* info) { //Until throttling is implmented, busy mode should reject inventory instead of silently @@ -1496,11 +1471,6 @@ void inventory_offer_handler(LLOfferInfo* info) LLStringUtil::truncate(msg, indx); } - if(LLAssetType::AT_LANDMARK == info->mType) - { - msg = get_display_name(msg); - } - LLSD args; args["[OBJECTNAME]"] = msg; -- cgit v1.2.3 From b3763f1ec1e20226bf489042346c5827d187ba42 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Wed, 27 Jan 2010 18:40:19 +0200 Subject: Cleaned up including of the "llviewerinventory.h" --HG-- branch : product-engine --- indra/newview/llappearancemgr.h | 2 +- indra/newview/llfloaterbulkpermission.cpp | 1 + indra/newview/llfloaterbulkpermission.h | 2 -- indra/newview/llfolderviewitem.cpp | 1 - indra/newview/llinventoryfilter.cpp | 1 - indra/newview/llinventoryfunctions.cpp | 1 - indra/newview/llpanelcontents.cpp | 2 +- indra/newview/llpanelteleporthistory.cpp | 1 - indra/newview/llsidepanelinventorysubpanel.cpp | 1 - indra/newview/llwearablelist.cpp | 1 - 10 files changed, 3 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index dd50b482cf..38d1e01d08 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -35,11 +35,11 @@ #include "llsingleton.h" #include "llinventorymodel.h" -#include "llviewerinventory.h" #include "llcallbacklist.h" class LLWearable; class LLWearableHoldingPattern; +class LLInventoryCallback; class LLAppearanceManager: public LLSingleton { diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index 5c3a54e34b..b2f700069f 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -43,6 +43,7 @@ #include "llviewerregion.h" #include "lscript_rt_interface.h" #include "llviewercontrol.h" +#include "llviewerinventory.h" #include "llviewerobject.h" #include "llviewerregion.h" #include "llresmgr.h" diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 31f4f5c3e1..bffcff7059 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -44,8 +44,6 @@ #include "llfloater.h" #include "llscrolllistctrl.h" -#include "llviewerinventory.h" - class LLFloaterBulkPermission : public LLFloater, public LLVOInventoryListener { friend class LLFloaterReg; diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 4b48626b22..b05eb84e52 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -40,7 +40,6 @@ #include "llinventoryfilter.h" #include "llpanel.h" #include "llviewercontrol.h" // gSavedSettings -#include "llviewerinventory.h" #include "llviewerwindow.h" // Argh, only for setCursor() // linden library includes diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index b4dcb566e4..cd20d64ca8 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -39,7 +39,6 @@ #include "llfolderviewitem.h" #include "llinventorymodel.h" // gInventory.backgroundFetchActive() #include "llviewercontrol.h" -#include "llviewerinventory.h" #include "llfolderview.h" // linden library includes diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 2885ba13fa..33623539e9 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -76,7 +76,6 @@ #include "lltabcontainer.h" #include "lltooldraganddrop.h" #include "lluictrlfactory.h" -#include "llviewerinventory.h" #include "llviewermessage.h" #include "llviewerobjectlist.h" #include "llviewerregion.h" diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 9d591ef43d..2a7d097f94 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -50,7 +50,6 @@ // project includes #include "llagent.h" -#include "llfloaterbulkpermission.h" #include "llpanelobjectinventory.h" #include "llpreviewscript.h" #include "llresmgr.h" @@ -60,6 +59,7 @@ #include "lltoolmgr.h" #include "lltrans.h" #include "llviewerassettype.h" +#include "llviewerinventory.h" #include "llviewerobject.h" #include "llviewerregion.h" #include "llviewerwindow.h" diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 1b8fb49641..954f3995c1 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -46,7 +46,6 @@ #include "llnotificationsutil.h" #include "lltextbox.h" #include "llviewermenu.h" -#include "llviewerinventory.h" #include "lllandmarkactions.h" #include "llclipboard.h" diff --git a/indra/newview/llsidepanelinventorysubpanel.cpp b/indra/newview/llsidepanelinventorysubpanel.cpp index 56e342c3ce..f51462dcce 100644 --- a/indra/newview/llsidepanelinventorysubpanel.cpp +++ b/indra/newview/llsidepanelinventorysubpanel.cpp @@ -44,7 +44,6 @@ #include "lllineeditor.h" #include "llradiogroup.h" #include "llviewercontrol.h" -#include "llviewerinventory.h" #include "llviewerobjectlist.h" diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 5636256856..d6a9837b86 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -38,7 +38,6 @@ #include "llassetstorage.h" #include "llagent.h" #include "llvoavatar.h" -#include "llviewerinventory.h" #include "llviewerstats.h" #include "llnotificationsutil.h" #include "llinventorymodel.h" -- cgit v1.2.3 From 4cad6333ab447713e96fb14a278e529f5bc4f2a1 Mon Sep 17 00:00:00 2001 From: Tofu Linden 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/newview') 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 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/newview') 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 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/newview') 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/newview') 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/newview') 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 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/newview') 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 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/newview/lltexturecache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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 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/newview') 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/newview') 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/newview') 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 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/newview') 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/newview') 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 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/newview') 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 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/newview') 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 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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 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/newview') 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/newview') 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 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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/newview') 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 b80cd227042f8e461fa0a2f9a5ae3b448842b863 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 28 Jan 2010 09:50:06 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- removed using of the LM Prefix while renaming Inventori item --HG-- branch : product-engine --- indra/newview/llviewerinventory.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index f7529dd553..a3cbd80c84 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1310,27 +1310,10 @@ void LLViewerInventoryItem::setSortField(S32 sortField) LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField); } +// *TODO: mantipov: REMOVE, EXT-3985 void LLViewerInventoryItem::rename(const std::string& n) { - using std::string; - - string new_name(n); - LLStringUtil::replaceNonstandardASCII(new_name, ' '); - LLStringUtil::replaceChar(new_name, '|', ' '); - LLStringUtil::trim(new_name); - LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); - - const char separator = getSeparator(); - const string::size_type separatorPos = mName.find(separator, 0); - - if (separatorPos < string::npos) - { - mName.replace(separatorPos + 1, string::npos, new_name); - } - else - { - mName = new_name; - } + LLInventoryItem::rename(n); } const LLPermissions& LLViewerInventoryItem::getPermissions() const -- cgit v1.2.3 From d002c705b7b1772194b78f8c405e3907e76f445c Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 28 Jan 2010 11:10:10 +0000 Subject: EXT-4693: First steps at using remote inspector. Now Object IMs that get sent to your local chat window will have secondlife:///app/objectim SLapps, which will open the remote object inspector for that object, not the avatar inspector. However, we don't have all the information needed for the remote object inspector, so I'm going to have to investigate extending the inspector to request the missing information from the server. --- indra/newview/llchathistory.cpp | 46 ++++++++++++++++++++++++++++++++++++++- indra/newview/llviewermessage.cpp | 2 +- 2 files changed, 46 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d6a7edee5b..fd438001e1 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -35,6 +35,7 @@ #include "llinstantmessage.h" #include "llchathistory.h" +#include "llcommandhandler.h" #include "llpanel.h" #include "lluictrlfactory.h" #include "llscrollcontainer.h" @@ -46,6 +47,7 @@ #include "llfloaterreg.h" #include "llmutelist.h" #include "llstylemap.h" +#include "llslurl.h" #include "lllayoutstack.h" #include "llagent.h" @@ -55,6 +57,38 @@ static LLDefaultChildRegistry::Register r("chat_history"); const static std::string NEW_LINE(rawstr_to_utf8("\n")); +// support for secondlife:///app/objectim/{UUID}/ SLapps +class LLObjectIMHandler : public LLCommandHandler +{ +public: + // requests will be throttled from a non-trusted browser + LLObjectIMHandler() : LLCommandHandler("objectim", UNTRUSTED_THROTTLE) {} + + bool handle(const LLSD& params, const LLSD& query_map, LLMediaCtrl* web) + { + if (params.size() < 1) + { + return false; + } + + LLUUID object_id; + if (!object_id.set(params[0], FALSE)) + { + return false; + } + + LLSD payload; + payload["object_id"] = object_id; + payload["owner_id"] = query_map["owner"]; + payload["name"] = query_map["name"]; + payload["slurl"] = query_map["slurl"]; + payload["group_owned"] = query_map["groupowned"]; + LLFloaterReg::showInstance("inspect_remote_object", payload); + return true; + } +}; +LLObjectIMHandler gObjectIMHandler; + class LLChatHistoryHeader: public LLPanel { public: @@ -524,7 +558,17 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ if (utf8str_trim(chat.mFromName).size() != 0) { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. - if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() ) + if ( chat.mSourceType == CHAT_SOURCE_OBJECT ) + { + std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); + url += "?name=" + chat.mFromName; + + LLStyle::Params link_params(style_params); + link_params.color.control = "HTMLLinkColor"; + link_params.link_href = url; + mEditor->appendText(chat.mFromName + delimiter, false, link_params); + } + else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() ) { LLStyle::Params link_params(style_params); link_params.fillFrom(LLStyleMap::instance().lookupAgent(chat.mFromID)); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d6ce356c4b..e190c8c44a 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2236,7 +2236,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) payload["SESSION_NAME"] = session_name; if (from_group) { - payload["groupowned"] = "true"; + payload["group_owned"] = "true"; } LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload); } -- cgit v1.2.3 From b3e25e1fbd9cfccc0363cb436ad4302ead974859 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 28 Jan 2010 12:27:17 +0000 Subject: EXT-4693: More robust remote object inspector. Disable buttons when we don't have enough information to perform their function, and don't display a SLurl if we don't know the object's location. --- indra/newview/llinspectremoteobject.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp index e4d2eec242..898f1cd9ac 100644 --- a/indra/newview/llinspectremoteobject.cpp +++ b/indra/newview/llinspectremoteobject.cpp @@ -31,17 +31,16 @@ #include "llviewerprecompiledheaders.h" +#include "llfloaterreg.h" #include "llinspectremoteobject.h" #include "llinspect.h" -#include "llslurl.h" #include "llmutelist.h" -#include "llurlaction.h" #include "llpanelblockedlist.h" -#include "llfloaterreg.h" +#include "llslurl.h" +#include "lltrans.h" #include "llui.h" #include "lluictrl.h" - -class LLViewerObject; +#include "llurlaction.h" ////////////////////////////////////////////////////////////////////////////// // LLInspectRemoteObject @@ -183,11 +182,25 @@ void LLInspectRemoteObject::update() owner = LLSLURL::buildCommand("agent", mOwnerID, "about"); } } + else + { + owner = LLTrans::getString("Unknown"); + } getChild("object_owner")->setValue(owner); // display the object's SLurl - click it to teleport - std::string url = "secondlife:///app/teleport/" + mSLurl; + std::string url; + if (! mSLurl.empty()) + { + std::string url = "secondlife:///app/teleport/" + mSLurl; + } getChild("object_slurl")->setValue(url); + + // disable the Map button if we don't have a SLurl + getChild("map_btn")->setEnabled(! mSLurl.empty()); + + // disable the Block button if we don't have the owner ID + getChild("block_btn")->setEnabled(! mOwnerID.isNull()); } ////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From f6fceac081a1f2d165679ce3eb233e97806cebe7 Mon Sep 17 00:00:00 2001 From: Igor Borovkov 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/newview/llchathistory.cpp | 8 ++++++++ indra/newview/llimfloater.cpp | 1 + 2 files changed, 9 insertions(+) (limited to 'indra/newview') 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 8f89681e068365a2c352c76eb408b99784621c04 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 28 Jan 2010 20:06:57 +0200 Subject: Fixed normal bug (EXT-4610) [BSI] parcel settings icons do not match parcel settings - Changed parcel settings behavior to match viewer 1.23. --HG-- branch : product-engine --- indra/newview/lllocationinputctrl.cpp | 6 ++++-- indra/newview/llviewerparcelmgr.cpp | 4 ++-- indra/newview/skins/default/xui/en/widgets/location_input.xml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 7f49a7defb..050cfcc3d9 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -39,6 +39,7 @@ #include "llbutton.h" #include "llfocusmgr.h" #include "llmenugl.h" +#include "llparcel.h" #include "llstring.h" #include "lltrans.h" #include "lluictrlfactory.h" @@ -672,11 +673,12 @@ void LLLocationInputCtrl::refreshParcelIcons() if (show_properties) { LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); - bool allow_buy = vpm->canAgentBuyParcel( vpm->getAgentParcel(), false); + LLParcel* agent_parcel = vpm->getAgentParcel(); + bool allow_buy = vpm->canAgentBuyParcel( agent_parcel, false); bool allow_voice = vpm->allowAgentVoice(); bool allow_fly = vpm->allowAgentFly(); bool allow_push = vpm->allowAgentPush(); - bool allow_build = vpm->allowAgentBuild(); + bool allow_build = agent_parcel && agent_parcel->getAllowModify(); // true when anyone is allowed to build. See EXT-4610. bool allow_scripts = vpm->allowAgentScripts(); bool allow_damage = vpm->allowAgentDamage(); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 10a95443f1..b3450a8f36 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -706,8 +706,8 @@ bool LLViewerParcelMgr::allowAgentScripts() const bool LLViewerParcelMgr::allowAgentDamage() const { LLViewerRegion* region = gAgent.getRegion(); - return region && region->getAllowDamage() - && mAgentParcel && mAgentParcel->getAllowDamage(); + return (region && region->getAllowDamage()) + || (mAgentParcel && mAgentParcel->getAllowDamage()); } BOOL LLViewerParcelMgr::isOwnedAt(const LLVector3d& pos_global) const diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 1c0a8ba7c5..70a58b8e03 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -96,7 +96,7 @@ name="damage_icon" width="14" height="13" - top="25" + top="21" left="2" follows="right|top" image_name="Parcel_Damage_Dark" -- cgit v1.2.3 From fbe21db8572c6d0e6a429a3ca209da6e26badf56 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Thu, 28 Jan 2010 20:07:25 +0200 Subject: No ticket. Fixed possible build error. --HG-- branch : product-engine --- indra/newview/llpanelplaces.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 5de78b1595..110d7a1054 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -32,9 +32,9 @@ #ifndef LL_LLPANELPLACES_H #define LL_LLPANELPLACES_H -#include "llpanel.h" +#include "lltimer.h" -class LLTimer; +#include "llpanel.h" class LLInventoryItem; class LLFilterEditor; -- cgit v1.2.3 From 1b46e8894a40d46df948a034dd0413e97147748d Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Thu, 28 Jan 2010 17:17:55 +0200 Subject: Fixed normal bug EXT-4734 - In profile side-panels, area for homepage URL appears clickable without URL. --HG-- branch : product-engine --- indra/newview/llpanelavatar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelavatar.cpp b/indra/newview/llpanelavatar.cpp index fe5b20813a..48dd5513bd 100644 --- a/indra/newview/llpanelavatar.cpp +++ b/indra/newview/llpanelavatar.cpp @@ -635,6 +635,9 @@ void LLPanelAvatarProfile::fillCommonData(const LLAvatarData* avatar_data) childSetValue("2nd_life_pic", avatar_data->image_id); childSetValue("real_world_pic", avatar_data->fl_image_id); childSetValue("homepage_edit", avatar_data->profile_url); + + // Hide home page textbox if no page was set to fix "homepage URL appears clickable without URL - EXT-4734" + childSetVisible("homepage_edit", !avatar_data->profile_url.empty()); } void LLPanelAvatarProfile::fillPartnerData(const LLAvatarData* avatar_data) -- cgit v1.2.3 From fee014bd82cd78f07bcc88c45109a1ea2b2eee24 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 28 Jan 2010 15:38:55 +0000 Subject: EXT-4693: Pass through owner ID to remote object inspector. Plumbing to pass the owner ID for a chatting object down into the LLChatHistory::appendMessage() method where we create the objectim SLapp that will bring up the remote object inspector. Pheww. For object notifications that are displayed as text chat, we --- indra/newview/llchathistory.cpp | 16 +++++++++++++++- indra/newview/llchathistory.h | 7 +++++-- indra/newview/llnearbychat.cpp | 6 ++++-- indra/newview/llnearbychat.h | 2 +- indra/newview/llnearbychathandler.cpp | 4 ++-- indra/newview/llnearbychathandler.h | 2 +- indra/newview/llnotificationhandler.h | 2 +- indra/newview/llnotificationmanager.cpp | 7 ++++--- indra/newview/llnotificationmanager.h | 2 +- indra/newview/llviewermessage.cpp | 13 +++++++++---- 10 files changed, 43 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index fd438001e1..dd9f0c2ebe 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -50,6 +50,8 @@ #include "llslurl.h" #include "lllayoutstack.h" #include "llagent.h" +#include "llviewerregion.h" +#include "llworld.h" #include "llsidetray.h"//for blocked objects panel @@ -491,8 +493,9 @@ void LLChatHistory::clear() mLastFromID = LLUUID::null; } -void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_chat_history, const LLStyle::Params& input_append_params) +void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LLStyle::Params& input_append_params) { + bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); if (!mEditor->scrolledToEnd() && chat.mFromID != gAgent.getID() && !chat.mFromName.empty()) { mUnreadChatSources.insert(chat.mFromName); @@ -560,9 +563,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_ // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. if ( chat.mSourceType == CHAT_SOURCE_OBJECT ) { + // for object IMs, create a secondlife:///app/objectim SLapp std::string url = LLSLURL::buildCommand("objectim", chat.mFromID, ""); url += "?name=" + chat.mFromName; + url += "&owner=" + args["owner_id"].asString(); + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if (region) + { + S32 x, y, z; + LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); + url += "&slurl=" + region->getName() + llformat("/%d/%d/%d", x, y, z); + } + + // set the link for the object name to be the objectim SLapp LLStyle::Params link_params(style_params); link_params.color.control = "HTMLLinkColor"; link_params.link_href = url; diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index c2c60e60cf..32600bb71d 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -113,11 +113,14 @@ class LLChatHistory : public LLUICtrl * Appends a widget message. * If last user appended message, concurs with current user, * separator is added before the message, otherwise header is added. + * The args LLSD contains: + * - use_plain_text_chat_history (bool) - whether to add message as plain text. + * - owner_id (LLUUID) - the owner ID for object chat * @param chat - base chat message. - * @param use_plain_text_chat_history - whether to add message as plain text. + * @param args - additional arguments * @param input_append_params - font style. */ - void appendMessage(const LLChat& chat, const bool use_plain_text_chat_history = false, const LLStyle::Params& input_append_params = LLStyle::Params()); + void appendMessage(const LLChat& chat, const LLSD &args = LLSD(), const LLStyle::Params& input_append_params = LLStyle::Params()); /*virtual*/ void clear(); /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 0a8d020b4f..90482eb74d 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -153,7 +153,7 @@ std::string appendTime() } -void LLNearbyChat::addMessage(const LLChat& chat,bool archive) +void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) { if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { @@ -184,7 +184,9 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive) if (!chat.mMuted) { tmp_chat.mFromName = chat.mFromName; - mChatHistory->appendMessage(chat, use_plain_text_chat_history); + LLSD chat_args = args; + chat_args["use_plain_text_chat_history"] = use_plain_text_chat_history; + mChatHistory->appendMessage(chat, chat_args); } if(archive) diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index 938b77df7a..5fb8ade19e 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -47,7 +47,7 @@ public: ~LLNearbyChat(); BOOL postBuild (); - void addMessage (const LLChat& message,bool archive = true); + void addMessage (const LLChat& message,bool archive = true, const LLSD &args = LLSD()); void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index a1a9d84c14..c08ca30bab 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -319,7 +319,7 @@ void LLNearbyChatHandler::initChannel() -void LLNearbyChatHandler::processChat(const LLChat& chat_msg) +void LLNearbyChatHandler::processChat(const LLChat& chat_msg, const LLSD &args) { if(chat_msg.mMuted == TRUE) return; @@ -337,7 +337,7 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) //if(tmp_chat.mFromName.empty() && tmp_chat.mFromID!= LLUUID::null) // tmp_chat.mFromName = tmp_chat.mFromID.asString(); } - nearby_chat->addMessage(chat_msg); + nearby_chat->addMessage(chat_msg, true, args); if(nearby_chat->getVisible()) return;//no need in toast if chat is visible diff --git a/indra/newview/llnearbychathandler.h b/indra/newview/llnearbychathandler.h index fb2abac6a4..01a6de5610 100644 --- a/indra/newview/llnearbychathandler.h +++ b/indra/newview/llnearbychathandler.h @@ -45,7 +45,7 @@ public: virtual ~LLNearbyChatHandler(); - virtual void processChat(const LLChat& chat_msg); + virtual void processChat(const LLChat& chat_msg, const LLSD &args); protected: virtual void onDeleteToast(LLToast* toast); diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 0fb438bfe9..e57674d31c 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -135,7 +135,7 @@ class LLChatHandler : public LLEventHandler public: virtual ~LLChatHandler() {}; - virtual void processChat(const LLChat& chat_msg)=0; + virtual void processChat(const LLChat& chat_msg, const LLSD &args)=0; }; /** diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index 66bc217d15..4401bb953f 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -107,16 +107,17 @@ bool LLNotificationManager::onNotification(const LLSD& notify) } //-------------------------------------------------------------------------- -void LLNotificationManager::onChat(const LLChat& msg,ENotificationType type) +void LLNotificationManager::onChat(const LLChat& msg, const LLSD &args) { - switch(type) + // check ENotificationType argument + switch(args["type"].asInteger()) { case NT_NEARBYCHAT: { LLNearbyChatHandler* handle = dynamic_cast(mNotifyHandlers["nearbychat"].get()); if(handle) - handle->processChat(msg); + handle->processChat(msg, args); } break; default: //no need to handle all enum types diff --git a/indra/newview/llnotificationmanager.h b/indra/newview/llnotificationmanager.h index 072fc6f24c..575aa69c4d 100644 --- a/indra/newview/llnotificationmanager.h +++ b/indra/newview/llnotificationmanager.h @@ -66,7 +66,7 @@ public: bool onNotification(const LLSD& notification); // this method reacts on chat notifications and calls an appropriate handler - void onChat(const LLChat& msg,ENotificationType type); + void onChat(const LLChat& msg, const LLSD &args); // get a handler for a certain type of notification LLEventHandler* getHandlerForNotification(std::string notification_type); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 43c30b4c52..f24fe07065 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2545,7 +2545,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // Object owner for objects msg->getUUID("ChatData", "OwnerID", owner_id); - + msg->getU8Fast(_PREHASH_ChatData, _PREHASH_SourceType, source_temp); chat.mSourceType = (EChatSourceType)source_temp; @@ -2574,7 +2574,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) if (chatter) { chat.mPosAgent = chatter->getPositionAgent(); - + // Make swirly things only for talking objects. (not script debug messages, though) if (chat.mSourceType == CHAT_SOURCE_OBJECT && chat.mChatType != CHAT_TYPE_DEBUG_MSG) @@ -2719,8 +2719,13 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mMuted = is_muted && !is_linden; - LLNotificationsUI::LLNotificationManager::instance().onChat( - chat, LLNotificationsUI::NT_NEARBYCHAT); + // pass owner_id to chat so that we can display the remote + // object inspect for an object that is chatting with you + LLSD args; + args["type"] = LLNotificationsUI::NT_NEARBYCHAT; + args["owner_id"] = owner_id; + + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, args); } } -- 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/newview') 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/newview') 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/newview') 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/newview') 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 9a4d075f3b8ab1ccf760187beeb81f9bf17e69b1 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 28 Jan 2010 16:57:37 +0000 Subject: Fix signed/unsigned comparison build failure on Windows for lllocationhistory.cpp --- indra/newview/lllocationhistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lllocationhistory.cpp b/indra/newview/lllocationhistory.cpp index f494f7d7c1..df93930d33 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 3b0e95bf3c36896b21cd6e82bda2d6ceaf356320 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 28 Jan 2010 20:10:40 +0200 Subject: Renamed some members of LLToastIMPanel to make them self-explanatory. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 14 +++++++------- indra/newview/lltoastimpanel.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index d62017cc2f..7717ae9e01 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -41,14 +41,14 @@ const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; //-------------------------------------------------------------------------- LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notification), - mAvatar(NULL), mUserName(NULL), + mAvatarIcon(NULL), mAvatarName(NULL), mTime(NULL), mMessage(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_instant_message.xml"); LLIconCtrl* sys_msg_icon = getChild("sys_msg_icon"); - mAvatar = getChild("avatar_icon"); - mUserName = getChild("user_name"); + mAvatarIcon = getChild("avatar_icon"); + mAvatarName = getChild("user_name"); mTime = getChild("time_box"); mMessage = getChild("message"); @@ -77,22 +77,22 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mMessage->setValue(p.message); } - mUserName->setValue(p.from); + mAvatarName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; mNotification = p.notification; if(p.from == SYSTEM_FROM) { - mAvatar->setVisible(FALSE); + mAvatarIcon->setVisible(FALSE); sys_msg_icon->setVisible(TRUE); } else { - mAvatar->setVisible(TRUE); + mAvatarIcon->setVisible(TRUE); sys_msg_icon->setVisible(FALSE); - mAvatar->setValue(p.avatar_id); + mAvatarIcon->setValue(p.avatar_id); } S32 maxLinesCount; diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index 53661f2cf6..42d9a97c3f 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -63,8 +63,8 @@ private: LLNotificationPtr mNotification; LLUUID mSessionID; - LLAvatarIconCtrl* mAvatar; - LLTextBox* mUserName; + LLAvatarIconCtrl* mAvatarIcon; + LLTextBox* mAvatarName; LLTextBox* mTime; LLTextBox* mMessage; }; -- cgit v1.2.3 From 8da9a472b212d8d8d376a32a442fbf61baa1fae4 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:36:21 -0800 Subject: CID-383 Checker: UNINIT_CTOR Function: LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD &) File: /indra/newview/llfloaterhardwaresettings.cpp --- indra/newview/llfloaterhardwaresettings.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 31b494b590..b2564eb2b6 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -50,7 +50,17 @@ #include "llsliderctrl.h" LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key) - : LLFloater(key) + : LLFloater(key), + + // these should be set on imminent refresh() call, + // but init them anyway + mUseVBO(0), + mUseAniso(0), + mFSAASamples(0), + mGamma(0.0), + mVideoCardMem(0), + mFogRatio(0.0), + mProbeHardwareOnStartup(FALSE) { //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_hardware_settings.xml"); } -- cgit v1.2.3 From d91225b6addbb0febd43e58550626dfa33c56ca8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:38:19 -0800 Subject: CID-382 Checker: UNINIT_CTOR Function: LLCallDialog::LLCallDialog(const LLSD &) File: /indra/newview/llimview.cpp --- indra/newview/llimview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index c4b1d7a9f4..1254664330 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1498,9 +1498,11 @@ void LLCallDialogManager::onVoiceChannelStateChanged(const LLVoiceChannel::EStat //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLCallDialog //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -LLCallDialog::LLCallDialog(const LLSD& payload) : -LLDockableFloater(NULL, false, payload), -mPayload(payload) +LLCallDialog::LLCallDialog(const LLSD& payload) + : LLDockableFloater(NULL, false, payload), + + mPayload(payload), + mLifetime(DEFAULT_LIFETIME) { } -- cgit v1.2.3 From a5f88abb95ff2afe5a8f9e34e39806eb579828fe Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:40:10 -0800 Subject: CID-381 Checker: UNINIT_CTOR Function: LLFloaterAnimPreview::LLFloaterAnimPreview(const std::basic_string, std::allocator>&) File: /indra/newview/llfloateranimpreview.cpp --- indra/newview/llfloateranimpreview.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateranimpreview.h b/indra/newview/llfloateranimpreview.h index dd2c0b809a..3ee1f419ab 100644 --- a/indra/newview/llfloateranimpreview.h +++ b/indra/newview/llfloateranimpreview.h @@ -127,7 +127,6 @@ protected: LLRectf mPreviewImageRect; LLAssetID mMotionID; LLTransactionID mTransactionID; - BOOL mEnabled; LLAnimPauseRequest mPauseRequest; std::map mIDList; -- cgit v1.2.3 From 7bd7f0d0ff5f929ea2d34a78b902ea136501865c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:44:34 -0800 Subject: CID-380 Checker: UNINIT_CTOR Function: LLFloaterSnapshot::Impl::Impl() File: /indra/newview/llfloatersnapshot.cpp --- indra/newview/llfloatersnapshot.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index afb58c9407..94c7ff6f94 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1028,7 +1028,8 @@ class LLFloaterSnapshot::Impl public: Impl() : mAvatarPauseHandles(), - mLastToolset(NULL) + mLastToolset(NULL), + mAspectRatioCheckOff(false) { } ~Impl() @@ -1079,7 +1080,7 @@ public: LLToolset* mLastToolset; LLHandle mPreviewHandle; - BOOL mAspectRatioCheckOff ; + bool mAspectRatioCheckOff ; }; // static @@ -1606,7 +1607,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde if(0 == index) //current window size { - view->impl.mAspectRatioCheckOff = TRUE ; + view->impl.mAspectRatioCheckOff = true ; view->childSetEnabled("keep_aspect_check", FALSE) ; if(previewp) @@ -1616,7 +1617,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde } else if(-1 == index) //custom { - view->impl.mAspectRatioCheckOff = FALSE ; + view->impl.mAspectRatioCheckOff = false ; //if(LLSnapshotLivePreview::SNAPSHOT_TEXTURE != gSavedSettings.getS32("LastSnapshotType")) { view->childSetEnabled("keep_aspect_check", TRUE) ; @@ -1629,7 +1630,7 @@ void LLFloaterSnapshot::Impl::checkAspectRatio(LLFloaterSnapshot *view, S32 inde } else { - view->impl.mAspectRatioCheckOff = TRUE ; + view->impl.mAspectRatioCheckOff = true ; view->childSetEnabled("keep_aspect_check", FALSE) ; if(previewp) -- cgit v1.2.3 From cad4ca01dc804d14c022b63e6a8541e46b1a8309 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:46:37 -0800 Subject: CID-379 Checker: UNINIT_CTOR Function: LLFloaterScriptQueue::LLFloaterScriptQueue(const LLSD &) File: /indra/newview/llcompilequeue.cpp --- indra/newview/llcompilequeue.cpp | 5 +++-- indra/newview/llcompilequeue.h | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 5c05a54120..a96981a108 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -92,7 +92,8 @@ struct LLScriptQueueData // Default constructor LLFloaterScriptQueue::LLFloaterScriptQueue(const LLSD& key) : LLFloater(key), - mDone(FALSE) + mDone(false), + mMono(false) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_script_queue.xml", FALSE); } @@ -216,7 +217,7 @@ BOOL LLFloaterScriptQueue::nextObject() } while((mObjectIDs.count() > 0) && !successful_start); if(isDone() && !mDone) { - mDone = TRUE; + mDone = true; getChild("queue output")->setCommentText(getString("Done")); childSetEnabled("close",TRUE); } diff --git a/indra/newview/llcompilequeue.h b/indra/newview/llcompilequeue.h index 063d573239..2d061f5d8a 100644 --- a/indra/newview/llcompilequeue.h +++ b/indra/newview/llcompilequeue.h @@ -104,10 +104,10 @@ protected: // Object Queue LLDynamicArray mObjectIDs; LLUUID mCurrentObjectID; - BOOL mDone; + bool mDone; std::string mStartString; - BOOL mMono; + bool mMono; }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From a9d86c8133960635bc8a116f68348bf447a39690 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 10:52:15 -0800 Subject: CID-378 Checker: UNINIT_CTOR Function: LLFloaterJoystick::LLFloaterJoystick(const LLSD &) File: /indra/newview/llfloaterjoystick.cpp --- indra/newview/llfloaterjoystick.cpp | 11 ++++++++--- indra/newview/llfloaterjoystick.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp index 06fe2a84c8..78bc63ac8c 100644 --- a/indra/newview/llfloaterjoystick.cpp +++ b/indra/newview/llfloaterjoystick.cpp @@ -52,6 +52,7 @@ LLFloaterJoystick::LLFloaterJoystick(const LLSD& data) { //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this, "floater_joystick.xml"); + initFromSettings(); } void LLFloaterJoystick::draw() @@ -123,10 +124,8 @@ void LLFloaterJoystick::apply() { } -void LLFloaterJoystick::refresh() +void LLFloaterJoystick::initFromSettings() { - LLFloater::refresh(); - mJoystickEnabled = gSavedSettings.getBOOL("JoystickEnabled"); mJoystickAxis[0] = gSavedSettings.getS32("JoystickAxis0"); @@ -194,6 +193,12 @@ void LLFloaterJoystick::refresh() mFlycamFeathering = gSavedSettings.getF32("FlycamFeathering"); } +void LLFloaterJoystick::refresh() +{ + LLFloater::refresh(); + initFromSettings(); +} + void LLFloaterJoystick::cancel() { gSavedSettings.setBOOL("JoystickEnabled", mJoystickEnabled); diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h index f3559c28e9..7a2f497c69 100644 --- a/indra/newview/llfloaterjoystick.h +++ b/indra/newview/llfloaterjoystick.h @@ -55,6 +55,8 @@ private: LLFloaterJoystick(const LLSD& data); virtual ~LLFloaterJoystick(); + + void initFromSettings(); static void onCommitJoystickEnabled(LLUICtrl*, void*); static void onClickRestoreSNDefaults(void*); -- cgit v1.2.3 From ee86a65f0450003689dcd0d52c726c876456dd28 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:07:02 -0800 Subject: CID-372 Checker: UNINIT_CTOR Function: LLViewerJoint::LLViewerJoint(const std::basic_string, std::allocator>&, LLJoint *) File: /indra/newview/llviewerjoint.cpp CID-377 Checker: UNINIT_CTOR Function: LLOfferInfo::LLOfferInfo() File: /indra/newview/llviewermessage.h --- indra/newview/llviewerjoint.cpp | 21 ++++++++++++--------- indra/newview/llviewermessage.h | 4 +++- 2 files changed, 15 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index c425d95ff8..f5192914f4 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -59,14 +59,9 @@ BOOL LLViewerJoint::sDisableLOD = FALSE; // Class Constructor //----------------------------------------------------------------------------- LLViewerJoint::LLViewerJoint() + : LLJoint() { - mUpdateXform = TRUE; - mValid = FALSE; - mComponents = SC_JOINT | SC_BONE | SC_AXES; - mMinPixelArea = DEFAULT_LOD; - mPickName = PN_DEFAULT; - mVisible = TRUE; - mMeshID = 0; + init(); } @@ -74,13 +69,21 @@ LLViewerJoint::LLViewerJoint() // LLViewerJoint() // Class Constructor //----------------------------------------------------------------------------- -LLViewerJoint::LLViewerJoint(const std::string &name, LLJoint *parent) : - LLJoint(name, parent) +LLViewerJoint::LLViewerJoint(const std::string &name, LLJoint *parent) + : LLJoint(name, parent) +{ + init(); +} + + +LLViewerJoint::init() { mValid = FALSE; mComponents = SC_JOINT | SC_BONE | SC_AXES; mMinPixelArea = DEFAULT_LOD; mPickName = PN_DEFAULT; + mVisible = TRUE; + mMeshID = 0; } diff --git a/indra/newview/llviewermessage.h b/indra/newview/llviewermessage.h index 8404d6fde0..1415c16090 100644 --- a/indra/newview/llviewermessage.h +++ b/indra/newview/llviewermessage.h @@ -205,7 +205,9 @@ void open_inventory_offer(const std::vector& items, const std::string& f struct LLOfferInfo { - LLOfferInfo() {}; + LLOfferInfo() + : mFromGroup(FALSE), mFromObject(FALSE), + mIM(IM_NOTHING_SPECIAL), mType(LLAssetType::AT_NONE) {}; LLOfferInfo(const LLSD& sd); void forceResponse(InventoryOfferResponse response); -- cgit v1.2.3 From 5bb7bfce1470b260b7e7b0935ca8401ff6ca9feb Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:09:16 -0800 Subject: follow-up for CID-372 --- indra/newview/llviewerjoint.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index 08c4ec36fd..5ff766696c 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -141,7 +141,9 @@ public: std::vector mMeshParts; void setMeshID( S32 id ) {mMeshID = id;} -protected: +private: + void init(); + BOOL mValid; U32 mComponents; F32 mMinPixelArea; -- cgit v1.2.3 From 3091c30af0b862ac3bac3ba72d33df27c0f15d97 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:12:16 -0800 Subject: CID-370 Checker: UNINIT_CTOR Function: LLVivoxProtocolParser::LLVivoxProtocolParser() File: /indra/newview/llvoiceclient.cpp --- indra/newview/llvoiceclient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 8ca0fd6ef6..981fde2ffb 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -296,8 +296,14 @@ void LLVivoxProtocolParser::reset() ignoringTags = false; accumulateText = false; energy = 0.f; + hasText = false; + hasAudio = false; + hasVideo = false; + terminated = false; ignoreDepth = 0; isChannel = false; + incoming = false; + enabled = false; isEvent = false; isLocallyMuted = false; isModeratorMuted = false; -- cgit v1.2.3 From 245c044e3b2b58e893c20137551fc1abda033fe5 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:14:01 -0800 Subject: CID-369 Checker: UNINIT_CTOR Function: LLVoiceClient::sessionState::sessionState() File: /indra/newview/llvoiceclient.cpp --- indra/newview/llvoiceclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 981fde2ffb..a0d42d9b5f 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -6414,6 +6414,7 @@ void LLVoiceClient::filePlaybackSetMode(bool vox, float speed) } LLVoiceClient::sessionState::sessionState() : + mErrorStatusCode(0), mMediaStreamState(streamStateUnknown), mTextStreamState(streamStateUnknown), mCreateInProgress(false), -- cgit v1.2.3 From 1acf7a4a29a0f6c4ab1b88f275ae6e815d0f738e Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:15:56 -0800 Subject: CID-364 Checker: UNINIT_CTOR Function: LLEventNotification::LLEventNotification() File: /indra/newview/lleventnotifier.cpp --- indra/newview/lleventnotifier.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index edfb9dc864..f096ba604f 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -174,6 +174,7 @@ void LLEventNotifier::remove(const U32 event_id) LLEventNotification::LLEventNotification() : mEventID(0), + mEventDate(0), mEventName("") { } -- cgit v1.2.3 From a93d2cb2193afdc305f8b8ad2e11c2e40781c27c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:21:28 -0800 Subject: CID-363 Checker: UNINIT_CTOR Function: LLManipTranslate::LLManipTranslate(LLToolComposite *) File: /indra/newview/llmaniptranslate.cpp --- indra/newview/llmaniptranslate.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp index 5f30ab4e01..52fe31fbba 100644 --- a/indra/newview/llmaniptranslate.cpp +++ b/indra/newview/llmaniptranslate.cpp @@ -123,9 +123,13 @@ LLManipTranslate::LLManipTranslate( LLToolComposite* composite ) mAxisArrowLength(50), mConeSize(0), mArrowLengthMeters(0.f), + mGridSizeMeters(1.f), mPlaneManipOffsetMeters(0.f), mUpdateTimer(), mSnapOffsetMeters(0.f), + mSubdivisions(10.f), + mInSnapRegime(FALSE), + mSnapped(FALSE), mArrowScales(1.f, 1.f, 1.f), mPlaneScales(1.f, 1.f, 1.f), mPlaneManipPositions(1.f, 1.f, 1.f, 1.f) -- cgit v1.2.3 From df2f9e7823388f03455d889bc04779a3ee93867d Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:26:50 -0800 Subject: CID-361 Checker: UNINIT_CTOR Function: LLToolGrab::LLToolGrab(LLToolComposite *) File: /indra/newview/lltoolgrab.cpp plus followup to previous fix... --- indra/newview/llmanipscale.cpp | 1 + indra/newview/lltoolgrab.cpp | 6 ++++++ indra/newview/llviewerjoint.cpp | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index 84a5eb7352..ee3ffa2450 100644 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -180,6 +180,7 @@ LLManipScale::LLManipScale( LLToolComposite* composite ) mScaleSnapUnit2(1.f), mSnapRegimeOffset(0.f), mSnapGuideLength(0.f), + mInSnapRegime(FALSE), mScaleSnapValue(0.f) { mManipulatorScales = new F32[NUM_MANIPULATORS]; diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp index 26dbe6a489..d837a334f1 100644 --- a/indra/newview/lltoolgrab.cpp +++ b/indra/newview/lltoolgrab.cpp @@ -78,9 +78,15 @@ LLToolGrab::LLToolGrab( LLToolComposite* composite ) : LLTool( std::string("Grab"), composite ), mMode( GRAB_INACTIVE ), mVerticalDragging( FALSE ), + mHitLand(FALSE), + mLastMouseX(0), + mLastMouseY(0), + mAccumDeltaX(0), + mAccumDeltaY(0), mHasMoved( FALSE ), mOutsideSlop(FALSE), mDeselectedThisClick(FALSE), + mLastFace(0), mSpinGrabbing( FALSE ), mSpinRotation(), mHideBuildHighlight(FALSE) diff --git a/indra/newview/llviewerjoint.cpp b/indra/newview/llviewerjoint.cpp index f5192914f4..95f05b5f5f 100644 --- a/indra/newview/llviewerjoint.cpp +++ b/indra/newview/llviewerjoint.cpp @@ -76,7 +76,7 @@ LLViewerJoint::LLViewerJoint(const std::string &name, LLJoint *parent) } -LLViewerJoint::init() +void LLViewerJoint::init() { mValid = FALSE; mComponents = SC_JOINT | SC_BONE | SC_AXES; -- cgit v1.2.3 From 607636508d4affab833ca24b64a5bbf002ec1c9f Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:29:29 -0800 Subject: privacy... --- indra/newview/llviewerjoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerjoint.h b/indra/newview/llviewerjoint.h index 5ff766696c..0d3092a044 100644 --- a/indra/newview/llviewerjoint.h +++ b/indra/newview/llviewerjoint.h @@ -141,7 +141,7 @@ public: std::vector mMeshParts; void setMeshID( S32 id ) {mMeshID = id;} -private: +protected: void init(); BOOL mValid; -- cgit v1.2.3 From 44dc3c0713dc3efa90a94a6005f0b491cd509456 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:37:33 -0800 Subject: CID-356 Checker: UNINIT_CTOR Function: LLVOSky::LLVOSky(const LLUUID &, unsigned char, LLViewerRegion *) File: /indra/newview/llvosky.cpp --- indra/newview/llvosky.cpp | 11 +++++++---- indra/newview/llvosky.h | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 5ff8f0d267..0550ed770b 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -343,7 +343,6 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) cloud_pos_density1 = LLColor3(); cloud_pos_density2 = LLColor3(); - mInitialized = FALSE; mbCanSelect = FALSE; mUpdateTimer.reset(); @@ -385,6 +384,10 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp) mBloomTexturep->setAddressMode(LLTexUnit::TAM_CLAMP); mHeavenlyBodyUpdated = FALSE ; + + mDrawRefl = 0; + mHazeConcentration = 0.f; + mInterpVal = 0.f; } @@ -1072,10 +1075,10 @@ BOOL LLVOSky::updateSky() ++next_frame; next_frame = next_frame % cycle_frame_no; - sInterpVal = (!mInitialized) ? 1 : (F32)next_frame / cycle_frame_no; + mInterpVal = (!mInitialized) ? 1 : (F32)next_frame / cycle_frame_no; // sInterpVal = (F32)next_frame / cycle_frame_no; - LLSkyTex::setInterpVal( sInterpVal ); - LLHeavenBody::setInterpVal( sInterpVal ); + LLSkyTex::setInterpVal( mInterpVal ); + LLHeavenBody::setInterpVal( mInterpVal ); calcAtmospherics(); if (mForceUpdate || total_no_tiles == frame) diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index ef74324e58..8366909755 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -613,7 +613,7 @@ protected: LLColor3 mLastTotalAmbient; F32 mAmbientScale; LLColor3 mNightColorShift; - F32 sInterpVal; + F32 mInterpVal; LLColor4 mFogColor; LLColor4 mGLFogCol; @@ -636,8 +636,8 @@ protected: public: //by bao //fake vertex buffer updating - //to guaranttee at least updating one VBO buffer every frame - //to walk around the bug caused by ATI card --> DEV-3855 + //to guarantee at least updating one VBO buffer every frame + //to work around the bug caused by ATI card --> DEV-3855 // void createDummyVertexBuffer() ; void updateDummyVertexBuffer() ; -- cgit v1.2.3 From 3d8bd2b166b86e9fa1416d20dedc111a42c2a348 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 28 Jan 2010 11:52:38 -0800 Subject: CID-351 Checker: UNINIT_CTOR Function: LLSelectMgr::LLSelectMgr() File: /indra/newview/llselectmgr.cpp --- indra/newview/llselectmgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 6f76715e73..bf08756051 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -218,7 +218,8 @@ LLSelectMgr::LLSelectMgr() mHoverObjects = new LLObjectSelection(); mHighlightedObjects = new LLObjectSelection(); - + mForceSelection = FALSE; + mShowSelection = FALSE; } -- cgit v1.2.3 From d383adfc92e099676313ed930b2c1c8b1a315ae3 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Thu, 28 Jan 2010 22:02:31 +0200 Subject: Fixed bug EXT-3773 (Group chat toasts should have inspectors for names). Added on-hover icons to invoke avatar inspector to IM toasts. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 37 +++++++++++++++++++++++++++++++++++++ indra/newview/lltoastimpanel.h | 3 +++ 2 files changed, 40 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 7717ae9e01..89a58cd736 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -33,8 +33,11 @@ #include "llviewerprecompiledheaders.h" #include "lltoastimpanel.h" +#include "llfloaterreg.h" #include "llnotifications.h" #include "llinstantmessage.h" +#include "lltooltip.h" + #include "llviewerchat.h" const S32 LLToastIMPanel::DEFAULT_MESSAGE_MAX_LINE_COUNT = 6; @@ -80,6 +83,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mAvatarName->setValue(p.from); mTime->setValue(p.time); mSessionID = p.session_id; + mAvatarID = p.avatar_id; mNotification = p.notification; if(p.from == SYSTEM_FROM) @@ -119,3 +123,36 @@ BOOL LLToastIMPanel::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } + +//virtual +BOOL LLToastIMPanel::handleToolTip(S32 x, S32 y, MASK mask) +{ + // It's not our direct child, so parentPointInView() doesn't work. + LLRect name_rect; + mAvatarName->localRectToOtherView(mAvatarName->getLocalRect(), &name_rect, this); + if (!name_rect.pointInRect(x, y)) + return LLToastPanel::handleToolTip(x, y, mask); + + // Spawn at right side of the name textbox. + LLRect sticky_rect = mAvatarName->calcScreenRect(); + S32 icon_x = llmin(sticky_rect.mLeft + mAvatarName->getTextPixelWidth() + 3, sticky_rect.mRight - 16); + LLCoordGL pos(icon_x, sticky_rect.mTop); + + LLToolTip::Params params; + params.background_visible(false); + params.click_callback(boost::bind(&LLToastIMPanel::showInspector, this)); + params.delay_time(0.0f); // spawn instantly on hover + params.image(LLUI::getUIImage("Info_Small")); + params.message(""); + params.padding(0); + params.pos(pos); + params.sticky_rect(sticky_rect); + + LLToolTipMgr::getInstance()->show(params); + return TRUE; +} + +void LLToastIMPanel::showInspector() +{ + LLFloaterReg::showInstance("inspect_avatar", LLSD().with("avatar_id", mAvatarID)); +} diff --git a/indra/newview/lltoastimpanel.h b/indra/newview/lltoastimpanel.h index 42d9a97c3f..154e6dae16 100644 --- a/indra/newview/lltoastimpanel.h +++ b/indra/newview/lltoastimpanel.h @@ -58,11 +58,14 @@ public: LLToastIMPanel(LLToastIMPanel::Params &p); virtual ~LLToastIMPanel(); /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleToolTip(S32 x, S32 y, MASK mask); private: + void showInspector(); static const S32 DEFAULT_MESSAGE_MAX_LINE_COUNT; LLNotificationPtr mNotification; LLUUID mSessionID; + LLUUID mAvatarID; LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mTime; -- cgit v1.2.3 From a08f098847cda964bfba5476fd213e05bdf67dd0 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 10:11:53 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- implemented patch to remove LM prefixes from landmarks' names *NOTE: It will be unnecessary after the first successful session in viewer 2.0. Can be removed before public release. Implementation details: At the first run with this patch it patches all cached landmarks: removes LM sort prefixes and updates them on the viewer and server sides. Also it calls fetching agent's inventory to process not yet loaded landmarks too. If fetching is successfully done it will store special per-agent empty file-marker in the user temporary folder (where cached inventory is loaded) while caching agent's inventory. After that in will not affect the viewer until cached marker is removed. --HG-- branch : product-engine --- indra/newview/llinventorymodel.cpp | 134 +++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 961f7adc0a..9e96bbc55f 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -142,6 +142,105 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return rv; } +/* +This namespace contains a functionality to remove LM prefixes were used to store sort order of +Favorite Landmarks in landmarks' names. +Once being in Favorites folder LM inventory Item has such prefix. +Due to another solution is implemented in EXT-3985 these prefixes should be removed. + +*NOTE: It will be unnecessary after the first successful session in viewer 2.0. +Can be removed before public release. + +Implementation details: +At the first run with this patch it patches all cached landmarks: removes LM sort prefixes and +updates them on the viewer and server sides. +Also it calls fetching agent's inventory to process not yet loaded landmarks too. +If fetching is successfully done it will store special per-agent empty file-marker +in the user temporary folder (where cached inventory is loaded) while caching agent's inventory. +After that in will not affect the viewer until cached marker is removed. +*/ +namespace LMSortPrefix +{ + bool cleanup_done = false; + const std::string getMarkerPath() + { + std::string path(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, gAgentID.asString())); + std::string marker_filename = llformat("%s-lm_prefix_marker", path.c_str()); + + return marker_filename; + } + bool wasClean() + { + static bool was_clean = false; + static bool already_init = false; + if (already_init) return was_clean; + + already_init = true; + std::string path_to_marker = getMarkerPath(); + was_clean = LLFile::isfile(path_to_marker); + + return was_clean; + } + + void setLandmarksWereCleaned() + { + if (cleanup_done) + { + std::string path_to_marker = getMarkerPath(); + LLFILE* file = LLFile::fopen(path_to_marker, "w"); + if(!file) + { + llwarns << "unable to save marker that LM prefixes were removed: " << path_to_marker << llendl; + return; + } + + fclose(file); + } + } + + void removePrefix(LLPointer inv_item) + { + if (wasClean()) + { + LL_INFOS_ONCE("") << "Inventory was cleaned for this avatar. Patch can be removed." << LL_ENDL; + return; + } + + if (LLInventoryType::IT_LANDMARK != inv_item->getInventoryType()) return; + + std::string old_name = inv_item->getName(); + + S32 sort_field = -1; + std::string display_name; + BOOL exists = LLViewerInventoryItem::extractSortFieldAndDisplayName(old_name, &sort_field, &display_name); + if (exists && sort_field != -1) + { + llinfos << "Removing Landmark sort field and separator for: " << old_name << " | " << inv_item->getUUID() << llendl; + LLUUID parent_uuid = inv_item->getParentUUID(); + if (gInventory.getCategory(parent_uuid)) + { + llinfos << "parent folder is: " << gInventory.getCategory(parent_uuid)->getName() << llendl; + } + + + // mark item completed to avoid error while copying and updating server + inv_item->setComplete(TRUE); + LLPointer new_item = new LLViewerInventoryItem(inv_item); + new_item->rename(display_name); + gInventory.updateItem(new_item); + new_item->updateServer(FALSE); + + gInventory.notifyObservers(); + } + } + + void completeCleanup() + { + // background fetch is completed. can save marker + cleanup_done = true; + } +} + ///---------------------------------------------------------------------------- /// Class LLInventoryModel ///---------------------------------------------------------------------------- @@ -1736,6 +1835,8 @@ void LLInventoryModel::stopBackgroundFetch() gIdleCallbacks.deleteFunction(&LLInventoryModel::backgroundFetch, NULL); sBulkFetchCount=0; sMinTimeBetweenFetches=0.0f; + + LMSortPrefix::completeCleanup(); } } @@ -1882,6 +1983,13 @@ void LLInventoryModel::cache( const LLUUID& parent_folder_id, const LLUUID& agent_id) { + if (getRootFolderID() == parent_folder_id) + { + // *TODO: mantipov: can be removed before public release, EXT-3985 + //save marker to avoid fetching inventory on future sessions + LMSortPrefix::setLandmarksWereCleaned(); + } + lldebugs << "Caching " << parent_folder_id << " for " << agent_id << llendl; LLViewerInventoryCategory* root_cat = getCategory(parent_folder_id); @@ -2692,6 +2800,28 @@ void LLInventoryModel::buildParentChildMap() // The inv tree is built. mIsAgentInvUsable = true; + {// *TODO: mantipov: can be removed before public release, EXT-3985 + /* + *HACK: mantipov: to cleanup landmarks were marked with sort index prefix in name. + Is necessary to be called once per account after EXT-3985 is implemented. + So, let fetch agent's inventory, processing will be done in processInventoryDescendents() + Should be removed before public release. + */ + if (!LMSortPrefix::wasClean()) + { + cat_array_t cats; + item_array_t items; + collectDescendents(agent_inv_root_id, cats, items, INCLUDE_TRASH); + + for (item_array_t::const_iterator it= items.begin(); it != items.end(); ++it) + { + LMSortPrefix::removePrefix(*it); + } + + gInventory.startBackgroundFetch(agent_inv_root_id); + } + } + llinfos << "Inventory initialized, notifying observers" << llendl; addChangedMask(LLInventoryObserver::ALL, LLUUID::null); notifyObservers(); @@ -3457,6 +3587,10 @@ void LLInventoryModel::processInventoryDescendents(LLMessageSystem* msg,void**) continue; } gInventory.updateItem(titem); + + {// *TODO: mantipov: can be removed before public release, EXT-3985 + LMSortPrefix::removePrefix(titem); + } } // set version and descendentcount according to message. -- cgit v1.2.3 From 72b2cf291d67ae7a271b5745e50290d174a088b6 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 12:25:38 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- implemented cleanning of stored sort indexes to remove ones for landmarks not in Favorites while disconnecting viewer --HG-- branch : product-engine --- indra/newview/llviewerinventory.cpp | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index a3cbd80c84..1b141532ef 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1178,8 +1178,10 @@ const std::string& LLViewerInventoryItem::getName() const /** * Class to store sorting order of favorites landmarks in a local file. EXT-3985. * It replaced previously implemented solution to store sort index in landmark's name as a "@" prefix. + * Data are stored in user home directory. */ class LLFavoritesOrderStorage : public LLSingleton + , public LLDestroyClass { public: /** @@ -1193,12 +1195,27 @@ public: S32 getSortIndex(const LLUUID& inv_item_id); void removeSortIndex(const LLUUID& inv_item_id); + /** + * Implementation of LLDestroyClass. Calls cleanup() instance method. + * + * It is important this callback is called before gInventory is cleaned. + * For now it is called from LLAppViewer::cleanup() -> LLAppViewer::disconnectViewer(), + * Inventory is cleaned later from LLAppViewer::cleanup() after LLAppViewer::disconnectViewer() is called. + * @see cleanup() + */ + static void destroyClass(); + const static S32 NO_INDEX; private: friend class LLSingleton; LLFavoritesOrderStorage() { load(); } ~LLFavoritesOrderStorage() { save(); } + /** + * Removes sort indexes for items which are not in Favorites bar for now. + */ + void cleanup(); + const static std::string SORTING_DATA_FILE_NAME; void load(); @@ -1206,6 +1223,32 @@ private: typedef std::map sort_index_map_t; sort_index_map_t mSortIndexes; + + struct IsNotInFavorites + { + IsNotInFavorites(const LLInventoryModel::item_array_t& items) + : mFavoriteItems(items) + { + + } + + /** + * Returns true if specified item is not found among inventory items + */ + bool operator()(const sort_index_map_t::value_type& id_index_pair) const + { + LLPointer item = gInventory.getItem(id_index_pair.first); + if (item.isNull()) return true; + + LLInventoryModel::item_array_t::const_iterator found_it = + std::find(mFavoriteItems.begin(), mFavoriteItems.end(), item); + + return found_it == mFavoriteItems.end(); + } + private: + LLInventoryModel::item_array_t mFavoriteItems; + }; + }; const std::string LLFavoritesOrderStorage::SORTING_DATA_FILE_NAME = "landmarks_sorting.xml"; @@ -1231,6 +1274,12 @@ void LLFavoritesOrderStorage::removeSortIndex(const LLUUID& inv_item_id) mSortIndexes.erase(inv_item_id); } +// static +void LLFavoritesOrderStorage::destroyClass() +{ + LLFavoritesOrderStorage::instance().cleanup(); +} + void LLFavoritesOrderStorage::load() { // load per-resident sorting information @@ -1273,6 +1322,24 @@ void LLFavoritesOrderStorage::save() } } +void LLFavoritesOrderStorage::cleanup() +{ + const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); + + IsNotInFavorites is_not_in_fav(items); + + sort_index_map_t aTempMap; + //copy unremoved values from mSortIndexes to aTempMap + std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), + inserter(aTempMap, aTempMap.begin()), + is_not_in_fav); + + //Swap the contents of mSortIndexes and aTempMap + mSortIndexes.swap(aTempMap); +} // *TODO: mantipov: REMOVE, EXT-3985 -- cgit v1.2.3 From 540752ff2dcaaf565e8a9dff93079816ef572312 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 10:27:15 +0000 Subject: DEV-41686: Added a DisableMouseWarp debug option. Turning this option on makes alt-zooming and mouselook actually work when using Synergy. I believe this will also make it work for certain input devices, and Parallels, that control your cursor by setting its position in absolute coordinates. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llviewerwindow.cpp | 17 ++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 1ef79aeec0..f3bda19ed1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2377,6 +2377,17 @@ Value 0 + DisableMouseWarp + + Comment + Disable warping of the mouse to the center of the screen during alt-zoom and mouse look. Useful with certain input devices, mouse sharing programs like Synergy, or running under Parallels. + Persist + 1 + Type + Boolean + Value + 0 + DisableRendering Comment diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b4c73dba26..8692cdcc57 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2269,15 +2269,18 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) void LLViewerWindow::moveCursorToCenter() { - S32 x = getWorldViewWidthScaled() / 2; - S32 y = getWorldViewHeightScaled() / 2; + if (! gSavedSettings.getBOOL("DisableMouseWarp")) + { + S32 x = getWorldViewWidthScaled() / 2; + S32 y = getWorldViewHeightScaled() / 2; - //on a forced move, all deltas get zeroed out to prevent jumping - mCurrentMousePoint.set(x,y); - mLastMousePoint.set(x,y); - mCurrentMouseDelta.set(0,0); + //on a forced move, all deltas get zeroed out to prevent jumping + mCurrentMousePoint.set(x,y); + mLastMousePoint.set(x,y); + mCurrentMouseDelta.set(0,0); - LLUI::setMousePositionScreen(x, y); + LLUI::setMousePositionScreen(x, y); + } } -- cgit v1.2.3 From 4666636cdc67beb3cbb1c81107ce1f1f368385e1 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 12:34:23 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- improvements: for now sort indexes are cleaned & saved only if something was changed amont them. --HG-- branch : product-engine --- indra/newview/llviewerinventory.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 1b141532ef..bcfb8ecbbd 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1208,7 +1208,7 @@ public: const static S32 NO_INDEX; private: friend class LLSingleton; - LLFavoritesOrderStorage() { load(); } + LLFavoritesOrderStorage() : mIsDirty(false) { load(); } ~LLFavoritesOrderStorage() { save(); } /** @@ -1224,6 +1224,8 @@ private: typedef std::map sort_index_map_t; sort_index_map_t mSortIndexes; + bool mIsDirty; + struct IsNotInFavorites { IsNotInFavorites(const LLInventoryModel::item_array_t& items) @@ -1257,6 +1259,7 @@ const S32 LLFavoritesOrderStorage::NO_INDEX = -1; void LLFavoritesOrderStorage::setSortIndex(const LLUUID& inv_item_id, S32 sort_index) { mSortIndexes[inv_item_id] = sort_index; + mIsDirty = true; } S32 LLFavoritesOrderStorage::getSortIndex(const LLUUID& inv_item_id) @@ -1272,6 +1275,7 @@ S32 LLFavoritesOrderStorage::getSortIndex(const LLUUID& inv_item_id) void LLFavoritesOrderStorage::removeSortIndex(const LLUUID& inv_item_id) { mSortIndexes.erase(inv_item_id); + mIsDirty = true; } // static @@ -1302,6 +1306,9 @@ void LLFavoritesOrderStorage::load() void LLFavoritesOrderStorage::save() { + // nothing to save if clean + if (!mIsDirty) return; + // If we quit from the login screen we will not have an SL account // name. Don't try to save, otherwise we'll dump a file in // C:\Program Files\SecondLife\ or similar. JC @@ -1324,6 +1331,9 @@ void LLFavoritesOrderStorage::save() void LLFavoritesOrderStorage::cleanup() { + // nothing to clean + if (!mIsDirty) return; + const LLUUID fav_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; -- cgit v1.2.3 From 8a7ca61479813f55481f1040f75cd6fc63e713d2 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 13:05:11 +0200 Subject: Work on major bug EXT-3985 ([BSI] Landmarks created in Viewer 2.0 show up with 1@ in Viewer 1.23.x) -- cleanup: removed deprecated code added for previous sollution to support custom sorting of favorite landmarks. For now previous implementation is removed, bug is FIXED. --HG-- branch : product-engine --- indra/newview/llfavoritesbar.cpp | 4 +-- indra/newview/llinventorybridge.cpp | 2 +- indra/newview/llviewerinventory.cpp | 50 ++++++++----------------------------- indra/newview/llviewerinventory.h | 4 --- 4 files changed, 13 insertions(+), 47 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 0e42ff09d8..57e6619470 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -685,7 +685,7 @@ void LLFavoritesBarCtrl::updateButtons() { // an child's order and mItems should be same if (button->getLandmarkId() != item->getUUID() // sort order has been changed - || button->getLabelSelected() != item->getDisplayName() // favorite's name has been changed + || button->getLabelSelected() != item->getName() // favorite's name has been changed || button->getRect().mRight < rightest_point) // favbar's width has been changed { break; @@ -780,7 +780,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointergetWidth(item->getDisplayName()) + 20; + int requred_width = mFont->getWidth(item->getName()) + 20; int width = requred_width > def_button_width? def_button_width : requred_width; LLFavoriteLandmarkButton* fav_btn = NULL; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 6c9c7d15be..e04d3ec5a0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5079,7 +5079,7 @@ void LLLandmarkBridgeAction::doIt() payload["asset_id"] = item->getAssetUUID(); LLSD args; - args["LOCATION"] = item->getDisplayName(); + args["LOCATION"] = item->getName(); LLNotificationsUtil::add("TeleportFromLandmark", args, payload); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index bcfb8ecbbd..3001992630 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1172,7 +1172,7 @@ const std::string& LLViewerInventoryItem::getName() const return linked_category->getName(); } - return getDisplayName(); + return LLInventoryItem::getName(); } /** @@ -1340,42 +1340,17 @@ void LLFavoritesOrderStorage::cleanup() gInventory.collectDescendents(fav_id, cats, items, LLInventoryModel::EXCLUDE_TRASH); IsNotInFavorites is_not_in_fav(items); - - sort_index_map_t aTempMap; - //copy unremoved values from mSortIndexes to aTempMap - std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), - inserter(aTempMap, aTempMap.begin()), - is_not_in_fav); - - //Swap the contents of mSortIndexes and aTempMap - mSortIndexes.swap(aTempMap); -} + sort_index_map_t aTempMap; + //copy unremoved values from mSortIndexes to aTempMap + std::remove_copy_if(mSortIndexes.begin(), mSortIndexes.end(), + inserter(aTempMap, aTempMap.begin()), + is_not_in_fav); -// *TODO: mantipov: REMOVE, EXT-3985 -const std::string& LLViewerInventoryItem::getDisplayName() const -{ - return LLInventoryItem::getName(); -/* - std::string result; - BOOL hasSortField = extractSortFieldAndDisplayName(0, &result); - - mDisplayName = LLInventoryItem::getName(); - - return mDisplayName = hasSortField ? result : LLInventoryItem::getName(); -*/ + //Swap the contents of mSortIndexes and aTempMap + mSortIndexes.swap(aTempMap); } -// *TODO: mantipov: REMOVE, EXT-3985 -// static -std::string LLViewerInventoryItem::getDisplayName(const std::string& name) -{ - llassert(false); - std::string result; - BOOL hasSortField = extractSortFieldAndDisplayName(name, 0, &result); - - return hasSortField ? result : name; -} S32 LLViewerInventoryItem::getSortField() const { @@ -1387,12 +1362,6 @@ void LLViewerInventoryItem::setSortField(S32 sortField) LLFavoritesOrderStorage::instance().setSortIndex(mUUID, sortField); } -// *TODO: mantipov: REMOVE, EXT-3985 -void LLViewerInventoryItem::rename(const std::string& n) -{ - LLInventoryItem::rename(n); -} - const LLPermissions& LLViewerInventoryItem::getPermissions() const { // Use the actual permissions of the symlink, not its parent. @@ -1481,7 +1450,8 @@ U32 LLViewerInventoryItem::getCRC32() const return LLInventoryItem::getCRC32(); } -// *TODO: mantipov: REMOVE, EXT-3985 +// *TODO: mantipov: should be removed with LMSortPrefix patch in llinventorymodel.cpp, EXT-3985 +static char getSeparator() { return '@'; } BOOL LLViewerInventoryItem::extractSortFieldAndDisplayName(const std::string& name, S32* sortField, std::string* displayName) { using std::string; diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index cf104503a8..c24f76c87a 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -64,12 +64,8 @@ public: virtual LLAssetType::EType getType() const; virtual const LLUUID& getAssetUUID() const; virtual const std::string& getName() const; - virtual const std::string& getDisplayName() const; - static std::string getDisplayName(const std::string& name); - static char getSeparator() { return '@'; } virtual S32 getSortField() const; virtual void setSortField(S32 sortField); - virtual void rename(const std::string& new_name); virtual const LLPermissions& getPermissions() const; virtual const LLUUID& getCreatorUUID() const; virtual const std::string& getDescription() const; -- cgit v1.2.3 From d9b924edd2f5d511c5e506fafe2f01f983214711 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 11:26:08 +0000 Subject: EXT-4763: Turn off URL highlighting for toast alerts. --- indra/newview/lltoastalertpanel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index c3ccb9380b..da31bb3e73 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -170,6 +170,7 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal params.tab_stop(false); params.wrap(true); params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP); + params.allow_html(false); LLTextBox * msg_box = LLUICtrlFactory::create (params); // Compute max allowable height for the dialog text, so we can allocate -- cgit v1.2.3 From 3da01ec592edd2aaab1fe6dcaaaed6d13cc492b6 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 11:50:59 +0000 Subject: EXT-4747: Turn on URL hyperlinking for Pick Info descriptions. --- indra/newview/skins/default/xui/en/panel_pick_info.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_pick_info.xml b/indra/newview/skins/default/xui/en/panel_pick_info.xml index 65ccd10cf0..7489988722 100644 --- a/indra/newview/skins/default/xui/en/panel_pick_info.xml +++ b/indra/newview/skins/default/xui/en/panel_pick_info.xml @@ -88,6 +88,7 @@ follows="all" height="100" width="280" + allow_html="true" hide_scrollbar="false" layout="topleft" left="10" -- cgit v1.2.3 From 57e1216f798dbbe479493c19658da36b96622290 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhan Date: Fri, 29 Jan 2010 14:07:12 +0200 Subject: Fixed normal bug EXT-4374 - Gestures floater: 'Activate' btn applies unsaved changes to gesture. --HG-- branch : product-engine --- indra/newview/llpreviewgesture.cpp | 10 ++++++++-- indra/newview/llpreviewgesture.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 84bdaafacf..53e351e66e 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -155,6 +155,12 @@ LLPreviewGesture* LLPreviewGesture::show(const LLUUID& item_id, const LLUUID& ob return preview; } +void LLPreviewGesture::draw() +{ + // Skip LLPreview::draw() to avoid description update + LLFloater::draw(); +} + // virtual BOOL LLPreviewGesture::handleKeyHere(KEY key, MASK mask) { @@ -497,11 +503,9 @@ BOOL LLPreviewGesture::postBuild() if (item) { - childSetCommitCallback("desc", LLPreview::onText, this); childSetText("desc", item->getDescription()); childSetPrevalidate("desc", &LLLineEditor::prevalidateASCIIPrintableNoPipe); - childSetCommitCallback("name", LLPreview::onText, this); childSetText("name", item->getName()); childSetPrevalidate("name", &LLLineEditor::prevalidateASCIIPrintableNoPipe); } @@ -1077,6 +1081,8 @@ void LLPreviewGesture::saveIfNeeded() } else { + LLPreview::onCommit(); + // Every save gets a new UUID. Yup. LLTransactionID tid; LLAssetID asset_id; diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h index 19fa1dcc37..5968e936ef 100644 --- a/indra/newview/llpreviewgesture.h +++ b/indra/newview/llpreviewgesture.h @@ -60,6 +60,7 @@ public: virtual ~LLPreviewGesture(); // LLView + /*virtual*/ void draw(); /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, -- 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/newview') 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/newview') 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 943f8afa09480629ad659de9601b36b3dc565246 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 14:25:50 +0200 Subject: Fixed normal bug EXT-4743 ('Stop flying' button disappears if minimize undocked movement controls) - synchronized visibility of "stand_stop_flying_container" with a panel visibility when it is reparented from the Move Floater to container. --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 5981baab60..4bf2bac649 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -651,6 +651,9 @@ void LLPanelStandStopFlying::reparent(LLFloaterMove* move_view) // Detach from movement controls. parent->removeChild(this); mOriginalParent.get()->addChild(this); + // update parent with self visibility (it is changed in setVisible()). EXT-4743 + mOriginalParent.get()->setVisible(getVisible()); + mAttached = false; updatePosition(); // don't defer until next draw() to avoid flicker } -- 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/newview') 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 53173419000ba1d14aa99c59353e91f700915e07 Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Fri, 29 Jan 2010 13:14:14 +0000 Subject: EXT-4679: Removed reference to no-longer-supported abuse URL. --- indra/newview/skins/default/xui/en/notifications.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 41f4621d66..fc535205f1 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3851,7 +3851,7 @@ Are you sure you want to quit? type="alertmodal"> Use this tool to report violations of the [http://secondlife.com/corporate/tos.php Terms of Service] and [http://secondlife.com/corporate/cs.php Community Standards]. -All reported abuses are investigated and resolved. You can view the resolution by reading the [http://secondlife.com/support/incidentreport.php Incident Report]. +All reported abuses are investigated and resolved. -- cgit v1.2.3 From 10cbb9ea27e8e47a235efece1b30365b7f00e038 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 29 Jan 2010 15:16:11 +0200 Subject: Fixed low bug EXT-4749 (There is misleading notification after voice has been turned off from preferences) - Added skipping "Voice not available at your current location" when agent voice is disabled --HG-- branch : product-engine --- indra/newview/llvoicechannel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 589999c026..9d49fb69d6 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -698,7 +698,11 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status) // do not notify user when leaving proximal channel return; case STATUS_VOICE_DISABLED: - LLCallInfoDialog::show("unavailable", mNotifyArgs); + //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) + if(LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking()) + { + LLCallInfoDialog::show("unavailable", mNotifyArgs); + } return; default: break; -- 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/newview') 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 From efeaba0acd9b40d50a32e4c728489231fbaac7e8 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 15:48:50 +0200 Subject: Fixed normal bug EXT-4762 ( Crash on exit from viewer in LLPanelPeopleMenus::ContextMenu) - reason: attempt to delete instance of the LLContextMenu from the LLPanelPeopleMenus::ContextMenu after it was deleted by menu holder on viewer exit. - fix: check if menu is not dead via stored LLHandle of the menu before deleting. --HG-- branch : product-engine --- indra/newview/llpanelpeoplemenus.cpp | 10 +++++++++- indra/newview/llpanelpeoplemenus.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp index 501dac5dff..470cfca8fe 100644 --- a/indra/newview/llpanelpeoplemenus.cpp +++ b/indra/newview/llpanelpeoplemenus.cpp @@ -61,7 +61,14 @@ ContextMenu::~ContextMenu() // It can have registered Enable callbacks which are called from the LLMenuHolderGL::draw() // via selected item (menu_item_call) by calling LLMenuItemCallGL::buildDrawLabel. // we can have a crash via using callbacks of deleted instance of ContextMenu. EXT-4725 - if (mMenu) mMenu->die(); + + // menu holder deletes its menus on viewer exit, so we have no way to determine if instance + // of mMenu has already been deleted except of using LLHandle. EXT-4762. + if (!mMenuHandle.isDead()) + { + mMenu->die(); + mMenu = NULL; + } } void ContextMenu::show(LLView* spawning_view, const std::vector& uuids, S32 x, S32 y) @@ -86,6 +93,7 @@ void ContextMenu::show(LLView* spawning_view, const std::vector& uuids, std::copy(uuids.begin(), uuids.end(), mUUIDs.begin()); mMenu = createMenu(); + mMenuHandle = mMenu->getHandle(); mMenu->show(x, y); LLMenuGL::showPopup(spawning_view, mMenu, x, y); } diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h index 7251f6dbbd..913638d8c8 100644 --- a/indra/newview/llpanelpeoplemenus.h +++ b/indra/newview/llpanelpeoplemenus.h @@ -62,6 +62,7 @@ protected: std::vector mUUIDs; LLContextMenu* mMenu; + LLHandle mMenuHandle; }; /** -- cgit v1.2.3 From d66d9afae1c7cd4484b72532c0103ce7a4db9e77 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Fri, 29 Jan 2010 16:09:30 +0200 Subject: Fixed normal bug EXT-3882 ([BSI] block list contains the word block instead of (object)) - original issue has been fixed by Ramzi Linden in changeset eeabc4a70a6f at 2010-01-19 (Renaming multiple xml "MuteObject" nodes with unique names for block list and context menu). - changed panel title from "Blocked List" to "Block List" --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml index 39170b90ca..072ea882e6 100644 --- a/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_block_list_sidetray.xml @@ -29,7 +29,7 @@ text_color="white" top="5" width="250"> - Blocked List + Block List Date: Fri, 29 Jan 2010 17:01:01 +0200 Subject: Fixed normal bug EXT-4355 (Preferences: Location of logs does not show full path) - changed "control_name" for view with log path to the "InstantMessageLogPath" - also changed a line editor state from "disabled" to "readonly" to have a chance to scroll text to see full path in this field. --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 2 +- indra/newview/skins/default/xui/en/panel_preferences_privacy.xml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e77c93b5f8..ef444c8ba4 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1207,7 +1207,7 @@ void LLFloaterPreference::setPersonalInfo(const std::string& visibility, bool im childEnable("log_nearby_chat"); childEnable("log_instant_messages"); childEnable("show_timestamps_check_im"); - childEnable("log_path_string"); + childDisable("log_path_string");// LineEditor becomes readonly in this case. childEnable("log_path_button"); std::string display_email(email); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml index 0aaeb6114e..f7e3ede93c 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_privacy.xml @@ -174,8 +174,7 @@ Date: Fri, 29 Jan 2010 17:22:36 +0200 Subject: fixed bug EXT-4122 [BSI] Notification about \"maximum number of groups\" returns redundant information The hardcoded and unlocalized dataserver response has been removed from the message of notification. --HG-- branch : product-engine --- indra/newview/llviewermessage.cpp | 1 - indra/newview/skins/default/xui/en/notifications.xml | 1 - 2 files changed, 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 55b0d6fa8b..9240833632 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -630,7 +630,6 @@ bool join_group_response(const LLSD& notification, const LLSD& response) delete_context_data = FALSE; LLSD args; args["NAME"] = name; - args["INVITE"] = message; LLNotificationsUtil::add("JoinedTooManyGroupsMember", args, notification["payload"]); } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index fc535205f1..787346f7cd 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -2941,7 +2941,6 @@ Chat and instant messages will be hidden. Instant messages will get your Busy mo type="alert"> You have reached your maximum number of groups. Please leave another group before joining this one, or decline the offer. [NAME] has invited you to join a group as a member. -[INVITE] Date: Fri, 29 Jan 2010 17:48:10 +0200 Subject: =?UTF-8?q?fixed=20major=20EXT-3643=20=E2=80=9CEmbed=20friendship?= =?UTF-8?q?=20offer=20into=20IM=20window=E2=80=9D;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 35 +++++++++- indra/newview/llimfloater.cpp | 19 +++++- indra/newview/llimfloater.h | 1 + indra/newview/llnotificationhandler.h | 22 +++++- indra/newview/llnotificationhandlerutil.cpp | 78 ++++++++++++++++++++-- indra/newview/llnotificationofferhandler.cpp | 19 +++++- indra/newview/lltoastnotifypanel.cpp | 5 ++ .../skins/default/xui/en/floater_im_session.xml | 10 +-- .../newview/skins/default/xui/en/notifications.xml | 6 +- 9 files changed, 174 insertions(+), 21 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index f1e7e622b3..acbd0db868 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -51,9 +51,12 @@ #include "llslurl.h" #include "lllayoutstack.h" #include "llagent.h" +#include "llnotificationsutil.h" +#include "lltoastnotifypanel.h" #include "llviewerregion.h" #include "llworld.h" + #include "llsidetray.h"//for blocked objects panel static LLDefaultChildRegistry::Register r("chat_history"); @@ -654,8 +657,36 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL mLastMessageTimeStr = chat.mTimeStr; } - std::string message = irc_me ? chat.mText.substr(3) : chat.mText; - mEditor->appendText(message, FALSE, style_params); + if (chat.mNotifId.notNull()) + { + LLNotificationPtr notification = LLNotificationsUtil::find(chat.mNotifId); + if (notification != NULL) + { + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel( + notification); + notify_box->setFollowsLeft(); + notify_box->setFollowsRight(); + //Prepare the rect for the view + LLRect target_rect = mEditor->getDocumentView()->getRect(); + // squeeze down the widget by subtracting padding off left and right + target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad(); + target_rect.mRight -= mRightWidgetPad; + notify_box->reshape(target_rect.getWidth(), + notify_box->getRect().getHeight()); + notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom); + + LLInlineViewSegment::Params params; + params.view = notify_box; + params.left_pad = mLeftWidgetPad; + params.right_pad = mRightWidgetPad; + mEditor->appendWidget(params, "\n", false); + } + } + else + { + std::string message = irc_me ? chat.mText.substr(3) : chat.mText; + mEditor->appendText(message, FALSE, style_params); + } mEditor->blockUndo(); // automatically scroll to end when receiving chat from myself diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index c0f22fcea2..c2bcb1cdf9 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -601,8 +601,18 @@ void LLIMFloater::updateMessages() chat.mFromID = from_id; chat.mSessionID = mSessionID; chat.mFromName = from; - chat.mText = message; chat.mTimeStr = time; + + // process offer notification + if (msg.has("notifiaction_id")) + { + chat.mNotifId = msg["notifiaction_id"].asUUID(); + } + //process text message + else + { + chat.mText = message; + } mChatHistory->appendMessage(chat, use_plain_text_chat_history); mLastMessageIndex = msg["index"].asInteger(); @@ -610,6 +620,13 @@ void LLIMFloater::updateMessages() } } +void LLIMFloater::reloadMessages() +{ + mChatHistory->clear(); + mLastMessageIndex = -1; + updateMessages(); +} + // static void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* userdata ) { diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index 0ca0325451..9552b30737 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -80,6 +80,7 @@ public: // get new messages from LLIMModel void updateMessages(); + void reloadMessages(); static void onSendMsg( LLUICtrl*, void*); void sendMsg(); diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index e57674d31c..5f4768e321 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -276,6 +276,11 @@ public: */ static bool canSpawnIMSession(const LLNotificationPtr& notification); + /** + * Checks sufficient conditions to add notification toast panel IM floater. + */ + static bool canAddNotifPanelToIM(const LLNotificationPtr& notification); + /** * Checks if passed notification can create IM session and be written into it. * @@ -296,6 +301,11 @@ public: */ static void logToIMP2P(const LLNotificationPtr& notification); + /** + * Writes notification message to IM p2p session. + */ + static void logToIMP2P(const LLNotificationPtr& notification, bool to_file_only); + /** * Writes group notice notification message to IM group session. */ @@ -309,7 +319,7 @@ public: /** * Spawns IM session. */ - static void spawnIMSession(const std::string& name, const LLUUID& from_id); + static LLUUID spawnIMSession(const std::string& name, const LLUUID& from_id); /** * Returns name from the notification's substitution. @@ -319,6 +329,16 @@ public: * @param notification - Notification which substitution's name will be returned. */ static std::string getSubstitutionName(const LLNotificationPtr& notification); + + /** + * Adds notification panel to the IM floater. + */ + static void addNotifPanelToIM(const LLNotificationPtr& notification); + + /** + * Reloads IM floater messages. + */ + static void reloadIMFloaterMessages(const LLNotificationPtr& notification); }; } diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 02f948eca9..f9b3b7187a 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -39,6 +39,7 @@ #include "llagent.h" #include "llfloaterreg.h" #include "llnearbychat.h" +#include "llimfloater.h" using namespace LLNotificationsUI; @@ -90,6 +91,13 @@ bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) || INVENTORY_DECLINED == notification->getName(); } +// static +bool LLHandlerUtil::canAddNotifPanelToIM(const LLNotificationPtr& notification) +{ + return OFFER_FRIENDSHIP == notification->getName(); +} + + // static bool LLHandlerUtil::canSpawnSessionAndLogToIM(const LLNotificationPtr& notification) { @@ -136,6 +144,12 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) +{ + logToIMP2P(notification, false); +} + +// static +void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); @@ -148,8 +162,16 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) { LLUUID from_id = notification->getPayload()["from_id"]; - logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(), - from_id, from_id); + if(to_file_only) + { + logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(), + LLUUID(), LLUUID()); + } + else + { + logToIM(IM_NOTHING_SPECIAL, session_name, name, notification->getMessage(), + from_id, from_id); + } } } @@ -191,7 +213,7 @@ void LLHandlerUtil::logToNearbyChat(const LLNotificationPtr& notification, EChat } // static -void LLHandlerUtil::spawnIMSession(const std::string& name, const LLUUID& from_id) +LLUUID LLHandlerUtil::spawnIMSession(const std::string& name, const LLUUID& from_id) { LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); @@ -199,8 +221,10 @@ void LLHandlerUtil::spawnIMSession(const std::string& name, const LLUUID& from_i session_id); if (session == NULL) { - LLIMMgr::instance().addSession(name, IM_NOTHING_SPECIAL, from_id); + session_id = LLIMMgr::instance().addSession(name, IM_NOTHING_SPECIAL, from_id); } + + return session_id; } // static @@ -210,3 +234,49 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica ? notification->getSubstitutions()["NAME"] : notification->getSubstitutions()["[NAME]"]; } + +// static +void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) +{ + const std::string name = LLHandlerUtil::getSubstitutionName(notification); + LLUUID from_id = notification->getPayload()["from_id"]; + + LLUUID session_id = spawnIMSession(name, from_id); + // add offer to session + LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession( + session_id); + llassert_always(session != NULL); + + LLSD offer; + offer["notifiaction_id"] = notification->getID(); + offer["from_id"] = notification->getPayload()["from_id"]; + offer["from"] = name; + offer["time"] = LLLogChat::timestamp(true); + session->mMsgs.push_front(offer); + + LLIMFloater::show(session_id); +} + +// static +void LLHandlerUtil::reloadIMFloaterMessages( + const LLNotificationPtr& notification) +{ + LLUUID from_id = notification->getPayload()["from_id"]; + LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id); + LLIMFloater* im_floater = LLFloaterReg::findTypedInstance( + "impanel", session_id); + if (im_floater != NULL) + { + LLIMModel::LLIMSession * session = LLIMModel::getInstance()->findIMSession( + session_id); + if(session != NULL) + { + session->mMsgs.clear(); + std::list chat_history; + LLLogChat::loadAllHistory(session->mHistoryFileName, chat_history); + session->addMessagesFromHistory(chat_history); + } + + im_floater->reloadMessages(); + } +} diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index fad0c6a91e..8c13b0fafa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -93,7 +93,7 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { - LLHandlerUtil::logToIMP2P(notification); + if( notification->getPayload().has("give_inventory_notification") && !notification->getPayload()["give_inventory_notification"] ) @@ -103,18 +103,25 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { + LLUUID session_id; if (LLHandlerUtil::canSpawnIMSession(notification)) { const std::string name = LLHandlerUtil::getSubstitutionName(notification); LLUUID from_id = notification->getPayload()["from_id"]; - LLHandlerUtil::spawnIMSession(name, from_id); + session_id = LLHandlerUtil::spawnIMSession(name, from_id); } - if (notification->getPayload().has("SUPPRESS_TOAST") + if (LLHandlerUtil::canAddNotifPanelToIM(notification)) + { + LLHandlerUtil::addNotifPanelToIM(notification); + LLHandlerUtil::logToIMP2P(notification, true); + } + else if (notification->getPayload().has("SUPPRESS_TOAST") && notification->getPayload()["SUPPRESS_TOAST"]) { + LLHandlerUtil::logToIMP2P(notification); LLNotificationsUtil::cancel(notification); } else @@ -131,6 +138,8 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if(channel) channel->addToast(p); + LLHandlerUtil::logToIMP2P(notification); + // send a signal to the counter manager mNewNotificationSignal(); } @@ -146,6 +155,10 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { + if (LLHandlerUtil::canAddNotifPanelToIM(notification)) + { + LLHandlerUtil::reloadIMFloaterMessages(notification); + } mChannel->killToastByNotificationID(notification->getID()); } } diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 94acb2ae8c..4d741456c4 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -43,6 +43,7 @@ #include "lluiconstants.h" #include "llrect.h" #include "lltrans.h" +#include "llnotificationsutil.h" const S32 BOTTOM_PAD = VPAD * 3; S32 BUTTON_WIDTH = 90; @@ -235,6 +236,10 @@ LLButton* LLToastNotifyPanel::createButton(const LLSD& form_element, BOOL is_opt LLToastNotifyPanel::~LLToastNotifyPanel() { std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer()); + if (LLNotificationsUtil::find(mNotification->getID()) != NULL) + { + LLNotifications::getInstance()->cancel(mNotification); + } } void LLToastNotifyPanel::updateButtonsLayout(const std::vector& buttons, S32 left_pad, S32 top) { diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index d2e5473157..9aaa660574 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -12,7 +12,7 @@ can_minimize="true" can_close="true" visible="false" - width="360" + width="440" can_resize="true" min_width="250" min_height="190"> @@ -20,7 +20,7 @@ animate="false" follows="all" height="320" - width="360" + width="440" layout="topleft" orientation="horizontal" name="im_panels" @@ -38,7 +38,7 @@ left="0" top="0" height="200" - width="245" + width="325" user_resize="true">