FIRE-21247: Make setting less intrusive and changeable without relog
parent
12404c7563
commit
4b42a343d3
|
|
@ -24397,6 +24397,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>FSDontNagWhenPurging</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If enabled, emptying trash will not double check before deleting. WARNING: You should only use this if you are a regular trash emptier and are confident that you will not lose things</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
||||
|
|
|
|||
|
|
@ -1171,16 +1171,5 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>FSDontNagWhenPurging</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>If enabled, emptying trash will not double check before deleting. WARNING: You should only use this if you are a regular trash emptier and are confident that you will not lose things</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
</map>
|
||||
</llsd>
|
||||
|
|
|
|||
|
|
@ -3490,7 +3490,10 @@ bool LLInventoryModel::callbackEmptyFolderType(const LLSD& notification, const L
|
|||
|
||||
void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderType::EType preferred_type)
|
||||
{
|
||||
if (!notification.empty())
|
||||
// <FS:Ansariel> FIRE-21247 Make it possible to disable trash-emptying warning
|
||||
//if (!notification.empty())
|
||||
if (!notification.empty() && (notification != "ConfirmEmptyTrash" || !gSavedSettings.getBOOL("FSDontNagWhenPurging")))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLSD args;
|
||||
if(LLFolderType::FT_TRASH == preferred_type)
|
||||
|
|
|
|||
|
|
@ -173,14 +173,7 @@ LLInventoryPanel::LLInventoryPanel(const LLInventoryPanel::Params& p) :
|
|||
|
||||
// context menu callbacks
|
||||
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLInventoryPanel::doToSelected, this, _2));
|
||||
// <FS:Beq> FIRE-21247 Make it possible to disable trash-emptying warning
|
||||
if (gSavedPerAccountSettings.getBOOL("FSDontNagWhenPurging")){
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "", LLFolderType::FT_TRASH));
|
||||
}
|
||||
else{
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
}
|
||||
// </FS:Beq>
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
|
||||
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLInventoryPanel::doCreate, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&LLInventoryPanel::attachObject, this, _2));
|
||||
|
|
|
|||
|
|
@ -124,14 +124,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
|
|||
// Menu Callbacks (non contex menus)
|
||||
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelMainInventory::doToSelected, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.CloseAllFolders", boost::bind(&LLPanelMainInventory::closeAllFolders, this));
|
||||
// <FS:Beq> FIRE-21247 Make it possible to disable trash-emptying warning
|
||||
if (gSavedPerAccountSettings.getBOOL("FSDontNagWhenPurging")){
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "", LLFolderType::FT_TRASH));
|
||||
}
|
||||
else{
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
}
|
||||
// </FS:Beq>
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
|
||||
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&LLPanelMainInventory::doCreate, this, _2));
|
||||
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
|
||||
|
|
@ -1495,15 +1488,8 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata)
|
|||
}
|
||||
if (command_name == "empty_trash")
|
||||
{
|
||||
// <FS:Beq> FIRE-21247 Make it possible to disable trash-emptying warning
|
||||
// Restore previous behaviour if FSDontNagWhenPurging is TRUE (default FALSE)
|
||||
if (gSavedPerAccountSettings.getBOOL("FSDontNagWhenPurging")){
|
||||
gInventory.emptyFolderType("", LLFolderType::FT_TRASH);
|
||||
}
|
||||
else{
|
||||
gInventory.emptyFolderType("ConfirmEmptyTrash", LLFolderType::FT_TRASH);
|
||||
}
|
||||
// </FS:Beq>
|
||||
const std::string notification = "ConfirmEmptyTrash";
|
||||
gInventory.emptyFolderType(notification, LLFolderType::FT_TRASH);
|
||||
}
|
||||
if (command_name == "empty_lostnfound")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1649,14 +1649,7 @@ LLPanelObjectInventory::LLPanelObjectInventory(const LLPanelObjectInventory::Par
|
|||
{
|
||||
// Setup context menu callbacks
|
||||
mCommitCallbackRegistrar.add("Inventory.DoToSelected", boost::bind(&LLPanelObjectInventory::doToSelected, this, _2));
|
||||
// <FS:Beq> FIRE-21247 Make it possible to disable trash-emptying warning
|
||||
if (gSavedPerAccountSettings.getBOOL("FSDontNagWhenPurging")){
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "", LLFolderType::FT_TRASH));
|
||||
}
|
||||
else{
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
}
|
||||
// </FS:Beq>
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyTrash", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyTrash", LLFolderType::FT_TRASH));
|
||||
mCommitCallbackRegistrar.add("Inventory.EmptyLostAndFound", boost::bind(&LLInventoryModel::emptyFolderType, &gInventory, "ConfirmEmptyLostAndFound", LLFolderType::FT_LOST_AND_FOUND));
|
||||
mCommitCallbackRegistrar.add("Inventory.DoCreate", boost::bind(&do_nothing));
|
||||
mCommitCallbackRegistrar.add("Inventory.AttachObject", boost::bind(&do_nothing));
|
||||
|
|
|
|||
Loading…
Reference in New Issue