* src/Utils.py: provide a locale independant floating point conversion

utility
* src/TextDoc.py: call new gfloat utility instead of float
* src/PaperMenu.py: call new gfloat utility instead of float


svn: r1740
This commit is contained in:
Don Allingham
2003-06-14 17:11:11 +00:00
parent 7b548f8cdc
commit 8f595fdf87
3 changed files with 17 additions and 5 deletions

View File

@ -522,6 +522,16 @@ def set_titles(window,title,t,msg=None):
else:
window.set_title('%s - GRAMPS' % t)
def gfloat(val):
try:
return float(val)
except:
try:
return float(val.subst('.',','))
except:
return float(val.subst(',','.'))
return 0.0
#-------------------------------------------------------------------------
#
# Roman numbers