2007-09-27 Benny Malengier <benny.malengier@gramps-project.org>
* src/FilterEditor/_EditRule.py: wrong filter selection, bug #807 Based on work Johan svn: r9014
This commit is contained in:
parent
9c6d5f5e0a
commit
9ffb568ec3
@ -1,3 +1,7 @@
|
||||
2007-09-27 Benny Malengier <benny.malengier@gramps-project.org>
|
||||
* src/FilterEditor/_EditRule.py: wrong filter selection, bug #807
|
||||
Based on work Johan
|
||||
|
||||
2007-09-26 James G. Sack <jgsack@san.rr.com>
|
||||
* src/plugins/Check.py: same sex marriage need not be CIVIL_UNION, bug #1245
|
||||
|
||||
|
@ -139,19 +139,20 @@ class MyInteger(gtk.SpinButton):
|
||||
#-------------------------------------------------------------------------
|
||||
class MyFilters(gtk.ComboBox):
|
||||
|
||||
def __init__(self,filters,filter_name):
|
||||
def __init__(self,filters,filter_name=None):
|
||||
gtk.ComboBox.__init__(self)
|
||||
store = gtk.ListStore(str)
|
||||
self.set_model(store)
|
||||
cell = gtk.CellRendererText()
|
||||
self.pack_start(cell,True)
|
||||
self.add_attribute(cell,'text',0)
|
||||
self.flist = [ f.get_name() for f in filters ]
|
||||
#remove own name from the list if given.
|
||||
self.flist = [ f.get_name() for f in filters if \
|
||||
(filter_name is None or f.get_name() != filter_name)]
|
||||
self.flist.sort()
|
||||
|
||||
for fname in self.flist:
|
||||
if fname != filter_name:
|
||||
store.append(row=[fname])
|
||||
store.append(row=[fname])
|
||||
self.set_active(0)
|
||||
self.show()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user