diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 166f4b902..febfc0332 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -6864,6 +6864,19 @@ This should be as low as possible, but too low may break functionality Value 0 + RadarUpdateEnabled + + Comment + When false, pauses the radar until further notice, good for banning someone who just left. + Persist + 0 + HideFromEditor + 1 + Type + Boolean + Value + 1 + RadarUpdateRate Comment diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index 8491aa192..4a5640a27 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -315,7 +315,7 @@ const LLAvatarListEntry::ACTIVITY_TYPE LLAvatarListEntry::getActivity() LLFloaterAvatarList::LLFloaterAvatarList() : LLFloater(std::string("radar")), mTracking(false), - mUpdate(true), + mUpdate("RadarUpdateEnabled"), mDirtyAvatarSorting(false), mUpdateRate(gSavedSettings.getU32("RadarUpdateRate") * 3 + 3), mAvatarList(NULL) @@ -415,12 +415,12 @@ BOOL LLFloaterAvatarList::postBuild() getChild("update_rate")->setSelectedIndex(gSavedSettings.getU32("RadarUpdateRate")); getChild("update_rate")->setCommitCallback(boost::bind(&LLFloaterAvatarList::onCommitUpdateRate, this)); - getChild("hide_mark")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); - getChild("hide_pos")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); - getChild("hide_alt")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); - getChild("hide_act")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); - getChild("hide_age")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); - getChild("hide_time")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnMarkHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnPositionHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnAltitudeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnActivityHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnAgeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnTimeHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); // Get a pointer to the scroll list from the interface mAvatarList = getChild("avatar_list"); @@ -438,7 +438,7 @@ BOOL LLFloaterAvatarList::postBuild() if(gHippoGridManager->getConnectedGrid()->isSecondLife()) childSetVisible("hide_client", false); else - getChild("hide_client")->setCommitCallback(boost::bind(&LLFloaterAvatarList::assessColumns, this)); + gSavedSettings.getControl("RadarColumnClientHidden")->getSignal()->connect(boost::bind(&LLFloaterAvatarList::assessColumns, this)); return TRUE; } @@ -529,17 +529,11 @@ void LLFloaterAvatarList::updateAvatarList() //llinfos << "radar refresh: updating map" << llendl; // Check whether updates are enabled - LLCheckboxCtrl* check = getChild("update_enabled_cb"); - if (check && !check->getValue()) + if (!mUpdate) { - mUpdate = FALSE; refreshTracker(); return; } - else - { - mUpdate = TRUE; - } //moved to pipeline to prevent a crash //gPipeline.forAllVisibleDrawables(updateParticleActivity); @@ -1248,19 +1242,18 @@ LLAvatarListEntry * LLFloaterAvatarList::getAvatarEntry(LLUUID avatar) BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask) { - LLFloaterAvatarList* self = getInstance(); - LLScrollListItem* item = self->mAvatarList->getFirstSelected(); + LLScrollListItem* item = mAvatarList->getFirstSelected(); if(item) { LLUUID agent_id = item->getUUID(); if (( KEY_RETURN == key ) && (MASK_NONE == mask)) { - self->setFocusAvatar(agent_id); + setFocusAvatar(agent_id); return TRUE; } else if (( KEY_RETURN == key ) && (MASK_CONTROL == mask)) { - LLAvatarListEntry* entry = self->getAvatarEntry(agent_id); + const LLAvatarListEntry* entry = getAvatarEntry(agent_id); if (entry) { // llinfos << "Trying to teleport to " << entry->getName() << " at " << entry->getPosition() << llendl; @@ -1272,7 +1265,7 @@ BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask) if (( KEY_RETURN == key ) && (MASK_SHIFT == mask)) { - uuid_vec_t ids = self->mAvatarList->getSelectedIDs(); + uuid_vec_t ids = mAvatarList->getSelectedIDs(); if (ids.size() > 0) { if (ids.size() == 1) @@ -1414,11 +1407,11 @@ void LLFloaterAvatarList::sendKeys() std::ostringstream ids; int num_ids = 0; - for (int i = 0; i < regionp->mMapAvatarIDs.count(); i++) + for (int i = 0; i < regionp->mMapAvatarIDs.count(); ++i) { const LLUUID &id = regionp->mMapAvatarIDs.get(i); - ids << "," << id.asString(); + ids << "," << id; ++num_ids; diff --git a/indra/newview/llfloateravatarlist.h b/indra/newview/llfloateravatarlist.h index 3bcf4ea67..2ad3de090 100644 --- a/indra/newview/llfloateravatarlist.h +++ b/indra/newview/llfloateravatarlist.h @@ -354,7 +354,7 @@ private: /** * @brief TRUE when Updating */ - bool mUpdate; + const LLCachedControl mUpdate; /** * @brief Update rate (if min frames per update) diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 630a28128..3adaf85ee 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -3,10 +3,9 @@ * @brief Panel for roles information about a particular group. * * $LicenseInfo:firstyear=2006&license=viewergpl$ - * + * Second Life Viewer Source Code * Copyright (c) 2006-2009, Linden Research, Inc. * - * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement @@ -35,6 +34,7 @@ #include "llcheckboxctrl.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llbutton.h" #include "llfloateravatarinfo.h" #include "llfloatergroupinvite.h" @@ -1619,11 +1619,60 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc) } } +void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data) +{ + if (!data) return; + // Build the donated tier string. + std::ostringstream donated; + donated << data->getContribution() << " sq. m."; + + LLSD item_params; + item_params["id"] = data->getID(); + + item_params["columns"][0]["column"] = "name"; + // value is filled in by name list control + + item_params["columns"][1]["column"] = "donated"; + item_params["columns"][1]["value"] = donated.str(); + + item_params["columns"][2]["column"] = "online"; + item_params["columns"][2]["value"] = data->getOnlineStatus(); + item_params["columns"][2]["font"] = "SANSSERIF_SMALL"; + mMembersList->addNameItem(item_params); + + mHasMatch = TRUE; +} + +void LLPanelGroupMembersSubTab::onNameCache(/*const LLUUID& update_id,*/ LLGroupMemberData* member, const LLAvatarName& av_name) +{ + /* Singu Note: We don't have a getMemberVersion, yet, don't bother with these + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + if (!gdatap + || gdatap->getMemberVersion() != update_id + */ + if (!member) + { + return; + } + + // trying to avoid unnecessary hash lookups + std::string name; + LLAvatarNameCache::getPNSName(av_name, name); // Singu Note: Diverge from LL Viewer and filter by name displayed + if (matchesSearchFilter(name)) + { + addMemberToList(member); + if(!mMembersList->getEnabled()) + { + mMembersList->setEnabled(TRUE); + } + } +} + void LLPanelGroupMembersSubTab::updateMembers() { mPendingMemberUpdate = FALSE; - lldebugs << "LLPanelGroupMembersSubTab::updateMembers()" << llendl; + // Rebuild the members list. LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); if (!gdatap) @@ -1640,48 +1689,36 @@ void LLPanelGroupMembersSubTab::updateMembers() { return; } - + + //cleanup list only for first iteration + if(mMemberProgress == gdatap->mMembers.begin()) + { + mMembersList->deleteAllItems(); + } + + LLGroupMgrGroupData::member_list_t::iterator end = gdatap->mMembers.end(); - S32 i = 0; - for( ; mMemberProgress != end && isecond) continue; - // Do filtering on name if it is already in the cache. - bool add_member = true; + // Do filtering on name if it is already in the cache. + // Singu Note: Diverge from LL Viewer and filter by name displayed std::string fullname; - if (gCacheName->getFullName(mMemberProgress->first, fullname)) + if (LLAvatarNameCache::getPNSName(mMemberProgress->first, fullname)) { - if ( !matchesSearchFilter(fullname) ) + if (matchesSearchFilter(fullname)) { - add_member = false; + addMemberToList(mMemberProgress->second); } } - - if (add_member) + else { - // Build the donated tier string. - std::ostringstream donated; - donated << mMemberProgress->second->getContribution() << " sq. m."; - - LLSD row; - row["id"] = (*mMemberProgress).first; - - row["columns"][0]["column"] = "name"; - // value is filled in by name list control - - row["columns"][1]["column"] = "donated"; - row["columns"][1]["value"] = donated.str(); - - row["columns"][2]["column"] = "online"; - row["columns"][2]["value"] = mMemberProgress->second->getOnlineStatus(); - row["columns"][2]["font"] = "SANSSERIF_SMALL"; - - mMembersList->addNameItem(row); - mHasMatch = TRUE; + // If name is not cached, onNameCache() should be called when it is cached and add this member to list. + LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupMembersSubTab::onNameCache, + this, /*gdatap->getMemberVersion(),*/ mMemberProgress->second, _2)); } } diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 8ceac9b44..a91334830 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -3,10 +3,9 @@ * @brief Panel for roles information about a particular group. * * $LicenseInfo:firstyear=2006&license=viewergpl$ - * + * Second Life Viewer Source Code * Copyright (c) 2006-2009, Linden Research, Inc. * - * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab * to you under the terms of the GNU General Public License, version 2.0 * ("GPL"), unless you have obtained a separate licensing agreement @@ -35,6 +34,7 @@ #include "llpanelgroup.h" +class LLAvatarName; class LLNameListCtrl; class LLPanelGroupSubTab; class LLPanelGroupMembersSubTab; @@ -197,6 +197,9 @@ public: virtual void draw(); + void addMemberToList(LLGroupMemberData* data); + void onNameCache(/*const LLUUID& update_id,*/ LLGroupMemberData* member, const LLAvatarName& av_name); + protected: typedef std::map role_change_data_map_t; typedef std::map member_role_changes_map_t; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 6ca69fd0f..1257df80c 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3693,6 +3693,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mText = from_name; mesg = mesg.substr(3); ircstyle = TRUE; + // This block was moved up to allow bubbles with italicized chat + // set CHAT_STYLE_IRC to avoid adding Avatar Name as author of message. See EXT-656 + chat.mChatStyle = CHAT_STYLE_IRC; } chat.mText += mesg; @@ -3720,12 +3723,23 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) return; } + // We have a real utterance now, so can stop showing "..." and proceed. + if (chatter && chatter->isAvatar()) + { + LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE); + static_cast(chatter)->stopTyping(); + + if (!is_muted && !is_busy) + { + static const LLCachedControl use_chat_bubbles("UseChatBubbles",false); + visible_in_chat_bubble = use_chat_bubbles; + static_cast(chatter)->addChat(chat); + } + } + // Look for IRC-style emotes if (ircstyle) { - // set CHAT_STYLE_IRC to avoid adding Avatar Name as author of message. See EXT-656 - chat.mChatStyle = CHAT_STYLE_IRC; - // Do nothing, ircstyle is fixed above for chat bubbles } else @@ -3852,20 +3866,6 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mText = from_name + verb + mesg; } - // We have a real utterance now, so can stop showing "..." and proceed. - if (chatter && chatter->isAvatar()) - { - LLLocalSpeakerMgr::getInstance()->setSpeakerTyping(from_id, FALSE); - ((LLVOAvatar*)chatter)->stopTyping(); - - if (!is_muted && !is_busy) - { - static const LLCachedControl use_chat_bubbles("UseChatBubbles",false); - visible_in_chat_bubble = use_chat_bubbles; - ((LLVOAvatar*)chatter)->addChat(chat); - } - } - if (chatter) { chat.mPosAgent = chatter->getPositionAgent(); @@ -5286,7 +5286,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data) if (!avatarp) { // no agent by this ID...error? - LL_WARNS("Messaging") << "Received animation state for unknown avatar" << uuid << LL_ENDL; + LL_WARNS("Messaging") << "Received animation state for unknown avatar " << uuid << LL_ENDL; return; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index e35c88e0b..6146f6d48 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3318,6 +3318,13 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name) { F32 chat_fade_amt = llclamp((F32)((LLFrameTimer::getElapsedSeconds() - chat_iter->mTime) / CHAT_FADE_TIME), 0.f, 4.f); LLFontGL::StyleFlags style; + + // Singu Note: The following tweak may be a bad idea, though they've asked for actions to be italicized, the chat type for actions becomes irrelevant + // If LLFontGL::StyleFlags wasn't the parameter type, font styles could be combined and underline could be used, but that may be unnatural... + static const LLCachedControl italicize("LiruItalicizeActions"); + if (italicize && chat_iter->mChatStyle == CHAT_STYLE_IRC) + style = LLFontGL::ITALIC; + else switch(chat_iter->mChatType) { case CHAT_TYPE_WHISPER: diff --git a/indra/newview/scriptcounter.cpp b/indra/newview/scriptcounter.cpp index 754e7c43d..45b043b2d 100644 --- a/indra/newview/scriptcounter.cpp +++ b/indra/newview/scriptcounter.cpp @@ -97,7 +97,7 @@ void ScriptCounter::requestInventories() if (LLViewerObject* object = selectNode->getObject()) requestInventoriesFor(object); } - cmdline_printchat(LLTrans::getString("ScriptCounting")); + if (!doDelete) cmdline_printchat(LLTrans::getString("ScriptCounting")); requesting = false; } @@ -130,7 +130,8 @@ void ScriptCounter::inventoryChanged(LLViewerObject* obj, LLInventoryObject::obj { obj->removeInventoryListener(this); --inventories; - //llinfos << "Counting scripts in " << obj->getID() << llendl; + //const LLUUID& objid = obj->getID(); + //llinfos << "Counting scripts in " << objid << llendl; if (inv) { @@ -144,7 +145,11 @@ void ScriptCounter::inventoryChanged(LLViewerObject* obj, LLInventoryObject::obj { const LLUUID& id = asset->getUUID(); if (id.notNull()) + { + //llinfos << "Deleting script " << id << " in " << objid << llendl; obj->removeInventory(id); + --i; // Avoid iteration when removing, everything has shifted + } } } } diff --git a/indra/newview/skins/default/xui/en-us/floater_radar.xml b/indra/newview/skins/default/xui/en-us/floater_radar.xml index acb660be5..2f55b644a 100644 --- a/indra/newview/skins/default/xui/en-us/floater_radar.xml +++ b/indra/newview/skins/default/xui/en-us/floater_radar.xml @@ -289,7 +289,7 @@ -