custom-electron-titlebar icon indicating copy to clipboard operation
custom-electron-titlebar copied to clipboard

updateMenu should be public

Open Christilut opened this issue 2 years ago • 1 comments

This method is marked private:

private updateMenu(menu?: Menu) { }

But if you update the menu with wth Menu.setApplicationMenu(menu) then the commandId's have changed but this package does not know about the new commandId's. The result is that clicking any menu item does not work since they refer to non-existing commandId's.

If I run titlebar.updateMenu(menu) after setApplicationMenu, the commandIds are also updated and clicks work as expected.

Christilut avatar Oct 05 '23 09:10 Christilut

You should use refreshMenu, an asynchronous method that refreshes the menu with what is in Menu.getApplicationMenu().

AlexTorresDev avatar Jan 15 '24 15:01 AlexTorresDev