summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorgwigz <gwigz@users.noreply.github.com>2024-10-08 18:48:54 +0100
committerErik Kundiman <erik@megapahit.org>2024-10-09 11:30:41 +0800
commit0bec080221e1002ef30b01215f7cdafd552c08f2 (patch)
tree0f0e946ad935fdc4fefe78f272b9ae4a1c1c6d17 /indra/newview/llinventorypanel.cpp
parent0efe72e7993a9a23a6f8952368548775cb0ea3ef (diff)
Minimal favorite folder inventory feature
Utilizes the recent-ish "open in new window" functionality from `LLPanelMainInventory::newFolderWindow`
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r--indra/newview/llinventorypanel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 6d42145f6b..c7bd1d943a 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -185,6 +185,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
mCommitCallbackRegistrar.add("Inventory.BeginIMSession", boost::bind(&LLInventoryPanel::beginIMSession, this));
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
mCommitCallbackRegistrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryPanel::fileUploadLocation, this, _2));
+ mCommitCallbackRegistrar.add("Inventory.SetFavoriteFolder", boost::bind(&LLInventoryPanel::setFavoriteFolder, this));
mCommitCallbackRegistrar.add("Inventory.OpenNewFolderWindow", boost::bind(&LLInventoryPanel::openSingleViewInventory, this, LLUUID()));
}
@@ -1757,6 +1758,11 @@ void LLInventoryPanel::fileUploadLocation(const LLSD& userdata)
}
}
+void LLInventoryPanel::setFavoriteFolder()
+{
+ gSavedPerAccountSettings.setString("FavoriteFolder", LLFolderBridge::sSelf.get()->getUUID().asString());
+}
+
void LLInventoryPanel::openSingleViewInventory(LLUUID folder_id)
{
LLPanelMainInventory::newFolderWindow(folder_id.isNull() ? LLFolderBridge::sSelf.get()->getUUID() : folder_id);