pygtk-docs r796 - trunk/2.0/tut
- From: finlay svn gnome org
- To: svn-commits-list gnome org
- Subject: pygtk-docs r796 - trunk/2.0/tut
- Date: Sat, 29 Mar 2008 03:28:42 +0000 (GMT)
Author: finlay
Date: Sat Mar 29 03:28:42 2008
New Revision: 796
URL: http://svn.gnome.org/viewvc/pygtk-docs?rev=796&view=rev
Log:
* CellRenderers.xml: Fix code fragment for set_cell_data_func
example. (Yotam Medini)
Modified:
trunk/2.0/tut/CellRenderers.xml
trunk/2.0/tut/ChangeLog
Modified: trunk/2.0/tut/CellRenderers.xml
==============================================================================
--- trunk/2.0/tut/CellRenderers.xml (original)
+++ trunk/2.0/tut/CellRenderers.xml Sat Mar 29 03:28:42 2008
@@ -668,7 +668,7 @@
<programlisting>
...
- def obj_id_str(treeviewcolumn, cell_renderer, model, iter):
+ def obj_id_str(treeviewcolumn, cell, model, iter):
pyobj = model.get_value(iter, 0)
cell.set_property('text', str(pyobj))
return
@@ -679,6 +679,7 @@
win.add(treeview)
cell = CellRendererText()
tvcolumn = gtk TreeViewColumn('Object ID', cell)
+ tvcolumn.set_cell_data_func(cell, obj_id_str)
treeview.append_column(tvcolumn)
iter = treestore.append(None, [win])
iter = treestore.append(iter, [treeview])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]