[gtk+/rgba-texttags] Add some docs



commit 06c244088a6b5506ba2ed69571e05096ed0ac541
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 6 16:42:08 2011 -0400

    Add some docs
    
    Better point people at the free function for text attributes.

 gtk/gtktextattributes.c |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtktextattributes.c b/gtk/gtktextattributes.c
index 11f2561..8aca3b8 100644
--- a/gtk/gtktextattributes.c
+++ b/gtk/gtktextattributes.c
@@ -61,8 +61,9 @@
  * Creates a #GtkTextAttributes, which describes
  * a set of properties on some text.
  * 
- * Return value: a new #GtkTextAttributes
- **/
+ * Return value: a new #GtkTextAttributes,
+ *     free with gtk_text_attributes_unref().
+ */
 GtkTextAttributes*
 gtk_text_attributes_new (void)
 {
@@ -78,18 +79,19 @@ gtk_text_attributes_new (void)
   values->font_scale = 1.0;
 
   values->editable = TRUE;
-      
+
   return values;
 }
 
 /**
  * gtk_text_attributes_copy:
  * @src: a #GtkTextAttributes to be copied
- * 
+ *
  * Copies @src and returns a new #GtkTextAttributes.
- * 
- * Return value: a copy of @src
- **/
+ *
+ * Return value: a copy of @src,
+ *     free with gtk_text_attributes_unref()
+ */
 GtkTextAttributes*
 gtk_text_attributes_copy (GtkTextAttributes *src)
 {
@@ -109,10 +111,10 @@ G_DEFINE_BOXED_TYPE (GtkTextAttributes, gtk_text_attributes,
  * gtk_text_attributes_copy_values:
  * @src: a #GtkTextAttributes
  * @dest: another #GtkTextAttributes
- * 
- * Copies the values from @src to @dest so that @dest has the same values
- * as @src. Frees existing values in @dest.
- **/
+ *
+ * Copies the values from @src to @dest so that @dest has
+ * the same values as @src. Frees existing values in @dest.
+ */
 void
 gtk_text_attributes_copy_values (GtkTextAttributes *src,
                                  GtkTextAttributes *dest)
@@ -137,7 +139,7 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
 
   if (dest->appearance.rgba[0])
     gdk_rgba_free (dest->appearance.rgba[0]);
-  
+
   if (dest->appearance.rgba[1])
     gdk_rgba_free (dest->appearance.rgba[1]);
 
@@ -151,9 +153,9 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
 
   dest->language = src->language;
 
-  if (dest->font)
+  if (src->font)
     dest->font = pango_font_description_copy (src->font);
-  
+
   if (src->pg_bg_color)
     dest->pg_bg_color = gdk_color_copy (src->pg_bg_color);
 



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