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
0fe74eb5e7
commit
65c3d40a22
@ -1,4 +1,11 @@
|
||||
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
|
||||
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>
|
||||
* 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/_SearchChildName.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/_HasMarkerOf.py
|
||||
|
||||
|
@ -23,6 +23,9 @@ pkgdata_PYTHON = \
|
||||
_SearchFatherName.py\
|
||||
_SearchMotherName.py\
|
||||
_SearchChildName.py\
|
||||
_RegExpFatherName.py\
|
||||
_RegExpMotherName.py\
|
||||
_RegExpChildName.py\
|
||||
_MemberBase.py\
|
||||
_HasMarkerOf.py
|
||||
|
||||
|
51
src/Filters/Rules/Family/_RegExpChildName.py
Normal file
51
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
src/Filters/Rules/Family/_RegExpFatherName.py
Normal file
51
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
src/Filters/Rules/Family/_RegExpMotherName.py
Normal file
51
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 _SearchMotherName import SearchMotherName
|
||||
from _SearchChildName import SearchChildName
|
||||
from _RegExpFatherName import RegExpFatherName
|
||||
from _RegExpMotherName import RegExpMotherName
|
||||
from _RegExpChildName import RegExpChildName
|
||||
|
||||
from _HasRelType import HasRelType
|
||||
from _AllFamilies import AllFamilies
|
||||
|
@ -148,15 +148,24 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
if father:
|
||||
rule = SearchFatherName([father])
|
||||
if regex:
|
||||
rule = RegExpFatherName([father])
|
||||
else:
|
||||
rule = SearchFatherName([father])
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
if mother:
|
||||
rule = SearchMotherName([mother])
|
||||
if regex:
|
||||
rule = RegExpMotherName([mother])
|
||||
else:
|
||||
rule = SearchMotherName([mother])
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
if child:
|
||||
rule = SearchChildName([child])
|
||||
if regex:
|
||||
rule = RegExpChildName([child])
|
||||
else:
|
||||
rule = SearchChildName([child])
|
||||
generic_filter.add_rule(rule)
|
||||
|
||||
if etype:
|
||||
|
Loading…
Reference in New Issue
Block a user