* 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:
10
src/Utils.py
10
src/Utils.py
@ -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
|
||||
|
Reference in New Issue
Block a user