In .:
* src/Filters/Rules/Family/_RegExpFatherName.py: Add new module. * src/Filters/Rules/Family/_RegExpMotherName.py: Add new module. * src/Filters/Rules/Family/_RegExpChildName.py: Add new module. * src/Filters/SideBar/_FamilySidebarFilter.py (get_filter): Use regex filters. * src/Filters/Rules/Family/__init__.py: Expose new modules. * src/Filters/Rules/Family/Makefile.am: Ship new files. In po: 2006-12-13 Alex Roitman <shura@gramps-project.org> * POTFILES.in: List new files. svn: r7799
This commit is contained in:
parent
8ce63889c5
commit
b00fb3e75f
@ -1,4 +1,11 @@
|
|||||||
2006-12-13 Alex Roitman <shura@gramps-project.org>
|
2006-12-13 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/Filters/Rules/Family/_RegExpFatherName.py: Add new module.
|
||||||
|
* src/Filters/Rules/Family/_RegExpMotherName.py: Add new module.
|
||||||
|
* src/Filters/Rules/Family/_RegExpChildName.py: Add new module.
|
||||||
|
* src/Filters/SideBar/_FamilySidebarFilter.py (get_filter): Use
|
||||||
|
regex filters.
|
||||||
|
* src/Filters/Rules/Family/__init__.py: Expose new modules.
|
||||||
|
* src/Filters/Rules/Family/Makefile.am: Ship new files.
|
||||||
* src/GrampsDb/_GrampsDbBase.py (_set_column_order): Correctly
|
* src/GrampsDb/_GrampsDbBase.py (_set_column_order): Correctly
|
||||||
check for metadata being None.
|
check for metadata being None.
|
||||||
|
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
2006-12-13 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* POTFILES.in: List new files.
|
||||||
|
|
||||||
2006-12-10 Eero Tamminen <eerot@sf>
|
2006-12-10 Eero Tamminen <eerot@sf>
|
||||||
* fi.po: merge with latest, fix all % mismatches and repo translations
|
* fi.po: merge with latest, fix all % mismatches and repo translations
|
||||||
|
|
||||||
|
@ -512,6 +512,9 @@ src/Filters/Rules/Family/_ChildHasNameOf.py
|
|||||||
src/Filters/Rules/Family/_SearchFatherName.py
|
src/Filters/Rules/Family/_SearchFatherName.py
|
||||||
src/Filters/Rules/Family/_SearchChildName.py
|
src/Filters/Rules/Family/_SearchChildName.py
|
||||||
src/Filters/Rules/Family/_SearchMotherName.py
|
src/Filters/Rules/Family/_SearchMotherName.py
|
||||||
|
src/Filters/Rules/Family/_RegExpFatherName.py
|
||||||
|
src/Filters/Rules/Family/_RegExpMotherName.py
|
||||||
|
src/Filters/Rules/Family/_RegExpChildName.py
|
||||||
src/Filters/Rules/Family/_MemberBase.py
|
src/Filters/Rules/Family/_MemberBase.py
|
||||||
src/Filters/Rules/Family/_HasMarkerOf.py
|
src/Filters/Rules/Family/_HasMarkerOf.py
|
||||||
|
|
||||||
|
@ -23,6 +23,9 @@ pkgdata_PYTHON = \
|
|||||||
_SearchFatherName.py\
|
_SearchFatherName.py\
|
||||||
_SearchMotherName.py\
|
_SearchMotherName.py\
|
||||||
_SearchChildName.py\
|
_SearchChildName.py\
|
||||||
|
_RegExpFatherName.py\
|
||||||
|
_RegExpMotherName.py\
|
||||||
|
_RegExpChildName.py\
|
||||||
_MemberBase.py\
|
_MemberBase.py\
|
||||||
_HasMarkerOf.py
|
_HasMarkerOf.py
|
||||||
|
|
||||||
|
51
gramps2/src/Filters/Rules/Family/_RegExpChildName.py
Normal file
51
gramps2/src/Filters/Rules/Family/_RegExpChildName.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# 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 gettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# GRAMPS modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from Filters.Rules.Person import RegExpName
|
||||||
|
from _MemberBase import child_base
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# RegExpChildName
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class RegExpChildName(RegExpName):
|
||||||
|
"""Rule that checks for full or partial name matches"""
|
||||||
|
|
||||||
|
name = _('Families with child matching the <regex_name>')
|
||||||
|
description = _("Matches families where child has a name "
|
||||||
|
"matching a specified regular expression")
|
||||||
|
category = _('Child filters')
|
||||||
|
base_class = RegExpName
|
||||||
|
apply = child_base
|
51
gramps2/src/Filters/Rules/Family/_RegExpFatherName.py
Normal file
51
gramps2/src/Filters/Rules/Family/_RegExpFatherName.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# 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 gettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# GRAMPS modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from Filters.Rules.Person import RegExpName
|
||||||
|
from _MemberBase import father_base
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# RegExpFatherName
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class RegExpFatherName(RegExpName):
|
||||||
|
"""Rule that checks for full or partial name matches"""
|
||||||
|
|
||||||
|
name = _('Families with father matching the <regex_name>')
|
||||||
|
description = _("Matches families whose father has a name "
|
||||||
|
"matching a specified regular expression")
|
||||||
|
category = _('Father filters')
|
||||||
|
base_class = RegExpName
|
||||||
|
apply = father_base
|
51
gramps2/src/Filters/Rules/Family/_RegExpMotherName.py
Normal file
51
gramps2/src/Filters/Rules/Family/_RegExpMotherName.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# 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 gettext import gettext as _
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# GRAMPS modules
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
from Filters.Rules.Person import RegExpName
|
||||||
|
from _MemberBase import mother_base
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# RegExpMotherName
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------
|
||||||
|
class RegExpMotherName(RegExpName):
|
||||||
|
"""Rule that checks for full or partial name matches"""
|
||||||
|
|
||||||
|
name = _('Families with mother matching the <regex_name>')
|
||||||
|
description = _("Matches families whose mother has a name "
|
||||||
|
"matching a specified regular expression")
|
||||||
|
category = _('Mother filters')
|
||||||
|
base_class = RegExpName
|
||||||
|
apply = mother_base
|
@ -29,6 +29,9 @@ __author__ = "Don Allingham"
|
|||||||
from _SearchFatherName import SearchFatherName
|
from _SearchFatherName import SearchFatherName
|
||||||
from _SearchMotherName import SearchMotherName
|
from _SearchMotherName import SearchMotherName
|
||||||
from _SearchChildName import SearchChildName
|
from _SearchChildName import SearchChildName
|
||||||
|
from _RegExpFatherName import RegExpFatherName
|
||||||
|
from _RegExpMotherName import RegExpMotherName
|
||||||
|
from _RegExpChildName import RegExpChildName
|
||||||
|
|
||||||
from _HasRelType import HasRelType
|
from _HasRelType import HasRelType
|
||||||
from _AllFamilies import AllFamilies
|
from _AllFamilies import AllFamilies
|
||||||
|
@ -148,14 +148,23 @@ class FamilySidebarFilter(SidebarFilter):
|
|||||||
generic_filter.add_rule(rule)
|
generic_filter.add_rule(rule)
|
||||||
|
|
||||||
if father:
|
if father:
|
||||||
|
if regex:
|
||||||
|
rule = RegExpFatherName([father])
|
||||||
|
else:
|
||||||
rule = SearchFatherName([father])
|
rule = SearchFatherName([father])
|
||||||
generic_filter.add_rule(rule)
|
generic_filter.add_rule(rule)
|
||||||
|
|
||||||
if mother:
|
if mother:
|
||||||
|
if regex:
|
||||||
|
rule = RegExpMotherName([mother])
|
||||||
|
else:
|
||||||
rule = SearchMotherName([mother])
|
rule = SearchMotherName([mother])
|
||||||
generic_filter.add_rule(rule)
|
generic_filter.add_rule(rule)
|
||||||
|
|
||||||
if child:
|
if child:
|
||||||
|
if regex:
|
||||||
|
rule = RegExpChildName([child])
|
||||||
|
else:
|
||||||
rule = SearchChildName([child])
|
rule = SearchChildName([child])
|
||||||
generic_filter.add_rule(rule)
|
generic_filter.add_rule(rule)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user