Add code to disable the "Open Recent" menu if it contains 0 items.

This is a fix for issue #3122.