From 061a9e2761c800ea4176ae6b88c28be01c649472 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Fri, 13 Apr 2007 18:11:05 +0000 Subject: [PATCH] 0000908: GtkPrint doesn't parse if you don't have pygtk version 2.10 svn: r8381 --- ChangeLog | 4 ++++ src/docgen/GtkPrint.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 911cdf862..9821731c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-04-12 Brian Matherly + * src/docgen/GtkPrint.py: 0000908: GtkPrint doesn't parse if you don't have + pygtk version 2.10 + 2007-04-12 Brian Matherly * src/GrampsDb/_ReadXML.py: 0001011: XML import loses media objects when media object has no title diff --git a/src/docgen/GtkPrint.py b/src/docgen/GtkPrint.py index 43304eec8..ce1522c53 100644 --- a/src/docgen/GtkPrint.py +++ b/src/docgen/GtkPrint.py @@ -52,6 +52,10 @@ log = logging.getLogger(".GtkDoc") import pygtk import gtk + +if not hasattr(gtk, "PrintOperation"): + raise Errors.UnavailableError(_("Cannot be loaded because PyGtk 2.10 or later is not installed")) + import cairo import pango