Document <accelerator> element

2007-07-09  Johan Dahlin <jdahlin@async.com.br>

       * gtk/tmpl/gtkactiongroup.sgml: Document <accelerator> element


svn path=/trunk/; revision=18409
This commit is contained in:
Johan Dahlin
2007-07-09 13:41:13 +00:00
committed by Johan Dahlin
parent 83b5d32aef
commit 5f539194f8
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2007-07-09 Johan Dahlin,,, <jdahlin@lozenge>
* gtk/tmpl/gtkactiongroup.sgml: Document <accelerator> element
Mon Jul 9 10:32:39 2007 Tim Janik <timj@imendio.com>
* gdk/tmpl/threads.sgml: applied docu clarification patch from Bjoern

View File

@ -38,6 +38,28 @@ GtkAction objects as &lt;child&gt; elements in UI definitions.
Note that it is probably more common to define actions and action groups
in the code, since they are directly related to what the code can do.
</para>
<para>
The GtkActionGroup implementation of the GtkBuildable interface supports a
custom &lt;accelerator&gt; element, which has attributes named key and
modifiers and allows to specify accelerators. This is similar to the
&lt;accelerator&gt; element of GtkWidget, the main difference is that
it doesn't allow you to specify a signal.
</para>
<example>
<title>A <structname>GtkDialog</structname> UI definition fragment.</title>
<programlisting><![CDATA[
<object class="GtkActionGroup" id="actiongroup">
<child>
<object class="GtkAction" id="About">
<property name="name">About</property>
<property name="stock_id">gtk-about</property>
<signal handler="about_activate" name="activate"/>
</object>
<accelerator key="F1" modifiers="GDK_CONTROL_MASK | GDK_SHIFT_MASK"/>
</child>
</object>
]]></programlisting>
</example>
</refsect2>
<!-- ##### SECTION See_Also ##### -->