GNOME Bugzilla – Bug 74096
GtkCellRendererPixbuf should be activatable.
Last modified: 2013-02-04 06:14:00 UTC
I would be nice if the GtkCellRendererPixbuf would emit activate or toggle signals on click. That would permit two (or more) icons to be switched to indicate states. Alternatively, the same could be obtained if the CellRendererToggle would accept specifications of which image to draw rather than the same old checkbox. An example of use would be a switch between Ascending and descending mared by an icon rather than a column of checkboxes.
I think I'd rather see a separate cell renderer for this. It should be really easy to write. If you make one, please put it in libegg so that we can consider it for 2.2/2.4.
Reassigning bugs to new component owner. Sorry for the flood.
I think we should put this feature into the default pixbuf renderer or close this bug. I don't see the need for a second pixbuf renderer in gtk+ which only adds handling of mouse clicks.
I would concur with putting this into the default pixbuf renderer (or the toggle renderer) In gnumeric we are currently using a second toggle renderer to implement that feature but it should be part of one of the default renderers.
GIMP-1.3 now has a custom cell renderer for this as well: http://cvs.gnome.org/lxr/source/gimp/app/widgets/gimpcellrenderertoggle.c http://cvs.gnome.org/lxr/source/gimp/app/widgets/gimpcellrenderertoggle.h However I don't see a need to move this into GTK+ since most probably every project wants a slightly different look and feature set anyway.
Moving to future for now.
This is pretty easy to achieve by subclassing the renderer and implementing the activate vfunc. Is the bug really valid?
Does it really matter whether the "bug is really valid"? It was filed in 2002... Subclassing the renderer and implementing the activate vfunc is of course possible, provided the API remains constant.
(In reply to comment #8) > Does it really matter whether the "bug is really valid"? It was filed in > 2002... Since GTK+ doesn't rejoice in keeping bugs open for no purpose, I think it matters. > Subclassing the renderer and implementing the activate vfunc is of course > possible, provided the API remains constant. GTK+ has indeed a stable API ever since.