From c6a82a44f8c2efcad535c941bd00567a23f4fe7b Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 14:31:21 +0200 Subject: [PATCH 1/6] SL-20432 Buildfix --- indra/llui/llflatlistview.cpp | 2 -- indra/newview/llwearableitemslist.cpp | 29 ++++++++++++--------------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index e4f2dd11a4..fd4c33df30 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -1405,8 +1405,6 @@ bool LLFlatListViewEx::updateItemVisibility(LLPanel* item, const LLSD &action) void LLFlatListViewEx::filterItems(bool re_sort, bool notify_parent) { - typedef std::vector item_panel_list_t; - std::string cur_filter = mFilterSubString; LLStringUtil::toUpper(cur_filter); diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 8681f7c14e..a684cdc86e 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -781,30 +781,27 @@ void LLWearableItemsList::updateList(const LLUUID& category_id) void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uuids) { // nothing to update - if (changed_items_uuids.empty()) return; + if (changed_items_uuids.empty()) + return; - typedef std::vector item_panel_list_t; - - item_panel_list_t items; - getItems(items); - - for (item_panel_list_t::iterator items_iter = items.begin(); - items_iter != items.end(); - ++items_iter) + pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end(); + while (pairs_iter != pairs_end) { - LLPanelInventoryListItemBase* item = dynamic_cast(*items_iter); - if (!item) continue; + LLPanel* panel = (*(pairs_iter++))->first; + LLPanelInventoryListItemBase* item = dynamic_cast(panel); + if (!item) + continue; LLViewerInventoryItem* inv_item = item->getItem(); - if (!inv_item) continue; + if (!inv_item) + continue; LLUUID linked_uuid = inv_item->getLinkedUUID(); - for (uuid_vec_t::const_iterator iter = changed_items_uuids.begin(); - iter != changed_items_uuids.end(); - ++iter) + uuid_vec_t::const_iterator uuids_iter = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); + while (uuids_iter != uuids_end) { - if (linked_uuid == *iter) + if (linked_uuid == *(uuids_iter++)) { item->setNeedsRefresh(true); break; From ef2a7fee113c33387a0c7aff2aa862f715a564af Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 15:20:07 +0200 Subject: [PATCH 2/6] SL-20432 Minor polishing in LLWearableItemsList::updateChangedItems --- indra/newview/llwearableitemslist.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index a684cdc86e..83d2b16a86 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -784,6 +784,7 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui if (changed_items_uuids.empty()) return; + uuid_vec_t::const_iterator uuids_begin = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); pairs_const_iterator_t pairs_iter = getItemPairs().begin(), pairs_end = getItemPairs().end(); while (pairs_iter != pairs_end) { @@ -797,16 +798,10 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui continue; LLUUID linked_uuid = inv_item->getLinkedUUID(); - - uuid_vec_t::const_iterator uuids_iter = changed_items_uuids.begin(), uuids_end = changed_items_uuids.end(); - while (uuids_iter != uuids_end) - { - if (linked_uuid == *(uuids_iter++)) - { - item->setNeedsRefresh(true); - break; - } - } + if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end) + { + item->setNeedsRefresh(true); + } } } From 366d4439996cdb6cb5b3f116fedcb4c5ee8b4425 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 15:08:38 +0200 Subject: [PATCH 3/6] SL-20370 Change PDT to SLT on menu bar --- indra/llcommon/llstring.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index f6629803ee..f40e7ad45f 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -1235,9 +1235,17 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, } else { +#if 0 + // EXT-1565 : Zai Lynch, James Linden : 15/Oct/09 + // [BSI] Feedback: Viewer clock mentions SLT, but would prefer it to show PST/PDT // "slt" = Second Life Time, which is deprecated. // If not utc or user local time, fallback to Pacific time replacement = LLStringOps::getPacificDaylightTime() ? "PDT" : "PST"; +#else + // SL-20370 : Steeltoe Linden : 29/Sep/23 + // Change "PDT" to "SLT" on menu bar + replacement = "SLT"; +#endif } return true; } From 3e4fd9a20cb681da67952dcd49c3e12e6017832b Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Wed, 11 Oct 2023 15:43:23 +0200 Subject: [PATCH 4/6] SL-20378 Add menu bar entry and keyboard shortcut to open Notifications floater --- indra/newview/skins/default/xui/en/menu_viewer.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 6a6546ff0a..e2c102086f 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -64,6 +64,14 @@ function="Floater.ToggleOrBringToFront" parameter="camera" /> + + + Date: Wed, 11 Oct 2023 20:56:25 +0200 Subject: [PATCH 5/6] SL-20419 Receiving new objects or items, etc causes inventory to switch from recent to my inventory tab --- indra/llui/lltabcontainer.cpp | 16 ++++---- indra/newview/llinventorybridge.cpp | 4 +- indra/newview/llinventorypanel.cpp | 56 ++++++++++++++------------- indra/newview/llinventorypanel.h | 10 ++--- indra/newview/llmeshrepository.cpp | 2 +- indra/newview/llviewerassetupload.cpp | 2 +- indra/newview/llviewermessage.cpp | 19 ++++++--- indra/newview/llwearableitemslist.cpp | 2 +- 8 files changed, 59 insertions(+), 52 deletions(-) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 76b9e448a1..8767c3f916 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1516,25 +1516,23 @@ BOOL LLTabContainer::selectTab(S32 which) LLTabTuple* selected_tuple = getTab(which); if (!selected_tuple) - { return FALSE; - } - + LLSD cbdata; if (selected_tuple->mTabPanel) cbdata = selected_tuple->mTabPanel->getName(); - BOOL res = FALSE; - if( !mValidateSignal || (*mValidateSignal)( this, cbdata ) ) + BOOL result = FALSE; + if (!mValidateSignal || (*mValidateSignal)(this, cbdata)) { - res = setTab(which); - if (res && mCommitSignal) + result = setTab(which); + if (result && mCommitSignal) { (*mCommitSignal)(this, cbdata); } } - - return res; + + return result; } // private diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 73005d6903..adbfa1b6ae 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1764,7 +1764,7 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action) } else if ("show_in_main_panel" == action) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true); return; } else if ("cut" == action) @@ -3395,7 +3395,7 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) } else if ("show_in_main_panel" == action) { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, mUUID, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, mUUID, true); return; } else if ("cut" == action) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 54f91451ac..a7d39b1ef6 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1922,46 +1922,52 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) } //static -void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const LLUUID& obj_id, BOOL use_main_panel, BOOL take_keyboard_focus, BOOL reset_filter) +void LLInventoryPanel::openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id, + bool use_main_panel, bool take_keyboard_focus, bool reset_filter) { LLSidepanelInventory* sidepanel_inventory = LLFloaterSidePanelContainer::getPanel("inventory"); sidepanel_inventory->showInventoryPanel(); - bool in_inbox = (gInventory.isObjectDescendentOf(obj_id, gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX))); - - if (!in_inbox && (use_main_panel || !sidepanel_inventory->getMainInventoryPanel()->isRecentItemsPanelSelected())) + LLUUID cat_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_INBOX); + bool in_inbox = gInventory.isObjectDescendentOf(obj_id, cat_id); + if (!in_inbox && use_main_panel) { sidepanel_inventory->selectAllItemsPanel(); } - LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater(); - if(!auto_open && inventory_floater && inventory_floater->getVisible()) + if (!auto_open) { - LLSidepanelInventory *inventory_panel = inventory_floater->findChild("main_panel"); - LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel(); - if(main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode()) + LLFloater* inventory_floater = LLFloaterSidePanelContainer::getTopmostInventoryFloater(); + if (inventory_floater && inventory_floater->getVisible()) { - LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL; - main_panel->setGallerySelection(obj_id); - return; + LLSidepanelInventory *inventory_panel = inventory_floater->findChild("main_panel"); + LLPanelMainInventory* main_panel = inventory_panel->getMainInventoryPanel(); + if (main_panel->isSingleFolderMode() && main_panel->isGalleryViewMode()) + { + LL_DEBUGS("Inventory") << "Opening gallery panel for item" << obj_id << LL_ENDL; + main_panel->setGallerySelection(obj_id); + return; + } } } - LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); - if (main_inventory && main_inventory->isSingleFolderMode() - && use_main_panel) + if (use_main_panel) { - const LLInventoryObject *obj = gInventory.getObject(obj_id); - if (obj) + LLPanelMainInventory* main_inventory = sidepanel_inventory->getMainInventoryPanel(); + if (main_inventory && main_inventory->isSingleFolderMode()) { - LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL; - main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false); - main_inventory->setGallerySelection(obj_id); - return; + const LLInventoryObject *obj = gInventory.getObject(obj_id); + if (obj) + { + LL_DEBUGS("Inventory") << "Opening main inventory panel for item" << obj_id << LL_ENDL; + main_inventory->setSingleFolderViewRoot(obj->getParentUUID(), false); + main_inventory->setGallerySelection(obj_id); + return; + } } } + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(auto_open); - if (active_panel) { LL_DEBUGS("Messaging", "Inventory") << "Highlighting" << obj_id << LL_ENDL; @@ -1973,11 +1979,8 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L if (in_inbox) { - - LLInventoryPanel * inventory_panel = NULL; sidepanel_inventory->openInbox(); - inventory_panel = sidepanel_inventory->getInboxPanel(); - + LLInventoryPanel* inventory_panel = sidepanel_inventory->getInboxPanel(); if (inventory_panel) { inventory_panel->setSelection(obj_id, take_keyboard_focus); @@ -2002,7 +2005,6 @@ void LLInventoryPanel::openInventoryPanelAndSetSelection(BOOL auto_open, const L void LLInventoryPanel::setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id) { - LLFloaterReg::const_instance_list_t& inst_list = LLFloaterReg::getFloaterList("inventory"); for (LLFloaterReg::const_instance_list_t::const_iterator iter = inst_list.begin(); iter != inst_list.end(); ++iter) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 341be0cf86..2c35bdcd11 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -244,12 +244,12 @@ public: // "Auto_open" determines if we open an inventory panel if none are open. static LLInventoryPanel *getActiveInventoryPanel(BOOL auto_open = TRUE); - static void openInventoryPanelAndSetSelection(BOOL auto_open, + static void openInventoryPanelAndSetSelection(bool auto_open, const LLUUID& obj_id, - BOOL use_main_panel = FALSE, - BOOL take_keyboard_focus = TAKE_FOCUS_YES, - BOOL reset_filter = FALSE); - static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id); + bool use_main_panel = false, + bool take_keyboard_focus = true, + bool reset_filter = false); + static void setSFViewAndOpenFolder(const LLInventoryPanel* panel, const LLUUID& folder_id); void addItemID(const LLUUID& id, LLFolderViewItem* itemp); void removeItemID(const LLUUID& id); LLFolderViewItem* getItemByID(const LLUUID& id); diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index d6eba6b4bf..549962ea86 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -5446,7 +5446,7 @@ void on_new_single_inventory_upload_complete( } else { - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, server_response["new_inventory_item"].asUUID(), TRUE, TAKE_FOCUS_NO, TRUE); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, server_response["new_inventory_item"].asUUID(), true, false, true); } // restore keyboard focus diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 13491114b9..036cef5c94 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -847,7 +847,7 @@ void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoreHttpUtil::HttpCorouti // Show the preview panel for textures and sounds to let // user know that the image (or snapshot) arrived intact. LLInventoryPanel* panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - LLInventoryPanel::openInventoryPanelAndSetSelection(TRUE, serverInventoryItem, FALSE, TAKE_FOCUS_NO, (panel == NULL)); + LLInventoryPanel::openInventoryPanelAndSetSelection(true, serverInventoryItem, false, false, !panel); // restore keyboard focus gFocusMgr.setKeyboardFocus(focus); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index f3288a5300..1b3c426067 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1557,15 +1557,22 @@ void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_nam } else { - // Highlight item - const BOOL auto_open = - gSavedSettings.getBOOL("ShowInInventory") && // don't open if showininventory is false - !from_name.empty(); // don't open if it's not from anyone. - if(auto_open) + // Highlight item + bool show_in_inventory = gSavedSettings.get("ShowInInventory"); + bool auto_open = + show_in_inventory && // don't open if ShowInInventory is FALSE + !from_name.empty(); // don't open if it's not from anyone + + // SL-20419 : Don't change active tab if floater is visible + LLFloater* instance = LLFloaterReg::findInstance("inventory"); + bool use_main_panel = instance && instance->getVisible(); + + if (auto_open) { LLFloaterReg::showInstance("inventory"); } - LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, true); + + LLInventoryPanel::openInventoryPanelAndSetSelection(auto_open, obj_id, use_main_panel); } } } diff --git a/indra/newview/llwearableitemslist.cpp b/indra/newview/llwearableitemslist.cpp index 83d2b16a86..948fe55e0d 100644 --- a/indra/newview/llwearableitemslist.cpp +++ b/indra/newview/llwearableitemslist.cpp @@ -797,7 +797,7 @@ void LLWearableItemsList::updateChangedItems(const uuid_vec_t& changed_items_uui if (!inv_item) continue; - LLUUID linked_uuid = inv_item->getLinkedUUID(); + const LLUUID& linked_uuid = inv_item->getLinkedUUID(); if (std::find(uuids_begin, uuids_end, linked_uuid) != uuids_end) { item->setNeedsRefresh(true); From 70988ede9e924960c37cd01797c9a435b557acec Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Thu, 12 Oct 2023 17:02:47 +0200 Subject: [PATCH 6/6] SL-20422 Clicking the 'Bring it back' link on Aditi displays a teleport alert --- indra/newview/llslurl.cpp | 7 +++++++ indra/newview/llslurl.h | 5 +++-- indra/newview/llurldispatcher.cpp | 5 +++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index a3a8247268..a9b7b0e417 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -112,6 +112,13 @@ LLSLURL::LLSLURL(const std::string& slurl) // and the slurl type (APP or LOCATION) if(slurl_uri.scheme() == LLSLURL::SLURL_SECONDLIFE_SCHEME) { + if (path_array.size() == 0) + { + // um, we need a path... + mType = EMPTY; + return; + } + // parse a maingrid style slurl. We know the grid is maingrid // so grab it. // A location slurl for maingrid (with the special schemes) can be in the form diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index b86cf7949b..6132a4a8b0 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -52,13 +52,14 @@ public: static const char* SLURL_REGION_PATH; // if you modify this enumeration, update typeName as well - enum SLURL_TYPE { - INVALID, + enum SLURL_TYPE { + INVALID, LOCATION, HOME_LOCATION, LAST_LOCATION, APP, HELP, + EMPTY, NUM_SLURL_TYPES // must be last }; diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 76fb138768..07ea8a4ec6 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -134,6 +134,11 @@ bool LLURLDispatcherImpl::dispatch(const LLSLURL& slurl, LLMediaCtrl* web, bool trusted_browser) { + // SL-20422 : Clicking the "Bring it back" link on Aditi displays a teleport alert + // Stop further processing empty urls like [secondlife:/// Bring it back.] + if (slurl.getType() == LLSLURL::EMPTY) + return true; + const bool right_click = false; return dispatchCore(slurl, nav_type, right_click, web, trusted_browser); }