From 02a0fc307262bc1e4c24e7cf98590267200e1729 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 12 Jun 2004 04:39:45 +0000 Subject: [PATCH] * src/filters/*: removed * src/plugins/WritePkg.py: brought up to date svn: r3205 --- ChangeLog | 4 + gramps-mdk.spec | 2 +- gramps.spec | 2 +- src/AddSpouse.py | 1 - src/DbPrompter.py | 2 - src/EventEdit.py | 1 - src/GrampsCfg.py | 15 - src/ImageSelect.py | 4 +- src/Marriage.py | 9 +- src/const.py.in | 2 - src/filters/After.py | 57 --- src/filters/AltFam.py | 39 -- src/filters/Before.py | 57 --- src/filters/Complete.py | 42 -- src/filters/Disconnected.py | 40 -- src/filters/EventPlace.py | 70 ---- src/filters/EventType.py | 42 -- src/filters/Females.py | 40 -- src/filters/HavePhotos.py | 40 -- src/filters/IncompleteNames.py | 40 -- src/filters/Makefile.am | 31 -- src/filters/Makefile.in | 336 ---------------- src/filters/Males.py | 41 -- src/filters/MatchSndEx.py | 45 --- src/filters/MatchSndEx2.py | 43 --- src/filters/MutlipleMarriages.py | 39 -- src/filters/NeverMarried.py | 40 -- src/filters/NoBirthdate.py | 40 -- src/filters/NoChildren.py | 45 --- src/filters/RegExMatch.py | 60 --- src/filters/SubString.py | 45 --- src/gramps.glade | 640 ++----------------------------- src/plugins/Merge.py | 7 +- src/plugins/WritePkg.py | 43 ++- src/plugins/pkgexport.glade | 144 ------- 35 files changed, 64 insertions(+), 2044 deletions(-) delete mode 100644 src/filters/After.py delete mode 100644 src/filters/AltFam.py delete mode 100644 src/filters/Before.py delete mode 100644 src/filters/Complete.py delete mode 100644 src/filters/Disconnected.py delete mode 100644 src/filters/EventPlace.py delete mode 100644 src/filters/EventType.py delete mode 100644 src/filters/Females.py delete mode 100644 src/filters/HavePhotos.py delete mode 100644 src/filters/IncompleteNames.py delete mode 100644 src/filters/Makefile.am delete mode 100644 src/filters/Makefile.in delete mode 100644 src/filters/Males.py delete mode 100644 src/filters/MatchSndEx.py delete mode 100644 src/filters/MatchSndEx2.py delete mode 100644 src/filters/MutlipleMarriages.py delete mode 100644 src/filters/NeverMarried.py delete mode 100644 src/filters/NoBirthdate.py delete mode 100644 src/filters/NoChildren.py delete mode 100644 src/filters/RegExMatch.py delete mode 100644 src/filters/SubString.py delete mode 100644 src/plugins/pkgexport.glade diff --git a/ChangeLog b/ChangeLog index fe5fe689f..c78b88eb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-06-11 Don Allingham + * src/filters/*: removed + * src/plugins/WritePkg.py: brought up to date + 2004-06-09 Don Allingham * src/plugins/WriteGedcom.py: brought up to date * src/gramps_main.py: beta warning diff --git a/gramps-mdk.spec b/gramps-mdk.spec index 25f110def..c1aeaf2c8 100644 --- a/gramps-mdk.spec +++ b/gramps-mdk.spec @@ -1,5 +1,5 @@ %define ver 1.1.0 -%define rel 0.CVS20040527 +%define rel 0.CVS20040609 %define prefix /usr %define localstatedir /var/lib # Ensure that internal RPM macros for configure & makeinstall diff --git a/gramps.spec b/gramps.spec index fa5c40820..d40f4d4d8 100644 --- a/gramps.spec +++ b/gramps.spec @@ -1,5 +1,5 @@ %define ver 1.1.0 -%define rel 0.CVS20040527 +%define rel 0.CVS20040609 %define prefix /usr %define localstatedir /var/lib # Ensure that internal RPM macros for configure & makeinstall diff --git a/src/AddSpouse.py b/src/AddSpouse.py index ea0a7fa10..c2538089d 100644 --- a/src/AddSpouse.py +++ b/src/AddSpouse.py @@ -350,5 +350,4 @@ class AddSpouse: self.filter_func = self.all_filter else: self.filter_func = self.likely_filter - print self.filter_func self.update_data() diff --git a/src/DbPrompter.py b/src/DbPrompter.py index 83aa445ba..1f0a00e1d 100644 --- a/src/DbPrompter.py +++ b/src/DbPrompter.py @@ -115,8 +115,6 @@ class DbPrompter: response = choose.run() if response == gtk.RESPONSE_OK: filename = choose.get_filename() - print choose.get_filename() - print choose.get_uri() if save and os.path.splitext(filename)[1] != ".grdb": filename = filename + ".grdb" self.db.read_file(filename) diff --git a/src/EventEdit.py b/src/EventEdit.py index abc0af5e8..84f293bad 100644 --- a/src/EventEdit.py +++ b/src/EventEdit.py @@ -82,7 +82,6 @@ class EventEditor: for v in elist: values[v] = 1 for v in self.db.get_eventnames(): - print v values[v] = 1 self.elist = values.keys() diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 9dbebbb09..38367bb67 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -147,7 +147,6 @@ goutput_preference = "" lastnamegen = None report_dir = "./" web_dir = "./" -db_dir = "./" id_edit = 0 index_visible = 0 mediaref = 1 @@ -213,7 +212,6 @@ def loadConfig(call): global lastnamegen global report_dir global web_dir - global db_dir global status_bar global toolbar global save_toolbar @@ -268,7 +266,6 @@ def loadConfig(call): report_dir = get_string("/apps/gramps/report-directory") web_dir = get_string("/apps/gramps/website-directory") - db_dir = get_string("/apps/gramps/db-directory") if report_dir == None: report_dir = "./" @@ -280,11 +277,6 @@ def loadConfig(call): else: web_dir = os.path.normpath(web_dir) + os.sep - if db_dir == None: - db_dir = "./" - else: - db_dir = os.path.normpath(db_dir) + os.sep - if paper_preference == None: paper_preference = "Letter" @@ -719,7 +711,6 @@ class GrampsPreferences: self.top.get_widget("resphone").set_text(cphone) self.top.get_widget("resemail").set_text(cemail) - self.top.get_widget("dbdir").gtk_entry().set_text(db_dir) self.top.get_widget("repdir").gtk_entry().set_text(report_dir) self.top.get_widget("htmldir").gtk_entry().set_text(web_dir) @@ -818,7 +809,6 @@ class GrampsPreferences: global goutput_preference global report_dir global web_dir - global db_dir global lastnamegen global autoload @@ -874,10 +864,6 @@ class GrampsPreferences: if pprefix == "": pprefix = "P%04d" - dbdir_temp = self.top.get_widget("dbdir").get_full_path(1) - if dbdir_temp != None and os.path.isdir(dbdir_temp): - db_dir = os.path.normpath(dbdir_temp) + os.sep - repdir_temp = self.top.get_widget("repdir").get_full_path(1) if repdir_temp != None and os.path.isdir(repdir_temp): report_dir = os.path.normpath(repdir_temp) + os.sep @@ -909,7 +895,6 @@ class GrampsPreferences: set_string("/apps/gramps/report-directory",report_dir) set_string("/apps/gramps/website-directory",web_dir) - set_string("/apps/gramps/db-directory",db_dir) set_string("/apps/gramps/iprefix",iprefix) set_string("/apps/gramps/fprefix",fprefix) set_string("/apps/gramps/pprefix",pprefix) diff --git a/src/ImageSelect.py b/src/ImageSelect.py index ca02d2748..7e84f3087 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -1074,13 +1074,13 @@ class GlobalMediaProperties: self.refmodel.add([_("Family"),p.get_id(),Utils.family_name(p,self.db)]) any = 1 for key in self.db.get_source_keys(): - p = self.db.get_source(key) + p = self.db.try_to_find_source_from_id(key) for o in p.get_media_list(): if o.get_reference_id() == self.object.get_id(): self.refmodel.add([_("Source"),p.get_id(),p.get_title()]) any = 1 for key in self.db.get_place_id_keys(): - p = self.db.get_place_id(key) + p = self.db.try_to_find_place_from_id(key) for o in p.get_media_list(): if o.get_reference_id() == self.object.get_id(): self.refmodel.add([_("Place"),p.get_id(),p.get_title()]) diff --git a/src/Marriage.py b/src/Marriage.py index 95cfe8757..cae8c5cac 100644 --- a/src/Marriage.py +++ b/src/Marriage.py @@ -82,7 +82,6 @@ class Marriage: self.cb = callback self.update_fv = update self.pmap = {} - self.add_places = [] if family: self.srcreflist = family.get_source_references() @@ -100,7 +99,8 @@ class Marriage: _('Marriage/Relationship Editor')) self.icon_list = self.get_widget('iconlist') - self.gallery = ImageSelect.Gallery(family, self.path, self.icon_list, db, self) + self.gallery = ImageSelect.Gallery(family, self.db.commit_family, + self.path, self.icon_list, db, self) self.top.signal_autoconnect({ "destroy_passed_object" : self.on_cancel_edit, @@ -778,7 +778,7 @@ class Marriage: else: temple = "" - if date or temple or place: + if date or temple: Utils.bold_label(self.lds_label) else: Utils.unbold_label(self.lds_label) @@ -788,13 +788,12 @@ class Marriage: text = string.strip(unicode(field.get_text())) if text: if self.pmap.has_key(text): - return self.db.try_to_find_place_from_id(self.pmap[text],trans) + return self.db.try_to_find_place_from_id(self.pmap[text]) elif makenew: place = RelLib.Place() place.set_title(text) self.db.add_place(place,trans) self.pmap[text] = place.get_id() - self.add_places.append(place) return place else: return None diff --git a/src/const.py.in b/src/const.py.in index ab2b12731..e6a6215c9 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -88,9 +88,7 @@ errdialogsFile = "%s/gramps.glade" % rootDir pluginsDir = "%s/plugins" % rootDir calendarDir = "%s/calendars" % rootDir docgenDir = "%s/docgen" % rootDir -filtersDir = "%s/filters" % rootDir dataDir = "%s/data" % rootDir -gtkrcFile = "%s/gtkrc" % rootDir template_dir = "%s/templates" % dataDir papersize = "file:%s/papersize.xml" % dataDir tipdata = "%s/tips.xml" % dataDir diff --git a/src/filters/After.py b/src/filters/After.py deleted file mode 100644 index 228aa9ce8..000000000 --- a/src/filters/After.py +++ /dev/null @@ -1,57 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with an event after ..." - -import Filter -import Date -from gettext import gettext as _ - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -class EventAfter(Filter.Filter): - "People with an event after ..." - - def __init__(self,text): - self.date = Date.Date() - self.date.set(text) - Filter.Filter.__init__(self,text) - - def match(self,p): - for event in p.get_event_list() + [p.get_birth(), p.get_death()]: - if self.date.get_date() == "" or event.get_date() == "": - continue - if event.get_date_object().greater_than(self.date): - return 1 - return 0 - -#-------------------------------------------------------------------- -# -# -# -#-------------------------------------------------------------------- -Filter.register_filter(EventAfter, - description=_("People with an event after ..."), - label=_("Date"), - qualifier=1) - diff --git a/src/filters/AltFam.py b/src/filters/AltFam.py deleted file mode 100644 index fe2b905ea..000000000 --- a/src/filters/AltFam.py +++ /dev/null @@ -1,39 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People who were adopted" - -import Filter -from gettext import gettext as _ - -class HaveAltFamilies(Filter.Filter): - "People who were adopted" - - def match(self,person): - for vals in person.get_parent_family_id_list(): - if vals[1] == "Adopted" or vals[2] == "Adopted": - return 1 - return 0 - - -Filter.register_filter(HaveAltFamilies, - description=_("People who were adopted"), - qualifier=0) - diff --git a/src/filters/Before.py b/src/filters/Before.py deleted file mode 100644 index 50d112c55..000000000 --- a/src/filters/Before.py +++ /dev/null @@ -1,57 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with an event before ..." - -import Filter -import Date -from gettext import gettext as _ - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -class EventBefore(Filter.Filter): - "People with an event before ..." - - def __init__(self,text): - self.date = Date.Date() - self.date.set(text) - Filter.Filter.__init__(self,text) - - def match(self,p): - for event in p.get_event_list() + [p.get_birth(), p.get_death()]: - if self.date.get_date() == "" or event.get_date() == "": - continue - if event.get_date_object().less_than(self.date): - return 1 - return 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(EventBefore, - description=_("People with an event before ..."), - label=_("Date"), - qualifier=1) - diff --git a/src/filters/Complete.py b/src/filters/Complete.py deleted file mode 100644 index 06c8cc685..000000000 --- a/src/filters/Complete.py +++ /dev/null @@ -1,42 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2003 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$ - -"People with complete information" - -import Filter -from gettext import gettext as _ - -class IsComplete(Filter.Filter): - "People with complete information" - - def match(self,person): - return person.get_complete() == 1 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(IsComplete, - description=_("People with complete information"), - qualifier=0) - diff --git a/src/filters/Disconnected.py b/src/filters/Disconnected.py deleted file mode 100644 index 72b2b5368..000000000 --- a/src/filters/Disconnected.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"Disconnected individuals" - -import Filter -from gettext import gettext as _ - -class Disconnected(Filter.Filter): - "Disconnected individuals" - - def match(self,person): - return person.get_main_parents_family_id() == None and len(person.get_family_id_list()) == 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(Disconnected, - description= _("Disconnected individuals"), - qualifier=0) - diff --git a/src/filters/EventPlace.py b/src/filters/EventPlace.py deleted file mode 100644 index 3f998dea1..000000000 --- a/src/filters/EventPlace.py +++ /dev/null @@ -1,70 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with an event location of ..." - -import Filter -import re -from gettext import gettext as _ - -class EventPlace(Filter.Filter): - """Finds people with a specfied event location in any field""" - - def __init__(self,text): - self.ok = 1 - try: - self.regexp = re.compile(text,re.IGNORECASE) - except: - self.ok = 0 - Filter.Filter.__init__(self,text) - - def match(self,person): - list = person.get_event_list()[:] - list.append(person.get_birth()) - list.append(person.get_death()) - for event in list: - if self.regexp.search(event.get_place_name()): - return 1 - place = event.get_place_id() - if not place: - continue - locs = [place.get_main_location()] + place.get_alternate_locations() - for location in locs: - if self.regexp.search(location.get_city()): - return 1 - if self.regexp.search(location.get_parish()): - return 1 - if self.regexp.search(location.get_county()): - return 1 - if self.regexp.search(location.get_state()): - return 1 - if self.regexp.search(location.get_country()): - return 1 - return 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(EventPlace, - description=_("People with an event location of ..."), - label=_("Place"), - qualifier=1) diff --git a/src/filters/EventType.py b/src/filters/EventType.py deleted file mode 100644 index 64b00761a..000000000 --- a/src/filters/EventType.py +++ /dev/null @@ -1,42 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People who have an event type of ..." - -import Filter -from gettext import gettext as _ - -class EventType(Filter.Filter): - - def match(self,person): - for event in person.get_event_list(): - if event.get_name() == self.text: - return 1 - return 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(EventType, - description=_("People who have an event type of ..."), - label=_("Event"), - qualifier=1) diff --git a/src/filters/Females.py b/src/filters/Females.py deleted file mode 100644 index 88710c205..000000000 --- a/src/filters/Females.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"Females" - -import Filter -import RelLib -from gettext import gettext as _ - -class Females(Filter.Filter): - "Females" - - def match(self,person): - return person.get_gender() == RelLib.Person.female - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(Females, - description=_("Females"), - qualifier=0) diff --git a/src/filters/HavePhotos.py b/src/filters/HavePhotos.py deleted file mode 100644 index 9830a3819..000000000 --- a/src/filters/HavePhotos.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People who have images" - -import Filter -from gettext import gettext as _ - -class HavePhotos(Filter.Filter): - "People who have images" - - def match(self,person): - return len(person.get_media_list()) > 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(HavePhotos, - description=_("People who have images"), - qualifier=0) - diff --git a/src/filters/IncompleteNames.py b/src/filters/IncompleteNames.py deleted file mode 100644 index 07c165f09..000000000 --- a/src/filters/IncompleteNames.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with incomplete names" - -import Filter -from gettext import gettext as _ - -class IncompleteNames(Filter.Filter): - "People with incomplete names" - - def match(self,person): - name = person.get_primary_name() - return name.get_first_name() == "" or name.get_surname() == "" - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(IncompleteNames, - description=_("People with incomplete names"), - qualifier=0) diff --git a/src/filters/Makefile.am b/src/filters/Makefile.am deleted file mode 100644 index 180825c60..000000000 --- a/src/filters/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -# This is the src/filters level Makefile for Gramps -# Use GNU make's ':=' syntax for nice wildcard use. -# If not using GNU make, then list all .py files individually -pkgpython_PYTHON = \ - After.py\ - AltFam.py\ - Before.py\ - Disconnected.py\ - EventPlace.py\ - EventType.py\ - Females.py\ - HavePhotos.py\ - IncompleteNames.py\ - Males.py\ - MatchSndEx2.py\ - MatchSndEx.py\ - MutlipleMarriages.py\ - NeverMarried.py\ - NoBirthdate.py\ - NoChildren.py\ - RegExMatch.py\ - SubString.py - -pkgpyexecdir = @pkgpyexecdir@/filters -pkgpythondir = @pkgpythondir@/filters - -GRAMPS_PY_MODPATH = "../" - -pycheck: - (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ - pychecker $(pkgpython_PYTHON)); diff --git a/src/filters/Makefile.in b/src/filters/Makefile.in deleted file mode 100644 index cf4a8f87a..000000000 --- a/src/filters/Makefile.in +++ /dev/null @@ -1,336 +0,0 @@ -# Makefile.in generated by automake 1.8.3 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -subdir = src/filters -DIST_COMMON = $(pkgpython_PYTHON) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(mkdir_p) -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -am__installdirs = "$(DESTDIR)$(pkgpythondir)" -pkgpythonPYTHON_INSTALL = $(INSTALL_DATA) -py_compile = $(top_srcdir)/py-compile -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BINSH = @BINSH@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -GNOMEHELP = @GNOMEHELP@ -GPREFIX = @GPREFIX@ -ICONV = @ICONV@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LANGUAGES = @LANGUAGES@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MOFILES = @MOFILES@ -MSGCONV = @MSGCONV@ -MSGFMT = @MSGFMT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -POFILES = @POFILES@ -PYGTK_CFLAGS = @PYGTK_CFLAGS@ -PYGTK_LIBS = @PYGTK_LIBS@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RELEASE = @RELEASE@ -SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SK_CONFIG = @SK_CONFIG@ -STRIP = @STRIP@ -VERSION = @VERSION@ -VERSIONSTRING = @VERSIONSTRING@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -bindir = @bindir@ -build_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pkgpyexecdir = @pkgpyexecdir@/filters -pkgpythondir = @pkgpythondir@/filters -prefix = @prefix@ -program_transform_name = @program_transform_name@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ - -# This is the src/filters level Makefile for Gramps -# Use GNU make's ':=' syntax for nice wildcard use. -# If not using GNU make, then list all .py files individually -pkgpython_PYTHON = \ - After.py\ - AltFam.py\ - Before.py\ - Disconnected.py\ - EventPlace.py\ - EventType.py\ - Females.py\ - HavePhotos.py\ - IncompleteNames.py\ - Males.py\ - MatchSndEx2.py\ - MatchSndEx.py\ - MutlipleMarriages.py\ - NeverMarried.py\ - NoBirthdate.py\ - NoChildren.py\ - RegExMatch.py\ - SubString.py - -GRAMPS_PY_MODPATH = "../" -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/filters/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/filters/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-pkgpythonPYTHON: $(pkgpython_PYTHON) - @$(NORMAL_INSTALL) - test -z "$(pkgpythondir)" || $(mkdir_p) "$(DESTDIR)$(pkgpythondir)" - @list='$(pkgpython_PYTHON)'; dlist=''; for p in $$list; do\ - if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ - if test -f $$b$$p; then \ - d=`echo $$p | sed -e 's,^.*/,,'`; \ - dlist="$$dlist $$d"; \ - echo " $(pkgpythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pkgpythondir)/$$d'"; \ - $(pkgpythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pkgpythondir)/$$d"; \ - else :; fi; \ - done; \ - test -z "$$dlist" || \ - PYTHON=$(PYTHON) $(py_compile) --basedir "$(DESTDIR)$(pkgpythondir)" $$dlist - -uninstall-pkgpythonPYTHON: - @$(NORMAL_UNINSTALL) - @list='$(pkgpython_PYTHON)'; dlist=''; for p in $$list; do\ - d=`echo $$p | sed -e 's,^.*/,,'`; \ - rm -f "$(DESTDIR)$(pkgpythondir)/$$d"; \ - rm -f "$(DESTDIR)$(pkgpythondir)/$${d}c"; \ - rm -f "$(DESTDIR)$(pkgpythondir)/$${d}o"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile -installdirs: - for dir in "$(DESTDIR)$(pkgpythondir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-pkgpythonPYTHON - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-pkgpythonPYTHON - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-pkgpythonPYTHON install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ - uninstall-pkgpythonPYTHON - - -pycheck: - (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ - pychecker $(pkgpython_PYTHON)); -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/filters/Males.py b/src/filters/Males.py deleted file mode 100644 index 0d3846cde..000000000 --- a/src/filters/Males.py +++ /dev/null @@ -1,41 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"Males" - -import Filter -import RelLib -from gettext import gettext as _ - -class Males(Filter.Filter): - "Males" - - def match(self,person): - return person.get_gender() == RelLib.Person.male - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(Males, - description=_("Males"), - qualifier=0) - diff --git a/src/filters/MatchSndEx.py b/src/filters/MatchSndEx.py deleted file mode 100644 index cc103d3dd..000000000 --- a/src/filters/MatchSndEx.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"Names with same SoundEx code as ..." - -import Filter -import soundex -from gettext import gettext as _ - -class MatchSndEx(Filter.Filter): - "Names with same SoundEx code as ..." - - def __init__(self,text): - self.sndex = soundex.soundex(text) - Filter.Filter.__init__(self,text) - - def match(self,person): - return self.sndex == soundex.soundex(person.get_primary_name().get_surname()) - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(MatchSndEx, - description=_("Names with same SoundEx code as ..."), - label=_("Surname"), - qualifier=1) diff --git a/src/filters/MatchSndEx2.py b/src/filters/MatchSndEx2.py deleted file mode 100644 index 43d194d58..000000000 --- a/src/filters/MatchSndEx2.py +++ /dev/null @@ -1,43 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000-2003 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$ - -"Names with SoundEx code of ..." - -import Filter -import soundex -from gettext import gettext as _ - -class MatchSndEx2(Filter.Filter): - "Names with SoundEx code of ..." - - def match(self,person): - return self.text == soundex.soundex(person.get_primary_name().get_surname()) - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(MatchSndEx2, - description=_("Names with the SoundEx code of ..."), - label=_("SoundEx Code"), - qualifier=1) diff --git a/src/filters/MutlipleMarriages.py b/src/filters/MutlipleMarriages.py deleted file mode 100644 index b61d2bc88..000000000 --- a/src/filters/MutlipleMarriages.py +++ /dev/null @@ -1,39 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with multiple marriage records" - -import Filter -from gettext import gettext as _ - -class MultipleMarriages(Filter.Filter): - "People with multiple marriage records" - - def match(self,person): - return len(person.get_family_id_list()) > 1 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(MultipleMarriages, - description=_("People with multiple marriage records"), - qualifier=0) diff --git a/src/filters/NeverMarried.py b/src/filters/NeverMarried.py deleted file mode 100644 index 30392f340..000000000 --- a/src/filters/NeverMarried.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with no marriage records" - -import Filter -from gettext import gettext as _ - -class NeverMarried(Filter.Filter): - "People with no marriage records" - - def match(self,person): - return len(person.get_family_id_list()) == 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(NeverMarried, - description=_("People with no marriage records"), - qualifier=0) - diff --git a/src/filters/NoBirthdate.py b/src/filters/NoBirthdate.py deleted file mode 100644 index 3cc38b1c6..000000000 --- a/src/filters/NoBirthdate.py +++ /dev/null @@ -1,40 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People without a birth date" - -import Filter -from gettext import gettext as _ - -class NoBirthdate(Filter.Filter): - "People without a birth date" - - def match(self,person): - return person.get_birth().get_date() == "" - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(NoBirthdate, - description=_("People without a birth date"), - qualifier=0) - diff --git a/src/filters/NoChildren.py b/src/filters/NoChildren.py deleted file mode 100644 index fbddaca1b..000000000 --- a/src/filters/NoChildren.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000 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 -# - -"People with children" - -import Filter -from gettext import gettext as _ - -class HaveChildren(Filter.Filter): - "People with children" - - def match(self,person): - val = 0 - for family in person.get_family_id_list(): - if len(family.get_child_id_list()) > 0: - val = 1 - break - return val - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(HaveChildren, - description=_("People with children"), - qualifier=0) - diff --git a/src/filters/RegExMatch.py b/src/filters/RegExMatch.py deleted file mode 100644 index 5f94e6fca..000000000 --- a/src/filters/RegExMatch.py +++ /dev/null @@ -1,60 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000-2003 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 -# - -"Names that match a regular expression of ..." - -import Filter -import re -import Utils -from gettext import gettext as _ - -class RegExMatch(Filter.Filter): - "Names that match a regular expression of ..." - - def __init__(self,text): - self.ok = 1 - try: - self.regexp = re.compile(text,re.IGNORECASE) - except: - self.ok = 0 - Filter.Filter.__init__(self,text) - - def match(self,person): - if self.ok == 0: - return 0 - else: - return self.regexp.search(Utils.phonebook_name(person)) - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(RegExMatch, - description=_("Names that match a regular expression of ..."), - label=_("Text"), - qualifier=1) - - - - - - - diff --git a/src/filters/SubString.py b/src/filters/SubString.py deleted file mode 100644 index 8668b04b2..000000000 --- a/src/filters/SubString.py +++ /dev/null @@ -1,45 +0,0 @@ -# -# Gramps - a GTK+/GNOME based genealogy program -# -# Copyright (C) 2000-2003 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 -# - -"Names that contain a substring of ..." - -import Filter -import string -import Utils -from gettext import gettext as _ - -class SubString(Filter.Filter): - "Names that contain a substring of ..." - - def match(self,person): - s1 = string.lower(Utils.phonebook_name(person)) - s2 = string.lower(self.text) - return string.find(s1,s2) >= 0 - -#------------------------------------------------------------------------ -# -# -# -#------------------------------------------------------------------------ -Filter.register_filter(SubString, - description=_("Names that contain a substring of ..."), - label=_("Text"), - qualifier=1) - diff --git a/src/gramps.glade b/src/gramps.glade index 0dfc17c5c..55fdd71f7 100644 --- a/src/gramps.glade +++ b/src/gramps.glade @@ -3513,47 +3513,6 @@ - - 10 - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - - - - - - - True - True - True - GTK_RELIEF_NORMAL - True - - - - - True @@ -6219,351 +6178,6 @@ - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - gramps.png - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - False - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - 0 - - - - - - 0 - True - True - GTK_PACK_END - - - - - - True - False - 0 - - - - True - - False - True - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 5 - False - False - - - - - - 6 - True - 3 - 2 - False - 6 - 12 - - - - True - _Family name: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - surname - - - - - - 0 - 1 - 1 - 2 - 5 - 5 - fill - - - - - - - True - Gender: - False - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - - - 0 - 1 - 2 - 3 - 5 - 5 - fill - - - - - - - True - True - True - True - True - 0 - - True - * - False - - - 1 - 2 - 0 - 1 - 5 - - - - - - - True - True - 0 - - - - True - True - _male - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - True - - - - - - True - True - _female - True - GTK_RELIEF_NORMAL - True - True - False - True - male - - - 0 - False - True - - - - - 1 - 2 - 2 - 3 - 5 - fill - fill - - - - - - True - _Given name: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - given - - - - - - 0 - 1 - 0 - 1 - 5 - 5 - fill - - - - - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - - - - - - - - - 1 - 2 - 1 - 2 - 5 - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True @@ -8325,95 +7939,6 @@ - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 400 - 450 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - False - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 0 - True - True - - - - - - True @@ -17955,37 +17480,12 @@ 12 True - 3 + 2 4 False 6 12 - - - True - D_efault database directory: - True - False - GTK_JUSTIFY_CENTER - False - False - 0 - 0.5 - 0 - 0 - entry1 - - - 1 - 2 - 2 - 3 - fill - - - - True @@ -18010,40 +17510,6 @@ - - - True - dbdir - 10 - Select default database directory - GRAMPS - True - False - False - - - - True - The default directory for storing databases - True - True - True - 0 - - True - * - False - - - - - 2 - 4 - 2 - 3 - - - - True @@ -25855,26 +25321,6 @@ - - - True - gtk-dialog-error - 6 - 0.5 - 0 - 0 - 0 - - - 0 - 1 - 0 - 1 - fill - fill - - - True @@ -25898,6 +25344,26 @@ fill + + + + True + gtk-dialog-error + 6 + 0.5 + 0 + 0 + 0 + + + 0 + 1 + 0 + 2 + fill + fill + + 0 @@ -26076,6 +25542,7 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False + 450 True False True @@ -26167,7 +25634,7 @@ True - gtk-dialog-warning + gtk-dialog-question 6 0.5 0 @@ -26223,6 +25690,7 @@ GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False + 450 True False True @@ -31868,64 +31336,4 @@ - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - False - False - False - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - - - - True - False - 0 - - - - True - splash.jpg - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - <span size="larger">Starting GRAMPS...</span> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - diff --git a/src/plugins/Merge.py b/src/plugins/Merge.py index 801cb381d..3cf47744b 100644 --- a/src/plugins/Merge.py +++ b/src/plugins/Merge.py @@ -159,7 +159,12 @@ class Merge: self.use_soundex = self.soundex_obj.get_active() self.close(obj) self.find_potentials(active) - self.show() + if len(self.map) == 0: + import QuestionDialog + QuestionDialog.ErrorDialog(_("No matches found"), + _("No potential duplicate people were found")) + else: + self.show() def progress_update(self,val): self.progress.set_fraction(val/100.0) diff --git a/src/plugins/WritePkg.py b/src/plugins/WritePkg.py index 6f9d18c52..74b3f59f9 100644 --- a/src/plugins/WritePkg.py +++ b/src/plugins/WritePkg.py @@ -74,31 +74,32 @@ class PackageWriter: def __init__(self,database): self.db = database - - base = os.path.dirname(__file__) - glade_file = "%s/%s" % (base,"pkgexport.glade") - - - dic = { - "destroy_passed_object" : Utils.destroy_passed_object, - "on_ok_clicked" : self.on_ok_clicked, - "on_help_clicked" : self.on_help_clicked - } - - self.top = gtk.glade.XML(glade_file,"packageExport","gramps") - Utils.set_titles(self.top.get_widget('packageExport'), - self.top.get_widget('title'), - _('Package export')) + choose = gtk.FileChooserDialog(_('Save GRAMPS Package'), + None, + gtk.FILE_CHOOSER_ACTION_SAVE, + (gtk.STOCK_CANCEL, + gtk.RESPONSE_CANCEL, + gtk.STOCK_OPEN, + gtk.RESPONSE_OK)) - self.top.signal_autoconnect(dic) - self.top.get_widget("packageExport").show() + choose.set_local_only(gtk.FALSE) + filter = gtk.FileFilter() + filter.set_name(_('GRAMPS package')) + filter.add_pattern('*.gpkg') + choose.add_filter(filter) - def on_ok_clicked(self,obj): - name = unicode(self.top.get_widget("filename").get_text()) - Utils.destroy_passed_object(obj) - self.export(name) + response = choose.run() + if response == gtk.RESPONSE_OK: + name = choose.get_filename() + if os.path.splitext(filename)[1] != ".gpkg": + name = name + ".gpkg" + choose.destroy() + self.export(name) + else: + choose.destroy() + def on_help_clicked(self,obj): """Display the relevant portion of GRAMPS manual""" gnome.help_display('gramps-manual','export-data') diff --git a/src/plugins/pkgexport.glade b/src/plugins/pkgexport.glade deleted file mode 100644 index 358d8cfe1..000000000 --- a/src/plugins/pkgexport.glade +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - 400 - True - False - False - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - 0 - - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - 0 - - - - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - -11 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - 12 - True - False - 12 - - - - True - - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - - - 6 - False - False - - - - - - True - pkgExport - 10 - Export GEDCOM - False - True - - - - True - True - True - True - 0 - - True - * - False - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - -