[gimp/soc-2009-dynamics] Use all config properties needed for dynamics to work like a resource
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp/soc-2009-dynamics] Use all config properties needed for dynamics to work like a resource
- Date: Sat, 10 Oct 2009 23:31:43 +0000 (UTC)
commit 1cf86f6ac0579e47f6d2dc2d418f9f3976359623
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 11 01:30:54 2009 +0200
Use all config properties needed for dynamics to work like a resource
app/config/gimpcoreconfig.c | 58 +++++++++++++++++++++++++++++++++++++++++++
app/config/gimpcoreconfig.h | 4 +++
app/config/gimprc-blurbs.h | 12 +++++++++
3 files changed, 74 insertions(+), 0 deletions(-)
---
diff --git a/app/config/gimpcoreconfig.c b/app/config/gimpcoreconfig.c
index 8ee1f1a..74f2c62 100644
--- a/app/config/gimpcoreconfig.c
+++ b/app/config/gimpcoreconfig.c
@@ -38,6 +38,7 @@
#define DEFAULT_BRUSH "Round Fuzzy"
+#define DEFAULT_DYNAMICS "Foo" /* alexia, fix me */
#define DEFAULT_PATTERN "Pine"
#define DEFAULT_PALETTE "Default"
#define DEFAULT_GRADIENT "FG to BG (RGB)"
@@ -55,6 +56,8 @@ enum
PROP_ENVIRON_PATH,
PROP_BRUSH_PATH,
PROP_BRUSH_PATH_WRITABLE,
+ PROP_DYNAMICS_PATH,
+ PROP_DYNAMICS_PATH_WRITABLE,
PROP_PATTERN_PATH,
PROP_PATTERN_PATH_WRITABLE,
PROP_PALETTE_PATH,
@@ -64,11 +67,13 @@ enum
PROP_FONT_PATH,
PROP_FONT_PATH_WRITABLE,
PROP_DEFAULT_BRUSH,
+ PROP_DEFAULT_DYNAMICS,
PROP_DEFAULT_PATTERN,
PROP_DEFAULT_PALETTE,
PROP_DEFAULT_GRADIENT,
PROP_DEFAULT_FONT,
PROP_GLOBAL_BRUSH,
+ PROP_GLOBAL_DYNAMICS,
PROP_GLOBAL_PATTERN,
PROP_GLOBAL_PALETTE,
PROP_GLOBAL_GRADIENT,
@@ -177,6 +182,21 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
GIMP_PARAM_STATIC_STRINGS |
GIMP_CONFIG_PARAM_RESTART);
g_free (path);
+ path = gimp_config_build_data_path ("dynamics");
+ GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH,
+ "dynamics-path", DYNAMICS_PATH_BLURB,
+ GIMP_CONFIG_PATH_DIR_LIST, path,
+ GIMP_PARAM_STATIC_STRINGS |
+ GIMP_CONFIG_PARAM_RESTART);
+ g_free (path);
+ path = gimp_config_build_writable_path ("dynamics");
+ GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_DYNAMICS_PATH_WRITABLE,
+ "dynamics-path-writable",
+ DYNAMICS_PATH_WRITABLE_BLURB,
+ GIMP_CONFIG_PATH_DIR_LIST, path,
+ GIMP_PARAM_STATIC_STRINGS |
+ GIMP_CONFIG_PARAM_RESTART);
+ g_free (path);
path = gimp_config_build_data_path ("patterns");
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PATTERN_PATH,
"pattern-path", PATTERN_PATH_BLURB,
@@ -238,6 +258,10 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
"default-brush", DEFAULT_BRUSH_BLURB,
DEFAULT_BRUSH,
GIMP_PARAM_STATIC_STRINGS);
+ GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_DYNAMICS,
+ "default-dynamics", DEFAULT_DYNAMICS_BLURB,
+ DEFAULT_DYNAMICS,
+ GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_STRING (object_class, PROP_DEFAULT_PATTERN,
"default-pattern", DEFAULT_PATTERN_BLURB,
DEFAULT_PATTERN,
@@ -258,6 +282,10 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
"global-brush", GLOBAL_BRUSH_BLURB,
TRUE,
GIMP_PARAM_STATIC_STRINGS);
+ GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_DYNAMICS,
+ "global-dynamics", GLOBAL_DYNAMICS_BLURB,
+ TRUE,
+ GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_GLOBAL_PATTERN,
"global-pattern", GLOBAL_PATTERN_BLURB,
TRUE,
@@ -400,6 +428,8 @@ gimp_core_config_finalize (GObject *object)
g_free (core_config->environ_path);
g_free (core_config->brush_path);
g_free (core_config->brush_path_writable);
+ g_free (core_config->dynamics_path);
+ g_free (core_config->dynamics_path_writable);
g_free (core_config->pattern_path);
g_free (core_config->pattern_path_writable);
g_free (core_config->palette_path);
@@ -409,6 +439,7 @@ gimp_core_config_finalize (GObject *object)
g_free (core_config->font_path);
g_free (core_config->font_path_writable);
g_free (core_config->default_brush);
+ g_free (core_config->default_dynamics);
g_free (core_config->default_pattern);
g_free (core_config->default_palette);
g_free (core_config->default_gradient);
@@ -464,6 +495,14 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->brush_path_writable);
core_config->brush_path_writable = g_value_dup_string (value);
break;
+ case PROP_DYNAMICS_PATH:
+ g_free (core_config->dynamics_path);
+ core_config->dynamics_path = g_value_dup_string (value);
+ break;
+ case PROP_DYNAMICS_PATH_WRITABLE:
+ g_free (core_config->dynamics_path_writable);
+ core_config->dynamics_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);
@@ -500,6 +539,10 @@ gimp_core_config_set_property (GObject *object,
g_free (core_config->default_brush);
core_config->default_brush = g_value_dup_string (value);
break;
+ case PROP_DEFAULT_DYNAMICS:
+ g_free (core_config->default_dynamics);
+ core_config->default_dynamics = 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);
@@ -519,6 +562,9 @@ gimp_core_config_set_property (GObject *object,
case PROP_GLOBAL_BRUSH:
core_config->global_brush = g_value_get_boolean (value);
break;
+ case PROP_GLOBAL_DYNAMICS:
+ core_config->global_dynamics = g_value_get_boolean (value);
+ break;
case PROP_GLOBAL_PATTERN:
core_config->global_pattern = g_value_get_boolean (value);
break;
@@ -627,6 +673,12 @@ gimp_core_config_get_property (GObject *object,
case PROP_BRUSH_PATH_WRITABLE:
g_value_set_string (value, core_config->brush_path_writable);
break;
+ case PROP_DYNAMICS_PATH:
+ g_value_set_string (value, core_config->dynamics_path);
+ break;
+ case PROP_DYNAMICS_PATH_WRITABLE:
+ g_value_set_string (value, core_config->dynamics_path_writable);
+ break;
case PROP_PATTERN_PATH:
g_value_set_string (value, core_config->pattern_path);
break;
@@ -654,6 +706,9 @@ gimp_core_config_get_property (GObject *object,
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_PATTERN:
g_value_set_string (value, core_config->default_pattern);
break;
@@ -669,6 +724,9 @@ gimp_core_config_get_property (GObject *object,
case PROP_GLOBAL_BRUSH:
g_value_set_boolean (value, core_config->global_brush);
break;
+ case PROP_GLOBAL_DYNAMICS:
+ g_value_set_boolean (value, core_config->global_dynamics);
+ break;
case PROP_GLOBAL_PATTERN:
g_value_set_boolean (value, core_config->global_pattern);
break;
diff --git a/app/config/gimpcoreconfig.h b/app/config/gimpcoreconfig.h
index 319d0c9..1e5e760 100644
--- a/app/config/gimpcoreconfig.h
+++ b/app/config/gimpcoreconfig.h
@@ -46,6 +46,8 @@ struct _GimpCoreConfig
gchar *environ_path;
gchar *brush_path;
gchar *brush_path_writable;
+ gchar *dynamics_path;
+ gchar *dynamics_path_writable;
gchar *pattern_path;
gchar *pattern_path_writable;
gchar *palette_path;
@@ -55,11 +57,13 @@ struct _GimpCoreConfig
gchar *font_path;
gchar *font_path_writable; /* unused */
gchar *default_brush;
+ gchar *default_dynamics;
gchar *default_pattern;
gchar *default_palette;
gchar *default_gradient;
gchar *default_font;
gboolean global_brush;
+ gboolean global_dynamics;
gboolean global_pattern;
gboolean global_palette;
gboolean global_gradient;
diff --git a/app/config/gimprc-blurbs.h b/app/config/gimprc-blurbs.h
index eec056b..3b4fdda 100644
--- a/app/config/gimprc-blurbs.h
+++ b/app/config/gimprc-blurbs.h
@@ -19,6 +19,11 @@ N_("When enabled, an image will become the active image when its image " \
#define BRUSH_PATH_WRITABLE_BLURB ""
+#define DYNAMICS_PATH_BLURB \
+"Sets the dynamics search path."
+
+#define DYNAMICS_PATH_WRITABLE_BLURB ""
+
#define CANVAS_PADDING_COLOR_BLURB \
N_("Sets the canvas padding color used if the padding mode is set to " \
"custom color.")
@@ -49,6 +54,10 @@ N_("Context-dependent mouse pointers are helpful. They are enabled by " \
"Specify a default brush. The brush is searched for in the " \
"specified brush path."
+#define DEFAULT_DYNAMICS_BLURB \
+"Specify a default dynamics. The dynamics is searched for in the " \
+"specified dynamics path."
+
#define DEFAULT_DOT_FOR_DOT_BLURB \
N_("When enabled, this will ensure that each pixel of an image gets " \
"mapped to a pixel on the screen.")
@@ -135,6 +144,9 @@ N_("The window type hint that is set on dock windows and the toolbox " \
#define GLOBAL_BRUSH_BLURB \
N_("When enabled, the selected brush will be used for all tools.")
+#define GLOBAL_DYNAMICS_BLURB \
+N_("When enabled, the selected dynamics will be used for all tools.")
+
#define GLOBAL_FONT_BLURB \
"When enabled, the selected font will be used for all tools."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]