gui: Fix File|Export in output viewer.
authorBen Pfaff <blp@gnu.org>
Sat, 20 Feb 2010 20:34:25 +0000 (12:34 -0800)
committerBen Pfaff <blp@gnu.org>
Sat, 20 Feb 2010 20:34:25 +0000 (12:34 -0800)
Commit f51ecb480 "Greatly simplify PSPP configuration" changed how PSPP
output drivers are configured but failed to completely update the
implementation of File|Export to match.  This commit fixes the problem.

A few problems, perhaps not connected, linger:

    * The CSV driver appears to always output to "pspp.csv" when invoked
      from the GUI, regardless of the requested file name.

    * The ODT driver appears to be broken.

Reported by John Darrington <john@darrington.wattle.id.au>.

src/ui/gui/psppire-output-window.c

index ebf29c01a3ca41c3a58f9d456fee644fb8679919..e217c0edca665274a7a9d28daa8c60bb69693558 100644 (file)
@@ -450,29 +450,25 @@ psppire_output_window_export (PsppireOutputWindow *window)
       string_map_insert (&options, "output-file", filename);
       if (filter == pdf_filter)
         {
-          string_map_insert (&options, "output-type", "pdf");
-          export_output (window, &options, "cairo");
+          export_output (window, &options, "pdf");
         }
       else if (filter == html_filter)
         export_output (window, &options, "html");
       else if (filter == odt_filter)
-        export_output (window, &options, "odf");
+        export_output (window, &options, "odt");
       else if (filter == txt_filter)
         {
           string_map_insert (&options, "headers", "false");
           string_map_insert (&options, "paginate", "false");
           string_map_insert (&options, "squeeze", "true");
           string_map_insert (&options, "emphasis", "none");
-          string_map_insert (&options, "chart-type", "none");
+          string_map_insert (&options, "charts", "none");
           string_map_insert (&options, "top-margin", "0");
           string_map_insert (&options, "bottom-margin", "0");
-          export_output (window, &options, "ascii");
+          export_output (window, &options, "txt");
         }
       else if (filter == ps_filter)
-        {
-          string_map_insert (&options, "output-type", "ps");
-          export_output (window, &options, "cairo");
-        }
+        export_output (window, &options, "ps");
       else if (filter == csv_filter)
         export_output (window, &options, "csv");
       else