대부분의 그놈 프로그램에는 프로그램 메뉴가 있습니다.
동작 목록에
private const GLib.ActionEntry action_entries[] = {
{ "help", on_help },
{ "about", on_about },
{ "quit", on_quit }
};
add_action_entries (action_entries, my_Gtk_Application);
프로그램 메뉴에
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);
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);
}
}
"help:applicationname/index#sectionid"
코드를 활용하십시오.