#!/usr/bin/env python
from Kiwi2 import Delegates
from Kiwi2.Widgets.List import List, Column
from Kiwi2.initgtk import gtk

class NewsItem:
    """An instance that holds information about a news article."""
    def __init__(self, title, author, url):
        self.title, self.author, self.url = title, author, url

# Assemble friendly Pigdog.org news into NewsItem instances so they can
# be used in the CListDelegate
news = [
 NewsItem("Smallpox Vaccinations for EVERYONE", "JRoyale",
          "http://www.pigdog.org/auto/Power_Corrupts/link/2700.html"),
 NewsItem("Is that uranium in your pocket or are you just happy to see me?",
          "Baron Earl",
          "http://www.pigdog.org/auto/bad_people/link/2699.html"),
 NewsItem("Cut 'n Paste", "Baron Earl",
          "http://www.pigdog.org/auto/ArtFux/link/2690.html"),
 NewsItem("A Slippery Exit", "Reverend CyberSatan",
          "http://www.pigdog.org/auto/TheCorporateFuck/link/2683.html"),
 NewsItem("Those Crazy Dutch Have Resurrected Elvis", "Miss Conduct",
          "http://www.pigdog.org/auto/viva_la_musica/link/2678.html")
]

# Specify the columns: one for each attribute of NewsItem, the URL
# column invisible by default
my_columns = [ Column("title", sorted=True), 
               Column("author", justify=gtk.JUSTIFY_RIGHT), 
               Column("url", title="URL", visible=False) ]

kiwilist = List(my_columns, news)
w = gtk.Window()
w.set_size_request(600, 250)
w.add(kiwilist)
w.show_all()
gtk.main()

@@ -15,16 +15,28 @@
  python%0A
+import gtk%0A%0A
 from Kiw
@@ -102,38 +102,8 @@
 lumn
-%0Afrom Kiwi2.initgtk import gtk
 %0A%0Acl
@@ -401,17 +401,17 @@
 %0Anews = 
-%5B
+(
 %0A NewsIt
@@ -1069,17 +1069,17 @@
 .html%22)%0A
-%5D
+)
 %0A%0A# Spec
@@ -1186,10 +1186,9 @@
 s = 
-%5B 
+(
 Colu
@@ -1210,25 +1210,24 @@
 ted=True), %0A
- 
             
@@ -1280,33 +1280,32 @@
  %0A              
- 
 Column(%22url%22, ti
@@ -1333,10 +1333,9 @@
 lse)
- %5D
+)
 %0A%0Aki
@@ -1383,16 +1383,57 @@
 indow()%0A
+w.connect('delete-event', gtk.main_quit)%0A
 w.set_si

use more tuples, delete-event -> main_quit