From 2faff1abfbaf488a48645f7ead3214088b890147 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Thu, 27 Dec 2007 22:05:45 +0000 Subject: [PATCH] _GraphvizReportDialog.py: Fix Graphviz generated PDF. svn: r9603 --- ChangeLog | 5 ++++- src/ReportBase/_GraphvizReportDialog.py | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb88fb531..3851e20c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-12-27 Brian Matherly - * src/ReportBase/_GraphvisReportDialog.py: Fix to conform to 80 columns. + * src/ReportBase/_GraphvizReportDialog.py: Fix Graphviz generated PDF. + +2007-12-27 Brian Matherly + * src/ReportBase/_GraphvizReportDialog.py: Fix to conform to 80 columns. Add Graphviz generated PDF as an option (requires Graphviz 2.16 to work) 2007-12-27 Brian Matherly diff --git a/src/ReportBase/_GraphvizReportDialog.py b/src/ReportBase/_GraphvizReportDialog.py index 3f795d050..9b0f3b461 100644 --- a/src/ReportBase/_GraphvizReportDialog.py +++ b/src/ReportBase/_GraphvizReportDialog.py @@ -538,6 +538,7 @@ class GVPdfGsDoc(GVDocBase): #------------------------------------------------------------------------------- _formats = [] _formats += [{ 'type' : "dot", + 'ext' : "dot", 'descr': _("Graphviz Dot File"), 'mime' : "text/x-graphviz", 'class': GVDotDoc }] @@ -545,42 +546,50 @@ _formats += [{ 'type' : "dot", if _dot_found: if _gs_cmd != "": - _formats += [{ 'type' : "pdf", + _formats += [{ 'type' : "gspdf", + 'ext' : "pdf", 'descr': _("PDF (Ghostscript)"), 'mime' : "application/pdf", 'class': GVPdfGsDoc }] - _formats += [{ 'type' : "pdf", + _formats += [{ 'type' : "gvpdf", + 'ext' : "pdf", 'descr': _("PDF (Graphviz)"), 'mime' : "application/pdf", 'class': GVPdfGvDoc }] _formats += [{ 'type' : "ps", + 'ext' : "ps", 'descr': _("Postscript"), 'mime' : "application/postscript", 'class': GVPsDoc }] _formats += [{ 'type' : "svg", + 'ext' : "svg", 'descr': _("Structured Vector Graphics (SVG)"), 'mime' : "image/svg", 'class': GVSvgDoc }] _formats += [{ 'type' : "svgz", + 'ext' : "svgz", 'descr': _("Compressed Structured Vector Graphs (SVG)"), 'mime' : "image/svgz", 'class': GVSvgzDoc }] _formats += [{ 'type' : "jpg", + 'ext' : "jpg", 'descr': _("JPEG image"), 'mime' : "image/jpeg", 'class': GVJpegDoc }] _formats += [{ 'type' : "gif", + 'ext' : "gif", 'descr': _("GIF image"), 'mime' : "image/gif", 'class': GVGifDoc }] _formats += [{ 'type' : "png", + 'ext' : "png", 'descr': _("PNG image"), 'mime' : "image/png", 'class': GVPngDoc }] @@ -627,7 +636,7 @@ class GraphvizFormatComboBox(gtk.ComboBox): return 0 def get_ext(self): - return '.%s' % _formats[self.get_active()]["type"] + return '.%s' % _formats[self.get_active()]['ext'] def get_format_str(self): return _formats[self.get_active()]["type"]