diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 056c43b57..995d9c622 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -5,6 +5,10 @@ consequently, the target filename) -- was confused with family group. * src/StyleEditor.py (save_paragraph): Call gfloat instead of float. * src/TextDoc.py (SheetParser.startElement): Likewise. + * src/Utils.py: Provide a locale-aware string formatting conversion + into C-locale string (for saving floats in XML) + * src/StyleEditor.py (draw): Call locale.str instead of str. + * src/TextDoc.py (StyleSheetList.save): Call gformat instead of '%f'. 2003-06-14 Don Allingham * src/preferences.glade: Don't immediately show preferences dialog diff --git a/gramps2/src/StyleEditor.py b/gramps2/src/StyleEditor.py index 5f9c3b46d..1c3e4e08f 100644 --- a/gramps2/src/StyleEditor.py +++ b/gramps2/src/StyleEditor.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,6 +42,7 @@ import Utils import const import TextDoc import ListModel +import locale from intl import gettext as _ class StyleListDisplay: @@ -223,9 +224,9 @@ class StyleEditor: self.top.get_widget("calign").set_active(1) else: self.top.get_widget("jalign").set_active(1) - self.top.get_widget("rmargin").set_text(str(p.get_right_margin())) - self.top.get_widget("lmargin").set_text(str(p.get_left_margin())) - self.top.get_widget("pad").set_text(str(p.get_padding())) + self.top.get_widget("rmargin").set_text(locale.str(p.get_right_margin())) + self.top.get_widget("lmargin").set_text(locale.str(p.get_left_margin())) + self.top.get_widget("pad").set_text(locale.str(p.get_padding())) self.top.get_widget("tborder").set_active(p.get_top_border()) self.top.get_widget("lborder").set_active(p.get_left_border()) self.top.get_widget("rborder").set_active(p.get_right_border()) diff --git a/gramps2/src/TextDoc.py b/gramps2/src/TextDoc.py index 1806e4b00..b247a1000 100644 --- a/gramps2/src/TextDoc.py +++ b/gramps2/src/TextDoc.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000 Donald N. Allingham +# Copyright (C) 2000-2003 Donald N. Allingham # # Modified September 2002 by Gary Shao # @@ -777,13 +777,14 @@ class StyleSheetList: f.write('underline="%d" ' % font.get_underline()) f.write('color="#%02x%02x%02x"/>\n' % font.get_color()) f.write('