[gimp] app: also get rid of "dynamics-expanded" config property when migrating.



commit b46fafb3a0975b8993251778691755314a1bc5a2
Author: Jehan <jehan girinstud io>
Date:   Thu Feb 3 23:29:11 2022 +0100

    app: also get rid of "dynamics-expanded" config property when migrating.

 app/core/gimp-user-install.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimp-user-install.c b/app/core/gimp-user-install.c
index a76faf864c..24b31ba3e3 100644
--- a/app/core/gimp-user-install.c
+++ b/app/core/gimp-user-install.c
@@ -760,11 +760,12 @@ user_update_gimpressionist (const GMatchInfo *matched_value,
 }
 
 #define TOOL_PRESETS_UPDATE_PATTERN \
-  "GimpImageMapOptions"  "|" \
-  "GimpBlendOptions"     "|" \
-  "gimp-blend-tool"      "|" \
-  "gimp-tool-blend"      "|" \
-  "dynamics \"Dynamics Off\""
+  "GimpImageMapOptions"       "|" \
+  "GimpBlendOptions"          "|" \
+  "gimp-blend-tool"           "|" \
+  "gimp-tool-blend"           "|" \
+  "dynamics \"Dynamics Off\"" "|" \
+  "\\(dynamics-expanded yes\\)"
 
 static gboolean
 user_update_tool_presets (const GMatchInfo *matched_value,
@@ -793,6 +794,10 @@ user_update_tool_presets (const GMatchInfo *matched_value,
     {
       g_string_append (new_value, "dynamics-enabled no");
     }
+  else if (g_strcmp0 (match, "(dynamics-expanded yes)") == 0)
+    {
+      /* This option just doesn't exist anymore. */
+    }
   else
     {
       g_message ("(WARNING) %s: invalid match \"%s\"", G_STRFUNC, match);
@@ -808,8 +813,9 @@ user_update_tool_presets (const GMatchInfo *matched_value,
  * well as "toolrc" (but this one is skipped anyway).
  */
 #define CONTEXTRC_UPDATE_PATTERN \
-  "gimp-blend-tool" "|" \
-  "dynamics \"Dynamics Off\""
+  "gimp-blend-tool"           "|" \
+  "dynamics \"Dynamics Off\"" "|" \
+  "\\(dynamics-expanded yes\\)"
 
 static gboolean
 user_update_contextrc_over20 (const GMatchInfo *matched_value,
@@ -822,10 +828,14 @@ user_update_contextrc_over20 (const GMatchInfo *matched_value,
     {
       g_string_append (new_value, "gimp-gradient-tool");
     }
-  if (g_strcmp0 (match, "dynamics \"Dynamics Off\"") == 0)
+  else if (g_strcmp0 (match, "dynamics \"Dynamics Off\"") == 0)
     {
       g_string_append (new_value, "dynamics-enabled no");
     }
+  else if (g_strcmp0 (match, "(dynamics-expanded yes)") == 0)
+    {
+      /* This option just doesn't exist anymore. */
+    }
   else
     {
       g_message ("(WARNING) %s: invalid match \"%s\"", G_STRFUNC, match);


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