2465: More rules according to User Interface Object tabs

svn: r11235
This commit is contained in:
Jérôme Rapinat 2008-11-02 09:35:19 +00:00
parent efcf41b983
commit 77b46f0abb
12 changed files with 296 additions and 2 deletions

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasNoteBase import HasNoteBase
#-------------------------------------------------------------------------
# "Events having notes"
#-------------------------------------------------------------------------
class HasNote(HasNoteBase):
"""Events having notes"""
name = _('Events having note')
description = _("Matches events that have a note")

View File

@ -33,6 +33,7 @@ from _AllEvents import AllEvents
from _HasGallery import HasGallery from _HasGallery import HasGallery
from _HasIdOf import HasIdOf from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf from _RegExpIdOf import RegExpIdOf
from _HasNote import HasNote
from _HasNoteRegexp import HasNoteRegexp from _HasNoteRegexp import HasNoteRegexp
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
from _HasReferenceCountOf import HasReferenceCountOf from _HasReferenceCountOf import HasReferenceCountOf
@ -51,6 +52,7 @@ editor_rule_list = [
# TODO: At the time of this writing, the GRAMPS UI does not allow setting markers for events. 1197 bug-report # TODO: At the time of this writing, the GRAMPS UI does not allow setting markers for events. 1197 bug-report
# HasMarkerOf, # HasMarkerOf,
RegExpIdOf, RegExpIdOf,
HasNote,
HasNoteRegexp, HasNoteRegexp,
HasNoteMatchingSubstringOf, HasNoteMatchingSubstringOf,
HasReferenceCountOf, HasReferenceCountOf,

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasNoteBase import HasNoteBase
#-------------------------------------------------------------------------
# "Families having notes"
#-------------------------------------------------------------------------
class HasNote(HasNoteBase):
"""Families having notes"""
name = _('Families having note')
description = _("Matches families that have a note")

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasSourceBase import HasSourceBase
#-------------------------------------------------------------------------
# "Families having sources"
#-------------------------------------------------------------------------
class HasSource(HasSourceBase):
"""Families with sources"""
name = _('Families with source')
description = _("Matches families with a source")

View File

@ -38,8 +38,10 @@ from _HasGallery import HasGallery
from _HasIdOf import HasIdOf from _HasIdOf import HasIdOf
from _HasLDS import HasLDS from _HasLDS import HasLDS
from _RegExpIdOf import RegExpIdOf from _RegExpIdOf import RegExpIdOf
from _HasNote import HasNote
from _HasNoteRegexp import HasNoteRegexp from _HasNoteRegexp import HasNoteRegexp
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
from _HasSource import HasSource
from _HasReferenceCountOf import HasReferenceCountOf from _HasReferenceCountOf import HasReferenceCountOf
from _FamilyPrivate import FamilyPrivate from _FamilyPrivate import FamilyPrivate
from _HasAttribute import HasAttribute from _HasAttribute import HasAttribute
@ -60,10 +62,12 @@ editor_rule_list = [
HasGallery, HasGallery,
HasIdOf, HasIdOf,
HasLDS, HasLDS,
HasNote,
RegExpIdOf, RegExpIdOf,
HasNoteRegexp, HasNoteRegexp,
HasNoteMatchingSubstringOf, HasNoteMatchingSubstringOf,
HasReferenceCountOf, HasReferenceCountOf,
HasSource,
FamilyPrivate, FamilyPrivate,
HasEvent, HasEvent,
HasAttribute, HasAttribute,

View File

@ -43,8 +43,8 @@ from Filters.Rules import Rule
class HasAddress(Rule): class HasAddress(Rule):
"""Rule that checks for a person with a personal address""" """Rule that checks for a person with a personal address"""
name = _('People with the personal address') name = _('People with address')
description = _("Matches people with the personal address") description = _("Matches people with a personal address")
category = _('General filters') category = _('General filters')
def apply(self, db, person): def apply(self, db, person):

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasSourceBase import HasSourceBase
#-------------------------------------------------------------------------
# "People having sources"
#-------------------------------------------------------------------------
class HasSource(HasSourceBase):
"""People with sources"""
name = _('People with source')
description = _("Matches people with a source")

View File

@ -47,6 +47,7 @@ from _HasNote import HasNote
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
from _HasNoteRegexp import HasNoteRegexp from _HasNoteRegexp import HasNoteRegexp
from _HasRelationship import HasRelationship from _HasRelationship import HasRelationship
from _HasSource import HasSource
from _HasSourceOf import HasSourceOf from _HasSourceOf import HasSourceOf
from _HasTextMatchingRegexpOf import HasTextMatchingRegexpOf from _HasTextMatchingRegexpOf import HasTextMatchingRegexpOf
from _HasTextMatchingSubstringOf import HasTextMatchingSubstringOf from _HasTextMatchingSubstringOf import HasTextMatchingSubstringOf
@ -124,6 +125,7 @@ editor_rule_list = [
HasFamilyEvent, HasFamilyEvent,
HasAttribute, HasAttribute,
HasFamilyAttribute, HasFamilyAttribute,
HasSource,
HasSourceOf, HasSourceOf,
HasMarkerOf, HasMarkerOf,
HaveAltFamilies, HaveAltFamilies,

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasNoteBase import HasNoteBase
#-------------------------------------------------------------------------
# "Places having notes"
#-------------------------------------------------------------------------
class HasNote(HasNoteBase):
"""Places having notes"""
name = _('Places having note')
description = _("Matches places that have a note")

View File

@ -29,6 +29,7 @@ from _AllPlaces import AllPlaces
from _HasGallery import HasGallery from _HasGallery import HasGallery
from _HasIdOf import HasIdOf from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf from _RegExpIdOf import RegExpIdOf
from _HasNote import HasNote
from _HasNoteRegexp import HasNoteRegexp from _HasNoteRegexp import HasNoteRegexp
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
from _HasReferenceCountOf import HasReferenceCountOf from _HasReferenceCountOf import HasReferenceCountOf
@ -44,6 +45,7 @@ editor_rule_list = [
HasGallery, HasGallery,
HasIdOf, HasIdOf,
RegExpIdOf, RegExpIdOf,
HasNote,
HasNoteRegexp, HasNoteRegexp,
HasNoteMatchingSubstringOf, HasNoteMatchingSubstringOf,
HasReferenceCountOf, HasReferenceCountOf,

View File

@ -0,0 +1,47 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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: _HasNote.py 9912 2008-01-22 09:17:46Z acraphae $
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasNoteBase import HasNoteBase
#-------------------------------------------------------------------------
# "Sources having notes"
#-------------------------------------------------------------------------
class HasNote(HasNoteBase):
"""Sources having notes"""
name = _('Sources having note')
description = _("Matches sources that have a note")

View File

@ -29,6 +29,7 @@ from _AllSources import AllSources
from _HasGallery import HasGallery from _HasGallery import HasGallery
from _HasIdOf import HasIdOf from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf from _RegExpIdOf import RegExpIdOf
from _HasNote import HasNote
from _HasNoteRegexp import HasNoteRegexp from _HasNoteRegexp import HasNoteRegexp
from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf from _HasNoteMatchingSubstringOf import HasNoteMatchingSubstringOf
from _HasReferenceCountOf import HasReferenceCountOf from _HasReferenceCountOf import HasReferenceCountOf
@ -41,6 +42,7 @@ editor_rule_list = [
HasGallery, HasGallery,
HasIdOf, HasIdOf,
RegExpIdOf, RegExpIdOf,
HasNote,
HasNoteRegexp, HasNoteRegexp,
HasNoteMatchingSubstringOf, HasNoteMatchingSubstringOf,
HasReferenceCountOf, HasReferenceCountOf,