From e72c120e9eb1691abdcf0a3c6e650be68a15b6bb Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 17 May 2017 22:34:50 +0300 Subject: MAINT-6805 Fixed Right-click menus in the right and left panes of the Conversations windows are different --- indra/newview/llavataractions.cpp | 12 +- indra/newview/llavataractions.h | 5 + indra/newview/llchathistory.cpp | 264 +++++++++++++++++++-- indra/newview/llfloaterimcontainer.cpp | 22 +- indra/newview/llfloaterimcontainer.h | 1 - .../skins/default/xui/en/menu_avatar_icon.xml | 44 +++- 6 files changed, 306 insertions(+), 42 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 219d9da01f..8fe684ad79 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -1005,7 +1005,7 @@ void LLAvatarActions::toggleBlock(const LLUUID& id) } // static -void LLAvatarActions::toggleMuteVoice(const LLUUID& id) +void LLAvatarActions::toggleMute(const LLUUID& id, U32 flags) { LLAvatarName av_name; LLAvatarNameCache::get(id, &av_name); @@ -1016,14 +1016,20 @@ void LLAvatarActions::toggleMuteVoice(const LLUUID& id) LLMute mute(id, av_name.getUserName(), LLMute::AGENT); if (!is_muted) { - mute_list->add(mute, LLMute::flagVoiceChat); + mute_list->add(mute, flags); } else { - mute_list->remove(mute, LLMute::flagVoiceChat); + mute_list->remove(mute, flags); } } +// static +void LLAvatarActions::toggleMuteVoice(const LLUUID& id) +{ + toggleMute(id, LLMute::flagVoiceChat); +} + // static bool LLAvatarActions::canOfferTeleport(const LLUUID& id) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 256d44d820..b56d5b0fb9 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -130,6 +130,11 @@ public: */ static void toggleBlock(const LLUUID& id); + /** + * Mute/unmute avatar. + */ + static void toggleMute(const LLUUID& id, U32 flags); + /** * Block/unblock the avatar voice. */ diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 9798ef3529..5748eeec47 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -38,10 +38,14 @@ #include "llpanel.h" #include "lluictrlfactory.h" #include "llscrollcontainer.h" -#include "llavatariconctrl.h" -#include "llcallingcard.h" //for LLAvatarTracker +#include "llagent.h" #include "llagentdata.h" #include "llavataractions.h" +#include "llavatariconctrl.h" +#include "llcallingcard.h" //for LLAvatarTracker +#include "llgroupactions.h" +#include "llgroupmgr.h" +#include "llspeakers.h" //for LLIMSpeakerMgr #include "lltrans.h" #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" @@ -49,7 +53,6 @@ #include "llstylemap.h" #include "llslurl.h" #include "lllayoutstack.h" -#include "llagent.h" #include "llnotificationsutil.h" #include "lltoastnotifypanel.h" #include "lltooltip.h" @@ -61,7 +64,6 @@ #include "llurlaction.h" #include "llviewercontrol.h" #include "llviewerobjectlist.h" -#include "llmutelist.h" static LLDefaultChildRegistry::Register r("chat_history"); @@ -187,6 +189,161 @@ public: return false; } + void banGroupMember(const LLUUID& participant_uuid) + { + LLUUID group_uuid = mSessionID; + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid); + if (!gdatap) + { + // Not a group + return; + } + + gdatap->banMemberById(participant_uuid); + } + + bool canBanInGroup() + { + LLUUID group_uuid = mSessionID; + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid); + if (!gdatap) + { + // Not a group + return false; + } + + if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) + && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS)) + { + return true; + } + + return false; + } + + bool canBanGroupMember(const LLUUID& participant_uuid) + { + LLUUID group_uuid = mSessionID; + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(group_uuid); + if (!gdatap) + { + // Not a group + return false; + } + + if (gdatap->mPendingBanRequest) + { + return false; + } + + if (gAgentID == getAvatarId()) + { + //Don't ban self + return false; + } + + if (gdatap->isRoleMemberDataComplete()) + { + if (gdatap->mMembers.size()) + { + LLGroupMgrGroupData::member_list_t::iterator mi = gdatap->mMembers.find(participant_uuid); + if (mi != gdatap->mMembers.end()) + { + LLGroupMemberData* member_data = (*mi).second; + // Is the member an owner? + if (member_data && member_data->isInRole(gdatap->mOwnerRole)) + { + return false; + } + + if (gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) + && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS)) + { + return true; + } + } + } + } + + LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + LLSpeaker * speakerp = speaker_mgr->findSpeaker(participant_uuid).get(); + + if (speakerp + && gAgent.hasPowerInGroup(group_uuid, GP_ROLE_REMOVE_MEMBER) + && gAgent.hasPowerInGroup(group_uuid, GP_GROUP_BAN_ACCESS)) + { + return true; + } + } + + return false; + } + + bool isGroupModerator() + { + LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (!speaker_mgr) + { + LL_WARNS() << "Speaker manager is missing" << LL_ENDL; + return false; + } + + // Is session a group call/chat? + if(gAgent.isInGroup(mSessionID)) + { + LLSpeaker * speakerp = speaker_mgr->findSpeaker(gAgentID).get(); + + // Is agent a moderator? + return speakerp && speakerp->mIsModerator; + } + + return false; + } + + bool canModerate(const std::string& userdata) + { + // only group moderators can perform actions related to this "enable callback" + if (!isGroupModerator() || gAgentID == getAvatarId()) + { + return false; + } + + LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (!speaker_mgr) + { + return false; + } + + LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get(); + if (!speakerp) + { + return false; + } + + bool voice_channel = speakerp->isInVoiceChannel(); + + if ("can_moderate_voice" == userdata) + { + return voice_channel; + } + else if ("can_mute" == userdata) + { + return voice_channel && (speakerp->mStatus != LLSpeaker::STATUS_MUTED); + } + else if ("can_unmute" == userdata) + { + return speakerp->mStatus == LLSpeaker::STATUS_MUTED; + } + else if ("can_allow_text_chat" == userdata) + { + return true; + } + + return false; + } + void onAvatarIconContextMenuItemClicked(const LLSD& userdata) { std::string level = userdata.asString(); @@ -245,11 +402,36 @@ public: } else if(level == "block_unblock") { - mute(getAvatarId(), LLMute::flagVoiceChat); + LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagVoiceChat); } else if(level == "mute_unmute") { - mute(getAvatarId(), LLMute::flagTextChat); + LLAvatarActions::toggleMute(getAvatarId(), LLMute::flagTextChat); + } + else if(level == "toggle_allow_text_chat") + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + speaker_mgr->toggleAllowTextChat(getAvatarId()); + } + else if(level == "group_mute") + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + speaker_mgr->moderateVoiceParticipant(getAvatarId(), false); + } + } + else if(level == "group_unmute") + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + speaker_mgr->moderateVoiceParticipant(getAvatarId(), true); + } + } + else if(level == "ban_member") + { + banGroupMember(getAvatarId()); } } @@ -265,24 +447,69 @@ public: { return LLMuteList::getInstance()->isMuted(getAvatarId(), LLMute::flagTextChat); } + else if (level == "is_allowed_text_chat") + { + if (gAgent.isInGroup(mSessionID)) + { + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + const LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()); + + if (NULL != speakerp) + { + return !speakerp->mModeratorMutedText; + } + } + return false; + } return false; } - void mute(const LLUUID& participant_id, U32 flags) + bool onAvatarIconContextMenuItemEnabled(const LLSD& userdata) { - BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - LLAvatarName av_name; - LLAvatarNameCache::get(participant_id, &av_name); - LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); + std::string level = userdata.asString(); - if (!is_muted) + if (level == "can_allow_text_chat" || level == "can_mute" || level == "can_unmute") { - LLMuteList::getInstance()->add(mute, flags); + return canModerate(userdata); } - else + else if (level == "can_ban_member") { - LLMuteList::getInstance()->remove(mute, flags); + return canBanGroupMember(getAvatarId()); } + return false; + } + + bool onAvatarIconContextMenuItemVisible(const LLSD& userdata) + { + std::string level = userdata.asString(); + + if (level == "show_mute") + { + LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get(); + if (speakerp) + { + return speakerp->isInVoiceChannel() && speakerp->mStatus != LLSpeaker::STATUS_MUTED; + } + } + return false; + } + else if (level == "show_unmute") + { + LLSpeakerMgr * speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID); + if (speaker_mgr) + { + LLSpeaker * speakerp = speaker_mgr->findSpeaker(getAvatarId()).get(); + if (speakerp) + { + return speakerp->mStatus == LLSpeaker::STATUS_MUTED; + } + } + return false; + } + return false; } BOOL postBuild() @@ -292,6 +519,8 @@ public: registrar.add("AvatarIcon.Action", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemClicked, this, _2)); registrar_enable.add("AvatarIcon.Check", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemChecked, this, _2)); + registrar_enable.add("AvatarIcon.Enable", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemEnabled, this, _2)); + registrar_enable.add("AvatarIcon.Visible", boost::bind(&LLChatHistoryHeader::onAvatarIconContextMenuItemVisible, this, _2)); registrar.add("ObjectIcon.Action", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemClicked, this, _2)); registrar_enable.add("ObjectIcon.Visible", boost::bind(&LLChatHistoryHeader::onObjectIconContextMenuItemVisible, this, _2)); @@ -567,9 +796,14 @@ protected: if(menu) { bool is_friend = LLAvatarActions::isFriend(mAvatarID); + bool is_group_session = gAgent.isInGroup(mSessionID); menu->setItemEnabled("Add Friend", !is_friend); menu->setItemEnabled("Remove Friend", is_friend); + menu->setItemVisible("Moderator Options Separator", is_group_session && isGroupModerator()); + menu->setItemVisible("Moderator Options", is_group_session && isGroupModerator()); + menu->setItemVisible("Group Ban Separator", is_group_session && canBanInGroup()); + menu->setItemVisible("BanMember", is_group_session && canBanInGroup()); if(gAgentID == mAvatarID) { diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 3522932d03..333765f99f 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1150,11 +1150,11 @@ void LLFloaterIMContainer::doToParticipants(const std::string& command, uuid_vec } else if ("block_unblock" == command) { - toggleMute(userID, LLMute::flagVoiceChat); + LLAvatarActions::toggleMute(userID, LLMute::flagVoiceChat); } else if ("mute_unmute" == command) { - toggleMute(userID, LLMute::flagTextChat); + LLAvatarActions::toggleMute(userID, LLMute::flagTextChat); } else if ("selected" == command || "mute_all" == command || "unmute_all" == command) { @@ -2096,24 +2096,6 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid) } } -void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags) -{ - BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags); - - LLAvatarName av_name; - LLAvatarNameCache::get(participant_id, &av_name); - LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT); - - if (!is_muted) - { - LLMuteList::getInstance()->add(mute, flags); - } - else - { - LLMuteList::getInstance()->remove(mute, flags); - } -} - void LLFloaterIMContainer::openNearbyChat() { // If there's only one conversation in the container and that conversation is the nearby chat diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 60cef83d9a..90fc0c2bdd 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -176,7 +176,6 @@ private: void moderateVoiceAllParticipants(bool unmute); void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); void toggleAllowTextChat(const LLUUID& participant_uuid); - void toggleMute(const LLUUID& participant_id, U32 flags); void banSelectedMember(const LLUUID& participant_uuid); void openNearbyChat(); bool isParticipantListExpanded(); diff --git a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml index 410caa7290..05ab4d35a0 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_icon.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_icon.xml @@ -1,5 +1,5 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From c7d7728e4a4caadac1875856d77b752bc36a2f56 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 19 May 2017 17:46:08 +0300 Subject: MAINT-7417 FIXED Confirmation is not shown when removing your own object inworld --- indra/newview/llviewermessage.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 507087d1ae..2dc219a769 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1222,6 +1222,11 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam const LLUUID& obj_id = (*obj_iter); if(!highlight_offered_object(obj_id)) { + const LLViewerInventoryCategory *parent = gInventory.getFirstNondefaultParent(obj_id); + if (parent && (parent->getPreferredType() == LLFolderType::FT_TRASH)) + { + gInventory.checkTrashOverflow(); + } continue; } -- cgit v1.2.3 From ed249c13af3509645089b280d3a594c29c216f68 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 19 May 2017 17:50:17 +0300 Subject: MAINT-7383 Show correct number of items including folder descendants --- indra/newview/llinventorymodel.h | 1 - indra/newview/llinventorypanel.cpp | 11 ++++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index c558c0803b..da78a057b5 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -265,7 +265,6 @@ public: // Follow parent chain to the top. bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const; -private: U32 getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit); //-------------------------------------------------------------------- diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4b117941a0..5a7881fe49 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1217,7 +1217,16 @@ void LLInventoryPanel::purgeSelectedItems() const std::set inventory_selected = mFolderRoot.get()->getSelectionList(); if (inventory_selected.empty()) return; LLSD args; - args["COUNT"] = (S32)inventory_selected.size(); + S32 count = inventory_selected.size(); + static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity"); + for (std::set::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); + it != end_it; + ++it) + { + LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); + count += gInventory.getDescendentsCountRecursive(item_id, trash_max_capacity); + } + args["COUNT"] = count; LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); } -- cgit v1.2.3 From c7dde30435c578b8fd4606135193e3ec8d31bd76 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 19 May 2017 18:47:20 +0300 Subject: MAINT-7424 Fixed number of items in the Trash not calculating correctly --- indra/newview/llinventorymodel.cpp | 38 ++++++++++++++++++-------------------- indra/newview/llinventorymodel.h | 2 -- indra/newview/llinventorypanel.cpp | 5 ++++- 3 files changed, 22 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index e5fd126d53..7ee41140f0 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -799,22 +799,6 @@ void LLInventoryModel::collectDescendentsIf(const LLUUID& id, } } -U32 LLInventoryModel::getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit) -{ - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - gInventory.collectDescendents(id, cats, items, LLInventoryModel::INCLUDE_TRASH); - - U32 items_found = items.size() + cats.size(); - - for (U32 i = 0; i < cats.size() && items_found <= max_item_limit; ++i) - { - items_found += getDescendentsCountRecursive(cats[i]->getUUID(), max_item_limit - items_found); - } - - return items_found; -} - void LLInventoryModel::addChangedMaskForLinks(const LLUUID& object_id, U32 mask) { const LLInventoryObject *obj = getObject(object_id); @@ -3321,9 +3305,12 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderT LLSD args; if(LLFolderType::FT_TRASH == preferred_type) { - static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity"); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; const LLUUID trash_id = findCategoryUUIDForType(preferred_type); - args["COUNT"] = (S32)getDescendentsCountRecursive(trash_id, trash_max_capacity); + gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); //All descendants + S32 item_count = items.size() + cats.size(); + args["COUNT"] = item_count; } LLNotificationsUtil::add(notification, args, LLSD(), boost::bind(&LLInventoryModel::callbackEmptyFolderType, this, _1, _2, preferred_type)); @@ -3433,9 +3420,20 @@ bool callback_preview_trash_folder(const LLSD& notification, const LLSD& respons void LLInventoryModel::checkTrashOverflow() { - static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity"); + static LLCachedControl trash_max_capacity(gSavedSettings, "InventoryTrashMaxCapacity"); + + // Collect all descendants including those in subfolders. + // + // Note: Do we really need content of subfolders? + // This was made to prevent download of trash folder timeouting + // viewer and sub-folders are supposed to download independently. + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; const LLUUID trash_id = findCategoryUUIDForType(LLFolderType::FT_TRASH); - if (getDescendentsCountRecursive(trash_id, trash_max_capacity) >= trash_max_capacity) + gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); + S32 item_count = items.size() + cats.size(); + + if (item_count >= trash_max_capacity) { if (LLFloaterPreviewTrash::isVisible()) { diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h index da78a057b5..01e0ed7e9b 100644 --- a/indra/newview/llinventorymodel.h +++ b/indra/newview/llinventorymodel.h @@ -265,8 +265,6 @@ public: // Follow parent chain to the top. bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const; - U32 getDescendentsCountRecursive(const LLUUID& id, U32 max_item_limit); - //-------------------------------------------------------------------- // Find //-------------------------------------------------------------------- diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 5a7881fe49..ba2dce1f98 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1224,7 +1224,10 @@ void LLInventoryPanel::purgeSelectedItems() ++it) { LLUUID item_id = static_cast((*it)->getViewModelItem())->getUUID(); - count += gInventory.getDescendentsCountRecursive(item_id, trash_max_capacity); + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + gInventory.collectDescendents(item_id, cats, items, LLInventoryModel::INCLUDE_TRASH); + count += items.size() + cats.size(); } args["COUNT"] = count; LLNotificationsUtil::add("PurgeSelectedItems", args, LLSD(), boost::bind(&LLInventoryPanel::callbackPurgeSelectedItems, this, _1, _2)); -- cgit v1.2.3 From c9f9e93889ae7400f242db6cc3b01469532c1def Mon Sep 17 00:00:00 2001 From: username = daianakproductengine Date: Fri, 19 May 2017 20:28:59 +0300 Subject: MAINT-2060 Fixed Double Freeze when clicking on Help>About Second Life --- indra/newview/llappviewer.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f53ba01d37..4095f1c8ef 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3347,10 +3347,19 @@ LLSD LLAppViewer::getViewerInfo() const info["GRAPHICS_CARD"] = (const char*)(glGetString(GL_RENDERER)); #if LL_WINDOWS - LLSD driver_info = gDXHardware.getDisplayInfo(); - if (driver_info.has("DriverVersion")) + std::string drvinfo = gDXHardware.getDriverVersionWMI(); + if (!drvinfo.empty()) { - info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"]; + info["GRAPHICS_DRIVER_VERSION"] = drvinfo; + } + else + { + LL_WARNS("Driver version")<< "Cannot get driver version from getDriverVersionWMI" << LL_ENDL; + LLSD driver_info = gDXHardware.getDisplayInfo(); + if (driver_info.has("DriverVersion")) + { + info["GRAPHICS_DRIVER_VERSION"] = driver_info["DriverVersion"]; + } } #endif -- cgit v1.2.3 From c102bcf0adc45f855f103831542b019ad60702e7 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 22 May 2017 11:44:41 +0300 Subject: build fix --- indra/newview/llinventorypanel.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index ba2dce1f98..f9c91312ee 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1218,7 +1218,6 @@ void LLInventoryPanel::purgeSelectedItems() if (inventory_selected.empty()) return; LLSD args; S32 count = inventory_selected.size(); - static const U32 trash_max_capacity = gSavedSettings.getU32("InventoryTrashMaxCapacity"); for (std::set::const_iterator it = inventory_selected.begin(), end_it = inventory_selected.end(); it != end_it; ++it) -- cgit v1.2.3 From c33fb844ab87c85d8989ea909423b559d417b250 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Tue, 23 May 2017 06:36:16 +0300 Subject: MAINT-7396 [JigglyPuff] Agent that is not estate owner or estate manager shouldn't be able to toggle estate access settings. --- indra/newview/llfloaterregioninfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index c33dee5fb4..1af2c10a33 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2296,7 +2296,7 @@ BOOL LLPanelEstateInfo::postBuild() void LLPanelEstateInfo::refresh() { // Disable access restriction controls if they make no sense. - bool public_access = getChild("externally_visible_radio")->getSelectedIndex(); + bool public_access = ("estate_public_access" == getChild("externally_visible_radio")->getValue().asString()); getChildView("Only Allow")->setEnabled(public_access); getChildView("limit_payment")->setEnabled(public_access); @@ -2317,7 +2317,7 @@ void LLPanelEstateInfo::refreshFromEstate() getChild("estate_name")->setValue(estate_info.getName()); setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString()); - getChild("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0); + getChild("externally_visible_radio")->setValue(estate_info.getIsExternallyVisible() ? "estate_public_access" : "estate_restricted_access"); getChild("voice_chat_check")->setValue(estate_info.getAllowVoiceChat()); getChild("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport()); getChild("limit_payment")->setValue(estate_info.getDenyAnonymous()); @@ -2360,7 +2360,7 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con // update model estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore - estate_info.setIsExternallyVisible(getChild("externally_visible_radio")->getSelectedIndex()); + estate_info.setIsExternallyVisible("estate_public_access" == getChild("externally_visible_radio")->getValue().asString()); estate_info.setAllowDirectTeleport(getChild("allow_direct_teleport")->getValue().asBoolean()); estate_info.setDenyAnonymous(getChild("limit_payment")->getValue().asBoolean()); estate_info.setDenyAgeUnverified(getChild("limit_age_verified")->getValue().asBoolean()); -- cgit v1.2.3 From b4e54352171f6b95714270909cda99dc1c5ad3f0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 24 May 2017 11:06:21 +0300 Subject: MAINT-7434 FIXED SLURL instead of username appears in "have said something new" text for some messages --- indra/newview/llnotificationhandler.h | 2 ++ indra/newview/llnotificationhandlerutil.cpp | 14 ++++++++++++++ indra/newview/llnotificationtiphandler.cpp | 2 +- indra/newview/llviewermessage.cpp | 1 + 4 files changed, 18 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index 7a183cb298..52c5234137 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -322,6 +322,8 @@ public: */ static std::string getSubstitutionName(const LLNotificationPtr& notification); + static std::string getSubstitutionOriginalName(const LLNotificationPtr& notification); + /** * Adds notification panel to the IM floater. */ diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 4a3923ef6e..6a58196760 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -241,6 +241,20 @@ std::string LLHandlerUtil::getSubstitutionName(const LLNotificationPtr& notifica return res; } +// static +std::string LLHandlerUtil::getSubstitutionOriginalName(const LLNotificationPtr& notification) +{ + if(notification->getSubstitutions().has("ORIGINAL_NAME")) + { + std::string name = notification->getSubstitutions()["ORIGINAL_NAME"]; + if(!name.empty()) + { + return name; + } + } + return LLHandlerUtil::getSubstitutionName(notification); +} + // static void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) { diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 596327e8f1..a6ef130cd0 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -86,7 +86,7 @@ bool LLTipHandler::processNotification(const LLNotificationPtr& notification) } std::string session_name = notification->getPayload()["SESSION_NAME"]; - const std::string name = notification->getSubstitutions()["NAME"]; + const std::string name = LLHandlerUtil::getSubstitutionOriginalName(notification); if (session_name.empty()) { session_name = name; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 2dc219a769..06f868dc08 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2841,6 +2841,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_INVENTORY_ACCEPTED: { args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();; + args["ORIGINAL_NAME"] = original_name; LLSD payload; payload["from_id"] = from_id; // Passing the "SESSION_NAME" to use it for IM notification logging -- cgit v1.2.3 From 5db0af5327e1aa21f607c51cf9e69e3733395350 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 May 2017 20:24:45 +0300 Subject: MAINT-7419 Workaround for some purge and trash issues, stuck descendants count --- indra/newview/llaisapi.cpp | 45 ++++++++++++++++++++++++++++++- indra/newview/llinventorybridge.cpp | 8 +++++- indra/newview/llpanelmaininventory.cpp | 4 +-- indra/newview/llplacesinventorybridge.cpp | 2 +- indra/newview/llviewerinventory.cpp | 8 ++++++ 5 files changed, 62 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 648212177b..ee49125711 100644 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -394,6 +394,40 @@ void AISAPI::InvokeAISCommandCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t ht { status = LLCore::HttpStatus(HTTP_INTERNAL_ERROR, "Malformed response contents"); } + else if (status.getType() == 410) //GONE + { + // Item does not exist or was already deleted from server. + // parent folder is out of sync + if (type == REMOVECATEGORY) + { + LLViewerInventoryCategory *cat = gInventory.getCategory(targetId); + if (cat) + { + LL_WARNS("Inventory") << "Purge failed for '" << cat->getName() + << "' local version:" << cat->getVersion() + << " since folder no longer exists at server. Descendent count: server == " << cat->getDescendentCount() + << ", viewer == " << cat->getViewerDescendentCount() + << LL_ENDL; + gInventory.fetchDescendentsOf(cat->getParentUUID()); + // Note: don't delete folder here - contained items will be deparented (or deleted) + // and since we are clearly out of sync we can't be sure we won't get rid of something we need. + // For example folder could have been moved or renamed with items intact, let it fetch first. + } + } + else if (type == REMOVEITEM) + { + LLViewerInventoryItem *item = gInventory.getItem(targetId); + if (item) + { + LL_WARNS("Inventory") << "Purge failed for '" << item->getName() + << "' since item no longer exists at server." << LL_ENDL; + gInventory.fetchDescendentsOf(item->getParentUUID()); + // since item not on the server and exists at viewer, so it needs an update at the least, + // so delete it, in worst case item will be refetched with new params. + gInventory.onObjectDeletedFromServer(targetId); + } + } + } LL_WARNS("Inventory") << "Inventory error: " << status.toString() << LL_ENDL; LL_WARNS("Inventory") << ll_pretty_print_sd(result) << LL_ENDL; } @@ -970,7 +1004,16 @@ void AISUpdate::doUpdate() // inventory COF is maintained on the viewer through calls to // LLInventoryModel::accountForUpdate when a changing operation // is performed. This occasionally gets out of sync however. - cat->setVersion(version); + if (version != LLViewerInventoryCategory::VERSION_UNKNOWN) + { + cat->setVersion(version); + } + else + { + // We do not account for update if version is UNKNOWN, so we shouldn't rise version + // either or viewer will get stuck on descendants count -1, try to refetch folder instead + cat->fetch(); + } } } diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 1b32fc9dfe..c8a20c9d97 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3884,8 +3884,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::item_array_t* item_array; gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array); + LLViewerInventoryCategory *trash = getCategory(); // Enable Empty menu item only when there is something to act upon. - if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel) + // Also don't enable menu if folder isn't fully fetched + if ((0 == cat_array->size() && 0 == item_array->size()) + || is_recent_panel + || !trash + || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN + || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN) { disabled_items.push_back(std::string("Empty Trash")); } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 3db9500de0..dd75ae9c06 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1287,13 +1287,13 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id); - return children != LLInventoryModel::CHILDREN_NO; + return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id); } if (command_name == "empty_lostnfound") { const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id); - return children != LLInventoryModel::CHILDREN_NO; + return children != LLInventoryModel::CHILDREN_NO && gInventory.isCategoryComplete(trash_id); } return TRUE; diff --git a/indra/newview/llplacesinventorybridge.cpp b/indra/newview/llplacesinventorybridge.cpp index 55cb7d616b..471e1c24f3 100644 --- a/indra/newview/llplacesinventorybridge.cpp +++ b/indra/newview/llplacesinventorybridge.cpp @@ -62,7 +62,7 @@ void LLPlacesLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) if(isItemInTrash()) { items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) + if (!isItemRemovable() || (gInventory.getCategory(mUUID) && !gInventory.isCategoryComplete(mUUID))) { disabled_items.push_back(std::string("Purge Item")); } diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index bf79a0595c..da6b18bb77 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -1463,6 +1463,10 @@ void remove_inventory_category( LLPointer obj = gInventory.getCategory(cat_id); if(obj) { + if (!gInventory.isCategoryComplete(cat_id)) + { + LL_WARNS() << "Removing (purging) incomplete category " << obj->getName() << LL_ENDL; + } if(LLFolderType::lookupIsProtectedType(obj->getPreferredType())) { LLNotificationsUtil::add("CannotRemoveProtectedCategories"); @@ -1540,6 +1544,10 @@ void purge_descendents_of(const LLUUID& id, LLPointer cb) { if (AISAPI::isAvailable()) { + if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN) + { + LL_WARNS() << "Purging not fetched folder: " << cat->getName() << LL_ENDL; + } AISAPI::completion_t cr = (cb) ? boost::bind(&doInventoryCb, cb, _1) : AISAPI::completion_t(); AISAPI::PurgeDescendents(id, cr); } -- cgit v1.2.3 From 7021f95b5b09951d834cfb757b3b842313f27d49 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 24 May 2017 17:28:30 +0300 Subject: MAINT-7436 FIXED [viewer-neko] Crash occurs when trying to highlight non-existent(or removed item) using SLURI --- indra/newview/llinventorymodel.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 7ee41140f0..0ccaa1992d 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -221,7 +221,11 @@ BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id, const LLViewerInventoryCategory *LLInventoryModel::getFirstNondefaultParent(const LLUUID& obj_id) const { const LLInventoryObject* obj = getObject(obj_id); - + if(!obj) + { + LL_WARNS(LOG_INV) << "Non-existent object [ id: " << obj_id << " ] " << LL_ENDL; + return NULL; + } // Search up the parent chain until we get to root or an acceptable folder. // This assumes there are no cycles in the tree else we'll get a hang. LLUUID parent_id = obj->getParentUUID(); -- cgit v1.2.3 From 561cee12d8d3c456d71efae3b711dbf5115c66f5 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 25 May 2017 16:51:45 +0300 Subject: MAINT-2585 Make permission request notifications permanent until action taken --- indra/newview/llnotificationofferhandler.cpp | 1 + indra/newview/llnotificationscripthandler.cpp | 1 + indra/newview/skins/default/xui/en/notifications.xml | 3 +++ 3 files changed, 5 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 63ab88da42..14d25d8158 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -131,6 +131,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) // we not save offer notifications to the syswell floater that should be added to the IM floater p.can_be_stored = !add_notif_to_im; p.force_show = notification->getOfferFromAgent(); + p.can_fade = notification->canFadeToast(); LLScreenChannel* channel = dynamic_cast(mChannel.get()); if(channel) diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 7acb2f9e90..fef0631fa6 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -77,6 +77,7 @@ void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notifica p.notification = notification; p.panel = notify_box; p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + p.can_fade = notification->canFadeToast(); if(gAgent.isDoNotDisturb()) { p.force_show = notification->getName() == "SystemMessage" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8620c09f9a..91f3b7456f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7527,6 +7527,7 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th name="TeleportOffered" log_to_im="true" log_to_chat="false" + fade_toast="false" type="offer" sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: @@ -7602,6 +7603,7 @@ However, this region contains content accessible to adults only. icon="notify.tga" name="TeleportRequest" log_to_im="true" + fade_toast="false" type="offer"> [NAME_SLURL] is requesting to be teleported to your location. [MESSAGE] @@ -7958,6 +7960,7 @@ Other Key Experiences may be available. icon="notify.tga" name="ScriptQuestionExperience" persist="false" + fade_toast="false" type="notify"> '<nolink>[OBJECTNAME]</nolink>', an object owned by '[NAME]', requests your participation in the [GRID_WIDE] experience: -- cgit v1.2.3 From fe49c1e8a5b3ebbb8fddeb23d32d4de68558fa37 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 26 May 2017 15:11:37 +0300 Subject: MAINT-1139 Catch Windows crash on Saving snapshot --- indra/newview/llfilepicker.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp index a7236d1778..7e92643b93 100644 --- a/indra/newview/llfilepicker.cpp +++ b/indra/newview/llfilepicker.cpp @@ -544,11 +544,18 @@ BOOL LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename) send_agent_pause(); { // NOTA BENE: hitting the file dialog triggers a window focus event, destroying the selection manager!! - success = GetSaveFileName(&mOFN); - if (success) + try { - std::string filename = utf16str_to_utf8str(llutf16string(mFilesW)); - mFiles.push_back(filename); + success = GetSaveFileName(&mOFN); + if (success) + { + std::string filename = utf16str_to_utf8str(llutf16string(mFilesW)); + mFiles.push_back(filename); + } + } + catch (...) + { + LOG_UNHANDLED_EXCEPTION(""); } gKeyboard->resetKeys(); } -- cgit v1.2.3 From e62444c0e73e6d89ab6a11e1e03047c83fe756f9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Mon, 29 May 2017 11:30:07 +0300 Subject: MAINT-7443 FIXED Able to Block a user with Lastname Linden --- indra/newview/llmutelist.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp index 5b53a05274..bf1716e18c 100644 --- a/indra/newview/llmutelist.cpp +++ b/indra/newview/llmutelist.cpp @@ -48,6 +48,7 @@ #include #include +#include #include "lldispatcher.h" #include "llxfermanager.h" @@ -180,9 +181,10 @@ LLMuteList::~LLMuteList() BOOL LLMuteList::isLinden(const std::string& name) const { + std::string username = boost::replace_all_copy(name, ".", " "); typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); - tokenizer tokens(name, sep); + tokenizer tokens(username, sep); tokenizer::iterator token_iter = tokens.begin(); if (token_iter == tokens.end()) return FALSE; @@ -190,7 +192,8 @@ BOOL LLMuteList::isLinden(const std::string& name) const if (token_iter == tokens.end()) return FALSE; std::string last_name = *token_iter; - return last_name == "Linden"; + LLStringUtil::toLower(last_name); + return last_name == "linden"; } static LLVOAvatar* find_avatar(const LLUUID& id) -- cgit v1.2.3 From a6cda1ee06ee422d39b8bc9ba9369e14ec3f1251 Mon Sep 17 00:00:00 2001 From: Cinder Date: Thu, 15 Dec 2016 09:34:04 -0600 Subject: STORM-2144 - Guard against null pointers when LLPanelOutfitEdit gets called before postBuild() on login. --- indra/newview/llpaneloutfitedit.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 3f6bdde127..5973b08183 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -1285,7 +1285,7 @@ void LLPanelOutfitEdit::showFilteredWearablesListView(LLWearableType::EType type showWearablesListView(); //e_list_view_item_type implicitly contains LLWearableType::EType starting from LVIT_SHAPE - applyListViewFilter((EListViewItemType) (LVIT_SHAPE + type)); + applyListViewFilter(static_cast(LVIT_SHAPE + type)); } static void update_status_widget_rect(LLView * widget, S32 right_border) @@ -1305,8 +1305,10 @@ void LLPanelOutfitEdit::onOutfitChanging(bool started) S32 delta = started ? indicator_delta : 0; S32 right_border = status_panel->getRect().getWidth() - delta; - update_status_widget_rect(mCurrentOutfitName, right_border); - update_status_widget_rect(mStatus, right_border); + if (mCurrentOutfitName) + update_status_widget_rect(mCurrentOutfitName, right_border); + if (mStatus) + update_status_widget_rect(mStatus, right_border); indicator->setVisible(started); } -- cgit v1.2.3 From f82785a9b275b78b47cdebaf2ccfc8aa9407c405 Mon Sep 17 00:00:00 2001 From: daianakproductengine Date: Wed, 24 May 2017 16:33:39 +0300 Subject: MAINT-4375 Viewer saves an empty snapshots if disk is full --- indra/newview/llpanelsnapshotlocal.cpp | 1 + indra/newview/llsnapshotlivepreview.cpp | 38 +++++++++++++++++++++- indra/newview/llsnapshotlivepreview.h | 1 + indra/newview/llviewermenufile.cpp | 2 +- indra/newview/llviewerwindow.cpp | 11 +++++++ indra/newview/llviewerwindow.h | 1 + .../newview/skins/default/xui/en/notifications.xml | 5 +++ 7 files changed, 57 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp index 51ec964ace..77378f8092 100644 --- a/indra/newview/llpanelsnapshotlocal.cpp +++ b/indra/newview/llpanelsnapshotlocal.cpp @@ -172,6 +172,7 @@ void LLPanelSnapshotLocal::onSaveFlyoutCommit(LLUICtrl* ctrl) } else { + cancel(); floater->notify(LLSD().with("set-finished", LLSD().with("ok", false).with("msg", "local"))); } } diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 58e48480c1..c6f8c414fa 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -45,6 +45,7 @@ #include "llimagepng.h" #include "lllandmarkactions.h" #include "lllocalcliprect.h" +#include "llresmgr.h" #include "llnotificationsutil.h" #include "llslurl.h" #include "llsnapshotlivepreview.h" @@ -56,6 +57,7 @@ #include "llvfs.h" #include "llwindow.h" #include "llworld.h" +#include const F32 AUTO_SNAPSHOT_TIME_DELAY = 1.f; @@ -1069,7 +1071,7 @@ BOOL LLSnapshotLivePreview::saveLocal() getFormattedImage(); // Save the formatted image - BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage); + BOOL success = saveLocal(mFormattedImage); if(success) { @@ -1078,3 +1080,37 @@ BOOL LLSnapshotLivePreview::saveLocal() return success; } +//Check if failed due to insuficient memory +BOOL LLSnapshotLivePreview::saveLocal(LLPointer mFormattedImage) +{ + BOOL success = gViewerWindow->saveImageNumbered(mFormattedImage); + + if (!success) + { + std::string lastSnapshotDir = LLViewerWindow::getLastSnapshotDir(); + +#ifdef LL_WINDOWS + boost::filesystem::path b_path(utf8str_to_utf16str(lastSnapshotDir)); +#else + boost::filesystem::path b_path(lastSnapshotDir); +#endif + boost::filesystem::space_info b_space = boost::filesystem::space(b_path); + if (b_space.free < mFormattedImage->getDataSize()) + { + LLSD args; + args["PATH"] = lastSnapshotDir; + + std::string needM_bytes_string; + LLResMgr::getInstance()->getIntegerString(needM_bytes_string, (mFormattedImage->getDataSize()) >> 10); + args["NEED_MEMORY"] = needM_bytes_string; + + std::string freeM_bytes_string; + LLResMgr::getInstance()->getIntegerString(freeM_bytes_string, (b_space.free) >> 10); + args["FREE_MEMORY"] = freeM_bytes_string; + + LLNotificationsUtil::add("SnapshotToComputerFailed", args); + return false; + } + } + return success; +} diff --git a/indra/newview/llsnapshotlivepreview.h b/indra/newview/llsnapshotlivepreview.h index b689c50320..4ea8d25a5a 100644 --- a/indra/newview/llsnapshotlivepreview.h +++ b/indra/newview/llsnapshotlivepreview.h @@ -41,6 +41,7 @@ class LLSnapshotLivePreview : public LLView LOG_CLASS(LLSnapshotLivePreview); public: + static BOOL saveLocal(LLPointer); struct Params : public LLInitParam::Block { Params() diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index d46bb0199b..8d0c5af314 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -583,7 +583,7 @@ class LLFileTakeSnapshotToDisk : public view_listener_t formatted->enableOverSize() ; formatted->encode(raw, 0); formatted->disableOverSize() ; - gViewerWindow->saveImageNumbered(formatted); + LLSnapshotLivePreview::saveLocal(formatted); } return true; } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2d3b48bab3..45ea0f8e02 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -4398,6 +4399,16 @@ BOOL LLViewerWindow::saveImageNumbered(LLImageFormatted *image, bool force_picke LLViewerWindow::sSnapshotDir = gDirUtilp->getDirName(filepath); } +// Check if there is enough free space to save snapshot +#ifdef LL_WINDOWS + boost::filesystem::space_info b_space = boost::filesystem::space(utf8str_to_utf16str(sSnapshotDir)); +#else + boost::filesystem::space_info b_space = boost::filesystem::space(sSnapshotDir); +#endif + if (b_space.free < image->getDataSize()) + { + return FALSE; + } // Look for an unused file name std::string filepath; S32 i = 1; diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index a134dfaaa9..5d7076178a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -419,6 +419,7 @@ public: bool getSystemUIScaleFactorChanged() { return mSystemUIScaleFactorChanged; } static void showSystemUIScaleFactorChanged(); + static std::string getLastSnapshotDir() { return sSnapshotDir; } private: bool shouldShowToolTipFor(LLMouseHandler *mh); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 91f3b7456f..b413720bc9 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8533,6 +8533,11 @@ Appearance has been saved to XML to [PATH] Failed to save appearance to XML. + +Failed to save snapshot to [PATH]: Not enough memory. [NEED_MEMORY]KB is required but only [FREE_MEMORY]KB is free. + + Date: Mon, 29 May 2017 17:53:20 +0300 Subject: MAINT-7438 FIXED Always allow 'create landmark' allows group teleport routing override, however was removed. --- indra/newview/skins/default/xui/en/role_actions.xml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml index 4d20ecb9b6..8d058b0b53 100644 --- a/indra/newview/skins/default/xui/en/role_actions.xml +++ b/indra/newview/skins/default/xui/en/role_actions.xml @@ -105,6 +105,9 @@ + -- cgit v1.2.3 From d65db1f16c75a8d5f54c9e6f52c3755d29b39b3e Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 31 May 2017 11:27:36 +0300 Subject: MAINT-7455 Update Viewer Login error message --- indra/newview/skins/default/xui/en/strings.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c9be141427..439560031e 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -150,8 +150,7 @@ support@secondlife.com. Your account is not accessible until [TIME] Pacific Time. We are unable to complete your request at this time. -Please contact Second Life support for assistance at http://secondlife.com/support. -If you are unable to change your password, please call (866) 476-9763. +Please contact Second Life support for assistance at http://support.secondlife.com. Data inconsistency found during login. Please contact support@secondlife.com. Your account is undergoing minor maintenance. -- cgit v1.2.3 From 735ae02583558544a4a3b65f72cdf52fe7d27677 Mon Sep 17 00:00:00 2001 From: pavelkproductengine Date: Tue, 30 May 2017 20:35:05 +0300 Subject: MAINT-7356 Feature - Force item delete warning to prompt once per session --- indra/newview/llinventoryfunctions.cpp | 29 +++++++++++++++++++++++++++++ indra/newview/llinventoryfunctions.h | 2 ++ 2 files changed, 31 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index bccc654fbf..2bb6fb853c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -92,6 +92,8 @@ BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; std::list LLInventoryAction::sMarketplaceFolders; +const int LLInventoryAction::sConfirmOnDeleteItemsNumber = 5; + // Helper function : callback to update a folder after inventory action happened in the background void update_folder_cb(const LLUUID& dest_folder) { @@ -2297,6 +2299,33 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { LLSD args; args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + static bool sDisplayedAtSession = false; + std::set::iterator set_iter = selected_items.begin(); + LLFolderViewModelItemInventory * viewModel = NULL; + bool has_folder_items = false; + for (; set_iter != selected_items.end(); ++set_iter) + { + viewModel = dynamic_cast((*set_iter)->getViewModelItem()); + if (viewModel && viewModel->hasChildren()) + { + has_folder_items = true; + break; + } + } + if (root->getSelectedCount() >= sConfirmOnDeleteItemsNumber || has_folder_items) + { + bool ignore = !(LLUI::sSettingGroups["ignores"]->getBOOL("DeleteItems")); + if (ignore) + { + + if (!sDisplayedAtSession) + { + LLUI::sSettingGroups["ignores"]->setBOOL("DeleteItems", TRUE); + sDisplayedAtSession = true; + } + + } + } LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); // Note: marketplace listings will be updated in the callback if delete confirmed return; diff --git a/indra/newview/llinventoryfunctions.h b/indra/newview/llinventoryfunctions.h index 649db4032d..d454d7e00b 100644 --- a/indra/newview/llinventoryfunctions.h +++ b/indra/newview/llinventoryfunctions.h @@ -460,6 +460,8 @@ struct LLInventoryAction static void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, LLHandle root); static void removeItemFromDND(LLFolderView* root); + static const int sConfirmOnDeleteItemsNumber; + private: static void buildMarketplaceFolders(LLFolderView* root); static void updateMarketplaceFolders(); -- cgit v1.2.3 From 54d3e2634d66f3d32eef91ee81688276aeebd8ad Mon Sep 17 00:00:00 2001 From: daianakproductengine Date: Wed, 24 May 2017 16:33:39 +0300 Subject: MAINT-4375 Viewer saves an empty snapshots if disk is full --- 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 b413720bc9..16bf0e344d 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -8535,7 +8535,7 @@ Failed to save appearance to XML. -Failed to save snapshot to [PATH]: Not enough memory. [NEED_MEMORY]KB is required but only [FREE_MEMORY]KB is free. +Failed to save snapshot to [PATH]: Disk is full. [NEED_MEMORY]KB is required but only [FREE_MEMORY]KB is free. Date: Wed, 31 May 2017 19:55:38 +0300 Subject: MAINT-321 If Spin option is turned on, user cannot lift an object using Ctrl button + Mouse --- indra/newview/llfloatertools.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index b14b9b7578..5b7cfb242e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -638,20 +638,22 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) // HACK - highlight buttons for next click mRadioGroupMove->setVisible(move_visible); - if (!gGrabBtnSpin && - !gGrabBtnVertical && - !(mask == MASK_VERTICAL) && - !(mask == MASK_SPIN) ) + if (!(gGrabBtnSpin || + gGrabBtnVertical || + (mask == MASK_VERTICAL) || + (mask == MASK_SPIN))) { mRadioGroupMove->setValue("radio move"); } - else if (gGrabBtnVertical || - (mask == MASK_VERTICAL) ) + else if ((mask == MASK_VERTICAL) || + gGrabBtnVertical && + (mask != MASK_SPIN)) { mRadioGroupMove->setValue("radio lift"); } - else if (gGrabBtnSpin || - (mask == MASK_SPIN) ) + else if ((mask == MASK_SPIN) || + gGrabBtnSpin && + (mask != MASK_VERTICAL)) { mRadioGroupMove->setValue("radio spin"); } -- cgit v1.2.3 From 19c3f47e00e348739eaf31685c8ea804704a08e5 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 31 May 2017 21:24:04 +0300 Subject: MAINT-7325 Fixed issue of images being marked as missing due to uninitialized discard level --- indra/newview/llviewertexture.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 6abd6f7b64..c162af371f 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1462,9 +1462,17 @@ BOOL LLViewerFetchedTexture::createTexture(S32 usename/*= 0*/) } bool size_okay = true; - - U32 raw_width = mRawImage->getWidth() << mRawDiscardLevel; - U32 raw_height = mRawImage->getHeight() << mRawDiscardLevel; + + S32 discard_level = mRawDiscardLevel; + if (mRawDiscardLevel < 0) + { + LL_DEBUGS() << "Negative raw discard level when creating image: " << mRawDiscardLevel << LL_ENDL; + discard_level = 0; + } + + U32 raw_width = mRawImage->getWidth() << discard_level; + U32 raw_height = mRawImage->getHeight() << discard_level; + if( raw_width > MAX_IMAGE_SIZE || raw_height > MAX_IMAGE_SIZE ) { LL_INFOS() << "Width or height is greater than " << MAX_IMAGE_SIZE << ": (" << raw_width << "," << raw_height << ")" << LL_ENDL; -- cgit v1.2.3 From 13cddfdfdd8c42367af8a197e1f2deefc986495b Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Thu, 1 Jun 2017 15:30:49 +0300 Subject: Mac buildfix --- indra/newview/llfloatertools.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 5b7cfb242e..2869256d09 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -646,14 +646,12 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mRadioGroupMove->setValue("radio move"); } else if ((mask == MASK_VERTICAL) || - gGrabBtnVertical && - (mask != MASK_SPIN)) + (gGrabBtnVertical && (mask != MASK_SPIN))) { mRadioGroupMove->setValue("radio lift"); } else if ((mask == MASK_SPIN) || - gGrabBtnSpin && - (mask != MASK_VERTICAL)) + (gGrabBtnSpin && (mask != MASK_VERTICAL))) { mRadioGroupMove->setValue("radio spin"); } -- cgit v1.2.3 From a8fffc7d172d3a786904e6d8e7e7c2943e6d54fc Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 30 May 2017 16:28:07 +0300 Subject: MAINT-731 Fixed Images Do Not Show at Proper Proportions --- indra/newview/llpreviewtexture.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 645a77e42a..54eeebda28 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -52,6 +52,8 @@ #include "llviewerwindow.h" #include "lllineeditor.h" +#include + const S32 CLIENT_RECT_VPAD = 4; const F32 SECONDS_TO_SHOW_FILE_SAVED_MSG = 8.f; @@ -579,7 +581,11 @@ void LLPreviewTexture::adjustAspectRatio() std::vector::const_iterator found = std::find(mRatiosList.begin(), mRatiosList.end(), ratio.str()); if (found == mRatiosList.end()) { - combo->setCurrentByIndex(0); + // No existing ratio found, create an element that will show image at original ratio + std::string ratio = boost::lexical_cast(num)+":" + boost::lexical_cast(denom); + mRatiosList.push_back(ratio); + combo->add(ratio); + combo->setCurrentByIndex(mRatiosList.size()- 1); } else { @@ -587,6 +593,15 @@ void LLPreviewTexture::adjustAspectRatio() } } } + else + { + // Aspect ratio was set to unconstrained or was clamped + LLComboBox* combo = getChild("combo_aspect_ratio"); + if (combo) + { + combo->setCurrentByIndex(0); //unconstrained + } + } mUpdateDimensions = TRUE; } -- cgit v1.2.3 From 045eebbccd7bb49021ddd17bdfb6967e2812d749 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Fri, 2 Jun 2017 19:38:04 +0300 Subject: MAINT-7459 Fixed incorrect 'Parcel owners can be more restrictive' checkbox focus behavior --- indra/newview/llfloaterregioninfo.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 1af2c10a33..c330c2ae47 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2290,6 +2290,8 @@ BOOL LLPanelEstateInfo::postBuild() getChild("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); + getChild("externally_visible_radio")->setFocus(TRUE); + return LLPanelRegionInfo::postBuild(); } -- cgit v1.2.3 From 81f4da646800e2a1b7218397290183144f6aed92 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Jun 2017 12:47:51 +0300 Subject: MAINT-7447 FIXED Selecting a group ability refreshes the list and deselects your choice --- indra/newview/llpanelgrouproles.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 8440e9ee50..473451bdb6 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -2775,6 +2775,16 @@ void LLPanelGroupActionsSubTab::activate() LLPanelGroupSubTab::activate(); update(GC_ALL); + mActionDescription->clear(); + mActionList->deselectAllItems(); + mActionList->deleteAllItems(); + buildActionsList(mActionList, + GP_ALL_POWERS, + GP_ALL_POWERS, + NULL, + FALSE, + TRUE, + FALSE); } void LLPanelGroupActionsSubTab::deactivate() @@ -2803,19 +2813,17 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc) if (mGroupID.isNull()) return; - mActionList->deselectAllItems(); mActionMembers->deleteAllItems(); mActionRoles->deleteAllItems(); - mActionDescription->clear(); - mActionList->deleteAllItems(); - buildActionsList(mActionList, - GP_ALL_POWERS, - GP_ALL_POWERS, - NULL, - FALSE, - TRUE, - FALSE); + if(mActionList->hasSelectedItem()) + { + LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID); + if (gdatap && gdatap->isMemberDataComplete() && gdatap->isRoleDataComplete()) + { + handleActionSelect(); + } + } } void LLPanelGroupActionsSubTab::handleActionSelect() -- cgit v1.2.3 From d700552b449f3c2bcaee46f61fe3290f57e58fe9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 6 Jun 2017 12:51:16 +0300 Subject: MAINT-7458 FIXED Release notes opens every time after any problem with logining, until viewer will be relaunched. --- indra/newview/llstartup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 33b6352bf5..1a480b1838 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -2268,13 +2268,15 @@ void login_callback(S32 option, void *userdata) */ void show_release_notes_if_required() { - if (LLVersionInfo::getChannelAndVersion() != gLastRunVersion + static bool release_notes_shown = false; + if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion) && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds && gSavedSettings.getBOOL("UpdaterShowReleaseNotes") && !gSavedSettings.getBOOL("FirstLoginThisInstall")) { LLSD info(LLAppViewer::instance()->getViewerInfo()); LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]); + release_notes_shown = true; } } -- cgit v1.2.3 From d3a1c4cda49cc1b113abbdb175c557456581efac Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 6 Jun 2017 16:06:28 +0300 Subject: MAINT-7462 check pointer to avoid allocation crash in llpluginclassmedia --- indra/newview/llviewermedia.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 9f05ee61bd..01b0dd0077 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -3052,20 +3052,23 @@ void LLViewerMediaImpl::update() data = mMediaSource->getBitsData(); } - // Offset the pixels pointer to match x_pos and y_pos - data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() ); - data += ( y_pos * mMediaSource->getTextureDepth() ); - + if(data != NULL) { - LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE); - placeholder_image->setSubImage( - data, - mMediaSource->getBitsWidth(), - mMediaSource->getBitsHeight(), - x_pos, - y_pos, - width, - height); + // Offset the pixels pointer to match x_pos and y_pos + data += ( x_pos * mMediaSource->getTextureDepth() * mMediaSource->getBitsWidth() ); + data += ( y_pos * mMediaSource->getTextureDepth() ); + + { + LL_RECORD_BLOCK_TIME(FTM_MEDIA_SET_SUBIMAGE); + placeholder_image->setSubImage( + data, + mMediaSource->getBitsWidth(), + mMediaSource->getBitsHeight(), + x_pos, + y_pos, + width, + height); + } } } -- cgit v1.2.3 From 95d0da56fda169a7cce34e07f8ae76f86dce42c0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 7 Jun 2017 18:56:24 +0300 Subject: MAINT-7447 restore filter functionality in Abilities tab --- indra/newview/llpanelgroup.h | 2 ++ indra/newview/llpanelgrouproles.cpp | 15 +++++++++++++++ indra/newview/llpanelgrouproles.h | 1 + 3 files changed, 18 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h index 0e6f5b8924..05be4b5aee 100644 --- a/indra/newview/llpanelgroup.h +++ b/indra/newview/llpanelgroup.h @@ -164,6 +164,8 @@ public: virtual void setupCtrls (LLPanel* parent) {}; + virtual void onFilterChanged() { } + protected: LLUUID mGroupID; BOOL mAllowEdit; diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 473451bdb6..78270c20bb 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -494,6 +494,7 @@ void LLPanelGroupSubTab::setSearchFilter(const std::string& filter) mSearchFilter = filter; LLStringUtil::toLower(mSearchFilter); update(GC_ALL); + onFilterChanged(); } void LLPanelGroupSubTab::activate() @@ -2826,6 +2827,20 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc) } } +void LLPanelGroupActionsSubTab::onFilterChanged() +{ + mActionDescription->clear(); + mActionList->deselectAllItems(); + mActionList->deleteAllItems(); + buildActionsList(mActionList, + GP_ALL_POWERS, + GP_ALL_POWERS, + NULL, + FALSE, + TRUE, + FALSE); +} + void LLPanelGroupActionsSubTab::handleActionSelect() { mActionMembers->deleteAllItems(); diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index 9a696124a8..1d1d69e0ae 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -311,6 +311,7 @@ public: virtual bool needsApply(std::string& mesg); virtual bool apply(std::string& mesg); virtual void update(LLGroupChange gc); + virtual void onFilterChanged(); void handleActionSelect(); -- cgit v1.2.3 From 47ae78f8cfc9ca71bf9837b06618d34737b07fc4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 7 Jun 2017 16:21:40 +0300 Subject: MAINT-7461 Fixed images not showing at correct proportions when opened for the first time --- indra/newview/llpreviewtexture.cpp | 64 ++++++++++++++++++++++++-------------- indra/newview/llpreviewtexture.h | 1 + 2 files changed, 42 insertions(+), 23 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 54eeebda28..12bcd89cb0 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -100,6 +100,29 @@ LLPreviewTexture::~LLPreviewTexture() } } +void LLPreviewTexture::populateRatioList() +{ + // Fill in ratios list with common aspect ratio values + mRatiosList.clear(); + mRatiosList.push_back(LLTrans::getString("Unconstrained")); + mRatiosList.push_back("1:1"); + mRatiosList.push_back("4:3"); + mRatiosList.push_back("10:7"); + mRatiosList.push_back("3:2"); + mRatiosList.push_back("16:10"); + mRatiosList.push_back("16:9"); + mRatiosList.push_back("2:1"); + + // Now fill combo box with provided list + LLComboBox* combo = getChild("combo_aspect_ratio"); + combo->removeall(); + + for (std::vector::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it) + { + combo->add(*it); + } +} + // virtual BOOL LLPreviewTexture::postBuild() { @@ -140,27 +163,12 @@ BOOL LLPreviewTexture::postBuild() } } - // Fill in ratios list with common aspect ratio values - mRatiosList.clear(); - mRatiosList.push_back(LLTrans::getString("Unconstrained")); - mRatiosList.push_back("1:1"); - mRatiosList.push_back("4:3"); - mRatiosList.push_back("10:7"); - mRatiosList.push_back("3:2"); - mRatiosList.push_back("16:10"); - mRatiosList.push_back("16:9"); - mRatiosList.push_back("2:1"); - - // Now fill combo box with provided list - LLComboBox* combo = getChild("combo_aspect_ratio"); - combo->removeall(); - - for (std::vector::const_iterator it = mRatiosList.begin(); it != mRatiosList.end(); ++it) - { - combo->add(*it); - } + // Fill in ratios list and combo box with common aspect ratio values + populateRatioList(); childSetCommitCallback("combo_aspect_ratio", onAspectRatioCommit, this); + + LLComboBox* combo = getChild("combo_aspect_ratio"); combo->setCurrentByIndex(0); return LLPreview::postBuild(); @@ -446,16 +454,25 @@ void LLPreviewTexture::updateDimensions() return; } - if (mAssetStatus != PREVIEW_ASSET_LOADED) + S32 img_width = mImage->getFullWidth(); + S32 img_height = mImage->getFullHeight(); + + if (mAssetStatus != PREVIEW_ASSET_LOADED + || mLastWidth != img_width + || mLastHeight != img_height) { mAssetStatus = PREVIEW_ASSET_LOADED; // Asset has been fully loaded, adjust aspect ratio adjustAspectRatio(); } - + + // Update the width/height display every time - getChild("dimensions")->setTextArg("[WIDTH]", llformat("%d", mImage->getFullWidth())); - getChild("dimensions")->setTextArg("[HEIGHT]", llformat("%d", mImage->getFullHeight())); + getChild("dimensions")->setTextArg("[WIDTH]", llformat("%d", img_width)); + getChild("dimensions")->setTextArg("[HEIGHT]", llformat("%d", img_height)); + + mLastHeight = img_height; + mLastWidth = img_width; // Reshape the floater only when required if (mUpdateDimensions) @@ -582,6 +599,7 @@ void LLPreviewTexture::adjustAspectRatio() if (found == mRatiosList.end()) { // No existing ratio found, create an element that will show image at original ratio + populateRatioList(); // makes sure previous custom ratio is cleared std::string ratio = boost::lexical_cast(num)+":" + boost::lexical_cast(denom); mRatiosList.push_back(ratio); combo->add(ratio); diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index b104a91c75..c156c48d0c 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -67,6 +67,7 @@ public: /*virtual*/ void setObjectID(const LLUUID& object_id); protected: void init(); + void populateRatioList(); /* virtual */ BOOL postBuild(); bool setAspectRatio(const F32 width, const F32 height); static void onAspectRatioCommit(LLUICtrl*,void* userdata); -- cgit v1.2.3 From d7edeb2df8b225c39727bf506b4e5126852e2d5d Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Fri, 2 Jun 2017 16:44:00 +0200 Subject: STORM-2149: Add a warning notification when deleting a folder of filtered content --- indra/newview/llinventoryfunctions.cpp | 33 ++++++++++++++++------ .../newview/skins/default/xui/en/notifications.xml | 16 +++++++++++ 2 files changed, 40 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 2bb6fb853c..90d6e9b8a8 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2297,15 +2297,12 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root if ("delete" == action) { - LLSD args; - args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); static bool sDisplayedAtSession = false; - std::set::iterator set_iter = selected_items.begin(); - LLFolderViewModelItemInventory * viewModel = NULL; + bool has_folder_items = false; - for (; set_iter != selected_items.end(); ++set_iter) + for (std::set::iterator set_iter = selected_items.begin(); set_iter != selected_items.end(); ++set_iter) { - viewModel = dynamic_cast((*set_iter)->getViewModelItem()); + LLFolderViewModelItemInventory * viewModel = dynamic_cast((*set_iter)->getViewModelItem()); if (viewModel && viewModel->hasChildren()) { has_folder_items = true; @@ -2317,16 +2314,34 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root bool ignore = !(LLUI::sSettingGroups["ignores"]->getBOOL("DeleteItems")); if (ignore) { - if (!sDisplayedAtSession) { LLUI::sSettingGroups["ignores"]->setBOOL("DeleteItems", TRUE); sDisplayedAtSession = true; } - } } - LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + + LLAllDescendentsPassedFilter f; + for (std::set::iterator it = selected_items.begin(); (it != selected_items.end()) && (f.allDescendentsPassedFilter()); ++it) + { + if (LLFolderViewFolder* folder = dynamic_cast(*it)) + { + folder->applyFunctorRecursively(f); + } + } + + // Fall through to the generic confirmation if the user choose to ignore the specialized one + if ( (!f.allDescendentsPassedFilter()) && (!LLNotifications::instance().getIgnored("DeleteFilteredItems")) ) + { + LLNotificationsUtil::add("DeleteFilteredItems", LLSD(), LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + } + else + { + LLSD args; + args["QUESTION"] = LLTrans::getString(root->getSelectedCount() > 1 ? "DeleteItems" : "DeleteItem"); + LLNotificationsUtil::add("DeleteItems", args, LLSD(), boost::bind(&LLInventoryAction::onItemsRemovalConfirmation, _1, _2, root->getHandle())); + } // Note: marketplace listings will be updated in the callback if delete confirmed return; } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 16bf0e344d..97f614cf62 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -6010,6 +6010,22 @@ You cannot undo this action. notext="Cancel" yestext="OK"/> + + + + Your inventory is currently filtered and not all of the items you're about to delete are currently visible. + +Are you sure you want to delete them? + confirm + + Date: Wed, 7 Jun 2017 12:51:41 -0700 Subject: FIX MAINT-7456 Viewer Windows installer translation update for 9 languages --- indra/newview/installers/windows/lang_de.nsi | Bin 8420 -> 9850 bytes indra/newview/installers/windows/lang_es.nsi | Bin 8458 -> 9884 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 8748 -> 10258 bytes indra/newview/installers/windows/lang_it.nsi | Bin 8102 -> 9520 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 6514 -> 7204 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 8522 -> 9864 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 7898 -> 9190 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 8006 -> 9286 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6576 -> 6846 bytes 9 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 866accae99..2a868acc89 100644 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index f4f0786332..2310346e6e 100644 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index 1b5dbfc975..bec5835bed 100644 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index a456e6e417..1d2e150525 100644 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 5b1c5f4ce9..1bd6526670 100644 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 9ef252d232..87032fec18 100644 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index d7c728d3e2..2ac03d7bba 100644 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 97c602f4fc..1c4e2c2f48 100644 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 39c005a683..355e01a333 100644 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 66bcb3bb8b2837a2a7638817a887ca772a4ba735 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 8 Jun 2017 17:17:59 +0300 Subject: MAINT-7460 FIXED Crash in LLPopupView::removePopup() --- indra/newview/llexpandabletextbox.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 711a87dc99..d657f04457 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -407,6 +407,7 @@ void LLExpandableTextBox::collapseTextBox() setRect(mCollapsedRect); updateTextBoxRect(); + gViewerWindow->removePopup(this); } void LLExpandableTextBox::onFocusLost() @@ -434,8 +435,6 @@ void LLExpandableTextBox::reshape(S32 width, S32 height, BOOL called_from_parent mExpanded = false; LLUICtrl::reshape(width, height, called_from_parent); updateTextBoxRect(); - - gViewerWindow->removePopup(this); } void LLExpandableTextBox::setValue(const LLSD& value) -- cgit v1.2.3 From c47bf2656fe83b3ed9ab1008d5ea537c74d620fd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 8 Jun 2017 19:44:26 +0300 Subject: MAINT-5 Fixed url named group names should not display as url links --- .../newview/skins/default/xui/en/notifications.xml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (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 97f614cf62..afdb696cb4 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -869,7 +869,7 @@ Do you wish to proceed? icon="alertmodal.tga" name="JoinGroupNoCost" type="alertmodal"> -You are joining group [NAME]. +You are joining group <nolink>[NAME]</nolink>. Do you wish to proceed? group confirm @@ -960,7 +960,7 @@ Sorry, trial users can't join groups. icon="alertmodal.tga" name="JoinGroupMaxGroups" type="alertmodal"> -You cannot join '[group_name]': +You cannot join '<nolink>[group_name]</nolink>': You are already a member of [group_count] groups, the maximum number allowed is [max_groups] success group_id @@ -976,7 +976,7 @@ You are already a member of [group_count] groups, the maximum number allowed is icon="alertmodal.tga" name="JoinGroupClosedEnrollment" type="alertmodal"> -You cannot join '[group_name]': +You cannot join '<nolink>[group_name]</nolink>': The group no longer has open enrollment. group_id success @@ -1065,7 +1065,7 @@ Your selling price will be L$[SALE_PRICE] and will be authorized for sale to [NA icon="alertmodal.tga" name="ReturnObjectsDeededToGroup" type="alertmodal"> -Are you sure you want to return all objects shared with the group '[NAME]' on this parcel of land back to their previous owner's inventory? +Are you sure you want to return all objects shared with the group '<nolink>[NAME]</nolink>' on this parcel of land back to their previous owner's inventory? *WARNING* This will delete the non-transferable objects deeded to the group! @@ -1168,7 +1168,7 @@ Are you sure you want to disable all objects in this region? icon="alertmodal.tga" name="ReturnObjectsNotOwnedByGroup" type="alertmodal"> -Return the objects on this parcel of land that are NOT shared with the group [NAME] back to their owners? +Return the objects on this parcel of land that are NOT shared with the group <nolink>[NAME]</nolink> back to their owners? Objects: [N] confirm @@ -1956,7 +1956,7 @@ Eject [AVATAR_NAME] from your land? name="EjectAvatarFromGroup" persist="true" type="notify"> -You ejected [AVATAR_NAME] from group [GROUP_NAME] +You ejected [AVATAR_NAME] from group <nolink>[GROUP_NAME]</nolink> group @@ -3331,7 +3331,7 @@ Please select a smaller area and try again. By deeding this parcel, the group will be required to have and maintain sufficient land use credits. The purchase price of the land is not refunded to the owner. If a deeded parcel is sold, the sale price will be divided evenly among group members. -Deed this [AREA] m² of land to the group '[GROUP_NAME]'? +Deed this [AREA] m² of land to the group '<nolink>[GROUP_NAME]</nolink>'? group confirm group confirm -You have left the group '[group_name]'. +You have left the group '<nolink>[group_name]</nolink>'. group @@ -7055,7 +7055,7 @@ The objects on the selected parcel of land owned by the Resident '[NAME]&ap name="GroupObjectsReturned" persist="true" type="notify"> -The objects on the selected parcel of land shared with the group [GROUPNAME] have been returned back to their owner's inventory. +The objects on the selected parcel of land shared with the group <nolink>[GROUPNAME]</nolink> have been returned back to their owner's inventory. Transferable deeded objects have been returned to their previous owners. Non-transferable objects that are deeded to the group have been deleted. group @@ -8086,7 +8086,7 @@ To grant this permission please update your viewer to the latest version from [D show_toast="false" type="notify"> group -[GROUPNAME]'s '<nolink>[TITLE]</nolink>' +<nolink>[GROUPNAME]</nolink>'s '<nolink>[TITLE]</nolink>' [MESSAGE]