From 96e8e670e104d852b1a925976f3d935448eba103 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 29 Jun 2018 12:59:53 -0700 Subject: Enable settings inventory filter checkbox. Fix day cycle editor selection on open. --- indra/newview/llpanelmaininventory.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index db9d61c637..a9ad41e6f7 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -905,6 +905,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND)); getChild("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE)); getChild("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT)); + getChild("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS)); getChild("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS); getChild("check_created_by_me")->setValue(show_created_by_me); @@ -997,6 +998,12 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } + if (!getChild("check_settings")->getValue()) + { + filter &= ~(0x1 << LLInventoryType::IT_SETTINGS); + filtered_by_all_types = FALSE; + } + if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE)) { // don't include folders in filter, unless I've selected everything or filtering by date @@ -1114,7 +1121,8 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data) self->getChild("check_script")->setValue(TRUE); self->getChild("check_sound")->setValue(TRUE); self->getChild("check_texture")->setValue(TRUE); - self->getChild("check_snapshot")->setValue(TRUE); + self->getChild("check_snapshot")->setValue(TRUE); + self->getChild("check_settings")->setValue(TRUE); } //static @@ -1135,6 +1143,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) self->getChild("check_sound")->setValue(FALSE); self->getChild("check_texture")->setValue(FALSE); self->getChild("check_snapshot")->setValue(FALSE); + self->getChild("check_settings")->setValue(FALSE); } ////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 21d165011b81909c8cab944755b53f908e51ad16 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 9 Jul 2018 13:26:48 -0700 Subject: Attempting to create a settings inventory item on a non-eep region will now show a visible failure message to the user. Menu items for greating settings in inventory are disabled on non eep regions. --- indra/newview/llpanelmaininventory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a9ad41e6f7..b5e24b6efb 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -58,6 +58,7 @@ #include "llsidepanelinventory.h" #include "llfolderview.h" #include "llradiogroup.h" +#include "llenvironment.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -128,6 +129,9 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); + mEnableCallbackRegistrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl *, const LLSD &) { return LLPanelMainInventory::hasSettingsInventory(); }); + + mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); } @@ -1555,5 +1559,10 @@ void LLPanelMainInventory::setUploadCostIfNeeded() } } +bool LLPanelMainInventory::hasSettingsInventory() +{ + return LLEnvironment::instance().isInventoryEnabled(); +} + // List Commands // //////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 7df0a4ddd0c48358e7152733aaba01464f2620be Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 14 Nov 2019 15:01:50 +0000 Subject: SL-10499, SL-10497 - use LLAgentBenefits info --- indra/newview/llpanelmaininventory.cpp | 48 ++++++++++++++++------------------ 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f63e604927..7404798589 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -28,6 +28,7 @@ #include "llpanelmaininventory.h" #include "llagent.h" +#include "llagentbenefits.h" #include "llagentcamera.h" #include "llavataractions.h" #include "llcheckboxctrl.h" @@ -227,16 +228,21 @@ BOOL LLPanelMainInventory::postBuild() initListCommandsHandlers(); - // *TODO:Get the cost info from the server - const std::string upload_cost("10"); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) { - menu->getChild("Upload Image")->setLabelArg("[COST]", upload_cost); - menu->getChild("Upload Sound")->setLabelArg("[COST]", upload_cost); - menu->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); - menu->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); + menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); + menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); + + // FIXME PREMIUM - bulk upload of what? This doesn't work with + // mixed items if costs aren't all the same. For now treating + // as textures. + menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } // Trigger callback for focus received so we can deselect items in inbox/outbox @@ -1512,28 +1518,18 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { - LLMenuItemBranchGL* upload_menu = menu->findChild("upload"); - if(upload_menu) - { - S32 upload_cost = LLGlobalEconomy::getInstance()->getPriceUpload(); - std::string cost_str; + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); - // getPriceUpload() returns -1 if no data available yet. - if(upload_cost >= 0) - { - mNeedUploadCost = false; - cost_str = llformat("%d", upload_cost); - } - else - { - cost_str = llformat("%d", gSavedSettings.getU32("DefaultUploadCost")); - } + menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); + menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); + menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - upload_menu->getChild("Upload Image")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); - upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); - } + // FIXME PREMIUM - bulk upload of what? This doesn't work with + // mixed items if costs aren't all the same. For now treating + // as textures. + menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } } -- cgit v1.2.3 From 65550520ed00699098b221a1166e4c1763333d58 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 15 Nov 2019 15:13:11 +0000 Subject: SL-10499 - benefits. Removed no-longer-needed lleconomy files and classes. Group-related costs and limits via benefits. --- indra/newview/llpanelmaininventory.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 7404798589..b81dce4e31 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -34,7 +34,6 @@ #include "llcheckboxctrl.h" #include "llcombobox.h" #include "lldndbutton.h" -#include "lleconomy.h" #include "llfilepicker.h" #include "llinventorybridge.h" #include "llinventoryfunctions.h" @@ -1510,11 +1509,6 @@ bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType void LLPanelMainInventory::setUploadCostIfNeeded() { - // *NOTE dzaporozhan - // Upload cost is set in process_economy_data() (llviewermessage.cpp). But since we - // have two instances of Inventory panel at the moment(and two instances of context menu), - // call to gMenuHolder->childSetLabelArg() sets upload cost only for one of the instances. - LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { -- cgit v1.2.3 From eb6e64ec401382fd2fbbbb27830e828035a6e5af Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 19 Nov 2019 16:15:19 +0000 Subject: SL-10499 - Fixes for benefits info and upload, especially bulk upload --- indra/newview/llpanelmaininventory.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index b81dce4e31..a57ee83285 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -237,11 +237,6 @@ BOOL LLPanelMainInventory::postBuild() menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - - // FIXME PREMIUM - bulk upload of what? This doesn't work with - // mixed items if costs aren't all the same. For now treating - // as textures. - menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } // Trigger callback for focus received so we can deselect items in inbox/outbox @@ -1519,11 +1514,6 @@ void LLPanelMainInventory::setUploadCostIfNeeded() menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); menu->getChild("Upload Animation")->setLabelArg("[COST]", animation_upload_cost_str); - - // FIXME PREMIUM - bulk upload of what? This doesn't work with - // mixed items if costs aren't all the same. For now treating - // as textures. - menu->getChild("Bulk Upload")->setLabelArg("[COST]", texture_upload_cost_str); } } -- cgit v1.2.3 From 4300b204f0fc519d3e2dabc7e1296284e5908611 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 20 Nov 2019 14:03:57 +0000 Subject: SL-10499 - handle package info from benefits service --- indra/newview/llpanelmaininventory.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a57ee83285..be31a2ed5d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -227,9 +227,9 @@ BOOL LLPanelMainInventory::postBuild() initListCommandsHandlers(); - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); - const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); - const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if (menu) @@ -1507,9 +1507,9 @@ void LLPanelMainInventory::setUploadCostIfNeeded() LLMenuGL* menu = (LLMenuGL*)mMenuAddHandle.get(); if(mNeedUploadCost && menu) { - const std::string texture_upload_cost_str = std::to_string(LLAgentBenefits::instance().getTextureUploadCost()); - const std::string sound_upload_cost_str = std::to_string(LLAgentBenefits::instance().getSoundUploadCost()); - const std::string animation_upload_cost_str = std::to_string(LLAgentBenefits::instance().getAnimationUploadCost()); + const std::string texture_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()); + const std::string sound_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getSoundUploadCost()); + const std::string animation_upload_cost_str = std::to_string(LLAgentBenefitsMgr::current().getAnimationUploadCost()); menu->getChild("Upload Image")->setLabelArg("[COST]", texture_upload_cost_str); menu->getChild("Upload Sound")->setLabelArg("[COST]", sound_upload_cost_str); -- cgit v1.2.3