From 0f96422fd0ce66739b06ee514111fd9b15b6e110 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Thu, 20 Dec 2007 05:10:24 +0000 Subject: [PATCH] 2007-12-20 Douglas S. Blank * src/plugins/ExportVCard.py: fixed date.get_text() as signal for text * src/plugins/ExportVCalendar.py: fixed date.get_text() ditto * src/plugins/WriteGeneWeb.py: fixed date.get_text() ditto svn: r9540 --- ChangeLog | 5 +++++ src/plugins/ExportVCalendar.py | 3 +-- src/plugins/ExportVCard.py | 5 ++++- src/plugins/WriteGeneWeb.py | 6 ++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6b1734170..4d0f8d576 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-20 Douglas S. Blank + * src/plugins/ExportVCard.py: fixed date.get_text() as signal for text + * src/plugins/ExportVCalendar.py: fixed date.get_text() ditto + * src/plugins/WriteGeneWeb.py: fixed date.get_text() ditto + 2007-12-19 Douglas S. Blank * src/GrampsCfg.py: added a warning about duplicate pattern diff --git a/src/plugins/ExportVCalendar.py b/src/plugins/ExportVCalendar.py index fbdf5c7ed..3fe503e6e 100644 --- a/src/plugins/ExportVCalendar.py +++ b/src/plugins/ExportVCalendar.py @@ -290,8 +290,7 @@ class CalendarWriter: def format_date(self,date,thisyear=0): retval = "" - strval = date.get_text() - if strval: + if date.get_modifier() == Date.MOD_TEXTONLY: return "" elif not date.is_empty(): mod = date.get_modifier() diff --git a/src/plugins/ExportVCard.py b/src/plugins/ExportVCard.py index f14c603b0..d5aa0fddc 100644 --- a/src/plugins/ExportVCard.py +++ b/src/plugins/ExportVCard.py @@ -213,7 +213,10 @@ class CardWriter: if birth: b_date = birth.get_date_object() mod = b_date.get_modifier() - if not b_date.get_text() and not b_date.is_empty() and not mod == Date.MOD_SPAN and not mod == Date.MOD_RANGE: + if (date.get_modifier() != Date.MOD_TEXTONLY and + not b_date.is_empty() and + not mod == Date.MOD_SPAN and + not mod == Date.MOD_RANGE): (day,month,year,sl) = b_date.get_start_date() if day > 0 and month > 0 and year > 0: self.writeln("BDAY:%s-%02d-%02d" % (year,month,day)) diff --git a/src/plugins/WriteGeneWeb.py b/src/plugins/WriteGeneWeb.py index 1a8a3c4cd..f41a7d986 100644 --- a/src/plugins/WriteGeneWeb.py +++ b/src/plugins/WriteGeneWeb.py @@ -603,10 +603,8 @@ class GeneWebWriter: def format_date(self,date): retval = "" - - strval = date.get_text() - if strval: - retval = "0(%s)" % self.rem_spaces(strval) + if date.get_modifier() == gen.lib.Date.MOD_TEXTONLY: + retval = "0(%s)" % self.rem_spaces(date.get_text()) elif not date.is_empty(): mod = date.get_modifier() cal = cal = date.get_calendar()