2003-08-14 22:33:30 +00:00
|
|
|
|
# -*- coding: utf-8 -*-
|
2002-10-20 14:25:16 +00:00
|
|
|
|
#
|
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
|
#
|
2005-06-20 13:34:04 +00:00
|
|
|
|
# Copyright (C) 2000-2005 Donald N. Allingham
|
2002-10-20 14:25:16 +00:00
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
#
|
|
|
|
|
|
2003-11-18 04:26:06 +00:00
|
|
|
|
# $Id$
|
|
|
|
|
|
2002-10-20 14:25:16 +00:00
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# internationalization
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
2003-08-17 02:14:33 +00:00
|
|
|
|
from gettext import gettext as _
|
2002-11-02 21:19:58 +00:00
|
|
|
|
|
2002-10-20 14:25:16 +00:00
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# GTK/Gnome modules
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
import gtk.glade
|
2003-11-18 04:26:06 +00:00
|
|
|
|
import gnome
|
2005-06-19 19:30:25 +00:00
|
|
|
|
import gobject
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# gramps modules
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
2003-01-10 05:21:32 +00:00
|
|
|
|
import RelLib
|
2002-10-20 14:25:16 +00:00
|
|
|
|
import const
|
|
|
|
|
import Utils
|
2004-03-23 05:01:19 +00:00
|
|
|
|
import PeopleModel
|
2005-01-01 04:27:15 +00:00
|
|
|
|
import NameDisplay
|
2005-06-19 19:30:25 +00:00
|
|
|
|
import GenericFilter
|
|
|
|
|
import Date
|
2005-01-01 04:27:15 +00:00
|
|
|
|
|
2004-04-21 04:22:37 +00:00
|
|
|
|
from QuestionDialog import ErrorDialog
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# SelectChild
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
class SelectChild:
|
|
|
|
|
|
2005-04-04 03:59:42 +00:00
|
|
|
|
def __init__(self,parent,db,family,person,callback):
|
2004-02-25 04:34:20 +00:00
|
|
|
|
self.parent = parent
|
2002-10-20 14:25:16 +00:00
|
|
|
|
self.db = db
|
2005-04-04 03:59:42 +00:00
|
|
|
|
self.callback = callback
|
2002-10-20 14:25:16 +00:00
|
|
|
|
self.person = person
|
|
|
|
|
self.family = family
|
2004-03-23 05:01:19 +00:00
|
|
|
|
self.renderer = gtk.CellRendererText()
|
2003-08-17 02:14:33 +00:00
|
|
|
|
self.xml = gtk.glade.XML(const.gladeFile,"select_child","gramps")
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if person:
|
2004-02-14 05:40:30 +00:00
|
|
|
|
self.default_name = person.get_primary_name().get_surname().upper()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
else:
|
|
|
|
|
self.default_name = ""
|
|
|
|
|
|
2002-10-20 14:25:16 +00:00
|
|
|
|
self.xml.signal_autoconnect({
|
|
|
|
|
"on_save_child_clicked" : self.on_save_child_clicked,
|
2003-11-18 04:26:06 +00:00
|
|
|
|
"on_child_help_clicked" : self.on_child_help_clicked,
|
2002-10-20 14:25:16 +00:00
|
|
|
|
"on_show_toggled" : self.on_show_toggled,
|
2004-02-25 04:34:20 +00:00
|
|
|
|
"destroy_passed_object" : self.close,
|
|
|
|
|
"on_select_child_delete_event" : self.on_delete_event,
|
2002-10-20 14:25:16 +00:00
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
self.select_child_list = {}
|
2003-03-05 06:01:31 +00:00
|
|
|
|
self.top = self.xml.get_widget("select_child")
|
|
|
|
|
title_label = self.xml.get_widget('title')
|
2003-03-06 06:12:51 +00:00
|
|
|
|
|
2003-06-15 04:13:16 +00:00
|
|
|
|
Utils.set_titles(self.top,title_label,_('Add Child to Family'))
|
2003-03-05 06:01:31 +00:00
|
|
|
|
|
2002-11-02 21:19:58 +00:00
|
|
|
|
self.add_child = self.xml.get_widget("childlist")
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2005-03-02 20:48:58 +00:00
|
|
|
|
self.mrel = self.xml.get_widget("mrel_combo")
|
|
|
|
|
self.frel = self.xml.get_widget("frel_combo")
|
|
|
|
|
|
2005-03-03 05:33:22 +00:00
|
|
|
|
self.build_list(self.mrel,RelLib.Person.CHILD_REL_BIRTH)
|
|
|
|
|
self.build_list(self.frel,RelLib.Person.CHILD_REL_BIRTH)
|
2005-03-02 20:48:58 +00:00
|
|
|
|
|
|
|
|
|
if self.family:
|
2004-08-07 05:16:57 +00:00
|
|
|
|
father = self.db.get_person_from_handle(self.family.get_father_handle())
|
|
|
|
|
mother = self.db.get_person_from_handle(self.family.get_mother_handle())
|
2002-10-20 14:25:16 +00:00
|
|
|
|
else:
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if self.person.get_gender() == RelLib.Person.MALE:
|
2005-03-02 20:48:58 +00:00
|
|
|
|
self.mrel.set_sensitive(False)
|
2002-10-20 14:25:16 +00:00
|
|
|
|
else:
|
2005-03-02 20:48:58 +00:00
|
|
|
|
self.frel.set_sensitive(False)
|
2002-11-02 21:19:58 +00:00
|
|
|
|
|
2005-06-19 19:30:25 +00:00
|
|
|
|
self.likely_filter = GenericFilter.GenericFilter()
|
|
|
|
|
self.likely_filter.add_rule(LikelyFilter([self.person.handle]))
|
|
|
|
|
self.active_filter = self.likely_filter
|
2004-06-03 03:28:46 +00:00
|
|
|
|
|
2005-06-19 19:30:25 +00:00
|
|
|
|
self.top.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
|
|
|
|
gobject.idle_add(self.redraw_child_list)
|
2004-02-25 04:34:20 +00:00
|
|
|
|
self.add_itself_to_menu()
|
2004-03-23 05:01:19 +00:00
|
|
|
|
self.add_columns(self.add_child)
|
2004-02-25 04:34:20 +00:00
|
|
|
|
self.top.show()
|
|
|
|
|
|
2005-03-02 20:48:58 +00:00
|
|
|
|
def build_list(self,opt_menu,sel):
|
|
|
|
|
cell = gtk.CellRendererText()
|
|
|
|
|
opt_menu.pack_start(cell,True)
|
|
|
|
|
opt_menu.add_attribute(cell,'text',0)
|
|
|
|
|
|
|
|
|
|
store = gtk.ListStore(str)
|
2005-03-03 05:33:22 +00:00
|
|
|
|
for val in const.child_rel_list:
|
2005-03-02 20:48:58 +00:00
|
|
|
|
store.append(row=[val])
|
|
|
|
|
opt_menu.set_model(store)
|
2005-03-03 05:33:22 +00:00
|
|
|
|
opt_menu.set_active(sel)
|
2005-03-02 20:48:58 +00:00
|
|
|
|
|
2004-03-23 05:01:19 +00:00
|
|
|
|
def add_columns(self,tree):
|
|
|
|
|
column = gtk.TreeViewColumn(_('Name'), self.renderer,text=0)
|
2005-02-24 00:25:34 +00:00
|
|
|
|
column.set_resizable(True)
|
|
|
|
|
#column.set_clickable(True)
|
2004-03-23 05:01:19 +00:00
|
|
|
|
column.set_min_width(225)
|
|
|
|
|
tree.append_column(column)
|
|
|
|
|
column = gtk.TreeViewColumn(_('ID'), self.renderer,text=1)
|
2005-02-24 00:25:34 +00:00
|
|
|
|
column.set_resizable(True)
|
|
|
|
|
#column.set_clickable(True)
|
2004-03-23 05:01:19 +00:00
|
|
|
|
column.set_min_width(75)
|
|
|
|
|
tree.append_column(column)
|
|
|
|
|
column = gtk.TreeViewColumn(_('Birth date'), self.renderer,text=3)
|
2005-02-24 00:25:34 +00:00
|
|
|
|
#column.set_resizable(True)
|
|
|
|
|
column.set_clickable(True)
|
2004-03-23 05:01:19 +00:00
|
|
|
|
tree.append_column(column)
|
|
|
|
|
|
2004-02-25 04:34:20 +00:00
|
|
|
|
def on_delete_event(self,obj,b):
|
|
|
|
|
self.remove_itself_from_menu()
|
|
|
|
|
|
|
|
|
|
def close(self,obj):
|
|
|
|
|
self.remove_itself_from_menu()
|
|
|
|
|
self.top.destroy()
|
|
|
|
|
|
|
|
|
|
def add_itself_to_menu(self):
|
|
|
|
|
self.parent.child_windows[self] = self
|
|
|
|
|
self.parent_menu_item = gtk.MenuItem(_('Add Child to Family'))
|
|
|
|
|
self.parent_menu_item.connect("activate",self.present)
|
|
|
|
|
self.parent_menu_item.show()
|
|
|
|
|
self.parent.winsmenu.append(self.parent_menu_item)
|
|
|
|
|
|
|
|
|
|
def remove_itself_from_menu(self):
|
|
|
|
|
del self.parent.child_windows[self]
|
|
|
|
|
self.parent_menu_item.destroy()
|
|
|
|
|
|
|
|
|
|
def present(self,obj):
|
|
|
|
|
self.top.present()
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2003-11-18 04:26:06 +00:00
|
|
|
|
def on_child_help_clicked(self,obj):
|
|
|
|
|
"""Display the relevant portion of GRAMPS manual"""
|
2003-12-02 04:27:23 +00:00
|
|
|
|
gnome.help_display('gramps-manual','gramps-edit-quick')
|
2003-11-18 04:26:06 +00:00
|
|
|
|
|
2005-06-19 19:30:25 +00:00
|
|
|
|
def redraw_child_list(self):
|
|
|
|
|
self.refmodel = PeopleModel.PeopleModel(self.db,self.active_filter)
|
|
|
|
|
self.add_child.set_model(self.refmodel)
|
|
|
|
|
self.top.window.set_cursor(None)
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2004-08-22 23:16:57 +00:00
|
|
|
|
def select_function(self,store,path,node,id_list):
|
|
|
|
|
id_list.append(self.refmodel.get_value(node,PeopleModel.COLUMN_INT_ID))
|
2004-03-23 05:01:19 +00:00
|
|
|
|
|
|
|
|
|
def get_selected_ids(self):
|
|
|
|
|
mlist = []
|
|
|
|
|
self.add_child.get_selection().selected_foreach(self.select_function,mlist)
|
|
|
|
|
return mlist
|
2003-05-21 21:08:20 +00:00
|
|
|
|
|
2002-10-20 14:25:16 +00:00
|
|
|
|
def on_save_child_clicked(self,obj):
|
|
|
|
|
|
2004-03-23 05:01:19 +00:00
|
|
|
|
idlist = self.get_selected_ids()
|
|
|
|
|
|
|
|
|
|
if not idlist or not idlist[0]:
|
2002-11-02 21:19:58 +00:00
|
|
|
|
return
|
|
|
|
|
|
2004-10-06 03:42:54 +00:00
|
|
|
|
handle = idlist[0]
|
|
|
|
|
select_child = self.db.get_person_from_handle(handle)
|
|
|
|
|
if self.person.get_handle() == handle:
|
2004-04-22 01:48:47 +00:00
|
|
|
|
ErrorDialog(_("Error selecting a child"),
|
|
|
|
|
_("A person cannot be linked as his/her own child"),
|
|
|
|
|
self.top)
|
|
|
|
|
return
|
2004-08-13 04:34:07 +00:00
|
|
|
|
|
|
|
|
|
trans = self.db.transaction_begin()
|
2004-04-22 01:48:47 +00:00
|
|
|
|
|
2002-11-02 21:19:58 +00:00
|
|
|
|
if self.family == None:
|
2004-08-13 04:34:07 +00:00
|
|
|
|
self.family = RelLib.Family()
|
|
|
|
|
self.db.add_family(self.family,trans)
|
2004-07-28 02:29:07 +00:00
|
|
|
|
self.person.add_family_handle(self.family.get_handle())
|
2005-05-13 10:21:38 +00:00
|
|
|
|
self.db.commit_person(self.person,trans)
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if self.person.get_gender() == RelLib.Person.MALE:
|
2005-05-13 10:21:38 +00:00
|
|
|
|
self.family.set_father_handle(self.person.get_handle())
|
2002-11-02 21:19:58 +00:00
|
|
|
|
else:
|
2005-05-13 10:21:38 +00:00
|
|
|
|
self.family.set_mother_handle(self.person.get_handle())
|
|
|
|
|
self.db.commit_family(self.family,trans)
|
2002-11-02 21:19:58 +00:00
|
|
|
|
|
2004-10-06 03:42:54 +00:00
|
|
|
|
if handle in (self.family.get_father_handle(),self.family.get_mother_handle()):
|
2004-04-22 01:48:47 +00:00
|
|
|
|
ErrorDialog(_("Error selecting a child"),
|
|
|
|
|
_("A person cannot be linked as his/her own child"),
|
|
|
|
|
self.top)
|
|
|
|
|
return
|
|
|
|
|
|
2005-05-28 06:21:37 +00:00
|
|
|
|
# TODO: Add child ordered by birth day
|
2004-07-28 02:29:07 +00:00
|
|
|
|
self.family.add_child_handle(select_child.get_handle())
|
2004-04-22 01:48:47 +00:00
|
|
|
|
|
2005-03-03 05:33:22 +00:00
|
|
|
|
mrel = self.mrel.get_active()
|
2004-08-07 05:16:57 +00:00
|
|
|
|
mother = self.db.get_person_from_handle(self.family.get_mother_handle())
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if mother and mother.get_gender() != RelLib.Person.FEMALE:
|
2005-03-03 05:33:22 +00:00
|
|
|
|
if mrel == RelLib.Person.CHILD_REL_BIRTH:
|
|
|
|
|
mrel = RelLib.Person.CHILD_REL_UNKWN
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2005-03-03 05:33:22 +00:00
|
|
|
|
frel = self.frel.get_active()
|
2004-08-07 05:16:57 +00:00
|
|
|
|
father = self.db.get_person_from_handle(self.family.get_father_handle())
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if father and father.get_gender() !=RelLib.Person.MALE:
|
2005-03-03 05:33:22 +00:00
|
|
|
|
if frel == RelLib.Person.CHILD_REL_BIRTH:
|
|
|
|
|
frel = RelLib.Person.CHILD_REL_UNKWN
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2005-03-03 05:33:22 +00:00
|
|
|
|
select_child.add_parent_family_handle(self.family.get_handle(),
|
|
|
|
|
mrel,frel)
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2004-03-30 04:50:24 +00:00
|
|
|
|
self.db.commit_person(select_child,trans)
|
2004-05-19 06:13:36 +00:00
|
|
|
|
self.db.commit_family(self.family,trans)
|
2005-07-26 23:02:53 +00:00
|
|
|
|
n = NameDisplay.displayer.display(select_child)
|
2004-08-13 04:34:07 +00:00
|
|
|
|
self.db.transaction_commit(trans,_("Add Child to Family (%s)") % n)
|
2004-02-25 04:34:20 +00:00
|
|
|
|
self.close(obj)
|
2005-05-13 10:21:38 +00:00
|
|
|
|
self.callback()
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
|
|
|
|
def on_show_toggled(self,obj):
|
2005-06-19 19:30:25 +00:00
|
|
|
|
if obj.get_active():
|
|
|
|
|
self.active_filter = None
|
|
|
|
|
else:
|
|
|
|
|
self.active_filter = self.likely_filter
|
|
|
|
|
self.top.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
|
|
|
|
|
while(gtk.events_pending()):
|
|
|
|
|
gtk.main_iteration()
|
|
|
|
|
self.redraw_child_list()
|
2002-10-20 14:25:16 +00:00
|
|
|
|
|
2003-05-18 04:18:12 +00:00
|
|
|
|
def north_american(self,val):
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if self.person.get_gender() == RelLib.Person.MALE:
|
2004-02-14 05:40:30 +00:00
|
|
|
|
return self.person.get_primary_name().get_surname()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
elif self.family:
|
2004-07-28 02:29:07 +00:00
|
|
|
|
f = self.family.get_father_handle()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if f:
|
2004-02-14 05:40:30 +00:00
|
|
|
|
pname = f.get_primary_name()
|
|
|
|
|
return (pname.get_surname_prefix(),pname.get_surname())
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2003-05-18 04:18:12 +00:00
|
|
|
|
|
|
|
|
|
def no_name(self,val):
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2003-05-18 04:18:12 +00:00
|
|
|
|
|
|
|
|
|
def latin_american(self,val):
|
|
|
|
|
if self.family:
|
2004-07-28 02:29:07 +00:00
|
|
|
|
father = self.family.get_father_handle()
|
|
|
|
|
mother = self.family.get_mother_handle()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if not father or not mother:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2004-02-14 05:40:30 +00:00
|
|
|
|
fsn = father.get_primary_name().get_surname()
|
|
|
|
|
msn = mother.get_primary_name().get_surname()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if not father or not mother:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2003-05-18 04:18:12 +00:00
|
|
|
|
try:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","%s %s" % (fsn.split()[0],msn.split()[0]))
|
2003-05-18 04:18:12 +00:00
|
|
|
|
except:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2003-05-18 04:18:12 +00:00
|
|
|
|
else:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2003-05-18 04:18:12 +00:00
|
|
|
|
|
|
|
|
|
def icelandic(self,val):
|
|
|
|
|
fname = ""
|
2005-02-01 03:46:29 +00:00
|
|
|
|
if self.person.get_gender() == RelLib.Person.MALE:
|
2004-02-14 05:40:30 +00:00
|
|
|
|
fname = self.person.get_primary_name().get_first_name()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
elif self.family:
|
2004-07-28 02:29:07 +00:00
|
|
|
|
f = self.family.get_father_handle()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if f:
|
2004-02-14 05:40:30 +00:00
|
|
|
|
fname = f.get_primary_name().get_first_name()
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if fname:
|
2003-10-30 04:17:05 +00:00
|
|
|
|
fname = fname.split()[0]
|
2003-05-18 04:18:12 +00:00
|
|
|
|
if val == 0:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","%ssson" % fname)
|
2003-05-18 04:18:12 +00:00
|
|
|
|
elif val == 1:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","%sd<EFBFBD>ttir" % fname)
|
2003-05-18 04:18:12 +00:00
|
|
|
|
else:
|
2003-10-06 04:29:50 +00:00
|
|
|
|
return ("","")
|
2005-06-19 19:30:25 +00:00
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Likely Filters
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------------------------------
|
|
|
|
|
class LikelyFilter(GenericFilter.Rule):
|
|
|
|
|
|
2005-07-13 19:04:29 +00:00
|
|
|
|
labels = [ 'Person handle' ]
|
|
|
|
|
category = _('General filters')
|
2005-06-20 13:34:04 +00:00
|
|
|
|
|
2005-06-19 19:30:25 +00:00
|
|
|
|
def prepare(self,db):
|
|
|
|
|
person = db.get_person_from_handle(self.list[0])
|
2005-06-20 13:34:04 +00:00
|
|
|
|
if person.birth_handle:
|
|
|
|
|
birth = db.get_event_from_handle(person.birth_handle)
|
|
|
|
|
dateobj = Date.Date(birth.date)
|
|
|
|
|
year = dateobj.get_year()
|
|
|
|
|
dateobj.set_year(year+10)
|
|
|
|
|
self.lower = dateobj.sortval
|
|
|
|
|
dateobj.set_year(year+70)
|
|
|
|
|
self.upper = dateobj.sortval
|
|
|
|
|
else:
|
|
|
|
|
self.lower = None
|
|
|
|
|
self.upper = None
|
|
|
|
|
|
2005-06-21 04:04:44 +00:00
|
|
|
|
def apply(self,db,person):
|
2005-06-20 13:34:04 +00:00
|
|
|
|
if not person.birth_handle or (self.upper == None and
|
|
|
|
|
self.lower == None):
|
2005-06-19 19:30:25 +00:00
|
|
|
|
return True
|
|
|
|
|
event = db.get_event_from_handle(person.birth_handle)
|
|
|
|
|
return (event.date == None or event.date.sortval == 0 or
|
|
|
|
|
self.lower < event.date.sortval < self.upper)
|
|
|
|
|
|