About "Modifying the columns on the tab of an Object Editor "

Not really an answer but rather a question as to whether what I think is the right solution, if a Gramps developer can give their opinion. So I create this new post to not pollute @emyoulation 's one.

I haven’t been a developer for decades but still enjoy it. I have seen many tutorials and moocs on Python programming and have tried this a few times. Considering the logic of Gramps and Python before it I guess there is only one definition that codes how to display citations in all editors that need/use it.

I guess it’s described in a method defined in a class. Class and method that should be redefined, in order to inherit the Gramps class which allows display by a new personal class which displays the additional fields, in an additional python code by adding the fields that we want to add in display everywhere where the method is used, based on George’s previous guidance.

Something like a new python file in the plugins directory looking like this:

import some_citations_class_definition_module which includes some citations_class class and display_citations method,

class my_new_citations_class(citations_class):
def display_citations … to override the regular one with additional George’s related code.

Is what I think is correct? Would that work?

And is there a documentation to know what are class, methods, and objects names, where to find them, etc in gramps ?

2 Likes

Well… Serge’s ( @SNoiraud ) pull request now documents (by example) how the Citations tab is implemented modularly. :tada:

Thanks Serge! (On to doing ‘use’ tests!)

2 Likes

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