Add dropdown to the "Person reference editor" page the same as for Attributes

I have to add hundreds of godfathers/godmothers/god sons/god daughters/witnesses. Each time I have type the same phrases when add new associations. Is it possible make here dropdown with some default/custom list (like in attributes)?

The answer is here: Four questions-ideas (Associations, tags, hotkeys, copy'n'paste support) - maybe it is possible to fix? - #4 by emyoulation

If you really want to hack the code (insert appropriate warnings and need for a backup before proceeding),

Edit the file personrefembedlist.py . Below is a diff for changing Godfather to Godparent:

diff -c personrefembedlist.*
*** personrefembedlist.orig
--- personrefembedlist.py	
***************
*** 135,141 ****
          from .. import EditPersonRef
          try:
              ref = PersonRef()
!             ref.rel = _('Godfather')
              EditPersonRef(
                  self.dbstate, self.uistate, self.track,
                  ref, self.add_callback)
--- 135,141 ----
          from .. import EditPersonRef
          try:
              ref = PersonRef()
!             ref.rel = _('Godparent')
              EditPersonRef(
                  self.dbstate, self.uistate, self.track,
                  ref, self.add_callback)

on a Mac, the directory for this file is

/Applications/Gramps.app/Contents/Resources/lib/python3.6/site-packages/gramps/gui/editors/displaytabs

2 Likes

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