X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkcellareacontext.c;h=f464c3ab30233d59b231042cba94e8a29d969b83;hb=5bbbc47a4c306653e8347f7afb85a940a503f755;hp=ca1ac3a0d83e4720eac7f00f6086bb00a534fc0b;hpb=80a11b7483d70b72b882e4009649d8f3f892417e;p=~andy%2Fgtk diff --git a/gtk/gtkcellareacontext.c b/gtk/gtkcellareacontext.c index ca1ac3a0d..f464c3ab3 100644 --- a/gtk/gtkcellareacontext.c +++ b/gtk/gtkcellareacontext.c @@ -16,9 +16,7 @@ * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ /** @@ -27,12 +25,12 @@ * @Title: GtkCellAreaContext * * The #GtkCellAreaContext object is created by a given #GtkCellArea - * implementation via it's #GtkCellAreaClass.create_context() virtual + * implementation via its #GtkCellAreaClass.create_context() virtual * method and is used to store cell sizes and alignments for a series of * #GtkTreeModel rows that are requested and rendered in the same context. * * #GtkCellLayout widgets can create any number of contexts in which to - * request and render groups of data rows. However its important that the + * request and render groups of data rows. However, it's important that the * same context which was used to request sizes for a given #GtkTreeModel * row also be used for the same row when calling other #GtkCellArea APIs * such as gtk_cell_area_render() and gtk_cell_area_event(). @@ -87,17 +85,9 @@ G_DEFINE_TYPE (GtkCellAreaContext, gtk_cell_area_context, G_TYPE_OBJECT); static void gtk_cell_area_context_init (GtkCellAreaContext *context) { - GtkCellAreaContextPrivate *priv; - context->priv = G_TYPE_INSTANCE_GET_PRIVATE (context, GTK_TYPE_CELL_AREA_CONTEXT, GtkCellAreaContextPrivate); - priv = context->priv; - - priv->min_width = -1; - priv->nat_width = -1; - priv->min_height = -1; - priv->nat_height = -1; } static void @@ -289,27 +279,27 @@ gtk_cell_area_context_real_reset (GtkCellAreaContext *context) g_object_freeze_notify (G_OBJECT (context)); - if (priv->min_width != -1) + if (priv->min_width != 0) { - priv->min_width = -1; + priv->min_width = 0; g_object_notify (G_OBJECT (context), "minimum-width"); } - if (priv->nat_width != -1) + if (priv->nat_width != 0) { - priv->nat_width = -1; + priv->nat_width = 0; g_object_notify (G_OBJECT (context), "natural-width"); } - if (priv->min_height != -1) + if (priv->min_height != 0) { - priv->min_height = -1; + priv->min_height = 0; g_object_notify (G_OBJECT (context), "minimum-height"); } - if (priv->nat_height != -1) + if (priv->nat_height != 0) { - priv->nat_height = -1; + priv->nat_height = 0; g_object_notify (G_OBJECT (context), "natural-height"); } @@ -339,7 +329,7 @@ gtk_cell_area_context_real_allocate (GtkCellAreaContext *context, * * Fetches the #GtkCellArea this @context was created by. * - * This is generally unneeded by layouting widgets; however + * This is generally unneeded by layouting widgets; however, * it is important for the context implementation itself to * fetch information about the area it is being used for. * @@ -348,7 +338,7 @@ gtk_cell_area_context_real_allocate (GtkCellAreaContext *context, * that the #GtkCellArea is configured with in order to * compute a proper allocation. * - * Return value: the #GtkCellArea this context was created by. + * Return value: (transfer none): the #GtkCellArea this context was created by. * * Since: 3.0 */ @@ -371,7 +361,7 @@ gtk_cell_area_context_get_area (GtkCellAreaContext *context) * Resets any previously cached request and allocation * data. * - * When underlying #GtkTreeModel data changes it's + * When underlying #GtkTreeModel data changes its * important to reset the context if the content * size is allowed to shrink. If the content size * is only allowed to grow (this is usually an option @@ -444,7 +434,7 @@ gtk_cell_area_context_allocate (GtkCellAreaContext *context, * requested with this context. * * After gtk_cell_area_context_reset() is called and/or before ever - * requesting the size of a #GtkCellArea, the returned values are -1. + * requesting the size of a #GtkCellArea, the returned values are 0. * * Since: 3.0 */ @@ -478,7 +468,7 @@ gtk_cell_area_context_get_preferred_width (GtkCellAreaContext *context, * requested with this context. * * After gtk_cell_area_context_reset() is called and/or before ever - * requesting the size of a #GtkCellArea, the returned values are -1. + * requesting the size of a #GtkCellArea, the returned values are 0. * * Since: 3.0 */