diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b8461e90a1..9a1de908f7 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3240,17 +3240,6 @@ Value 1 - ChatShowIcons - - Comment - Show/hide people icons in chat - Persist - 1 - Type - Boolean - Value - 1 - CheesyBeacon Comment @@ -13683,17 +13672,6 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 - GlobalShowIconsOverride - - Comment - Show/hide people icons in any list. This option should be set back to 0 when icons are enabled locally for the lists - Persist - 1 - Type - Boolean - Value - 0 - FriendsSortOrder Comment diff --git a/indra/newview/fsparticipantlist.cpp b/indra/newview/fsparticipantlist.cpp index 30bab57dc2..a136c558d2 100644 --- a/indra/newview/fsparticipantlist.cpp +++ b/indra/newview/fsparticipantlist.cpp @@ -246,7 +246,7 @@ FSParticipantList::FSParticipantList(LLSpeakerMgr* data_source, if (use_context_menu && can_toggle_icons) { mAvatarList->setShowIcons("ParticipantListShowIcons"); - mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&FSParticipantList::onParticipantListIconToggle, this)); + mAvatarListToggleIconsConnection = gSavedSettings.getControl("ParticipantListShowIcons")->getSignal()->connect(boost::bind(&LLAvatarList::toggleIcons, mAvatarList)); } //Lets fill avatarList with existing speakers @@ -473,14 +473,6 @@ void FSParticipantList::onAvalineCallerRemoved(const LLUUID& participant_id) mSpeakerMgr->removeAvalineSpeaker(participant_id); } -void FSParticipantList::onParticipantListIconToggle() -{ - std::string param = mAvatarList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - mAvatarList->setIconsVisible(gSavedSettings.getBOOL(param)); -} - void FSParticipantList::setSortOrder(EParticipantSortOrder order) { const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); diff --git a/indra/newview/fsparticipantlist.h b/indra/newview/fsparticipantlist.h index 0607043223..5f7f9c0b91 100644 --- a/indra/newview/fsparticipantlist.h +++ b/indra/newview/fsparticipantlist.h @@ -263,8 +263,6 @@ private: void onAvalineCallerFound(const LLUUID& participant_id); void onAvalineCallerRemoved(const LLUUID& participant_id); - void onParticipantListIconToggle(); - /** * Adjusts passed participant to work properly. * diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 65fbe2236f..225e270a72 100755 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -66,18 +66,16 @@ bool LLAvatarList::contains(const LLUUID& id) return std::find(ids.begin(), ids.end(), id) != ids.end(); } -void LLAvatarList::setIconsVisible(bool visible) +void LLAvatarList::toggleIcons() { - if (visible == mShowIcons) // nothing to be done here. - return; - // Save the new value for new items to use. - mShowIcons = visible; - + mShowIcons = !mShowIcons; + gSavedSettings.setBOOL(mIconParamName, mShowIcons); + // Show/hide icons for all existing items. std::vector items; getItems(items); - for (std::vector::const_iterator it = items.begin(); it != items.end(); it++) + for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) { static_cast(*it)->setAvatarIconVisible(mShowIcons); } @@ -282,8 +280,6 @@ void LLAvatarList::draw() updateAvatarNames(); } - setIconsVisible(gSavedSettings.getBOOL(mIconParamName) && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); - if (mDirty) refresh(); diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index 7325d470b2..bb40be0fd4 100755 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -79,7 +79,7 @@ public: void setSessionID(const LLUUID& session_id) { mSessionID = session_id; } const LLUUID& getSessionID() { return mSessionID; } - void setIconsVisible(bool visible); + void toggleIcons(); void setSpeakingIndicatorsVisible(bool visible); void showPermissions(bool visible); void showDisplayName(bool visible); diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 6894a91d7d..64fac00468 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -87,8 +87,7 @@ LLConversationViewSession::LLConversationViewSession(const LLConversationViewSes mHasArrow(true), mIsInActiveVoiceChannel(false), mFlashStateOn(false), - mFlashStarted(false), - mShowIcons(true) + mFlashStarted(false) { mFlashTimer = new LLFlashTimer(); } @@ -176,7 +175,7 @@ BOOL LLConversationViewSession::postBuild() if (session) { LLAvatarIconCtrl* icon = mItemPanel->getChild("avatar_icon"); - icon->setVisible(mShowIcons); + icon->setVisible(true); icon->setValue(session->mOtherParticipantID); mSpeakingIndicator->setSpeakerId(gAgentID, session->mSessionID, true); mHasArrow = false; @@ -429,49 +428,6 @@ void LLConversationViewSession::showVoiceIndicator(bool visible) requestArrange(); } -void LLConversationViewSession::setIconsVisible(bool visible) -{ - if (visible == mShowIcons) // nothing to be done here. - return; - - // Save the new value for new items to use. - mShowIcons = visible; - - // Show/hide icons for the 1-n-1 chat. - LLConversationItem* vmi = dynamic_cast(getViewModelItem()); - if (vmi && mItemPanel) - { - switch (vmi->getType()) - { - case LLConversationItem::CONV_PARTICIPANT: - case LLConversationItem::CONV_SESSION_1_ON_1: - { - LLIconCtrl* icon = mItemPanel->getChild("avatar_icon"); - icon->setVisible(mShowIcons); - break; - } - /* - case LLConversationItem::CONV_SESSION_AD_HOC: - case LLConversationItem::CONV_SESSION_GROUP: - { - LLIconCtrl* icon = mItemPanel->getChild("group_icon"); - icon->setVisible(mShowIcons); - break; - } - */ - default: - break; - } - } - - // Show/hide icons for all existing items. - items_t::const_iterator iter; - for (iter = getItemsBegin(); iter != getItemsEnd(); iter++) - { - dynamic_cast(*iter)->setAvatarIconVisible(mShowIcons); - } -} - void LLConversationViewSession::refresh() { // Refresh the session view from its model data @@ -504,9 +460,6 @@ void LLConversationViewSession::refresh() } } } - - setIconsVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); - requestArrange(); // Do the regular upstream refresh LLFolderViewFolder::refresh(); @@ -558,7 +511,7 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti LLAvatarIconCtrl::Params avatar_icon_params(params.avatar_icon()); applyXUILayout(avatar_icon_params, this); LLAvatarIconCtrl * avatarIcon = LLUICtrlFactory::create(avatar_icon_params); - addChild(avatarIcon); + addChild(avatarIcon); LLButton::Params info_button_params(params.info_button()); applyXUILayout(info_button_params, this); @@ -574,7 +527,6 @@ void LLConversationViewParticipant::initFromParams(const LLConversationViewParti BOOL LLConversationViewParticipant::postBuild() { mAvatarIcon = getChild("avatar_icon"); - mAvatarIcon->setVisible(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride")); mInfoBtn = getChild("info_btn"); mInfoBtn->setClickedCallback(boost::bind(&LLConversationViewParticipant::onInfoBtnClick, this)); @@ -638,12 +590,12 @@ S32 LLConversationViewParticipant::arrange(S32* width, S32* height) S32 arranged = LLFolderViewItem::arrange(width, height); //Adjusts the avatar icon based upon the indentation - LLRect avatarRect(getIndentation(), - mAvatarIcon->getRect().mTop, - getIndentation() + mAvatarIcon->getRect().getWidth(), - mAvatarIcon->getRect().mBottom); - mAvatarIcon->setShape(avatarRect); - + LLRect avatarRect(getIndentation(), + mAvatarIcon->getRect().mTop, + getIndentation() + mAvatarIcon->getRect().getWidth(), + mAvatarIcon->getRect().mBottom); + mAvatarIcon->setShape(avatarRect); + //Since dimensions changed, adjust the children (info button, speaker indicator) updateChildren(); @@ -715,7 +667,7 @@ void LLConversationViewParticipant::onMouseLeave(S32 x, S32 y, MASK mask) S32 LLConversationViewParticipant::getLabelXPos() { - return getIndentation() + (mAvatarIcon->getVisible() ? mAvatarIcon->getRect().getWidth() : 0) + mIconPad; + return getIndentation() + mAvatarIcon->getRect().getWidth() + mIconPad; } // static @@ -794,19 +746,6 @@ void LLConversationViewParticipant::hideSpeakingIndicator() mSpeakingIndicator->setVisible(false); } -void LLConversationViewParticipant::setAvatarIconVisible(bool visible) -{ - // Already done? Then do nothing. - if (mAvatarIcon->getVisible() == (BOOL)visible) - { - return; - } - - // Show/hide avatar icon. - mAvatarIcon->setVisible(visible); - updateChildren(); -} - // EOF #endif diff --git a/indra/newview/llconversationview.h b/indra/newview/llconversationview.h index fba9ad98eb..76da653c26 100644 --- a/indra/newview/llconversationview.h +++ b/indra/newview/llconversationview.h @@ -85,7 +85,7 @@ public: LLConversationViewParticipant* findParticipant(const LLUUID& participant_id); void showVoiceIndicator(bool visible); - void setIconsVisible(bool visible); + virtual void refresh(); /*virtual*/ void setFlashState(bool flash_state); @@ -112,8 +112,6 @@ private: bool mIsInActiveVoiceChannel; - bool mShowIcons; - LLVoiceClientStatusObserver* mVoiceClientObserver; boost::signals2::connection mActiveVoiceChannelConnection; @@ -149,7 +147,6 @@ public: /*virtual*/ S32 getLabelXPos(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); void hideSpeakingIndicator(); - void setAvatarIconVisible(bool visible); protected: friend class LLUICtrlFactory; diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index e08e2e58d1..31a892d3b2 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -925,11 +925,6 @@ void LLFloaterIMContainer::onCustomAction(const LLSD& userdata) { setSortOrderParticipants(LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - gSavedSettings.setBOOL("ChatShowIcons", !(gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL("ChatShowIcons") && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - } if ("chat_preferences" == command) { LLFloaterPreference * floater_prefp = LLFloaterReg::showTypedInstance("preferences"); @@ -980,10 +975,6 @@ BOOL LLFloaterIMContainer::isActionChecked(const LLSD& userdata) { return (order.getSortOrderParticipants() == LLConversationFilter::SO_DISTANCE); } - if ("view_icons" == command) - { - return gSavedSettings.getBOOL("ChatShowIcons") && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); - } if ("Translating.Enabled" == command) { return gSavedPerAccountSettings.getBOOL("TranslatingEnabled"); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index d39cee8398..b188b6be71 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -98,6 +98,8 @@ #endif // +#include + void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); typedef std::pair two_uuids_t; @@ -120,7 +122,7 @@ using namespace LLOldEvents; // Patch: ReplaceWornItemsOnly void wear_inventory_category_on_avatar(LLInventoryCategory* category); // -bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv*); +bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr); bool confirm_attachment_rez(const LLSD& notification, const LLSD& response); void teleport_via_landmark(const LLUUID& asset_id); static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit); @@ -3081,7 +3083,7 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat, return accept; } -void warn_move_inventory(LLViewerObject* object, LLMoveInv* move_inv) +void warn_move_inventory(LLViewerObject* object, boost::shared_ptr move_inv) { const char* dialog = NULL; if (object->flagScripted()) @@ -3092,7 +3094,34 @@ void warn_move_inventory(LLViewerObject* object, LLMoveInv* move_inv) { dialog = "MoveInventoryFromObject"; } - LLNotificationsUtil::add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv)); + + static LLNotificationPtr notification_ptr; + static boost::shared_ptr inv_ptr; + + // Notification blocks user from interacting with inventories so everything that comes after first message + // is part of this message - don'r show it again + // Note: workaround for MAINT-5495 untill proper refactoring and warning system for Drag&Drop can be made. + if (notification_ptr == NULL + || !notification_ptr->isActive() + || LLNotificationsUtil::find(notification_ptr->getID()) == NULL + || inv_ptr->mCategoryID != move_inv->mCategoryID + || inv_ptr->mObjectID != move_inv->mObjectID) + { + notification_ptr = LLNotificationsUtil::add(dialog, LLSD(), LLSD(), boost::bind(move_task_inventory_callback, _1, _2, move_inv)); + inv_ptr = move_inv; + } + else + { + // Notification is alive and not responded, operating inv_ptr should be safe so attach new data + two_uuids_list_t::iterator move_it; + for (move_it = move_inv->mMoveList.begin(); + move_it != move_inv->mMoveList.end(); + ++move_it) + { + inv_ptr->mMoveList.push_back(*move_it); + } + move_inv.reset(); + } } // Move/copy all inventory items from the Contents folder of an in-world @@ -3180,7 +3209,7 @@ BOOL move_inv_category_world_to_agent(const LLUUID& object_id, if(drop && accept) { it = inventory_objects.begin(); - LLMoveInv* move_inv = new LLMoveInv; + boost::shared_ptr move_inv(new LLMoveInv); move_inv->mObjectID = object_id; move_inv->mCategoryID = category_id; move_inv->mCallback = callback; @@ -4802,7 +4831,7 @@ LLFontGL::StyleFlags LLMarketplaceFolderBridge::getLabelStyle() const // helper stuff -bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, LLMoveInv* move_inv) +bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr move_inv) { LLFloaterOpenObject::LLCatAndWear* cat_and_wear = (LLFloaterOpenObject::LLCatAndWear* )move_inv->mUserData; LLViewerObject* object = gObjectList.findObject(move_inv->mObjectID); @@ -4838,7 +4867,7 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response move_inv->mCallback(option, move_inv->mUserData); } - delete move_inv; + move_inv.reset(); //since notification will persist return false; } @@ -5292,7 +5321,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, if (accept && drop) { - LLMoveInv* move_inv = new LLMoveInv; + boost::shared_ptr move_inv (new LLMoveInv()); move_inv->mObjectID = inv_item->getParentUUID(); two_uuids_t item_pair(mUUID, inv_item->getUUID()); move_inv->mMoveList.push_back(item_pair); diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 1767a26b36..f62bbc3cde 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1502,12 +1502,8 @@ void LLPanelPeople::onFriendsViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mAllFriendList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL(mOnlineFriendList->getIconParamName(), gSavedSettings.getBOOL(param)); - mAllFriendList->setIconsVisible(gSavedSettings.getBOOL(param)); - mOnlineFriendList->setIconsVisible(gSavedSettings.getBOOL(param)); + mAllFriendList->toggleIcons(); + mOnlineFriendList->toggleIcons(); } else if (chosen_item == "view_permissions") { @@ -1543,10 +1539,7 @@ void LLPanelPeople::onNearbyViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mNearbyList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - mNearbyList->setIconsVisible(gSavedSettings.getBOOL(param)); + mNearbyList->toggleIcons(); } else if (chosen_item == "sort_distance") { @@ -1565,8 +1558,6 @@ bool LLPanelPeople::onNearbyViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_NAME; if (item == "sort_distance") return sort_order == E_SORT_BY_DISTANCE; - if (item == "view_icons") - return gSavedSettings.getBOOL(mNearbyList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); return false; } @@ -1585,10 +1576,7 @@ void LLPanelPeople::onRecentViewSortMenuItemClicked(const LLSD& userdata) } else if (chosen_item == "view_icons") { - std::string param = mRecentList->getIconParamName(); - gSavedSettings.setBOOL(param, !(gSavedSettings.getBOOL(param) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - gSavedSettings.setBOOL("GlobalShowIconsOverride", (!gSavedSettings.getBOOL(param) && gSavedSettings.getBOOL("GlobalShowIconsOverride"))); - mRecentList->setIconsVisible(gSavedSettings.getBOOL(param)); + mRecentList->toggleIcons(); } } @@ -1601,8 +1589,6 @@ bool LLPanelPeople::onFriendsViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_NAME; if (item == "sort_status") return sort_order == E_SORT_BY_STATUS; - if (item == "view_icons") - return gSavedSettings.getBOOL(mAllFriendList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); // FIRE-5283: Sort by username if (item == "sort_username") return sort_order == E_SORT_BY_USERNAME; @@ -1620,8 +1606,6 @@ bool LLPanelPeople::onRecentViewSortMenuItemCheck(const LLSD& userdata) return sort_order == E_SORT_BY_MOST_RECENT; if (item == "sort_name") return sort_order == E_SORT_BY_NAME; - if (item == "view_icons") - return gSavedSettings.getBOOL(mRecentList->getIconParamName()) && !gSavedSettings.getBOOL("GlobalShowIconsOverride"); return false; } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 238b408cc4..55e7310ade 100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -5138,7 +5138,13 @@ void LLViewerObject::updateText() { if (mText.notNull()) { - LLVector3 up_offset(0,0,0); + LLVOAvatar* avatar = getAvatar(); + if (avatar) + { + mText->setHidden(avatar->isInMuteList()); + } + + LLVector3 up_offset(0,0,0); up_offset.mV[2] = getScale().mV[VZ]*0.6f; if (mDrawable.notNull()) diff --git a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml index b03c25a043..f9534c387f 100755 --- a/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_advanced.xml @@ -9,7 +9,6 @@ - Zeit in Millisekunden, die pro Frame an andere Anwendungen abgegeben werden, wenn [APP_NAME] nicht im Vordergrund ist [Standard: 40; 1 Sekunde = 1000 Millisekunden] diff --git a/indra/newview/skins/default/xui/en/menu_participant_view.xml b/indra/newview/skins/default/xui/en/menu_participant_view.xml index 658238bf41..7ea87ee05c 100755 --- a/indra/newview/skins/default/xui/en/menu_participant_view.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_view.xml @@ -59,19 +59,6 @@ function="IMFloaterContainer.Check" parameter="sort_participants_by_recent" /> - - - - - + function="CheckControl" + parameter="FriendsListShowIcons" /> + function="CheckControl" + parameter="NearbyListShowIcons" /> + function="CheckControl" + parameter="RecentListShowIcons" /> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml index 7a235683af..528b556bdb 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml @@ -79,17 +79,6 @@ name="UseAnimationTimeSteps" top_pad="5" width="237"/> -