Gallery drag/drop functionality

svn: r1169
This commit is contained in:
Don Allingham
2002-11-08 03:42:25 +00:00
parent af1a55d986
commit 291a4c7dcb
11 changed files with 2491 additions and 2616 deletions

View File

@ -25,29 +25,7 @@ class ListModel:
def __init__(self,tree,dlist):
self.tree = tree
l = len(dlist)
if l == 1:
self.model = gtk.ListStore(TYPE_STRING)
elif l == 2:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING)
elif l == 3:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING)
elif l == 4:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING)
elif l == 5:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING)
elif l == 6:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING, TYPE_STRING)
elif l == 7:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING)
elif l == 8:
self.model = gtk.ListStore(TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING, TYPE_STRING,
TYPE_STRING, TYPE_STRING)
self.model = gtk.ListStore(*[TYPE_STRING]*l)
self.selection = self.tree.get_selection()
self.tree.set_model(self.model)