From da433a0c5fb8050bb461b29ea58d5ca2adf1aa78 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 14 Jun 2003 17:11:11 +0000 Subject: [PATCH] * 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 --- gramps2/src/PaperMenu.py | 5 +++-- gramps2/src/TextDoc.py | 7 ++++--- gramps2/src/Utils.py | 10 ++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gramps2/src/PaperMenu.py b/gramps2/src/PaperMenu.py index f923a2fef..798fa29f3 100644 --- a/gramps2/src/PaperMenu.py +++ b/gramps2/src/PaperMenu.py @@ -33,6 +33,7 @@ import gtk import TextDoc import GrampsCfg import const +import Utils from intl import gettext as _ #------------------------------------------------------------------------- @@ -110,8 +111,8 @@ class PageSizeParser(handler.ContentHandler): def startElement(self,tag,attrs): if tag == "page": name = attrs['name'] - height = float(attrs['height']) - width = float(attrs['width']) + height = Utils.gfloat(attrs['height']) + width = Utils.gfloat(attrs['width']) self.paper_list.append(TextDoc.PaperStyle(name,height,width)) #------------------------------------------------------------------------- diff --git a/gramps2/src/TextDoc.py b/gramps2/src/TextDoc.py index aa359e964..04861bf24 100644 --- a/gramps2/src/TextDoc.py +++ b/gramps2/src/TextDoc.py @@ -63,6 +63,7 @@ __version__ = "Revision:$" # #------------------------------------------------------------------------- import os +import Utils #------------------------------------------------------------------------- # @@ -776,9 +777,9 @@ class StyleSheetList: f.write('underline="%d" ' % font.get_underline()) f.write('color="#%02x%02x%02x"/>\n' % font.get_color()) f.write('