* src/GenericFilter.py: use DateParser to parse dates.
svn: r3773
This commit is contained in:
parent
db2d142ab7
commit
66cb1d05f6
@ -1,3 +1,6 @@
|
||||
2004-12-01 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/GenericFilter.py: use DateParser to parse dates.
|
||||
|
||||
2004-11-30 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* src/EditPerson.py: use Steve Swales' method for handling
|
||||
locale determination
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user