* src/Calendar.py: removed

* src/Gregorian.py: removed
* src/Hebrew.py: removed
* src/Julian.py: removed
* src/calendars/Islamic.py: removed
* src/calendars/Persian.py: removed
* src/calendars/Makefile.am: removed
* src/Date.py: New, simpler date structure
* src/DateHandler.py: Start of a class to abstract and select
parser and display functions based off locale
* src/DateParser.py: base date parsing class (US English)
* src/DateDisplay.py: base date display class (US English)
* src/DateEdit.py: handle new date method
* src/EditPerson.py: handle new date method
* src/EventEdit.py: handle new date method
* src/GrampsCfg.py: removed redundant options due to new date class
* src/StartupDialog.py: removed redundant options due to new date class
* src/Makefile.am: handle file changes
* src/Sort.py: handle new date method
* src/ReadGedcom.py: handle new date method
* src/ReadXML.py: handle new date method
* src/WriteGedcom.py: handle new date method
* src/WriteXML.py: handle new date method
* src/RelLib.py: handle new date method
* src/gramps_main.py: handle new date method
* src/gramps.glade: handle new date method


svn: r3546
This commit is contained in:
Don Allingham
2004-09-17 03:30:04 +00:00
parent 46b32a5619
commit 33f604cb11
27 changed files with 1827 additions and 2285 deletions

View File

@ -43,6 +43,7 @@ import gtk.gdk
#
#-------------------------------------------------------------------------
import Date
import DateParser
import const
#-------------------------------------------------------------------------
@ -60,15 +61,14 @@ class DateEdit:
def __init__(self,text_obj,pixmap_obj):
"""Creates a connection between the text_obj and the pixmap_obj"""
self.dp = DateParser.DateParser()
self.text_obj = text_obj
self.pixmap_obj = pixmap_obj
self.checkval = Date.Date()
self.text_obj.connect('focus-out-event',self.check)
self.check(None,None)
def set_calendar(self,cobj):
self.checkval.set_calendar_obj(cobj)
self.check(None,None)
def check(self,obj,val):
@ -76,11 +76,11 @@ class DateEdit:
valid date, sets the appropriate pixmap"""
text = unicode(self.text_obj.get_text())
self.checkval.set(text)
if not self.checkval.is_valid():
self.checkval = self.dp.parse(text)
if self.checkval.get_modifier() == Date.MOD_TEXTONLY:
self.pixmap_obj.set_from_pixbuf(DateEdit.bad)
elif self.checkval.get_incomplete():
self.pixmap_obj.set_from_pixbuf(DateEdit.caution)
# elif self.checkval.get_incomplete():
# self.pixmap_obj.set_from_pixbuf(DateEdit.caution)
else:
self.pixmap_obj.set_from_pixbuf(DateEdit.good)