From 2f2c6bf1e616dc57bc282c836fa979229ba98de3 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 5 Aug 2005 20:49:10 +0000 Subject: [PATCH] * src/EditPerson.py (did_data_change,on_apply_person_clicked): Convert date text to unicode before parsing. * src/Spell.py: Comment out to disable spell-checking for 2.0.6. svn: r5028 --- gramps2/ChangeLog | 5 ++++- gramps2/src/EditPerson.py | 8 ++++---- gramps2/src/Spell.py | 36 +++++++++++++++++++----------------- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index d46a6fc59..ecbc9c1c9 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,7 +1,10 @@ 2005-08-05 Alex Roitman * src/Spell.py: Make more robust to failure. * src/Makefile.am: Ship new file. - * NEWS: Update. + + * src/EditPerson.py (did_data_change,on_apply_person_clicked): + Convert date text to unicode before parsing. + * src/Spell.py: Comment out to disable spell-checking for 2.0.6. 2005-08-05 Martin Hawlisch * src/plugins/Checkpoint.py (rcs): define variable comment before using it. diff --git a/gramps2/src/EditPerson.py b/gramps2/src/EditPerson.py index 7429fe3de..cf71ef767 100644 --- a/gramps2/src/EditPerson.py +++ b/gramps2/src/EditPerson.py @@ -1324,8 +1324,8 @@ class EditPerson: orig record""" surname = unicode(self.surname.get_text()) - self.birth_date_object = self.dp.parse(self.bdate.get_text()) - self.death_date_object = self.dp.parse(self.ddate.get_text()) + self.birth_date_object = self.dp.parse(unicode(self.bdate.get_text())) + self.death_date_object = self.dp.parse(unicode(self.ddate.get_text())) self.birth.set_date_object(self.birth_date_object) self.death.set_date_object(self.death_date_object) @@ -1721,8 +1721,8 @@ class EditPerson: name = self.pname - self.birth_date_object = self.dp.parse(self.bdate.get_text()) - self.death_date_object = self.dp.parse(self.ddate.get_text()) + self.birth_date_object = self.dp.parse(unicode(self.bdate.get_text())) + self.death_date_object = self.dp.parse(unicode(self.ddate.get_text())) self.birth.set_date_object(self.birth_date_object) self.birth.set_place_handle(self.get_place(self.bplace,1)) diff --git a/gramps2/src/Spell.py b/gramps2/src/Spell.py index 5a08c7bb5..2f19ec76e 100644 --- a/gramps2/src/Spell.py +++ b/gramps2/src/Spell.py @@ -27,26 +27,28 @@ present, we default to no spell checking. """ -success = False -try: - import gtk - import gtkspell - import locale +#### FIXME: Uncomment after 2.0.6 is released. - text_view = gtk.TextView() - spell = gtkspell.Spell(text_view) - lang = locale.getlocale()[0] - spell.set_language(lang) - success = True +## success = False +## try: +## import gtk +## import gtkspell +## import locale -except ImportError, msg: - print "Spell.py:", msg -except RuntimeError,msg: - print "Spell.py:", msg -except SystemError,msg: - print "Spell.py:", msg +## text_view = gtk.TextView() +## spell = gtkspell.Spell(text_view) +## lang = locale.getlocale()[0] +## spell.set_language(lang) +## success = True -if success: +## except ImportError, msg: +## print "Spell.py:", msg +## except RuntimeError,msg: +## print "Spell.py:", msg +## except SystemError,msg: +## print "Spell.py:", msg + +if False: class Spell: def __init__(self,obj): self.spell = gtkspell.Spell(obj)