It is a tedious process to replace those built-ins in the sidebars of all categories after an update to Gramps, a reset to defaults or the clearing of the gramps sidebar.ini files. This means that fewer users switch over to the more capable gramplets and increases the chance the enhanced version will disappear in the future.
Could those Gramplets use a different plug-in type to supplant the Filters built-in call?
Alternately, what scriptable Python function could be used to swap one Gramplet for another⌠instead of using the GUI to do it manually?
Another option would be to target replacing the built-in Filter gramplets for the 5.3 release.
Kari has suggested layout improvement patches by anyone with Glade experience would be welcome. He wants to concentrate on adding functionality, rather than exploring the Gramps UI style guide and Glade layout in English.
So repositioning the Define filter button and âElapsed timeâ performance counter onto the line with Find and ⎪Reset buttons might make sense. (And give an opportunity to have more separation between the most frequently used (Find) and most perilous (⎪Reset) buttons.
Both the Filter and Filter+ gramplets only have a Help button when undocked from the Sidebar. Since both the âCustom Filterâ and âUse regular expressionsâ are complex enough to have enormous need for easy access to help. Hotlinks on the feature labels might be an option.
(A RegEx help will be useful for anyone who doesnât use the feature often enough to remember the correct syntax to search for âEmptyâ or ânot emptyâ. A complete exploration of RegEx is beyond the scope of our wiki. But an improved introduction with pointers to complete references and a few common samples is reasonable.)
I looked through the Sphinx-based developer docs and didnât really see a way either. (But that doesnât mean much. I have problems following that documentation format.)
I was thinking that there might be a way to walk through the Preferences for each Category looking for Filter gramplets and, if found, check for a Filter+ in that category and swap it in.
An example would be useful for other projects to manipulate gramplet sets too. (I was thinking of a script to do several dashboard sets or to select between a Novice set of preferences and an Expert set.
That seems like the most straightforward decision.
Would it require rolling in the âGeneric <object> filterâ set of Rules too? Are they needed for scraping the parameters? From the GUI, it looks like scraping just needs the standard Custom Filter and built-in rules.
(Should those Generics be named as Rules rather than Filters?)
Iâm not entirely sure if this is what you mean, but my forms gramplet settings addon Iâve been developing builds a bunch of interfaces from template files on launch. To switch between them I have been using a gtk.Stack() object whose visible child is determined by a selection from a treeview object.
Thatâs very interesting for interactively showing and hiding interface items within a gramplet.
But I was thinking more about the organization of the Gramplet sets in the splitbars (sidebar and bottombars of the various View modes of the Categories) and the Dashboard rather than the features of the Gramplets themselves. Given that there are 13 Categories and 5 of those have multiple view modes, there are too many Configurations to manage efficiently with a manual process.
As an example, there are about 23 separate view mode sidebars which default to having category-specific instances of the Filter gramplet. (More when you start installing add-on view modes.) Each has a separate _sidebar.ini config file once the view mode has been active.
And when trying to manipulate the GUI, it is preferable to stay within the gramps.gui module and leverage the callback methodsâs handling of signals.
The Filter+ addon used some kind of âmonkey-patchingâ. Therefore I thought it is better to implement this in a âproperâ way by making the corresponding changes to Gramps main code, mainly to gramps.gui.filters.sidebar.SidebarFilter.
Note that this my first PR ever - let me know if there are any issues.
The following quote from the PR#1721 comments describes the changes:
This is an enhanced version of the Filter gramplet. The enhancements are:
The elapsed time is displayed.
A new âDefine filterâ button that opens a filter editor dialog and automatically populates it with the rules that correspond to values given in the gramplet.
The person filter has two new fields: Birth place and Death place
The default confidence value in the Citation filter is âVery lowâ.
Place filter: An error message is displayed if the user fills in the âWithinâ value but no place is active
I just discovered an oddity in the add-on Filter+ for the People categoryâs flat list view mode. The Birth date and Death date fields have a validation error red border and non-functional âxâ button when the field is blank.
The Grouped view mode for Filter+ (and the original Filter gramplets) only have the red border and (still non-functional) âxâ button when the field is non-blank with an unparsable date text.
Does this occur the 5.3 Filter that has the Filter+ features addition?
The error coloring is created by your theme. i.e. red border verses red lettering or a full red box. I am currently using YaruOK. My theme adds a red circle on error where you are showing the X.