[gimp] app: migrate tool-presets with s/GimpImageMapOptions/GimpFilterOptions/.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: migrate tool-presets with s/GimpImageMapOptions/GimpFilterOptions/.
- Date: Thu, 5 Apr 2018 09:48:57 +0000 (UTC)
commit 0009794d9d788099409d215f88ab511925fc2f4c
Author: Jehan <jehan girinstud io>
Date: Thu Apr 5 11:46:49 2018 +0200
app: migrate tool-presets with s/GimpImageMapOptions/GimpFilterOptions/.
As requested!
app/core/gimp-user-install.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimp-user-install.c b/app/core/gimp-user-install.c
index 0d90875..1c2728f 100644
--- a/app/core/gimp-user-install.c
+++ b/app/core/gimp-user-install.c
@@ -646,6 +646,29 @@ user_update_gimpressionist (const GMatchInfo *matched_value,
return FALSE;
}
+#define TOOL_PRESETS_UPDATE_PATTERN "GimpImageMapOptions"
+
+static gboolean
+user_update_tool_presets (const GMatchInfo *matched_value,
+ GString *new_value,
+ gpointer data)
+{
+ gchar *match = g_match_info_fetch (matched_value, 0);
+
+ if (g_strcmp0 (match, "GimpImageMapOptions") == 0)
+ {
+ g_string_append (new_value, "GimpFilterOptions");
+ }
+ else
+ {
+ g_message ("(WARNING) %s: invalid match \"%s\"", G_STRFUNC, match);
+ g_string_append (new_value, match);
+ }
+
+ g_free (match);
+ return FALSE;
+}
+
static gboolean
user_install_dir_copy (GimpUserInstall *install,
gint level,
@@ -869,6 +892,11 @@ user_install_migrate_files (GimpUserInstall *install)
update_pattern = GIMPRESSIONIST_UPDATE_PATTERN;
update_callback = user_update_gimpressionist;
}
+ else if (strcmp (basename, "tool-presets") == 0)
+ {
+ update_pattern = TOOL_PRESETS_UPDATE_PATTERN;
+ update_callback = user_update_tool_presets;
+ }
user_install_dir_copy (install, 0, source, gimp_directory (),
update_pattern, update_callback);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]