From dacc33610d9a3623fa857a18ed2dca0a7c1b8d41 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 20 Dec 2005 06:10:36 +0000 Subject: [PATCH] Update svn: r5591 --- src/RelLib/GenderStats.py | 36 +++++++++++++++++++++ src/RelLib/Researcher.py | 67 ++++++++++++++++++++++++--------------- src/RelLib/_helper.py | 4 +-- src/RelLib/_secondary.py | 3 +- 4 files changed, 80 insertions(+), 30 deletions(-) diff --git a/src/RelLib/GenderStats.py b/src/RelLib/GenderStats.py index f9231f4df..898a625a8 100644 --- a/src/RelLib/GenderStats.py +++ b/src/RelLib/GenderStats.py @@ -1,5 +1,41 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2005 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$ + +""" +Gender statistics kept in GRAMPS database. +""" + +#------------------------------------------------------------------------- +# +# GRAMPS modules +# +#------------------------------------------------------------------------- from Person import Person +#------------------------------------------------------------------------- +# +# +# +#------------------------------------------------------------------------- class GenderStats: """ Class for keeping track of statistics related to Given Name vs. diff --git a/src/RelLib/Researcher.py b/src/RelLib/Researcher.py index 03a1aac56..649144fb4 100644 --- a/src/RelLib/Researcher.py +++ b/src/RelLib/Researcher.py @@ -1,15 +1,50 @@ -class Researcher: +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2005 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$ + +""" +Researcher informaiton for GRAMPS. +""" + +#------------------------------------------------------------------------- +# +# GRAMPS modules +# +#------------------------------------------------------------------------- +from _helper import LocationBase + +#------------------------------------------------------------------------- +# +# +# +#------------------------------------------------------------------------- +class Researcher(LocationBase): """Contains the information about the owner of the database""" def __init__(self): """Initializes the Researcher object""" + + LocationBase.__init__(self ) self.name = "" self.addr = "" - self.city = "" - self.state = "" - self.country = "" - self.postal = "" - self.phone = "" self.email = "" def get_name(self): @@ -20,26 +55,6 @@ class Researcher: """returns the database owner's address""" return self.addr - def get_city(self): - """returns the database owner's city""" - return self.city - - def get_state(self): - """returns the database owner's state""" - return self.state - - def get_country(self): - """returns the database owner's country""" - return self.country - - def get_postal_code(self): - """returns the database owner's postal code""" - return self.postal - - def get_phone(self): - """returns the database owner's phone number""" - return self.phone - def get_email(self): """returns the database owner's email""" return self.email diff --git a/src/RelLib/_helper.py b/src/RelLib/_helper.py index 262e5b275..d1e0d2249 100644 --- a/src/RelLib/_helper.py +++ b/src/RelLib/_helper.py @@ -1013,7 +1013,7 @@ class PrivateSourceNote(SourceNote,PrivacyBase): SourceNote.__init__(self,source) PrivacyBase.__init__(self,source) -class LocationBase(BaseObject): +class LocationBase: """ Base class for all things Address. """ @@ -1023,8 +1023,6 @@ class LocationBase(BaseObject): Creates a LocationBase object, copying from the source object if it exists. """ - - BaseObject.__init__(self) if source: self.city = source.city self.state = source.state diff --git a/src/RelLib/_secondary.py b/src/RelLib/_secondary.py index 779aec73a..96617065c 100644 --- a/src/RelLib/_secondary.py +++ b/src/RelLib/_secondary.py @@ -591,7 +591,7 @@ class Address(PrivateSourceNote,DateBase,LocationBase): # Location class for Places # #------------------------------------------------------------------------- -class Location(LocationBase): +class Location(BaseObject,LocationBase): """ Provides information about a place. @@ -605,6 +605,7 @@ class Location(LocationBase): Creates a Location object, copying from the source object if it exists. """ + BaseObject.__init__(self) LocationBase.__init__(self,source) if source: self.parish = source.parish