mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
Previously, all the code to add menus and actions was in main(). This was messy and didn't allow us to reference the actions from SpreadsheetWidget, which is needed in order to add a toolbar. This commit moves the menu and action adding code to method on SpreadsheetWidget called initialize_menubar() which is based upon applications such as TextEditor which have identically named methods doing the same thing. In additon, clipboard_action(), previouly a lambda in main(), has also been made into a method on SpreadsheetWidget since it would otherwise be destroyed when it goes out of scope. (This was previously avoided by declaring the lambda in main() so it's always in scope.)
2.6 KiB
2.6 KiB