Column configuration in a Family

Hi all,
I’m using version AIO64-5.1.5-1 on Win 10.
I’d like to know if it’s possible to add columns to the family view for the children’s display, such as Death date or spouse name?

1 Like

You can hack the Family Editor to add some columns. There are several posts in the forum where people shared such hacks.

But there is no GUI Customizing feature for the Object Editors that corresponds to the Column Editor. (Which is a feature accessible via the Configure toolbar option for the Views.)

Hi,
Thanks, I’ll look further for the hacks. Did not find them with my first search.

If you look at the Column Editor screen capture, you might note that both the Columns you wanted are options for the People view.

So the source code for the People View should have code you could transcribe to the Family Editor module’s children tab section.

With the leads we’ve isolated in this discussion, perhaps someone (who’s more adept with Python than I am) can be more specific.

Adding the child’s death date to the Children Tab in the Family edit is actually a simple hack.

Edit the program file \gramps\gui\editors\editfamily.py

At line 122, there is a list of columns already coded but not all are enabled.

At line 218 is where the columns are enabled.

    def column_order(self):
        return [(1, 13), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
                (0, 8), (0, 9)]

Add (1, 7) to the list to add the child’s death date.

    def column_order(self):
        return [(1, 13), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),
                (0, 8), (1, 7), (0, 9)]

You can add the Birth Place and Death Place; change (0, 8) and (0, 9) to (1, 8) and (1, 9) but that is a bit much.

Adding the spouse is not in my skill set.

3 Likes

Many thanks for providing this solution. As easy as it sounds, it’s beyond my capacity. I’ll have to train for the skills. All best.

The code files (.py) are text files. Notepad++ is a good option to open and edit them.

On Windows, the file can be found at c:\Program Files\GrampsAIO64-5.1.5\gramps\gui\editors\editfamily.py

Just be aware that the folder will be protected so it takes some more clicks to authorize saving. What I do with a file I am modifying is to save the modified file to the desktop, then rename the existing file by adding _X to protect it. Then I copy the modified file into the folder. You will need to restart Gramps for the change to take effect.

Very important, be very careful not to alter indents in the code files.

1 Like

Took my first stab at it and made the changes. All is good. So simple with great tips. Thanks so much. Cheers!

3 Likes

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