Help with a GenericCellRenderer using pygtk

I am trying to create a GenericCellRenderer to use for bookmarking items using a custom image of a pin instead of using the standard CellRendererToggle with a checkbox toggle.

http://pastebin.ca/1412757

Here is the code I wrote till now.

Now my problem is i want to detect if the cell is active or not. For that I want to use the property active and and self.active

I really would like to finish this for a the zeitgeist release! Please Help!

Leave a comment

2 Comments.

  1. You should be checking the model, not the cell. Subclass a GtkCellRendererPixbuf, implement its activate() method, and bind its “visible” (or “sensitive”) property to a boolean column in your tree model. When the cell is activated, invert the corresponding column value.

    For a generic C-based example, see:
    http://git.gnome.org/cgit/gnome-video-arcade/tree/src/gva-cell-renderer-pixbuf.c

  2. I found your site via google. Very intressant I will continue to look around.

Leave a Reply


[ Ctrl + Enter ]