From 3dfef0f15a855bc575de816dc96e47a4652b736b Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 23 Oct 2008 21:30:28 +0000 Subject: [PATCH] rename GimpStrokeStyle to GimpFillStyle. 2008-10-23 Michael Natterer * app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle. * app/core/gimpfilloptions.[ch] * app/core/gimpdrawable-stroke.c (gimp_drawable_stroke_scan_convert): changed accordingly. svn path=/trunk/; revision=27379 --- ChangeLog | 8 +++++ app/core/core-enums.c | 56 +++++++++++++++++----------------- app/core/core-enums.h | 22 ++++++------- app/core/gimpdrawable-stroke.c | 4 +-- app/core/gimpfilloptions.c | 4 +-- app/core/gimpfilloptions.h | 6 ++-- 6 files changed, 54 insertions(+), 46 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35b81d5c1a..e1c4f97f13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-10-23 Michael Natterer + + * app/core/core-enums.[ch]: rename GimpStrokeStyle to GimpFillStyle. + + * app/core/gimpfilloptions.[ch] + * app/core/gimpdrawable-stroke.c + (gimp_drawable_stroke_scan_convert): changed accordingly. + 2008-10-23 Michael Natterer Merge a part of SOC 2006's vector layer branch: diff --git a/app/core/core-enums.c b/app/core/core-enums.c index 998ad2521f..4c39b207cf 100644 --- a/app/core/core-enums.c +++ b/app/core/core-enums.c @@ -264,6 +264,34 @@ gimp_fill_type_get_type (void) return type; } +GType +gimp_fill_style_get_type (void) +{ + static const GEnumValue values[] = + { + { GIMP_FILL_STYLE_SOLID, "GIMP_FILL_STYLE_SOLID", "solid" }, + { GIMP_FILL_STYLE_PATTERN, "GIMP_FILL_STYLE_PATTERN", "pattern" }, + { 0, NULL, NULL } + }; + + static const GimpEnumDesc descs[] = + { + { GIMP_FILL_STYLE_SOLID, N_("Solid color"), NULL }, + { GIMP_FILL_STYLE_PATTERN, N_("Pattern"), NULL }, + { 0, NULL, NULL } + }; + + static GType type = 0; + + if (! type) + { + type = g_enum_register_static ("GimpFillStyle", values); + gimp_enum_set_value_descriptions (type, descs); + } + + return type; +} + GType gimp_stroke_method_get_type (void) { @@ -292,34 +320,6 @@ gimp_stroke_method_get_type (void) return type; } -GType -gimp_stroke_style_get_type (void) -{ - static const GEnumValue values[] = - { - { GIMP_STROKE_STYLE_SOLID, "GIMP_STROKE_STYLE_SOLID", "solid" }, - { GIMP_STROKE_STYLE_PATTERN, "GIMP_STROKE_STYLE_PATTERN", "pattern" }, - { 0, NULL, NULL } - }; - - static const GimpEnumDesc descs[] = - { - { GIMP_STROKE_STYLE_SOLID, N_("Solid color"), NULL }, - { GIMP_STROKE_STYLE_PATTERN, N_("Pattern"), NULL }, - { 0, NULL, NULL } - }; - - static GType type = 0; - - if (! type) - { - type = g_enum_register_static ("GimpStrokeStyle", values); - gimp_enum_set_value_descriptions (type, descs); - } - - return type; -} - GType gimp_join_style_get_type (void) { diff --git a/app/core/core-enums.h b/app/core/core-enums.h index b452b5b104..d013d95a04 100644 --- a/app/core/core-enums.h +++ b/app/core/core-enums.h @@ -146,6 +146,17 @@ typedef enum } GimpFillType; +#define GIMP_TYPE_FILL_STYLE (gimp_fill_style_get_type ()) + +GType gimp_fill_style_get_type (void) G_GNUC_CONST; + +typedef enum /*< pdb-skip >*/ +{ + GIMP_FILL_STYLE_SOLID, /*< desc="Solid color" >*/ + GIMP_FILL_STYLE_PATTERN /*< desc="Pattern" >*/ +} GimpFillStyle; + + #define GIMP_TYPE_STROKE_METHOD (gimp_stroke_method_get_type ()) GType gimp_stroke_method_get_type (void) G_GNUC_CONST; @@ -157,17 +168,6 @@ typedef enum /*< pdb-skip >*/ } GimpStrokeMethod; -#define GIMP_TYPE_STROKE_STYLE (gimp_stroke_style_get_type ()) - -GType gimp_stroke_style_get_type (void) G_GNUC_CONST; - -typedef enum /*< pdb-skip >*/ -{ - GIMP_STROKE_STYLE_SOLID, /*< desc="Solid color" >*/ - GIMP_STROKE_STYLE_PATTERN /*< desc="Pattern" >*/ -} GimpStrokeStyle; - - #define GIMP_TYPE_JOIN_STYLE (gimp_join_style_get_type ()) GType gimp_join_style_get_type (void) G_GNUC_CONST; diff --git a/app/core/gimpdrawable-stroke.c b/app/core/gimpdrawable-stroke.c index bc97418666..98f8381558 100644 --- a/app/core/gimpdrawable-stroke.c +++ b/app/core/gimpdrawable-stroke.c @@ -281,7 +281,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, switch (GIMP_FILL_OPTIONS (options)->style) { - case GIMP_STROKE_STYLE_SOLID: + case GIMP_FILL_STYLE_SOLID: { guchar tmp_col[MAX_CHANNELS] = { 0, }; guchar col[MAX_CHANNELS] = { 0, }; @@ -299,7 +299,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable, } break; - case GIMP_STROKE_STYLE_PATTERN: + case GIMP_FILL_STYLE_PATTERN: { GimpPattern *pattern; TempBuf *pat_buf; diff --git a/app/core/gimpfilloptions.c b/app/core/gimpfilloptions.c index a46d4275ca..43219623ed 100644 --- a/app/core/gimpfilloptions.c +++ b/app/core/gimpfilloptions.c @@ -62,8 +62,8 @@ gimp_fill_options_class_init (GimpFillOptionsClass *klass) GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_STYLE, "style", NULL, - GIMP_TYPE_STROKE_STYLE, - GIMP_STROKE_STYLE_SOLID, + GIMP_TYPE_FILL_STYLE, + GIMP_FILL_STYLE_SOLID, GIMP_PARAM_STATIC_STRINGS); GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_ANTIALIAS, diff --git a/app/core/gimpfilloptions.h b/app/core/gimpfilloptions.h index 293c5e2c99..d1378fec7f 100644 --- a/app/core/gimpfilloptions.h +++ b/app/core/gimpfilloptions.h @@ -38,11 +38,11 @@ typedef struct _GimpFillOptionsClass GimpFillOptionsClass; struct _GimpFillOptions { - GimpContext parent_instance; + GimpContext parent_instance; - GimpStrokeStyle style; + GimpFillStyle style; - gboolean antialias; + gboolean antialias; }; struct _GimpFillOptionsClass