Combine three new rules with existing rules

svn: r22828
This commit is contained in:
Nick Hall 2013-08-09 14:06:48 +00:00
parent 6d60cd345f
commit 50ccc05119
8 changed files with 15 additions and 180 deletions

View File

@ -54,13 +54,10 @@ from ._matchesfilter import MatchesFilter
from ._matchessourceconfidence import MatchesSourceConfidence from ._matchessourceconfidence import MatchesSourceConfidence
from ._fatherhasnameof import FatherHasNameOf from ._fatherhasnameof import FatherHasNameOf
from ._fatherhasidof import FatherHasIdOf from ._fatherhasidof import FatherHasIdOf
from ._fatherregexpidof import FatherRegExpIdOf
from ._motherhasnameof import MotherHasNameOf from ._motherhasnameof import MotherHasNameOf
from ._motherhasidof import MotherHasIdOf from ._motherhasidof import MotherHasIdOf
from ._motherregexpidof import MotherRegExpIdOf
from ._childhasnameof import ChildHasNameOf from ._childhasnameof import ChildHasNameOf
from ._childhasidof import ChildHasIdOf from ._childhasidof import ChildHasIdOf
from ._childregexpidof import ChildRegExpIdOf
from ._changedsince import ChangedSince from ._changedsince import ChangedSince
from ._hastag import HasTag from ._hastag import HasTag
from ._hastwins import HasTwins from ._hastwins import HasTwins
@ -85,11 +82,11 @@ editor_rule_list = [
MatchesFilter, MatchesFilter,
MatchesSourceConfidence, MatchesSourceConfidence,
FatherHasNameOf, FatherHasNameOf,
FatherRegExpIdOf, FatherHasIdOf,
MotherHasNameOf, MotherHasNameOf,
MotherRegExpIdOf, MotherHasIdOf,
ChildHasNameOf, ChildHasNameOf,
ChildRegExpIdOf, ChildHasIdOf,
ChangedSince, ChangedSince,
HasTag, HasTag,
HasTwins, HasTwins,

View File

@ -33,7 +33,7 @@ _ = glocale.translation.gettext
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from .. import HasGrampsId from .. import RegExpIdBase
from ._memberbase import child_base from ._memberbase import child_base
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -41,13 +41,13 @@ from ._memberbase import child_base
# HasNameOf # HasNameOf
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class ChildHasIdOf(HasGrampsId): class ChildHasIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID""" """Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ] labels = [ _('Person ID:') ]
name = _('Families with child with the <Id>') name = _('Families having child with Id containing <text>')
description = _("Matches families where child has a specified " description = _("Matches families where child has a specified "
"Gramps ID") "Gramps ID")
category = _('Child filters') category = _('Child filters')
base_class = HasGrampsId base_class = RegExpIdBase
apply = child_base apply = child_base

View File

@ -1,53 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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
#
# $Id$
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from ....const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from .. import RegExpIdBase
from ._memberbase import child_base
#-------------------------------------------------------------------------
#
# HasNameOf
#
#-------------------------------------------------------------------------
class ChildRegExpIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ]
name = _('Families having child with Id containing <text>')
description = _("Matches families where child has a specified "
"Gramps ID")
category = _('Child filters')
base_class = RegExpIdBase
apply = child_base

View File

@ -33,7 +33,7 @@ _ = glocale.translation.gettext
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from .. import HasGrampsId from .. import RegExpIdBase
from ._memberbase import father_base from ._memberbase import father_base
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -41,13 +41,13 @@ from ._memberbase import father_base
# HasNameOf # HasNameOf
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class FatherHasIdOf(HasGrampsId): class FatherHasIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID""" """Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ] labels = [ _('Person ID:') ]
name = _('Families with father with the <Id>') name = _('Families having father with Id containing <text>')
description = _("Matches families whose father has a specified " description = _("Matches families whose father has a specified "
"Gramps ID") "Gramps ID")
category = _('Father filters') category = _('Father filters')
base_class = HasGrampsId base_class = RegExpIdBase
apply = father_base apply = father_base

View File

@ -1,53 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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
#
# $Id$
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from ....const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from .. import RegExpIdBase
from ._memberbase import father_base
#-------------------------------------------------------------------------
#
# HasNameOf
#
#-------------------------------------------------------------------------
class FatherRegExpIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ]
name = _('Families having father with Id containing <text>')
description = _("Matches families whose father has a specified "
"Gramps ID")
category = _('Father filters')
base_class = RegExpIdBase
apply = father_base

View File

@ -33,7 +33,7 @@ _ = glocale.translation.gettext
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from .. import HasGrampsId from .. import RegExpIdBase
from ._memberbase import mother_base from ._memberbase import mother_base
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -41,13 +41,13 @@ from ._memberbase import mother_base
# HasNameOf # HasNameOf
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
class MotherHasIdOf(HasGrampsId): class MotherHasIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID""" """Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ] labels = [ _('Person ID:') ]
name = _('Families with mother with the <Id>') name = _('Families having mother with Id containing <text>')
description = _("Matches families whose mother has a specified " description = _("Matches families whose mother has a specified "
"Gramps ID") "Gramps ID")
category = _('Mother filters') category = _('Mother filters')
base_class = HasGrampsId base_class = RegExpIdBase
apply = mother_base apply = mother_base

View File

@ -1,53 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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
#
# $Id$
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from ....const import GRAMPS_LOCALE as glocale
_ = glocale.translation.gettext
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from .. import RegExpIdBase
from ._memberbase import mother_base
#-------------------------------------------------------------------------
#
# HasNameOf
#
#-------------------------------------------------------------------------
class MotherRegExpIdOf(RegExpIdBase):
"""Rule that checks for a person with a specific GRAMPS ID"""
labels = [ _('Person ID:') ]
name = _('Families having mother with Id containing <text>')
description = _("Matches families whose mother has a specified "
"Gramps ID")
category = _('Mother filters')
base_class = RegExpIdBase
apply = mother_base

View File

@ -81,11 +81,9 @@ gramps/gen/filters/rules/family/_allfamilies.py
gramps/gen/filters/rules/family/_changedsince.py gramps/gen/filters/rules/family/_changedsince.py
gramps/gen/filters/rules/family/_childhasidof.py gramps/gen/filters/rules/family/_childhasidof.py
gramps/gen/filters/rules/family/_childhasnameof.py gramps/gen/filters/rules/family/_childhasnameof.py
gramps/gen/filters/rules/family/_childregexpidof.py
gramps/gen/filters/rules/family/_familyprivate.py gramps/gen/filters/rules/family/_familyprivate.py
gramps/gen/filters/rules/family/_fatherhasidof.py gramps/gen/filters/rules/family/_fatherhasidof.py
gramps/gen/filters/rules/family/_fatherhasnameof.py gramps/gen/filters/rules/family/_fatherhasnameof.py
gramps/gen/filters/rules/family/_fatherregexpidof.py
gramps/gen/filters/rules/family/_hasattribute.py gramps/gen/filters/rules/family/_hasattribute.py
gramps/gen/filters/rules/family/_hascitation.py gramps/gen/filters/rules/family/_hascitation.py
gramps/gen/filters/rules/family/_hasevent.py gramps/gen/filters/rules/family/_hasevent.py
@ -106,7 +104,6 @@ gramps/gen/filters/rules/family/_matchesfilter.py
gramps/gen/filters/rules/family/_matchessourceconfidence.py gramps/gen/filters/rules/family/_matchessourceconfidence.py
gramps/gen/filters/rules/family/_motherhasidof.py gramps/gen/filters/rules/family/_motherhasidof.py
gramps/gen/filters/rules/family/_motherhasnameof.py gramps/gen/filters/rules/family/_motherhasnameof.py
gramps/gen/filters/rules/family/_motherregexpidof.py
gramps/gen/filters/rules/family/_regexpchildname.py gramps/gen/filters/rules/family/_regexpchildname.py
gramps/gen/filters/rules/family/_regexpfathername.py gramps/gen/filters/rules/family/_regexpfathername.py
gramps/gen/filters/rules/family/_regexpidof.py gramps/gen/filters/rules/family/_regexpidof.py