Revisit object selection method, action handling and menu generation
The enabled actions in a view are primarily based on the following criteria:
- global status (e.g. file open or closed, file modified)
- global specific object attributes (e.g. online mapping)
- the view itself
- the selected objects in the view
Currently, multiple methods exist to select an object (selectByObject, selectByVariant). At the same time, the dynamic interaction with the actions is implemented in various different inconsistent ways throughout the application. Another topic which is related in that context is the handling of (context) menus: most are available via the KXMLGuiClient object and the layout is provided using an .rc file while others are generated dynamically in code.
The idea is to consolidate the selection into a single, general mechanism which is used by all parts of the application. The action initialization and action control logic as well as the menu generation logic shall be unified throughout the views and plugins and the menus shall all be made available via the .rc files.
As analysis continues, more items will be added here to keep track of things.
- Analysis
-
Identify parts that need changes in respect to menu handling -
Identify parts that need changes in respect to action handling
-
- Modifications
-
Provide .rc menus for all menus -
KBudgetView context menu -
KCurrencyEditDlg context menu -
KMyMoneyPriceDlg context menu -
KReportsView context menu -
KForecastView context menu -
KOnlineJobOutboxView context menu
-
-
Provide generic mechanism to create/destroy action objects(abandoned for now) -
Provide general selection mechanism -
Provide general mechanism to update action availability
-