Pychecker fixes, gnome.url.show to gnome.url_show
svn: r1252
This commit is contained in:
parent
7b7d1364cd
commit
b30254c695
@ -86,6 +86,10 @@ except:
|
|||||||
# Constants
|
# 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),
|
pl_titles = [ (_('Name'),5,250), (_('ID'),1,50),(_('Gender'),2,70),
|
||||||
(_('Birth Date'),6,150),(_('Death Date'),7,150), ('',5,0),
|
(_('Birth Date'),6,150),(_('Death Date'),7,150), ('',5,0),
|
||||||
('',6,0), ('',7,0) ]
|
('',6,0), ('',7,0) ]
|
||||||
@ -455,16 +459,13 @@ class Gramps:
|
|||||||
self.media_view.moveto(row)
|
self.media_view.moveto(row)
|
||||||
|
|
||||||
def on_gramps_home_page_activate(self,obj):
|
def on_gramps_home_page_activate(self,obj):
|
||||||
import gnome.url
|
gnome.url_show(_HOMEPAGE)
|
||||||
gnome.url.show("http://gramps.sourceforge.net")
|
|
||||||
|
|
||||||
def on_gramps_mailing_lists_activate(self,obj):
|
def on_gramps_mailing_lists_activate(self,obj):
|
||||||
import gnome.url
|
gnome.url_show(_MAILLIST)
|
||||||
gnome.url.show("http://sourceforge.net/mail/?group_id=25770")
|
|
||||||
|
|
||||||
def on_gramps_report_bug_activate(self,obj):
|
def on_gramps_report_bug_activate(self,obj):
|
||||||
import gnome.url
|
gnome.url_show(_BUGREPORT)
|
||||||
gnome.url.show("http://sourceforge.net/tracker/?group_id=25770&atid=385137")
|
|
||||||
|
|
||||||
def on_merge_activate(self,obj):
|
def on_merge_activate(self,obj):
|
||||||
"""Calls up the merge dialog for the selection"""
|
"""Calls up the merge dialog for the selection"""
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import gnome.ui
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ from intl import gettext as _
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import gnome.ui
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
from QuestionDialog import OkDialog
|
from QuestionDialog import OkDialog
|
||||||
|
@ -32,7 +32,6 @@ import os
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from RelLib import *
|
|
||||||
import Utils
|
import Utils
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
import GrampsCfg
|
import GrampsCfg
|
||||||
|
@ -23,13 +23,11 @@
|
|||||||
__author__ = "Don Allingham"
|
__author__ = "Don Allingham"
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gnome.ui
|
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import string
|
import string
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import const
|
import const
|
||||||
from RelLib import *
|
|
||||||
import GenericFilter
|
import GenericFilter
|
||||||
import AutoComp
|
import AutoComp
|
||||||
import ListModel
|
import ListModel
|
||||||
|
@ -28,8 +28,6 @@ from intl import gettext as _
|
|||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
import gnome.ui
|
|
||||||
from QuestionDialog import OkDialog
|
|
||||||
|
|
||||||
_title_re = re.compile(r"^([A-Za-z][A-Za-z]+\.)\s+(.*)$")
|
_title_re = re.compile(r"^([A-Za-z][A-Za-z]+\.)\s+(.*)$")
|
||||||
_nick_re = re.compile(r"(.+)[(\"](.*)[)\"]")
|
_nick_re = re.compile(r"(.+)[(\"](.*)[)\"]")
|
||||||
|
@ -43,7 +43,6 @@ import gtk.glade
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
import RelLib
|
import RelLib
|
||||||
import sort
|
|
||||||
import Utils
|
import Utils
|
||||||
import ListModel
|
import ListModel
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
|
@ -33,8 +33,8 @@ import posixpath
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from RelLib import *
|
|
||||||
import Utils
|
import Utils
|
||||||
|
import RelLib
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -95,7 +95,7 @@ def report(database,person):
|
|||||||
disconnected = disconnected + 1
|
disconnected = disconnected + 1
|
||||||
if person.getBirth().getDate() == "":
|
if person.getBirth().getDate() == "":
|
||||||
missing_bday = missing_bday + 1
|
missing_bday = missing_bday + 1
|
||||||
if person.getGender() == Person.female:
|
if person.getGender() == RelLib.Person.female:
|
||||||
females = females + 1
|
females = females + 1
|
||||||
else:
|
else:
|
||||||
males = males + 1
|
males = males + 1
|
||||||
|
@ -41,8 +41,7 @@ import gtk.glade
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from RelLib import *
|
import RelLib
|
||||||
|
|
||||||
import Utils
|
import Utils
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
|
|
||||||
@ -81,21 +80,15 @@ def on_apply_clicked(obj):
|
|||||||
global verifySettings
|
global verifySettings
|
||||||
|
|
||||||
personList = db.getPersonMap().values()
|
personList = db.getPersonMap().values()
|
||||||
familyList = db.getFamilyMap().values()
|
|
||||||
|
|
||||||
oldage = int(verifySettings.get_widget("oldage").get_text())
|
oldage = int(verifySettings.get_widget("oldage").get_text())
|
||||||
hwdif = int(verifySettings.get_widget("hwdif").get_text())
|
|
||||||
yngmar = int(verifySettings.get_widget("yngmar").get_text())
|
yngmar = int(verifySettings.get_widget("yngmar").get_text())
|
||||||
oldmar = int(verifySettings.get_widget("oldmar").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())
|
oldmom = int(verifySettings.get_widget("oldmom").get_text())
|
||||||
yngmom = int(verifySettings.get_widget("yngmom").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())
|
olddad = int(verifySettings.get_widget("olddad").get_text())
|
||||||
yngdad = int(verifySettings.get_widget("yngdad").get_text())
|
yngdad = int(verifySettings.get_widget("yngdad").get_text())
|
||||||
wedder = int(verifySettings.get_widget("wedder").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())
|
lngwdw = int(verifySettings.get_widget("lngwdw").get_text())
|
||||||
|
|
||||||
oldunm = 99 # maximum age at death for unmarried person
|
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)
|
warn = "%sOld age %s born %d died %d age %d.\n" % (warn, idstr, byear, dyear, ageatdeath)
|
||||||
|
|
||||||
# gender checks
|
# gender checks
|
||||||
if person.getGender() == Person.female:
|
if person.getGender() == RelLib.Person.female:
|
||||||
parstr = "mother "
|
parstr = "mother "
|
||||||
oldpar = oldmom
|
oldpar = oldmom
|
||||||
yngpar = yngmom
|
yngpar = yngmom
|
||||||
fecpar = fecmom
|
|
||||||
waswidstr = " was a widow "
|
waswidstr = " was a widow "
|
||||||
if person.getGender() == Person.male:
|
if person.getGender() == RelLib.Person.male:
|
||||||
parstr = "father "
|
parstr = "father "
|
||||||
oldpar = olddad
|
oldpar = olddad
|
||||||
yngpar = yngdad
|
yngpar = yngdad
|
||||||
fecpar = fecdad
|
|
||||||
waswidstr = " was a widower "
|
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)
|
warn ="%sUnknown gender %s.\n" % (warn, idstr)
|
||||||
parstr = "parent "
|
parstr = "parent "
|
||||||
oldpar = olddad
|
oldpar = olddad
|
||||||
yngpar = yngdad
|
yngpar = yngdad
|
||||||
fecpar = fecdad
|
|
||||||
waswidstr = " was a widow "
|
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)
|
error ="%sAmbigous gender %s.\n" % (error, idstr)
|
||||||
parstr = "parent "
|
parstr = "parent "
|
||||||
oldpar = olddad
|
oldpar = olddad
|
||||||
yngpar = yngdad
|
yngpar = yngdad
|
||||||
fecpar = fecdad
|
|
||||||
waswidstr = " was a widow "
|
waswidstr = " was a widow "
|
||||||
|
|
||||||
# multiple parentage check
|
# multiple parentage check
|
||||||
@ -182,8 +171,6 @@ def on_apply_clicked(obj):
|
|||||||
first_cbyear = 99999
|
first_cbyear = 99999
|
||||||
last_cbyear=0
|
last_cbyear=0
|
||||||
prev_cbyear=0
|
prev_cbyear=0
|
||||||
prev_cbyfnum=0
|
|
||||||
prev_cbyind=0
|
|
||||||
prev_maryear=0
|
prev_maryear=0
|
||||||
prev_sdyear=0
|
prev_sdyear=0
|
||||||
fnum = 0
|
fnum = 0
|
||||||
@ -194,16 +181,16 @@ def on_apply_clicked(obj):
|
|||||||
if mother!=None and father!=None:
|
if mother!=None and father!=None:
|
||||||
if mother.getGender() == father.getGender():
|
if mother.getGender() == father.getGender():
|
||||||
warn = "%sHomosexual marriage %s family %s.\n" % (error, idstr, family.getId())
|
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())
|
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())
|
error = "%sMale wife %s family %s.\n" % (error, idstr, family.getId())
|
||||||
if family.getFather() == person:
|
if family.getFather() == person:
|
||||||
spouse = family.getMother()
|
spouse = family.getMother()
|
||||||
else:
|
else:
|
||||||
spouse = family.getFather()
|
spouse = family.getFather()
|
||||||
if spouse != None:
|
if spouse != None:
|
||||||
if person.getGender() == Person.male and \
|
if person.getGender() == RelLib.Person.male and \
|
||||||
person.getPrimaryName().getSurname() == spouse.getPrimaryName().getSurname():
|
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())
|
warn = "%sHusband and wife with same surname %s family %s %s.\n" % ( warn, idstr,family.getId(), spouse.getPrimaryName().getName())
|
||||||
sdyear = get_year( spouse.getDeath() )
|
sdyear = get_year( spouse.getDeath() )
|
||||||
@ -266,7 +253,7 @@ def on_apply_clicked(obj):
|
|||||||
if bage < yngpar:
|
if bage < yngpar:
|
||||||
warn = "%sYoung %s %s age %d family %s child %s.\n" % (warn, parstr, idstr, bage, family.getId(), child.getPrimaryName().getName())
|
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 dyear>0 and cbyear>dyear:
|
||||||
if person.getGender() == Person.male:
|
if person.getGender() == RelLib.Person.male:
|
||||||
if cbyear-1>dyear:
|
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)
|
error = "%sDead %s %s died %d family %s child %s born %d.\n" % (error, parstr, idstr, dyear, family.getId(), child.getPrimaryName().getName(), cbyear)
|
||||||
else:
|
else:
|
||||||
|
@ -42,8 +42,6 @@ import gtk.glade
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
from RelLib import *
|
|
||||||
|
|
||||||
import WriteXML
|
import WriteXML
|
||||||
import TarFile
|
import TarFile
|
||||||
import Utils
|
import Utils
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
|
|
||||||
"View/Number of ancestors"
|
"View/Number of ancestors"
|
||||||
|
|
||||||
from RelLib import *
|
|
||||||
import os
|
import os
|
||||||
import Utils
|
import Utils
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
|
@ -24,9 +24,7 @@ import os
|
|||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
import gtk.glade
|
import gtk.glade
|
||||||
from gnome.ui import *
|
|
||||||
|
|
||||||
import RelLib
|
|
||||||
import soundex
|
import soundex
|
||||||
import Utils
|
import Utils
|
||||||
from intl import gettext as _
|
from intl import gettext as _
|
||||||
|
Loading…
Reference in New Issue
Block a user