Move src/plugins/docgen/CairoDoc.py to src/plugins/lib/libcairodoc.py.
svn: r12363
This commit is contained in:
parent
fec7f5f7c0
commit
a39b1ba156
@ -296,7 +296,8 @@ src/plugins/import/ImportGrdb.py
|
|||||||
src/plugins/import/ImportProGen.py
|
src/plugins/import/ImportProGen.py
|
||||||
src/plugins/import/ImportVCard.py
|
src/plugins/import/ImportVCard.py
|
||||||
|
|
||||||
# plugins/lib directory
|
# plugins/lib directory
|
||||||
|
src/plugins/lib/libcairodoc.py
|
||||||
src/plugins/lib/libholiday.py
|
src/plugins/lib/libholiday.py
|
||||||
src/plugins/lib/libmapservice.py
|
src/plugins/lib/libmapservice.py
|
||||||
src/plugins/lib/libgrampsxml.py
|
src/plugins/lib/libgrampsxml.py
|
||||||
|
@ -43,7 +43,7 @@ import os
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from CairoDoc import CairoDoc
|
import libcairodoc
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
import Errors
|
import Errors
|
||||||
|
|
||||||
@ -509,7 +509,7 @@ class PrintPreview:
|
|||||||
# GtkPrint class
|
# GtkPrint class
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
class GtkPrint(CairoDoc):
|
class GtkPrint(libcairodoc.CairoDoc):
|
||||||
"""Print document via GtkPrint* interface.
|
"""Print document via GtkPrint* interface.
|
||||||
|
|
||||||
Requires Gtk+ 2.10.
|
Requires Gtk+ 2.10.
|
||||||
|
@ -7,7 +7,6 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen
|
|||||||
|
|
||||||
pkgdata_PYTHON = \
|
pkgdata_PYTHON = \
|
||||||
AsciiDoc.py \
|
AsciiDoc.py \
|
||||||
CairoDoc.py \
|
|
||||||
GtkPrint.py \
|
GtkPrint.py \
|
||||||
HtmlDoc.py \
|
HtmlDoc.py \
|
||||||
LaTeXDoc.py \
|
LaTeXDoc.py \
|
||||||
|
@ -36,7 +36,7 @@ from gettext import gettext as _
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
from CairoDoc import CairoDoc
|
import libcairodoc
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
import Utils
|
import Utils
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ DPI = 72.0
|
|||||||
# PdfDoc class
|
# PdfDoc class
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
class PdfDoc(CairoDoc):
|
class PdfDoc(libcairodoc.CairoDoc):
|
||||||
"""Render the document into PDF file using Cairo.
|
"""Render the document into PDF file using Cairo.
|
||||||
"""
|
"""
|
||||||
def run(self):
|
def run(self):
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
pkgdatadir = $(datadir)/@PACKAGE@/plugins/lib
|
pkgdatadir = $(datadir)/@PACKAGE@/plugins/lib
|
||||||
|
|
||||||
pkgdata_PYTHON = \
|
pkgdata_PYTHON = \
|
||||||
|
libcairodoc.py\
|
||||||
libgrampsxml.py\
|
libgrampsxml.py\
|
||||||
libholiday.py\
|
libholiday.py\
|
||||||
libmapservice.py
|
libmapservice.py
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2007 Zsolt Foldvari
|
# Copyright (C) 2007 Zsolt Foldvari
|
||||||
# Copyright (C) 2009 Benny Malengier
|
# Copyright (C) 2009 Benny Malengier
|
||||||
|
# Copyright (C) 2009 Brian Matherly
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -29,6 +30,7 @@
|
|||||||
# Python modules
|
# Python modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gettext import gettext as _
|
||||||
from math import radians
|
from math import radians
|
||||||
from xml.sax.saxutils import escape
|
from xml.sax.saxutils import escape
|
||||||
|
|
||||||
@ -39,6 +41,7 @@ from xml.sax.saxutils import escape
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import BaseDoc
|
import BaseDoc
|
||||||
from ReportBase import ReportUtils
|
from ReportBase import ReportUtils
|
||||||
|
from gen.plug import PluginManager, Plugin
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -46,7 +49,7 @@ from ReportBase import ReportUtils
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(".CairoDoc")
|
log = logging.getLogger(".libcairodoc")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -1483,3 +1486,20 @@ class CairoDoc(BaseDoc.BaseDoc, BaseDoc.TextDoc, BaseDoc.DrawDoc):
|
|||||||
cr.stroke()
|
cr.stroke()
|
||||||
|
|
||||||
self._pages[page_nr].draw(cr, layout, width, dpi_x, dpi_y)
|
self._pages[page_nr].draw(cr, layout, width, dpi_x, dpi_y)
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# register_plugin
|
||||||
|
#
|
||||||
|
#------------------------------------------------------------------------
|
||||||
|
def register_plugin():
|
||||||
|
PluginManager.get_instance().register_plugin(
|
||||||
|
Plugin(
|
||||||
|
name = __name__,
|
||||||
|
description = _("Provides a library for using Cairo to "
|
||||||
|
"generate documents."),
|
||||||
|
module_name = __name__
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
register_plugin()
|
Loading…
Reference in New Issue
Block a user