[gimp] app: change the prefs property from image-map-tool-max-recent to filter-tool



commit 3bd783283ea0f4f89396cdc6ae51f81e1dc8bf7d
Author: Michael Natterer <mitch gimp org>
Date:   Wed May 11 01:03:40 2016 +0200

    app: change the prefs property from image-map-tool-max-recent to filter-tool
    
    but still parse the old property too.

 app/config/gimpguiconfig.c |   22 ++++++++++++++++------
 app/config/gimpguiconfig.h |    2 +-
 app/config/gimprc-blurbs.h |    4 ++--
 app/tools/gimpfiltertool.c |    2 +-
 4 files changed, 20 insertions(+), 10 deletions(-)
---
diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c
index 9b87e31..ce7033d 100644
--- a/app/config/gimpguiconfig.c
+++ b/app/config/gimpguiconfig.c
@@ -47,7 +47,7 @@ enum
 {
   PROP_0,
   PROP_MOVE_TOOL_CHANGES_ACTIVE,
-  PROP_IMAGE_MAP_TOOL_MAX_RECENT,
+  PROP_FILTER_TOOL_MAX_RECENT,
   PROP_TRUST_DIRTY_FLAG,
   PROP_SAVE_DEVICE_STATUS,
   PROP_SAVE_SESSION_INFO,
@@ -91,6 +91,7 @@ enum
 
   /* ignored, only for backward compatibility: */
   PROP_CURSOR_FORMAT,
+  PROP_IMAGE_MAP_TOOL_MAX_RECENT,
   PROP_INFO_WINDOW_PER_DISPLAY,
   PROP_MENU_MNEMONICS,
   PROP_SHOW_TOOL_TIPS,
@@ -134,10 +135,10 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                             FALSE,
                             GIMP_PARAM_STATIC_STRINGS);
 
-  GIMP_CONFIG_PROP_INT (object_class, PROP_IMAGE_MAP_TOOL_MAX_RECENT,
-                        "image-map-tool-max-recent",
+  GIMP_CONFIG_PROP_INT (object_class, PROP_FILTER_TOOL_MAX_RECENT,
+                        "filter-tool-max-recent",
                         "Max recent settings to keep in filters",
-                        IMAGE_MAP_TOOL_MAX_RECENT_BLURB,
+                        FILTER_TOOL_MAX_RECENT_BLURB,
                         0, 255, 10,
                         GIMP_PARAM_STATIC_STRINGS);
 
@@ -435,6 +436,13 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                          GIMP_PARAM_STATIC_STRINGS |
                          GIMP_CONFIG_PARAM_IGNORE);
 
+  GIMP_CONFIG_PROP_INT (object_class, PROP_IMAGE_MAP_TOOL_MAX_RECENT,
+                        "image-map-tool-max-recent",
+                        NULL, NULL,
+                        0, 255, 10,
+                        GIMP_PARAM_STATIC_STRINGS |
+                        GIMP_CONFIG_PARAM_IGNORE);
+
   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_INFO_WINDOW_PER_DISPLAY,
                             "info-window-per-display",
                             NULL, NULL,
@@ -520,8 +528,9 @@ gimp_gui_config_set_property (GObject      *object,
     case PROP_MOVE_TOOL_CHANGES_ACTIVE:
       gui_config->move_tool_changes_active = g_value_get_boolean (value);
       break;
+    case PROP_FILTER_TOOL_MAX_RECENT:
     case PROP_IMAGE_MAP_TOOL_MAX_RECENT:
-      gui_config->image_map_tool_max_recent = g_value_get_int (value);
+      gui_config->filter_tool_max_recent = g_value_get_int (value);
       break;
     case PROP_TRUST_DIRTY_FLAG:
       gui_config->trust_dirty_flag = g_value_get_boolean (value);
@@ -676,8 +685,9 @@ gimp_gui_config_get_property (GObject    *object,
     case PROP_MOVE_TOOL_CHANGES_ACTIVE:
       g_value_set_boolean (value, gui_config->move_tool_changes_active);
       break;
+    case PROP_FILTER_TOOL_MAX_RECENT:
     case PROP_IMAGE_MAP_TOOL_MAX_RECENT:
-      g_value_set_int (value, gui_config->image_map_tool_max_recent);
+      g_value_set_int (value, gui_config->filter_tool_max_recent);
       break;
     case PROP_TRUST_DIRTY_FLAG:
       g_value_set_boolean (value, gui_config->trust_dirty_flag);
diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h
index 9104d28..c5e1d8f 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -42,7 +42,7 @@ struct _GimpGuiConfig
   GimpDisplayConfig    parent_instance;
 
   gboolean             move_tool_changes_active;
-  gint                 image_map_tool_max_recent;
+  gint                 filter_tool_max_recent;
   gboolean             trust_dirty_flag;
   gboolean             save_device_status;
   gboolean             save_session_info;
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index 82ea524..2b60216 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -172,8 +172,8 @@ _("Sets the browser used by the help system.")
 "colon-separated list of language identifiers with decreasing priority. " \
 "If empty, the language is taken from the user's locale setting."
 
-#define IMAGE_MAP_TOOL_MAX_RECENT_BLURB \
-"How many recent settings to keep around in color correction tools"
+#define FILTER_TOOL_MAX_RECENT_BLURB \
+"How many recent settings to keep around in filter tools"
 
 #define IMAGE_STATUS_FORMAT_BLURB \
 _("Sets the text to appear in image window status bars.")
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
index 7b2f6e7..da220e6 100644
--- a/app/tools/gimpfiltertool.c
+++ b/app/tools/gimpfiltertool.c
@@ -912,7 +912,7 @@ gimp_filter_tool_commit (GimpFilterTool *filter_tool)
           GimpGuiConfig *config = GIMP_GUI_CONFIG (tool->tool_info->gimp->config);
 
           gimp_settings_box_add_current (GIMP_SETTINGS_BOX (filter_tool->settings_box),
-                                         config->image_map_tool_max_recent);
+                                         config->filter_tool_max_recent);
         }
     }
 


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