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:

committed by
Johan Dahlin

parent
83b5d32aef
commit
5f539194f8
@ -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
|
||||
|
@ -38,6 +38,28 @@ GtkAction objects as <child> 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 <accelerator> element, which has attributes named key and
|
||||
modifiers and allows to specify accelerators. This is similar to the
|
||||
<accelerator> 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 ##### -->
|
||||
|
Reference in New Issue
Block a user