40
40
<code class="literal">gtk.SORT_DESCENDING</code>. The treesortable will resort itself
41
41
to reflect this change, after emitting a "sort_column_changed" signal.</p><p>If <em class="parameter"><code>sort_column_id</code></em> is -1, then the default
42
42
sort function will be used, if it is set. If a default sort function is not
43
set then the sort column ID is not changed.</p></div><div class="refsect2" lang="en"><a name="method-gtktreesortable--set-sort-func"></a><h3>gtk.TreeSortable.set_sort_func</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sort_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sort_column_id</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>sort_func</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_data</code></em></span><span class="initializer">=None</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"><em class="parameter"><code>sort_column_id</code></em> :</span></p></td><td>the sort column id to set the function
43
set then the sort column ID is not changed.</p></div><div class="refsect2" title="gtk.TreeSortable.set_sort_func"><a name="method-gtktreesortable--set-sort-func"></a><h3>gtk.TreeSortable.set_sort_func</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_sort_func</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>sort_column_id</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>sort_func</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_data</code></em></span><span class="initializer">=None</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"><em class="parameter"><code>sort_column_id</code></em> :</span></p></td><td>the sort column id to set the function
44
44
for</td></tr><tr><td><p><span class="term"><em class="parameter"><code>sort_func</code></em> :</span></p></td><td>The sorting function</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>the user data to pass to the sort func, or
45
45
<code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">set_sort_func</code>() method sets the
46
46
comparison function (or method) used when sorting on the sort column ID