4122: feature request: have Relationship View optionally show divorces

svn: r16108
This commit is contained in:
Doug Blank
2010-11-02 11:45:49 +00:00
parent 185718f44c
commit 02db3c69af
2 changed files with 12 additions and 6 deletions

View File

@@ -253,6 +253,12 @@ class EventType(GrampsType):
"""
return self.value == self.DIVORCE
def is_relationship_event(self):
"""
Returns True is EventType is a relationship type event.
"""
return self.value in [self.DIVORCE, self.MARRIAGE, self.ANNULMENT]
def is_type(self, event_name):
"""
Returns True if EventType has name EVENT_NAME, False otherwise.