changed GimpBrush::get_extension() to return const gchar* instead of

2008-09-12  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpdata.h: changed GimpBrush::get_extension() to return
	const gchar* instead of gchar*

	* app/core/gimpbrush.c
	* app/core/gimpbrushgenerated.c
	* app/core/gimpcurve.c
	* app/core/gimpgradient.c
	* app/core/gimppalette.c
	* app/core/gimppattern.c: changed accordingly.


svn path=/trunk/; revision=26935
This commit is contained in:
Michael Natterer 2008-09-12 10:35:35 +00:00 committed by Michael Natterer
parent 4159bd63af
commit c985f2e2a5
8 changed files with 211 additions and 197 deletions

View File

@ -1,3 +1,15 @@
2008-09-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpdata.h: changed GimpBrush::get_extension() to return
const gchar* instead of gchar*
* app/core/gimpbrush.c
* app/core/gimpbrushgenerated.c
* app/core/gimpcurve.c
* app/core/gimpgradient.c
* app/core/gimppalette.c
* app/core/gimppattern.c: changed accordingly.
2008-09-11 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/tinyscheme/CHANGES: Updating to match version

View File

@ -48,36 +48,36 @@ enum
};
static void gimp_brush_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_brush_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_brush_finalize (GObject *object);
static void gimp_brush_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_brush_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_brush_finalize (GObject *object);
static gint64 gimp_brush_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_brush_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_brush_get_size (GimpViewable *viewable,
gint *width,
gint *height);
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_brush_get_description (GimpViewable *viewable,
gchar **tooltip);
static gchar * gimp_brush_get_extension (GimpData *data);
static gboolean gimp_brush_get_size (GimpViewable *viewable,
gint *width,
gint *height);
static TempBuf * gimp_brush_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_brush_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_brush_get_extension (GimpData *data);
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
GimpCoords *last_coords,
GimpCoords *cur_coords);
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
GimpCoords *last_coords,
GimpCoords *cur_coords);
static GimpBrush * gimp_brush_real_select_brush (GimpBrush *brush,
GimpCoords *last_coords,
GimpCoords *cur_coords);
static gboolean gimp_brush_real_want_null_motion (GimpBrush *brush,
GimpCoords *last_coords,
GimpCoords *cur_coords);
G_DEFINE_TYPE (GimpBrush, gimp_brush, GIMP_TYPE_DATA)
@ -335,7 +335,7 @@ gimp_brush_get_description (GimpViewable *viewable,
brush->mask->height);
}
static gchar *
static const gchar *
gimp_brush_get_extension (GimpData *data)
{
return GIMP_BRUSH_FILE_EXTENSION;

View File

@ -51,47 +51,48 @@ enum
/* local function prototypes */
static void gimp_brush_generated_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_brush_generated_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_brush_generated_dirty (GimpData *data);
static gchar * gimp_brush_generated_get_extension (GimpData *data);
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
static void gimp_brush_generated_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_brush_generated_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_brush_generated_scale_size (GimpBrush *gbrush,
gdouble scale,
gint *width,
gint *height);
static TempBuf * gimp_brush_generated_scale_mask (GimpBrush *gbrush,
gdouble scale);
static void gimp_brush_generated_dirty (GimpData *data);
static const gchar * gimp_brush_generated_get_extension (GimpData *data);
static GimpData * gimp_brush_generated_duplicate (GimpData *data);
static TempBuf * gimp_brush_generated_calc (GimpBrushGenerated *brush,
GimpBrushGeneratedShape shape,
gfloat radius,
gint spikes,
gfloat hardness,
gfloat aspect_ratio,
gfloat angle,
GimpVector2 *xaxis,
GimpVector2 *yaxis);
static void gimp_brush_generated_get_half_size (GimpBrushGenerated *gbrush,
GimpBrushGeneratedShape shape,
gfloat radius,
gint spikes,
gfloat hardness,
gfloat aspect_ratio,
gdouble angle_in_degrees,
gint *half_width,
gint *half_height,
gdouble *_s,
gdouble *_c,
GimpVector2 *_x_axis,
GimpVector2 *_y_axis);
static void gimp_brush_generated_scale_size (GimpBrush *gbrush,
gdouble scale,
gint *width,
gint *height);
static TempBuf * gimp_brush_generated_scale_mask (GimpBrush *gbrush,
gdouble scale);
static TempBuf * gimp_brush_generated_calc (GimpBrushGenerated *brush,
GimpBrushGeneratedShape shape,
gfloat radius,
gint spikes,
gfloat hardness,
gfloat aspect_ratio,
gfloat angle,
GimpVector2 *xaxis,
GimpVector2 *yaxis);
static void gimp_brush_generated_get_half_size (GimpBrushGenerated *gbrush,
GimpBrushGeneratedShape shape,
gfloat radius,
gint spikes,
gfloat hardness,
gfloat aspect_ratio,
gdouble angle_in_degrees,
gint *half_width,
gint *half_height,
gdouble *_s,
gdouble *_c,
GimpVector2 *_x_axis,
GimpVector2 *_y_axis);
G_DEFINE_TYPE (GimpBrushGenerated, gimp_brush_generated, GIMP_TYPE_BRUSH)
@ -256,7 +257,7 @@ gimp_brush_generated_dirty (GimpData *data)
GIMP_DATA_CLASS (parent_class)->dirty (data);
}
static gchar *
static const gchar *
gimp_brush_generated_get_extension (GimpData *data)
{
return GIMP_BRUSH_GENERATED_FILE_EXTENSION;

View File

@ -48,69 +48,69 @@ enum
/* local function prototypes */
static void gimp_curve_config_iface_init (GimpConfigInterface *iface);
static void gimp_curve_config_iface_init (GimpConfigInterface *iface);
static void gimp_curve_finalize (GObject *object);
static void gimp_curve_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_curve_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_curve_finalize (GObject *object);
static void gimp_curve_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_curve_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static gint64 gimp_curve_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_curve_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_curve_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_curve_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_curve_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_curve_get_description (GimpViewable *viewable,
gchar **tooltip);
static void gimp_curve_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_curve_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_curve_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_curve_get_description (GimpViewable *viewable,
gchar **tooltip);
static void gimp_curve_dirty (GimpData *data);
static gchar * gimp_curve_get_extension (GimpData *data);
static GimpData * gimp_curve_duplicate (GimpData *data);
static void gimp_curve_dirty (GimpData *data);
static const gchar * gimp_curve_get_extension (GimpData *data);
static GimpData * gimp_curve_duplicate (GimpData *data);
static gboolean gimp_curve_serialize (GimpConfig *config,
GimpConfigWriter *writer,
gpointer data);
static gboolean gimp_curve_deserialize (GimpConfig *config,
GScanner *scanner,
gint nest_level,
gpointer data);
static gboolean gimp_curve_equal (GimpConfig *a,
GimpConfig *b);
static void _gimp_curve_reset (GimpConfig *config);
static gboolean gimp_curve_copy (GimpConfig *src,
GimpConfig *dest,
GParamFlags flags);
static gboolean gimp_curve_serialize (GimpConfig *config,
GimpConfigWriter *writer,
gpointer data);
static gboolean gimp_curve_deserialize (GimpConfig *config,
GScanner *scanner,
gint nest_level,
gpointer data);
static gboolean gimp_curve_equal (GimpConfig *a,
GimpConfig *b);
static void _gimp_curve_reset (GimpConfig *config);
static gboolean gimp_curve_copy (GimpConfig *src,
GimpConfig *dest,
GParamFlags flags);
static void gimp_curve_set_n_points (GimpCurve *curve,
gint n_points);
static void gimp_curve_set_n_samples (GimpCurve *curve,
gint n_samples);
static void gimp_curve_set_n_points (GimpCurve *curve,
gint n_points);
static void gimp_curve_set_n_samples (GimpCurve *curve,
gint n_samples);
static void gimp_curve_calculate (GimpCurve *curve);
static void gimp_curve_plot (GimpCurve *curve,
gint p1,
gint p2,
gint p3,
gint p4);
static void gimp_curve_calculate (GimpCurve *curve);
static void gimp_curve_plot (GimpCurve *curve,
gint p1,
gint p2,
gint p3,
gint p4);
G_DEFINE_TYPE_WITH_CODE (GimpCurve, gimp_curve, GIMP_TYPE_DATA,
@ -426,7 +426,7 @@ gimp_curve_dirty (GimpData *data)
GIMP_DATA_CLASS (parent_class)->dirty (data);
}
static gchar *
static const gchar *
gimp_curve_get_extension (GimpData *data)
{
return GIMP_CURVE_FILE_EXTENSION;

View File

@ -67,13 +67,13 @@ struct _GimpDataClass
GimpViewableClass parent_class;
/* signals */
void (* dirty) (GimpData *data);
void (* dirty) (GimpData *data);
/* virtual functions */
gboolean (* save) (GimpData *data,
GError **error);
gchar * (* get_extension) (GimpData *data);
GimpData * (* duplicate) (GimpData *data);
gboolean (* save) (GimpData *data,
GError **error);
const gchar * (* get_extension) (GimpData *data);
GimpData * (* duplicate) (GimpData *data);
};

View File

@ -38,34 +38,34 @@
#define EPSILON 1e-10
static void gimp_gradient_finalize (GObject *object);
static void gimp_gradient_finalize (GObject *object);
static gint64 gimp_gradient_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_gradient_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_gradient_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_gradient_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_gradient_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_gradient_get_extension (GimpData *data);
static GimpData * gimp_gradient_duplicate (GimpData *data);
static void gimp_gradient_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_gradient_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_gradient_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static const gchar * gimp_gradient_get_extension (GimpData *data);
static GimpData * gimp_gradient_duplicate (GimpData *data);
static GimpGradientSegment *
gimp_gradient_get_segment_at_internal (GimpGradient *gradient,
GimpGradientSegment *seg,
gdouble pos);
gimp_gradient_get_segment_at_internal (GimpGradient *gradient,
GimpGradientSegment *seg,
gdouble pos);
static inline gdouble gimp_gradient_calc_linear_factor (gdouble middle,
@ -293,7 +293,7 @@ gimp_gradient_get_standard (void)
return standard_gradient;
}
static gchar *
static const gchar *
gimp_gradient_get_extension (GimpData *data)
{
return GIMP_GRADIENT_FILE_EXTENSION;

View File

@ -40,35 +40,35 @@
/* local function prototypes */
static void gimp_palette_finalize (GObject *object);
static void gimp_palette_finalize (GObject *object);
static gint64 gimp_palette_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_palette_get_memsize (GimpObject *object,
gint64 *gui_size);
static void gimp_palette_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_palette_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_palette_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_palette_get_description (GimpViewable *viewable,
gchar **tooltip);
static gchar * gimp_palette_get_extension (GimpData *data);
static GimpData * gimp_palette_duplicate (GimpData *data);
static void gimp_palette_get_preview_size (GimpViewable *viewable,
gint size,
gboolean popup,
gboolean dot_for_dot,
gint *width,
gint *height);
static gboolean gimp_palette_get_popup_size (GimpViewable *viewable,
gint width,
gint height,
gboolean dot_for_dot,
gint *popup_width,
gint *popup_height);
static TempBuf * gimp_palette_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_palette_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_palette_get_extension (GimpData *data);
static GimpData * gimp_palette_duplicate (GimpData *data);
static void gimp_palette_entry_free (GimpPaletteEntry *entry);
static gint64 gimp_palette_entry_get_memsize(GimpPaletteEntry *entry,
gint64 *gui_size);
static void gimp_palette_entry_free (GimpPaletteEntry *entry);
static gint64 gimp_palette_entry_get_memsize (GimpPaletteEntry *entry,
gint64 *gui_size);
G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_DATA)
@ -289,7 +289,7 @@ gimp_palette_get_standard (void)
return standard_palette;
}
static gchar *
static const gchar *
gimp_palette_get_extension (GimpData *data)
{
return GIMP_PALETTE_FILE_EXTENSION;

View File

@ -34,22 +34,23 @@
#include "gimp-intl.h"
static void gimp_pattern_finalize (GObject *object);
static void gimp_pattern_finalize (GObject *object);
static gint64 gimp_pattern_get_memsize (GimpObject *object,
gint64 *gui_size);
static gint64 gimp_pattern_get_memsize (GimpObject *object,
gint64 *gui_size);
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
gint *width,
gint *height);
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
gchar **tooltip);
static gchar * gimp_pattern_get_extension (GimpData *data);
static GimpData * gimp_pattern_duplicate (GimpData *data);
static gboolean gimp_pattern_get_size (GimpViewable *viewable,
gint *width,
gint *height);
static TempBuf * gimp_pattern_get_new_preview (GimpViewable *viewable,
GimpContext *context,
gint width,
gint height);
static gchar * gimp_pattern_get_description (GimpViewable *viewable,
gchar **tooltip);
static const gchar * gimp_pattern_get_extension (GimpData *data);
static GimpData * gimp_pattern_duplicate (GimpData *data);
G_DEFINE_TYPE (GimpPattern, gimp_pattern, GIMP_TYPE_DATA)
@ -160,7 +161,7 @@ gimp_pattern_get_description (GimpViewable *viewable,
pattern->mask->height);
}
static gchar *
static const gchar *
gimp_pattern_get_extension (GimpData *data)
{
return GIMP_PATTERN_FILE_EXTENSION;