16,736
edits
Changes
no edit summary
{{GEPS-Finished}}
{{man menu|Implemented for the release of Gramps 5.1}}
Goal: Rewrite UIManager code to avoid using deprecated methods
=== Proposals ===
A new Gramps UIManager class, singleton, which operates the main menu and toolbar, making appropriate changes for different views, modes etc.
A new Gramps ActionGroup class which tracks the items in an action group and its name. At the moment, this doesn't have any methods, other than __init__, the UIManager contains all the code that operates on this class.
Following are the headers for these proposed Classes/methods. These should be regarded as preliminary, subject to change as coding develops.
@param prefix: the prefix used by this group. If not provided, 'win'
is assumed.
"""
def add_actions(self, actionlist):
""" Add a list of actions to the current list
@type actionlist: list
@param actionlist: the list of actions to add
"""
=== Comments ===
The StyledTextEditor used Gtk.UIManager etc. to implement its toolbar and menu. I expect it is easier to This was re-code this coded to use the new Gtk.Builder methods directly, rather than generalizing the proposed Gramps UIManager class to handle multiple instances on different Windows. The ActionGroup methods of the new Gramps UIManager class were generalized to allow use with different windows (including the StyledTextEditor).
The EditPrimary and EditPerson classes used Gtk.UIManager etc. to implement its popup menu. I expect it is easier to This was re-code this coded to use the new Gtk.Builder methods directly, rather than generalizing the proposed Gramps UIManager class to handle multiple instances on different Windows.
[[Category:GEPS|M]]