Code

Added/Fixed Pango font weights. Included Jon's workaround for Pango
[inkscape.git] / src / inkscape.cpp
index fc9aff78e2bb9e9fed0eb853d81878a8f385127e..d0f9a11fc4227b82b510fbe62b2dd6a2827ae235 100644 (file)
@@ -49,7 +49,7 @@ using Inkscape::Extension::Internal::PrintWin32;
 #include "application/editor.h"
 #include "desktop.h"
 #include "desktop-handles.h"
-#include "dialogs/input.h"
+#include "device-manager.h"
 #include "document.h"
 #include "event-context.h"
 #include "extension/db.h"
@@ -807,7 +807,7 @@ inkscape_application_init (const gchar *argv0, gboolean use_gui)
 
     if (use_gui) {
         inkscape_load_menus(inkscape);
-        sp_input_load_from_preferences();
+        Inkscape::DeviceManager::getManager().loadConfig();
     }
 
     /* set language for user interface according setting in preferences */
@@ -1457,6 +1457,7 @@ profile_path(const char *filename)
             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 ) );
@@ -1482,6 +1483,13 @@ profile_path(const char *filename)
             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);
+                }
             }
         }
     }