DO12 - Request for option to not close locked tab

Just discovered that you can actually close a locked tab - I double clicked one by mistake and it closed. Based on my experience with other apps that have locked tabs (eg my browser), this was unexpected behaviour. Can we have an option for locking to include not being closed please?

Yes, that makes sense. But maybe some option shift-clicking the tab would still close the tab, in case you actually need to.

This can be done easily within a script

place below in a .js file

function OnCloseTab(data) { if (data.tab.lock == "off") return false; else return true; }

I tried with the shift and ctrl qualifier to override to allow the closing of the tab but was having unexpected results, it was closing all other tabs. The code I was having this problem with...

[code]function OnCloseTab(data)
{
if (data.tab.lock == "off")
return false;
else
{
if (data.qualifiers == "shift")
return false;

	return true;
}

}[/code]

I just discovered the reason why all other tabs were closing, sort of. If you have "Folder tab close buttons" enabled under Preferences / Folder Tabs / Options, and you close the tab with the button in the tab itself this is when all other tabs will close. But if you close either by double clicking or right clicking a tab and clicking "close tab" or the x at the file listing header it will work correctly when holding shift.

Folder tab close buttons actually have some hidden functionality which is getting in the way here.

Shift + Close = Close all other tabs
Control + Close = Close all tabs to the left/right (depending on which control key you held down)
Alt + Close = Move tab to the other side

They will all take precedence over calling your script; so as you've discovered, closing the tab via another means is the way to get around it.