Hmm, what if an user sets various buttons to hide, when no item is selected? The toolbar layout could get quite a mess.
A better option would be maybe to use a dedicated tool bar, which can be toggled on & off, although not automatically.
In my opinion this "unselectable buttons and hidden menu"-thing is a nice feature, but only if you use the standard config. On custom configs for me it looks irritating (without adding @nodesel)...some (not only) custom buttons are still selectable, standard not. The same maybe would happen with menu-entries.
You can't hide buttons and I don't think that this is a good idea.
Think about practice: When working in DO you select different sorts of files, deselect them, and on most operations the toolbars would change their look. Next thing is hidden buttons would change the position of the buttons right of them, I think this is less intiutive than a deselected button which doesn't change the look of a toolbar or placement of the buttons. Hiding menu-entries is another thing, as you only see it on right-click and the smaller the better for faster access.
I just realised when I meant 'hide', I meant simply 'greying out' the button, in exactly the same way as happens for regular buttons using the @disablenosel modifier. NOT completely hide. (Perhaps the title of this post can be changed?). Simply Disable!
Except in this case I would like to make 'unselectable' the button which pops open the menu, which is currently not possible.