remember custom attributes/events

svn: r6248
This commit is contained in:
Don Allingham
2006-03-31 23:46:34 +00:00
parent 37c33490cb
commit 371c34ef1b
9 changed files with 268 additions and 106 deletions

View File

@ -117,7 +117,8 @@ class StandardCustomSelector:
(active_key,mapping[active_key]) tuple.
"""
def __init__(self,mapping,cbe=None,custom_key=None,active_key=None):
def __init__(self,mapping,cbe=None,custom_key=None,active_key=None,
additional=None):
"""
Constructor for the StandardCustomSelector class.
@ -136,7 +137,7 @@ class StandardCustomSelector:
self.custom_key = custom_key
self.active_key = active_key
self.active_index = 0
self.additional = additional
# make model
self.store = gtk.ListStore(int,str)
@ -171,6 +172,13 @@ class StandardCustomSelector:
self.active_index = index
index = index + 1
if self.additional:
for (value,data) in self.additional:
self.store.append(row=[value,data])
if key == self.active_key:
self.active_index = index
index = index + 1
def by_value(self,f,s):
"""
Method for sorting keys based on the values.