gimp r25700 - in trunk: . app/core app/widgets



Author: mitch
Date: Sun May 18 15:15:07 2008
New Revision: 25700
URL: http://svn.gnome.org/viewvc/gimp?rev=25700&view=rev

Log:
2008-05-18  Michael Natterer  <mitch gimp org>

	* app/core/gimpstrokeoptions.[ch]: renamed public function
	set_dash_pattern() to take_dash_pattern() to clarify memory
	management of the passed GArray.

	* app/widgets/gimpdasheditor.c
	* app/widgets/gimpstrokeeditor.c: changed accordingly.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpstrokeoptions.c
   trunk/app/core/gimpstrokeoptions.h
   trunk/app/widgets/gimpdasheditor.c
   trunk/app/widgets/gimpstrokeeditor.c

Modified: trunk/app/core/gimpstrokeoptions.c
==============================================================================
--- trunk/app/core/gimpstrokeoptions.c	(original)
+++ trunk/app/core/gimpstrokeoptions.c	Sun May 18 15:15:07 2008
@@ -186,8 +186,8 @@
         GArray      *pattern;
 
         pattern = gimp_dash_pattern_from_value_array (value_array);
-        gimp_stroke_options_set_dash_pattern (options, GIMP_DASH_CUSTOM,
-                                              pattern);
+        gimp_stroke_options_take_dash_pattern (options, GIMP_DASH_CUSTOM,
+                                               pattern);
       }
       break;
 
@@ -247,7 +247,7 @@
 }
 
 /**
- * gimp_stroke_options_set_dash_pattern:
+ * gimp_stroke_options_take_dash_pattern:
  * @options: a #GimpStrokeOptions object
  * @preset: a value out of the #GimpDashPreset enum
  * @pattern: a #GArray or %NULL if @preset is not %GIMP_DASH_CUSTOM
@@ -258,9 +258,9 @@
  * of the passed pattern.
  */
 void
-gimp_stroke_options_set_dash_pattern (GimpStrokeOptions *options,
-                                      GimpDashPreset     preset,
-                                      GArray            *pattern)
+gimp_stroke_options_take_dash_pattern (GimpStrokeOptions *options,
+                                       GimpDashPreset     preset,
+                                       GArray            *pattern)
 {
   g_return_if_fail (GIMP_IS_STROKE_OPTIONS (options));
   g_return_if_fail (preset == GIMP_DASH_CUSTOM || pattern == NULL);

Modified: trunk/app/core/gimpstrokeoptions.h
==============================================================================
--- trunk/app/core/gimpstrokeoptions.h	(original)
+++ trunk/app/core/gimpstrokeoptions.h	Sun May 18 15:15:07 2008
@@ -65,11 +65,11 @@
 };
 
 
-GType  gimp_stroke_options_get_type         (void) G_GNUC_CONST;
+GType  gimp_stroke_options_get_type          (void) G_GNUC_CONST;
 
-void   gimp_stroke_options_set_dash_pattern (GimpStrokeOptions *options,
-                                             GimpDashPreset     preset,
-                                             GArray            *pattern);
+void   gimp_stroke_options_take_dash_pattern (GimpStrokeOptions *options,
+                                              GimpDashPreset     preset,
+                                              GArray            *pattern);
 
 
 #endif  /*  __GIMP_STROKE_OPTIONS_H__  */

Modified: trunk/app/widgets/gimpdasheditor.c
==============================================================================
--- trunk/app/widgets/gimpdasheditor.c	(original)
+++ trunk/app/widgets/gimpdasheditor.c	Sun May 18 15:15:07 2008
@@ -479,8 +479,8 @@
                                                          editor->n_segments,
                                                          editor->dash_length);
 
-  gimp_stroke_options_set_dash_pattern (editor->stroke_options,
-                                        GIMP_DASH_CUSTOM, pattern);
+  gimp_stroke_options_take_dash_pattern (editor->stroke_options,
+                                         GIMP_DASH_CUSTOM, pattern);
 }
 
 static void

Modified: trunk/app/widgets/gimpstrokeeditor.c
==============================================================================
--- trunk/app/widgets/gimpstrokeeditor.c	(original)
+++ trunk/app/widgets/gimpstrokeeditor.c	Sun May 18 15:15:07 2008
@@ -382,7 +382,7 @@
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value) &&
       value != GIMP_DASH_CUSTOM)
     {
-      gimp_stroke_options_set_dash_pattern (options, value, NULL);
+      gimp_stroke_options_take_dash_pattern (options, value, NULL);
     }
 }
 



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