Re: typo in gtktexttag.c - patch



Kristian Rietveld <kristian planet nl> writes:

> On 22 Sep 2001, Owen Taylor wrote:
> >
> > Kristian Rietveld <kristian planet nl> writes:
> >
> > > Hi,
> > >
> > > gtk-demo gave g_warnings. I traced it down to a typo in gtktexttag.c (font
> > > weight is an enum not an int). Appended patch fixes this.
> > >
> > > Ok to commit?
> >
> > Actually, it's an int with some predefined values. The getters/setters
> > need to be fixed instead. (You can use a weight of 655 or whatever
> > if you so desire.)
> 
> Ok, then we do it this way (don't know why cvs diff sees differences in
> the above part...). The getter doesn't have this typo.
> 
> Is this one ok?

Ye, this looks fine. (Probably whitespace changes for the first
chunk ... what you can do is cut out the real part of the
patch and then apply the remainder reversed with 'patch -R'.)

Regards,
                                        Owen

> Index: gtktexttag.c
> ===================================================================
> RCS file: /cvs/gnome/gtk+/gtk/gtktexttag.c,v
> retrieving revision 1.46
> diff -u -r1.46 gtktexttag.c
> --- gtktexttag.c	2001/09/19 00:58:09	1.46
> +++ gtktexttag.c	2001/09/22 14:12:46
> @@ -324,14 +324,14 @@
>    g_object_class_install_property (object_class,
>                                     PROP_WEIGHT,
>                                     g_param_spec_int ("weight",
> -                                                     _("Font weight"),
> -                                                     _("Font weight"),
> -                                                     0,
> -                                                     G_MAXINT,
> -                                                     PANGO_WEIGHT_NORMAL,
> -                                                     G_PARAM_READABLE | G_PARAM_WRITABLE));
> +						     _("Font weight"),
> +						     _("Font weight"),
> +						     0,
> +						     G_MAXINT,
> +						     PANGO_WEIGHT_NORMAL,
> +						     G_PARAM_READABLE | G_PARAM_WRITABLE));
> 
> -
> +
>    g_object_class_install_property (object_class,
>                                     PROP_STRETCH,
>                                     g_param_spec_enum ("stretch",
> @@ -986,7 +986,7 @@
>  	    break;
>  	  case PROP_WEIGHT:
>  	    pango_font_description_set_weight (text_tag->values->font,
> -					       g_value_get_enum (value));
> +					       g_value_get_int (value));
>  	    break;
>  	  case PROP_STRETCH:
>  	    pango_font_description_set_stretch (text_tag->values->font,
> 
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list




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