erkyrath / lectrote

The IF interpreter in an Electron shell
Other
250 stars 28 forks source link

Open Recent menu is not updated dynamically #1

Open erkyrath opened 8 years ago

erkyrath commented 8 years ago

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 commented 8 years ago

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

erkyrath commented 8 years ago

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 commented 6 years ago

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