[gimp] app: do not migrate theme settings.



commit 59f4ee55c977fb4181265b67a9cb181bbd4fa7b8
Author: Jehan <jehan girinstud io>
Date:   Fri Mar 25 21:43:58 2016 +0100

    app: do not migrate theme settings.
    
    Themes from 2.8 and before are not fully compatible with 2.10.
    In particular, embedded icons would not work and you would end up with
    the Symbolic icon theme (light colors), which may not work well with a
    custom theme.
    It is better to reset to the new defaults upon migration and users can
    still try and configure the theming afterwards if they wish.

 app/core/gimp-user-install.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimp-user-install.c b/app/core/gimp-user-install.c
index d8383bf..bd368a3 100644
--- a/app/core/gimp-user-install.c
+++ b/app/core/gimp-user-install.c
@@ -562,6 +562,18 @@ user_update_controllerrc (const GMatchInfo *matched_value,
 
   return FALSE;
 }
+
+#define GIMPRC_UPDATE_PATTERN "\\(theme [^)]*\\)"
+
+static gboolean
+user_update_gimprc (const GMatchInfo *matched_value,
+                    GString          *new_value,
+                    gpointer          data)
+{
+  /* Do not migrate themes from GIMP < 2.10. */
+  return FALSE;
+}
+
 static gboolean
 user_install_dir_copy (GimpUserInstall *install,
                        const gchar     *source,
@@ -732,6 +744,11 @@ user_install_migrate_files (GimpUserInstall *install)
               update_pattern  = CONTROLLERRC_UPDATE_PATTERN;
               update_callback = user_update_controllerrc;
             }
+          else if (strcmp (basename, "gimprc") == 0)
+            {
+              update_pattern  = GIMPRC_UPDATE_PATTERN;
+              update_callback = user_update_gimprc;
+            }
 
           g_snprintf (dest, sizeof (dest), "%s%c%s",
                       gimp_directory (), G_DIR_SEPARATOR, basename);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]