I am trying to create my own gtk3 application. I like to use mallard to display some help about how to use my application. However I do not know how to code such that when the help menu item is clicked the help (mallard) is shown. I have the .page files already ready.
Please note, I am not asking how to create help files using mallard. But rather how to integrate mallard into my gtk3 help.
Good question. In cases like this, I always look on git.gnome.org to see how Gedit does it. That's an excellent 'example' application.
First, look here at how they organize their help files:
help
\--C
| \--*.page
\--Makefile.am
\--ar
\--bg
\--ca
\--...other languages...
In help/Makefile.am
, they use @YELP_HELP_RULES@
to install the files (which is set up by YELP_HELP_INIT
in configure.ac
.)
Then, when the user clicks Help/Contents, they open the URI help:gedit
or help:gedit/link_id
with gtk_show_uri()
(see here, in the functions gedit_app_show_help_impl()
and gedit_app_help_link_id_impl()
) The files are then, presumably, automatically fetched by the desktop help system, translated into the proper language, and displayed in Yelp.