diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 32758665f..b96dd38b6 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2005-11-24 Alex Roitman + * NEWS: Update. + * src/docgen/HtmlDoc.py (build_style_declaration): Use top- and + bottom- margins for paragraph styles. + 2005-11-23 Don Allingham * src/docgen/KwordDoc.py: fix margins and fonts. @@ -82,18 +87,18 @@ * src/DateParser.py: match end of string for regex matching 2005-11-18 Martin Hawlisch - * src/Utils.py (find_file): new method that tries to check the existance - of a file by trying out multiple encoding variants for the filename. + * src/Utils.py (find_file): new method that tries to check the + existance of a file by trying out multiple encoding variants for + the filename. * src/ImgManip.py (get_thumbnail_image): Use Utils.find_file to fix encoding problems, additionally catch OSError * src/ImageSelect.py (on_name_changed): Use Utils.find_file * src/AddMedia.py (on_name_changed): Use Utils.find_file * src/plugins/Check.py (encoding) dont encode a utf-8 string as again, - (cleanup_missing_photos) Use Utils.find_file to fix encoding problems - + (cleanup_missing_photos) Use Utils.find_file to fix encoding problems * src/Utils.py (find_folder): new method - * src/gramps_main.py: Use Utils.find_file and Utils.find_folder to enable - using unicode names for gramps databases + * src/gramps_main.py: Use Utils.find_file and Utils.find_folder to + enable using unicode names for gramps databases 2005-11-17 Martin Hawlisch * src/gramps.glade, diff --git a/gramps2/NEWS b/gramps2/NEWS index f6c949133..b2ddb8675 100644 --- a/gramps2/NEWS +++ b/gramps2/NEWS @@ -1,4 +1,11 @@ Version 2.0.9 -- the "Nobody expects the Spanish inquisition!" release +* Incremental interface improvements. +* Automated testing added, based on the CLI functionality. +* Smaller number of supported reports. +* Report rendering improvements in OOo, PDF, gnome-print, PS, HTML, + abw, and kwd formats. +* New filter rule: Ancestor of bookmarked person less than N generations + away (Wayne Bergeron). * Numerous web generator improvements. * GEDCOM import supports forward-referencing named notes. * User manual updates. @@ -7,7 +14,7 @@ Version 2.0.9 -- the "Nobody expects the Spanish inquisition!" release * Persistent options for tools, as applicable. * Export patronymic names into GEDCOM. * Updates for Swedish translation and date localization (Stefan Bjork). -* Fully formalized XML format (DTD and RELAX NG schema). +* Fully formalized XML format (DTD and RelaxNG schema). * New plugin documenting command line reference. * Memory leak in libbglade worked around. * Limitation of 31 generations in reports removed. diff --git a/gramps2/src/docgen/HtmlDoc.py b/gramps2/src/docgen/HtmlDoc.py index 414070d9e..6a80ddd43 100644 --- a/gramps2/src/docgen/HtmlDoc.py +++ b/gramps2/src/docgen/HtmlDoc.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2004 Donald N. Allingham +# Copyright (C) 2000-2005 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 @@ -20,11 +20,21 @@ # $Id$ +#------------------------------------------------------------------------ +# +# python modules +# +#------------------------------------------------------------------------ import os -import string import re import time +from gettext import gettext as _ +#------------------------------------------------------------------------ +# +# GRAMPS modules +# +#------------------------------------------------------------------------ import PluginMgr import ImgManip import TarFile @@ -34,12 +44,17 @@ import BaseDoc import QuestionDialog import GrampsMime -from gettext import gettext as _ - -t_header_line_re = re.compile(r"(.*)(.*)(.*)", - re.DOTALL|re.IGNORECASE|re.MULTILINE) -t_keyword_line_re = re.compile(r'(.*name="keywords"\s+content=")([^\"]*)(".*)$', - re.DOTALL|re.IGNORECASE|re.MULTILINE) +#------------------------------------------------------------------------ +# +# Constant regular expressions +# +#------------------------------------------------------------------------ +t_header_line_re = re.compile( + r"(.*)(.*)(.*)", + re.DOTALL|re.IGNORECASE|re.MULTILINE) +t_keyword_line_re = re.compile( + r'(.*name="keywords"\s+content=")([^\"]*)(".*)$', + re.DOTALL|re.IGNORECASE|re.MULTILINE) #------------------------------------------------------------------------ # @@ -126,7 +141,7 @@ class HtmlDoc(BaseDoc.BaseDoc): self.image_dir = dirname def set_keywords(self,keywords): - self.meta = string.join(keywords,",") + self.meta = ",".join(keywords) def load_tpkg(self): start = re.compile(r"") @@ -207,8 +222,8 @@ class HtmlDoc(BaseDoc.BaseDoc): self.top = _top def process_line(self,line): - l = string.replace(line,'$VERSION',const.version) - return string.replace(l,'$COPYRIGHT',self.copyright) + l = line.replace('$VERSION',const.version) + return l.replace('$COPYRIGHT',self.copyright) def open(self,filename): (r,e) = os.path.splitext(filename) @@ -242,7 +257,7 @@ class HtmlDoc(BaseDoc.BaseDoc): self.f.write(self.style_declaration) def build_header(self): - self.fix_title(string.join(self.top, "")) + self.fix_title("".join(self.top)) def fix_title(self,msg=None): if msg == None: @@ -290,6 +305,8 @@ class HtmlDoc(BaseDoc.BaseDoc): text_indent = "%.2f" % style.get_first_indent() right_margin = "%.2f" % style.get_right_margin() left_margin = "%.2f" % style.get_left_margin() + top_margin = "%.2f" % style.get_top_margin() + bottom_margin = "%.2f" % style.get_bottom_margin() top = bottom = left = right = 'none' if style.get_top_border(): @@ -315,17 +332,19 @@ class HtmlDoc(BaseDoc.BaseDoc): '\tfont-size: %dpt; color: %s;\n' '\ttext-align: %s; text-indent: %scm;\n' '\tmargin-right: %scm; margin-left: %scm;\n' + '\tmargin-top: %scm; margin-bottom: %scm;\n' '\tborder-top:%s; border-bottom:%s;\n' '\tborder-left:%s; border-right:%s;\n' '\t%s%sfont-family:%s;\n}' % (key, font_size, font_color, align, text_indent, right_margin, left_margin, + top_margin, bottom_margin, top, bottom, left, right, italic, bold, family)) text.append('-->\n') - self.style_declaration = string.join(text,'\n') + self.style_declaration = '\n'.join(text) def close(self): for line in self.bottom: @@ -460,10 +479,10 @@ class HtmlDoc(BaseDoc.BaseDoc): self.end_paragraph() def write_text(self,text): - text = string.replace(text,'&','&'); # Must be first - text = string.replace(text,'<','<'); - text = string.replace(text,'>','>'); - text = string.replace(text,'\n','
') + text = text.replace('&','&'); # Must be first + text = text.replace('<','<'); + text = text.replace('>','>'); + text = text.replace('\n','
') text = text.replace('<super>','') text = text.replace('</super>','') if text != "": @@ -475,7 +494,6 @@ class HtmlDoc(BaseDoc.BaseDoc): # Register the document generator with the GRAMPS plugin system # #------------------------------------------------------------------------ - try: import Utils