diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2024-06-11 12:27:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 12:27:22 +0300 |
commit | 3d1aac4f5c369e9d402c41f1c790d9015f7c7773 (patch) | |
tree | f911416d189a02775a21e3fc94b4bf8027e4ada9 /indra/newview/llinventorygallerymenu.cpp | |
parent | dbc785d4433080ca49b9cd899c756c9700a1a794 (diff) | |
parent | 7331d281e84da73907e1067b03ad4662991f4808 (diff) |
Merge pull request #1481 from secondlife/lua-ui-callbacks
Add trusted flag to UI callbacks, so not everything is accessible from the script
Diffstat (limited to 'indra/newview/llinventorygallerymenu.cpp')
-rw-r--r-- | indra/newview/llinventorygallerymenu.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp index 4b47346473..fb7baefe5b 100644 --- a/indra/newview/llinventorygallerymenu.cpp +++ b/indra/newview/llinventorygallerymenu.cpp @@ -50,16 +50,18 @@ LLContextMenu* LLInventoryGalleryContextMenu::createMenu() { - LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + LLUICtrl::ScopedRegistrarHelper registrar; LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; - registrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryGalleryContextMenu::doToSelected, this, _2)); - registrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::fileUploadLocation, this, _2)); - registrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH)); - registrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND)); + registrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryGalleryContextMenu::doToSelected, this, _2), LLUICtrl::cb_info::UNTRUSTED_BLOCK); + registrar.add("Inventory.FileUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::fileUploadLocation, this, _2), LLUICtrl::cb_info::UNTRUSTED_BLOCK); + registrar.add("Inventory.EmptyTrash", + boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH), LLUICtrl::cb_info::UNTRUSTED_BLOCK); + registrar.add("Inventory.EmptyLostAndFound", + boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND), LLUICtrl::cb_info::UNTRUSTED_BLOCK); std::set<LLUUID> uuids(mUUIDs.begin(), mUUIDs.end()); - registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery))); + registrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, uuids, gFloaterView->getParentFloater(mGallery)), LLUICtrl::cb_info::UNTRUSTED_BLOCK); enable_registrar.add("Inventory.CanSetUploadLocation", boost::bind(&LLInventoryGalleryContextMenu::canSetUploadLocation, this, _2)); |