* src/FilterEditor/_FilterEditor.py: moved from plugins, renamed

svn: r6837
This commit is contained in:
Don Allingham 2006-06-01 04:15:57 +00:00
parent 4eee7d334a
commit 851aa94a83
2 changed files with 8 additions and 11 deletions

View File

@ -1,7 +1,7 @@
2006-05-31 Don Allingham <don@gramps-project.org> 2006-05-31 Don Allingham <don@gramps-project.org>
* src/DataViews/_PersonView.py: call FilterEditor * src/DataViews/_PersonView.py: call FilterEditor
* src/FilterEditor/__init__.py: added * src/FilterEditor/__init__.py: added
* src/FilterEditor/_FilterEditor.py: moved from plugins * src/FilterEditor/_FilterEditor.py: moved from plugins, renamed
* src/glade/rule.glade: filter editor changes * src/glade/rule.glade: filter editor changes
* src/Makefile.am: change subdirs * src/Makefile.am: change subdirs
* src/FilterEditor/Makefile.am: added * src/FilterEditor/Makefile.am: added

View File

@ -263,10 +263,9 @@ class MyID(gtk.HBox):
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MySelect(gtk.ComboBoxEntry): class MySelect(gtk.ComboBoxEntry):
def __init__(self,transtable): def __init__(self, values):
gtk.ComboBoxEntry.__init__(self) gtk.ComboBoxEntry.__init__(self)
self.transtable = transtable AutoComp.fill_combo(self, values)
AutoComp.fill_combo(self,transtable.get_values())
self.show() self.show()
def get_text(self): def get_text(self):
@ -283,6 +282,7 @@ class MySelect(gtk.ComboBoxEntry):
class MyListSelect(gtk.ComboBox): class MyListSelect(gtk.ComboBox):
def __init__(self,data_list): def __init__(self,data_list):
print data_list
gtk.ComboBox.__init__(self) gtk.ComboBox.__init__(self)
store = gtk.ListStore(str) store = gtk.ListStore(str)
self.set_model(store) self.set_model(store)
@ -292,8 +292,7 @@ class MyListSelect(gtk.ComboBox):
self.data_list = data_list self.data_list = data_list
for item in data_list: for item in data_list:
print item store.append(row=[item])
store.append(row=[item[0]])
self.set_active(0) self.set_active(0)
self.show() self.show()
@ -602,7 +601,7 @@ class EditRule(ManagedWindow.ManagedWindow):
l.set_alignment(1,0.5) l.set_alignment(1,0.5)
l.show() l.show()
if v == _('Place:'): if v == _('Place:'):
t = MyPlaces(self.pmap.keys()) t = MyPlaces([])
elif v == _('Number of generations:'): elif v == _('Number of generations:'):
t = MyInteger(1,32) t = MyInteger(1,32)
elif v == _('ID:'): elif v == _('ID:'):
@ -613,11 +612,10 @@ class EditRule(ManagedWindow.ManagedWindow):
t = MyFilters(self.filterdb.get_filters()) t = MyFilters(self.filterdb.get_filters())
elif _name2list.has_key(v1): elif _name2list.has_key(v1):
data =_name2list[v1] data =_name2list[v1]
t = MySelect(data) t = MySelect(data.values())
elif _menulist.has_key(v1): elif _menulist.has_key(v1):
print v1
data =_menulist[v1] data =_menulist[v1]
t = MyListSelect(data) t = MyListSelect(data.values())
elif v == _('Inclusive:'): elif v == _('Inclusive:'):
t = MyBoolean(_('Include original person')) t = MyBoolean(_('Include original person'))
elif v == _('Case sensitive:'): elif v == _('Case sensitive:'):
@ -695,7 +693,6 @@ class EditRule(ManagedWindow.ManagedWindow):
self.selection.connect('changed', self.on_node_selected) self.selection.connect('changed', self.on_node_selected)
self.rule.signal_autoconnect({ self.rule.signal_autoconnect({
'rule_ok_clicked' : self.rule_ok, 'rule_ok_clicked' : self.rule_ok,
"on_rule_edit_delete_event" : self.on_delete_event,
"on_help_rule_clicked" : self.on_help_clicked, "on_help_rule_clicked" : self.on_help_clicked,
'rule_cancel_clicked' : self.close_window, 'rule_cancel_clicked' : self.close_window,
}) })