After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 343039 - Cannot pass None as renderer to gtk.IconView.set_cursor
Cannot pass None as renderer to gtk.IconView.set_cursor
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: John Finlay
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-26 16:53 UTC by Ross Burton
Modified: 2006-05-26 21:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ross Burton 2006-05-26 16:53:04 UTC
The docs say this:

def set_cursor(path, cell, start_editing)
path :	a tree path
cell :	a gtk.CellRenderer or None
start_editing :	if TRUE the specified cell should start being edited

But if I pass None as cell:

Traceback (most recent call last):
  • File "./test.py", line 27 in keypress_cb
    lightbox.iconview.set_cursor (path, None, False)
TypeError: GtkIconView.set_cursor() argument 2 must be gtk.CellRenderer, not None

Additionally it would be great if cell defaulted to None and start_editing defaulted to False, so I could just call iconview.set_cursor(path) for the general case.
Comment 1 John Finlay 2006-05-26 17:57:06 UTC
This has been fixed in cvs HEAD but the docs jumped the gun in describing the capability. I'll fix the docs to describe the difference. and I can make the last 2 params optional as well
Comment 2 John Finlay 2006-05-26 21:35:35 UTC
Fixed:
	* gtk/gtk-base.defs (set_cursor): Allow IconView.set_cursor method
	params 'cell' and 'start_editing' to be optional.
	Fixes #343039 (Ross Burton)

Checking in gtk/gtk-base.defs;
/cvs/gnome/gnome-python/pygtk/gtk/gtk-base.defs,v  <--  gtk-base.defs
new revision: 1.3; previous revision: 1.2
done

	* pygtk-gtkiconview.xml (set_cursor): Bring description in line with
	behavior. Fixes #343039 (Ross Burton)

Checking in ref/pygtk-gtkiconview.xml;
/cvs/gnome/pygtk-docs/2.0/ref/pygtk-gtkiconview.xml,v  <--  pygtk-gtkiconview.xml
new revision: 1.9; previous revision: 1.8