Experimental FilterParams add-on, Dark themes and Glade

If you can add Kari’s experimental FilterParams addon, you can walk through all the Custom Filters in all the Categories without all the hassles. [ FilterParams ReadMe.md ]

You can delete filters, run (interruptible) tests, simultaneously change parameters in multi-rule filters… it’s worth the manual download & install.

do a lot more maintenance on custom filters

1 Like

I am just beginning to experiment with filters. have not had much need of them, but I will keep this in mind!

Let’s say you set up a custom filter that has 3 rules: find all direct ancestors to 4 generations, find all descendants, find everyone within 2 degrees of separation of that same focal person.

And it works just the way you hoped.

But then you want to look at the same relatives originating from a different person and 5 generations of those ancestors.

You could use the standard editor and drill down through all those rules and carefully tweak each one. (Which means remember which category, switching to that view, enabling the Gramplet sidebar, switching to the filter view, navigating to the filter Gramplet, switching to the right custom filter, hitting Edit, double-click on each of the 3 rules in turn, navigate a selection dialog for each of those rules, remember to change the ancestors generator count. And be worry you missed a setting. and then FINALLY you can run the filter.

But… if you use the FilterParams tool, you can do all that from a single form. And change the focal person in all 3 rules by changing 1 ID field.

It is FAR less complex.

1 Like

sounds great actually, But I am not great at installing things manually for GRAMPS. I think this one sounds good enough to give it a try and there seem to be clear direction on how to incorporate it, sooo…wish me luck, LOL

1 Like

Guess I did something wrong…

Screenshot 2021-12-06 233357
It doesn’t seem to be usuable

There are 3 files:

  • filterparams.glade
  • FilterParams.gpr.py
  • FilterParams.py

I think you missed the “glade” file

But I don’t use a Dark Theme. Might be an interaction there that hides stuff.

1 Like

I have all three files now, but, now I just get an error. How do I put all three in plug in file, all three seperate or combine to one file or???

The above is for a Windows box. After changing anything in your installation, delete the _pycache_ folder. That causes a rebuild in that particular module the next time Gramps starts.

No Luck, Bed time, will have to try again tomorrow. Thanks for your help!!!

1 Like

When you try again, perhaps you can start the icon to start Gramps from the console? Then copy&paste any error messages.

(There will be some that are red herrings. If has some default messages about the dummy.db being closed from the Tree loading cycle.)

I am embarrassed to admit, I don’t know what you mean. I start Gramps using desktop icon. I downloaded the files from the provided link (3 of them, I always have trouble trying to find where to actually click to get to the page that has the zip download!). All three downloads seem to have the same things in them except one did not have the .glade file. There are many more things in those downloads than what shows in your screenshot. I swear, I LOVE Gramps, it shows so many more things than any of my other tree programs, but I have been a user for multiple years and it just seems to get harder. It has such an intense learning curve to begin with, and any extras take more knowledge than I understand. :slightly_frowning_face:

I am not sure how to proceed with trying to get this filterparam to work

I had hoped to include a nice wiki link of how to start Gramps via the Console (command line interface) when posting that question. Unfortunately, I couldn’t find one and the wiki is locked while the CMS is being services. (So I cannot create such a link.)

I took a chance that you might have used the Console before. Was worth a shot!

Since you are in Windows, click the Start menu and type “Gramps”. The OS will search for matches and (eventually) show two versions of the Gramps Application icon. The one that has a black box inset in the lower left will launch Gramps from a console window. The Gramps windows appear as normal except there is a separate text windows where Gramps routes all diagnostic messages during the session.

Right-click in the window lets you use a menu choice “mark” a chunk of text with dragSelect which pushes it to the OS clipboard.

WARNING! clicking the close gadget on this Console window kills the Gramps task without cleanly shutting down the database engine. Quitting Gramps normally will cause the Console to close after the normal housekeeping is done.

I am pushing you out of your comfort zone with installing an add-on manually. Gramps has been getting easier & easier to do installs of public releases. But this is a semi-private GitHub offering … so there’s no automation yet.

Still, learning this new skill will serve you well.

Often the important (but not critical) patches wait to be bundled into a public release. But if you need it before a year passes, learning to patch is necessary. (Plus if someone patches a report for you, you’ll want to be able to try it!) For instance, 5.1.4 introduced a bug in data-entry for GPS coordinates. It was found instantly and is pretty darned important. But, 4 months later, only Gramps users who know how to patch can use that particular data-entry field.

It isn’t that Gramps is getting more difficult, you’re using more feature and wanting to do more intricate tasks. (Using the Searchbar is sadly. The filter Gramplet is a bit more complex. Setting up a rule in Custom Filter is tougher yet. Let’s not even talk about RegEx, boolean options for combining rules, multi-stage filters, SuperTool scripts… well, its like starting with elementary math’s addition/subtraction and advancing towards calculus with differential equations! A bit more math is always useful but can be challenging.

ok, I did as instructed. the only time I get error messages is if I try to put all three downloaded files in the plugin file, then I get this

“4664: ERROR: tool.py: line 257: Failed to start tool.
Traceback (most recent call last):
File “C:\Program Files\GrampsAIO64-5.1.4\gramps\gui\plug\tool.py”, line 253, in gui_tool
callback = callback)
File “C:\Users\user\AppData\Roaming\gramps\gramps51\plugins\gramps-cb30f9ba40b547a8ab7de3134c334e678ae2ae80\addons\FilterParams\FilterParams.py”, line 146, in init
self.dialog = self.create_gui()
File “C:\Users\user\AppData\Roaming\gramps\gramps51\plugins\gramps-cb30f9ba40b547a8ab7de3134c334e678ae2ae80\addons\FilterParams\FilterParams.py”, line 176, in create_gui
glade = Glade(toplevel=‘dialog1’)
File “C:\Program Files\GrampsAIO64-5.1.4\gramps\gui\glade.py”, line 150, in init
self.add_objects_from_string(data, loadlist)
File “AIO/gi/overrides/Gtk.py”, line 472, in add_objects_from_string
GLib.GError: gtk-builder-error-quark: .:5:1 Required gtk+ version 3.20, current version is 3.18 (7)”

other than that, I just get the screenshot from last night

and yes, WAY out of my comfort zone, but I am trying! :slight_smile:

1 Like

Ok that a real problem and we’ll probably have to ask Kari ( @kku ) about what that means.

(I need to look at the source too. What you said once posting about combining files worries me.)

wow, ok, in the mean time, I am taking the files back out. everything seems to be ok when i do that.

OK, I got it to work, It was the dark variant!!! I’ll just have to turn that off when I want to use the tool! The first file I downloaded actually worked, for some reason I glossed over when the dark variant was mentioned. That was the culprit!!!

He coded the glade file so it requires Gtk version 3.20 or higher. The AIO is using 3.18 and Gramps policy for 5.1.x versions is 3.12 or higher. [Kari corrected “Required Gtk version!” on 7 Dec 2021]

2 Likes

2 posts were merged into an existing topic: Modifying Themes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.