* src/sort: Typos.

svn: r2832
This commit is contained in:
Alex Roitman 2004-02-15 03:48:45 +00:00
parent 7022a133f0
commit 1e02ab0941
3 changed files with 12 additions and 11 deletions

View File

@ -16,6 +16,7 @@
* src/PlaceView.py (key_press): Add function. * src/PlaceView.py (key_press): Add function.
* src/SourceView.py (key_press): Add function. * src/SourceView.py (key_press): Add function.
* src/plugins/WebPage.py: Add tab with index page options. * src/plugins/WebPage.py: Add tab with index page options.
* src/sort: Typos.
2004-02-13 Egyeki Gergely <egeri@elte.hu> 2004-02-13 Egyeki Gergely <egeri@elte.hu>
* src/po/hu.po: Update * src/po/hu.po: Update

View File

@ -228,7 +228,7 @@ class IndividualPage:
person = self.db.find_person_from_id(person_id) person = self.db.find_person_from_id(person_id)
if self.list.has_key(person.get_id()): if self.list.has_key(person.get_id()):
self.doc.start_link("%s.%s" % (person.get_id(),self.ext)) self.doc.start_link("%s.%s" % (person.get_id(),self.ext))
self.doc.write_text(person.getPrimaryName().getRegularName()) self.doc.write_text(person.get_primary_name().get_regular_name())
self.doc.end_link() self.doc.end_link()
else: else:
self.doc.write_text(person.get_primary_name().get_regular_name()) self.doc.write_text(person.get_primary_name().get_regular_name())
@ -829,7 +829,7 @@ class WebReport(Report.Report):
col_len = n_rows col_len = n_rows
for person in p_list: for person in p_list:
name = person.get_primary_name().get_surname() name = person.get_primary_name().get_name()
doc.start_link("%s.%s" % (person.get_id(),self.ext)) doc.start_link("%s.%s" % (person.get_id(),self.ext))
doc.write_text(name) doc.write_text(name)
@ -859,11 +859,11 @@ class WebReport(Report.Report):
if self.include_alpha_links: if self.include_alpha_links:
doc.write_linktarget("%03d" % a[n]) doc.write_linktarget("%03d" % a[n])
doc.write_text(n) doc.write_text(n)
doc.end_paragraph() doc.end_paragraph()
col_len = col_len - 1 col_len = col_len - 1
for person in p_list: for person in p_list:
name = person.get_primary_name().get_surname() name = person.get_primary_name().get_name()
doc.start_link("%s.%s" % (person.get_id(),self.ext)) doc.start_link("%s.%s" % (person.get_id(),self.ext))
doc.write_text(name) doc.write_text(name)

View File

@ -71,17 +71,17 @@ def build_sort_date(n):
def by_last_name(first, second): def by_last_name(first, second):
"""Sort routine for comparing two last names. If last names are equal, """Sort routine for comparing two last names. If last names are equal,
uses the given name and suffix""" uses the given name and suffix"""
name1 = first.PrimaryName name1 = first.get_primary_name()
name2 = second.PrimaryName name2 = second.get_primary_name()
fsn = name1.Surname.upper() fsn = name1.get_surname().upper()
ssn = name2.Surname.upper() ssn = name2.get_surname().upper()
if fsn == ssn : if fsn == ssn :
ffn = name1.FirstName.upper() ffn = name1.get_first_name().upper()
sfn = name2.FirstName.upper() sfn = name2.get_first_name().upper()
if ffn == sfn : if ffn == sfn :
return cmp(name1.Suffix.upper(), name2.Suffix.upper()) return cmp(name1.get_suffix().upper(), name2.get_suffix().upper())
else : else :
return cmp(ffn, sfn) return cmp(ffn, sfn)
else : else :