diff --git a/ChangeLog b/ChangeLog index 88fde9f8c..59df03f66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2004-12-01 Don Allingham + * src/GenericFilter.py: use DateParser to parse dates. + 2004-11-30 Don Allingham * src/EditPerson.py: use Steve Swales' method for handling locale determination diff --git a/src/GenericFilter.py b/src/GenericFilter.py index 34ccec0a2..bac7409ed 100644 --- a/src/GenericFilter.py +++ b/src/GenericFilter.py @@ -48,10 +48,14 @@ import gtk import const import RelLib import Date +import DateHandler from TransTable import TransTable from gettext import gettext as _ from Utils import for_each_ancestor + +_date_parser = DateHandler.create_parser() + #------------------------------------------------------------------------- # # date_cmp @@ -950,8 +954,7 @@ class HasEvent(Rule): def __init__(self,list): Rule.__init__(self,list) if self.list and self.list[0]: - self.date = Date.Date() - self.date.set(self.list[0]) + self.date = _date_parser.parse(self.list[0]) else: self.date = None @@ -1004,8 +1007,7 @@ class HasFamilyEvent(Rule): def __init__(self,list): Rule.__init__(self,list) if self.list and self.list[0]: - self.date = Date.Date() - self.date.set(self.list[0]) + self.date = _date_parser.parse(self.list[0]) else: self.date = None @@ -1116,8 +1118,7 @@ class HasBirth(Rule): def __init__(self,list): Rule.__init__(self,list) if self.list and self.list[0]: - self.date = Date.Date() - self.date.set(self.list[0]) + self.date = _date_parser.parse(self.list[0]) else: self.date = None @@ -1163,8 +1164,7 @@ class HasDeath(Rule): def __init__(self,list): Rule.__init__(self,list) if self.list and self.list[0]: - self.date = Date.Date() - self.date.set(self.list[0]) + self.date = _date_parser.parse(self.list[0]) else: self.date = None diff --git a/src/ImgManip.py b/src/ImgManip.py index f0e002af5..15eb7b36d 100644 --- a/src/ImgManip.py +++ b/src/ImgManip.py @@ -22,7 +22,6 @@ import os import const import signal import md5 -import popen2 import gtk class ImgManip: @@ -44,6 +43,8 @@ class ImgManip: os.system(cmd) def fmt_data(self,cnv): + import popen2 + cmd = "%s '%s' '%s:-'" % (const.convert,self.src,cnv) r,w = popen2.popen2(cmd) buf = r.read() @@ -52,6 +53,8 @@ class ImgManip: return buf def fmt_scale_data(self,x,y,cnv): + import popen2 + cmd = "%s -geometry %dx%d '%s' '%s:-'" % (const.convert,x,y,self.src,cnv) signal.signal (signal.SIGCHLD, signal.SIG_DFL) r,w = popen2.popen2(cmd)