diff --git a/ChangeLog b/ChangeLog index 32571f50c..7d8db5eff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2007-06-16 Alex Roitman + * src/Filters/Rules/Person/_IsChildOfFilterMatch.py + (IsChildOfFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_IsAncestorOfFilterMatch.py + (IsAncestorOfFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_IsDescendantOfFilterMatch.py + (IsDescendantOfFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_HasCommonAncestorWithFilterMatch.py + (HasCommonAncestorWithFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_IsParentOfFilterMatch.py + (IsParentOfFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py + (IsSiblingOfFilterMatch): Subclass MatchesFilter. + * src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py + (IsSpouseOfFilterMatch): Subclass MatchesFilter. + 2007-06-15 Don Allingham * src/GrampsDbUtils/_Backup.py: Optimization and documentation. diff --git a/src/FilterEditor/_FilterEditor.py b/src/FilterEditor/_FilterEditor.py index 24b9e0bec..b4e88537f 100644 --- a/src/FilterEditor/_FilterEditor.py +++ b/src/FilterEditor/_FilterEditor.py @@ -209,7 +209,7 @@ class FilterEditor(ManagedWindow.ManagedWindow): """ This method recursively calls itself to delete all dependent filters before removing this filter. Otherwise when A is 'matches B' - and C is 'matches D' the removal of A leads to two broken filter + and C is 'matches D' the removal of D leads to two broken filter being left behind. """ filters = self.filterdb.get_filters(space) @@ -220,6 +220,7 @@ class FilterEditor(ManagedWindow.ManagedWindow): if issubclass(rule.__class__,MatchesFilterBase) \ and (name in values): self._do_delete_filter(space,the_filter) + break filters.remove(gfilter) def get_all_handles(self): diff --git a/src/Filters/Rules/Person/_HasCommonAncestorWithFilterMatch.py b/src/Filters/Rules/Person/_HasCommonAncestorWithFilterMatch.py index a675644c8..96c2b0e03 100644 --- a/src/Filters/Rules/Person/_HasCommonAncestorWithFilterMatch.py +++ b/src/Filters/Rules/Person/_HasCommonAncestorWithFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -41,7 +41,7 @@ from _MatchesFilter import MatchesFilter # HasCommonAncestorWithFilterMatch # #------------------------------------------------------------------------- -class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith): +class HasCommonAncestorWithFilterMatch(HasCommonAncestorWith,MatchesFilter): """Rule that checks for a person that has a common ancestor with someone matching a filter""" diff --git a/src/Filters/Rules/Person/_IsAncestorOfFilterMatch.py b/src/Filters/Rules/Person/_IsAncestorOfFilterMatch.py index 8760e6f23..71d16bef2 100644 --- a/src/Filters/Rules/Person/_IsAncestorOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsAncestorOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -40,7 +40,7 @@ from _MatchesFilter import MatchesFilter # IsAncestorOfFilterMatch # #------------------------------------------------------------------------- -class IsAncestorOfFilterMatch(IsAncestorOf): +class IsAncestorOfFilterMatch(IsAncestorOf,MatchesFilter): """Rule that checks for a person that is an ancestor of someone matched by a filter""" diff --git a/src/Filters/Rules/Person/_IsChildOfFilterMatch.py b/src/Filters/Rules/Person/_IsChildOfFilterMatch.py index caefef644..7ebdafed9 100644 --- a/src/Filters/Rules/Person/_IsChildOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsChildOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -32,7 +32,6 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Filters.Rules._Rule import Rule from _MatchesFilter import MatchesFilter #------------------------------------------------------------------------- @@ -40,7 +39,7 @@ from _MatchesFilter import MatchesFilter # IsChildOfFilterMatch # #------------------------------------------------------------------------- -class IsChildOfFilterMatch(Rule): +class IsChildOfFilterMatch(MatchesFilter): """Rule that checks for a person that is a child of someone matched by a filter""" diff --git a/src/Filters/Rules/Person/_IsDescendantOfFilterMatch.py b/src/Filters/Rules/Person/_IsDescendantOfFilterMatch.py index 3a201c4fe..d4f7c6ccf 100644 --- a/src/Filters/Rules/Person/_IsDescendantOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsDescendantOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -40,7 +40,7 @@ from _MatchesFilter import MatchesFilter # IsDescendantOfFilterMatch # #------------------------------------------------------------------------- -class IsDescendantOfFilterMatch(IsDescendantOf): +class IsDescendantOfFilterMatch(IsDescendantOf,MatchesFilter): """Rule that checks for a person that is a descendant of someone matched by a filter""" diff --git a/src/Filters/Rules/Person/_IsParentOfFilterMatch.py b/src/Filters/Rules/Person/_IsParentOfFilterMatch.py index b681179ab..2149c223e 100644 --- a/src/Filters/Rules/Person/_IsParentOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsParentOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -32,7 +32,6 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Filters.Rules._Rule import Rule from _MatchesFilter import MatchesFilter #------------------------------------------------------------------------- @@ -40,7 +39,7 @@ from _MatchesFilter import MatchesFilter # IsParentOfFilterMatch # #------------------------------------------------------------------------- -class IsParentOfFilterMatch(Rule): +class IsParentOfFilterMatch(MatchesFilter): """Rule that checks for a person that is a parent of someone matched by a filter""" diff --git a/src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py b/src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py index 2f4decbc8..644ec9036 100644 --- a/src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsSiblingOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -32,7 +32,6 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Filters.Rules._Rule import Rule from _MatchesFilter import MatchesFilter #------------------------------------------------------------------------- @@ -40,7 +39,7 @@ from _MatchesFilter import MatchesFilter # IsSiblingOfFilterMatch # #------------------------------------------------------------------------- -class IsSiblingOfFilterMatch(Rule): +class IsSiblingOfFilterMatch(MatchesFilter): """Rule that checks for siblings of someone matched by a filter""" labels = [ _('Filter name:') ] diff --git a/src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py b/src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py index b2966004f..e1444a82e 100644 --- a/src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py +++ b/src/Filters/Rules/Person/_IsSpouseOfFilterMatch.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2002-2006 Donald N. Allingham +# Copyright (C) 2002-2007 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 @@ -32,7 +32,6 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Filters.Rules._Rule import Rule from _MatchesFilter import MatchesFilter #------------------------------------------------------------------------- @@ -40,7 +39,7 @@ from _MatchesFilter import MatchesFilter # IsSpouseOfFilterMatch # #------------------------------------------------------------------------- -class IsSpouseOfFilterMatch(Rule): +class IsSpouseOfFilterMatch(MatchesFilter): """Rule that checks for a person married to someone matching a filter"""