From d6002da559bac486524491d72589ae03a947922e Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 5 Nov 2022 01:02:58 +0200 Subject: SL-18581 Don't show the starter avatar toolbar button for NUX --- indra/newview/lltoolbarview.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'indra/newview/lltoolbarview.cpp') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 01d799dcd5..752fc6f3f3 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -44,6 +44,7 @@ #include "llagent.h" // HACK for destinations guide on startup #include "llfloaterreg.h" // HACK for destinations guide on startup #include "llviewercontrol.h" // HACK for destinations guide on startup +#include "llinventorymodel.h" // HACK to disable starter avatars button for NUX #include @@ -319,6 +320,22 @@ bool LLToolBarView::loadToolbars(bool force_default) } } } + + // SL-18581: Don't show the starter avatar toolbar button for NUX users + LLViewerInventoryCategory* my_outfits_cat = gInventory.getCategory(gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS)); + if (gAgent.isFirstLogin() + && my_outfits_cat != NULL + && my_outfits_cat->getDescendentCount() > 0) + { + for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++) + { + if (mToolbars[i]) + { + mToolbars[i]->removeCommand(LLCommandId("avatar")); + } + } + } + mToolbarsLoaded = true; return true; } -- cgit v1.2.3 From 53ebcc0ff3ee49f7e4b1a5faa71aaf32dafe23e5 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Tue, 14 Feb 2023 01:30:22 +0200 Subject: SL-18581 Add more logging --- indra/newview/lltoolbarview.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'indra/newview/lltoolbarview.cpp') diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 752fc6f3f3..4f47c465c4 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -323,15 +323,18 @@ bool LLToolBarView::loadToolbars(bool force_default) // SL-18581: Don't show the starter avatar toolbar button for NUX users LLViewerInventoryCategory* my_outfits_cat = gInventory.getCategory(gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS)); - if (gAgent.isFirstLogin() - && my_outfits_cat != NULL - && my_outfits_cat->getDescendentCount() > 0) + if (gAgent.isFirstLogin()) { - for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++) + LL_WARNS() << "First login: checking for NUX user." << LL_ENDL; + if (my_outfits_cat != NULL && my_outfits_cat->getDescendentCount() > 0) { - if (mToolbars[i]) + LL_WARNS() << "First login: My Outfits folder is not empty, removing the avatar picker button." << LL_ENDL; + for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++) { - mToolbars[i]->removeCommand(LLCommandId("avatar")); + if (mToolbars[i]) + { + mToolbars[i]->removeCommand(LLCommandId("avatar")); + } } } } -- cgit v1.2.3