This replaces the good working ToolAction by ToggleActionMenu.
Unlike ToolAction, ToggleActionMenu inherits from KActionMenu, and is more universally applicaple.
- Menu can be set from outside, not hard coded.
- Default action for toolbar button is controllable from outside. (Theoretically, the button could trigger anything now.)
- KActionMenu instead of KSelectAction:
- Pluggable in other menus, thus called “Menu”.
- Doesn’t make the actions exclusive, so any actions can be added to the menu.
This will replace the (mostly similar) CheckableActionMenu from my other patch D21195, maybe leading to more consistence.
Everything like before, here with mouse_selecttool added to Tools menu to show submenu capability.
- Load correct selection tool from configuration at startup, after mouseModeMenu is created. (Difficult, but done another way now.)
- Fix crash at destruction
- Better name than ToggleActionMenu? ToolAction was probably better. (Added description for the name.)
- License headers. (I’ve seen that mailing list thread, yes... :-/ )
- Disable the toolbar button when the menu itself is disabled. (KActionMenu doesn’t need this, because it shows itself on the toolbar button.)
- Tooltips needed?