[gimp] app: cruft removal and cleanup in the config classes



commit 3a837ed17c2f03f948f180d6734bbc54425a53cd
Author: Michael Natterer <mitch gimp org>
Date:   Sun Apr 17 00:32:07 2016 +0100

    app: cruft removal and cleanup in the config classes

 app/config/gimpdisplayconfig.c |   21 +++++---------
 app/config/gimpdisplayconfig.h |    1 -
 app/config/gimpguiconfig.c     |   56 +++++++++++++++++++--------------------
 app/config/gimpguiconfig.h     |    8 +----
 app/config/gimprc-blurbs.h     |   10 -------
 5 files changed, 37 insertions(+), 59 deletions(-)
---
diff --git a/app/config/gimpdisplayconfig.c b/app/config/gimpdisplayconfig.c
index 21b507a..ee5aa86 100644
--- a/app/config/gimpdisplayconfig.c
+++ b/app/config/gimpdisplayconfig.c
@@ -172,13 +172,6 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
                             TRUE,
                             GIMP_PARAM_STATIC_STRINGS);
 
-  GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PERFECT_MOUSE,
-                            "perfect-mouse",
-                            "Perfect mouse",
-                            PERFECT_MOUSE_BLURB,
-                            TRUE,
-                            GIMP_PARAM_STATIC_STRINGS);
-
   GIMP_CONFIG_PROP_ENUM (object_class, PROP_CURSOR_MODE,
                          "cursor-mode",
                          "Cursor mode",
@@ -339,6 +332,12 @@ gimp_display_config_class_init (GimpDisplayConfigClass *klass)
                         FALSE, &color,
                         GIMP_PARAM_STATIC_STRINGS |
                         GIMP_CONFIG_PARAM_IGNORE);
+
+  GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PERFECT_MOUSE,
+                            "perfect-mouse",
+                            NULL, NULL,
+                            TRUE,
+                            GIMP_PARAM_STATIC_STRINGS);
 }
 
 static void
@@ -410,9 +409,6 @@ gimp_display_config_set_property (GObject      *object,
     case PROP_INITIAL_ZOOM_TO_FIT:
       display_config->initial_zoom_to_fit = g_value_get_boolean (value);
       break;
-    case PROP_PERFECT_MOUSE:
-      display_config->perfect_mouse = g_value_get_boolean (value);
-      break;
     case PROP_CURSOR_MODE:
       display_config->cursor_mode = g_value_get_enum (value);
       break;
@@ -475,6 +471,7 @@ gimp_display_config_set_property (GObject      *object,
     case PROP_DEFAULT_SNAP_TO_PATH:
     case PROP_CONFIRM_ON_CLOSE:
     case PROP_XOR_COLOR:
+    case PROP_PERFECT_MOUSE:
       /* ignored */
       break;
 
@@ -518,9 +515,6 @@ gimp_display_config_get_property (GObject    *object,
     case PROP_INITIAL_ZOOM_TO_FIT:
       g_value_set_boolean (value, display_config->initial_zoom_to_fit);
       break;
-    case PROP_PERFECT_MOUSE:
-      g_value_set_boolean (value, display_config->perfect_mouse);
-      break;
     case PROP_CURSOR_MODE:
       g_value_set_enum (value, display_config->cursor_mode);
       break;
@@ -576,6 +570,7 @@ gimp_display_config_get_property (GObject    *object,
     case PROP_DEFAULT_SNAP_TO_PATH:
     case PROP_CONFIRM_ON_CLOSE:
     case PROP_XOR_COLOR:
+    case PROP_PERFECT_MOUSE:
       /* ignored */
       break;
 
diff --git a/app/config/gimpdisplayconfig.h b/app/config/gimpdisplayconfig.h
index 03bc39a..636007c 100644
--- a/app/config/gimpdisplayconfig.h
+++ b/app/config/gimpdisplayconfig.h
@@ -49,7 +49,6 @@ struct _GimpDisplayConfig
   gboolean            resize_windows_on_resize;
   gboolean            default_dot_for_dot;
   gboolean            initial_zoom_to_fit;
-  gboolean            perfect_mouse;
   GimpCursorMode      cursor_mode;
   gboolean            cursor_updating;
   gboolean            show_brush_outline;
diff --git a/app/config/gimpguiconfig.c b/app/config/gimpguiconfig.c
index 0fdee33..9b87e31 100644
--- a/app/config/gimpguiconfig.c
+++ b/app/config/gimpguiconfig.c
@@ -325,21 +325,6 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                          DEFAULT_HELP_BROWSER,
                          GIMP_PARAM_STATIC_STRINGS);
 
-  /* As a default, we hide unavailable actions. */
-  GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS,
-                            "search-show-unavailable-actions",
-                            "Show unavailable actions",
-                            SEARCH_SHOW_UNAVAILABLE_BLURB,
-                            FALSE,
-                            GIMP_PARAM_STATIC_STRINGS);
-
-  GIMP_CONFIG_PROP_INT (object_class, PROP_ACTION_HISTORY_SIZE,
-                        "action-history-size",
-                        "Action history size",
-                        ACTION_HISTORY_SIZE_BLURB,
-                        0, 1000, 100,
-                        GIMP_PARAM_STATIC_STRINGS);
-
   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_USER_MANUAL_ONLINE,
                             "user-manual-online",
                             "User manual online",
@@ -354,6 +339,20 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
                            DEFAULT_USER_MANUAL_ONLINE_URI,
                            GIMP_PARAM_STATIC_STRINGS);
 
+  GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS,
+                            "search-show-unavailable-actions",
+                            "Show unavailable actions",
+                            SEARCH_SHOW_UNAVAILABLE_BLURB,
+                            FALSE,
+                            GIMP_PARAM_STATIC_STRINGS);
+
+  GIMP_CONFIG_PROP_INT (object_class, PROP_ACTION_HISTORY_SIZE,
+                        "action-history-size",
+                        "Action history size",
+                        ACTION_HISTORY_SIZE_BLURB,
+                        0, 1000, 100,
+                        GIMP_PARAM_STATIC_STRINGS);
+
   GIMP_CONFIG_PROP_ENUM (object_class, PROP_DOCK_WINDOW_HINT,
                          "dock-window-hint",
                          "Dock window hint",
@@ -430,7 +429,7 @@ gimp_gui_config_class_init (GimpGuiConfigClass *klass)
   /*  only for backward compatibility:  */
   GIMP_CONFIG_PROP_ENUM (object_class, PROP_CURSOR_FORMAT,
                          "cursor-format",
-                         NULL, CURSOR_FORMAT_BLURB,
+                         NULL, NULL,
                          GIMP_TYPE_CURSOR_FORMAT,
                          GIMP_CURSOR_FORMAT_PIXBUF,
                          GIMP_PARAM_STATIC_STRINGS |
@@ -503,7 +502,6 @@ gimp_gui_config_finalize (GObject *object)
   g_free (gui_config->icon_theme_path);
   g_free (gui_config->icon_theme);
   g_free (gui_config->help_locales);
-  g_free (gui_config->web_browser);
   g_free (gui_config->user_manual_online_uri);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -605,12 +603,6 @@ gimp_gui_config_set_property (GObject      *object,
     case PROP_HELP_BROWSER:
       gui_config->help_browser = g_value_get_enum (value);
       break;
-    case PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS:
-      gui_config->search_show_unavailable = g_value_get_boolean (value);
-      break;
-    case PROP_ACTION_HISTORY_SIZE:
-      gui_config->action_history_size = g_value_get_int (value);
-      break;
     case PROP_USER_MANUAL_ONLINE:
       gui_config->user_manual_online = g_value_get_boolean (value);
       break;
@@ -618,6 +610,12 @@ gimp_gui_config_set_property (GObject      *object,
       g_free (gui_config->user_manual_online_uri);
       gui_config->user_manual_online_uri = g_value_dup_string (value);
       break;
+    case PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS:
+      gui_config->search_show_unavailable = g_value_get_boolean (value);
+      break;
+    case PROP_ACTION_HISTORY_SIZE:
+      gui_config->action_history_size = g_value_get_int (value);
+      break;
     case PROP_DOCK_WINDOW_HINT:
       gui_config->dock_window_hint = g_value_get_enum (value);
       break;
@@ -756,18 +754,18 @@ gimp_gui_config_get_property (GObject    *object,
     case PROP_HELP_BROWSER:
       g_value_set_enum (value, gui_config->help_browser);
       break;
-    case PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS:
-      g_value_set_boolean (value, gui_config->search_show_unavailable);
-      break;
-    case PROP_ACTION_HISTORY_SIZE:
-      g_value_set_int (value, gui_config->action_history_size);
-      break;
     case PROP_USER_MANUAL_ONLINE:
       g_value_set_boolean (value, gui_config->user_manual_online);
       break;
     case PROP_USER_MANUAL_ONLINE_URI:
       g_value_set_string (value, gui_config->user_manual_online_uri);
       break;
+    case PROP_SEARCH_SHOW_UNAVAILABLE_ACTIONS:
+      g_value_set_boolean (value, gui_config->search_show_unavailable);
+      break;
+    case PROP_ACTION_HISTORY_SIZE:
+      g_value_set_int (value, gui_config->action_history_size);
+      break;
     case PROP_DOCK_WINDOW_HINT:
       g_value_set_enum (value, gui_config->dock_window_hint);
       break;
diff --git a/app/config/gimpguiconfig.h b/app/config/gimpguiconfig.h
index 56e1815..9104d28 100644
--- a/app/config/gimpguiconfig.h
+++ b/app/config/gimpguiconfig.h
@@ -68,14 +68,10 @@ struct _GimpGuiConfig
   gboolean             show_help_button;
   gchar               *help_locales;
   GimpHelpBrowserType  help_browser;
-
-  /* action search preferences */
-  gboolean             search_show_unavailable;
-  gint                 action_history_size;
-
-  gchar               *web_browser;
   gboolean             user_manual_online;
   gchar               *user_manual_online_uri;
+  gboolean             search_show_unavailable;
+  gint                 action_history_size;
   GimpWindowHint       dock_window_hint;
   GimpHandedness       cursor_handedness;
 
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index 6db8cd5..82ea524 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -42,9 +42,6 @@ _("Specifies how the area around the image should be drawn.")
 #define COLOR_PROFILE_POLICY_BLURB \
 _("How to handle embedded color profiles when opening a file.")
 
-#define CURSOR_FORMAT_BLURB \
-_("Sets the pixel format to use for mouse pointers.")
-
 #define CURSOR_MODE_BLURB \
 _("Sets the type of mouse pointers to use.")
 
@@ -251,13 +248,6 @@ _("Sets how many processors GIMP should try to use simultaneously.")
 
 #define PATTERN_PATH_WRITABLE_BLURB ""
 
-#define PERFECT_MOUSE_BLURB \
-_("When enabled, the X server is queried for the mouse's current position " \
-  "on each motion event, rather than relying on the position hint.  This " \
-  "means painting with large brushes should be more accurate, but it may " \
-  "be slower.  Conversely, on some X servers enabling this option results " \
-  "in faster painting.")
-
 #define FILTER_HISTORY_SIZE_BLURB \
 "How many recently used filters and plug-ins to keep on the Filters menu."
 


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