| 1 |
<?xml version="1.0"?> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" |
| 4 |
[ |
| 5 |
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> |
| 6 |
<!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent"> |
| 7 |
%gtkdocentities; |
| 8 |
]> |
| 9 |
|
| 10 |
<refentry id="actions-menus-toolbars-gradual-porting"> |
| 11 |
<refmeta> |
| 12 |
<refentrytitle>Actions, Menus and Toolbars - Gradual Porting</refentrytitle> |
| 13 |
</refmeta> |
| 14 |
|
| 15 |
<refnamediv> |
| 16 |
<refname>Actions, Menus and Toolbars - Gradual Porting</refname> |
| 17 |
<refpurpose> |
| 18 |
Gradually porting away from <link linkend="GtkAction">GtkAction</link> and |
| 19 |
<link linkend="GtkUIManager">GtkUIManager</link> |
| 20 |
</refpurpose> |
| 21 |
</refnamediv> |
| 22 |
|
| 23 |
<para> |
| 24 |
Even if you don't want to use libgedit-amtk in the end, libgedit-amtk can help |
| 25 |
to gradually move away from <link linkend="GtkAction">GtkAction</link> and |
| 26 |
<link linkend="GtkUIManager">GtkUIManager</link>. |
| 27 |
</para> |
| 28 |
|
| 29 |
<refsect1> |
| 30 |
<title>Moving gradually to <link linkend="GAction">GAction</link></title> |
| 31 |
<para> |
| 32 |
libgedit-amtk provides the following functions that can help: |
| 33 |
</para> |
| 34 |
<itemizedlist> |
| 35 |
<listitem> |
| 36 |
<para> |
| 37 |
<link linkend="amtk-utils-bind-g-action-to-gtk-action">amtk_utils_bind_g_action_to_gtk_action()</link> |
| 38 |
</para> |
| 39 |
</listitem> |
| 40 |
<listitem> |
| 41 |
<para> |
| 42 |
<link linkend="amtk-utils-create-gtk-action">amtk_utils_create_gtk_action()</link> |
| 43 |
</para> |
| 44 |
</listitem> |
| 45 |
</itemizedlist> |
| 46 |
</refsect1> |
| 47 |
|
| 48 |
<refsect1> |
| 49 |
<title>Moving gradually away from <link linkend="GtkUIManager">GtkUIManager</link></title> |
| 50 |
<para> |
| 51 |
For example if you have already ported a submenu, but not the whole menu, |
| 52 |
you can use the |
| 53 |
<link linkend="gtk-ui-manager-get-widget">gtk_ui_manager_get_widget()</link> |
| 54 |
function to get a <link linkend="GtkMenuItem">GtkMenuItem</link>, and then |
| 55 |
set the submenu with |
| 56 |
<link linkend="gtk-menu-item-set-submenu">gtk_menu_item_set_submenu()</link>. |
| 57 |
</para> |
| 58 |
</refsect1> |
| 59 |
</refentry> |