lectrote icon indicating copy to clipboard operation
lectrote copied to clipboard

Open Recent menu is not updated dynamically

Open erkyrath opened this issue 9 years ago • 3 comments

The "Open Recent" submenu is populated when you launch the app, but does not change thereafter. You have to quit and restart to see changes.

(I'm talking about the submenu of "File". The recent-items list in the Dock pop-up menu works correctly, thanks to app.addRecentDocument.)

This is not currently fixable. It's not possible to update an application submenu on the fly: https://github.com/atom/electron/issues/527

It's supposed be possible to add to a submenu (using Menu.insert), but when I tried, it didn't work. It's also supposed to be possible to replace the entire menu tree (with Menu.setApplicationMenu) -- but that seems like overkill, and there are some bugs filed about it. So I'm just leaving this alone until Electron improves its menu handling.

erkyrath avatar Jan 25 '16 06:01 erkyrath

More specific bug report: https://github.com/atom/electron/issues/4028

erkyrath avatar Jan 25 '16 06:01 erkyrath

Win/Linux versions now update their static window menus on creation. So you can see changes by closing and reopening the About window. (I think.) Still not ideal.

erkyrath avatar Feb 02 '16 18:02 erkyrath

Should be doable now or soon; see https://github.com/electron/electron/pull/11166

erkyrath avatar Nov 28 '17 15:11 erkyrath