part 3 : split basedoc in files, remove Utils dependance, move fontscale in gen,

update build system


svn: r12603
This commit is contained in:
Benny Malengier
2009-05-31 14:59:56 +00:00
parent 206e9f1aba
commit fb3ec68c6a
63 changed files with 2191 additions and 2521 deletions

View File

@ -431,33 +431,6 @@ from warnings import warn
def set_titles(window, title, t, msg=None):
warn('The Utils.set_titles is deprecated. Use ManagedWindow methods')
def gfloat(val):
"""Convert to floating number, taking care of possible locale differences.
Useful for reading float values from text entry fields
while under non-English locale.
"""
try:
return float(val)
except:
try:
return float(val.replace('.', ', '))
except:
return float(val.replace(', ', '.'))
return 0.0
def gformat(val):
"""Performs ('%.3f' % val) formatting with the resulting string always
using dot ('.') as a decimal point.
Useful for writing float values into XML when under non-English locale.
"""
decimal_point = locale.localeconv()['decimal_point']
return_val = "%.3f" % val
return return_val.replace(decimal_point, '.')
def search_for(name):
if name.startswith( '"' ):
name = name.split('"')[1]