summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aec1b94)
raw | patch | inline | side by side (parent: aec1b94)
author | gouldtj <gouldtj@users.sourceforge.net> | |
Sun, 6 Jan 2008 23:00:23 +0000 (23:00 +0000) | ||
committer | gouldtj <gouldtj@users.sourceforge.net> | |
Sun, 6 Jan 2008 23:00:23 +0000 (23:00 +0000) |
Scripting now maintains the output_extension parameter accross the
script. This was necissary because the file written out gets the the
parameter of what it was written out with, while the original document
gets fixed. Even though the current document gets corrected by the
output function, the script hands back the one that is written out.
Basically, this means that we need to handle it in this file. And now
we do.
Fixes lp: 167132
script. This was necissary because the file written out gets the the
parameter of what it was written out with, while the original document
gets fixed. Even though the current document gets corrected by the
output function, the script hands back the one that is written out.
Basically, this means that we need to handle it in this file. And now
we do.
Fixes lp: 167132
src/extension/implementation/script.cpp | patch | blob | history |
index 3ebe173f36f9032305646612ba825450e2f7bebc..09dc9eb30dd4f99a00294da59cef9fcdb69fb361 100644 (file)
#include "ui/view/view.h"
#include "desktop-handles.h"
+#include "desktop.h"
#include "selection.h"
#include "sp-namedview.h"
#include "io/sys.h"
exit(1);
}
+ SPDesktop *desktop = (SPDesktop *)doc;
+ sp_namedview_document_from_window(desktop);
+
+ gchar * orig_output_extension = g_strdup(sp_document_repr_root(desktop->doc())->attribute("inkscape:output_extension"));
+
std::list<std::string> params;
module->paramListString(params);
return;
}
- SPDesktop *desktop = (SPDesktop *) doc;
- sp_namedview_document_from_window(desktop);
-
if (desktop != NULL) {
Inkscape::Util::GSListConstIterator<SPItem *> selected =
sp_desktop_selection(desktop)->itemList();
doc->doc()->emitReconstructionFinish();
mydoc->release();
sp_namedview_update_layers_from_document(desktop);
+
+ sp_document_repr_root(desktop->doc())->setAttribute("inkscape:output_extension", orig_output_extension);
}
+ g_free(orig_output_extension);
return;
}