Update
svn: r7848
This commit is contained in:
parent
f29b0eb697
commit
5fd72cf53a
@ -1,3 +1,7 @@
|
|||||||
|
2006-12-24 Douglas S. Blank <dblank@cs.brynmawr.edu>
|
||||||
|
* src/plugins/Calendar.py: Fixes.
|
||||||
|
* src/plugins/holidays.xml: Fixes.
|
||||||
|
|
||||||
2006-12-23 Don Allingham <don@gramps-project.org>
|
2006-12-23 Don Allingham <don@gramps-project.org>
|
||||||
* src/DisplayTabs/_EventRefModel.py: properly sort events by date (bug #508)
|
* src/DisplayTabs/_EventRefModel.py: properly sort events by date (bug #508)
|
||||||
* src/DisplayTabs/_EventEmbedList.py: properly sort events by date (bug #508)
|
* src/DisplayTabs/_EventEmbedList.py: properly sort events by date (bug #508)
|
||||||
|
@ -113,20 +113,32 @@ class Calendar(Report):
|
|||||||
widget.define_graphics_style(self.doc)
|
widget.define_graphics_style(self.doc)
|
||||||
|
|
||||||
def get_short_name(self, person, maiden_name = None):
|
def get_short_name(self, person, maiden_name = None):
|
||||||
""" Is there a better, built-in way of getting a short, personal name? """
|
""" Returns person's name, unless maiden_name given, unless married_name listed. """
|
||||||
nickname = person.get_nick_name()
|
# Get all of a person's names:
|
||||||
if nickname:
|
primary_name = person.get_primary_name()
|
||||||
first_name = nickname
|
married_name = None
|
||||||
|
names = [primary_name] + person.get_alternate_names()
|
||||||
|
for n in names:
|
||||||
|
if int(n.get_type()) == RelLib.NameType.MARRIED:
|
||||||
|
married_name = n
|
||||||
|
# Now, decide which to use:
|
||||||
|
if maiden_name != None:
|
||||||
|
if married_name != None:
|
||||||
|
first_name, family_name = married_name.get_first_name(), married_name.get_surname()
|
||||||
|
call_name = married_name.get_call_name()
|
||||||
|
else:
|
||||||
|
first_name, family_name = primary_name.get_first_name(), maiden_name
|
||||||
|
call_name = primary_name.get_call_name()
|
||||||
else:
|
else:
|
||||||
first_name = person.get_primary_name().get_first_name()
|
first_name, family_name = primary_name.get_first_name(), primary_name.get_surname()
|
||||||
if first_name:
|
call_name = primary_name.get_call_name()
|
||||||
first_name = first_name.split()[0] # not middle name
|
# If they have a nickname use it
|
||||||
if nickname.strip().count(" ") > 0: # HACK: first and last name assumed
|
if call_name != None and call_name.strip() != "":
|
||||||
family_name = ""
|
first_name = call_name.strip()
|
||||||
elif maiden_name != None:
|
else: # else just get the first name:
|
||||||
family_name = maiden_name
|
first_name = first_name.strip()
|
||||||
else:
|
if " " in first_name:
|
||||||
family_name = person.get_primary_name().get_surname()
|
first_name, rest = first_name.split(" ", 1) # just one split max
|
||||||
return ("%s %s" % (first_name, family_name)).strip()
|
return ("%s %s" % (first_name, family_name)).strip()
|
||||||
|
|
||||||
def draw_rectangle(self, style, sx, sy, ex, ey):
|
def draw_rectangle(self, style, sx, sy, ex, ey):
|
||||||
@ -230,8 +242,8 @@ class Calendar(Report):
|
|||||||
current = 0
|
current = 0
|
||||||
for line in p.split("\n"):
|
for line in p.split("\n"):
|
||||||
self.doc.write_at("text", line,
|
self.doc.write_at("text", line,
|
||||||
day_col * cell_width + .1,
|
day_col * cell_width + 0.1,
|
||||||
header + (week_row + 1) * cell_height - position + (current * spacing) + self["offset"])
|
header + (week_row + 1) * cell_height - position + (current * spacing) - 0.1)
|
||||||
current += 1
|
current += 1
|
||||||
current_ord += 1
|
current_ord += 1
|
||||||
if not something_this_week:
|
if not something_this_week:
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<date name="Presidents' Day" value="*/3/mon/feb" type="secular" />
|
<date name="Presidents' Day" value="*/3/mon/feb" type="secular" />
|
||||||
<date name="Washington's Birthday" value="*/2/22" type="secular" />
|
<date name="Washington's Birthday" value="*/2/22" type="secular" />
|
||||||
<date name="St. Patrick's Day" value="*/3/17" type="secular" />
|
<date name="St. Patrick's Day" value="*/3/17" type="secular" />
|
||||||
<date name="April Fools's Day" value="*/4/1" type="secular" />
|
<date name="April Fool's Day" value="*/4/1" type="secular" />
|
||||||
<date name="Earth Day" value="*/4/22" type="secular" />
|
<date name="Earth Day" value="*/4/22" type="secular" />
|
||||||
<date name="Assistants' Day" value="*/-1/sat/apr" offset="-3" type="secular" />
|
<date name="Assistants' Day" value="*/-1/sat/apr" offset="-3" type="secular" />
|
||||||
<date name="Arbor Day" value="*/-1/fri/apr" type="secular" />
|
<date name="Arbor Day" value="*/-1/fri/apr" type="secular" />
|
||||||
@ -96,13 +96,13 @@
|
|||||||
<date name="Yom Kippur" value="2008/10/09" type="religious" />
|
<date name="Yom Kippur" value="2008/10/09" type="religious" />
|
||||||
<date name="Yom Kippur" value="2009/9/28" type="religious" />
|
<date name="Yom Kippur" value="2009/9/28" type="religious" />
|
||||||
<date name="Yom Kippur" value="2010/9/18" type="religious" />
|
<date name="Yom Kippur" value="2010/9/18" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2004/10/07" type="religious" />
|
<date name="Hanukkah begins" value="2004/12/07" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2005/10/26" type="religious" />
|
<date name="Hanukkah begins" value="2005/12/25" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2006/10/15" type="religious" />
|
<date name="Hanukkah begins" value="2006/12/15" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2007/10/05" type="religious" />
|
<date name="Hanukkah begins" value="2007/12/04" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2008/10/22" type="religious" />
|
<date name="Hanukkah begins" value="2008/12/21" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2009/10/12" type="religious" />
|
<date name="Hanukkah begins" value="2009/12/11" type="religious" />
|
||||||
<date name="Hanukkah begins" value="2010/10/22" type="religious" />
|
<date name="Hanukkah begins" value="2010/12/01" type="religious" />
|
||||||
<date name="Ramadan begins" value="2006/9/24" type="religious" />
|
<date name="Ramadan begins" value="2006/9/24" type="religious" />
|
||||||
<date name="Ramadan begins" value="2007/9/13" type="religious" />
|
<date name="Ramadan begins" value="2007/9/13" type="religious" />
|
||||||
<date name="Ramadan begins" value="2008/9/2" type="religious" />
|
<date name="Ramadan begins" value="2008/9/2" type="religious" />
|
||||||
|
Loading…
Reference in New Issue
Block a user