diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 01e11a9161260e01fc129d015d90787c113959d0..8506f05de30e8cc0a96a51f1e9974916f5d5199c 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
}
}
- inkscape_load_menus(inkscape);
- sp_input_load_from_preferences();
+ if (use_gui) {
+ inkscape_load_menus(inkscape);
+ sp_input_load_from_preferences();
+ }
/* set language for user interface according setting in preferences */
Glib::ustring ui_language = prefs->getString("/ui/language");
if (needsMigration) {
// TODO here is a point to hook in preference migration
g_warning("Preferences need to be migrated from 0.46 or older %s to %s", legacyDir, prefdir);
+ Inkscape::Preferences::migrate( legacyDir, prefdir );
}
bool needsRenameWarning = ( !Inkscape::IO::file_test( prefdir, G_FILE_TEST_EXISTS ) && Inkscape::IO::file_test( dev47Dir, G_FILE_TEST_EXISTS ) );
if ( g_mkdir_with_parents(prefdir, mode) == -1 ) {
int problem = errno;
g_warning("Unable to create profile directory (%s) (%d)", g_strerror(problem), problem);
+ } else {
+ gchar const *userDirs[] = {"keys", "templates", "icons", "extensions", "palettes", NULL};
+ for (gchar const** name = userDirs; *name; ++name) {
+ gchar *dir = g_build_filename(prefdir, *name, NULL);
+ g_mkdir_with_parents(dir, mode);
+ g_free(dir);
+ }
}
}
}