Changes

Jump to: navigation, search

Gramplets

885 bytes added, 17:48, 28 September 2020
m
Hello World, with Class: change help_url example to something less ambiguous
description = _("a program that says 'Hello World'"),
version="0.0.1",
gramps_target_version="5.01",
status = STABLE,
fname="HelloWorld2.py",
gramplet = 'HelloWorldGramplet',
gramplet_title=_("Sample Gramplet"),
help_url="Sample Gramplet5.1_Addons#Addon_List"
)
</pre>
* '''status''': STABLE or UNSTABLE
* '''version''': a string with 2 dots (such as "1.23.14") representing the version number
* '''gramps_target_version''': a string with 2 dots representing the version of Gramps that for which this gramplet was written . Only gramplets matching the installed version will be available forinstallation. * '''help_url''': the title of the wiki page that describes the gramplet. <br />If the help_url starts with <code>http://</code> then that fully qualified URL will be used as is. Otherwise, the paths will be interpreted as relative to <code>http&#58;//gramps-project.org/wiki/index.php?title=</code> base URL. The base URL will be prepended to the '''help_url''' and may get a language extension (such as <code>/nl</code> ) appended at the end, if the operating language is one of '''nl''' '''fr''' '''sq''' '''mk''' '''de''' '''fi''' '''ru''' '''sk'''. You should '''''not''''' use the <code>_(</code> <code>)</code> translate function around the '''help_url''' string, unless you specifically intend to create web pages named with the translated string.
At the bare minimum, you need to have the above 10 options when registering your Gramplets.
* '''add_option(OPTION)'''
** OPTION is one of the menu optionsin [https://github.com/gramps-project/gramps/tree/master/gramps/gen/plug/menu gramps/gen/plug/menu] eg:
*** NumberOption
*** EnumeratedListOption
*** NoteOption
*** MediaOption
*** see [https://github.com/gramps-project/gramps/tree/master/gramps/gen/plug/menu gramps/gen/plug/menu] for othersPersonListOption*** PlaceListOption*** SurnameColorOption*** DestinationOption*** StyleOption*** BooleanListOption
* '''build_options()'''
* '''save_options()'''
4,600
edits

Navigation menu