* src/plugins/NarrativeWeb.py: fix bug for no surname (bug #265)

svn: r7064
This commit is contained in:
Brian Matherly 2006-07-24 02:19:08 +00:00
parent 4bb46152db
commit cbaf16999a
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,6 @@
2006-07-23 Brian Matherly <brian@gramps-project.org>
* src/plugins/NarrativeWeb.py: fix bug for no surname (bug #265)
2006-07-23 Manfred Paulus <manfred.paulus@gmx.de>
* src/BaseDoc.py: fix angle calculation
* src/docgen/PSDrawDoc.py: fix angle calculation

View File

@ -2744,11 +2744,14 @@ def sort_people(db,handle_list):
return sorted_lists
def strcoll_case_sensitive(string1,string2):
""" This function was written because string comparisons in Windows
""" This function was written because string comparisons
seem to be case insensitive if the string is longer than
one character. """
# First, compare the first character
diff = locale.strcoll(string1[0],string2[0])
if len(string1) > 0 and len(string2) > 0:
diff = locale.strcoll(string1[0],string2[0])
else:
diff = 0
if diff == 0:
# If the first character is the same, compare the rest
diff = locale.strcoll(string1,string2)