svn: r18639
This commit is contained in:
Paul Franklin 2011-12-19 22:43:21 +00:00
parent dc4061b410
commit 4b5c061554
4 changed files with 27 additions and 27 deletions

View File

@ -82,7 +82,7 @@ class DescendantBoxBase(BoxBase):
self.father = None
def calc_text(self, database, person, family):
""" A sinble place to calculate box text """
""" A single place to calculate box text """
gui = GuiConnect()
calc = gui.calc_lines(database)

View File

@ -67,8 +67,8 @@ class AgeOnDateGramplet(Gramplet):
buffer.set_text(_("Enter a valid date (like YYYY-MM-DD) in the"
" entry below and click Run. This will compute"
" the ages for everyone in your Family Tree on"
" that date. You can then sort by the age column"
" ,and double-click the row to view or edit."))
" that date. You can then sort by the age column,"
" and double-click the row to view or edit."))
label = gtk.Label()
label.set_text(_("Date") + ":")
self.entry = gtk.Entry()

View File

@ -86,10 +86,10 @@ class GenericFormat(object):
def generic_format(self, item, code, uppr, function):
"""the main parsing engine.
Nedded ar the following: the input string
Needed are the following: the input string
code - List of one character (string) codes (all lowercase)
uppr - list of one character (string) codes that can be uppercased
each needs to have a lowercase equivelant in code
each needs to have a lowercase equivalent in code
function - list of functions.
there is a one to one relationship with character codes and functions.
"""
@ -135,12 +135,12 @@ class GenericFormat(object):
#------------------------------------------------------------------------
class NameFormat(GenericFormat):
""" The name format class.
If no format string, the name is displayed as per preferance options
If no format string, the name is displayed as per preference options
otherwise, parse through a format string and put the name parts in
"""
def get_name(self, person):
""" A helper method for retreaving the persons name """
""" A helper method for retrieving the person's name """
if person:
return person.get_primary_name()
return None
@ -178,12 +178,12 @@ class NameFormat(GenericFormat):
#------------------------------------------------------------------------
class DateFormat(GenericFormat):
""" The date format class.
If no format string, the date is displayed as per preferance options
If no format string, the date is displayed as per preference options
otherwise, parse through a format string and put the date parts in
"""
def get_date(self, event):
""" A helper method for retreaving a date from an event """
""" A helper method for retrieving a date from an event """
if event:
return event.get_date_object()
return None
@ -286,12 +286,12 @@ class DateFormat(GenericFormat):
#------------------------------------------------------------------------
class PlaceFormat(GenericFormat):
""" The place format class.
If no format string, the place is displayed as per preferance options
If no format string, the place is displayed as per preference options
otherwise, parse through a format string and put the place parts in
"""
def get_place(self, database, event):
""" A helper method for retreaving a place from an event """
""" A helper method for retrieving a place from an event """
if event:
bplace_handle = event.get_place_handle()
if bplace_handle:
@ -411,7 +411,7 @@ class EventFormat(GenericFormat):
#------------------------------------------------------------------------
class ConsumableString(object):
"""
A simple string implemplamentation with extras to help with parsing.
A simple string implementation with extras to help with parsing.
This will contain the string to be parsed. or string in.
There will only be one of these for each processed line.
@ -635,7 +635,7 @@ class VarStringMain(VarStringBase):
self.the_string.append((TXT.remove, ""))
def add_variable(self, text):
""" A helper fuction to either call:
""" A helper function to either call:
add_remove if the text string is blank
otherwise add_display
"""
@ -654,7 +654,7 @@ class VarStringSecond(VarStringBase):
TXT.remove as the state
and everything is simply added to the end of a list.
states are still updated properly
it will be _combine(d) in the main level approprately.
it will be _combine(d) in the main level appropriately.
"""
def __init__(self, start_state = TXT.remove):
VarStringBase.__init__(self, start_state)
@ -842,11 +842,11 @@ class VariableParse(object):
return self._in.this == "$" and self._in.next is not None and \
"nsijbBdDmMvVauetT".find(self._in.next) != -1
def get_event_by_type(self, marrage, e_type):
def get_event_by_type(self, marriage, e_type):
""" get an event from a type """
if marrage is None:
if marriage is None:
return None
for e_ref in marrage.get_event_ref_list():
for e_ref in marriage.get_event_ref_list():
if not e_ref:
continue
event = self.friend.database.get_event_from_handle(e_ref.ref)
@ -1067,7 +1067,7 @@ class SubstKeywords(object):
This will be the center person for the display
family_handle
this will specify the specific family/spouse to work with.
If none given, then the first/prefered family/spouse is used
If none given, then the first/preferred family/spouse is used
"""
def __init__(self, database, person_handle, family_handle=None):
"""get the person and find the family/spouse to use for this display"""
@ -1111,7 +1111,7 @@ class SubstKeywords(object):
There are four things we can find here
A {} group which will make/end as needed.
A <> separator
A ! variable - Handlded seprately
A ! variable - Handled separately
or text
"""
#This is the upper most level of text

View File

@ -619,7 +619,7 @@ class TitleBox(BoxBase):
Holds information about the Title that will print on a page
"""
def __init__(self, doc, boxstr):
""" initalize the title box """
""" initialize the title box """
BoxBase.__init__(self)
self.doc = doc
self.boxstr = boxstr
@ -659,7 +659,7 @@ class PageNumberBox(BoxBase):
each page """
def __init__(self, doc, boxstr):
""" initalize the page number box """
""" initialize the page number box """
BoxBase.__init__(self)
self.doc = doc
self.boxstr = boxstr
@ -673,7 +673,7 @@ class PageNumberBox(BoxBase):
style_name = style_name.get_paragraph_style()
font = style_sheet.get_paragraph_style(style_name).get_font()
#calcualate how much space is needed
#calculate how much space is needed
if page.canvas.x_pages > 10:
tmp = "00"
else:
@ -722,7 +722,7 @@ class NoteType(object):
]
def __init__(self, value, exclude=None):
""" initalize GrampsType """
""" initialize GrampsType """
self.value = value
self.exclude = exclude
#GrampsType.__init__(self, value)
@ -737,7 +737,7 @@ class NoteBox(BoxBase, NoteType):
""" Box that will hold the note to display on the page """
def __init__(self, doc, boxstr, locale, exclude=None):
""" initalize the NoteBox """
""" initialize the NoteBox """
BoxBase.__init__(self)
NoteType.__init__(self, locale, exclude)
self.doc = doc
@ -831,7 +831,7 @@ class LineBase(object):
# and 0 < yme < usable_height and \
doc.draw_line(linestr, xbegin, yme, x34, yme)
#2 - veritcal line
#2 - vertical line
mid = []
for box in self.start + self.end:
tmp = box.y_cm + box.height/2
@ -869,7 +869,7 @@ class ReportOptions(object):
"""
def __init__(self, doc, normal_font, normal_line):
""" initalize various report variables that are used """
""" initialize various report variables that are used """
self.box_pgap = PT2CM(1.25*normal_font.get_size()) #gap between persons
self.box_mgap = self.box_pgap /2 #gap between marriage information
self.box_shadow = PT2CM(normal_font.get_size()) * .6 #normal text
@ -900,6 +900,6 @@ class ReportOptions(object):
#=====================================
#"And Jesus said unto them ... , "If ye have faith as a grain of mustard
#seed, ye shall say unto this mountain, Remove hence to younder place; and
#seed, ye shall say unto this mountain, Remove hence to yonder place; and
#it shall remove; and nothing shall be impossible to you."
#Romans 1:17