From e4f94905953ca842604d18e2d819ef9e3fd2001f Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 26 Sep 2007 18:55:41 +0000 Subject: [PATCH] remove obsolete import-as-pattern option --- src/extension/internal/gdkpixbuf-input.cpp | 41 +++++----------------- src/preferences-skeleton.h | 1 - src/ui/dialog/inkscape-preferences.cpp | 3 -- src/ui/dialog/inkscape-preferences.h | 2 +- 4 files changed, 9 insertions(+), 38 deletions(-) diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 4a46b146d..b24bda8e9 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -52,39 +52,14 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) } Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc); - if (prefs_get_int_attribute("options.importbitmapsasimages", "value", 1) == 1) { - // import as - repr = xml_doc->createElement("svg:image"); - // both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs): - repr->setAttribute("xlink:href", uri); - repr->setAttribute("sodipodi:absref", uri); - - sp_repr_set_svg_double(repr, "width", width); - sp_repr_set_svg_double(repr, "height", height); - - } else { - // import as pattern-filled rect - Inkscape::XML::Node *pat = xml_doc->createElement("svg:pattern"); - pat->setAttribute("inkscape:collect", "always"); - pat->setAttribute("patternUnits", "userSpaceOnUse"); - sp_repr_set_svg_double(pat, "width", width); - sp_repr_set_svg_double(pat, "height", height); - SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc))->appendChild(pat); - gchar const *pat_id = pat->attribute("id"); - SPObject *pat_object = doc->getObjectById(pat_id); - - Inkscape::XML::Node *im = xml_doc->createElement("svg:image"); - im->setAttribute("xlink:href", uri); - im->setAttribute("sodipodi:absref", uri); - sp_repr_set_svg_double(im, "width", width); - sp_repr_set_svg_double(im, "height", height); - SP_OBJECT_REPR(pat_object)->addChild(im, NULL); - - repr = xml_doc->createElement("svg:rect"); - repr->setAttribute("style", g_strdup_printf("stroke:none;fill:url(#%s)", pat_id)); - sp_repr_set_svg_double(repr, "width", width); - sp_repr_set_svg_double(repr, "height", height); - } + // import as + repr = xml_doc->createElement("svg:image"); + // both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs): + repr->setAttribute("xlink:href", uri); + repr->setAttribute("sodipodi:absref", uri); + + sp_repr_set_svg_double(repr, "width", width); + sp_repr_set_svg_double(repr, "height", height); SP_DOCUMENT_ROOT(doc)->appendChildRepr(repr); Inkscape::GC::release(repr); diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 137b3f8a2..64b531af5 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -214,7 +214,6 @@ static char const preferences_skeleton[] = " \n" " \n" " \n" -" \n" " \n" " \n" " \n" diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index a5c071dc3..436d5cce6 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -611,9 +611,6 @@ void InkscapePreferences::initPageImportExport() _importexport_export.init("dialogs.export.defaultxdpi", "value", 0.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false); _page_importexport.add_line( false, _("Default export resolution:"), _importexport_export, _("dpi"), _("Default bitmap resolution (in dots per inch) in the Export dialog"), false); - _importexport_imp_bitmap.init( _("Import bitmap as "), "options.importbitmapsasimages", "value", true); - _page_importexport.add_line( false, "", _importexport_imp_bitmap, "", - _("When on, an imported bitmap creates an element; otherwise it is a rectangle with bitmap fill"), true); _importexport_ocal_url.init("options.ocalurl", "str", true, g_strdup_printf("openclipart.org")); _page_importexport.add_line( false, _("Open Clip Art Library Server Name:"), _importexport_ocal_url, "", _("The server name of the Open Clip Art Library webdav server. It's used by the Import and Export to OCAL function."), true); diff --git a/src/ui/dialog/inkscape-preferences.h b/src/ui/dialog/inkscape-preferences.h index 1f53115ca..eff068569 100644 --- a/src/ui/dialog/inkscape-preferences.h +++ b/src/ui/dialog/inkscape-preferences.h @@ -158,7 +158,7 @@ protected: PrefCheckButton _sel_layer_deselects; PrefSpinButton _importexport_export, _misc_recent, _misc_simpl; - PrefCheckButton _importexport_imp_bitmap, _misc_comment, _misc_scripts; + PrefCheckButton _misc_comment, _misc_scripts; PrefCheckButton _misc_small_toolbar; PrefCombo _misc_overs_bitmap; -- 2.30.2