gimp r26935 - in trunk: . app/core



Author: mitch
Date: Fri Sep 12 10:35:35 2008
New Revision: 26935
URL: http://svn.gnome.org/viewvc/gimp?rev=26935&view=rev

Log:
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.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpbrush.c
   trunk/app/core/gimpbrushgenerated.c
   trunk/app/core/gimpcurve.c
   trunk/app/core/gimpdata.h
   trunk/app/core/gimpgradient.c
   trunk/app/core/gimppalette.c
   trunk/app/core/gimppattern.c

Modified: trunk/app/core/gimpbrush.c
==============================================================================
--- trunk/app/core/gimpbrush.c	(original)
+++ trunk/app/core/gimpbrush.c	Fri Sep 12 10:35:35 2008
@@ -48,36 +48,36 @@
 };
 
 
-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 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 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 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 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);
 
 
 G_DEFINE_TYPE (GimpBrush, gimp_brush, GIMP_TYPE_DATA)
@@ -335,7 +335,7 @@
                           brush->mask->height);
 }
 
-static gchar *
+static const gchar *
 gimp_brush_get_extension (GimpData *data)
 {
   return GIMP_BRUSH_FILE_EXTENSION;

Modified: trunk/app/core/gimpbrushgenerated.c
==============================================================================
--- trunk/app/core/gimpbrushgenerated.c	(original)
+++ trunk/app/core/gimpbrushgenerated.c	Fri Sep 12 10:35:35 2008
@@ -51,47 +51,48 @@
 
 /*  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_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);
+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 const gchar * gimp_brush_generated_get_extension (GimpData     *data);
+static GimpData    * gimp_brush_generated_duplicate     (GimpData     *data);
+
+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_DATA_CLASS (parent_class)->dirty (data);
 }
 
-static gchar *
+static const gchar *
 gimp_brush_generated_get_extension (GimpData *data)
 {
   return GIMP_BRUSH_GENERATED_FILE_EXTENSION;

Modified: trunk/app/core/gimpcurve.c
==============================================================================
--- trunk/app/core/gimpcurve.c	(original)
+++ trunk/app/core/gimpcurve.c	Fri Sep 12 10:35:35 2008
@@ -48,69 +48,69 @@
 
 /*  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 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_dirty             (GimpData         *data);
-static 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 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_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 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 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 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);
 
 
 G_DEFINE_TYPE_WITH_CODE (GimpCurve, gimp_curve, GIMP_TYPE_DATA,
@@ -426,7 +426,7 @@
   GIMP_DATA_CLASS (parent_class)->dirty (data);
 }
 
-static gchar *
+static const gchar *
 gimp_curve_get_extension (GimpData *data)
 {
   return GIMP_CURVE_FILE_EXTENSION;

Modified: trunk/app/core/gimpdata.h
==============================================================================
--- trunk/app/core/gimpdata.h	(original)
+++ trunk/app/core/gimpdata.h	Fri Sep 12 10:35:35 2008
@@ -67,13 +67,13 @@
   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);
 };
 
 

Modified: trunk/app/core/gimpgradient.c
==============================================================================
--- trunk/app/core/gimpgradient.c	(original)
+++ trunk/app/core/gimpgradient.c	Fri Sep 12 10:35:35 2008
@@ -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 @@
   return standard_gradient;
 }
 
-static gchar *
+static const gchar *
 gimp_gradient_get_extension (GimpData *data)
 {
   return GIMP_GRADIENT_FILE_EXTENSION;

Modified: trunk/app/core/gimppalette.c
==============================================================================
--- trunk/app/core/gimppalette.c	(original)
+++ trunk/app/core/gimppalette.c	Fri Sep 12 10:35:35 2008
@@ -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_entry_free       (GimpPaletteEntry  *entry);
-static gint64     gimp_palette_entry_get_memsize(GimpPaletteEntry  *entry,
-                                                 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 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);
 
 
 G_DEFINE_TYPE (GimpPalette, gimp_palette, GIMP_TYPE_DATA)
@@ -289,7 +289,7 @@
   return standard_palette;
 }
 
-static gchar *
+static const gchar *
 gimp_palette_get_extension (GimpData *data)
 {
   return GIMP_PALETTE_FILE_EXTENSION;

Modified: trunk/app/core/gimppattern.c
==============================================================================
--- trunk/app/core/gimppattern.c	(original)
+++ trunk/app/core/gimppattern.c	Fri Sep 12 10:35:35 2008
@@ -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 @@
                           pattern->mask->height);
 }
 
-static gchar *
+static const gchar *
 gimp_pattern_get_extension (GimpData *data)
 {
   return GIMP_PATTERN_FILE_EXTENSION;



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