* 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
This commit is contained in:
Alex Roitman 2005-08-05 20:49:10 +00:00
parent 38fcd5aaa1
commit 2f2c6bf1e6
3 changed files with 27 additions and 22 deletions

View File

@ -1,7 +1,10 @@
2005-08-05 Alex Roitman <shura@gramps-project.org> 2005-08-05 Alex Roitman <shura@gramps-project.org>
* src/Spell.py: Make more robust to failure. * src/Spell.py: Make more robust to failure.
* src/Makefile.am: Ship new file. * 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 <Martin.Hawlisch@gmx.de> 2005-08-05 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/plugins/Checkpoint.py (rcs): define variable comment before using it. * src/plugins/Checkpoint.py (rcs): define variable comment before using it.

View File

@ -1324,8 +1324,8 @@ class EditPerson:
orig record""" orig record"""
surname = unicode(self.surname.get_text()) surname = unicode(self.surname.get_text())
self.birth_date_object = self.dp.parse(self.bdate.get_text()) self.birth_date_object = self.dp.parse(unicode(self.bdate.get_text()))
self.death_date_object = self.dp.parse(self.ddate.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_date_object(self.birth_date_object)
self.death.set_date_object(self.death_date_object) self.death.set_date_object(self.death_date_object)
@ -1721,8 +1721,8 @@ class EditPerson:
name = self.pname name = self.pname
self.birth_date_object = self.dp.parse(self.bdate.get_text()) self.birth_date_object = self.dp.parse(unicode(self.bdate.get_text()))
self.death_date_object = self.dp.parse(self.ddate.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_date_object(self.birth_date_object)
self.birth.set_place_handle(self.get_place(self.bplace,1)) self.birth.set_place_handle(self.get_place(self.bplace,1))

View File

@ -27,26 +27,28 @@ present, we default to no spell checking.
""" """
success = False #### FIXME: Uncomment after 2.0.6 is released.
try:
import gtk
import gtkspell
import locale
text_view = gtk.TextView() ## success = False
spell = gtkspell.Spell(text_view) ## try:
lang = locale.getlocale()[0] ## import gtk
spell.set_language(lang) ## import gtkspell
success = True ## import locale
except ImportError, msg: ## text_view = gtk.TextView()
print "Spell.py:", msg ## spell = gtkspell.Spell(text_view)
except RuntimeError,msg: ## lang = locale.getlocale()[0]
print "Spell.py:", msg ## spell.set_language(lang)
except SystemError,msg: ## success = True
print "Spell.py:", msg
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: class Spell:
def __init__(self,obj): def __init__(self,obj):
self.spell = gtkspell.Spell(obj) self.spell = gtkspell.Spell(obj)