2465: More rules according to User Interface Object tabs

svn: r11209
This commit is contained in:
Jérôme Rapinat 2008-10-28 09:00:51 +00:00
parent 6243197c54
commit 923c3c7724
7 changed files with 145 additions and 5 deletions

View File

@ -0,0 +1,44 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 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
#
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasGalleryBase import HasGalleryBase
#-------------------------------------------------------------------------
# "Events who have images"
#-------------------------------------------------------------------------
class HasGallery(HasGalleryBase):
"""Rule that checks for events who have Media object reference"""
name = _('Event with images')
description = _("Matches event with image in the gallery")

View File

@ -2,7 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2007 Brian G. Matherly
# Copyright (C) 2007-2008 Brian G. Matherly
#
# 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
@ -30,6 +30,7 @@ from Filters.Rules._HasEventBase import HasEventBase as HasEvent
from _HasType import HasType
from _HasMarkerOf import HasMarkerOf
from _AllEvents import AllEvents
from _HasGallery import HasGallery
from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf
from _HasNoteRegexp import HasNoteRegexp
@ -46,7 +47,8 @@ editor_rule_list = [
AllEvents,
HasType,
HasIdOf,
# TODO: At the time of this writing, the GRAMPS UI does not allow setting markers for events.
HasGallery
# TODO: At the time of this writing, the GRAMPS UI does not allow setting markers for events. 1197 bug-report
# HasMarkerOf,
RegExpIdOf,
HasNoteRegexp,

View File

@ -57,7 +57,7 @@ from _ChildHasIdOf import ChildHasIdOf
editor_rule_list = [
AllFamilies,
HasRelType,
HasGallery
HasGallery,
HasIdOf,
HasLDS,
RegExpIdOf,

View File

@ -0,0 +1,44 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 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
#
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasGalleryBase import HasGalleryBase
#-------------------------------------------------------------------------
# "Places who have images"
#-------------------------------------------------------------------------
class HasGallery(HasGalleryBase):
"""Rule that checks for places who have Media object reference"""
name = _('Place with images')
description = _("Matches place with image in the gallery")

View File

@ -1,7 +1,8 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
#
# 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
@ -25,6 +26,7 @@ Package providing filter rules for GRAMPS.
"""
from _AllPlaces import AllPlaces
from _HasGallery import HasGallery
from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf
from _HasNoteRegexp import HasNoteRegexp
@ -39,6 +41,7 @@ from _MatchesEventFilter import MatchesEventFilter
editor_rule_list = [
AllPlaces,
HasGallery,
HasIdOf,
RegExpIdOf,
HasNoteRegexp,

View File

@ -0,0 +1,44 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 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
#
#-------------------------------------------------------------------------
#
# Standard Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GRAMPS modules
#
#-------------------------------------------------------------------------
from Filters.Rules._HasGalleryBase import HasGalleryBase
#-------------------------------------------------------------------------
# "Sources who have images"
#-------------------------------------------------------------------------
class HasGallery(HasGalleryBase):
"""Rule that checks for sources who have Media object reference"""
name = _('Source with images')
description = _("Matches source with image in the gallery")

View File

@ -1,7 +1,8 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2002-2007 Donald N. Allingham
# Copyright (C) 2007-2008 Brian G. Matherly
#
# 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
@ -25,6 +26,7 @@ Package providing filter rules for GRAMPS.
"""
from _AllSources import AllSources
from _HasGallery import HasGallery
from _HasIdOf import HasIdOf
from _RegExpIdOf import RegExpIdOf
from _HasNoteRegexp import HasNoteRegexp
@ -36,6 +38,7 @@ from _HasSource import HasSource
editor_rule_list = [
AllSources,
HasGallery,
HasIdOf,
RegExpIdOf,
HasNoteRegexp,