summaryrefslogtreecommitdiffstats
path: root/src/extension
diff options
context:
space:
mode:
authorJon Phillips <jon@fabricatorz.com>2006-08-22 08:01:11 +0000
committerkidproto <kidproto@users.sourceforge.net>2006-08-22 08:01:11 +0000
commite776d44fd7a3035665e622f71a135c1f275b3708 (patch)
tree27de3f9fbc77d2cc73c87deb98aed2d9bb2f398a /src/extension
parentI renamed the adobe-illustrator-cs2.xml and macromedia-freehand-mx.xml to better (diff)
downloadinkscape-e776d44fd7a3035665e622f71a135c1f275b3708.tar.gz
inkscape-e776d44fd7a3035665e622f71a135c1f275b3708.zip
Committed a great patch which adds a Save A Copy menu function. This is the first gloss of this patch...I will add more stuff to it shortly...
(bzr r1628)
Diffstat (limited to 'src/extension')
-rw-r--r--src/extension/output.cpp4
-rw-r--r--src/extension/system.cpp7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/extension/output.cpp b/src/extension/output.cpp
index eb3f85ed8..b0f254a9c 100644
--- a/src/extension/output.cpp
+++ b/src/extension/output.cpp
@@ -221,7 +221,7 @@ Output::save (SPDocument * doc, const gchar * uri)
gboolean saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive (doc, FALSE);
- repr->setAttribute("inkscape:output_extension", NULL);
+ //repr->setAttribute("inkscape:output_extension", NULL);
repr->setAttribute("inkscape:dataloss", NULL);
if (repr->attribute("sodipodi:modified") != NULL)
modified = true;
@@ -239,7 +239,7 @@ Output::save (SPDocument * doc, const gchar * uri)
saved = sp_document_get_undo_sensitive(doc);
sp_document_set_undo_sensitive (doc, FALSE);
- repr->setAttribute("inkscape:output_extension", get_id());
+ //repr->setAttribute("inkscape:output_extension", get_id());
if (dataloss) {
repr->setAttribute("inkscape:dataloss", "true");
}
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index 81bf3075e..3a8a54214 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -244,10 +244,15 @@ save(Extension *key, SPDocument *doc, gchar const *filename, bool setextension,
throw Output::no_overwrite();
}
+ // if 'official' save the filename and extension for future saves.
if (official) {
+ // save the filename for next use
sp_document_set_uri(doc, fileName);
+ // also save the extension for next use
+ Inkscape::XML::Node *repr = sp_document_repr_root(doc);
+ repr->setAttribute("inkscape:output_extension", omod->get_id());
}
-
+
omod->save(doc, fileName);
g_free(fileName);