24
24
action.</td></tr><tr valign="top"><td valign="top">"tooltip"</td><td valign="top">Read-Write</td><td valign="top">A tooltip for this action.</td></tr><tr valign="top"><td valign="top">"visible"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the action is
25
25
visible.</td></tr><tr valign="top"><td valign="top">"visible-horizontal"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toolbar item is
26
26
visible when the toolbar is in a horizontal orientation.</td></tr><tr valign="top"><td valign="top">"visible-vertical"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toolbar item is
27
visible when the toolbar is in a vertical orientation.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkaction"></a><h2>gtk.Action Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkaction.html#signal-gtkaction--activate" title='The "activate" gtk.Action Signal'>activate</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3014380"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
27
visible when the toolbar is in a vertical orientation.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.Action Signal Prototypes"><a name="signal-prototypes-gtkaction"></a><h2>gtk.Action Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkaction.html#signal-gtkaction--activate" title='The "activate" gtk.Action Signal'>activate</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>action</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3153818"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
28
28
represents operations that the user can perform, along with some information
29
29
how it should be presented in the interface. Each <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> provides
30
30
methods to create icons, menu items and toolbar items representing
31
31
itself.</p><p>As well as the callback that is called when the action gets
32
activated, the following also gets associated with the action:</p><div class="itemizedlist"><ul type="disc"><li>a name (not translated, for path lookup)</li><li>a label (translated, for display)</li><li>an accelerator</li><li>whether the label indicates a stock id</li><li>a tooltip (optional, translated)</li><li>a toolbar label (optional, shorter than label)</li></ul></div><p>The action will also have some state information:</p><div class="itemizedlist"><ul type="disc"><li>visible (shown/hidden)</li><li>sensitive (enabled/disabled)</li></ul></div><p>Apart from regular actions, there are toggle actions, which can be
32
activated, the following also gets associated with the action:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">a name (not translated, for path lookup)</li><li class="listitem">a label (translated, for display)</li><li class="listitem">an accelerator</li><li class="listitem">whether the label indicates a stock id</li><li class="listitem">a tooltip (optional, translated)</li><li class="listitem">a toolbar label (optional, shorter than label)</li></ul></div><p>The action will also have some state information:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">visible (shown/hidden)</li><li class="listitem">sensitive (enabled/disabled)</li></ul></div><p>Apart from regular actions, there are toggle actions, which can be
33
33
toggled between two states and radio actions, where only one in a group
34
34
can be in the "active" state. Other actions can be implemented as <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
35
35
subclasses.</p><p>Each <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> can have
36
36
one or more proxy menu items, toolbar buttons or other proxy
37
37
widgets. Proxies mirror the state of the action (text label, tooltip, icon,
38
38
visible, sensitive, etc), and should change when the action's state
39
changes. When the proxy is activated, it should activate its action. </p></div><div class="refsect1" lang="en"><a name="constructor-gtkaction"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Action</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltip</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a unique name for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>the label displayed in menu items and on
39
changes. When the proxy is activated, it should activate its action. </p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkaction"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Action</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltip</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>a unique name for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>the label displayed in menu items and on
40
40
buttons</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>tooltip</code></strong> :</span></p></td><td>a tooltip for the action</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>stock_id</code></strong> :</span></p></td><td>the stock icon to display in widgets
41
representing the action</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
41
representing the action</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
42
42
object. To add the action to a <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
43
and set the accelerator for the action, call the <a class="link" href="class-gtkactiongroup.html#method-gtkactiongroup--add-action-with-accel" title="gtk.ActionGroup.add_action_with_accel"><code class="methodname">gtk.ActionGroup.add_action_with_accel()</code></a>.</p></div><div class="refsect1" lang="en"><a name="id3046860"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkaction--block-activate"></a><h3>gtk.Action.block_activate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">block_activate</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
43
and set the accelerator for the action, call the <a class="link" href="class-gtkactiongroup.html#method-gtkactiongroup--add-action-with-accel" title="gtk.ActionGroup.add_action_with_accel"><code class="methodname">gtk.ActionGroup.add_action_with_accel()</code></a>.</p></div><div class="refsect1" title="Methods"><a name="id3159196"></a><h2>Methods</h2><div class="refsect2" title="gtk.Action.block_activate"><a name="method-gtkaction--block-activate"></a><h3>gtk.Action.block_activate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">block_activate</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
44
44
The <code class="methodname">block_activate</code>() method disable activation signals from the action
46
46
This is needed when updating the state of your proxy
48
48
widget could result in calling
49
49
<code class="methodname"><a class="link" href="class-gtkaction.html#method-gtkaction--activate" title="gtk.Action.activate">gtk.Action.activate</a></code>(),
50
50
this is a convenience function to avoid recursing in those cases (updating toggle state for instance).
51
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-gicon"></a><h3>gtk.Action.get_gicon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_gicon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The action's <PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK>
52
if one is set.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
51
</p></div><div class="refsect2" title="gtk.Action.get_gicon"><a name="method-gtkaction--get-gicon"></a><h3>gtk.Action.get_gicon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_gicon</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The action's <PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK>
52
if one is set.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
53
53
The <code class="methodname">get_gicon</code>() method gets the
54
54
<PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK> of action.
55
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-icon-name"></a><h3>gtk.Action.get_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the icon name.
56
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
55
</p></div><div class="refsect2" title="gtk.Action.get_icon_name"><a name="method-gtkaction--get-icon-name"></a><h3>gtk.Action.get_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_icon_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the icon name.
56
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
57
57
The <code class="methodname">get_icon_name</code>() method gets the icon name
59
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-is-important"></a><h3>gtk.Action.get_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_is_important</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is important, returning
59
</p></div><div class="refsect2" title="gtk.Action.get_is_important"><a name="method-gtkaction--get-is-important"></a><h3>gtk.Action.get_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_is_important</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is important, returning
60
60
<code class="literal">True</code> if it is.
61
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
61
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
62
62
The <code class="methodname">get_is_important</code>() method checks whether
63
63
action is important or not.
64
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-label"></a><h3>gtk.Action.get_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_label</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the label text.
65
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
64
</p></div><div class="refsect2" title="gtk.Action.get_label"><a name="method-gtkaction--get-label"></a><h3>gtk.Action.get_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_label</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the label text.
65
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
66
66
The <code class="methodname">get_label</code>() method gets the label text of action.
67
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-name"></a><h3>gtk.Action.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the action.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_name</code>() method returns the value
68
of the "name" property containing the name of the action.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-short-label"></a><h3>gtk.Action.get_short_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_short_label</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the short label text.
69
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
67
</p></div><div class="refsect2" title="gtk.Action.get_name"><a name="method-gtkaction--get-name"></a><h3>gtk.Action.get_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_name</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the name of the action.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_name</code>() method returns the value
68
of the "name" property containing the name of the action.</p></div><div class="refsect2" title="gtk.Action.get_short_label"><a name="method-gtkaction--get-short-label"></a><h3>gtk.Action.get_short_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_short_label</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the short label text.
69
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
70
70
The <code class="methodname">get_short_label</code>() method gets the short label text of action.
71
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-tooltip"></a><h3>gtk.Action.get_tooltip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tooltip</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the tooltip text.
72
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
71
</p></div><div class="refsect2" title="gtk.Action.get_tooltip"><a name="method-gtkaction--get-tooltip"></a><h3>gtk.Action.get_tooltip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_tooltip</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the tooltip text.
72
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
73
73
The <code class="methodname">get_tooltip</code>() method gets the tooltip text of action.
74
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-visible-horizontal"></a><h3>gtk.Action.get_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_horizontal</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is visible when horizontal.
75
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
74
</p></div><div class="refsect2" title="gtk.Action.get_visible_horizontal"><a name="method-gtkaction--get-visible-horizontal"></a><h3>gtk.Action.get_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_horizontal</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is visible when horizontal.
75
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
76
76
The <code class="methodname">get_visible_horizontal</code>() method gets whether
77
77
action is visible when horizontal
78
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-visible-vertical"></a><h3>gtk.Action.get_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_vertical</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is visible when vertical.
79
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
78
</p></div><div class="refsect2" title="gtk.Action.get_visible_vertical"><a name="method-gtkaction--get-visible-vertical"></a><h3>gtk.Action.get_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible_vertical</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>whether action is visible when vertical.
79
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
80
80
The <code class="methodname">get_visible_vertical</code>() method gets whether
81
81
action is visible when vertical.
82
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-stock-id"></a><h3>gtk.Action.get_stock_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_stock_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stock id.
83
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
82
</p></div><div class="refsect2" title="gtk.Action.get_stock_id"><a name="method-gtkaction--get-stock-id"></a><h3>gtk.Action.get_stock_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_stock_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the stock id.
83
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
84
84
The <code class="methodname">get_stock_id</code>() method gets the stock id of action.
85
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--is-sensitive"></a><h3>gtk.Action.is_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_sensitive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action and its
86
associated action group are both sensitive.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">is_sensitive</code>() method returns
85
</p></div><div class="refsect2" title="gtk.Action.is_sensitive"><a name="method-gtkaction--is-sensitive"></a><h3>gtk.Action.is_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_sensitive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action and its
86
associated action group are both sensitive.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">is_sensitive</code>() method returns
87
87
<code class="literal">True</code> if the action is effectively sensitive i.e. both the
88
88
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> and
89
89
its associated <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
90
are sensitive.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-sensitive"></a><h3>gtk.Action.get_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sensitive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action itself
91
is sensitive.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_sensitive</code>() method returns the
90
are sensitive.</p></div><div class="refsect2" title="gtk.Action.get_sensitive"><a name="method-gtkaction--get-sensitive"></a><h3>gtk.Action.get_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_sensitive</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action itself
91
is sensitive.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_sensitive</code>() method returns the
92
92
value of the "sensitive" property. If "sensitive" is <code class="literal">True</code>
93
93
the action itself is sensitive. Note that this doesn't necessarily mean
94
94
effective sensitivity. See the <a class="link" href="class-gtkaction.html#method-gtkaction--is-sensitive" title="gtk.Action.is_sensitive"><code class="methodname">is_sensitive()</code></a>
95
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--is-visible"></a><h3>gtk.Action.is_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_visible</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action and
96
its associated action group are both visible.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">is_visible</code>() method returns
95
method for more information.</p></div><div class="refsect2" title="gtk.Action.is_visible"><a name="method-gtkaction--is-visible"></a><h3>gtk.Action.is_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">is_visible</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action and
96
its associated action group are both visible.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">is_visible</code>() method returns
97
97
<code class="literal">True</code> if the action is effectively visible i.e. both the
98
98
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> and
99
99
its associated <a class="link" href="class-gtkactiongroup.html" title="gtk.ActionGroup"><code class="classname">gtk.ActionGroup</code></a>
100
as visible.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-visible"></a><h3>gtk.Action.get_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action itself
101
is visible.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_visible</code>() method returns the
100
as visible.</p></div><div class="refsect2" title="gtk.Action.get_visible"><a name="method-gtkaction--get-visible"></a><h3>gtk.Action.get_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_visible</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the action itself
101
is visible.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_visible</code>() method returns the
102
102
value of the "visible" property. If "visible" is <code class="literal">True</code> the
103
103
<a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
104
104
itself is visible. Note that this doesn't necessarily mean effective
105
105
visibility. See the <a class="link" href="class-gtkaction.html#method-gtkaction--is-visible" title="gtk.Action.is_visible"><code class="methodname">is_visible()</code></a>
106
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--activate"></a><h3>gtk.Action.activate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">activate</span>(<span class="methodparam"></span>)</code></pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">activate</code>() method emits the
106
method for more information.</p></div><div class="refsect2" title="gtk.Action.activate"><a name="method-gtkaction--activate"></a><h3>gtk.Action.activate</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">activate</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">activate</code>() method emits the
107
107
"activate" signal on the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>, if it
108
108
isn't insensitive. This gets called by the proxy widgets when they get
109
activated. It can also be used to manually activate an action.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--create-icon"></a><h3>gtk.Action.create_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_size</code></strong> :</span></p></td><td>the size of the icon that should be
109
activated. It can also be used to manually activate an action.</p></div><div class="refsect2" title="gtk.Action.create_icon"><a name="method-gtkaction--create-icon"></a><h3>gtk.Action.create_icon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_size</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_size</code></strong> :</span></p></td><td>the size of the icon that should be
110
110
created.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a widget that displays the icon for this
111
action.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_icon</code>() method creates and
111
action.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_icon</code>() method creates and
112
112
returns a <a class="link" href="class-gtkimage.html" title="gtk.Image"><code class="classname">gtk.Image</code></a> with the
113
113
size specified by <em class="parameter"><code>size</code></em> from the icon contained in the
114
114
"stock-id" property if it exists. The value of <em class="parameter"><code>size</code></em>
115
must be one of:</p><div class="itemizedlist"><ul type="disc"><li><code class="literal">gtk.ICON_SIZE_MENU</code></li><li><code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code></li><li><code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code></li><li><code class="literal">gtk.ICON_SIZE_BUTTON</code></li><li><code class="literal">gtk.ICON_SIZE_DND</code></li><li><code class="literal">gtk.ICON_SIZE_DIALOG</code></li></ul></div><p>This method is intended for use by <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
116
implementations to create icons displayed in the proxy widgets.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--create-menu"></a><h3>gtk.Action.create_menu</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_menu</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the menu item provided by the action, or
117
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
115
must be one of:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><code class="literal">gtk.ICON_SIZE_MENU</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_BUTTON</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DND</code></li><li class="listitem"><code class="literal">gtk.ICON_SIZE_DIALOG</code></li></ul></div><p>This method is intended for use by <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
116
implementations to create icons displayed in the proxy widgets.</p></div><div class="refsect2" title="gtk.Action.create_menu"><a name="method-gtkaction--create-menu"></a><h3>gtk.Action.create_menu</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_menu</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the menu item provided by the action, or
117
<code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
118
118
If action provides a <a class="link" href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a>.
119
119
widget as a submenu for the menu item or the toolbar item it creates, <code class="methodname">create_menu</code>() method
120
120
returns an instance of that menu.
121
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--create-menu-item"></a><h3>gtk.Action.create_menu_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_menu_item</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a menu item connected to the
122
action.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_menu_item</code>() method creates
123
and returns a menu item widget that proxies for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--create-tool-item"></a><h3>gtk.Action.create_tool_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_tool_item</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tool item connected to the
124
action.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_tool_item</code>() method creates
125
and returns a tool item widget that proxies for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--connect-proxy"></a><h3>gtk.Action.connect_proxy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_proxy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>the proxy widget</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">connect_proxy</code>() method connects the
121
</p></div><div class="refsect2" title="gtk.Action.create_menu_item"><a name="method-gtkaction--create-menu-item"></a><h3>gtk.Action.create_menu_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_menu_item</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a menu item connected to the
122
action.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_menu_item</code>() method creates
123
and returns a menu item widget that proxies for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" title="gtk.Action.create_tool_item"><a name="method-gtkaction--create-tool-item"></a><h3>gtk.Action.create_tool_item</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">create_tool_item</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tool item connected to the
124
action.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">create_tool_item</code>() method creates
125
and returns a tool item widget that proxies for the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" title="gtk.Action.connect_proxy"><a name="method-gtkaction--connect-proxy"></a><h3>gtk.Action.connect_proxy</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_proxy</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>the proxy widget</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">connect_proxy</code>() method connects the
126
126
widget specified by <em class="parameter"><code>proxy</code></em> to the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> object as
127
127
a proxy. This method synchronizes various properties of the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> with the
128
128
widget (such as label text, icon, tooltip, etc), and attaches a callback so
146
146
installation of the accelerator, the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a> counts
147
147
the number of times this method has been called and doesn't remove the
148
148
accelerator until <a class="link" href="class-gtkaction.html#method-gtkaction--disconnect-accelerator" title="gtk.Action.disconnect_accelerator"><code class="methodname">disconnect_accelerator()</code></a>
149
has been called as many times.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--disconnect-accelerator"></a><h3>gtk.Action.disconnect_accelerator</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">disconnect_accelerator</span>(<span class="methodparam"></span>)</code></pre><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">disconnect_accelerator</code>() method
149
has been called as many times.</p></div><div class="refsect2" title="gtk.Action.disconnect_accelerator"><a name="method-gtkaction--disconnect-accelerator"></a><h3>gtk.Action.disconnect_accelerator</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">disconnect_accelerator</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">disconnect_accelerator</code>() method
150
150
undoes the effect of one call to the <a class="link" href="class-gtkaction.html#method-gtkaction--connect-accelerator" title="gtk.Action.connect_accelerator"><code class="methodname">connect_accelerator()</code></a>
151
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--block-activate-from"></a><h3>gtk.Action.block_activate_from</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">block_activate_from</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>a proxy widget</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">block_activate_from</code>() method
151
method.</p></div><div class="refsect2" title="gtk.Action.block_activate_from"><a name="method-gtkaction--block-activate-from"></a><h3>gtk.Action.block_activate_from</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">block_activate_from</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>a proxy widget</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">block_activate_from</code>() method
152
152
disables calls to the <a class="link" href="class-gtkaction.html#method-gtkaction--activate" title="gtk.Action.activate"><code class="methodname">activate()</code></a>
153
153
method by signals on the widget specified by
154
154
<em class="parameter"><code>proxy</code></em>. This is used to break notification loops for
155
155
things like check or radio actions.</p><p>This method is intended for use by <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
156
implementations.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--unblock-activate-from"></a><h3>gtk.Action.unblock_activate_from</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unblock_activate_from</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>a proxy widget</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">unblock_activate_from</code>() method
156
implementations.</p></div><div class="refsect2" title="gtk.Action.unblock_activate_from"><a name="method-gtkaction--unblock-activate-from"></a><h3>gtk.Action.unblock_activate_from</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">unblock_activate_from</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>proxy</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>proxy</code></strong> :</span></p></td><td>a proxy widget</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">unblock_activate_from</code>() method
157
157
re-enables calls to the <a class="link" href="class-gtkaction.html#method-gtkaction--activate" title="gtk.Action.activate"><code class="methodname">activate()</code></a>
158
158
method by signals on the widget specified by <em class="parameter"><code>proxy</code></em>.
159
159
This undoes the blocking done by the <a class="link" href="class-gtkaction.html#method-gtkaction--block-activate-from" title="gtk.Action.block_activate_from"><code class="methodname">block_activate_from()</code></a>
160
160
method.</p><p>This method is intended for use by <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>
161
implementations.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--get-accel-path"></a><h3>gtk.Action.get_accel_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_accel_path</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the accelerator path associated with the action
162
or <code class="literal">None</code></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">get_accel_path</code>() method returns the
161
implementations.</p></div><div class="refsect2" title="gtk.Action.get_accel_path"><a name="method-gtkaction--get-accel-path"></a><h3>gtk.Action.get_accel_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_accel_path</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the accelerator path associated with the action
162
or <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">get_accel_path</code>() method returns the
163
163
accel path for the action or <code class="literal">None</code> if no accel path is
164
set.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-accel-path"></a><h3>gtk.Action.set_accel_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accel_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>the accelerator path</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_accel_path</code>() method sets the
164
set.</p></div><div class="refsect2" title="gtk.Action.set_accel_path"><a name="method-gtkaction--set-accel-path"></a><h3>gtk.Action.set_accel_path</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accel_path</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_path</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_path</code></strong> :</span></p></td><td>the accelerator path</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_accel_path</code>() method sets the
165
165
accel path for the action to the value of
166
166
<em class="parameter"><code>accel_path</code></em>. All proxy widgets associated with the
167
167
action will have this accel path, so that their accelerators are
168
consistent.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-accel-group"></a><h3>gtk.Action.set_accel_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accel_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_group</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a> or <code class="literal">None</code></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_accel_group</code>() method sets the
168
consistent.</p></div><div class="refsect2" title="gtk.Action.set_accel_group"><a name="method-gtkaction--set-accel-group"></a><h3>gtk.Action.set_accel_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accel_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>accel_group</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a> or <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_accel_group</code>() method sets the
169
169
<a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>
170
170
specified by <em class="parameter"><code>accel_group</code></em> as the accelerator group for
171
the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-gicon"></a><h3>gtk.Action.set_gicon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_gicon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon</code></strong> :</span></p></td><td>the <PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK> to set .
172
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
171
the <a class="link" href="class-gtkaction.html" title="gtk.Action"><code class="classname">gtk.Action</code></a>.</p></div><div class="refsect2" title="gtk.Action.set_gicon"><a name="method-gtkaction--set-gicon"></a><h3>gtk.Action.set_gicon</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_gicon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon</code></strong> :</span></p></td><td>the <PYGTKDOCLINK HREF="class-gioicon"><code class="classname">gio.Icon</code></PYGTKDOCLINK> to set .
172
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
173
173
The <code class="methodname">set_gicon</code>() method sets the icon of action.
174
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-icon-name"></a><h3>gtk.Action.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the icon name to set.
175
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
174
</p></div><div class="refsect2" title="gtk.Action.set_icon_name"><a name="method-gtkaction--set-icon-name"></a><h3>gtk.Action.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_icon_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>icon_name</code></strong> :</span></p></td><td>the icon name to set.
175
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
176
176
The <code class="methodname">set_icon_name</code>() method sets the icon name on action.
177
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-is-important"></a><h3>gtk.Action.set_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_is_important</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_important</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>is_important</code></strong> :</span></p></td><td><code class="literal">True</code> to make the action important
178
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
177
</p></div><div class="refsect2" title="gtk.Action.set_is_important"><a name="method-gtkaction--set-is-important"></a><h3>gtk.Action.set_is_important</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_is_important</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_important</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>is_important</code></strong> :</span></p></td><td><code class="literal">True</code> to make the action important
178
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
179
179
The <code class="methodname">set_is_important</code>() method sets whether the action is important,
180
180
this attribute is used primarily by toolbar items to decide whether to show a label or not.
181
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-label"></a><h3>gtk.Action.set_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>the label text to set.
182
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
181
</p></div><div class="refsect2" title="gtk.Action.set_label"><a name="method-gtkaction--set-label"></a><h3>gtk.Action.set_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>the label text to set.
182
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
183
183
The <code class="methodname">set_is_important</code>() method sets the label of action.
184
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-short-label"></a><h3>gtk.Action.set_short_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_short_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>short_label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>short_label</code></strong> :</span></p></td><td>the short label text to set.
185
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
184
</p></div><div class="refsect2" title="gtk.Action.set_short_label"><a name="method-gtkaction--set-short-label"></a><h3>gtk.Action.set_short_label</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_short_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>short_label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>short_label</code></strong> :</span></p></td><td>the short label text to set.
185
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
186
186
The <code class="methodname">set_short_label</code>() method sets the short label of action.
187
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-sensitive"></a><h3>gtk.Action.set_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sensitive</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sensitive</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>sensitive</code></strong> :</span></p></td><td>if <code class="literal">True</code> make the action
188
sensitive</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_sensitive</code>() method sets the
187
</p></div><div class="refsect2" title="gtk.Action.set_sensitive"><a name="method-gtkaction--set-sensitive"></a><h3>gtk.Action.set_sensitive</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sensitive</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>sensitive</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>sensitive</code></strong> :</span></p></td><td>if <code class="literal">True</code> make the action
188
sensitive</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_sensitive</code>() method sets the
189
189
"sensitive" property to the value of <em class="parameter"><code>sensitive</code></em>. Note
190
190
that this doesn't necessarily set the effective sensitivity. See the <a class="link" href="class-gtkaction.html#method-gtkaction--is-sensitive" title="gtk.Action.is_sensitive"><code class="methodname">is_sensitive</code>()</a>
191
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-stock-id"></a><h3>gtk.Action.set_stock_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_stock_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stock_id</code></strong> :</span></p></td><td>the stock id.
192
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
191
method for more information.</p></div><div class="refsect2" title="gtk.Action.set_stock_id"><a name="method-gtkaction--set-stock-id"></a><h3>gtk.Action.set_stock_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_stock_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>stock_id</code></strong> :</span></p></td><td>the stock id.
192
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
193
193
The <code class="methodname">set_stock_id</code>() method sets the stock id on action
194
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-tooltip"></a><h3>gtk.Action.set_tooltip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tooltip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltip</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tooltip</code></strong> :</span></p></td><td>the tooltip text.
195
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
194
</p></div><div class="refsect2" title="gtk.Action.set_tooltip"><a name="method-gtkaction--set-tooltip"></a><h3>gtk.Action.set_tooltip</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_tooltip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltip</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>tooltip</code></strong> :</span></p></td><td>the tooltip text.
195
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
196
196
The <code class="methodname">set_tooltip</code>() method sets the tooltip text on action.
197
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-visible"></a><h3>gtk.Action.set_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible</code></strong> :</span></p></td><td>if <code class="literal">True</code> make the action
198
visible</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_visible</code>() method sets the
197
</p></div><div class="refsect2" title="gtk.Action.set_visible"><a name="method-gtkaction--set-visible"></a><h3>gtk.Action.set_visible</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible</code></strong> :</span></p></td><td>if <code class="literal">True</code> make the action
198
visible</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">set_visible</code>() method sets the
199
199
"visible" property to the value of <em class="parameter"><code>visible</code></em>. Note that
200
200
this doesn't necessarily set the effective visibility. See the <a class="link" href="class-gtkaction.html#method-gtkaction--is-visible" title="gtk.Action.is_visible"><code class="methodname">is_visible</code>()</a>
201
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-visible-horizontal"></a><h3>gtk.Action.set_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_horizontal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_horizontal</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_horizontal</code></strong> :</span></p></td><td>whether the action is visible horizontally.
202
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
201
method for more information.</p></div><div class="refsect2" title="gtk.Action.set_visible_horizontal"><a name="method-gtkaction--set-visible-horizontal"></a><h3>gtk.Action.set_visible_horizontal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_horizontal</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_horizontal</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_horizontal</code></strong> :</span></p></td><td>whether the action is visible horizontally.
202
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
203
203
The <code class="methodname">set_visible_horizontal</code>() method sets whether action
204
204
is visible when horizontal
205
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-visible-vertical"></a><h3>gtk.Action.set_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_vertical</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_vertical</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_vertical</code></strong> :</span></p></td><td>whether the action is visible vertically.
206
</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
205
</p></div><div class="refsect2" title="gtk.Action.set_visible_vertical"><a name="method-gtkaction--set-visible-vertical"></a><h3>gtk.Action.set_visible_vertical</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_visible_vertical</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible_vertical</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>visible_vertical</code></strong> :</span></p></td><td>whether the action is visible vertically.
206
</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.16 and above.</p></div><p>
207
207
The <code class="methodname">set_visible_vertical</code>() method sets whether action
208
208
is visible when vertical
209
</p></div><div class="refsect2" lang="en"><a name="method-gtkaction--set-menu-item-type"></a><h3>gtk.Action.set_menu_item_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_menu_item_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the type of menuitem to be created for the
210
action</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_menu_item_type</code>() method is a
209
</p></div><div class="refsect2" title="gtk.Action.set_menu_item_type"><a name="method-gtkaction--set-menu-item-type"></a><h3>gtk.Action.set_menu_item_type</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_menu_item_type</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>visible</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type</code></strong> :</span></p></td><td>the type of menuitem to be created for the
210
action</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.10 and above.</p></div><p>The <code class="methodname">set_menu_item_type</code>() method is a
211
211
classmethod that sets the type of menuitem to be created for the
212
212
action to that specified by <em class="parameter"><code>type</code></em>. This is
213
213
useful when using the <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>