# Views and their program dependencies

**URL:** <https://gramps.discourse.group/t/views-and-their-program-dependencies/4637>\
**Category:** Help\
**Tags:** hacks\
**Created:** [January 8, 2024, 9:30am UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637 "2024-01-08T09:30:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 9:30am UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/1 "2024-01-08T09:30:10Z")

</div>

Apropos of nothing in particular

Whilst in Person View was looking at the Events window and saw the age column which I never have visible usually so thought why do I not just deselect that column and of course you cannot or at least not as far as I can find through Preferences and there is no Configure option. Only age I would require is “Age at Death” and that would be in the form “In the 82nd year of his/her age” as per most UK headstones and thus a rounded up year.

So went onto think about maybe having a go at a little programme hacking but cannot find any information for Views which shows the dependent programs otherwise it is hit and miss looking at hundreds of files in numerous sub folders.

Is there a document I can find somewhere which does list each View and the programs upon which it is dependent.  
Phil  
A program tweaker not programmer  
GRAMPS: 5.1.6  
Python: 3.10.12 (main, Nov 20 2023, 15:14:05)  
BSDDB: 6.2.9 (5, 3, 28)  
sqlite: 3.37.2 (2.6.0)  
LANG: en\_GB.UTF-8  
OS: Linux  
Distribution: 6.2.0-39-generic

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 8, 2024, 11:23am UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/2 "2024-01-08T11:23:53Z")

</div>

> [@comeng](#):
>
> Only age I would require is “Age at Death” and that would be in the form “In the 82nd year of his/her age” as per most UK headstones and thus a rounded up year.

In Preferences you can set the Age precision to Year, Year and Month, or Year Month Day, in Gramps 5.1, When set to Year the age will round up after six months. In 5.2 an added option would have the year age option not round up. It will also add an option to not show the age for any events after death, i.e. Burial, Probate of a will, etc.

> [@comeng](#):
>
> why do I not just deselect that column and of course you cannot or at least not as far as I can find through Preferences

No, you cannot turn age on/off. You could hack the code to remove the age column from the events. If you were to do that, the age at death would only display for the active person in the Relationships view.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 8, 2024, 12:04pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/3 "2024-01-08T12:04:31Z")

</div>

> [@DaveSch](#):
>
> In 5.2 an added option would have the year age option not round up.

Sorry! This is an option that may not make it into 5.2 as it was proposed after the code was sent out to the translators.

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 2:13pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/4 "2024-01-08T14:13:32Z")

</div>

Thanks Dave

Will think about that but the reason I do not use it is for death it  
should round up on day 1 so 81 and 1 day = 82nd year  
Please do not worry about it.  
Phil

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 8, 2024, 3:20pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/5 "2024-01-08T15:20:58Z")

</div>

> [@comeng](#):
>
> it should round up on day 1 so 81 and 1 day = 82nd year

I can show you where in the code that decisions are made. But this would be your hack. Users wanting any change were advocating for no rounding.

Here is the bug discussion and the proposed fix. If nothing else, it points you to the code so you could make a hack for yourself.

[https://gramps-project.org/bugs/view.php?id=12422](https://gramps-project.org/bugs/view.php?id=12422)

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 4:56pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/6 "2024-01-08T16:56:59Z")

</div>

Dave

Thanks very much I was not really looking to see my requirement  
implemented as a standard and well understand/support why people do not  
want rounding so will look at program with interest.

Phil

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 8, 2024, 5:20pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/7 "2024-01-08T17:20:09Z")

</div>

Actually, the discussion was choosing between “round up” and “round down”.

In the US, a person who dies when their 38th birthday would be the next day is still will be listed as age 37. Although an anniversary that near normally gets a mention too.

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 8:50pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/8 "2024-01-08T20:50:54Z")

</div>

Brian

If I have an individual where I have only the Birth and Death  
Registration by Quarter

Say birth bet 22 Nov 1846 and 31 Mar 1847  
and death bet 17 Jun 1898 and 30 Sep 1898

The age at death calculation is pure nonsense as is every event  
throughout the life of the individual.  
So rounding up or down is irrelevant if I really wanted to calculate age  
at death I would have a simple date field in which I entered the value  
thus “approx/circa 85”.  
So for me you could eliminate all age calculations and I would not miss  
them but guess that is not an option  
Phil

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 8, 2024, 9:30pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/9 "2024-01-08T21:30:20Z")

</div>

You might want to read the discussion about Quarter support on GitHub:

> <https://github.com/gramps-project/gramps/pull/1056>
>
> The calendar year can be divided into four quarters, often abbreviated
> as Q1, Q…2, Q3, and Q4. Q1 is 1 January to 31 March, Q2 1 April to
> 30 June, Q3 is 1 July to 30 September and Q4 is 1 October to 31 December
> 
> This commit teaches DateParser to parse quarter dates and represet them
> as a date range. An example quarter date is "Q2 2020" which is converted
> to "between 1 April 2020 and 30 June 2020". This is a one way conversion
> 
> Rationale
> For a user it is much easier to enter a date using quarter notation than the verbose range equivalent. Quarter dates are used for English civil registation indexes.

With the Feb 2022 push, it should be in the upcoming 5.2 release.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 8, 2024, 9:43pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/10 "2024-01-08T21:43:12Z")

</div>

Go to you programs files folder. Edit the file…  
`gramps\gui\editors\displaytabs\eventembedlist.py`

Edit line 202

```
    return ((1, 1), # type
            (1, 0), # description
            (1, 3), # date
            (1, 4), # place
            (1, 6), # main participants
            (1, 12), # private
            (1, 5), # role
            (1, 2), # gramps id
            (1, 10), # age
            )

```

by adding a hashtag (`#`) before the age option.

```
    return ((1, 1), # type
            (1, 0), # description
            (1, 3), # date
            (1, 4), # place
            (1, 6), # main participants
            (1, 12), # private
            (1, 5), # role
            (1, 2), # gramps id
            #(1, 10), # age
            )

```

Save and relaunch Gramps. The age will no longer appear in the event lists. As I said, the age at death (or still alive) will appear for the active person in the relationships view.

Note: You will need to edit the file when the next leases of Gramps come out.

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 10:08pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/11 "2024-01-08T22:08:33Z")

</div>

Brian

Whilst Quarters is a good idea in principle in fact they do not really  
exist as such  
If you look at my previous example you would ask why they do not start  
at the first of the month.  
The answers are as follows in the UK you are allowed 40 days after the  
birth to register the birth therefore I calculate 40 days before the 1st  
day of the Quarter  
Death can occur several days before the end of a quarter and the  
registration delayed to the next quarter for a variety or reasons.  
Christmas/New Year being one of the classics

Phil

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 8, 2024, 10:10pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/12 "2024-01-08T22:10:39Z")

</div>

Thanks Dave  
Will play with that a little.  
Problem is of course documenting all the “fixes” you have done as an  
individual.  
Phil

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [January 8, 2024, 10:18pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/13 "2024-01-08T22:18:52Z")

</div>

For each modification I make I add the comment `#DES_MOD` at the end of the line. I then save a copy of the file in a Modification folder duplicating the folder structure.

I now have a record of the changes I have made for the next release. Just remember that official changes to the code may be made so the next change may not occur on line 202.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [January 8, 2024, 10:26pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/14 "2024-01-08T22:26:02Z")

</div>

> [@comeng](#):
>
> Whilst Quarters is a good idea in principle in fact they do not really  
> exist as such

Just saying it was added. Personally, more of my sources found from the post-Revolutionary War sources in America tend to use ‘seasons’ rather than ‘Quarters’. Not sure whether I will use Quarters either. But… it is there.

Ass for your example:

> [@comeng](#):
>
> Say birth bet 22 Nov 1846 and 31 Mar 1847  
> and death bet _17 Jun 1898_ and _30 Sep 1898_

Ages for each event will be calculated to figure minimums and maximums. So age at death will be a range from the (latest birth to _earliest_ death) and (earliest birth to _latest_ death)

- age of between 51 years, 2 months and 51 years, 10 months

---

<div class="post-metadata">

**Author:** ![comeng](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@comeng](https://gramps.discourse.group/u/comeng)\
**Post date:** [January 9, 2024, 1:43pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/15 "2024-01-09T13:43:06Z")

</div>

Thanks Dave

Done that works as expected.  
I annotate with #PW 01/01/2024 Proven or Test  
Keep mod info on a Document with the file path as a header for that section.  
Phil

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [February 8, 2024, 1:43pm UTC](https://gramps.discourse.group/t/views-and-their-program-dependencies/4637/16 "2024-02-08T13:43:16Z")

</div>

Closed on February 8, 2024, 1:43pm UTC

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