[gtk+/gtk-3-4] Document "set" properties a bit



commit 6235545ce756aa283187f39693dbb50ef09fa092
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat May 26 15:06:00 2012 -0400

    Document "set" properties a bit
    
    Both GtkTextTag and GtkCellRenderer make use of "set" properties
    which are a bit special. Document this.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=531319

 gtk/gtkcellrenderer.c |   11 ++++++++---
 gtk/gtktexttag.c      |    5 +++++
 2 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index 946c7e4..c941190 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -41,12 +41,12 @@
  * elements on a #cairo_t. Typically, one cell renderer is used to
  * draw many cells on the screen.  To this extent, it isn't expected that a
  * CellRenderer keep any permanent state around.  Instead, any state is set
- * just prior to use using #GObject<!-- -->s property system.  Then, the
+ * just prior to use using #GObjects property system.  Then, the
  * cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
  * is rendered in the correct location using gtk_cell_renderer_render().
  *
  * There are a number of rules that must be followed when writing a new
- * #GtkCellRenderer.  First and formost, its important that a certain set
+ * #GtkCellRenderer.  First and foremost, its important that a certain set
  * of properties will always yield a cell renderer of the same size,
  * barring a #GtkStyle change.  The #GtkCellRenderer also has a number of
  * generic properties that are expected to be honored by all children.
@@ -60,6 +60,11 @@
  * To make a cell renderer activatable or editable, you have to
  * implement the #GtkCellRendererClass.activate or
  * #GtkCellRendererClass.start_editing virtual functions, respectively.
+ *
+ * Many properties of #GtkCellRenderer and its subclasses have a
+ * corresponding "set" property, e.g. "cell-background-set" corresponds
+ * to "cell-background". These "set" properties reflect whether a property
+ * has been set or not. You should not set them independently.
  */
 
 
@@ -420,7 +425,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
 
   ADD_SET_PROP ("cell-background-set", PROP_CELL_BACKGROUND_SET,
                 P_("Cell background set"),
-                P_("Whether this tag affects the cell background color"));
+                P_("Whether the cell background color is set"));
 
   g_type_class_add_private (class, sizeof (GtkCellRendererPrivate));
 
diff --git a/gtk/gtktexttag.c b/gtk/gtktexttag.c
index 10a849d..6910517 100644
--- a/gtk/gtktexttag.c
+++ b/gtk/gtktexttag.c
@@ -61,6 +61,11 @@
  *
  * gtk_text_buffer_create_tag() is the best way to create tags.
  * See <application>gtk3-demo</application> for numerous examples.
+ *
+ * For each property of #GtkTextTag, there is a "set" property, e.g.
+ * "font-set" corresponds to "font". These "set" properties reflect
+ * whether a property has been set or not.
+ * You should not set them independently.
  */
 
 #include "config.h"



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