From ada183fad105037b4a8b393b9dafb685c109f6cc Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 23 Apr 2004 16:55:24 +0000 Subject: [PATCH] * src/docgen/RTFDoc.py: Completely switch from grampslib. * src/docgen/PdfDoc.py: Typo. svn: r3103 --- gramps2/ChangeLog | 4 ++++ gramps2/src/docgen/PdfDoc.py | 4 ++-- gramps2/src/docgen/RTFDoc.py | 9 ++++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 16216d0ba..76f93b9c2 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2004-04-23 Alex Roitman + * src/docgen/RTFDoc.py: Completely switch from grampslib. + * src/docgen/PdfDoc.py: Typo. + 2004-04-21 Alex Roitman * src/SelectChild.py (on_save_child_clicked): Corrections. diff --git a/gramps2/src/docgen/PdfDoc.py b/gramps2/src/docgen/PdfDoc.py index ca64c8057..1c00f805e 100644 --- a/gramps2/src/docgen/PdfDoc.py +++ b/gramps2/src/docgen/PdfDoc.py @@ -591,8 +591,8 @@ try: print_label=_("Open in %s") % prog[1] else: print_label=None - Plugins.register_text_doc(type, PdfDoc, 1, 0, 1, ".html", print_label) - Plugins.register_draw_doc(type, PdfDoc, 1, 1, ".pdf", print_label) + Plugins.register_text_doc(type, PdfDoc, 1, 0, 1, ".pdf", print_label) + Plugins.register_draw_doc(type, PdfDoc, 1, 1, ".pdf", print_label) except: Plugins.register_text_doc('PDF document', PdflDoc, 1, 0, 1,".pdf", None) Plugins.register_draw_doc('PDF document', PdfDoc, 1, 1, ".pdf", None) diff --git a/gramps2/src/docgen/RTFDoc.py b/gramps2/src/docgen/RTFDoc.py index 3cb34f0a2..f699979ae 100644 --- a/gramps2/src/docgen/RTFDoc.py +++ b/gramps2/src/docgen/RTFDoc.py @@ -128,9 +128,12 @@ class RTFDoc(BaseDoc.BaseDoc): if self.print_req: apptype = 'application/rtf' - prog = grampslib.default_application_command(apptype) - os.environ["FILE"] = self.filename - os.system ('%s "$FILE" &' % prog[0]) + try: + app = GrampsMime.get_application(apptype)[0] + os.environ["FILE"] = self.filename + os.system ('%s "$FILE" &' % app) + except: + pass #-------------------------------------------------------------------- #