summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorJohn Finlay <finlay@src.gnome.org>2006-07-19 03:12:56 +0000
committerJohn Finlay <finlay@src.gnome.org>2006-07-19 03:12:56 +0000
commitd31ea117ad982b55fcee966b9993bd24c45e9519 (patch)
tree7af3ddbbea5aa084996c90dda62b44c569a21dbc /docs/reference
parente225647f4401c5c0792bac95dd911d8729b85d27 (diff)
downloadpygtk-d31ea117ad982b55fcee966b9993bd24c45e9519.tar.gz
Update description for 2.10 changes to enable full callback args.
* pygtk-gtktreeselection.xml (set_select_function): Update description for 2.10 changes to enable full callback args. * pygtk-gtkmenu.xml (popup): Note func signature prior to 2.10.
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/ChangeLog7
-rw-r--r--docs/reference/pygtk-gtkmenu.xml10
-rw-r--r--docs/reference/pygtk-gtktreeselection.xml57
3 files changed, 56 insertions, 18 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index b6547f66..ce3cf703 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,10 @@
+2006-07-18 John Finlay <finlay@moeraki.com>
+
+ * pygtk-gtktreeselection.xml (set_select_function): Update description
+ for 2.10 changes to enable full callback args.
+
+ * pygtk-gtkmenu.xml (popup): Note func signature prior to 2.10.
+
2006-07-14 John Finlay <finlay@moeraki.com>
* pygtk-gtkaccelmap.xml: Add.
diff --git a/docs/reference/pygtk-gtkmenu.xml b/docs/reference/pygtk-gtkmenu.xml
index 16920301..fe615bd8 100644
--- a/docs/reference/pygtk-gtkmenu.xml
+++ b/docs/reference/pygtk-gtkmenu.xml
@@ -454,6 +454,16 @@ role="keyword">data</parameter>&nbsp;:</term>
the menu should be pushed in to be completely inside the screen
instead of just clamped to the size of the screen.</para>
+ <note>
+ <para>Prior to PyGTK 2.10 this method did not accept the
+ <parameter>data</parameter> parameter and the signature of
+ <parameter>func</parameter> was:</para>
+
+ <programlisting>
+ def func(menu, user_data):
+ </programlisting>
+ </note>
+
</refsect2>
<refsect2 id="method-gtkmenu--reposition">
diff --git a/docs/reference/pygtk-gtktreeselection.xml b/docs/reference/pygtk-gtktreeselection.xml
index 1e0afd80..48700452 100644
--- a/docs/reference/pygtk-gtktreeselection.xml
+++ b/docs/reference/pygtk-gtktreeselection.xml
@@ -30,9 +30,14 @@ linkend="method-gtktreeselection--get-mode">get_mode</link></methodname>
<methodsynopsis language="python">
<methodname><link
linkend="method-gtktreeselection--set-select-function">set_select_function</link></methodname>
- <methodparam><parameter>func</parameter></methodparam>
- <methodparam><parameter>data</parameter>
+ <methodparam><parameter
+ role="keyword">func</parameter></methodparam>
+ <methodparam><parameter
+ role="keyword">data</parameter>
<initializer>None</initializer></methodparam>
+ <methodparam><parameter
+ role="keyword">full</parameter>
+ <initializer>FALSE</initializer></methodparam>
</methodsynopsis>
<!-- NOT IMPLEMENTED
@@ -265,8 +270,12 @@ method for more information.</para>
<programlisting><methodsynopsis language="python">
<methodname>set_select_function</methodname>
- <methodparam><parameter>func</parameter></methodparam>
- <methodparam><parameter>data</parameter></methodparam>
+ <methodparam><parameter
+ role="keyword">func</parameter></methodparam>
+ <methodparam><parameter
+ role="keyword">data</parameter><initializer>None</initializer></methodparam>
+ <methodparam><parameter
+ role="keyword">full</parameter><initializer>FALSE</initializer></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
@@ -278,6 +287,12 @@ method for more information.</para>
<listitem><simpara>the selection function's
data.</simpara></listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>full</parameter>&nbsp;:</term>
+ <listitem><simpara>if <literal>TRUE</literal>
+ <parameter>func</parameter> will be passed a full set of
+ args</simpara></listitem>
+ </varlistentry>
</variablelist>
<para>The <methodname>set_selection_function</methodname>() method
@@ -307,14 +322,18 @@ passed to the <link
linkend="method-gtktreeselection--set-select-function"><methodname>set_select_function</methodname>()</link>
method.</para>
-<!-- <programlisting>
+<para>In PyGTK 2.10 and above if the additional optional parameter
+<parameter>full</parameter> is <literal>TRUE</literal> the signature of
+<parameter>func</parameter> should be:</para>
+
+<programlisting>
<methodsynopsis language="python">
<methodname>selectfunction</methodname>
<methodparam><parameter>selection</parameter></methodparam>
<methodparam><parameter>model</parameter></methodparam>
<methodparam><parameter>path</parameter></methodparam>
<methodparam><parameter>path_currently_selected</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
+ <methodparam><parameter>user_data</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname>selectmethod</methodname>
@@ -323,22 +342,24 @@ method.</para>
<methodparam><parameter>model</parameter></methodparam>
<methodparam><parameter>path</parameter></methodparam>
<methodparam><parameter>is_selected</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
+ <methodparam><parameter>user_data</parameter></methodparam>
</methodsynopsis>
</programlisting>
<para>where <parameter>selection</parameter> is the <link
-linkend="class-gtktreeselection"><classname>gtk.TreeSelection</classname></link>,
-<parameter>model</parameter> is the <link
-linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
-used by the gtkTreeView associated with selection,
-<parameter>path</parameter> is the path of the selected row,
-<parameter>is_selected</parameter> is <literal>TRUE</literal> if
-the row is currently selected and <parameter>...</parameter> is the user
-data if any (may not be present if <parameter>data</parameter> was
-<literal>None</literal>). If <parameter>func</parameter> is a method then
-<parameter>self</parameter> is the object that the method is called
-upon.</para> -->
+ linkend="class-gtktreeselection"><classname>gtk.TreeSelection</classname></link>,
+ <parameter>model</parameter> is the <link
+ linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>
+ used by the <link
+ linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>
+ associated with selection, <parameter>path</parameter> is the path of
+ the selected row, <parameter>is_selected</parameter> is
+ <literal>TRUE</literal> if the row is currently selected and
+ <parameter>user_data</parameter> is <parameter>data</parameter> if any
+ (may not be present if <parameter>data</parameter> was
+ <literal>None</literal>). If <parameter>func</parameter> is a method
+ then <parameter>self</parameter> is the object that the method is
+ called upon.</para>
</refsect2>