Merged trunk r18499 through r18539 into geps023.
Conflicts resolved in: gramps.pot svn: r18540
This commit is contained in:
@@ -1365,7 +1365,7 @@ def cl_report(database, name, category, options_str_dict):
|
||||
item.option_class.set_document(doc)
|
||||
report_class = item.get_write_item()
|
||||
obj = write_book_item(database,
|
||||
report_class, item.option_class)
|
||||
report_class, item.option_class, user)
|
||||
rptlist.append(obj)
|
||||
|
||||
doc.open(clr.option_class.get_output())
|
||||
|
@@ -38,6 +38,7 @@ import sys
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
import libcairodoc
|
||||
import Errors
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
#
|
||||
@@ -86,7 +87,13 @@ class PdfDoc(libcairodoc.CairoDoc):
|
||||
|
||||
# create cairo context and pango layout
|
||||
filename = self._backend.filename.encode(sys.getfilesystemencoding())
|
||||
surface = cairo.PDFSurface(filename, paper_width, paper_height)
|
||||
try:
|
||||
surface = cairo.PDFSurface(filename, paper_width, paper_height)
|
||||
except IOError,msg:
|
||||
errmsg = "%s\n%s" % (_("Could not create %s") % filename, msg)
|
||||
raise Errors.ReportError(errmsg)
|
||||
except:
|
||||
raise Errors.ReportError(_("Could not create %s") % filename)
|
||||
surface.set_fallback_resolution(300, 300)
|
||||
cr = pangocairo.CairoContext(cairo.Context(surface))
|
||||
|
||||
|
@@ -29,8 +29,8 @@
|
||||
|
||||
plg = newplugin()
|
||||
plg.id = 'ancestor_chart,BKI'
|
||||
plg.name = _("Ancestor Tree")
|
||||
plg.description = _("Produces a graphical ancestral tree (Book report)")
|
||||
plg.name = _("Ancestor Chart")
|
||||
plg.description = _("Produces a graphical ancestral chart")
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.4'
|
||||
plg.status = STABLE
|
||||
@@ -89,8 +89,8 @@ plg.report_modes = [REPORT_MODE_GUI, REPORT_MODE_BKI, REPORT_MODE_CLI]
|
||||
|
||||
plg = newplugin()
|
||||
plg.id = 'descend_chart,BKI'
|
||||
plg.name = _("Descendant Tree")
|
||||
plg.description = _("Produces a graphical descendant tree (Book report)")
|
||||
plg.name = _("Descendant Chart")
|
||||
plg.description = _("Produces a graphical descendant chart")
|
||||
plg.version = '1.0'
|
||||
plg.gramps_target_version = '3.4'
|
||||
plg.status = STABLE
|
||||
@@ -127,8 +127,8 @@ plg.report_modes = [REPORT_MODE_GUI, REPORT_MODE_CLI]
|
||||
|
||||
plg = newplugin()
|
||||
plg.id = 'family_descend_chart,BKI'
|
||||
plg.name = _("Family Descendant Tree")
|
||||
plg.description = _("Produces a graphical descendant tree around a family (Book report)")
|
||||
plg.name = _("Family Descendant Chart")
|
||||
plg.description = _("Produces a graphical descendant chart around a family")
|
||||
plg.version = '1.0'
|
||||
plg.status = STABLE
|
||||
plg.fname = 'DescendTree.py'
|
||||
|
@@ -240,10 +240,10 @@ class PedigreeGramplet(Gramplet):
|
||||
self.gui.buffer.set_text("")
|
||||
active_handle = self.get_active('Person')
|
||||
active_person = self.dbstate.db.get_person_from_handle(active_handle)
|
||||
if not active_person:
|
||||
yield False
|
||||
#no wrap in Gramplet
|
||||
self.no_wrap()
|
||||
if active_person is None:
|
||||
return
|
||||
self.process_person(active_person.handle, 1, "f") # father
|
||||
self.process_person(active_person.handle, 0, "a") # active #FIXME: should be 1?
|
||||
self.process_person(active_person.handle, 1, "m") # mother
|
||||
|
@@ -5,7 +5,8 @@
|
||||
# Copyright (C) 2009 Benny Malengier
|
||||
# Copyright (C) 2009 Brian Matherly
|
||||
# Copyright (C) 2010 Peter Landgren
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2010 Jakim Friant
|
||||
# Copyright (C) 2011 Paul Franklin
|
||||
#
|
||||
# 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
|
||||
@@ -1224,6 +1225,8 @@ class CairoDoc(BaseDoc, TextDoc, DrawDoc):
|
||||
# BaseDoc implementation
|
||||
|
||||
def open(self, filename):
|
||||
if filename[-4:] != '.pdf':
|
||||
filename = filename + '.pdf'
|
||||
self._backend = CairoBackend(filename)
|
||||
self._doc = GtkDocDocument()
|
||||
self._active_element = self._doc
|
||||
|
@@ -45,6 +45,7 @@ import os.path
|
||||
from gen.plug.docbackend import DocBackend
|
||||
from libhtml import Html
|
||||
from Utils import xml_lang
|
||||
import Errors
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
@@ -242,9 +243,25 @@ class HtmlBackend(DocBackend):
|
||||
overwrite method, htmlbackend creates a html object that is written on
|
||||
close
|
||||
"""
|
||||
DocBackend.open(self)
|
||||
try:
|
||||
DocBackend.open(self)
|
||||
except IOError,msg:
|
||||
errmsg = "%s\n%s" % (_("Could not create %s") %
|
||||
self._filename, msg)
|
||||
raise Errors.ReportError(errmsg)
|
||||
except:
|
||||
raise Errors.ReportError(_("Could not create %s") %
|
||||
self._filename)
|
||||
if not os.path.isdir(self.datadirfull()):
|
||||
os.mkdir(self.datadirfull())
|
||||
try:
|
||||
os.mkdir(self.datadirfull())
|
||||
except IOError,msg:
|
||||
errmsg = "%s\n%s" % (_("Could not create %s") %
|
||||
self.datadirfull(), msg)
|
||||
raise Errors.ReportError(errmsg)
|
||||
except:
|
||||
raise Errors.ReportError(_("Could not create %s") %
|
||||
self.datadirfull())
|
||||
self.html_page, self.html_header, self.html_body = Html.page(
|
||||
lang=xml_lang(), title=self.title)
|
||||
|
||||
|
Reference in New Issue
Block a user