Code

Fixes bug #1495310, allowing parameters for output extensions.
authorkeescook <keescook@users.sourceforge.net>
Sat, 27 May 2006 16:28:49 +0000 (16:28 +0000)
committerkeescook <keescook@users.sourceforge.net>
Sat, 27 May 2006 16:28:49 +0000 (16:28 +0000)
ChangeLog
src/extension/implementation/script.cpp

index 42b1325b9df9a698211a0e2d5640b9a0c7803bbd..e98febc31eb56959546eb2a191359fe094428a0e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-27  Kees Cook  <kees@outflux.net>
+
+       * src/extension/implementation/script.cpp: allow output extension
+         parameters to be prompted and used, closes bug #1495310.
+
 2006-05-26  MenTaLguY  <mental@rydia.net>
 
        * src/dialogs/layers-panel.h, src/dialogs/layers-panel.cpp:
index bd9b085e250e9a7dc6542a9d36861a07aebeb81d..e316822fce6438a2b7fa1bfb300768345514eff0 100644 (file)
@@ -31,6 +31,7 @@
 #include "prefs-utils.h"
 #include "../system.h"
 #include "extension/effect.h"
+#include "extension/output.h"
 #include "extension/db.h"
 #include "script.h"
 
@@ -366,8 +367,7 @@ Script::prefs_input(Inkscape::Extension::Input *module, gchar const *filename)
 Gtk::Widget *
 Script::prefs_output(Inkscape::Extension::Output *module)
 {
-    /*return module->autogui();*/
-    return NULL;
+    return module->autogui(NULL, NULL); 
 }
 
 /**
@@ -524,7 +524,12 @@ Script::save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *
     gchar *local_filename = g_filename_from_utf8( filename,
                                                   -1,  &bytesRead,  &bytesWritten, &error);
 
-    execute(command, tempfilename_in, local_filename);
+    Glib::ustring local_command(command);
+    Glib::ustring * paramString = module->paramString();
+    local_command += *paramString;
+    delete paramString;
+
+    execute(local_command.c_str(), tempfilename_in, local_filename);
 
     g_free(local_filename);