2011-04-17 10:20:54 -04:00
|
|
|
# Bryan Schumaker (2 / 12 / 2011)
|
|
|
|
|
|
|
|
import gtk
|
|
|
|
|
2011-05-25 23:01:17 -04:00
|
|
|
attrs = ("id", "title", "lenstr", "artist", "album", "year")
|
2011-04-17 10:20:54 -04:00
|
|
|
columns = ["Id", "Title", "Length", "Artist", "Album", "Year"]
|
|
|
|
col_width = [ 2, 300, 60, 125, 125, 50]
|
|
|
|
|
|
|
|
cell = gtk.CellRendererText()
|
|
|
|
cell.set_fixed_height_from_font(1)
|
|
|
|
|
|
|
|
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])
|