summaryrefslogtreecommitdiffstats
path: root/src/helper/png-write.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-10-27 18:03:09 +0000
committerTed Gould <ted@canonical.com>2008-10-27 18:03:09 +0000
commit7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902 (patch)
tree7d3a2b95b84a03a19cb132cdf88bea0ab6dc4773 /src/helper/png-write.cpp
parentMerging from trunk (diff)
downloadinkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.tar.gz
inkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.zip
From trunk
(bzr r6885)
Diffstat (limited to 'src/helper/png-write.cpp')
-rw-r--r--src/helper/png-write.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp
index dd405b7d9..89ab32f55 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -29,7 +29,7 @@
#include <sp-item.h>
#include <sp-root.h>
#include <sp-defs.h>
-#include "prefs-utils.h"
+#include "preferences.h"
#include "dialogs/rdf.h"
/* This is an example of how to use libpng to read and write PNG files.
@@ -409,8 +409,11 @@ sp_export_png_file(SPDocument *doc, gchar const *filename,
}
// export with maximum blur rendering quality
- int saved_quality = prefs_get_int_attribute("options.blurquality", "value", 0);
- prefs_set_int_attribute("options.blurquality", "value", 2);
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ int saved_quality = prefs->getInt("/options/blurquality/value", 0);
+ prefs->setInt("/options/blurquality/value", 2);
+ int saved_filter_quality = prefs->getInt("/options/filterquality/value", 0);
+ prefs->setInt("/options/filterquality/value", 2);
sp_document_ensure_up_to_date(doc);
@@ -487,8 +490,9 @@ sp_export_png_file(SPDocument *doc, gchar const *filename,
/* Free arena */
nr_object_unref((NRObject *) arena);
- // restore saved blur quality
- prefs_set_int_attribute("options.blurquality", "value", saved_quality);
+ // restore saved blur and filter quality
+ prefs->setInt("/options/blurquality/value", saved_quality);
+ prefs->setInt("/options/filterquality/value", saved_filter_quality);
return write_status;
}