From 24767462ca8ec77f4bba28df27416f4186d66a5d Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sun, 20 Mar 2011 02:05:19 +0000 Subject: [PATCH] Fix problem with "Print" report formats that was introduced with the last change to the report system. svn: r16854 --- src/gui/plug/report/_reportdialog.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/plug/report/_reportdialog.py b/src/gui/plug/report/_reportdialog.py index 73f854049..af7c4709b 100644 --- a/src/gui/plug/report/_reportdialog.py +++ b/src/gui/plug/report/_reportdialog.py @@ -691,9 +691,16 @@ def report(dbstate, uistate, person, report_class, options_class, MyReport.write_report() MyReport.end_report() - _run_long_process_in_thread(do_report, dialog.raw_name) - - if dialog.open_with_app.get_active(): + if dialog.open_with_app.get_sensitive() == False: + # This is a work around for the GtkPrint report which + # uses GTK. The print dialog interferes with the progress + # bar. So the progress bar should not be used. + do_report() + else: + _run_long_process_in_thread(do_report, dialog.raw_name) + + if dialog.open_with_app.get_active() and \ + dialog.open_with_app.get_sensitive(): open_file_with_default_application(dialog.options.get_output()) except Errors.FilterError, msg: