# Bryan Schumaker (2 / 12 / 2011) import gtk attrs = ("id", "track", "title", "lenstr", "artist", "album", "year") columns = ["Id", "#", "Title", "Length", "Artist", "Album", "Year"] col_width = [ 2, 30, 500, 75, 325, 310, 30] cell = gtk.CellRendererText() cell.set_fixed_height_from_font(1) cell.set_property("size-points", 12) class Column(gtk.TreeViewColumn): def __init__(self, index, label): gtk.TreeViewColumn.__init__(self, label, cell) self.add_attribute(cell, 'text', index) self.set_resizable(True) self.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) self.set_min_width(2) self.set_max_width(700) self.set_fixed_width(col_width[index])