X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fhelper%2Fstock-items.cpp;h=b531eef96c5e19cf39d94b004872e0632029621b;hb=9b42cca11feca91fd923b4a35738a20a7c872f1c;hp=ed6d25b747a840742c4a634a25e2885918944bba;hpb=6129af7cc5b723223e9617614c931936e5190421;p=inkscape.git diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp index ed6d25b74..b531eef96 100644 --- a/src/helper/stock-items.cpp +++ b/src/helper/stock-items.cpp @@ -95,12 +95,18 @@ sp_pattern_load_from_svg(gchar const *name, SPDocument *current_doc) if (Inkscape::IO::file_test(patterns, G_FILE_TEST_IS_REGULAR)) { doc = sp_document_new(patterns, FALSE); } + if (!doc) { + gchar *patterns = g_build_filename(CREATE_PATTERNSDIR, "/patterns.svg", NULL); + if (Inkscape::IO::file_test(patterns, G_FILE_TEST_IS_REGULAR)) { + doc = sp_document_new(patterns, FALSE); + } g_free(patterns); if (doc) { sp_document_ensure_up_to_date(doc); } else { edoc = TRUE; } + } } if (!edoc && doc) { /* Get the pattern we want */ @@ -131,12 +137,18 @@ sp_gradient_load_from_svg(gchar const *name, SPDocument *current_doc) if (Inkscape::IO::file_test(gradients, G_FILE_TEST_IS_REGULAR)) { doc = sp_document_new(gradients, FALSE); } + if (!doc) { + gchar *gradients = g_build_filename(CREATE_GRADIENTSDIR, "/gradients.svg", NULL); + if (Inkscape::IO::file_test(gradients, G_FILE_TEST_IS_REGULAR)) { + doc = sp_document_new(gradients, FALSE); + } g_free(gradients); if (doc) { sp_document_ensure_up_to_date(doc); } else { edoc = TRUE; } + } } if (!edoc && doc) { /* Get the gradient we want */