summaryrefslogtreecommitdiffstats
path: root/src/extension/system.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2012-03-18 19:13:44 +0000
committerJazzyNico <nicoduf@yahoo.fr>2012-03-18 19:13:44 +0000
commit6dc600fc4521fb8c547e8f16930487e8ada99766 (patch)
tree00c75e78331f07762f9a67ce4e06706d25dd2c17 /src/extension/system.cpp
parentChange finalization order in SPObject: delete signals before calling (diff)
downloadinkscape-6dc600fc4521fb8c547e8f16930487e8ada99766.tar.gz
inkscape-6dc600fc4521fb8c547e8f16930487e8ada99766.zip
Import. Bitmap import improvements (see Bugs #171842 and #847374).
(bzr r11097)
Diffstat (limited to 'src/extension/system.cpp')
-rw-r--r--src/extension/system.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index b3e9beebf..ebad0c050 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -88,6 +88,19 @@ SPDocument *open(Extension *key, gchar const *filename)
throw Input::no_extension_found();
}
+ // Hide pixbuf extensions depending on user preferences.
+ //g_warning("Extension: %s", imod->get_id());
+
+ bool show = true;
+ if (strlen(imod->get_id()) > 27) {
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring attr = prefs->getString("/dialogs/import/link");
+ Glib::ustring id = Glib::ustring(imod->get_id(), 28);
+ if (strcmp(attr.c_str(), "ask") != 0 and strcmp(id.c_str(), "org.inkscape.input.gdkpixbuf") == 0) {
+ show = false;
+ imod->set_gui(false);
+ }
+ }
imod->set_state(Extension::STATE_LOADED);
if (!imod->loaded()) {
@@ -112,6 +125,9 @@ SPDocument *open(Extension *key, gchar const *filename)
}
doc->setUri(filename);
+ if (!show) {
+ imod->set_gui(true);
+ }
return doc;
}