mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
69 lines
2.2 KiB
Diff
69 lines
2.2 KiB
Diff
|
diff --git a/libgda-report/RML/gda-report-rml-document.c b/libgda-report/RML/gda-report-rml-document.c
|
||
|
index 7bb13bc..3f905e5 100644
|
||
|
--- a/libgda-report/RML/gda-report-rml-document.c
|
||
|
+++ b/libgda-report/RML/gda-report-rml-document.c
|
||
|
@@ -189,61 +189,11 @@ gda_report_rml_document_new (GdaReportEngine *engine)
|
||
|
static gboolean
|
||
|
gda_report_rml_document_run_as_html (GdaReportDocument *doc, const gchar *filename, GError **error)
|
||
|
{
|
||
|
- static GMutex init_mutex;
|
||
|
- static gchar *converter = NULL;
|
||
|
-
|
||
|
- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE);
|
||
|
- g_return_val_if_fail (filename && *filename, FALSE);
|
||
|
-
|
||
|
- g_mutex_lock (&init_mutex);
|
||
|
- if (!converter) {
|
||
|
- converter = g_find_program_in_path ("trml2html.py");
|
||
|
- if (!converter) {
|
||
|
- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2html", "trml2html.py", NULL);
|
||
|
- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
|
||
|
- g_free (converter);
|
||
|
- converter = NULL;
|
||
|
- }
|
||
|
- }
|
||
|
- if (!converter) {
|
||
|
- g_set_error (error, 0, 0,
|
||
|
- _("Could not find the '%s' program"), "trml2html.py");
|
||
|
- g_mutex_unlock (&init_mutex);
|
||
|
- return FALSE;
|
||
|
- }
|
||
|
- }
|
||
|
- g_mutex_unlock (&init_mutex);
|
||
|
-
|
||
|
- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2html", error);
|
||
|
+ return TRUE;
|
||
|
}
|
||
|
|
||
|
static gboolean
|
||
|
gda_report_rml_document_run_as_pdf (GdaReportDocument *doc, const gchar *filename, GError **error)
|
||
|
{
|
||
|
- static GMutex init_mutex;
|
||
|
- static gchar *converter = NULL;
|
||
|
-
|
||
|
- g_return_val_if_fail (GDA_IS_REPORT_RML_DOCUMENT (doc), FALSE);
|
||
|
- g_return_val_if_fail (filename && *filename, FALSE);
|
||
|
-
|
||
|
- g_mutex_lock (&init_mutex);
|
||
|
- if (!converter) {
|
||
|
- converter = g_find_program_in_path ("trml2pdf.py");
|
||
|
- if (!converter) {
|
||
|
- converter = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "gda_trml2pdf", "trml2pdf.py", NULL);
|
||
|
- if (!g_file_test (converter, G_FILE_TEST_IS_EXECUTABLE)) {
|
||
|
- g_free (converter);
|
||
|
- converter = NULL;
|
||
|
- }
|
||
|
- }
|
||
|
- if (!converter) {
|
||
|
- g_set_error (error, 0, 0,
|
||
|
- _("Could not find the '%s' program"), "trml2pdf.py");
|
||
|
- g_mutex_unlock (&init_mutex);
|
||
|
- return FALSE;
|
||
|
- }
|
||
|
- }
|
||
|
- g_mutex_unlock (&init_mutex);
|
||
|
-
|
||
|
- return _gda_report_document_run_converter_path (doc, filename, converter, "trml2pdf", error);
|
||
|
+ return TRUE;
|
||
|
}
|