diff options
| author | Bryce Harrington <bryce@bryceharrington.org> | 2007-02-04 21:08:59 +0000 |
|---|---|---|
| committer | bryce <bryce@users.sourceforge.net> | 2007-02-04 21:08:59 +0000 |
| commit | 3cb55fc446046e68ca764b76da8358a5036b565b (patch) | |
| tree | e2d2b66b0706a3962ffdae68b0bb488ccc5a9f00 /src | |
| parent | Fixed saving bug, now attributes are correctly handled for both normal saves ... (diff) | |
| download | inkscape-3cb55fc446046e68ca764b76da8358a5036b565b.tar.gz inkscape-3cb55fc446046e68ca764b76da8358a5036b565b.zip | |
Patch from Debian bug tracker from Daniel Kahn Gillmor
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343840
Allows individual users to keep their preferred default template in
~/.inkscape/templates/default.svg. This allows them to keep custom page
settings, etc. locally.
(bzr r2327)
Diffstat (limited to 'src')
| -rw-r--r-- | src/file.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/file.cpp b/src/file.cpp index 521579d69..0c4941c36 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -128,7 +128,10 @@ sp_file_new_default() // the default layer, etc. If you wish to localize this file, please create a // localized share/templates/default.xx.svg file, where xx is your language code. char *default_template = g_build_filename(dirname, _("default.svg"), NULL); - if (Inkscape::IO::file_test(default_template, G_FILE_TEST_IS_REGULAR)) { + char *user_default_template = g_build_filename(profile_path("templates"), _("default.svg"), NULL); + if (Inkscape::IO::file_test(user_default_template, G_FILE_TEST_IS_REGULAR)) { + return sp_file_new(user_default_template); + } else if (Inkscape::IO::file_test(default_template, G_FILE_TEST_IS_REGULAR)) { return sp_file_new(default_template); } } |
