(pgAdminMainScreen, configStore, callbacks={})
| 190 | } |
| 191 | |
| 192 | export function refreshMenus(pgAdminMainScreen, configStore, callbacks={}) { |
| 193 | // cachedMenus is only populated once the renderer sends its menu definition |
| 194 | // via the 'setMenus' IPC. A refresh can be triggered before that happens |
| 195 | // (e.g. an auto-update event, or the window being closed while the UI is |
| 196 | // still loading). In that case there are no menus to rebuild, so bail out |
| 197 | // to avoid dereferencing an undefined menu list. |
| 198 | if (!cachedMenus) return; |
| 199 | buildAndSetMenus(cachedMenus, pgAdminMainScreen, configStore, callbacks); |
| 200 | } |
| 201 | |
| 202 | export function setupMenu(pgAdminMainScreen, configStore, callbacks={}) { |
| 203 | ipcMain.on('setMenus', (event, menus)=>{ |
no test coverage detected