<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
 <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
 <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
 %gtkdocentities;
]>

<refentry id="actions-menus-toolbars-gradual-porting">
<refmeta>
  <refentrytitle>Actions, Menus and Toolbars - Gradual Porting</refentrytitle>
</refmeta>

<refnamediv>
  <refname>Actions, Menus and Toolbars - Gradual Porting</refname>
  <refpurpose>
    Gradually porting away from <link linkend="GtkAction">GtkAction</link> and
    <link linkend="GtkUIManager">GtkUIManager</link>
  </refpurpose>
</refnamediv>

<para>
  Even if you don't want to use libgedit-amtk in the end, libgedit-amtk can help
  to gradually move away from <link linkend="GtkAction">GtkAction</link> and
  <link linkend="GtkUIManager">GtkUIManager</link>.
</para>

<refsect1>
  <title>Moving gradually to <link linkend="GAction">GAction</link></title>
  <para>
    libgedit-amtk provides the following functions that can help:
  </para>
  <itemizedlist>
    <listitem>
      <para>
        <link linkend="amtk-utils-bind-g-action-to-gtk-action">amtk_utils_bind_g_action_to_gtk_action()</link>
      </para>
    </listitem>
    <listitem>
      <para>
        <link linkend="amtk-utils-create-gtk-action">amtk_utils_create_gtk_action()</link>
      </para>
    </listitem>
  </itemizedlist>
</refsect1>

<refsect1>
  <title>Moving gradually away from <link linkend="GtkUIManager">GtkUIManager</link></title>
  <para>
    For example if you have already ported a submenu, but not the whole menu,
    you can use the
    <link linkend="gtk-ui-manager-get-widget">gtk_ui_manager_get_widget()</link>
    function to get a <link linkend="GtkMenuItem">GtkMenuItem</link>, and then
    set the submenu with
    <link linkend="gtk-menu-item-set-submenu">gtk_menu_item_set_submenu()</link>.
  </para>
</refsect1>
</refentry>
