Most GNOME applications should have an application menu. The
This example, based on
Add the
private const GLib.ActionEntry action_entries[] = {
{ "help", on_help },
{ "about", on_about },
{ "quit", on_quit }
};
add_action_entries (action_entries, my_Gtk_Application);
Add the
var menu = new GLib.Menu ();
var section = new GLib.Menu ();
var item = new GLib.MenuItem (_("_Help"), "app.help");
item.set_attribute ("accel", "s", "F1");
section.append_item (item);
View the help with
private void on_help ()
{
var screen = main_window.get_screen ();
try
{
Gtk.show_uri (screen, "help:cheese", Gtk.get_current_event_time ());
}
catch (Error err)
{
message ("Error opening help: %s", err.message);
}
}
To link to a section on the "help:applicationname/index#sectionid"
.