So I looked at and downloaded your code for a quick test. I note that you uploaded to the addon-source repo at the ‘gramps51’ branch. This is different than the ‘maintenance/gramps51’ branch which is what gets released to users. Which allows us to continue making a PR using that branch if you prefer rather than uploading to your own Github account and creating the PR.
I suggest that you go to Github, addons-source repo web page.
Select the ‘gramps51’ branch in the branch selection box near the top on the left.
Select the ‘Contribute’ button on the next bar down and open a Pull Request.
On the PR page, change the ‘base’ to ‘maintanence/gramps51’.
The red "Cannot automatically merge’ should change to ‘Able to merge’ and the sections below should show your code commits and files.
If you are satisfied with what you see, hit the green ‘Create Pull Request’ button.
At that point developers like me can review your PR and make comments against it which will appear in your email; assuming you have given Github your correct email address. And new commits pushed to the branch will automatically appear on the PR page for further review.
That said, I got a few warnings when I tried out your code:
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\cosanguinuity.py:337: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\cosanguinuity.py:341: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
pedigree_button = Gtk.Button(MSG_SHOW_PEDIGREES)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\cosanguinuity.py:337: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\cosanguinuity.py:1247: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
copy_button = Gtk.Button(MSG_COPY_TO_CLIPBOARD)
C:\Users\prc\AppData\Roaming\gramps\gramps51\plugins\Cosanguinuity\cosanguinuity.py:1251: PyGTKDeprecationWarning: Using positional arguments with the GObject constructor has been deprecated. Please specify keyword(s) for "label" or use a class specific constructor. See: https://wiki.gnome.org/PyGObject/InitializerDeprecations
close_button = Gtk.Button(MSG_CLOSE)
I also got an error when I tried to click on a highlighted person. In example.gramps tree, I0044 person active, single pane mode, I clicked on Martell, Luella…
(python3.exe:11308): Gtk-WARNING **: Unable to show 'P FOUJQC7PMC15VC4P0I': Error when getting information for file �C:\Users\prc\workspace\GrampsM\main\P FOUJQC7PMC15VC4P0I�: No such file or directory
I did not try to debug this.
Do you know if there is a place in the example.gramps tree that can showcase your Gramplet? My own tree doesn’t have any obvious situations to examine.
That said, I did not spot any obvious other quick error situations; so good work!
In my IDE (Eclipse/Pydev) there is an automatic PEP8/Pylint function when you look at the code. Your code has a large number of whitespace errors and some line length errors. It would be a good idea if at some point you would clean these up. We try to maintain a Pylint score of 90% or better for new code submissions to Gramps core, and while addons are not so restrictive, it is good to try for that score there as well.
Enough for now…