Modifying the columns on the tab of an Object Editor

A while back I was encouraged by some success (with Dave’s help) in figuring out how to tweak the Address tab in the Person Editor to include 2 missing columns. And Paul rolled the change into the 5.2 roadmap. (Thanks @DaveSch & @prculley !)

But that tab was straight-forward because it exists in only one place in the whole program. If I need to add column to a tab that repeats for every Object Editor, will I need to tweak a multitude of files? Or does Python reference reusable snippets for these tabs… so changing in one place would cascade throughout Gramps.

I did a bit of looking but quickly became disoriented. I’d like to try again and would appreciate being pointed in the right direction.

I need to see Volume/Page & Date columns Source Citation tabs of object editors.

Reasoning: For Newspaper periodicals, there may be a dozen lines that would look like they are the same citation. But they are on different dates. e.g.: birth notice, engagement notice, social event reports, current event activities, marriage notice, an accident report, death notice funeral notice, memorial, probate notice, 3 estate public notices to creditors. Or a person might be mentioned on multiple pages in a published genealogy book. e.g.: as a child in his parents’ listing, in his detailed biography, as a participant on other pages.

( Gramps 5.1.3-2 and Win10)

Try this:

1 Like

Thank you. I had not used the built-in Citations gramplet, relying instead on the Citations tabs in the object editors.

Your patch has the advantage of being in a single module.

It gives me some reference points for what modifications will be needed for the individual tabs. But it highlights the need to explore what is necessary to hack Gramps when learning to refine the Tab columns.

The patch I did to the Address tab was the most simple case… a Tab that exists only in one place in the code and which required no additional imported Gramps modules.

I don’t know if the additional date related modules would bog down the Citations Tab or require that code be added to every Object Editor individually.

The discussion in this 5.2 Pull Request (“citations gramplet: add date, page, confidence”) covers adding the same columns to the Citations tabs of Object Editors.

It addresses common issues of:

  • date columns sorting on the formatted text of the date instead of value (where the A of April dates makes them sort before the rest of the months)
  • tradeoff in default column widths to stay within the 800x600 guideline