/usr/share/doc/python-gtk2-tutorial/html/sec-WidgetAccelerators.html is in python-gtk2-tutorial 2.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>18.3. Widget Accelerators</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="up" href="ch-SettingWidgetAttributes.html" title="Chapter 18. Setting Widget Attributes"><link rel="previous" href="sec-WidgetDisplayMethods.html" title="18.2. Widget Display Methods"><link rel="next" href="sec-WidgetNameMethods.html" title="18.4. Widget Name Methods"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">18.3. Widget Accelerators</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-WidgetDisplayMethods.html">Prev</a> </td><th width="60%" align="center">Chapter 18. Setting Widget Attributes</th><td width="20%" align="right"> <a accesskey="n" href="sec-WidgetNameMethods.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-WidgetAccelerators"></a>18.3. Widget Accelerators</h2></div></div><div></div></div><p>The following methods:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
widget.add_accelerator(<b class="parameter"><tt>accel_signal</tt></b>, <b class="parameter"><tt>accel_group</tt></b>, <b class="parameter"><tt>accel_key</tt></b>, <b class="parameter"><tt>accel_mods</tt></b>, <b class="parameter"><tt>accel_flags</tt></b>)
widget.remove_accelerator(<b class="parameter"><tt>accel_group</tt></b>, <b class="parameter"><tt>accel_key</tt></b>, <b class="parameter"><tt>accel_mods</tt></b>)
</pre></td></tr></table><p>add and remove accelerators from a
<tt class="classname">gtk.AcceleratorGroup</tt> that must be attached to the top
level widget to handle the accelerators.</p><p>The <i class="parameter"><tt>accel_signal</tt></i> is a signal that is valid
for the <i class="parameter"><tt>widget</tt></i> to emit.</p><p>The <i class="parameter"><tt>accel_key</tt></i> is a keyboard key to use as the
accelerator.</p><p>The <i class="parameter"><tt>accel_mods</tt></i> are modifiers to add to the
<i class="parameter"><tt>accel_key</tt></i> (e.g. <span><b class="keycap">Shift</b></span>,
<span><b class="keycap">Control</b></span>, etc.):</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
SHIFT_MASK
LOCK_MASK
CONTROL_MASK
MOD1_MASK
MOD2_MASK
MOD3_MASK
MOD4_MASK
MOD5_MASK
BUTTON1_MASK
BUTTON2_MASK
BUTTON3_MASK
BUTTON4_MASK
BUTTON5_MASK
RELEASE_MASK
</pre></td></tr></table><p>The <i class="parameter"><tt>accel_flags</tt></i> set options about how the
accelerator information is displayed. Valid values are:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
ACCEL_VISIBLE # display the accelerator key in the widget display
ACCEL_LOCKED # do not allow the accelerator display to change
</pre></td></tr></table><p>An accelerator group is created by the function:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
accel_group = gtk.AccelGroup()
</pre></td></tr></table><p>The <i class="parameter"><tt>accel_group</tt></i> is attached to a top level
widget with the following method:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
window.add_accel_group(<b class="parameter"><tt>accel_group</tt></b>)
</pre></td></tr></table><p>An example of adding an accelerator:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
menu_item.add_accelerator("activate", accel_group,
ord('Q'), gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE)
</pre></td></tr></table></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-WidgetDisplayMethods.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-SettingWidgetAttributes.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-WidgetNameMethods.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">18.2. Widget Display Methods </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 18.4. Widget Name Methods</td></tr></table></div></body></html>
|