[gimp] app: move the MyPaint brush config options around in GimpCoreConfig



commit 4f8bc154cb756aad60a9920017473712de7bcb95
Author: Michael Natterer <mitch gimp org>
Date:   Sun Dec 20 23:20:06 2015 +0100

    app: move the MyPaint brush config options around in GimpCoreConfig
    
    so they are after brush and dynamics.

 app/config/gimpcoreconfig.c |  144 +++++++++++++++++++++---------------------
 app/config/gimpcoreconfig.h |    6 +-
 2 files changed, 75 insertions(+), 75 deletions(-)
---
diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c
index 13ba08f..09536d7 100644
--- a/app/config/gimpcoreconfig.c
+++ b/app/config/gimpcoreconfig.c
@@ -66,6 +66,8 @@ enum
   PROP_BRUSH_PATH_WRITABLE,
   PROP_DYNAMICS_PATH,
   PROP_DYNAMICS_PATH_WRITABLE,
+  PROP_MYPAINT_BRUSH_PATH,
+  PROP_MYPAINT_BRUSH_PATH_WRITABLE,
   PROP_PATTERN_PATH,
   PROP_PATTERN_PATH_WRITABLE,
   PROP_PALETTE_PATH,
@@ -76,16 +78,14 @@ enum
   PROP_TOOL_PRESET_PATH_WRITABLE,
   PROP_FONT_PATH,
   PROP_FONT_PATH_WRITABLE,
-  PROP_MYPAINT_BRUSH_PATH,
-  PROP_MYPAINT_BRUSH_PATH_WRITABLE,
   PROP_DEFAULT_BRUSH,
   PROP_DEFAULT_DYNAMICS,
+  PROP_DEFAULT_MYPAINT_BRUSH,
   PROP_DEFAULT_PATTERN,
   PROP_DEFAULT_PALETTE,
   PROP_DEFAULT_GRADIENT,
   PROP_DEFAULT_TOOL_PRESET,
   PROP_DEFAULT_FONT,
-  PROP_DEFAULT_MYPAINT_BRUSH,
   PROP_GLOBAL_BRUSH,
   PROP_GLOBAL_DYNAMICS,
   PROP_GLOBAL_PATTERN,
@@ -228,6 +228,50 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
                                  GIMP_CONFIG_PARAM_RESTART);
   g_free (path);
 
+#if 0
+  /* FIXME these are useful dirs, disabled until we figure how to
+   * properly generate a default gimprc
+   */
+  dir1 = g_build_filename (DATADIR, "mypaint", "brushes", NULL);
+  dir2 = g_build_filename (g_get_user_data_dir (), "mypaint", "brushes", NULL);
+#endif
+  path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+                       "/usr/share/mypaint/brushes",
+                       "/usr/local/share/mypaint/brushes",
+#if 0
+                       dir1,
+                       dir2,
+#endif
+                       "~/.mypaint/brushes",
+                       NULL);
+  GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH,
+                                 "mypaint-brush-path", MYPAINT_BRUSH_PATH_BLURB,
+                                 GIMP_CONFIG_PATH_DIR_LIST, path,
+                                 GIMP_PARAM_STATIC_STRINGS |
+                                 GIMP_CONFIG_PARAM_RESTART);
+  g_free (path);
+#if 0
+  g_free (dir1);
+#endif
+
+  path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
+#if 0
+  /* FIXME see above */
+                       dir2,
+#endif
+                       "~/.mypaint/brushes",
+                       NULL);
+  GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE,
+                                 "mypaint-brush-path-writable",
+                                 MYPAINT_BRUSH_PATH_WRITABLE_BLURB,
+                                 GIMP_CONFIG_PATH_DIR_LIST, path,
+                                 GIMP_PARAM_STATIC_STRINGS |
+                                 GIMP_CONFIG_PARAM_RESTART);
+  g_free (path);
+#if 0
+  g_free (dir2);
+#endif
+
   path = gimp_config_build_writable_path ("dynamics");
   GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE,
                                  "dynamics-path-writable",
@@ -319,50 +363,6 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
                                  GIMP_PARAM_STATIC_STRINGS |
                                  GIMP_CONFIG_PARAM_IGNORE);
 
-#if 0
-  /* FIXME these are useful dirs, disabled until we figure how to
-   * properly generate a default gimprc
-   */
-  dir1 = g_build_filename (DATADIR, "mypaint", "brushes", NULL);
-  dir2 = g_build_filename (g_get_user_data_dir (), "mypaint", "brushes", NULL);
-#endif
-  path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-                       "/usr/share/mypaint/brushes",
-                       "/usr/local/share/mypaint/brushes",
-#if 0
-                       dir1,
-                       dir2,
-#endif
-                       "~/.mypaint/brushes",
-                       NULL);
-  GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH,
-                                 "mypaint-brush-path", MYPAINT_BRUSH_PATH_BLURB,
-                                 GIMP_CONFIG_PATH_DIR_LIST, path,
-                                 GIMP_PARAM_STATIC_STRINGS |
-                                 GIMP_CONFIG_PARAM_RESTART);
-  g_free (path);
-#if 0
-  g_free (dir1);
-#endif
-
-  path = g_build_path (G_SEARCHPATH_SEPARATOR_S,
-#if 0
-  /* FIXME see above */
-                       dir2,
-#endif
-                       "~/.mypaint/brushes",
-                       NULL);
-  GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_MYPAINT_BRUSH_PATH_WRITABLE,
-                                 "mypaint-brush-path-writable",
-                                 MYPAINT_BRUSH_PATH_WRITABLE_BLURB,
-                                 GIMP_CONFIG_PATH_DIR_LIST, path,
-                                 GIMP_PARAM_STATIC_STRINGS |
-                                 GIMP_CONFIG_PARAM_RESTART);
-  g_free (path);
-#if 0
-  g_free (dir2);
-#endif
-
   GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_BRUSH,
                                    "default-brush", DEFAULT_BRUSH_BLURB,
                                    DEFAULT_BRUSH,
@@ -371,6 +371,10 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
                                    "default-dynamics", DEFAULT_DYNAMICS_BLURB,
                                    DEFAULT_DYNAMICS,
                                    GIMP_PARAM_STATIC_STRINGS);
+  GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_MYPAINT_BRUSH,
+                                   "default-mypaint-brush", DEFAULT_MYPAINT_BRUSH_BLURB,
+                                   DEFAULT_MYPAINT_BRUSH,
+                                   GIMP_PARAM_STATIC_STRINGS);
   GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PATTERN,
                                    "default-pattern", DEFAULT_PATTERN_BLURB,
                                    DEFAULT_PATTERN,
@@ -391,10 +395,6 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
                                    "default-font", DEFAULT_FONT_BLURB,
                                    DEFAULT_FONT,
                                    GIMP_PARAM_STATIC_STRINGS);
-  GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_MYPAINT_BRUSH,
-                                   "default-mypaint-brush", DEFAULT_MYPAINT_BRUSH_BLURB,
-                                   DEFAULT_MYPAINT_BRUSH,
-                                   GIMP_PARAM_STATIC_STRINGS);
 
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_BRUSH,
                                     "global-brush", GLOBAL_BRUSH_BLURB,
@@ -641,6 +641,14 @@ gimp_core_config_set_property (GObject      *object,
       g_free (core_config->dynamics_path_writable);
       core_config->dynamics_path_writable = g_value_dup_string (value);
       break;
+    case PROP_MYPAINT_BRUSH_PATH:
+      g_free (core_config->mypaint_brush_path);
+      core_config->mypaint_brush_path = g_value_dup_string (value);
+      break;
+    case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
+      g_free (core_config->mypaint_brush_path_writable);
+      core_config->mypaint_brush_path_writable = g_value_dup_string (value);
+      break;
     case PROP_PATTERN_PATH:
       g_free (core_config->pattern_path);
       core_config->pattern_path = g_value_dup_string (value);
@@ -681,14 +689,6 @@ gimp_core_config_set_property (GObject      *object,
       g_free (core_config->font_path_writable);
       core_config->font_path_writable = g_value_dup_string (value);
       break;
-    case PROP_MYPAINT_BRUSH_PATH:
-      g_free (core_config->mypaint_brush_path);
-      core_config->mypaint_brush_path = g_value_dup_string (value);
-      break;
-    case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
-      g_free (core_config->mypaint_brush_path_writable);
-      core_config->mypaint_brush_path_writable = g_value_dup_string (value);
-      break;
     case PROP_DEFAULT_BRUSH:
       g_free (core_config->default_brush);
       core_config->default_brush = g_value_dup_string (value);
@@ -697,6 +697,10 @@ gimp_core_config_set_property (GObject      *object,
       g_free (core_config->default_dynamics);
       core_config->default_dynamics = g_value_dup_string (value);
       break;
+    case PROP_DEFAULT_MYPAINT_BRUSH:
+      g_free (core_config->default_mypaint_brush);
+      core_config->default_mypaint_brush = g_value_dup_string (value);
+      break;
     case PROP_DEFAULT_PATTERN:
       g_free (core_config->default_pattern);
       core_config->default_pattern = g_value_dup_string (value);
@@ -717,10 +721,6 @@ gimp_core_config_set_property (GObject      *object,
       g_free (core_config->default_font);
       core_config->default_font = g_value_dup_string (value);
       break;
-    case PROP_DEFAULT_MYPAINT_BRUSH:
-      g_free (core_config->default_mypaint_brush);
-      core_config->default_mypaint_brush = g_value_dup_string (value);
-      break;
     case PROP_GLOBAL_BRUSH:
       core_config->global_brush = g_value_get_boolean (value);
       break;
@@ -846,6 +846,12 @@ gimp_core_config_get_property (GObject    *object,
     case PROP_DYNAMICS_PATH_WRITABLE:
       g_value_set_string (value, core_config->dynamics_path_writable);
       break;
+    case PROP_MYPAINT_BRUSH_PATH:
+      g_value_set_string (value, core_config->mypaint_brush_path);
+      break;
+    case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
+      g_value_set_string (value, core_config->mypaint_brush_path_writable);
+      break;
     case PROP_PATTERN_PATH:
       g_value_set_string (value, core_config->pattern_path);
       break;
@@ -876,18 +882,15 @@ gimp_core_config_get_property (GObject    *object,
     case PROP_FONT_PATH_WRITABLE:
       g_value_set_string (value, core_config->font_path_writable);
       break;
-    case PROP_MYPAINT_BRUSH_PATH:
-      g_value_set_string (value, core_config->mypaint_brush_path);
-      break;
-    case PROP_MYPAINT_BRUSH_PATH_WRITABLE:
-      g_value_set_string (value, core_config->mypaint_brush_path_writable);
-      break;
     case PROP_DEFAULT_BRUSH:
       g_value_set_string (value, core_config->default_brush);
       break;
     case PROP_DEFAULT_DYNAMICS:
       g_value_set_string (value, core_config->default_dynamics);
       break;
+    case PROP_DEFAULT_MYPAINT_BRUSH:
+      g_value_set_string (value, core_config->default_mypaint_brush);
+      break;
     case PROP_DEFAULT_PATTERN:
       g_value_set_string (value, core_config->default_pattern);
       break;
@@ -903,9 +906,6 @@ gimp_core_config_get_property (GObject    *object,
     case PROP_DEFAULT_FONT:
       g_value_set_string (value, core_config->default_font);
       break;
-    case PROP_DEFAULT_MYPAINT_BRUSH:
-      g_value_set_string (value, core_config->default_mypaint_brush);
-      break;
     case PROP_GLOBAL_BRUSH:
       g_value_set_boolean (value, core_config->global_brush);
       break;
diff --git a/app/config/gimpcoreconfig.h b/app/config/gimpcoreconfig.h
index 3b0c908..e83d02a 100644
--- a/app/config/gimpcoreconfig.h
+++ b/app/config/gimpcoreconfig.h
@@ -50,6 +50,8 @@ struct _GimpCoreConfig
   gchar                  *brush_path_writable;
   gchar                  *dynamics_path;
   gchar                  *dynamics_path_writable;
+  gchar                  *mypaint_brush_path;
+  gchar                  *mypaint_brush_path_writable;
   gchar                  *pattern_path;
   gchar                  *pattern_path_writable;
   gchar                  *palette_path;
@@ -60,16 +62,14 @@ struct _GimpCoreConfig
   gchar                  *tool_preset_path_writable;
   gchar                  *font_path;
   gchar                  *font_path_writable;  /*  unused  */
-  gchar                  *mypaint_brush_path;
-  gchar                  *mypaint_brush_path_writable;
   gchar                  *default_brush;
   gchar                  *default_dynamics;
+  gchar                  *default_mypaint_brush;
   gchar                  *default_pattern;
   gchar                  *default_palette;
   gchar                  *default_tool_preset;
   gchar                  *default_gradient;
   gchar                  *default_font;
-  gchar                  *default_mypaint_brush;
   gboolean                global_brush;
   gboolean                global_dynamics;
   gboolean                global_pattern;


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