<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" style="task" id="dev-help-appmenu" lang="ko">

  <info>
    <link type="seealso" xref="dev-help"/>
    <revision version="0.1" date="2013-06-19" status="review"/>

    <credit type="author copyright">
      <name>Radina Matic</name>
      <email its:translate="no">radina.matic@gmail.com</email>
      <years>2013</years>
    </credit>
    <credit type="editor">
      <name>Ekaterina Gerasimova</name>
      <email its:translate="no">kittykat3756@gmail.com</email>
      <years>2013</years>
    </credit>

    <license xmlns="http://projectmallard.org/1.0/" href="http://creativecommons.org/licenses/by-sa/3.0/us/">
<p>This work is licensed under a
<link href="http://creativecommons.org/licenses/by-sa/3.0/us/">Creative Commons
Attribution-Share Alike 3.0 United States License</link>.</p>
<p>특별히 예외적으로, 이 문서의 예제 코드는 저작권자에 명시한 대로 어떠한 제한 없이 원하는 대로 복제, 수정, 배포할 수 있습니다.</p>
</license>

  <credit type="translator copyright"><name>조성호</name><email>shcho@gnome.org</email><years>2016, 2017, 2018.</years></credit></info>

  <title>프로그램 메뉴에 <gui>도움말</gui> 추가</title>

  <links type="series" style="floatend">
    <title>도움말 설정</title>
  </links>

  <p>대부분의 그놈 프로그램에는 프로그램 메뉴가 있습니다. <gui style="menuitem">도움말</gui> 메뉴 항목은 <gui style="menuitem">정보</gui> 메뉴 항목에 있어야합니다.</p>

  <example>
  <note>
    <p>This example, based on
    <app href="https://gitlab.gnome.org/GNOME/cheese/blob/master/src/cheese-main.vala">Cheese</app>,
    assumes that your application is written in Vala. It will be slightly
    different for other programming languages.</p>
  </note>

  <p>동작 목록에 <gui style="menuitem">도움말</gui> 항목을 추가하십시오:</p>
  <code>
   private const GLib.ActionEntry action_entries[] = {
        <input>{ "help", on_help },</input>
        { "about", on_about },
        { "quit", on_quit }
    };

   add_action_entries (action_entries, my_Gtk_Application);
</code>

  <p>프로그램 메뉴에 <gui style="menuitem">도움말</gui> 메뉴를 추가하십시오:</p>

<code>
  var menu = new GLib.Menu ();
  var section = new GLib.Menu ();

  <input>var item = new GLib.MenuItem (_("_Help"), "app.help");
  item.set_attribute ("accel", "s", "F1");
  section.append_item (item);</input>
</code>

  <p><gui style="menuitem">도움말</gui> 메뉴 항목을 누르면 <app>Yelp</app> 프로그램으로 도움말을 표시합니다:</p>

<code>
  private void on_help ()
  {
    var screen = main_window.get_screen ();
    try
    {
      Gtk.show_uri (screen, <input>"help:cheese"</input>, Gtk.get_current_event_time ());
    }
    catch (Error err)
    {
      message ("Error opening help: %s", err.message);
    }
  }
</code>

  <p><file>index.page</file> 파일의 섹션을 연결하려면 <code>"help:<input>applicationname</input>/index#<input>sectionid</input>"</code> 코드를 활용하십시오.</p>

  </example>
</page>
