Editor dialogs not remembering table spacing

I am not sure which list you are referencing but since you mention the Source Title I will make these assumptions.

All files are in the Gramps program code folder. Edit…

\gramps\gui\selectors\selectcitation.py at line 69

def get_column_titles(self):
    return [
        (_('Source: Title or Citation: Volume/Page'), 350, BaseSelector.TEXT, 0),
        (_('ID'),     75, BaseSelector.TEXT, 1),
        (_('Last Change'), 150, BaseSelector.TEXT, 6),
        ]

To increase Source: Title…. change the 350 to maybe 450

Likewise, you may want to edit…

\gramps\gui\selectors\selectsource.py at line 64

def get_column_titles(self):
    return [
        (_('Title'), 350, BaseSelector.TEXT, 0),
        (_('Author'), 200, BaseSelector.TEXT, 2),
        (_('ID'), 75, BaseSelector.TEXT, 1),
        (_('Last Change'), 150, BaseSelector.TEXT, 7),
        ]

To change the column widths of the Tab that display the list of Citations, edit…

\gramps\gui\editors\displaytabs\citationembedlist.py at line 79

_column_names = [
    (_('Title'),   0, 200, TEXT_COL, -1, None),
    (_('Author'),  1, 125, TEXT_COL, -1, None),
    (_('Page'),    2, 100, TEXT_COL, -1, None),
    (_('ID'),      3,  75, TEXT_COL, -1, None),
    (_('Private'), 4,  30, ICON_COL, -1, 'gramps-lock')
]

Some pointers…

The program folders are protected so you will need to edit with administrator rights.

When the next version of Gramps comes out, you will need to make these changes again. The main code will not change column sizes based upon display size considerations. So you need to give yourself a way to remember any changes to the code you make.

When editing the code, make sure to not alter indents. They are important.

2 Likes