From faaaf7e858254cbf6e9bf550bde55b2b04c58b89 Mon Sep 17 00:00:00 2001 From: Zsolt Foldvari Date: Fri, 28 Sep 2007 12:24:27 +0000 Subject: [PATCH] 2007-09-28 Zsolt Foldvari * src/docgen/CairoDoc.py (fontstyle_to_fontdescription): Fix deprecated warning. * src/ReportBase/_PaperMenu.py: * src/data/papersize.xml: Fix "C" and "D" paper size values. * src/const.py.in: Correct PAPERSIZE path constant. svn: r9026 --- ChangeLog | 8 ++++++++ src/ReportBase/_PaperMenu.py | 6 +++--- src/const.py.in | 2 +- src/data/papersize.xml | 4 ++-- src/docgen/CairoDoc.py | 5 +++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d253bb5b5..673108fad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-09-28 Zsolt Foldvari + * src/docgen/CairoDoc.py (fontstyle_to_fontdescription): Fix deprecated + warning. + * src/ReportBase/_PaperMenu.py: + * src/data/papersize.xml: + Fix "C" and "D" paper size values. + * src/const.py.in: Correct PAPERSIZE path constant. + 2007-09-28 Gary Burton * src/plugins/NarrativeWeb.py: provide fallback dates on Narrative Web pages Issue #0001258 diff --git a/src/ReportBase/_PaperMenu.py b/src/ReportBase/_PaperMenu.py index ec2c03440..95be1a20a 100644 --- a/src/ReportBase/_PaperMenu.py +++ b/src/ReportBase/_PaperMenu.py @@ -197,8 +197,8 @@ except (IOError,OSError,SAXParseException): BaseDoc.PaperSize("B5",25.0,17.6), BaseDoc.PaperSize("B6",17.6,12.5), BaseDoc.PaperSize("B",43.18,27.94), - BaseDoc.PaperSize("C",56.1,43.18), - BaseDoc.PaperSize("D",86.36, 56.1), + BaseDoc.PaperSize("C",55.88,43.18), + BaseDoc.PaperSize("D",86.36, 55.88), BaseDoc.PaperSize("E",111.76,86.36), BaseDoc.PaperSize(_("Custom Size"),-1,-1) - ] + ] diff --git a/src/const.py.in b/src/const.py.in index ffc173a37..fdcffda11 100644 --- a/src/const.py.in +++ b/src/const.py.in @@ -117,7 +117,7 @@ SYSTEM_FILTERS = os.path.join(DATA_DIR, "system_filters.xml") TEMPLATE_DIR = os.path.join(DATA_DIR, "templates") TIP_DATA = os.path.join(DATA_DIR, "tips.xml") -PAPERSIZE = "file:%s/papersize.xml" % DATA_DIR +PAPERSIZE = os.path.join(DATA_DIR, "papersize.xml") USE_TIPS = False diff --git a/src/data/papersize.xml b/src/data/papersize.xml index 4214ed31d..ead720f8d 100644 --- a/src/data/papersize.xml +++ b/src/data/papersize.xml @@ -16,7 +16,7 @@ - - + + diff --git a/src/docgen/CairoDoc.py b/src/docgen/CairoDoc.py index 25f06835b..834ae6d05 100644 --- a/src/docgen/CairoDoc.py +++ b/src/docgen/CairoDoc.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2007 Zsolt Foldvari # # 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 @@ -96,6 +96,7 @@ _GNOME_FONT = { font_families = _GNOME_FONT +# FIXME debug logging does not work here. def set_font_families(): ##def set_font_families(pango_context): """Set the used font families depending on availability. @@ -152,7 +153,7 @@ def fontstyle_to_fontdescription(font_style): f_style = pango.STYLE_NORMAL font_description = pango.FontDescription(font_families[font_style.face]) - font_description.set_size(font_style.get_size() * pango.SCALE) + font_description.set_size(int(round(font_style.get_size() * pango.SCALE))) font_description.set_weight(f_weight) font_description.set_style(f_style)