Pychecker fixes, gnome.url.show to gnome.url_show

svn: r1252
This commit is contained in:
Don Allingham 2003-01-10 13:52:32 +00:00
parent 081be47b50
commit 4f6e5a4031
12 changed files with 18 additions and 43 deletions

View File

@ -86,6 +86,10 @@ except:
# Constants
#
#-------------------------------------------------------------------------
_HOMEPAGE = "http://gramps.sourceforge.net"
_MAILLIST = "http://sourceforge.net/mail/?group_id=25770"
_BUGREPORT = "http://sourceforge.net/tracker/?group_id=25770&atid=385137"
pl_titles = [ (_('Name'),5,250), (_('ID'),1,50),(_('Gender'),2,70),
(_('Birth Date'),6,150),(_('Death Date'),7,150), ('',5,0),
('',6,0), ('',7,0) ]
@ -455,16 +459,13 @@ class Gramps:
self.media_view.moveto(row)
def on_gramps_home_page_activate(self,obj):
import gnome.url
gnome.url.show("http://gramps.sourceforge.net")
gnome.url_show(_HOMEPAGE)
def on_gramps_mailing_lists_activate(self,obj):
import gnome.url
gnome.url.show("http://sourceforge.net/mail/?group_id=25770")
gnome.url_show(_MAILLIST)
def on_gramps_report_bug_activate(self,obj):
import gnome.url
gnome.url.show("http://sourceforge.net/tracker/?group_id=25770&atid=385137")
gnome.url_show(_BUGREPORT)
def on_merge_activate(self,obj):
"""Calls up the merge dialog for the selection"""

View File

@ -22,7 +22,6 @@
import os
import gnome.ui
import gtk
import gtk.glade

View File

@ -26,7 +26,6 @@ from intl import gettext as _
import os
import gnome.ui
import gtk
import gtk.glade
from QuestionDialog import OkDialog

View File

@ -32,7 +32,6 @@ import os
# GRAMPS modules
#
#------------------------------------------------------------------------
from RelLib import *
import Utils
from intl import gettext as _
import GrampsCfg

View File

@ -23,13 +23,11 @@
__author__ = "Don Allingham"
import gtk
import gnome.ui
import gtk.glade
import string
import os
import const
from RelLib import *
import GenericFilter
import AutoComp
import ListModel

View File

@ -28,8 +28,6 @@ from intl import gettext as _
import gtk
import gtk.glade
import gnome.ui
from QuestionDialog import OkDialog
_title_re = re.compile(r"^([A-Za-z][A-Za-z]+\.)\s+(.*)$")
_nick_re = re.compile(r"(.+)[(\"](.*)[)\"]")

View File

@ -43,7 +43,6 @@ import gtk.glade
#-------------------------------------------------------------------------
import RelLib
import sort
import Utils
import ListModel
from intl import gettext as _

View File

@ -33,8 +33,8 @@ import posixpath
# GRAMPS modules
#
#------------------------------------------------------------------------
from RelLib import *
import Utils
import RelLib
from intl import gettext as _
#------------------------------------------------------------------------
@ -95,7 +95,7 @@ def report(database,person):
disconnected = disconnected + 1
if person.getBirth().getDate() == "":
missing_bday = missing_bday + 1
if person.getGender() == Person.female:
if person.getGender() == RelLib.Person.female:
females = females + 1
else:
males = males + 1

View File

@ -41,8 +41,7 @@ import gtk.glade
# GRAMPS modules
#
#------------------------------------------------------------------------
from RelLib import *
import RelLib
import Utils
from intl import gettext as _
@ -81,21 +80,15 @@ def on_apply_clicked(obj):
global verifySettings
personList = db.getPersonMap().values()
familyList = db.getFamilyMap().values()
oldage = int(verifySettings.get_widget("oldage").get_text())
hwdif = int(verifySettings.get_widget("hwdif").get_text())
yngmar = int(verifySettings.get_widget("yngmar").get_text())
oldmar = int(verifySettings.get_widget("oldmar").get_text())
fecmom = int(verifySettings.get_widget("fecmom").get_text())
oldmom = int(verifySettings.get_widget("oldmom").get_text())
yngmom = int(verifySettings.get_widget("yngmom").get_text())
fecdad = int(verifySettings.get_widget("fecdad").get_text())
olddad = int(verifySettings.get_widget("olddad").get_text())
yngdad = int(verifySettings.get_widget("yngdad").get_text())
wedder = int(verifySettings.get_widget("wedder").get_text())
cspace = int(verifySettings.get_widget("cspace").get_text())
cbspan = int(verifySettings.get_widget("cbspan").get_text())
lngwdw = int(verifySettings.get_widget("lngwdw").get_text())
oldunm = 99 # maximum age at death for unmarried person
@ -141,31 +134,27 @@ def on_apply_clicked(obj):
warn = "%sOld age %s born %d died %d age %d.\n" % (warn, idstr, byear, dyear, ageatdeath)
# gender checks
if person.getGender() == Person.female:
if person.getGender() == RelLib.Person.female:
parstr = "mother "
oldpar = oldmom
yngpar = yngmom
fecpar = fecmom
waswidstr = " was a widow "
if person.getGender() == Person.male:
if person.getGender() == RelLib.Person.male:
parstr = "father "
oldpar = olddad
yngpar = yngdad
fecpar = fecdad
waswidstr = " was a widower "
if (person.getGender() != Person.female) and (person.getGender() != Person.male):
if (person.getGender() != RelLib.Person.female) and (person.getGender() != RelLib.Person.male):
warn ="%sUnknown gender %s.\n" % (warn, idstr)
parstr = "parent "
oldpar = olddad
yngpar = yngdad
fecpar = fecdad
waswidstr = " was a widow "
if (person.getGender() == Person.female) and (person.getGender() == Person.male):
if (person.getGender() == RelLib.Person.female) and (person.getGender() == RelLib.Person.male):
error ="%sAmbigous gender %s.\n" % (error, idstr)
parstr = "parent "
oldpar = olddad
yngpar = yngdad
fecpar = fecdad
waswidstr = " was a widow "
# multiple parentage check
@ -182,8 +171,6 @@ def on_apply_clicked(obj):
first_cbyear = 99999
last_cbyear=0
prev_cbyear=0
prev_cbyfnum=0
prev_cbyind=0
prev_maryear=0
prev_sdyear=0
fnum = 0
@ -194,16 +181,16 @@ def on_apply_clicked(obj):
if mother!=None and father!=None:
if mother.getGender() == father.getGender():
warn = "%sHomosexual marriage %s family %s.\n" % (error, idstr, family.getId())
if family.getFather() == person and person.getGender() == Person.female:
if family.getFather() == person and person.getGender() == RelLib.Person.female:
error = "%sFemale husband %s family %s.\n" % (error, idstr, family.getId())
if family.getMother() == person and person.getGender() == Person.male:
if family.getMother() == person and person.getGender() == RelLib.Person.male:
error = "%sMale wife %s family %s.\n" % (error, idstr, family.getId())
if family.getFather() == person:
spouse = family.getMother()
else:
spouse = family.getFather()
if spouse != None:
if person.getGender() == Person.male and \
if person.getGender() == RelLib.Person.male and \
person.getPrimaryName().getSurname() == spouse.getPrimaryName().getSurname():
warn = "%sHusband and wife with same surname %s family %s %s.\n" % ( warn, idstr,family.getId(), spouse.getPrimaryName().getName())
sdyear = get_year( spouse.getDeath() )
@ -266,7 +253,7 @@ def on_apply_clicked(obj):
if bage < yngpar:
warn = "%sYoung %s %s age %d family %s child %s.\n" % (warn, parstr, idstr, bage, family.getId(), child.getPrimaryName().getName())
if dyear>0 and cbyear>dyear:
if person.getGender() == Person.male:
if person.getGender() == RelLib.Person.male:
if cbyear-1>dyear:
error = "%sDead %s %s died %d family %s child %s born %d.\n" % (error, parstr, idstr, dyear, family.getId(), child.getPrimaryName().getName(), cbyear)
else:

View File

@ -42,8 +42,6 @@ import gtk.glade
# GRAMPS modules
#
#-------------------------------------------------------------------------
from RelLib import *
import WriteXML
import TarFile
import Utils

View File

@ -20,7 +20,6 @@
"View/Number of ancestors"
from RelLib import *
import os
import Utils
from intl import gettext as _

View File

@ -24,9 +24,7 @@ import os
import gtk
import gtk.glade
from gnome.ui import *
import RelLib
import soundex
import Utils
from intl import gettext as _