summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: dc79d54)
raw | patch | inline | side by side (parent: dc79d54)
author | verbalshadow <verbalshadow@users.sourceforge.net> | |
Fri, 28 Apr 2006 04:05:36 +0000 (04:05 +0000) | ||
committer | verbalshadow <verbalshadow@users.sourceforge.net> | |
Fri, 28 Apr 2006 04:05:36 +0000 (04:05 +0000) |
ChangeLog | patch | blob | history | |
src/helper/stock-items.cpp | patch | blob | history | |
src/io/resource.cpp | patch | blob | history | |
src/io/resource.h | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index 40549d43bfa0576f9c1c3ee7f52d20b7bcd2ee14..5add0270a1c03c615738ef4c5422a9d73763a3e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-04-27 verbalshadow <verbalshadow@gmail.com>
+
+ * src/io/resource.h, src/io/resource.cpp,
+ src/dialogs/swatches.cpp, src/helper/stock-items.cpp:
+ Added CREATE v0.1 support for gradients/swatches/patterns
+ Support for Linux & Win32. Mac support waiting final support
+ Directory info.
+
+
2006-04-26 Jon A. Cruz <jon@joncruz.org>
* src/Makefile.am, src/MultiPrinter.h, src/PylogFormatter.h,
index ed6d25b747a840742c4a634a25e2885918944bba..b531eef96c5e19cf39d94b004872e0632029621b 100644 (file)
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 */
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 */
diff --git a/src/io/resource.cpp b/src/io/resource.cpp
index ae9097868db4d52fce22048b585feb66336a67f3..b4dca32334a83288a54b6bec67d7baf07999961f 100644 (file)
--- a/src/io/resource.cpp
+++ b/src/io/resource.cpp
}
path = g_strdup(temp);
} break;
+ case CREATE: {
+ gchar const* temp = 0;
+ switch (type) {
+ case GRADIENTS: temp = CREATE_GRADIENTSDIR; break;
+ case PALETTES: temp = CREATE_PALETTESDIR; break;
+ case PATTERNS: temp = CREATE_PATTERNSDIR; break;
+ default: g_assert_not_reached();
+ }
+ path = g_strdup(temp);
+ } break;
case USER: {
char const *name=NULL;
switch (type) {
diff --git a/src/io/resource.h b/src/io/resource.h
index 948866f1eed04b432729420fee8a46ec52be9a04..0be8ab8e6e573e446ae9798209cdabeb0fa69d2a 100644 (file)
--- a/src/io/resource.h
+++ b/src/io/resource.h
enum Domain {
SYSTEM,
+ CREATE,
USER
};