Add "Close all" option to the Close database menu

The "Close database" menu only ever listed one item per open database, requiring the user to close each one individually. Add a "Close all" item at the bottom, below a separator, mirroring the existing "Clear history" item at the bottom of the "Open recent database" menu (RecentDatabase).

FileCloseDatabase now overrides DatabaseShowMenu.aboutToShow() to append the "Close all" item after the inherited per-database items. Its transient data is left null (vs. an IDatabase for a per-database item), which execute() checks to route to the existing DatabaseCollection.removeAllDatabases(window, modelService, partService) -- already used by switchDatabase() -- instead of the single-database removeDatabase() path. No new close-all logic was needed.

DatabaseShowMenu itself is untouched, since FileCloseDatabase is currently its only subclass and the addition is specific to closing, not to database menus in general.

Assisted by Claude Sonnet

Signed-off-by: John Mellor-Crummey johnmc@rice.edu

Merge request reports

Loading
Loading