How change Gtk 3 code to pygtk 2.0
===


How can I change this code from Gtk 3 to pygtk 2.0?

https://github.com/sebp/PyGObject-Tutorial/blob/master/examples/cellrenderertoggle_example.py

I have this part.

#!/usr/bin/env python

import pygtk

pygtk.require('2.0')

import gtk

class CellRendererToggle:

	def cell_toggled(self, widget, path):
		self.liststore[path][1] = not self.liststore[path][1]

	def __init__(self):
		window = gtk.Window()
		window.set_default_size(200, 200)
		self.liststore = gtk.ListStore(str, bool, bool)
		self.liststore.append(["Debian", False, False])
		self.liststore.append(["OpenSuse", False, False])
		self.liststore.append(["Fedora", False, False])
		treeview = gtk.TreeView(model=self.liststore)
		cellrenderer_text = gtk.CellRendererText()
		column_text = gtk.TreeViewColumn("Text", cellrenderer_text, text=0)
		treeview.append_column(column_text)
		cellrenderer_toggle = gtk.CellRendererToggle()
		cellrenderer_toggle.connect("toggled", self.cell_toggled)
		column_toggle = gtk.TreeViewColumn("Toggle", cellrenderer_toggle, active=1)
		treeview.append_column(column_toggle)
		renderer_radio = gtk.CellRendererToggle()
		renderer_radio.set_radio(True)
		renderer_radio.connect("toggled", self.cell_radio_toggled)
		column_radio = gtk.TreeViewColumn("Radio", renderer_radio, active=2)
		treeview.append_column(column_radio)
		window.connect("destroy", lambda w: gtk.main_quit())
		window.add(treeview)
		window.show_all()
CellRendererToggle()

gtk.main()
